| Author |
Message |
jane65 New Member


Joined: Feb 24, 2009 Posts: 12
|
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  |
|
|
|
 |
nuken RavenNuke(tm) Development Team

Joined: Mar 11, 2007 Posts: 1536 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. |
|
|
|
 |
nuken RavenNuke(tm) Development Team

Joined: Mar 11, 2007 Posts: 1536 Location: North Carolina
|
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.
|
|
|
|
 |
jane65 New Member


Joined: Feb 24, 2009 Posts: 12
|
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? |
|
|
|
 |
nuken RavenNuke(tm) Development Team

Joined: Mar 11, 2007 Posts: 1536 Location: North Carolina
|
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. |
|
|
|
 |
nuken RavenNuke(tm) Development Team

Joined: Mar 11, 2007 Posts: 1536 Location: North Carolina
|
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 |
|
|
|
 |
nuken RavenNuke(tm) Development Team

Joined: Mar 11, 2007 Posts: 1536 Location: North Carolina
|
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. |
|
|
|
 |
|
|
|
|