PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   width of the results (http://www.phpdig.net/forum/showthread.php?t=652)

bigals 03-12-2004 12: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 09: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 on it.

bigals 03-13-2004 10:09 AM

oh I see, i've found that

Quote:

'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 10: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 10: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.


All times are GMT -8. The time now is 12:19 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.