Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-21-2009, 07:05 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Joey Link View Post
Ok, so it sounds like what you posted is definitely what I want. I'm just looking to replace bad words with words I specify (or rather, one word). Will this work retroactively or only from the time I install it?

Also, I'm not entirely sure where I put the code. I see it says postbit_display_complete but I don't see that style template.
postbit_display_complete is a hook location.

This replaces words as the post is viewed, not as it is made. So, it should replace words retroactively.

Quote:
Originally Posted by BlueNinjaGo View Post
Would that add much (or any) extra work on the server? Enough to be noticeable is what I'm asking....
I didn't notice any change on my server. However, I also changed it a bit so it is only to be used on Moderator/Admin Posts (so we can write things in shorthand but have it spit out a bunch of stuff).

Also, if someone hits Quote, the original word(s) are still there because, as I said, it doesn't replace the words as the post is made.
Reply With Quote
  #12  
Old 04-21-2009, 07:34 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a tutorial somewhere on how to use hooks or hook locations? I've never heard of that before. It'd really be great if you could lay it out step by step how to incorporate the code you posted above. I'm sure there are probably quite a few people looking for this information. I really appreciate all your help lynne
Reply With Quote
  #13  
Old 04-21-2009, 07:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a section about products and plugins in the manual (link under Quick Links and in my sig). Also, there are quite a few articles written about plugins in our articles forums (tab in upper right corner).
Reply With Quote
  #14  
Old 04-21-2009, 08:53 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, I got it. Thanks so much. Just one more thing, if you don't mind.

Is there a way I can make it replace an exact word, instead of a word containing the letters of a bad word? For example, if I want all my bad words to be replaced with flower, and I want to ban the word that's also another name for donkey, 'class' becomes 'clflower'. In the censorship options I can ban that particular word by typing {***}, so it only bans it when it's only those letters, not when it's part of another word. Is there any way to do this?
Reply With Quote
  #15  
Old 04-21-2009, 11:39 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can go take a look at the other php string replacement functions and see if there is a better one to use for your purposes. You could also put in " donkey " (as an example) as the word with a space on either side of it so it only gets replaced if it is a standalone word.
Reply With Quote
  #16  
Old 05-01-2009, 09:25 PM
mdawg's Avatar
mdawg mdawg is offline
 
Join Date: Mar 2009
Location: United States
Posts: 363
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I did find this, but this is not going to make say, whenever someone types in the word "yahoo" that it creates a hyperlink for http://www.yahoo.com

https://vborg.vbsupport.ru/showthread.php?t=211693

Right?
Reply With Quote
  #17  
Old 05-01-2009, 09:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replacement Variables will replace every instance of "yahoo" on your site with whatever you say to replace "yahoo" with - which may be a link if that is what you put in the Replace Text box.
Reply With Quote
  #18  
Old 05-02-2009, 07:06 AM
mdawg's Avatar
mdawg mdawg is offline
 
Join Date: Mar 2009
Location: United States
Posts: 363
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think so. The plugins you describe (and replacement variables) will replace a given text with another text.

That will work for my "obscenity" issue, say switching the word b*tch for woman, but in the case of switching say the word yahoo for http://www.yahoo.com I don't think it will simply change the single word yahoo into a blue hyperlink like this: yahoo - rather, it will change the five letters of yahoo for the twenty characters of http://www.yahoo.com and it may not even make the twenty characters a hyperlink.

Try it, you'll see what I mean.
Reply With Quote
  #19  
Old 05-02-2009, 03:18 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works just fine. And it gave me a hyperlink because I told it to. You need to enter *exactly* what you want it to be replaced with.

Code:
Search for: yahoo
Replace with: <a href="http://www.yahoo.com">yahoo</a>
Reply With Quote
  #20  
Old 05-04-2009, 05:12 AM
mdawg's Avatar
mdawg mdawg is offline
 
Join Date: Mar 2009
Location: United States
Posts: 363
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found out that vbSEO acronym expander does what I was looking for all along. But they had to modify their code for me so that it worked for HTTPS (not just HTTP) urls.
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 04:25 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.03909 seconds
  • Memory Usage 2,257KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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