|
|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
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.
|
|
|
|
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
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 <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!
|
|
|
|
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
|
|
|
|
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 THANKS!
|
|
|
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.
|
|
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|