Log in

View Full Version : Username in a error phase


Gizmo99
10-05-2007, 05:47 PM
HELP

Driving me up the wall

Updating my own hacks to use the new 3.6 options.

So old way

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

and you could use

$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

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

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

$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:

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

Example Phrase:

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



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
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/