Author |
Message |
jane65
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Feb 24, 2009
Posts: 81
Location: UK
|
Posted:
Thu Nov 18, 2010 10:10 am |
|
I am modifying the Reviews module a bit but need to limit the number of characters in the textarea for the Review to 200 characters, which I can't seem to work out how to do, so I am wondering if someone here may be able to help me alter the code to do this.
This is the code that relates to the textarea that I want to modify.
Code:echo '<b>' . _REVIEW . ':</b><br />';
wysiwyg_textarea ('text', '', 'NukeUser', '50', '2' );
echo '<br />';
if (is_admin($admin)) {
echo '<font class="content">' . _PAGEBREAK . '</font><br />';
}
|
Thank you in advance for any help with this ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Thu Nov 18, 2010 5:27 pm |
|
There is a character count limit mod for the editor. If no one else has it, I will go through my stuff and get it for you this weekend. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 18, 2010 8:26 pm |
|
Here is a mod that may do what you are looking for. Before you use it, back up your site. Especially your includes/fckeditor folder. You will need to upload the included files into your root/includes/fckeditor folder. You will then need to change the 'NukeUser' in the code to 'ReviewsUser'. After that, delete your browsers cache and test it out.
http://trickedoutnews.com/nuken/CharCountMod.zip |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jane65
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 23, 2010 4:06 pm |
|
Thanks for your help and the mod, but unfortunately, its not working, do I have to add any code to the Reviews module code to make this work? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 23, 2010 4:12 pm |
|
Yes. You need to change NukeUser to ReviewsUser in this code:
Code:echo '<b>' . _REVIEW . ':</b><br />';
wysiwyg_textarea ('text', '', 'NukeUser', '50', '2' );
echo '<br />';
if (is_admin($admin)) {
echo '<font class="content">' . _PAGEBREAK . '</font><br />';
}
|
You will also need to clear your browsers cache to reload the javascript. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 23, 2010 4:25 pm |
|
There are two instances of NukeUser that need to be replaced in the modules/Reviews/index.php.
on line 169 and line 775 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 23, 2010 4:29 pm |
|
And if you want the admin to have the same limit mod, in modules/Reviews/admin/index.php you will find 2 instances of PHPNukeAdmin that need to be replaced with ReviewsAdmin. That is ONLY if you want the admin to have the 200 character limit, if not than just leave the admin alone. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|