T Tony008 Member Nov 21, 2014 #1 Hello. Can someone tell me please how to count this two time? guests={xen:number $onlineUsers.guests} or also to show +22 or + 50 Any idea? I have made this in vbulletin before some time but no idea how. Thank you!
Hello. Can someone tell me please how to count this two time? guests={xen:number $onlineUsers.guests} or also to show +22 or + 50 Any idea? I have made this in vbulletin before some time but no idea how. Thank you!
P Paul B XenForo moderator Staff member Nov 21, 2014 #2 You can use xen:calc to perform mathematical operations in templates. Upvote 0 Downvote
T Tony008 Member Nov 21, 2014 #3 Hey Brogan. Any example how to do with this: guests={xen:number $onlineUsers.guests} Upvote 0 Downvote
P Paul B XenForo moderator Staff member Nov 21, 2014 #5 {xen:calc "{$onlineUsers.guests} + 50"} Upvote 0 Downvote
T Tony008 Member Nov 21, 2014 #6 wont work. Should I wait untill the cronjob updates or? Upvote 0 Downvote
P Paul B XenForo moderator Staff member Nov 21, 2014 #7 What won't work? You haven't said what it is you are trying to do. If it is related to this thread, do not cross post: https://xenforo.com/community/threads/how-to-fix-the-issue-with-to-much-guests.87631/ Last edited: Nov 21, 2014 Upvote 0 Downvote
What won't work? You haven't said what it is you are trying to do. If it is related to this thread, do not cross post: https://xenforo.com/community/threads/how-to-fix-the-issue-with-to-much-guests.87631/
T Tony008 Member Nov 21, 2014 #8 No thats not related with that thread. Am trying to increase the guests number in index. I want to show +50 guests. The code is from this template: sidebar_online_users Upvote 0 Downvote
No thats not related with that thread. Am trying to increase the guests number in index. I want to show +50 guests. The code is from this template: sidebar_online_users
P Paul B XenForo moderator Staff member Nov 21, 2014 #9 It works. I have just tested and confirmed. Upvote 0 Downvote
T Tony008 Member Nov 21, 2014 #10 I have replaced this: "{xenhrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}" With this: {xenhrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:calc "{$onlineUsers.guests} + 50"}', 'robots={xen:number $onlineUsers.robots}'} And nothing showing Whats am doing wrong? Upvote 0 Downvote
I have replaced this: "{xenhrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}" With this: {xenhrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:calc "{$onlineUsers.guests} + 50"}', 'robots={xen:number $onlineUsers.robots}'} And nothing showing Whats am doing wrong?
T Tony008 Member Nov 22, 2014 #11 Brogan you was right! Its working. Am usinf the framework widget and thats why was not showing the result. I have edited the framework widget and works! Thank you again! Upvote 0 Downvote
Brogan you was right! Its working. Am usinf the framework widget and thats why was not showing the result. I have edited the framework widget and works! Thank you again!
P Paul B XenForo moderator Staff member Nov 22, 2014 #12 Glad to hear it's sorted. It's worth mentioning any add-ons you are using as they can have an impact (as you've discovered). Upvote 0 Downvote
Glad to hear it's sorted. It's worth mentioning any add-ons you are using as they can have an impact (as you've discovered).
T Tony008 Member Nov 22, 2014 #13 Yes will add it. One more thing if you have time to answer me: Id like to add the username with id 2 to show in this line: <xen:username user="$user" rich="{$widget.options.rich}" class="{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" /><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if> Click to expand... This is from the sidebar_online template. Now as it is, it shows the users that are online. Id like to add additional user lats say the user with id nr.2 How to do it? Upvote 0 Downvote
Yes will add it. One more thing if you have time to answer me: Id like to add the username with id 2 to show in this line: <xen:username user="$user" rich="{$widget.options.rich}" class="{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" /><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if> Click to expand... This is from the sidebar_online template. Now as it is, it shows the users that are online. Id like to add additional user lats say the user with id nr.2 How to do it?