XF 1.4 PHP Help needed!

#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!
 
#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
 
#10
I have replaced this:

"{xen:phrase 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:

{xen:phrase 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?
 
#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!
 

Brogan

XenForo moderator
Staff member
#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).
 
#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>
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?
 
Top