vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   this should be easy - phrase replace (https://vborg.vbsupport.ru/showthread.php?t=226698)

testbot 10-24-2009 02:50 PM

this should be easy - phrase replace
 
i can't seem to get this to work in a plugin:

hook: register_activate_process

$my_msg = "something";

$vbphrase['activate_wrongusergroup'] = $my_msg;

or

$vbphrase['activate_wrongusergroup'] = $construct_phrase($my_msg);

i want to replace that phrase that already exists with something else based on a condition.

Lynne 10-26-2009 07:05 PM

Your hook location is being done for the part of the condition that isn't evaling the error. You are using the "if" part, the error gets evaled in the "else" part. So, I don't think your change of the phrase is being seen.

(You may not be able to change that particular phrase using that method in this case. If you look at the function fetch_error (which is used for to eval the activate_wrongusergroup error phrase), the input is a phrase name which then gets evaled. I think you would have to do your condition around the fetch_error and pass it another variable depending on the output of your condition which would mean modifying the code and not using a plugin.)


All times are GMT. The time now is 12:42 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.01042 seconds
  • Memory Usage 1,704KB
  • 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
  • (2)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