phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Links not recognized in [URL] tags

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
daddyo



Joined: 12 Sep 2007
Posts: 47

Links not recognized in [URL] tagsPosted: Thu Oct 25, 2007 1:21 pm    Post subject: Links not recognized in [URL] tags

I recently found where I needed to add the vertical bar "|" character to the search string in order to make links directly posted in my forum clickable.

However, I can't figure out where to add in the vertical bar "|" character so that when someone uses [URL] tags to make a URL, it also makes the URL clickable.

In other words, if I post a URL like this

-http://mysite.com/this|is|my|url

it actually knows it's a link in my forum and makes it clickable.

But if I put the [URL= tag around it, it doesn't recognize it anymore.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 10:45 am    Post subject: Re: Links not recognized in [URL] tags

Have you tried with + as separator ?

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
daddyo



Joined: 12 Sep 2007
Posts: 47

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 2:12 pm    Post subject: Re: Links not recognized in [URL] tags

I'm not sure what you mean. Can you please explain?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 2:35 pm    Post subject: Re: Links not recognized in [URL] tags

-http://mysite.com/this+is+my+url for example.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
daddyo



Joined: 12 Sep 2007
Posts: 47

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 2:44 pm    Post subject: Re: Links not recognized in [URL] tags

The problem I was having was related to users posting external links with vertical bars.

Here's a good example:

http://www.hallmark.com/webapp/wcs/stores/servlet/category2|10001|10051|149051|147551;149051|ecards|Photo%20Cards

phpBB wasn't parsing them correctly and making them clickable, so I found a place in the code where it makes links clickable and added "\|" in the criteria (since vertical bar represents OR in some occasions and migh cause other problems unless you escape it) and it now makes these links clickable.

But, if someone posts this same URL as

[url=http://www.hallmark.com/webapp/wcs/stores/servlet/category2|10001|10051|149051|147551;149051|ecards|Photo%20Cards]Click Here[/url]

The [URL] BBCode Tags don't know how to deal with vertical bars and thus don't make the link clickable.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 2:51 pm    Post subject: Re: Links not recognized in [URL] tags

Ho I see now.

This deals with the bbcode regex in includes/bbcodes.php :
Code:
   // matches a [url]xxxx://www.phpbb.com[/url] code..
   $patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url1'];

   // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url2'];

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url4']


I guess you can find the proper place to add a nice \[ in these with a bit of testing Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
daddyo



Joined: 12 Sep 2007
Posts: 47

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 2:59 pm    Post subject: Re: Links not recognized in [URL] tags

Awesome.

includes/bbcodes.php is exactly what I needed.

The hardest part for me in making site mods on my own is simply knowing which files to look in.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 3:50 pm    Post subject: Re: Links not recognized in [URL] tags

Then, if you have coding skill, do not hesitate to ask where to look at, I have gone though phpBB's code so much already I almost know it by heart Laughing

As well, a tool like search and replace can help you out a lot in this quest Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
daddyo



Joined: 12 Sep 2007
Posts: 47

Links not recognized in [URL] tagsPosted: Sun Oct 28, 2007 4:00 pm    Post subject: Re: Links not recognized in [URL] tags

Thanks for your help.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 1 of 1

Navigation Similar Topics

Jump to: