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,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
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: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Sponsored Links
Joined: Jul 2001
Posts: 1,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
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: UBBT 7.7.5 // Preview: UBBT 8.0.0
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,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
ok cool, Josh - that makes complete sense thumbsup THANKS!


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
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
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)