Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
Replace Word in Pagetext Details »»
Replace Word in Pagetext
Version: 1.00, by Andy Andy is offline
Developer Last Online: May 2019 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.0 Rating:
Released: 02-12-2010 Last Update: Never Installs: 10
 
No support by the author.

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.

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 Now

File Type: txt replace_word.txt (1,012 Bytes, 114 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-13-2010, 07:02 PM
BSMedia BSMedia is offline
 
Join Date: Feb 2009
Posts: 454
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why not use replacement manager built in?
Reply With Quote
  #3  
Old 02-13-2010, 07:23 PM
Andy Andy is offline
 
Join Date: Sep 2003
Location: San Francisco
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BSMedia View Post
why not use replacement manager built in?
Replacement manager doesn't actually change the pagetext, it simply replaces the html that is outputted. This can be a problem when a member is searching for a particular word. Therefore it's better to correct the word in the database. I don't recommend using the Replacement Manager.
Reply With Quote
  #4  
Old 02-13-2010, 10:05 PM
MarkJW's Avatar
MarkJW MarkJW is offline
 
Join Date: Nov 2006
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So this is a wordfilter type thing? Awesome, I can screw with my members by making words change! :3
Reply With Quote
  #5  
Old 02-20-2010, 03:49 PM
wolfyman's Avatar
wolfyman wolfyman is offline
 
Join Date: Apr 2005
Posts: 719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

alert!

I installed this and thought it was working great.. but for some reason, the Replace Word postdata plugin causes a weird error.

With this enabled, when you move a thread from one forum to another.... the first post gets stripped of data.

wtf is that all about?!

Here is my php code:

PHP Code:
$search = array(
'this1',
'this2',
);
$replace = array(
'that1',
'that 2',
);
$this->post['pagetext'] = str_replace($search$replace$this->post['pagetext']); 
Reply With Quote
  #6  
Old 03-16-2010, 09:43 PM
black hours's Avatar
black hours black hours is offline
 
Join Date: Apr 2006
Location: مصر
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want this plugin Turns to product Contain a control panel to be the best
Reply With Quote
  #7  
Old 04-27-2010, 12:38 PM
Shogo Shogo is offline
 
Join Date: Oct 2005
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wat is the hook location for the same effect in the title of the threads?

Thx

Best regards
Reply With Quote
  #8  
Old 08-14-2010, 08:42 PM
alhindasi alhindasi is offline
 
Join Date: Apr 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you do it in "product" to be easy to control it
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:07 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04307 seconds
  • Memory Usage 2,290KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete