PDA

View Full Version : Replace Post Content in vBulletin


bankcroft
08-18-2013, 01:44 PM
Hi there,

as I haven't found a solution to this on my own, here's my question:

How is it possible to automatically replace certain post content with other content?

I'm using vBulletin 4 and the included thread creation from RSS. Some special characters aren't imported the way they should be (for example: ' turns out to be displayed as ').

I'd like to create a replacement that whenever ' is posted, it get's replaced by '.

Any ideas on how to achieve this?

Kind regards,
Cornelius

DF031
08-18-2013, 02:17 PM
As long as it is one replacement issue you could (I think) use the censorship feature of VB

Lynne
08-18-2013, 03:16 PM
If you do a search, you will find a word replacement modification and you could probably modify that to only work in certain forums (the ones where you have the RSS feeds posted).

bankcroft
08-19-2013, 11:27 AM
If you do a search, you will find a word replacement modification and you could probably modify that to only work in certain forums (the ones where you have the RSS feeds posted).

I did a search and I found no modification for vBulletin 4.

--------------- Added 1376915322 at 1376915322 ---------------

As long as it is one replacement issue you could (I think) use the censorship feature of VB

The censorship feature would replace content with ****.
I want to define what content should be used for the replacement of a word.

Lynne
08-19-2013, 02:50 PM
hook location - postbit_display_complete

$word = array(
'WordA',
'WordB'
);

$link = array(
'ReplaceA',
'ReplaceB'
);


$this->post['message'] = str_ireplace($word, $link, $this->post['message']);


Modify to suite....