vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Username in a error phase (https://vborg.vbsupport.ru/showthread.php?t=159544)

Gizmo99 10-05-2007 05:47 PM

Username in a error phase
 
HELP

Driving me up the wall

Updating my own hacks to use the new 3.6 options.

So old way

PHP Code:

eval('print_output("' fetch_template('STANDARD_ERROR') . '");'); 

and you could use

PHP Code:

$errormessage "<p align=center>Sorry {$vbulletin->userinfo[username]} you didn't fill out all the fields..... 

to put you text inthe error window, notice the $vbulletin->userinfo[username]}

Well guess what move to the new way

PHP Code:

eval(standard_error(fetch_error('error_myphrase'))); 

and regardless which way I put it in I cant get the Username

PHP Code:

$bbuserinfo[username] {$vbulletin->userinfo[username]} 

in the pharse just print as shown

AAAGGGHHHHH

Cheers

Inadvance

and yes I have searched and read the articles :)

Giz

Opserty 10-05-2007 06:27 PM

Example PHP:
PHP Code:

eval(standard_error(fetch_error('error_myphrase'$vbulletin->userinfo['username']))); 

Example Phrase:
Code:

My custom error message, you username is: {1}
Quote:


fetch_error (line 2186)

Fetches an error phrase from the database and inserts values for its embedded variables

* return: The parsed phrase text

string fetch_error (string 0, mixed 1, mixed 2, mixed 3)

* string 0: Varname of error phrase
* mixed 1: Value of 1st variable
* mixed 2: Value of 2nd variable
* mixed 3: Value of Nth variable


Gizmo99 10-05-2007 06:33 PM

YOU THE MAN !!!

One for the how to Articles

Thanks a Million :)

Giz

Opserty 10-05-2007 07:14 PM

Quote:

Originally Posted by Gizmo99 (Post 1353604)
YOU THE MAN !!!

One for the how to Articles

Thanks a Million :)

Giz

It is aleady in the vB docs :p
http://members.vbulletin.com/api/


All times are GMT. The time now is 10: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.00995 seconds
  • Memory Usage 1,727KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (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