Back to vBulletin 4.x Add-ons

Replace Word in Pagetext
Mod Version: 1.00, by Andy

vB Version: 4.0.0 Rating: (0 vote - 0 average) Installs: 10
Released: 13 Feb 2010 Last Update: Never Downloads: 107
Not Supported  

This plugin is designed to replace words in the pagetext. For example to always make sure there is a www in your forums url.

Search: https://vbulletin.org
Replace: http://www.vbulletin.org

You will need to create two plugins.

PHP Code:
Productvbulletin
Hook Location
postdata_presave
Title
Replace Word postdata
Execution Order
5
Plugin PHP Code
:

$search = array(
'http://vbulletin.com',
'http://vbulletin.org',
);
$replace = array(
'http://www.vbulletin.com',
'http://www.vbulletin.org',
);
$this->post['pagetext'] = str_replace($search$replace$this->post['pagetext']); 
PHP Code:
Productvbulletin
Hook Location
threaddata_presave
Title
Replace Word Threaddata
Execution Order
5
Plugin PHP Code
:

$search = array(
'http://vbulletin.com',
'http://vbulletin.org',
);
$replace = array(
'http://www.vbulletin.com',
'http://www.vbulletin.org',
);
$this->post['pagetext'] = str_replace($search$replace$this->post['pagetext']); 

Download

File Type: %1$s replace_word.txt (1,012 Bytes, 116 downloads)


vblts.ru supports vBulletin®, 2022-2024