Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2001
Posts: 77
JJS
Offline
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 77
or reduce the size of graphics before they display in the news boxes of IIP so they don't rezize the tables and destroy the layout of the page?

For instance someone left this link in one of my forums

http://www.football.com/cgi-bin/art...ni+could+get+start+against+Bucs&sfb=

And it caused the middle table to run off the page! Is there any work around for this?


Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Since IIP uses .threads' markup routines there is no direct way of changing the urls. IIP can strip the html in a post which would fix the problem.

Or, just tell people not to post such long urls/words in the news posts.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I try to use [url= ] stuff[ /url] whenever I post things that will end up on the front page, it's much cleaner looking that way


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This does seem to have been fixed recently...... or is it just me... these URL's wrap in this post.

[edit]OK - never mind... I'm using OmniNet on the mac... and it does word wrap the URL's.... but in checking IE and Netscape it doesn't.

Cool to know that this is possible on the browser end..... maybe IE and Netscape will figure it out.

Last edited by JoshPet; 10/23/2002 7:32 PM.
Joined: Oct 2002
Posts: 1
Lurker
Lurker
Offline
Joined: Oct 2002
Posts: 1
I'm not using Threads but I plan to do so in the future.
The following code will cut anything above 50 characters in width, kinda like vBulletin's behavior. It will cut the 'showen' URL of course not the actual one which resides in the '<a href="..">' .

Note it might not be quite accurate, but I've tested it with very large strings ( range(1,1000000) ) and it worked.

So somebody put this in UBBThreads.

code:

// The URL to be showen actually
$ShowenURL = $URL;

// How many characters to remove?
$TotalDel = strlen($ShowenURL) - 50;

// Cut down by half for substr
$PullChars = (int) ($TotalDel / 2);


if ( strlen($ShowenURL) >= 50 ) {
// We will do operation from the middle of the string
$Mid = (int) (strlen($ShowenURL) / 2);

// Do it!
$ShowenURL = substr_replace($ShowenURL, '..', $Mid, $PullChars-1);
$ShowenURL = substr_replace($ShowenURL, '..', $Mid-$PullChars+1, $PullChars-1);
}




Bond .. James Bond
Sponsored Links

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
hatter
hatter
USA
Posts: 69
Joined: January 2001
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)