View Full Version : Random & Recent product - product name character limit ?
January 1st, 2011, 08:40 AM
My product database for reviewpost has alot of long character based product names of which first lot of characters are the same. What ends up happening is recent and random product listing sidebar/bottom tables end up cutting off the full product name due to character limit in place.
Wondering where do I change the limit for characters displayed for product name for random/recent and search results page, seems to be limited to 20 characters ?
January 1st, 2011, 09:30 AM
There are limited so as not to cause viewing problems on your site. You do know what happens if you have alot of long titles with no spaces right? You end up with a horrific looking site because you can not span anything without a space therefore you end up with all this funky malformed tables. You would have to alter the code depending on where your talking to a higher number if you want
For instance this is the line in pp-inc.php that controls the photo blocks
$ptitle[$count] = ( strlen($fulltitle) < 20 ? $fulltitle : substr($fulltitle, 0, 20) );
January 2nd, 2011, 10:50 AM
i see.. hmmm cause right now nearly all products listed on random/recent product listings show same product name for first 20 characters heh
part of the length is due to manufacturer name + product name. So maybe if i could introduce a line break between the manufacturer name and product name in the recent/random product listings to allow for longer product name ?
i.e. change from
manufacturer name + product name
manufacturer name +
product name (on new line break)
where would I do that ? same place ?
Update: for now i've increased it from 20 to 35 and fits all my product names perfectly :)
January 2nd, 2011, 02:57 PM
yes you just increase the characters. we limit the size for spacing issues in certain places thats it.
January 2nd, 2011, 08:07 PM
k while it increased character limit on recent/random pages, where do i change character limit for search by date outputed results when clicking calendar dates ? i.e. results from
January 2nd, 2011, 08:50 PM
You would see a similar line in search.php using strlen php function.
January 3rd, 2011, 06:05 AM
January 3rd, 2011, 07:32 AM
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.