![]() |
Replace Text
This is more of a getting you started piece of code than a copy and paste your board is hacked kind of release. If you don't know how to code in PHP, this hack is NOT for you.
What this "hack" does is it allows you to replace a word in a post with something else. It doesn't replace the word in titles or anywhere else like replacements do. Just in a post. What I use it for: I replace the word Netflix in every post with a link to my Netflix affilliate. What you might use it for: affilliate links, swear word replacements with style, pranks, whatever :D You will need to modify the function that I have included to set up your own replacement words. You might want to replace more than one thing. It's up to you. Have fun with this and share what you have done. Demo: http://www.eaforums.com/forums/showt...threadid=22557 I will help as much as I can in customizing this for you within reason. |
Useful for updating smilie names, I'll check it out sometime. Nice work! :)
|
I don't mean to sound negative, but can't you do the same thing with tags in vbcode without hacking? ;)
|
The idea is you just type Netflix and it happens to turn into an affiliate link.
|
I understand that. But a tag would be more versatile instead of having to hack the php file every time you wanted to change it. But to each his own, I guess.
|
How is this different from the Replacement Variable system? I use it to replace the phrase "closednow" with an image of a padlock, sort of a funny tradition on my forums. Works for me.
|
I think this is more of a filter wich is biult in vB but doesn't work well with other languages... at least it didn't work for me
this could be a better way to make it censer certain words .. |
What this hack does is it replaces the word with a link or whatever you want retrospectively as well (I think). Also, it's better than replacement, as replacement affects post titles, whereas this doesn't (from what I can understand).
|
Erwin is correct. Replacements changed the word in thread titles, as well, which then effectively rendered the thread unreadable because it became a link to Netflix.
I didn't use vbbcode because I don't want to have to edit each post and I don't want to have to rely on the membership to put it in. I use this in conjunction with a hack Logician wrote for me eons ago that changes any link somebody posts to Amazon to a link that uses my affilliate ID. That hack helped quite a bit; so I am trying to expand slowly into other relevant affiliates. Amy |
wow i was just thinking of doing something like this. Im ganna build a page (might use the glossery hack) and have said word link to the glossery when its typed. this saves me some time :)
[high]* Brad licks install[/high] |
All times are GMT. The time now is 09:13 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|