1
spacejoee
How to change bbcode : [url] ?
  • 2006/4/6 3:47

  • spacejoee

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/25


Hi !
1- i would like to know if it is possible to add a rel="nofollow" to the url source code when a membre add and url using the bb code ? if yes wich file shoud i edit ?

2- Same thing for the url in the profil, how to add target="blank" and rel="nofollow" ? .

Thank you, and excuse my english.

2
iHackCode
Re: How to change bbcode : [url] ?

Quote:

spacejoee wrote:
Hi !
1- i would like to know if it is possible to add a rel="nofollow" to the url source code when a membre add and url using the bb code ? if yes wich file shoud i edit ?

class\module.textsanitizer.php
changing the replacements like this.
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
        
$replacements[] = '.XOOPS_URL.'/\2" target="_blank" rel="nofollow">\3';
        
$patterns[] = "/[url=(['"]?)(http[s]?://[^"'<>]*)\1](.*)[/url]/sU";
        
$replacements[] = '\3';
        
$patterns[] = "/[url=(['"]?)(ftp?://[^"'<>]*)\1](.*)[/url]/sU";
        
$replacements[] = '\3';
        
$patterns[] = "/[url=(['"]?)([^"'<>]*)\1](.*)[/url]/sU";
        
$replacements[] = '\3';

Quote:

2- Same thing for the url in the profil, how to add target="blank" and rel="nofollow" ? .

Thank you, and excuse my english.


userinfo.php look for "user_websiteurl"
looks like
assign('user_websiteurl', ''.$thisUser->getVar('url').'');
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

3
stelian
Re: How to change bbcode : [url] ?
  • 2006/4/18 12:11

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


Quote:

Bandit-X wrote:
class\module.textsanitizer.php
changing the replacements like this.
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
        
$replacements[] = '.XOOPS_URL.'/\2" target="_blank" rel="nofollow">\3';
        
$patterns[] = "/[url=(['"]?)(http[s]?://[^"'<>]*)\1](.*)[/url]/sU";
        
$replacements[] = '\3';
        
$patterns[] = "/[url=(['"]?)(ftp?://[^"'<>]*)\1](.*)[/url]/sU";
        
$replacements[] = '\3';
        
$patterns[] = "/[url=(['"]?)([^"'<>]*)\1](.*)[/url]/sU";
        
$replacements[] = '\3';


Bandit-X, please, can you be more specific with this? I analised my module.textsanitizer.php and I am not shoure what exactly should I replace. I am afraid to damage something.

Thank you in advance!

4
iHackCode
Re: How to change bbcode : [url] ?

i just added rel="nofollow" in the replacements for the url code
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

5
stelian
Re: How to change bbcode : [url] ?
  • 2006/4/24 10:17

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


That was a stupid question. I modified it. Thank you verry much.

6
spacejoee
Re: How to change bbcode : [url] ?
  • 2006/6/25 23:20

  • spacejoee

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/25


Thank you very much Bandit !

Login

Who's Online

320 user(s) are online (234 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits