XF 2.0 Variable user_id etc...

Hi,

Where can I find the list of available variables?

Example on XF1, I use those there in a callback params="['id={$visitor.user_id}', 'pseudo={$visitor.username}']", but it does not work with XF2.

Thank you
 
Thank you again for your help.

After update my calback params :
params="['id={$xf.visitor.user_id}', 'pseudo={$xf.visitor.username}']

I have no result in my PHP script, probably still a mistake related to switching to XF2.
$arguments = func_get_arg(1);
$forum_id= $arguments['id'];
$pseudo= $arguments['pseudo'];

Where is my mistake !

Thanks
 
The syntax of whatever tag you're using to perform your callback has probably changed, I couldn't say without seeing the actual template code.


Fillip
 
Here

<xf:callback class="XF\\Gallery\\LinkGallery" method="getLink" params="['id={$xf.visitor.user_id}', 'pseudo={$xf.visitor.username}']"></xf:callback>
 
I update my script

Code:
namespace XF\Gallery;
class LinkGallery {
    public static function getLink($contents, $params) {

        //$arguments = func_get_arg(1);

        $forum_id= $params['0'];
        $pseudo= $params['1'];

        include '/home/forum_3dvfcom/www/xf_gallery.php';
        return $output;
    }
}

But $pseudo return -> pseudo= ##1 and $forum_id return ->id= ##0
 
Back
Top Bottom