![]() |
Post Replacements
Post Replacements 1.8
About This hack allows you to have replacements for posts, for example you say you wanted every word that says vbulletin to say vbulletin.com you just have to put that in the option in vbulletin settings. Important When putting your replacements in the option read the description first to understand how it works. Change Log 1.1; Fixed the plugin thanks Stoebi 1.5; Replacements now don't interfere with words that include the replacement. Thanks again to Stoebi :) . A big thanks to Stoebi for providing most of the code! |
:) Wooooow nice, first reply and first install..
|
thanks, enjoy
|
This seems like a nice addition. I am a bit confused though.
1. When I add this lets say vB do I need to add the http://www.vbulletin.com so it shows vB===http://www.vbulletin.com as a hyperlink like this vB? 2. If I wanted to have this hyperlink a different color, would this also be possible? Example: like this: vB |
C_P, to your questions:
1. no, to get that you must put: vB===<a href="http://www.vbulletin.com">vB</a>, the option parsed the text I have to find a way to bypass that. 2.yes that is possible just put the HTML for the diffrent color arount the link code. |
screenshot pls?
|
ok, I may be doing something wrong here but this is enabled and am trying the following code replacements with no sucess:
Code:
vB===<a href="<A href="http://www.vbulletin.com"><font">http://www.vbulletin.com"><font color="#008000">vB</font></a>|||Computer Paradise===<a href="<A href="http://www.cpfools.com"><font">http://www.cpfools.com"><font color="#008000">Computer Paradise</font></a>|||rules===<a href="<A href="http://www.cpfools.com/index.php?option=com_content&task=view&id=5&Itemid=6"><font">http://www.cpfools.com/index.php?option=com_content&task=view&id=5&Itemid=6"><font color="#008000">rules</font></a>|||tutorial===<a href="<A href="http://www.cpfools.com/tutorials/"><font">http://www.cpfools.com/tutorials/"><font color="#008000">tutorial</font></a> http://www.cpfools.com/forum/showthr...5111#post15111 |
Quote:
PHP Code:
PHP Code:
Code:
.replacement { |
Thank you much for the code suggestions but after copying and pasting both codes you supplied, neither work.
This one may be going bye bye. Sorry bud but if this cannot be easily done, not sure it is worth it. Thanks anyway, good idea. |
I think this is casued by the way vb reads links sorry this doesn't work for you.
|
Quote:
|
This add-on doesn't work for me…
|
Quote:
|
This is not working for me either. No matter what I enter it will not parse the replacement value. I have tried setting enable to yes and to no (just incase). I checked to make sure that the replacement product and plugin were both active. I have tried the following formats:
For a single entry I have tried: Code:
test===change text Code:
test===change text ||| test2===change text2 Code:
test===change text|||test2===change text2 |
Quote:
|
None. I have tried the above on a clean install (test board).
|
Im sure there is a difference, but whats the difference between this and using vBulletins built in replacement variables?
|
Quote:
|
thanks
|
Quote:
Quote:
Quote:
|
Here the Same, it doesen´t works.
GreeTz Snatch |
Hi,
replace $vbulletin with $this->registry in the plugin Replacments (Hook postbit_display_complete) (2 times). Code:
//$post[message] Kind Regards, Stoebi |
Now that are good news, Stoebi! So I will try this one out
|
Quote:
|
NOW it works!
I used the following code and works perfectly: Code:
vB===<a href="http://www.vbulletin.com"><font color="#008000">vB</font></a>|||Computer Paradise===<a href="http://www.cpfools.com"><font color="#008000">Computer Paradise</font></a>|||rules===<A href="http://www.cpfools.com/index.php?option=com_content&task=view&id=5&Itemid=6"><font color="#008000">rules</font></a>|||tutorial===<a href="http://www.cpfools.com/tutorials/"><font color="#008000">tutorial</font></a> http://www.cpfools.com/forum/showthread.php?t=5901 Clicked install! Thank you! |
Working now with the updated code. Thank you. I have a feature request if possible. Can you make the text replacement case insensitive? For example, typing test or Test would be able to have the replacement text applied instead of having to setup several of the same replacements to compensate for case.
|
Quote:
|
Quote:
|
Thanks.
|
Quote:
EDIT: Currently it is case insensitive. |
great,
ThanKs |
is this a permanent change to the post (changed when the user posts it or when it's read from the database)? because this looks like it could be a good april 1 add-on!
|
no it changes the text that is displayed so the post is the same.
|
thank you
|
this is a hack i have been waiting for for a long time, however i wish the adding new replacements system was better, but anyways, i guess im doing something wrong i thought i had understood it correctly
PHP Code:
|
Use this for your vboption:
Code:
newegg===<a href="http://www.newegg.com">NewEgg</a>|||daemon tools===<a href="http://en.wikipedia.org/wiki/Daemon_tools">Daemon Tools</a> |
The hack is working great .. but I have noticed a problem with Links to external site.
is there any way the anythink with the BBcode [ url]....... [/ url] between them can be ignored by the plugin ?.. for example.. replacement code Code:
microsoft===<a href="http://www.microsoft.com">microsoft</a> if some has posted a link in the post to the microsoft site it screws up ... for example ... Code:
http://www.microsoft.com/windows/ie/ie6/downloads/critical/ie6sp1/default.mspx Code:
http://www.microsoft.comcom/windows/ie/ie6/downloads/critical/ie6sp1/default.mspx |
Quote:
to be: Code:
microsoft ===<a href="http://www.microsoft.com">microsoft</a> |
Quote:
I already modified the code like you suggested before you posted a quick fix to correct the problem ... like so .. Code:
microsoft ===<a href="http://www.microsoft.com">microsoft </a> otherwise the word being replaced would join to the next word because the space would not be replaced. Thanks DeanoG |
Hi
i've found some problems. 1. For example: php===<a href="http://de.php.net">PHP</a> Post a message with the word php -> save Quote these message and see the problem. Anyone confirm this behavior? 2. Post a message with the word file.php -> save, reload and see. Anyone confirm this behavior? 3. Post a message with http://your_url/php -> save, reload and see. Anyone confirm this behavior? Edit: 4. foo===foobar post a message and enter this text: foo and fooexample Reload and see: foobar and foobarexample First word is correct, but not the second word. Can anyone confirm all these behaviors? I'm working on a fix now. Any interests? Regards, Stoebi |
All times are GMT. The time now is 03:28 AM. |
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:
|