Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2004, 10:48 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default constructing phrases for standard errors?

anyone know how can i use dynamic vb phrases and construct while using them as an error in print_standard_error function?
Reply With Quote
  #2  
Old 08-05-2004, 03:21 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not sure I understand the question AN-net. You could call it with any phrase, such as
Code:
eval(print_standard_error('This is an error.', false /* No lookup */));
eval(print_standard_error($vbphrase['some_phrase'], false));
Reply With Quote
  #3  
Old 08-05-2004, 01:21 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well here is my code:
PHP Code:
eval(print_standard_error('journalfloodcheck'$setting['floodint'], 'posting another entry')); 
the two after journalfloodcheck are susposed to be used to construct {1} and {2} in the journalfloodcheck phrase. am i doing it right?
Reply With Quote
  #4  
Old 08-05-2004, 03:54 PM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, the way you have it, you are passing 3 separate parameters to print_standard_error -- which do not match the usage for the arguments of that function. You will have to construct the phrase before you call print_standard_error by calling construct_phrase, which is intended to do what you want.

Then, once you have the phrase made, make the call to print_standard_error as I showed, with the second argument of "false".
Reply With Quote
  #5  
Old 08-05-2004, 07:24 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh ok cause i knew about construct_phrase but i wasnt sure how to do it with print_standard_error. thanks

edit:
hmmm still doesnt work, it still gives me trouble

my code:
PHP Code:
                    $vbphrase['journalfloodcheck']= construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting');
                    eval(
print_standard_error('journalfloodcheck')); 
Reply With Quote
  #6  
Old 08-05-2004, 08:30 PM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
oh ok cause i knew about construct_phrase but i wasnt sure how to do it with print_standard_error. thanks

edit:
hmmm still doesnt work, it still gives me trouble

my code:
PHP Code:
                    $vbphrase['journalfloodcheck']= construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting');
                    eval(
print_standard_error('journalfloodcheck')); 
You are not making the call to print_standard_error I suggested in my post, with the second argument of 'false', which would look like this:

eval(print_standard_error($vbphrase['journalfloodcheck'], false);

A cleaner approach would be to not overwrite $vbphrase, like this:

$msgTemp = construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting');
eval(print_standard_error($msgTemp, false));
Reply With Quote
  #7  
Old 08-26-2004, 04:42 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not to bump an old thread but i have tried to get it construct phrase and now it doesnt display the phrase at all but just the error box with nothing in it

here is my current code:
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");
                if((
TIMENOW $floodcheck['lastcomdate'])<= $setting['floodint'])
                {
                    
$vbphrase['journalfloodcheck']= construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting');
                    eval(
print_standard_error("".$vbphrase[journalfloodcheck].""false));
                } 
Reply With Quote
  #8  
Old 08-26-2004, 11:45 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
eval(print_standard_error(construct_phrase($vbphrase['journalfloodcheck'], $setting['floodint'], 'commenting'), false)); 
Reply With Quote
  #9  
Old 08-26-2004, 02:56 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope nothing shows up still
Reply With Quote
  #10  
Old 08-30-2004, 04:06 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone, please i really need this
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:57 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.06025 seconds
  • Memory Usage 2,272KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete