Announcement

Collapse
No announcement yet.

php code for # of peeps in X user group

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bane
    replied
    Sweet I was a bit worried there! Glad I could help.

    Leave a comment:


  • Jake Bunce
    replied
    it works. thx dude.

    Leave a comment:


  • Bane
    replied
    Heres the file. This works on my server.

    Leave a comment:


  • Bane
    replied
    OK, try this.. this worked for me with your templates.

    Find (in your clan.php)
    Code:
    	eval("\$moderatorbits .= \"".gettemplate("showmods_bit")."\";");
    }
    Just under that put..
    Code:
    $macnum = mysql_num_rows(mysql_query("select * from user WHERE usergroupid =$clan_usergroup"));
    then place $macnum where you want it in your clan template. lemme know if this works. http://www.talkloud.net/clan.php. note the 4 floating up there.

    Leave a comment:


  • Jake Bunce
    replied
    shameless bump

    Leave a comment:


  • Jake Bunce
    replied
    not working... due to my extremely limited php knowledge i'm sure. i'm all putting that statement in different parts of the script trying to get it working. the script kept coming up saying call to undefined function and stuff. i have no idea.

    Leave a comment:


  • Jake Bunce
    replied
    hold the phone. i'll try jame's sug.

    Leave a comment:


  • Jake Bunce
    replied
    didn't work. i'm attaching the file in question. maybe i'll get lucky and some one will mod the file and upload it here for me.

    i changed the extension to .txt for attachment purposes.

    Leave a comment:


  • JamesUS
    replied
    You could also do:

    $macnum = $DB_site->query("SELECT COUNT(*) AS count FROM user WHERE usergroupid='1'");

    then use $macnum[count] in the template.

    Leave a comment:


  • Jake Bunce
    replied
    and then the $macnum variable gets put into the appropriate template, right?

    well, whatever. i'll try this when i get home tonight.

    Leave a comment:


  • Bane
    replied
    $macnum = mysql_num_rows(mysql_query("select * from user WHERE usergroupid =XX "));

    ... I think

    Leave a comment:


  • Jake Bunce
    started a topic php code for # of peeps in X user group

    php code for # of peeps in X user group

    http://130.94.172.202/clan.php

    i want to add that functionality to the above page. just a member count for that user group. what code would i add to the script to get this functionality?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X