Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
I am having the problem of users that host their own images are making animated .gifs, large filesize .jpgs, etc.

The idea would be in the Control Panel where we allow them to upload or not, to also have a toggle that either DOES or DOES NOT allow them to link to an offsite image.

I was going to "comment out" the box where you can place the URL for an offsite image, but this is not in the templates, it is in the editbasic.php.

Didn't know if something like this would be easy to add...or at least template'ize, OR if it might have already been hacked in a Mod.

Thanks.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It's in the config file.... to allow or disallow the [ image ] tag in posts.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Actually I am talking about your posting icon

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Oh I see what you're saying. In their profile.

If you remove the pictures path then that option will be off.... but they won't be able to upload a picture either. Probably change that field in editbasic.php into a hidden form field, then they could only upload a pic and not provide a link to one.

Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
sounds like a job for the '.htaccess' file

Code
 <br /><IfModule mod_rewrite.c> <br />RewriteEngine On <br />RewriteCond %{HTTP_REFERER} !^$ <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_1_to_allow_linking.com/.*$ [NC] <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_2_to_allow_linking.com/.*$ [NC] <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_3_to_allow_linking.com/.*$ [NC] <br />RewriteRule \.(gif|GIF|jpg|JPG|mpg|MPG|mpeg|mpeg|mov|MOV|avi|AVI|wmv|WMV)$ http://www.YOURSITE.com/NO-HOTLINKING-IMAGE.jpg [R,L] <br /></IfModule> <br /> <br />IndexIgnore * <br />


just put this '.htaccess' file in your root directory (or in the sub directory if you only want files in that dir, and all of its subs to be affected)

Any site that is in your COND listing, will be alowd to hotlink to your files... all else will get the "NO-HOTLINKING-IMAGE.jpg" file... or whatever you've decided to call it...

The extensions that are in the RULE line, will be the only extensions affected by the rule.


....

if you are using a windows machine to upload and work on the '.htaccess' file on a *nix box... create a file called, 'htaccess.txt' with the included commands, then upload it to your server and at that point, rename it to '.htaccess'

best of luck!


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Sponsored Links
Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
whoops - was I in the wrong forum to post a solution to this problem?

i just read the board rules and it instructed me not to post code.... Grrrr


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No you were fine. We're not allowed to post whole infopop scripts.... but code tidbits and code that isn't copyright is fine. Just can't post a whole copyrighted infopop script.

Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
ok cool, Josh - that makes complete sense thumbsup THANKS!


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com

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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3531
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 9
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
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)