Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 7:41 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 25 posts ] 
Author Message
 Post subject: Most online module
Posted: Wed Oct 05, 2005 9:27 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
Just want to know if there already exists a module for 'most ever users online'

something like the one on this forum

but dont want to use smf

any help appreciated

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Thu Oct 06, 2005 11:29 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
anybody want to enlighten me please?

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Thu Oct 06, 2005 4:15 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Aug 19, 2005 5:35 pm
Posts: 82
Location: Cologne
I don't think Joomla stores this kind of information -> so what should a module do then?


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Thu Oct 06, 2005 6:04 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
hmm, i wonder why joomla doesnt store this info?

it has pretty much all other statistics like % browsers, page stats, most popular etc

let me look around

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Thu Oct 13, 2005 2:19 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
Havent been able to figure this one out

does anyone know if the most users ever online is stored by joomla

if yes, could you pls tell me where, couldnt find it.

And if it doesnt, any way of storing this?
and showing it with a module?

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 3:46 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
I have a hacked module (mod_whosonline.php) that keeps track of and displays the Most Users Online.  You must publish the Who's Online module and it uses the number of guests + the number of members to determine the maximum and stores that in a table.  I have the module and SQL table zipped in a package if you want to try it.  NOTE:  you'll have to edit the SQL file if you use other than the jos_ prefix for your databse.

check out: http://www.seismicos.com/content/view/52/41/

You'll notice the counter on the homepage.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 8:49 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
Wow, thanks t3.6k will give install and test asap.

It is really nice of you to share this hack.

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 1:44 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
media -

let me know how it goes - and if I need to make any changes or if you need any help.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 2:04 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
media,

just a heads up - 1.0.3 has a new mod_whosonline.php in it - so you may need to reapply the hack once you've done the upgrade - the hacked version already contained the fix that was released in the 1.0.3 mod_whosinline.php anyway.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 5:20 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Sat Aug 20, 2005 3:47 pm
Posts: 89
Location: Germany/ Berlin
great idea but your hack do not functioned with joomla 1.0.3.  straight tested :-(. only the guests are indicated, no members

_________________
Mach mit bei Day of Om
Investiere in Hyperlinks


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 9:26 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
I have it working in version 1.0.3 see http://www.seismicos.com/ with the the very same hack that was posted.  Let me know what I can do to help.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Fri Oct 14, 2005 11:00 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
alphanostrum -

I just encountered the same thing you were saying, however, it is not the module that is the problem, I actually went and looked at my #__session table and I have logged in users with the guest flag set to 1 and 2.  Not sure how that's happening but it is.  The mod_whosonline.php as distributed from Joomla expects all members to have the guest flag = 0.  I will try to track down why this is happening if I can, and report to the core team.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 6:12 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
well I tracked down what was happening - and have a fix for it - although I'm not sure whether it was done by design or not I have reported it to the core team.  Essentially the guest flag was getting set to the gid(group id) which for special users was not 0 or 1 so mod_whosonline.php will not report them in the member count.  If you want to correct this is is any easy hack

edit the file database.php from the includes directory
in the method updateObject change:

if ($k != 'guest') {
  $val = "''";
}

to this:

if ($k != 'guest') {
  $val = "''";
} else {
  $val = $v;
}

that's it, just added the else clause - this will insure that the guest field gets set to the value the code set it to; for members to 0 for guests to 1.  You can download the hacked database.php (this is the Joomla 1.0.3 version) here:

http://seismicos.com/pafiledb/pafiledb. ... =file&id=9

As always make sure to back up this file before overwriting it!

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 8:32 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
Hi t3.6k

Am using an upgraded version of mos,
hence i edited the sql table name

currently on J! 1.0.3
[added ur database.php edited file]

however,

am getting an error - screenshot incuded


and since we are storing the date can we show most users online: X 'on xx.xx.xxxx' [date]?


edit : also tried it on a J! 103 which was installed as 102
> added edited whosonline.php
> added database.php
> sql query error

[see it here]


You do not have the required permissions to view the files attached to this post.

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Last edited by mediawizard on Sat Oct 15, 2005 8:43 am, edited 1 time in total.

Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 1:51 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
m-

nice site, looks like you got it working - is that only one site - the others are getting errors?

CREATE TABLE mos_mostusers (
  count int(11) NOT NULL default '0',
  date date NOT NULL default '0000-00-00'
) TYPE=MyISAM;

you can use this table without a primary key - the key is not necessary, the only reason I used the key was to keep track of the number of times we have exceeded the most users because the ID will keep track for me, but just more a point of interest than a necessary part of it.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Last edited by t3.6k on Sat Oct 15, 2005 2:09 pm, edited 1 time in total.

Top
   
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 3:14 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Sat Aug 20, 2005 3:47 pm
Posts: 89
Location: Germany/ Berlin
for me this fix the prob. now members are also indicated.

_________________
Mach mit bei Day of Om
Investiere in Hyperlinks


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 3:23 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
alpha - i figured they had that commented out in there cause quoted value may have been casuing a problem of some sort somewhere, which is why I went the direction I did with the unquoted value.

Bug Tracker

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Last edited by t3.6k on Sat Oct 15, 2005 3:32 pm, edited 1 time in total.

Top
   
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 4:23 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
media-

just cause you asked for it, I modifed a configurable version of Most Users hack - now you can choose to display count, count and date, or not display most users using the Joomla! module manager - see:

http://www.seismicos.com/content/view/54/41/

thanks for the suggestion.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Sat Oct 15, 2005 6:51 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 3:13 pm
Posts: 324
Location: Mumbai, India
t3.6k

I cant begin to thank you...

I tried your hack on three sites :

mumbaimart
Jooms
and golfkraft at the link above.

First two are upgrades,
the last one is a fresh install
and yes, am getting errors on all three

Viz 1.1,
intalls and works like a peach
jooms is done, working on the other two right now
should be done in abt 10 mins ;)

