Minimum installation for shoutbox

This mod will make it posible to specify permissions to all "special pages, like MEMBERLIST, PROFILE VIEW and so on.
The permissions support USERGROUP, making this tool very powerfull

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Minimum installation for shoutbox

Postby mm78 on Sat 12. Jul, 2003 18:10

I know this mod is required to install your shoutbox.

But, I don't want to install extra permissions for memberlist, index page, etc.

I only want to install what is needed for the shoutbox

What code do I remove, for minimum installation?
mm78
Poster
Poster
 
Posts: 2
Joined: Wed 12. Mar, 2003 21:19

Postby Niels on Thu 04. Sep, 2003 12:18

in that case, you may skip the changes into memberlist.php, index.php
and part of the code in page_header.php (I guess you can se witch

this part of the how-to does not need to be done !

note that te first lines is from page_header.php, the lines prior to this need still to be done
Code: Select all
if ($view_pages_ary[''.PAGE_INDEX_PERMISSION.'']['auth_view'])
{
   $template->assign_block_vars('switch_index_on', array());
}
if ($view_pages_ary[''.PAGE_VIEWMEMBERS]['auth_view'])
{
   $template->assign_block_vars('switch_memberlist_on', array());
}
unset($view_pages_ary);

#
#-----[ OPEN ]------------------------------------------
#
memberlist.php

#
#-----[ FIND ]------------------------------------------
#
// End session management
//

#
#-----[ AFTER,ADD ]------------------------------------------
#
// Added for Extra permission MOD
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, PAGE_VIEWMEMBERS, $userdata);

if( !$is_auth['auth_read'] )
{
   if ( !$userdata['session_logged_in'] )
   {
      $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
      header($header_location . append_sid("login.$phpEx?redirect=memberlist.$phpEx", true));
      exit;
   }
   $message = ( !$is_auth['auth_view'] ) ? $lang['Not_Authorised'] : sprintf ($lang['Sorry_no_auth'],$is_auth['auth_read_type']);
   message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//

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

#
#-----[ FIND ]------------------------------------------
#
// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Added for Extra permission MOD
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_READ, PAGE_INDEX_PERMISSION, $userdata);
if( !$is_auth['auth_read'] )
{
   if ( !$userdata['session_logged_in'] )
   {
      $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
      header($header_location . append_sid("login.$phpEx?redirect=index.$phpEx", true));
      exit;
   }
   $message = sprintf ($lang['Sorry_no_auth'],$is_auth['auth_read_type']);
   message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//

#
#-----[ OPEN ]------------------------------------------
#
overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#
<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;

#
#-----[ BEFORE,ADD ]------------------------------------------
#
<!-- BEGIN switch_memberlist_on -->

#
#-----[ AFTER,ADD ]------------------------------------------
#
<!-- END switch_memberlist_on -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron