vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Word Replacement (https://vborg.vbsupport.ru/showthread.php?t=93758)

applehat 08-05-2005 10:00 PM

Word Replacement
 
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* https://vborg.vbsupport.ru/ *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']); 


ThePimp 08-06-2005 09:24 PM

Nice one. Been looking for something like this... It would be nice to have this added to the admincp, with a CP module/plugin, where you can add a word + it's replacement value, possibly in the Forum Manager, and each forum can have different censors. Just a suggestion.

chanzero 08-07-2005 01:12 AM

thanks! this fun. i used my to replace curse words with mytzlplk lol

BamaStangGuy 08-07-2005 02:00 AM

umm is it just me or does this work exactly like the Replacement Variable Manager already in vBulletin?

TCM 08-07-2005 08:04 AM

Quote:

Originally Posted by BrentWilson
umm is it just me or does this work exactly like the Replacement Variable Manager already in vBulletin?

Except less powerful? Yea, it does. Very much so.

dwh 08-07-2005 08:53 AM

If I understood both systems correctly, the replacement variable manager affects everything in the post AND everything in templates. So if you replace "<td>" with "NO HTML", then all your templates with "<td>" in it would be broken, whereas this hack only affects data in a post.

I could be wrong, but that's my impression.

Logikos 08-07-2005 09:36 AM

This does almost the same thing as my hack ..https://vborg.vbsupport.ru/showthrea...threadid=71191

Boofo 08-07-2005 09:48 AM

Quote:

Originally Posted by Live Wire
This does almost the same thing as my hack ..https://vborg.vbsupport.ru/showthrea...threadid=71191

R U going to update yours for 3.5? ;)

Rhoads 08-07-2005 10:00 AM

Nice hack, thnx ;)

Logikos 08-07-2005 10:23 AM

Quote:

Originally Posted by Boofo
R U going to update yours for 3.5? ;)

Of course I am. I'm going for that Master Coder tile. :p


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01007 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete