Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 03-24-2005, 09:01 PM
er16004's Avatar
er16004 Offline
pp regular
 
Join Date: Mar 2005
Location: hou.tx.usa
Posts: 38
MOD for REFERER length

I wanted to reduce (truncate) the length of the URL's listed in the REFERERS, so I found the code around line 375 in the orginal index.php in the root.

Look for this code:
Code:
// take down the length as urls can be quite long
$referername = $referer;

$length = strlen($referername);
if($length > 50) { $referername = substr($referername,0,50); $referername = "$referername..."; }
$referer_print .= "<li><a href='$referer'>$numb     $referername</a></li>";
}
And replace the line with the number 50 to whatever charcter limit you want, just make sure they match (there's two 50s there).

If this has already been discussed, sorry, I didn't see it.

You can see in action here: http://www.ericrasch.com/index.php?x=ref

I used a 35 character limit instead of the default 50..
__________________
http://ericrasch.com powered by pixelpost
Reply With Quote
  #2  
Old 05-20-2005, 02:14 PM
er16004's Avatar
er16004 Offline
pp regular
 
Join Date: Mar 2005
Location: hou.tx.usa
Posts: 38
I upgraded to 1.4.1 and needed to edit the index.php file again to cover the modification I wanted. FYI, the line you need to look for is:

Code:
if($length > 50) { $referername = substr($referername,0,50)
I'm using it on my referer page here: http://ericrasch.com/index.php?x=ref
__________________
http://ericrasch.com powered by pixelpost
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 08:35 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs