UBB.Dev
Posted By: JustDave [6.2] Location Display Fix - 01/11/2003 5:41 AM
Just in case you have a practical joker or two that like to place extremely long words into their locations to distort your showflat/showthreaded layouts you can do the following:

In your showflat/showthreaded php scripts find this:

Code
<br />         if ($Location) {<br />            $postrow[$i]['Location'] = "{$ubbt_lang['USER_LOC']} $Location";<br />         }<br />


to this:

Code
<br />         if ($Location) {<br />            if (strlen($Location) > 30) {<br />               $TitleText = $Location;<br />               $Location = substr($Location,0,30);<br />               $Location = "<span title=\"$TitleText\">$Location... </span>";<br />            }<br />            $postrow[$i]['Location'] = "{$ubbt_lang['USER_LOC']} $Location";<br />         }<br />



Current working example:
https://ubbdev.com/threads/php/...ew=collapsed&sb=5&o=&fpart=1
(mouse over the location display to see the full text)
Posted By: autoua.net Re: [6.2] Location Display Fix - 01/13/2003 3:11 AM
In showthreaded.php
Code
 	if ($Location) {<br />            if (strlen($Location) > 30) {<br />               $TitleText = $Location;<br />               $Location = substr($Location,0,30);<br />               $Location = "<span title=\"$TitleText\">$Location... </span>";<br />            }<br />>>fixed>>>     $Location = "{$ubbt_lang['USER_LOC']} $Location";<br />         }<br /> 
Posted By: JustDave Re: [6.2] Location Display Fix - 01/13/2003 3:41 AM
Thanks
Posted By: Dalantech Re: [6.2] Location Display Fix - 01/13/2003 8:15 AM
This one should be in a future release of Threads... Well done!
Posted By: caymuc Re: [6.2] Location Display Fix - 01/14/2003 12:45 AM
Thank you.
Yes this should be in the standard version.
Posted By: Dslam Re: [6.2] Location Display Fix - 06/13/2003 8:41 PM
this works in 6.3
© UBB.Developers