• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

variable for gender, age, actual script

Marcus

Well-known member
#1
I am looking for these variables for my ad integration:

- usergroup (solved)
{$visitor.user_group_id}

- script name
Is there an equivalent in xenforo like "threads", "forum", "index page / forum start page? (In vbulletin it is forumhome, showthread, forumdisplay.

- age

- gender

Thanks!
 

James

Well-known member
#2
What do you mean you're looking for them?

Script name you can use $contentTemplate.
Index page:
Code:
<xen:if is="{$contentTemplate} == 'forum_list'">
Forum page:
Code:
<xen:if is="{$contentTemplate} == 'forum_view">
Thread page:
Code:
<xen:if is="{$contentTemplate} == 'thread_view'">
Age:
Code:
{xen:number $birthday.age}
Gender:
Code:
{$user.gender}
(or $visitor.gender for the currently viewing user)
 

Marcus

Well-known member
#3
Hi James,

thanks for your great help. I have some campaigns on thread pages, some campaigns on the index page. I need to target these campaigns on xenforo, therefore I submit the actual place the user is browsing and some basic user data to the ad program.