The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
regex help regarding img tags
to prevent hotlinking to unauthorized domains im trying to limit the img tag to only a couple
mysite.com and somefreeimagesite.com functions_bbcodeparse.php, you have this PHP Code:
(added www.mysite.com after the http:// part ) PHP Code:
the urls from the 2nd domain are in this format: HTML Code:
http://img(somenumbers and other stuff).cx HTML Code:
http://img ideally, i would like for it to jumble up anything posted that does not fit the two formats like if someone does HTML Code:
[img]http://google.com/image.type[/img] HTML Code:
[img]hqroiqrq9212o424229uy92r2252[/img] |
#2
|
||||
|
||||
wouldn't it be easier to use .htaccess to do this?
|
#3
|
|||
|
|||
not sure what u mean
.htaccess only stops hotlinking on my domain, not google's, cnn's, etc unless i am missing something can u explain? thanks |
#4
|
||||
|
||||
hold on, you're NOT trying to stop people hotlinking your images, but rather stop your site from hotlinking to other sites images?
|
#5
|
|||
|
|||
right
other domains Quote:
so if they type some other domain functions_bbcodeparse.php will jumble things up i think i see where to do it but any help would be appreciated its a bit below $bbcode = preg_replace that it actually starts outputting whats shown in the post btw, i got the first part working by just duplicating that line with the 2nd domain so i now have 2 $bbcode = preg_replace..... lines one above the other and it works but ???? i was reading for a day trying things and it said the | character is like a either or but when i tried the regex on the single line it did not work domain1|domain2...rest of line so now i have to lines with the only diff being domain 1 and domain 2 but its still will allow anything that starts with http://img would rather it match the http://img (somthing here) .cx |
#6
|
|||
|
|||
We had a problem with this awhile ago with people posting links to innapropriate material. The easiest solution we found was to simply add the domain to the censor list, that way anytime someone tries to post a link to a bad site it just comes out as, for example, http://www.********.com.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|