• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Xen-TR Who Has Visited

Hm, this add-on have the same problem as the "users which viewed the thread".

The query isn't optimized because it's selecting ALL users and then it's checking if the user was logged in in or not...
this could cause problems for big boards;)

optimisation tipps: see the other thread..

my 0.02$
@Tilkißey
Hope you have correct it?
It's unpossible for big boards. Sorry about
 
I had to go back and uninstall it. My XF site isn't large, but I'd like to see the query optimized. I checked other similar scripts for the "last comma" issue and worked on some possible workarounds (one was effective) but ran out of time this morning.

I'll keep watching this thread.
 
I think the comma issue is in xenForo. Sometime back Jake was helping me with something and we came across this issue.

I could be wrong though.
 
count = total user count which are listing on block
limit = is set from acp

if limit<= count --> there is no comma problem
if limit>count --> there is comma problem =(
 
@Tilkißey
Hope you have correct it?
It's unpossible for big boards. Sorry about

corrected and changed codes
now, file is fetching specific users
which users? = their last_activity time is in last 24 hours

version updated to 2.1.0

Changing in This Version
  • Fetching codes changed
  • Some defines are removed for page speed
 
Template xen_tr_com_who_has_visited.

Change:

Code:
                        <xen:foreach loop="$XenTrCom_WhoHasVisited" value="$XWhoHasVisited" i="$limit">
                            <xen:if is="{$limit} <= {$xenOptions.xentrcom_whohasvisited_limit}">
                                <li>
                                    <xen:username user="$XWhoHasVisited.user" rich="true" class="Tooltip" title="{xen:date {$XWhoHasVisited.user.last_activity}, 'H:i'}" /><xen:if is="{$limit} < {$xenOptions.xentrcom_whohasvisited_limit}">,</xen:if>
                                </li>
                            </xen:if>
                        </xen:foreach>

to:

Code:
                        <xen:foreach loop="$XenTrCom_WhoHasVisited" value="$XWhoHasVisited" i="$limit">
                            <xen:if is="{$XWhoHasVisited.count} == 1">
                                <li>
                                   <xen:username user="$XWhoHasVisited.user" rich="true" class="Tooltip" title="{xen:date {$XWhoHasVisited.user.last_activity}, 'H:i'}" /><xen:if is="{$limit} < {$xenOptions.xentrcom_whohasvisited_limit}"></xen:if>
                                </li>
                            <xen:else />
                                <li>
                                   , <xen:username user="$XWhoHasVisited.user" rich="true" class="Tooltip" title="{xen:date {$XWhoHasVisited.user.last_activity}, 'H:i'}" /><xen:if is="{$limit} < {$xenOptions.xentrcom_whohasvisited_limit}"></xen:if>
                                </li>
                            </xen:if>                            
                        </xen:foreach>
 
Got it, thanks for the tips.. For whatever reason im still adjusting to those template reverts.
 
for next release, can you set the amount of hours as an option for those who want to have more hours than 24, perhaps?
 
..codes for solving comma problem..
thanks for advice, i will try at local and will be added to future versions

Got it, thanks for the tips.. For whatever reason im still adjusting to those template reverts.
i think, xenforo is a little poor about add-on upgradings
u ve to revert to add-on's templates after upgrading
and, if u edited the template, u ve to revert after uninstall the add-on
this is not bout for only this add-on, this is bout xenforo =(

for next release, can you set the amount of hours as an option for those who want to have more hours than 24, perhaps?
nice idea, noted this idea for future versions, thx =)

and, version updated to 2.1.1 (please upgrade to this version for bout page speed and query counts)
 
Great add-on, thanks for sharing. This is handy info to the moderators who are on the team for social interaction. Looking forward to using it, though limiting it to their usergroups.
 
Top Bottom