Announcement

Collapse
No announcement yet.

[RELEASE vb2.0] Show admin groups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    Joshs
    Senior Member

  • Joshs
    replied
    Two things...

    First... is there any way to add email under the pm button? Secondly the Location field is messed up if a user doesn't have a Location... Shouldnt there be a divider between it and the contact info (make a name for that last field)...??? Lastly, shoulnt there also be a divider between online and username? And call the first field online? Just thought it would be better that way! Thanks!

    Second... Since upgrading too RC3 I get an error in CGI application. Can someone please help me fix this?

    Leave a comment:

  • Martz
    Senior Member

  • Martz
    replied
    Well, I created a new button called top_links.gif to go along with usercp, register, calendar etc etc

    Edit your header template and find:

    Code:
    <!-- toplinks -->
       <a href="usercp.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_profile.gif" alt="Edit your profile" border="0"></a
       ><a href="register.php?s=$session[sessionhash]&action=signup"><img width="67" height="25" src="images/top_register.gif" alt="Registration is free!" border="0"></a
       ><a href="calendar.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_calendar.gif" alt="Calendar" border="0"></a
       ><a href="memberlist.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_members.gif" alt="Find other members" border="0"></a
       ><a href="misc.php?s=$session[sessionhash]&action=faq"><img width="67" height="25" src="images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a
       ><a href="search.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_search.gif" alt="Search" border="0"></a
       ><a href="index.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_home.gif" alt="Home" border="0"></a
       > <!-- <a href="member.php?s=$session[sessionhash]&action=logout"><img width="67" height="25" src="images/top_logout.gif" alt="Logout" border="0"></a> -->
    Add the following at the end to have it as the last button
    Code:
    <a href="links.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_links.gif" alt="Links Directory" border="0"></a>
    Hope this works for you

    Leave a comment:

  • Maverick1236
    Senior Member

  • Maverick1236
    replied
    a newbie

    sorry-im a newbie
    everythings in the right place-but how EXACTLY do i link to that php file?

    Leave a comment:

  • Mohamed
    New Member

  • Mohamed
    replied
    no body can't help me

    so bad

    Leave a comment:

  • Martz
    Senior Member

  • Martz
    replied
    Originally posted by Martz
    Works great! Thanks a lot. I'd like to change part of it slightly, instead of Super Moderators I would like to list all the members in another usergroup.

    I'd also like to be able to show multiple user_id's in where the supermoderators list is - could anyone point me in the right direction please?
    Sorry I can't answer any of the other guys questions, but I found a "solution" to my own problems, so I thought I may as well be able to share them. Anything which I say which is *obvious* please don't flame me for, I'm just starting out as I am sure many other people may be.

    The install script included has all the data regarding layout, table title (usergroup titles) etc. This can be edited to change the names, however I wans't sure of the routine to actually grab this using the userid from the mySQL table.

    Secondly, including other groups in the listings can be done by editing the showmods source as follows:

    At the top where the usergroups are defined, such as:

    Code:
    $supermod_usergroup = 5;
    add as many new groups as you want, or change the current group value
    Code:
    $myother_usergroup = 10;
    $alsomyother_usergroup = 9;
    Next find the "// get administrators & super moderators *************************" section of code.

    where:
    Code:
    WHERE user.usergroupid IN($admin_usergroup,$supermod_usergroup)
    change to:
    Code:
    WHERE user.usergroupid IN($admin_usergroup,$supermod_usergroup,$myother_usergroup,$alsomyother_usergroup)
    Next, further down find:
    Code:
    while ($user = $DB_site->fetch_array($users)) {
    	if ($user[usergroupid] == $admin_usergroup) {
    		if (($admincount++ % 2) == 0) $backcolor = "#EFEFEF";
    		else $backcolor = "#DEDEDE";
    		douserinfo();
    		eval("\$adminbits .= \"".gettemplate("showmods_adminbit")."\";");
    	}
    	else {
    		if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
    		else $backcolor = "#DEDEDE";
    		douserinfo();
    		eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
    	}
    }
    and change to:

    Code:
    while ($user = $DB_site->fetch_array($users)) {
    	if ($user[usergroupid] == $admin_usergroup) {
    		if (($admincount++ % 2) == 0) $backcolor = "#EFEFEF";
    		else $backcolor = "#DEDEDE";
    		douserinfo();
    		eval("\$adminbits .= \"".gettemplate("showmods_adminbit")."\";");
    	}
    	else if ($user[usergroupid] == $myother_usergroup) {
    		if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
    		else $backcolor = "#DEDEDE";
    		douserinfo();
    		eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
    	}
    	else if ($user[usergroupid] == $alsomyother_usergroup) {
    		if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
    		else $backcolor = "#DEDEDE";
    		douserinfo();
    		eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
    	}
    	else {
    		if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
    		else $backcolor = "#DEDEDE";
    		douserinfo();
    		eval("\$supermodbits .= \"".gettemplate("showmods_adminbit")."\";");
    	}
    
    }
    It works for me anyway! Hope this is of some help to someone, and not completely lame

    Leave a comment:

  • Mohamed
    New Member

  • Mohamed
    replied
    hi boys I have in this hack in :

    Warning: Variable passed to each() is not an array or object


    vb/showmods.php on line 110


    can any one help me ....!!!!!!!

    Leave a comment:

  • ztsky
    Senior Member

  • ztsky
    replied
    Originally posted by ztsky


    help!!!!!!
    can Anyone help me ?

    ....................can Anyone help me ?

    Leave a comment:

  • Martz
    Senior Member

  • Martz
    replied
    Works great! Thanks a lot. I'd like to change part of it slightly, instead of Super Moderators I would like to list all the members in another usergroup.

    I've managed to do this, I looked up the usergroup ID of the group I want to display, and used it in place of Super Moderators. However I still get the supermoderators header title for the table . I've read through the code and concluded that it must be bringing the title through in a global variable? (please note my inability to unerstand php - but my ability to learn? )

    I'd also like to be able to show multiple user_id's in where the supermoderators list is - could anyone point me in the right direction please?

    Thanks

    Leave a comment:

  • ztsky
    Senior Member

  • ztsky
    replied
    Originally posted by ztsky
    \--------------------------------------------------------------------------------
    Originally posted by Zothip
    Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30


    --------------------------------------------------------------------------------



    same problem

    help!!
    help!!!!!!
    can Anyone help me ?

    Leave a comment:

  • Joshs
    Senior Member

  • Joshs
    replied
    Re: Three things...

    Originally posted by Joshs
    First, is there any way to add email under the pm button? Secondly the Location field is messed up if a user doesn't have a Location... Shouldnt there be a divider between it and the contact info (make a name for that last field)...??? Lastly, shoulnt there also be a divider between online and username? And call the first field online? Just thought it would be better that way! Thanks!
    Yeah, is there a fix for that...??? Also can someone take a look at my above post.

    Leave a comment:

  • Blue2000
    Member

  • Blue2000
    replied
    this is a nice hack mate, but i have a problem with it


    once you have made somone a mod and then removed there mod and set the permission back to a standed account, they still show on the list.

    It maybe just me but as anyone else had this ?

    Leave a comment:

  • Joshs
    Senior Member

  • Joshs
    replied
    Three things...

    First, is there any way to add email under the pm button? Secondly the Location field is messed up if a user doesn't have a Location... Shouldnt there be a divider between it and the contact info (make a name for that last field)...??? Lastly, shoulnt there also be a divider between online and username? And call the first field online? Just thought it would be better that way! Thanks!

    Leave a comment:

  • ff92k
    Senior Member

  • ff92k
    replied
    Works like a dream...nice 1

    Leave a comment:

  • Craig A
    Senior Member

  • Craig A
    replied
    Originally posted by Lorina
    Craig,

    This might be a bit too much of a pain, but what if you have that moderator in his own usergroup (with all the mod privledges), so he wouldn't show in the listing?
    Sadly not... good idea, tried it... but it doesn't work - I don't think this script uses the usergroup structure to determine who's a moderator

    Any other thoughts, guys ??

    Leave a comment:


  • Zothip
    replied
    It must be the version of php we have...

    Leave a comment:

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X