The vB Geek

Go Back   The vB Geek > vB Geek Products > Geek Auto-Linker

Geek Auto-Linker GAL automatically links keywords that users type in posts to advertising hover pop-ups.

Advertisement
This is an HTML example. Isn't it just wonderful?!?!
  Learn how to remove ads

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2009, 06:17 PM
minstrel minstrel is offline
Member
 
Join Date: Jun 2007
Location: Ottawa, Canada
Posts: 31
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Exclamation GAL fails if the term is wrapped in BBCode

For defined GAL terms, wrapping the term in any BBcode causes the autolink to fail.

This included bolding, italics, etc., as you can see here:

GAL

GAL

GAL

GAL

GAL

GAL

GAL

Any way to work around this?
Reply With Quote
  #2  
Old 05-19-2009, 05:38 PM
Morgan's Avatar
Morgan Morgan is offline
Administrator
 
Join Date: Jul 2006
Posts: 2,255
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

GALs between HTML tags do not auto-link. Let's use an A HREF tag as an example. GAL does not auto-link whereas GAL does. Why do that? Because you wouldn't want <a href="http://www.thevbgeek.com/">whatever</a> auto-linked as it might screw up the link. Same goes for other HTML markup. You don't want text inside the actual tag such as attributes to auto-link, and you don't want text between tags to auto-link, because doing so might break the HTML. There is no nice way to handle every single possible text combination that a user could enter in a post. IMO the best regular expression that I made is as follows, but if you want to try a different one, you can do that via the ACP GAL Regular Expressions option:
Code:
#(\b($1)\b(?=[^>]*<)(?![^<]*</))#im
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote
  #3  
Old 06-17-2009, 09:24 PM
minstrel minstrel is offline
Member
 
Join Date: Jun 2007
Location: Ottawa, Canada
Posts: 31
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Forn some reason, I didn't receive the email notification of your reply to this thread so I'm just getting back to it now.

What I would like is for GAL to ignore the following codes:
Bold [b
Italics [I
Undelrine [u
Color [COLOR
Font [FONT
Size [SIZE
Can you tell me how to change the GAL regex to allow this?
Reply With Quote
  #4  
Old 06-22-2009, 04:34 PM
Morgan's Avatar
Morgan Morgan is offline
Administrator
 
Join Date: Jul 2006
Posts: 2,255
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

There is not a nice way to account for certain tags while discounting other tags. Untested but you can try the following though you may need to try different renditions as well:
Code:
#(\b((?<=\s|<b>|<i>|<u>|<font color="*">|<font face="*">|<font size="*">)($1))\b)#im
Looking at the "assertions" section on this page may help you create the regular expression you want.
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering non wrapped banners zimdude Geek Advertising Banner System 1 08-03-2009 01:58 PM
Smilies gone bbcode gone ? luckske Geek Auto-Linker 2 10-27-2006 08:15 AM
Have Sub-Forums in Forum Display Wrapped by GARS? beernuts Geek Article and Review System 1 02-11-2006 05:21 PM
BBcode for references Unimatrix Prime Geek Article and Review System 1 11-16-2005 05:50 PM
[unconfirmed]BBcode shows html in posts when GAL is activated TCB Geek Auto-Linker 13 10-19-2005 09:36 PM


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.