Admin Contacts List

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
1
100%
Very Good
0
No votes
Good
0
No votes
Fair
0
No votes
Poor
0
No votes
 
Total votes: 1

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28348
Joined: Sat Aug 16, 2003 7:36 am

Admin Contacts List

Post by Extensions Robot »

MOD Name: Admin Contacts List
Author: edi82
MOD Description: This MOD will add a new line in the WhoIsOnline box on the homepage with the list of the administrators and direct links to their profiles.


MOD Version: 1.0.0

Download File: admin-contacts-list_1.0.0.mod
mods overview page: View
File Size: 3971 Bytes

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
User avatar
webmacster87
Former Team Member
Posts: 3758
Joined: Fri Jun 11, 2004 2:30 am
Location: San Mateo, CA
Name: Douglas Bell
Contact:

Post by webmacster87 »

MOD Validated/Released

Notes:
Lists the administrators of the board in the Who Is Online page with links to their profiles.
User avatar
wads24
Registered User
Posts: 556
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Post by wads24 »

I did this mod... just curious why the main administrator is not listed? You know user=2?
edi82
Registered User
Posts: 1
Joined: Tue Jun 27, 2006 5:54 pm

Post by edi82 »

I check the global constant ADMIN to know if a user has the special level "administrator", in my test forum this work perfectly. What about user=2 ?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

Is there a Demo / Screenshot of this MOD?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
wads24
Registered User
Posts: 556
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Post by wads24 »

that is what is was... i had it under a special user rank. is there a way to add list for moderators below admin?
deejaybet
Registered User
Posts: 1814
Joined: Thu Dec 08, 2005 2:01 pm
Location: Derry, Northern Ireland
Contact:

Post by deejaybet »

ive a problem with this mod... i dont remember if i tweaked it or not but when i go to any page except the index page, the admin contacts disappear.. can you tell me why this happened?
just_another_person
Registered User
Posts: 24
Joined: Sat Feb 17, 2007 9:33 am

Post by just_another_person »

Could this Mod be tweaked to do the same for the moderators? If so, how? lol
Electra736
Registered User
Posts: 270
Joined: Fri Aug 11, 2006 4:25 pm

Post by Electra736 »

Here you go:

Code: Select all

##############################################################
## MOD Title: Moderator Contacts List
## MOD Author: edi82 < N/A > (N/A) N/A
## MOD Author, Secondary: Electra736 < N/A > (N/A) N/A
## MOD Description: This MOD will add a new line in the WhoIsOnline box on the homepage with the list of the moderators and direct links to profiles. 
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~3 Minutes
## Files To Edit: 
##      language/lang_english/lang_main.php
##      index.php
##      templates/subSilver/index_body.tpl
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: 
##
## EasyMOD
## ===========
## This MOD can be successfully installed using EasyMOD.
##############################################################
## MOD History:
##
##   2006-06-27 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
# NOTE: You will need to perform the following actions for all of your different languages.
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['FAQ'] = 'FAQ';

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['MCL_CONTACT_MOD'] = 'Contact a moderator:';

#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);

#
#-----[ AFTER, ADD ]------------------------------------------
#
  $mcl_mod_information = "";
  if(defined('SHOW_ONLINE')) {
  $mcl_sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level FROM ".USERS_TABLE." u ORDER BY u.username ASC";
  if($mcl_result = $db->sql_query($mcl_sql)) {
      while($mcl_row = $db->sql_fetchrow($mcl_result)) {
        if($mcl_row['user_level'] == ADMIN && $mcl_row['user_allow_viewonline']) {
$mcl_admin_information .= '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$mcl_row['user_id']).'"><b>'.$mcl_row['username'].'</b></a> ';
}
      }

    }
  }
  $template->assign_vars(array(
    'MCL_CONTACT_MOD' => $lang['MCL_CONTACT_MOD'].' '.$acl_admin_information)
  );

#
#-----[ OPEN ]------------------------------------------
#
# NOTE: You will need to perform the following actions for all of your different templates.
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="{%:1}">

#
#-----[ INCREMENT ]------------------------------------------
#
%:1

#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
  <tr><td class="row1" align="left"><span class="gensmall">{MCL_CONTACT_MOD}</span></td></tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
just_another_person
Registered User
Posts: 24
Joined: Sat Feb 17, 2007 9:33 am

Post by just_another_person »

Thank you!

I installed it and it worked perfectly, but I forgot that I had my mods set up through a staff user group that has moderating permissions. LOL
just_another_person
Registered User
Posts: 24
Joined: Sat Feb 17, 2007 9:33 am

