Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Post Replacements Details »»
Post Replacements
Version: 1.8, by DrewM DrewM is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.3 Rating:
Released: 08-29-2006 Last Update: 11-12-2006 Installs: 74
Uses Plugins
 
No support by the author.

Post Replacements 1.8

About
This hack allows you to have replacements for posts, for example you say you wanted every word that says vbulletin to say vbulletin.com you just have to put that in the option in vbulletin settings.

Important
When putting your replacements in the option read the description first to understand how it works.

Change Log
1.1; Fixed the plugin thanks Stoebi
1.5; Replacements now don't interfere with words that include the replacement. Thanks again to Stoebi .

A big thanks to Stoebi for providing most of the code!

Supporters / CoAuthors

Show Your Support

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

Comments
  #22  
Old 08-31-2006, 05:52 AM
Snatch Snatch is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here the Same, it doesen´t works.

GreeTz
Snatch
Reply With Quote
  #23  
Old 08-31-2006, 06:22 AM
Stoebi Stoebi is offline
 
Join Date: Apr 2006
Location: Germany, Berlin
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

replace $vbulletin with $this->registry in the plugin Replacments (Hook postbit_display_complete) (2 times).

Code:
//$post[message]
if ($this->registry->options['post_replacements_enabled'] == '1') {
	$replacments_array_mine = explode("|||", $this->registry->options['post_Replacements_option']);
	foreach ($replacments_array_mine as $post_replace) {
		$post_explode_rple = explode("===", $post_replace);
		$post['message'] = str_replace($post_explode_rple['0'], $post_explode_rple['1'], $post['message']);
	}
}
It works fantastic. I've clicked install.



Kind Regards,

Stoebi
Reply With Quote
  #24  
Old 08-31-2006, 08:15 AM
Nachtfalke Nachtfalke is offline
 
Join Date: Apr 2006
Location: Germany
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now that are good news, Stoebi! So I will try this one out
Reply With Quote
  #25  
Old 08-31-2006, 09:17 AM
DrewM DrewM is offline
 
Join Date: Oct 2005
Posts: 564
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stoebi
Hi,

replace $vbulletin with $this->registry in the plugin Replacments (Hook postbit_display_complete) (2 times).

Code:
//$post[message]
if ($this->registry->options['post_replacements_enabled'] == '1') {
	$replacments_array_mine = explode("|||", $this->registry->options['post_Replacements_option']);
	foreach ($replacments_array_mine as $post_replace) {
		$post_explode_rple = explode("===", $post_replace);
		$post['message'] = str_replace($post_explode_rple['0'], $post_explode_rple['1'], $post['message']);
	}
}
It works fantastic. I've clicked install.



Kind Regards,

Stoebi
thank you will upade the hack.
Reply With Quote
  #26  
Old 08-31-2006, 02:42 PM
C_P's Avatar
C_P C_P is offline
 
Join Date: Sep 2004
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NOW it works!
I used the following code and works perfectly:
Code:
vB===<a href="http://www.vbulletin.com"><font color="#008000">vB</font></a>|||Computer Paradise===<a href="http://www.cpfools.com"><font color="#008000">Computer Paradise</font></a>|||rules===<A href="http://www.cpfools.com/index.php?option=com_content&task=view&id=5&Itemid=6"><font color="#008000">rules</font></a>|||tutorial===<a href="http://www.cpfools.com/tutorials/"><font color="#008000">tutorial</font></a>  
See here:
http://www.cpfools.com/forum/showthread.php?t=5901
Clicked install!
Thank you!
Reply With Quote
  #27  
Old 08-31-2006, 03:53 PM
outlaw621's Avatar
outlaw621 outlaw621 is offline
 
Join Date: Oct 2004
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working now with the updated code. Thank you. I have a feature request if possible. Can you make the text replacement case insensitive? For example, typing test or Test would be able to have the replacement text applied instead of having to setup several of the same replacements to compensate for case.
Reply With Quote
  #28  
Old 08-31-2006, 04:02 PM
C_P's Avatar
C_P C_P is offline
 
Join Date: Sep 2004
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by outlaw621
Working now with the updated code. Thank you. I have a feature request if possible. Can you make the text replacement case insensitive? For example, typing test or Test would be able to have the replacement text applied instead of having to setup several of the same replacements to compensate for case.
EXCELLENT request! I agree, add me to this request as well.
Reply With Quote
  #29  
Old 08-31-2006, 04:03 PM
SnickersTK SnickersTK is offline
 
Join Date: Apr 2005
Location: Denmark
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by outlaw621
Working now with the updated code. Thank you. I have a feature request if possible. Can you make the text replacement case insensitive? For example, typing test or Test would be able to have the replacement text applied instead of having to setup several of the same replacements to compensate for case.
thirding this request
Reply With Quote
  #30  
Old 08-31-2006, 09:02 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
Reply With Quote
  #31  
Old 09-01-2006, 10:32 AM
DrewM DrewM is offline
 
Join Date: Oct 2005
Posts: 564
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by outlaw621
Working now with the updated code. Thank you. I have a feature request if possible. Can you make the text replacement case insensitive? For example, typing test or Test would be able to have the replacement text applied instead of having to setup several of the same replacements to compensate for case.
I will try to do this in the next week you should see it soon.

EDIT: Currently it is case insensitive.
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 08:42 PM.


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.08260 seconds
  • Memory Usage 2,315KB
  • Queries Executed 26 (?)
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_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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