vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding phrases to specific groups e.g error messages (https://vborg.vbsupport.ru/showthread.php?t=261546)

richy96 04-06-2011 08:00 PM

Adding phrases to specific groups e.g error messages
 
Hi
OK another quick question

When i add a phrase they appear to go into 'custom phrases'

How do I select other groups when I add the phrase

For example the below didn't work

I added a phrase you_did_not_select_any_unread_comments

Phrase added successfully (it went into custom phrases)



in my php code

standard_error(fetch_error('you_did_not_select_any _unread_comments'));


result:

Could not find phrase 'you_did_not_select_any_unread_comments'


I suspect this is because the phrase is in the wrong group, but I can't see how to add it to the right one (without taking some drastic action database wise :p). It seems basic enough what I am trying to do - what's the problem ? :erm:

richy96 04-07-2011 08:42 PM

anybody?

or has it asked been asked a zillion times before and I simply didn't find it on my forum search

kh99 04-07-2011 09:35 PM

Did you choose "Error Messages" in the "Phrase Type" drop-down menu when you added the phrase? I think in general a phrase that's used by a page should be a type that's pre-loaded by including the name in the $phrasegroups array, and phrases used as error messages should be in type "Error Messages" (which doesn't have to be included in $phrasegroups). (Or at least this is what I was able to work out by looking at the code for a bit - I'm sure someone will correct me if I'm wrong :))

richy96 04-11-2011 12:35 PM

Such a simple thing!

cheers kh99 :)


All times are GMT. The time now is 10:40 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.01265 seconds
  • Memory Usage 1,708KB
  • 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
  • (4)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