Once again a big thank you t3.6k
I owe you one, let me know if I can help with something

maybe this could be included in the std install
am definitely going to use it on all my sites.

update :
installed on all three sites and is working great
have listed a link to this topic on jooms too

I know a lot of people are going to want this t3.6k

_________________
Always willing to lend a helping hand
www.mediawiz.biz - Pro Web Solutions & Promotion
www.jooms.com - Joomla Showcase, Services, Hosting and More.


Last edited by mediawizard on Sat Oct 15, 2005 7:09 pm, edited 1 time in total.

Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Sun Oct 16, 2005 1:21 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
media - awesome news and thanks for the link on Jooms I really appreciate it!

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Fri Oct 21, 2005 8:10 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Oct 21, 2005 8:03 pm
Posts: 7
I tried using the better version that t3.6k provides. Everything appears to work fine from the backend. On the frontend, when I'm logged out, it will say "1 guest online" as it should, but after I log in, it says "No Users Online". I applied the sql patch, and my table prefixes are all jos_. I've logged in and out several times, and it is consistent--"No Users Online" whevener I'm logged in.

I haven't editted any other files, just copied over the two mod files and applied the sql patch to create the new database table. Have I missed something?

Thanks!


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Sat Oct 22, 2005 2:54 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Aug 20, 2005 5:15 pm
Posts: 183
Location: Fruitport, MI
Hey pinto-

Yeah there is a problem with the database class that doesn't set the guest/non-guest flag correctly in the session table - you can find a fix here and you'll be all set.  The file gets placed in the includes directory of Joomla - this is a 1.0.3 version of the class.

http://www.seismicos.com/pafiledb/pafil ... =file&id=9

There is actually a discussion about the problem ealrier in this thread.  Let me know if you need more assistance.

_________________
Cheers - T3.6K

osCommerce Bridge: www.seismicos.com


Top
   
 
 Post subject: Re: Most online module
Posted: Sat Oct 22, 2005 3:26 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Oct 21, 2005 8:03 pm
Posts: 7
Ahh, thank you. Yeah, you did say that earlier, but for some reason it just wasn't clear to me that it applied.  :-[ Thanks for your reply and for the module! It works perfectly now.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Sat Jan 07, 2006 9:23 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Jan 07, 2006 9:01 pm
Posts: 2
This patched version works. Please, since I am not quite aware of the procedure to submit an official patch, do forward this for use of the other users :)

I hope there are no hidden problems :D


You do not have the required permissions to view the files attached to this post.


Top
  E-mail  
 
 Post subject: Re: Most online module
Posted: Thu Feb 23, 2006 4:33 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Feb 23, 2006 4:29 am
Posts: 45
I just used your hack and it works great. had minor issue running the MySQL query, but no biggie. Something about duplicate something or other. Fixed itself basically.

I took out the ul and li stuff to shrink space that online users list filled and I am one happy camper. :)

Thanks!


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group