vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Replacing text in a message with an HMTL snippet (https://vborg.vbsupport.ru/showthread.php?t=213490)

EagleNick 05-16-2009 09:04 PM

Quote:

Originally Posted by Lynne (Post 1809407)
write a plugin to do a str_replace in the message. Do a search on that in these forums - the plugin has been posted before.

Couldn't you have just used a replacement variable?

Lynne 05-17-2009 02:37 AM

I never use replacement variables if I only want to replace things in the post text. Replacement variables affect things *everywhere* and sometimes that screws things up big time.

EagleNick 05-17-2009 12:10 PM

Quote:

Originally Posted by Lynne (Post 1812196)
I never use replacement variables if I only want to replace things in the post text. Replacement variables affect things *everywhere* and sometimes that screws things up big time.

Does the str_replace only replace exact matches like replacement variables do?
For example, if I set up a str_replace to replace "The Black Cat" with "The White Cat" will it also replace instances of just "cat" or just "white" to "the white cat"?

Lynne 05-17-2009 01:50 PM

str_replace replaces exact phrases. PHP Tutorial - str_replace

EagleNick 05-17-2009 01:58 PM

Thank you Lynne. ;)

Andrewsha 05-18-2009 05:37 AM

Hello!
Please help me to learn where to start defining postbit_display_complete hook.
Already I can make changes in templates but a point about hooks is not clear for me.

--------------- Added [DATE]1242643268[/DATE] at [TIME]1242643268[/TIME] ---------------

Found great guide https://vborg.vbsupport.ru/showthread.php?t=82625


All times are GMT. The time now is 08:38 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.00990 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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