PDA

View Full Version : Censor part of a url only in certain forums?


JoeLouie
04-25-2005, 09:44 AM
I've been looking for a way to make it so all urls posted in certain forums are automatically changed to hxxp:// rather than http://. I've searched, and come up with nothing, and I have no clue how to make this hack myself. Anybody give me a hand with this?

Marco van Herwaarden
04-25-2005, 10:05 AM
Well it depends on what you are trying to do with it. Please explain more what you try to do.

JoeLouie
04-25-2005, 10:57 AM
well... we have a few forums on the site that are only visible to certain members and one of our rules for those sections are no live links, so we ask that when posting a link that they use hxxp:// rather than http://. So I was looking for a way that when the user types a link in their post (ex: http://www.vbulletin.org) that it automatically changes it (ex: hxxp://www.vbulletin.org) so they have to copy it into the address bar. Does that make sense?

Sebastian
04-25-2005, 01:39 PM
uhm, just uncheck the "Automatically parse links in text" when posting...

see: http://www.vbulletin.org

Marco van Herwaarden
04-25-2005, 08:17 PM
Or you could hack teh includes/functions_bbcodeparse.php

Made it once for a site that all outside link where redirected to an anonimyzer, all links to pages on the board where untouched. Not so difficult to do.

JoeLouie
04-26-2005, 07:28 PM
uhm, just uncheck the "Automatically parse links in text" when posting...

see: http://www.vbulletin.org

That would be one solution, but I'm looking for a way to automatically do it without the user having to uncheck that every time.

Sebastian
04-26-2005, 11:56 PM
you can modify the new posting template and set a conditional so its unchecked by default for which ever forum it is you want it off.

JoeLouie
04-27-2005, 06:09 PM
you can modify the new posting template and set a conditional so its unchecked by default for which ever forum it is you want it off.

Hmm, didn't think about that... not quite what I was looking for, but it'll get the job done. Thanks.

Jenta
05-15-2005, 05:16 AM
i kinda wanted to do something similar to cut down on users hotlinking to images on domains they do not own

if i recall, i changed the regular expression to only allow 2 domains
mine and a free image hosting provider

what i would need to finish it is to have it return some jumpled up text instead of the unparsed link
this should drive the point home that they are not to hotlink!

want to show an image? post a link to the page its contained on
use an img tag to an uanthorized domain and domain/pic.jpg turns into afhafhafh or some wording telling them not to hotlink