x
 
Create New Page

Revision: Guests Online

Revision from: 14:42, 22 Jun 2010

Question:

Is there a way to pull the info from the exp_online_users table into a regular template that only I (the admin) can browse? Something that will display the number of guests currently online and their IP.

Answer:

Set up a Restricted Template and then use the {exp:query} tag. Maybe something like:

<table
<
tr
<
th>weblog id</th
<
th>member id</th
<
th>name</th
<
th>ip address</th
<
th>date</th
<
th>anon</th
</
tr
{exp:query sql="SELECT * FROM exp_online_users"
<tr
<
td>{weblog_id}</td
<
td>{member_id}</td
<
td>{name}</td
<
td>{ip_address}</td
<
td>{date}</td
<
td>{anon}</td
</
tr
{/exp:query} 
</table

Category:Statistics Category:Tricks

Category:EE1

Categories: