The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Modify Post as Displayed
We'd like to create a plugin(?) that modifies a post before it is displayed to remove URL links for a specific set of URL's as the post is being displayed:
For instance we'd like to modify http://unpaid_advertisement_site.com so that the link is removed (i.e., "http://unpaid_advertisement_site.com" instead). I'm not sure how to accomplish this cleanly. Any advice would be appreciated. Chuck |
#2
|
||||
|
||||
Have you tried the Replacement Manager? I'm not sure if it would work, but it may. Find what the link looks like in the page source - <a href="xxxx">xxxx</a> maybe? And put the full thing in to be replaced and the single non-parse link as the replacement. Again, I'm not sure if that will work.
|
#3
|
|||
|
|||
Quote:
Chuck |
#4
|
||||
|
||||
Are you talking about the size of the input box on the screen? It will just scroll with the contents of what you put in there.
|
#5
|
|||
|
|||
If you want to rewrite links, you'll want to use two plugins.
This one will take the text to be posted, and submit it to a function so can it can be run through a preg_replace or similar function. Code:
<plugin active="1" executionorder="5"> <title>Title Of Mod</title> <hookname>postbit_display_complete</hookname> <phpcode><![CDATA[global $vbulletin; $this->post['message'] = Function_Name($this->post['message']); ]]></phpcode> </plugin> Code:
<title>Plugin Title</title> <hookname>global_start</hookname> <phpcode><![CDATA[ function Function_Name($post) { global $vbulletin; //Preg_replace + other Functions return $post; } ]]></phpcode> |
#6
|
|||
|
|||
Is it possible to do a search and replace on the bb instead? Different hook location?
--------------- Added [DATE]1231361257[/DATE] at [TIME]1231361257[/TIME] --------------- After saving, it appears that the content is truncated to 100 characters. |
#7
|
|||
|
|||
Although you can do the replace on the bb code, I believe you will have to hardcode it into the php files themselves, as standard bb codes aren't editable.
|
#8
|
||||
|
||||
You can modify the function of the BB code, by adding a plugin. Look at the end of class_bbcode.php.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|