vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   constructing phrases for standard errors? (https://vborg.vbsupport.ru/showthread.php?t=68007)

rake 08-30-2004 07:27 PM

Add some debug information and see what you can find out... Like, for example, if the phrase is really defined, to start with..

PHP Code:

$floodcheck$DB_site->query_first("SELECT comment_date AS lastcomdate FROM ".TABLE_PREFIX."journal_comments WHERE commenter_id=".$bbuserinfo['userid']." ORDER BY comment_date DESC"); 
echo 
"1";
                if((
TIMENOW $floodcheck['lastcomdate'])<= $setting['floodint']) 
                { 
echo 
"2";
                    
$vbphrase['journalfloodcheck']= construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting'); 
echo 
"<br>" $vbphrase['journalfloodcheck'];
                    eval(
print_standard_error($vbphrase[journalfloodcheck], false)); 
                } 

exit; 

Then again, you can just use a string instead of a phrase, unless you run a multilingual forum.

AN-net 08-31-2004 01:03 AM

it seems i will have to hack the print_standard_error function then;)

AN-net 08-31-2004 02:02 AM

the problem is within vb it self, there is no dynamic phrase system for errors and the $vbphrase array only includes specific phrase groups. i will be requesting that vb makes such a feature for the next version because it is critical, please support my thread on vb.com in vb3 suggestion forum;)

rake 08-31-2004 11:12 AM

Add your groups to the $phrasegroups array at the top of the file, and i'll work, without hacking the function ;)

AN-net 08-31-2004 02:22 PM

oh but see i did that and it turns out the phrase groups that may be put must be in the language table. so all the phrase groups that are truely available are the not all the ones we see in phrase manager;) fronterror(working name for the front end error phrases) is not in the language table so you cant use it in $phrasegroups or a db error occurs cause it is not a field. anyways print_standard_error needs to be made more flexible or maybe a new function named print_dynamic_error :D

calorie 09-09-2004 03:50 PM

ignore


All times are GMT. The time now is 04:31 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.01065 seconds
  • Memory Usage 1,725KB
  • 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_php_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