Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Word Replacement Details »»
Word Replacement
Version: 1.00, by applehat applehat is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 08-05-2005 Last Update: Never Installs: 36
 
No support by the author.

This is just a simple plug-in that will let you replace words in posts. This could be used for "AdWords" or Replacing curse words insted of just censoring.

Just thought I would share :-P

*cough* *cough*

I am a dumb novice, so this has no admin panel options or anything of that sort. If anyone ever wants to take this and make it all fancy, go ahead and just post.

Note: This should work on any 3.5 version that has the hook postbit_display_complete

This is the code...See how google is replaced with a link to google...make sence?
PHP Code:
$word = array(
'google',
'yahoo'
);

$link = array(
'<a href="http://google.com">google</a>',
'<a href="http://yahoo.com">yahoo</a>'
);


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

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Saudi Zoom

Comments
  #42  
Old 02-10-2011, 05:25 AM
oedipean oedipean is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there something like it for VB 4 ?
Reply With Quote
  #43  
Old 11-21-2011, 01:05 PM
prophetmuhammad prophetmuhammad is offline
 
Join Date: Feb 2009
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

need something like this for vb4 thanks
Reply With Quote
  #44  
Old 01-09-2012, 04:59 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on 3.8.6
Reply With Quote
  #45  
Old 06-25-2012, 08:19 AM
Saudi Zoom's Avatar
Saudi Zoom Saudi Zoom is offline
 
Join Date: Mar 2007
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used it to replace certain words with Google adsense codes that I'm planning to include in my articles in certain places! Worked perfect! Thx!
Reply With Quote
  #46  
Old 07-26-2012, 09:40 AM
vikash.sharma vikash.sharma is offline
 
Join Date: Jul 2012
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks applehat ..
Reply With Quote
  #47  
Old 12-01-2012, 12:09 PM
RyanFabbro's Avatar
RyanFabbro RyanFabbro is offline
 
Join Date: Aug 2012
Location: MI, USA
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i know its a big bump but i wanted to point out to people, if you use spaces in your replacement words it shouldnt break the links

example
PHP Code:
$word = array(
' google ',
'yahoo'
);

$link = array(
' <a href="http://google.com">google</a> ',
'<a href="http://yahoo.com">yahoo</a>'
);


$this->post['message'] = str_replace($word$link$this->post['message']); 
notice in this example google links should be fine, but the yahoo ones probally will still break since they have no spaces

but be sure to include spaces in your replacement also, or it will end up like

let check outGOOGLEits cool

im not sure if you would use &nbsp; for the space or just use a normal space, i havent tested
Reply With Quote
Благодарность от:
Lynne
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 02:33 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.04430 seconds
  • Memory Usage 2,267KB
  • 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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (2)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete