Andy
02-12-2010, 10:00 PM
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: http://vbulletin.org
Replace: http://www.vbulletin.org
You will need to create two plugins.
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']);
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']);
Search: http://vbulletin.org
Replace: http://www.vbulletin.org
You will need to create two plugins.
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']);
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']);