The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I've tried searching the forums with no luck. I want it so on every forum post, if someone says the word, lets say Meepo, it will link to meepo.com
The variable replace manager is a good tool, but it replaces EVERYTHING. I just need this done in the posts area. If this isn't built into Vbulletin I would gladly pay someone to set it up for me. I would enter all the keywords and links manually. |
#2
|
||||
|
||||
![]()
I've posted this quite a few times and there is a version of it in the modifications area:
hook location - postbit_display_complete PHP Code:
|
#3
|
|||
|
|||
![]()
Lynne, thanks so much for the quick reply. To be fair I did a considerable amount of searching before posting this. I guess I was searching the wrong keywords.
Your code works perfectly and I figured out how to implement it, but one small issue. How can I make it so it's not case sensitive? Ex: Whether users type out Meepo, meepo or mEEpo it should still link to the same location? Using the code above it needs to be case sensitive for it to link correctly. |
#4
|
||||
|
||||
![]() Quote:
![]() |
#5
|
|||
|
|||
![]()
Lynne, you've been extremely helpful, but I have ONE last question, I promise
![]() Works like a charm, but I tried to make it so it only replaces each occurrence of the keyword ONCE rather than every single time it's mentioned in the post. Some googling led me to find this piece of code 'function str_replace_once' but I need it as istr_replace_once which apparently doesn't exist :[. Even if it did work though I'm not sure if it would work the way I need it to work? I have 100 keywords that are set to be replaced with that keyword as a URL - So if a post mentions 5 of those keywords, they should all be converted, but if the same posts mentions the same keyword twice, only one should be converted? Also, Lynne I would certainly donate something like $5 for your time :P, especially now that this got a tad bit more complicated. |
#6
|
|||
|
|||
![]() Quote:
This way, regardless of case in the post, it will always evaluate to the fully capitalized word stored in your array. HTH. Peter |
#7
|
||||
|
||||
![]()
^^ What he said is a very good solution and something I would not have thought of, so thank you EntropiaPlanets for posting that!
|
#8
|
|||
|
|||
![]()
Will ucwords() work as well? If I use ucwords() will I need to make all of the words in the array lower case for this one to work?
Because first character of each word uppercase looks cleaner than all caps ![]() |
#9
|
|||
|
|||
![]() Quote:
What goes on in the kitchen might not be pretty to look at, but as long as the clientele never finds out, they don't care ![]() And Lynne, your most welcome ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|