Code: Select all
#
#-----[ ACTION: open ]---------------------------------
#
/templates/subSilver/index_body.tpl
Code: Select all
#
#-----[ ACTION: find ]---------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
Code: Select all
#
#-----[ ACTION: replace by ]---------------------------
#
<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
Code: Select all
#
#-----[ ACTION: open ]--------------------------------
#
/includes/page_header.php
(...)
#
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
(... AND A LOT MORE CODE)
//
// End of MOD
//
Code: Select all
#
#-----[ ACTION: open ]--------------------------------
#
/includes/page_header.php
### (... other little change)
#
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//
$display_not_day_userlist = 0;
$users_list_delay = 24;
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}
//
// End of MOD
//
spacefem wrote: you know, it'd be nice if there was a link to this thread on http://www.phpbb.com/mods/faq.php or somewhere similar. I felt equally clueless about all this, wasn't sure if I was supposed to install something or what, and hate to think what I would have done if this thread were hidden away more somewhere.
Anyway, thanks a lot for writing this tutorial morpheus!
Glass Foot wrote:spacefem wrote:you know, it'd be nice if there was a link to this thread on http://www.phpbb.com/mods/faq.php or somewhere similar. I felt equally clueless about all this, wasn't sure if I was supposed to install something or what, and hate to think what I would have done if this thread were hidden away more somewhere.
Anyway, thanks a lot for writing this tutorial morpheus!
AGREED
"How to install a MOD" ought to be the first link you see when clicking the "mods" link in the tool bar above.