vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   Find and replace text in all posts in Vb5х (https://vborg.vbsupport.ru/showthread.php?t=306720)

Pompadur 01-07-2014 12:20 PM

Find and replace text in all posts in Vb5х
 
Hello! Need help!
For finding and replacing text in Vbulletin 4 i used this Hook:

Product : vBulletin
Hook Location: postbit_display_complete
Execution Order: 5
Plugin PHP Code:
$search = 'xxx;
$replace = 'zzz;
$this->post['message'] = str_replace($search, $replace, $this->post['message']);

And it works!
But i don't know how to do the same in Vbulletin 5

As i understand i need to go to Admincp > Products & Hooks > Manage Hooks and click the link that says "[Add New Hook]"
Product : vBulletin
Hook Location: conversation –reply_threadview_text_1
Execution Order: 5
Template Name:

As i understand i need to create a new template, for example «conversation_replacing»
But what i should do to make text from the post go to str_replace()?
What i should mention in "Hook Arguments:" to make the hook work?

Please if you know how to do it - explain step by step, i 'm very new in this area.

Thank to all!
PS Sorry for my bad english!


All times are GMT. The time now is 10:27 PM.

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.00919 seconds
  • Memory Usage 1,699KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete