Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 3 Years, 1 Month, 3 Weeks ago Badwords Parsing Issue
#1
Solved: 3 Years, 1 Month, 3 Weeks ago
I am using MyCodes with myBB word filtering (bad words) to create a type of internal 'smart linking'.



Here is what I have:

MyCodes:
Regular Expression:  \[mylink\]
Replacement: <a href="mylink.wherever"><i>MYLINK</i></a>
Regular Expression: \[mylink2\]
Replacement: <a href="mylink.wherever2"><i>MYLINK2</i></a>

BadWords:
Bad Word:  mylink
Replacement:  [mylink]
Bad Word:  mylink2
Replacement:  [mylink2]

This works absolutely wonderful:



MESSAGE:
"Mylink takes a user to a specific information page."
OUTPUT:
MYLINK takes a user to a specific information page.


MESSAGE:
"Mylink takes a user to a specific information page.  Whereas mylink2 goes to a different page."
OUTPUT:
MYLINK takes a user to a specific information page.  Whereas MYLINK2 goes to a different page.


This is the problem:  when "mylink" (or 'mylink2' etc.) is used multiple times in the same entry, brackets are placed around the link that was used more than once:

MESSAGE:
"Mylink takes a user to a specific informaton page.  Whereas mylink2 goes to a different page.  Users like mylink."
OUTPUT:
[MYLINKtakes a user to a specific information page.  Whereas MYLINK2 goes to a different page.   Users like [MYLINK].








I just learned that "MyCode" will do this all on its own without needing "BadWords" to replace the text with a link.  


In MyCodes do the following:

Regular Expression:  mylink
Replacement: <a href="mylink">mylink</a>

Works like a charm.  For some reason I thought that MyCode required brackets in order to work.
Reply
Jump to the post that solved this thread.


Messages In This Thread
Badwords Parsing Issue - by Dexie - 07-21-2015, 07:05 PM
RE: Badwords Parsing Issue - by Destroy666 - 07-24-2015, 01:59 PM
MyCode Syntax - by Dexie - 07-21-2015, 08:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)