PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
jane65
New Member
New Member


Joined: Feb 24, 2009
Posts: 12

PostPosted: Thu Nov 18, 2010 10:10 am Reply with quote Back to top

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
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Thu Nov 18, 2010 5:27 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Thu Nov 18, 2010 8:26 pm Reply with quote Back to top

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.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Send e-mail Visit poster's website
jane65
New Member
New Member


Joined: Feb 24, 2009
Posts: 12

PostPosted: Tue Nov 23, 2010 4:06 pm Reply with quote Back to top

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?
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Tue Nov 23, 2010 4:12 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Tue Nov 23, 2010 4:25 pm Reply with quote Back to top

There are two instances of NukeUser that need to be replaced in the modules/Reviews/index.php.

on line 169 and line 775
View user's profile Send private message Send e-mail Visit poster's website
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Tue Nov 23, 2010 4:29 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum