Resource icon

Today's Visitors 1.1.1

No permission to download
  • Thread starter Thread starter ragtek
  • Start date Start date
ragtek, this is cool ... would like to limit this by usergroup if possible.
i'm still waiting and hoping for an official xf widget manager.

i'm not planing to spend too much time with my sidebar blocks / widgets...
It's a horror to do this, without a real interface (which i had with my add-on helper framwork, but people didn't like it, so here's the compromis => take it as it is, or leave it:P )
 
PHP:
$todayStart = XenForo_Locale::getDayStartTimestamps();
        $todayStart = $todayStart['today'];
        $criteria = array(
            'last_activity' => array('>', $todayStart),
just change the $todayStart value
 
Is there any way to specify options like last 24 hours, last week, last fortnight, last month. Maybe even as tabbed options.
Maybe in an commercial version ;) (or if you want, you can also pay for development time and i'll include it in this version.... i also need to make money for my living:P )
 
Maybe in an commercial version ;) (or if you want, you can also pay for development time and i'll include it in this version.... i also need to make money for my living:p )

We run a voluntary site, dont even have adsense on their yet so wish I could afford to.
 
So I'm not clear on what I may have done wrong.
But I was trying to hide this from guest (just guest)

ragtek_todaysusers

PHP:
<div class="section membersOnline userList">
    <div class="secondaryContent">
        <h3>{xen:phrase ragtek_whv_title} ({xen:count $todayOnlineUsers})</h3>
        <ul class="listInline commaImplode">
            <xen:foreach loop="$todayOnlineUsers" value="$user">
              <li><xen:username user="$user" itemprop="name" rich="true" /></li>
            </xen:foreach>
        </ul>
    </div>
</div>

Wrapped it around with

PHP:
<xen:if is="{$visitor.user_id}">
<xen:else />
</xen:if>

So the end result would be

PHP:
<xen:if is="{$visitor.user_id}">
<div class="section membersOnline userList">
    <div class="secondaryContent">
        <h3>{xen:phrase ragtek_whv_title} ({xen:count $todayOnlineUsers})</h3>
        <ul class="listInline commaImplode">
            <xen:foreach loop="$todayOnlineUsers" value="$user">
              <li><xen:username user="$user" itemprop="name" rich="true" /></li>
            </xen:foreach>
        </ul>
    </div>
</div>
<xen:else />
</xen:if>


Doing this ended up hiding it for everyone and not just guest.
 
hm

<xen:if is="{$visitor.user_id}">
<
div class="section membersOnline userList">
<
div class="secondaryContent">
<
h3>{xen:phrase ragtek_whv_title} ({xen:count $todayOnlineUsers})</h3>
<
ul class="listInline commaImplode">
<
xen:foreach loop="$todayOnlineUsers" value="$user">
<
li><xen:username user="$user" itemprop="name" rich="true" /></li>
</
xen:foreach>
</
ul>
</
div>
</
div>
</
xen:if>

should work
 
hm

<xen:if is="{$visitor.user_id}">
<div class="section membersOnline userList">
<div class="secondaryContent">
<h3>{xen:phrase ragtek_whv_title} ({xen:count $todayOnlineUsers})</h3>
<ul class="listInline commaImplode">
<xen:foreach loop="$todayOnlineUsers" value="$user">
<li><xen:username user="$user" itemprop="name" rich="true" /></li>
</xen:foreach>
</ul>
</div>
</div>
</xen:if>

should work
Nope, still hidden for everyone. :(
 
What about doing it in reverse?

PHP:
<xen:if is="!{$visitor.user_id}">
<xen:else />
<div class="section membersOnline userList">
    <div class="secondaryContent">
        <h3>{xen:phrase ragtek_whv_title} ({xen:count $todayOnlineUsers})</h3>
        <ul class="listInline commaImplode">
            <xen:foreach loop="$todayOnlineUsers" value="$user">
              <li><xen:username user="$user" itemprop="name" rich="true" /></li>
            </xen:foreach>
        </ul>
    </div>
</div>
</xen:if>

Not that you should have to... but it might work.
 
the best way would be to change this in the template hook code, BECAUSE it's not necessary to run the query and get the users but not to show them^^
 
this is causing line breaks when it shouldn't, can the breaks be after a name, not in the middle?
right now it's breaking my name into two lines :(

Brando
n

which looks very bad, it's also happening to other usernames

Thanks
 
Back
Top Bottom