Post by just_another_person »

I have my mods set up with mod permissions through a user group. I then went and set up each mod with permissions as moderator through permissions in the ACP. I have also set them up with the moderator rank.

Yet they are still not appearing on my contact mod section. Is there a more official way to make someone a mod and get them on this list?
terminatoronly
Registered User
Posts: 93
Joined: Wed Jun 13, 2007 7:55 pm

Re: Admin Contacts List

Post by terminatoronly »

thanks alot friend how can i set it to all other usergroups?
User avatar
wads24
Registered User
Posts: 556
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re:

Post by wads24 »

Electra736 wrote:Here you go:

Code: Select all

##############################################################
## MOD Title: Moderator Contacts List
## MOD Author: edi82 < N/A > (N/A) N/A
## MOD Author, Secondary: Electra736 < N/A > (N/A) N/A
## MOD Description: This MOD will add a new line in the WhoIsOnline box on the homepage with the list of the moderators and direct links to profiles. 
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~3 Minutes
## Files To Edit: 
##      language/lang_english/lang_main.php
##      index.php
##      templates/subSilver/index_body.tpl
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: 
##
## EasyMOD
## ===========
## This MOD can be successfully installed using EasyMOD.
##############################################################
## MOD History:
##
##   2006-06-27 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
# NOTE: You will need to perform the following actions for all of your different languages.
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['FAQ'] = 'FAQ';

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['MCL_CONTACT_MOD'] = 'Contact a moderator:';

#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);

#
#-----[ AFTER, ADD ]------------------------------------------
#
  $mcl_mod_information = "";
  if(defined('SHOW_ONLINE')) {
  $mcl_sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level FROM ".USERS_TABLE." u ORDER BY u.username ASC";
  if($mcl_result = $db->sql_query($mcl_sql)) {
      while($mcl_row = $db->sql_fetchrow($mcl_result)) {
        if($mcl_row['user_level'] == ADMIN && $mcl_row['user_allow_viewonline']) {
$mcl_admin_information .= '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$mcl_row['user_id']).'"><b>'.$mcl_row['username'].'</b></a> ';
}
      }

    }
  }
  $template->assign_vars(array(
    'MCL_CONTACT_MOD' => $lang['MCL_CONTACT_MOD'].' '.$acl_admin_information)
  );

#
#-----[ OPEN ]------------------------------------------
#
# NOTE: You will need to perform the following actions for all of your different templates.
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="{%:1}">

#
#-----[ INCREMENT ]------------------------------------------
#
%:1

#
#-----[ FIND ]------------------------------------------
#
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
  <tr><td class="row1" align="left"><span class="gensmall">{MCL_CONTACT_MOD}</span></td></tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Why won't this and the admin mod work together? is it do to this line of code?

Code: Select all

            if($mcl_row['user_level'] == ADMIN && $mcl_row['user_allow_viewonline']) {
Thanks in advance for a reply.
c0rkscrew
Registered User
Posts: 1
Joined: Tue Jun 19, 2007 10:21 pm

Re: Admin Contacts List

Post by c0rkscrew »

I had the same problem getting the mod and admin listings to work together, but after taking a closer look at the code, there were a couple of mis-named variables for the mod portion and the SQL statement needed tweaking. Here's the correct code for index.php.

Code: Select all

$mcl_mod_information = "";
      if(defined('SHOW_ONLINE')) {
      $mcl_sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level FROM ".USERS_TABLE." u ORDER BY u.username ASC";
      if($mcl_result = $db->sql_query($mcl_sql)) {
          while($mcl_row = $db->sql_fetchrow($mcl_result)) {
            if($mcl_row['user_level'] == MOD && $mcl_row['user_allow_viewonline']) {
    $mcl_mod_information .= '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$mcl_row['user_id']).'"><b>'.$mcl_row['username'].'</b></a> ';
    }
          }

        }
      }
      $template->assign_vars(array(
        'MCL_CONTACT_MOD' => $lang['MCL_CONTACT_MOD'].' '.$mcl_mod_information)
      );
Hope that helps.
User avatar
wads24
Registered User
Posts: 556
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: Admin Contacts List

Post by wads24 »

Thanks...


I have moderators that moderate certain forums, but I don't want those people listed in the moderator contact list. Is there a way that I could show users with a special rank? Like using the rank ID #?
Thanks in advance for a reply.
Post Reply

Return to “[2.0.x] MOD Database Releases”