vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How do I change words in post texts? (https://vborg.vbsupport.ru/showthread.php?t=277456)

Emeralda 02-26-2012 02:20 PM

I tested it with editing an existing post and it was still turning the word into *****

Also, the full phrase I wanted was "I'm a little teapot" but there is that ' thingie.

kh99 02-26-2012 04:24 PM

Maybe try turning off the built-in censoring, it probably changes to *s before your code gets a chance to run.

If you're replacement has a ' then you can put a backslash in front of it, or else use double quotes around the string instead of single.

Emeralda 02-26-2012 06:36 PM

Oh, yeah, the auto censoring had to be turned off. But it all works now~

Also, the thing with excluding forums, I used it and it works, but if I'd want to add more than one forum, should I just add a comma after the ID?

kh99 02-26-2012 06:53 PM

You could do something like:

Code:

if (!in_array($forum['forumid'], array(1, 2, 3)) // exclude forums 1, 2, and 3
{
...
}


or if you'd rather list the forums to be included, remove the ! from in front of in_array.

Emeralda 04-15-2012 03:50 PM

Uhm, I have a sudden need to apply this for visitor messages and View Conversation (especially links). Which hooks to use for those?


All times are GMT. The time now is 02:03 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.01034 seconds
  • Memory Usage 1,714KB
  • 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)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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