Previous Thread
Next Thread
Print Thread
Rate Thread
#282798 12/31/2004 11:29 AM
Joined: Dec 2004
Posts: 34
User
User
Offline
Joined: Dec 2004
Posts: 34
Is there a way to restrict the width of a remote image in a post? I've seen the Mod for restricting the image in a Signature, but can it be done in a post?

TIA

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Sure, basically the same way, just applied to the addpost.php and/or editpost.php.

Joined: Dec 2004
Posts: 34
User
User
Offline
Joined: Dec 2004
Posts: 34
That's easy for you to say.

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
OK...
In addpost.php and modifypost.php
search for:
$html = new html;

add underneath:

include("checkimages.php");

Copy the file checkimages.php from the attachment into the threads folder, edit it before with your limit values.
Attachments
124206-checkimages.zip (0 Bytes, 4 downloads)

Joined: Dec 2004
Posts: 34
User
User
Offline
Joined: Dec 2004
Posts: 34
Wow, thanks. I'll give it a try.

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
$config['ImageSize'] is in bytes btw, so 200000 would be ~200 kb.

Joined: Dec 2004
Posts: 34
User
User
Offline
Joined: Dec 2004
Posts: 34
It works perfectly!

Thank you very much.

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550


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:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 701
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 13
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
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-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)