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:
Product: vbulletin
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:
Product: vbulletin
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']);