[Plugin: Who is Online] Users counter (css) and auto refresh for admin panel
-
Hello,
For those who want to add auto refresh and user counter add this:
1. Go to Plugins edit in dashboard and whoose the Who is online from the selector. Now click in the sidebar “who-is-online.php” and here start the edits.1. Find:
<h2>'.__('Online Users', 'who-is-online').'</h2>
And bellow add:<meta http-equiv="refresh" content="15" /> <style type="text/css"> body {counter-reset:section;} td.count:before { counter-increment:section; content:counter(section); } </style>
In the content=”15″ change the “15” to your needs. Is the waiting time in seconds before the next auto reload of the page.
Next,
Find:
<thead> <tr class="thead">
And direct below add:
<th scope="col" class="manage-column column-username" style="width:30px;">#</th>
Next find:
<tfoot> <tr class="thead">
And direct bellow add again:
<th scope="col" class="manage-column column-username" style="width:30px;">#</th>
Now find:
<tr id=\'user-2\' class="alternate">
And direct after add:
<td class="count"></td>
——— THIS WAS THE AUTO RELOAD AND COUNT ADDING CODE ————
Now for those who having problem with the characters in the visitor path (the looking url) or the lenght, and opening the link in new window (target=_blank) i have this solution:
Find:
<a href="' . attribute_escape($visitor->path) . '">'. attribute_escape($visitor->path) .'</a>
And replace with:
<a title="'. attribute_escape($visitor->path) .'" target="_blank" href="' . attribute_escape($visitor->path) . '"> [-------->LINK-------->]</a>
I’ am having problem with greek chracters in the visitor path thats the way i have done this edit in the link. If any one knows any php solution please provide it you like.
- The topic ‘[Plugin: Who is Online] Users counter (css) and auto refresh for admin panel’ is closed to new replies.