PDA

View Full Version : Use Variables (eg: $bbuserinfo[username]) in posts?


Skyrider
06-27-2015, 05:15 AM
I know this isn't possible without some kind of alteration to the php files or plugin, but I was hoping someone could help me out.

In this thread: https://vborg.vbsupport.ru/showthread.php?t=81759

There's a code how to do use the username variable within signatures:

Edit includes/functions_showthread.php, find:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

AFTER THAT add:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Logician Hack : Admin signatures parsed for vb variables
if ($post['usergroupid']==6)
{
@eval('$post[signature] = "' . addslashes($post['signature']) . '";');
$post['signature'] = stripslashes($post['signature']);
}
// Logician Hack : Admin signatures parsed for vb variables
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

That's all. ;)

Logician \\=^))


But I'd like it to be within posts. and I'm afraid that code is for the older vbulletin version as well.

I appreciate the help! If you wish to help out :).

cellarius
06-29-2015, 05:19 AM
You're quite right: That code is ten years old and deprecated.

Why not use https://vborg.vbsupport.ru/showthread.php?t=208538

Is that not what you want? Should work with vB4, too.

Skyrider
06-29-2015, 12:51 PM
That works quite well, thank you.