vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - microMEMBERS (https://vborg.vbsupport.ru/showthread.php?t=208382)

down.low 04-26-2009 05:20 AM

http://i472.photobucket.com/albums/r...tion/stats.jpg


Well, well, it looks like the overall post count is correct,.- but the months post count is incorrect.

The user has 1648 for the month.

But only has a total of 938 on their profile.

I've realized what the problem is, my forum has a contest sub-forum that does not affect your post count when posting in there,.- the months calculations is including these post as well,.- but the overall calculations is skipping them,.- am I making any sense hun?

odln018 04-26-2009 05:43 PM

Quote:

Originally Posted by MicroHellas (Post 1798237)
Go ahead and ask. But as it's 8:30pm here, I'll reply tomorrow morning.

Mary

That is very kind of you.

Primarily what I was interested in doing is having the memberindex.php default to show ALL members.

Thank y ou

MaryTheG(r)eek 04-27-2009 04:35 PM

Quote:

Originally Posted by down.low (Post 1799142)
I've realized what the problem is, my forum has a contest sub-forum that does not affect your post count when posting in there,.- the months calculations is including these post as well,.- but the overall calculations is skipping them,.- am I making any sense hun?

Stupid me;) Open memberindex.php
Find:
Code:

if ($vbulletin->options[micromembers_month] == '1') {
$timelimit = time() - 30 * 7 * 24 * 60 * 60;

Replace with:
Code:

if ($vbulletin->options[micromembers_month] == '1') {
$timelimit = time() - 30 * 24 * 60 * 60;

Mary

MaryTheG(r)eek 04-27-2009 04:43 PM

Quote:

Originally Posted by odln018 (Post 1799443)
That is very kind of you.

Primarily what I was interested in doing is having the memberindex.php default to show ALL members.

Thank y ou

Hello,

But it shows all members. It just seperate them by usergroup. Do you mean to remove the line above: Admins(xx), Mods(xx), Users(xx) and the listing to show all by default?

Mary

down.low 04-28-2009 08:16 AM

Quote:

Originally Posted by MicroHellas (Post 1799996)
Stupid me;) Open memberindex.php
Find:
Code:

if ($vbulletin->options[micromembers_month] == '1') {
$timelimit = time() - 30 * 7 * 24 * 60 * 60;

Replace with:
Code:

if ($vbulletin->options[micromembers_month] == '1') {
$timelimit = time() - 30 * 24 * 60 * 60;

Mary

Thanks for taking the time to help me out,.- I've did that previously befored ever writing you and the calculations are still wrong- like I said though in my last post, I think it's because I have a sub-forum set up to not count post,.- and your mod is counting them in one section but not the other. It's no biggie I don't want you to trouble yourself,.- it's more my problem then your's. Once again thanks for a great mod,.- and for being apart of vb.org.

MaryTheG(r)eek 04-28-2009 09:58 AM

Quote:

Originally Posted by down.low (Post 1800392)
.... I think it's because I have a sub-forum set up to not count post,.- and your mod is counting them in one section but not the other.

Thank you for your supporting words. Give me some time to check it again. Most probably needs one more restriction in "where".

Mary

MaryTheG(r)eek 04-29-2009 10:15 AM

Quote:

Originally Posted by down.low (Post 1800392)
It's no biggie I don't want you to trouble yourself,.- it's more my problem then your's. Once again thanks for a great mod,.- and for being apart of vb.org.

Finally seems to be more complicated than what I was expecting. Seems that vBulletin codes all forum options in a 5 digits number with field name "options" (table forum). I did some check in vb code but I wan unable to find a section for it.

There is a way to resolve this problem, if you've same options for the forums that you don't count posts. If you're familiar with phpMyAdmin check the values in field "option". If it's the same, then just give me that 5 digit number and I'll modify your code to have correct results.

If not, the last that I can do, it to modify your code which counts the overall posts at least to have the hidden posts counting there too. Currently, for overall I'm getting the number from user table and not from post table as I'm doing for week and month.

Mary

Leo Brazil 04-29-2009 01:10 PM

Quote:

Originally Posted by Leo Brazil (Post 1784963)
First thank you for this great mod, really impressive.
Where exactly is the line to change on membersindex.php to add more the one user group to be showed on administrators block. I have two levels (two different usergroups) and they are not properlly showed. I tried also to use the Special Group box but it's only accept one usergroup at the time, I mean I can't set up two or three users groups just like separeting them with commas. Any tip ?

Sorry to bump this, but does one here have a tip for it ?

Quote:

Originally Posted by MicroHellas (Post 1801085)
Currently, for overall I'm getting the number from user table and not from post table as I'm doing for week and month.

It would be great, I'm getting the same issue here, not a big deal, we could live with that but as we do have a few forums like off-topic ones not counting posts, it's affecting your mod page.

Thanks

SteamyLightning 04-29-2009 01:31 PM

Is there anyway to add the usergroup fix to the AdminCP options?

MaryTheG(r)eek 04-29-2009 01:48 PM

Quote:

Originally Posted by Leo Brazil (Post 1801149)
Sorry to bump this, but does one here have a tip for it ?

Open memberindex.php
Find:
Code:

  // Build Admins Block
  if ($vbulletin->options[micromembers_admins] == '1') {
    $teammembers_get = $vbulletin->db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle
    FROM ".TABLE_PREFIX."user
    JOIN ".TABLE_PREFIX."usergroup AS ugroup
  ON ugroup.usergroupid=".TABLE_PREFIX."user.usergroupid
  LEFT JOIN ".TABLE_PREFIX."usergroup
  ON (FIND_IN_SET(".TABLE_PREFIX."usergroup.usergroupid, ".TABLE_PREFIX."user.membergroupids))
    WHERE ugroup.usergroupid=$admingroup OR ".TABLE_PREFIX."usergroup.usergroupid=$admingroup
  GROUP BY ".TABLE_PREFIX."user.userid
    ORDER BY RAND()
    LIMIT $limit
    ");

Replace with:
Code:

  // Build Admins Block
  if ($vbulletin->options[micromembers_admins] == '1') {
    $teammembers_get = $vbulletin->db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle
    FROM ".TABLE_PREFIX."user
    JOIN ".TABLE_PREFIX."usergroup AS ugroup
  ON ugroup.usergroupid=".TABLE_PREFIX."user.usergroupid
  LEFT JOIN ".TABLE_PREFIX."usergroup
  ON (FIND_IN_SET(".TABLE_PREFIX."usergroup.usergroupid, ".TABLE_PREFIX."user.membergroupids))
    WHERE ugroup.usergroupid=$admingroup OR ".TABLE_PREFIX."usergroup.usergroupid=$admingroup OR ugroup.usergroupid=xxx OR ".TABLE_PREFIX."usergroup.usergroupid=xxx
 
  GROUP BY ".TABLE_PREFIX."user.userid
    ORDER BY RAND()
    LIMIT $limit
    ");

Replace xxx with the usergroupid that you want.

If you want to use more than 2 usergroups you can use the code below (of course you can use this code even for 2 only usergroups). On memberindex.php
Find:
Code:

  $admingroup = $vbulletin->options['micromembers_admins_group'];
  $admingroup2 = $vbulletin->options['micromembers_admins2_group'];
  // Build Admins Block
  if ($vbulletin->options[micromembers_admins] == '1') {
    $teammembers_get = $vbulletin->db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle
    FROM ".TABLE_PREFIX."user
    JOIN ".TABLE_PREFIX."usergroup AS ugroup
  ON ugroup.usergroupid=".TABLE_PREFIX."user.usergroupid
  LEFT JOIN ".TABLE_PREFIX."usergroup
  ON (FIND_IN_SET(".TABLE_PREFIX."usergroup.usergroupid, ".TABLE_PREFIX."user.membergroupids))
    WHERE ugroup.usergroupid=$admingroup OR ".TABLE_PREFIX."usergroup.usergroupid=$admingroup
  GROUP BY ".TABLE_PREFIX."user.userid
    ORDER BY RAND()
    LIMIT $limit
    ");

Replace with:
Code:

  $admingroup = array('xxx', 'xxx');
  $thesegroups = implode(",", $admingroup);
  $admingroup2 = $vbulletin->options['micromembers_admins2_group'];
  // Build Admins Block
  if ($vbulletin->options[micromembers_admins] == '1') {
    $teammembers_get = $vbulletin->db->query_read("
    SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle
    FROM ".TABLE_PREFIX."user
    JOIN ".TABLE_PREFIX."usergroup AS ugroup
  ON ugroup.usergroupid=".TABLE_PREFIX."user.usergroupid
  LEFT JOIN ".TABLE_PREFIX."usergroup
  ON (FIND_IN_SET(".TABLE_PREFIX."usergroup.usergroupid, ".TABLE_PREFIX."user.membergroupids))
    WHERE ugroup.usergroupid IN $thesegroups OR ".TABLE_PREFIX."usergroup.usergroupid IN $thesegroups
  GROUP BY ".TABLE_PREFIX."user.userid
    ORDER BY RAND()
    LIMIT $limit
    ");



Quote:

Originally Posted by Leo Brazil (Post 1801149)
It would be great, I'm getting the same issue here, not a big deal, we could live with that but as we do have a few forums like off-topic ones not counting posts, it's affecting your mod page.
Thanks

I'm trying to find a solution for it. Please have patience.
Mary


All times are GMT. The time now is 08:54 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01384 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete