Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Replace Text Details »»
Replace Text
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-12-2003 Last Update: Never Installs: 18
 
No support by the author.

This is more of a getting you started piece of code than a copy and paste your board is hacked kind of release. If you don't know how to code in PHP, this hack is NOT for you.


What this "hack" does is it allows you to replace a word in a post with something else. It doesn't replace the word in titles or anywhere else like replacements do. Just in a post.

What I use it for: I replace the word Netflix in every post with a link to my Netflix affilliate.

What you might use it for: affilliate links, swear word replacements with style, pranks, whatever

You will need to modify the function that I have included to set up your own replacement words. You might want to replace more than one thing. It's up to you. Have fun with this and share what you have done.

Demo:

http://www.eaforums.com/forums/showt...threadid=22557

I will help as much as I can in customizing this for you within reason.

Show Your Support

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

Comments
  #2  
Old 03-14-2003, 12:27 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Useful for updating smilie names, I'll check it out sometime. Nice work!
Reply With Quote
  #3  
Old 03-14-2003, 12:28 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't mean to sound negative, but can't you do the same thing with tags in vbcode without hacking?
Reply With Quote
  #4  
Old 03-14-2003, 12:40 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The idea is you just type Netflix and it happens to turn into an affiliate link.
Reply With Quote
  #5  
Old 03-14-2003, 01:11 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I understand that. But a tag would be more versatile instead of having to hack the php file every time you wanted to change it. But to each his own, I guess.
Reply With Quote
  #6  
Old 03-14-2003, 01:48 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How is this different from the Replacement Variable system? I use it to replace the phrase "closednow" with an image of a padlock, sort of a funny tradition on my forums. Works for me.
Reply With Quote
  #7  
Old 03-14-2003, 03:16 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this is more of a filter wich is biult in vB but doesn't work well with other languages... at least it didn't work for me

this could be a better way to make it censer certain words ..
Reply With Quote
  #8  
Old 03-14-2003, 04:41 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What this hack does is it replaces the word with a link or whatever you want retrospectively as well (I think). Also, it's better than replacement, as replacement affects post titles, whereas this doesn't (from what I can understand).
Reply With Quote
  #9  
Old 03-14-2003, 01:14 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin is correct. Replacements changed the word in thread titles, as well, which then effectively rendered the thread unreadable because it became a link to Netflix.

I didn't use vbbcode because I don't want to have to edit each post and I don't want to have to rely on the membership to put it in.

I use this in conjunction with a hack Logician wrote for me eons ago that changes any link somebody posts to Amazon to a link that uses my affilliate ID. That hack helped quite a bit; so I am trying to expand slowly into other relevant affiliates.

Amy
Reply With Quote
  #10  
Old 03-14-2003, 01:46 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow i was just thinking of doing something like this. Im ganna build a page (might use the glossery hack) and have said word link to the glossery when its typed. this saves me some time

[high]* Brad licks install[/high]
Reply With Quote
Reply


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 01:47 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.04684 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
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
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete