Advertisement:

Precede all outgoing URLs with code.

Aloittaja kbox, joulukuu 21, 2005, 09:07:34 IP

« edellinen - seuraava »

kbox

Hi.

Im looking to add http://mysite.com/redir.php?goto= [nofollow] before all urls posted and all urls in peoples sigs.

I want to do this so i can track which links are clicked and to prevent spammers gaining PR from posting in my forum..

Can someone tell which files i need to edit and where to include this jumper script to allposted URL's?

thanks.


-MunDy-

I'm not 100% sure wether this is the best way (or even the correct way) as I'm a bit of a novice, but from poking around the SMF code, it seems that Sources/Subs-Post.php is where the bbc code is parsed. If you found where it parses the url tags from this:

[url=http://thisisasite.com/]OMGSPLOSION[/url]

to this:

<a href="http://thisisasite.com/">OMGSPLOSION</a>

You could just tell it to add http://mysite.com/redir.php?goto= to the start of the href=

As for signatures and profiles, you'll need to find which script handles them, and edit it. I'd assume they are handled in similar ways. Just go poking around the code in /Sources/ and read the comments etc and you should find what you're looking for.

Hope I helped.

kbox

Cheers Mundy, the main problem was finding the file which deals with converting bbcode.
I'll have a look round that sources dir, hopefully that will yield some results.

Thanks.

Advertisement: