Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Users Currently Online

#1 2005-02-17 02:37:19

kirk
New Member
From: LA
Registered: 2005-01-20
Posts: 8

Users Currently Online

Does anyone know if there is a plugin that displays the number of users currently visiting your site? I managed to find this script:

http://elouai.com/user-counter.php

I guess there can be a way to work it into the textpattern coding. But I was wondering if there was a plugin that already does that? I thorougly looked through the forum and was not able to find anything related to this.

Kirk

Offline

#2 2005-05-30 03:42:17

starzabove
Member
Registered: 2004-04-13
Posts: 76

Re: Users Currently Online

In trying to answer a client request, I found this: http://www.spoono.com/php/tutorials/tutorial.php?id=16

Anyone able to convert this into a plugin or show me how?

Thanks!

Last edited by starzabove (2005-05-30 04:27:14)


90+ Textpattern installs and still going…

Offline

#3 2005-05-30 17:08:30

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Users Currently Online

The spoono method is really easy to implement as a TXP plugin. There is no need to create a table since txp_log could be used. I may do this if you encounter problems, or if I find the time, which is really hard when the weather is so nice!

Offline

#4 2005-05-30 17:44:26

starzabove
Member
Registered: 2004-04-13
Posts: 76

Re: Users Currently Online

Oy, I did encounter problems. I did it adding a table, and it seems to work, shows 1 user online, but I had several of us hit the site and it ALWAYS says ’1 user online’, – that’s kind of useless.
I don’t blame you about the weather, though, so enjoy! And if you should find a spare bit, of time, I know for one that I would greatly appreciate it, and it’d be another great addition to the package of plugins offered.

Even a quick tip on what to change in the php form to call it out from txp_logs instead of the mysql table it had me make might work better.

Thanks.

Last edited by starzabove (2005-05-30 18:05:49)


90+ Textpattern installs and still going…

Offline

#5 2005-06-02 04:44:35

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Users Currently Online

Plugin: mem_online_users
Version: 0.1
Author: Michael Manfre
More Info

I found some time and banged out a plugin that will output the number of distinct users who have accessed a portion of the site in the past x seconds. Let me know if you would like it tweaked, or have any questions.

Offline

#6 2005-06-02 06:43:43

starzabove
Member
Registered: 2004-04-13
Posts: 76

Re: Users Currently Online

Awesome – thank you!

But, am I missing the download link?

Last edited by starzabove (2005-06-02 06:44:00)


90+ Textpattern installs and still going…

Offline

#7 2005-06-02 08:52:18

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: Users Currently Online

Ok another one that was missing ! That’s very cool…
Guess we’re gonna have some work updating all this new plugins @textpattern.org !

Thx !!


.: Retired :.

Offline

#8 2005-06-02 12:43:34

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Users Currently Online

Sorry guys. I forgot to add the download link to the post. It’s up there now.

Offline

#9 2005-06-02 13:34:08

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Users Currently Online

Sorry to bother you with my problems but I don´t whats wrong here? (I use RC3)

Fatal error: Call to undefined function doTag() in ….\textpattern\lib\txplib_misc.php(304) : eval()’d code on line 1165

Edit: The page with the txp:mem_online_users / -tag shows nothing but the Fatal error…

Last edited by skoggy (2005-06-02 13:41:02)

Offline

#10 2005-06-02 13:42:45

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Users Currently Online

skoggy, the doTag function was added a short time ago by zem. I don’t think it is in the packaged download found on textpattern.com, but it is in SVN. To get around this error, edit the plugin and add this to the end.

<blockquote>
<code>
// ——————————————————————————————-
if (!function_exists(‘doTag’)) { function doTag($content, $tag, $class=’‘, $atts=’‘) { $atts = ($class ? $atts.’ class=”’.$class.’”’ : $atts); if (!$tag) return $content; return ($content) ? tag($content, $tag, $atts) : “<$tag $atts />”; }
}
</code>
</blockquote>

Offline

#11 2005-06-02 13:54:01

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: Users Currently Online

Hmmm… That helped! The tag still produces a 0, Kinda strange or?

Last edited by skoggy (2005-06-02 14:22:16)

Offline

#12 2005-06-02 14:29:15

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Users Currently Online

In Admin—>Prefs, make sure logging is set to “All hits”. This plugin uses the textpattern logging data, so if logging is off, or set to refers only, then it will not work properly.

Offline

  1. Index
  2. » Archives
  3. » Users Currently Online

Board footer

Powered by FluxBB