Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2001
Posts: 25
User
User
Joined: Apr 2001
Posts: 25
as you can see with this posting - a long entry in location without any space kills the layout (at least in mozilla)
is there a fix for this?
any idea how this can be prevented, except for admin-action?

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
You might want to re-post this in the bugs forum at Infopop, with a link to this thread.

However, I'm not sure there's an easy fix.

My solution would be to simply edit the user's profile and add spaces or whatever. If a user deliberately put a long value in the location field just to be annoying, I would use the Advanced Banning hack to remove his ability to edit his profile.

Since your profile may get edited by you or someone else before Rick et. al. see this thread, I'll clarify that this issue concerns a user placing a long string without spaces in the Location field of his basic profile, and is easy to reproduce.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Isn't there a mod around here somewhere that deals with this issue??.......

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I did a fix for this simply by cutting the string down to 25 characters on showflat and showthreaded. I guess it could be made smarter by counting the length of each word, but I didn't feel like doing any extra work because some people find it funny to break the layout.

I have this bit of code in showflat
Code
<br />         if ($Location) {<br />            if (strlen($Location) > 25)<br />               $Location = substr($Location, 0, 22) . "...";<br />            $postrow[$i]['Location'] = "{$ubbt_lang['USER_LOC']} $Location";<br />         }<br />


And this in showthreaded:
Code
<br />      if ($Location) {<br />         if (strlen($Location) > 25)<br />            $Location = substr($Location, 0, 22) . "...";<br />         $Location = "{$ubbt_lang['USER_LOC']} $Location";<br />      }<br />


This should go where the variables are set in each script, I don't have a clean copy available atm, so I can't tell you exactly where. It should look something similar except for the the second if-statement and the line with substr() in it. This is for 6.1 btw, don't know if it has changed in later versions, but the basic idea should be the same at least.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Doah I edited it becuase I saw the post in the other forum first.

JustDave did a fix for this too.... although looks pert'near gardeners.

Location Display Fix

Sponsored Links
Joined: Apr 2001
Posts: 25
User
User
Joined: Apr 2001
Posts: 25
thanx for the hacks, took the one from JustDave, working fine with 6.3.2


btw: the hack is not yet installed in threadsdev (just tried - but don't be afraid, won't try again

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
LOL

Rick is going to add this to 6.4.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)