PDA

View Full Version : width of the results


bigals
03-12-2004, 01:48 AM
HAHA hello again, I have a new question...

on my search results pagei want to keep the width of the results down to about 450 pixels, because at the moment it displays the address of each search results page and the addresses are really long,

I've changed it before but now i can't remember how to restrict the width of each search result on screen,

any ideas?

cheers.

Charter
03-12-2004, 10:55 AM
Hi. If you want to truncate the URL, search for complete_path in the search_function.php file and perhaps do a substr (http://www.php.net/manual/en/function.substr.php) on it.

bigals
03-13-2004, 11:09 AM
oh I see, i've found that

'complete_path' => $url,

but i don't understand hot to limit the length shown on screen like you were talking about?

cheers, alex.

Charter
03-13-2004, 11:12 AM
Hi. Try something like:

'complete_path' => substr($url,0,X)."...",

where X is the number of characters you want to show.

bigals
03-13-2004, 11:21 AM
Man, Your a STAR!!

That simple bit you showed me has just taught me so much and everytime i see something work like that I just get more and more impressed and clear minded about all this scripting,

It worked at treat, thankyou!!!!

Bigals.