1
bream
User Amount
  • 2003/10/28 21:42

  • bream

  • Just popping in

  • Posts: 12

  • Since: 2003/3/18


Is there any way to display the number of users registered in a block at all?

Also - the Top posters, only represents the number of comments and forum posts. How can i get so that it displays a count for every download added ?

cheers

2
Hober
Re: User Amount
  • 2003/10/28 22:15

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Try hacking the downloads module, that's where I think it would be. Find where the forum module adds to the post count and add that to the part of the downloads module that adds/approves a download.

I would try, but I'm lazy

3
bream
Re: User Amount
  • 2003/10/28 22:59

  • bream

  • Just popping in

  • Posts: 12

  • Since: 2003/3/18


Could you (or anyone else) have a go at all?

Or point me in the right direction to the probable files - thanks

4
bream
Re: User Amount
  • 2003/10/28 23:44

  • bream

  • Just popping in

  • Posts: 12

  • Since: 2003/3/18


Ive had a good look through the newbb module files and found a few references to posts that maybe relevant. Saying this, i have also come across the 'comment_**.php' files within the 'include' folder.

I am unsure which files will lead me to my "goal", and if i do find the correct code (where ever they are ), where will i need to place it in the downloads files?

Please can some lend a hand?

Cheers

5
Hober
Re: User Amount
  • 2003/10/29 0:01

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


I'm looking at it some more, and I've revised my opinion to:



I would suggest waiting for some bigwig with a more in depth knowledge of XOOPS to come along and explain how XOOPS stores, retrieves, updates etc. A user's post count. I must admit that I'm now a little curious myself.

6
ajaxbr
Re: User Amount
  • 2003/10/29 1:05

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


If you have the Members module instaled, you get the number of members in its main page. If you go to the template section, you'll see this info comes from <{$lang_totalusers}>.

I'm trying to put that info in a block but I'm failing miserably. I guess in the end the only way to do that is either by a big hack in Members module or by using it to create a new module with a dummy block displaying <{$lang_totalusers}> or $total.


I believe this is the important part of Members' index.php:
$member_handler =& xoops_gethandler('member');
$total = $member_handler->getUserCount(new Criteria('level', 0, '>'));
$xoopsTpl->assign('lang_totalusers', sprintf(_MM_TOTALUSERS, '<span style="color:#ff0000;">'.$total.'</span>'));.

I hope we can get thru this and end a bit wiser... either by getting to know how to do that or by learning to leave code to people that can code

7
lykoszine
Re: User Amount
  • 2003/10/29 5:56

  • lykoszine

  • Module Developer

  • Posts: 244

  • Since: 2002/1/2 2


Lykos Blocks has this info.
Check it out on lykoszine.co.uk

8
ajaxbr
Re: User Amount
  • 2003/10/29 13:08

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


There you go, Lykos Blocks then :)

9
bream
Re: User Amount
  • 2003/10/29 19:40

  • bream

  • Just popping in

  • Posts: 12

  • Since: 2003/3/18


I have tried this lykos module, but there is some stuff init that i dont want to display.

Login

Who's Online

169 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits