Birthdays

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!
151
66%
Very Good
39
17%
Good
21
9%
Fair
5
2%
Poor
12
5%
 
Total votes: 228

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Birthdays

Post by TerraFrost »

bonelifer wrote: Strange that didn't work for me. I get colored on the display, but another person on the birthday display isn't colored correctly

As I recall, you modified yours. I cannot help but wonder if that's the source of the problem.

In any event, if you want me to fix the problem, you're going to have to give me more to work with. Like a screenshot, maybe. And who, in that screenshot, is showing up in the wrong color, what color you think they should be showing up as, and why you think that.
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: Birthdays

Post by bonelifer »

The only change currently is that I moved the Birthdays to its own table. All the other changes weren't reinstalled since they involved integrating kkroo's Simple User Color mod which isn't needed since I'm using AGCM now. I'm currently using Birthdays 3.0.

Birthdays.gif
Birthdays.gif (41.02 KiB) Viewed 298 times
edcrain is one of our Global Moderators. He should show up as purple, but instead shows up in the default anchor link color.

file: index.php

Code: Select all

<?php
/***************************************************************************
 *                                index.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : [email protected]
 *
 *   $Id: index.php,v 1.99.2.7 2006/01/28 11:13:39 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
	$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
	$mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
	if( $userdata['session_logged_in'] )
	{
		setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
	}

	$template->assign_vars(array(
		"META" => '<meta http-equiv="refresh" content="3;url='  .append_sid("index.$phpEx") . '">')
	);

	$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

	message_die(GENERAL_MESSAGE, $message);
}

// Start Mark Category Read MOD
if ( $mark_read == 'category' && $viewcat )
{
	$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
	$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();

	if ( $userdata['session_logged_in'] )
	{
		$sql = 'SELECT forum_id 
			FROM ' . FORUMS_TABLE . " 
			WHERE cat_id = $viewcat";
	
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain category information', '', __LINE__, __FILE__, $sql);
		}

		while( $row = $db->sql_fetchrow($result) )
		{
			$forum_id = $row['forum_id'];

			$sql = 'SELECT MAX(post_time) AS last_post 
				FROM ' . POSTS_TABLE . " 
				WHERE forum_id = $forum_id";

			if ( !($result2 = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
			}

			if ( $row2 = $db->sql_fetchrow($result2) )
			{
				if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
				{
					asort($tracking_forums);
					unset($tracking_forums[key($tracking_forums)]);
				}
					
				if ( $row2['last_post'] > $userdata['user_lastvisit'] )
				{
					$tracking_forums[$forum_id] = time();
				}
			}
		}
		
		setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
		
		$template->assign_vars(array(
			'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
		);
	
		$message = $lang['Category_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
		message_die(GENERAL_MESSAGE, $message);
	}
}
// End Mark Category Read MOD


//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
// Topics a user has started MOD, by Manipe (Begin)
$total_topics = get_db_stat('topiccount');

if( $total_topics == 0 )
{
	$l_total_topic_s = $lang['Posted_topics_zero_total'];
}
else if( $total_topics == 1 )
{
	$l_total_topic_s = $lang['Posted_topic_total'];
}
else
{
	$l_total_topic_s = $lang['Posted_topics_total'];
}
// Topics a user has started MOD, by Manipe (End)

//-- mod : Advanced Group Color Management -------------------------------------
//-- add
$newest_user_group_id = $newest_userdata['user_group_id'];
$newest_user_session_time = $newest_userdata['user_session_time'];
//-- fin mod : Advanced Group Color Management ---------------------------------


if( $total_posts == 0 )
{
	$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
	$l_total_post_s = $lang['Posted_article_total'];
}
else
{
	$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
	$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
	$l_total_user_s = $lang['Registered_user_total'];
}
else
{
	$l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
	FROM " . CATEGORIES_TABLE . " c 
	ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

$category_rows = array();
while ($row = $db->sql_fetchrow($result))
{
	$category_rows[] = $row;
}
$db->sql_freeresult($result);

// Begin Simple Subforums MOD
$subforums_list = array();
// End Simple Subforums MOD



if( ( $total_categories = count($category_rows) ) )
{
	//
	// Define appropriate SQL
	//
	switch(SQL_LAYER)
	{
		case 'postgresql':
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
				WHERE p.post_id = f.forum_last_post_id 
					AND u.user_id = p.poster_id  
					UNION (
						SELECT f.*, NULL, NULL, NULL, NULL
						FROM " . FORUMS_TABLE . " f
						WHERE NOT EXISTS (
							SELECT p.post_time
							FROM " . POSTS_TABLE . " p
							WHERE p.post_id = f.forum_last_post_id  
						)
					)
					ORDER BY cat_id, forum_order";
//-- mod : Advanced Group Color Management -------------------------------------
//-- add
			$sql = str_replace('SELECT ', 'SELECT u.user_group_id, u.user_session_time, ', $sql);
//-- fin mod : Advanced Group Color Management ---------------------------------

			break;

		case 'oracle':
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
				WHERE p.post_id = f.forum_last_post_id(+)
					AND u.user_id = p.poster_id(+)
				ORDER BY f.cat_id, f.forum_order";
//-- mod : Advanced Group Color Management -------------------------------------
//-- add
			$sql = str_replace('SELECT ', 'SELECT u.user_group_id, u.user_session_time, ', $sql);
//-- fin mod : Advanced Group Color Management ---------------------------------

			break;

		default:
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
				FROM (( " . FORUMS_TABLE . " f
				LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
				LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
				ORDER BY f.cat_id, f.forum_order";
//-- mod : Advanced Group Color Management -------------------------------------
//-- add
			$sql = str_replace('SELECT ', 'SELECT u.user_group_id, u.user_session_time, ', $sql);
//-- fin mod : Advanced Group Color Management ---------------------------------

			break;
	}
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
	}

	$forum_data = array();
	while( $row = $db->sql_fetchrow($result) )
	{
		$forum_data[] = $row;
	}
	$db->sql_freeresult($result);

	if ( !($total_forums = count($forum_data)) )
	{
		message_die(GENERAL_MESSAGE, $lang['No_forums']);
	}

	//
	// Obtain a list of topic ids which contain
	// posts made since user last visited
	//
	if ($userdata['session_logged_in'])
	{
		// 60 days limit
		if ($userdata['user_lastvisit'] < (time() - 5184000))
		{
			$userdata['user_lastvisit'] = time() - 5184000;
		}

		$sql = "SELECT t.forum_id, t.topic_id, p.post_time 
			FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p 
			WHERE p.post_id = t.topic_last_post_id 
				AND p.post_time > " . $userdata['user_lastvisit'] . " 
				AND t.topic_moved_id = 0"; 
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
		}

		$new_topic_data = array();
		while( $topic_data = $db->sql_fetchrow($result) )
		{
			$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
		}
		$db->sql_freeresult($result);
	}

	//
	// Obtain list of moderators of each forum
	// First users, then groups ... broken into two queries
	//
	$sql = "SELECT aa.forum_id, u.user_id, u.username 
		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
		WHERE aa.auth_mod = " . TRUE . " 
			AND g.group_single_user = 1 
			AND ug.group_id = aa.group_id 
			AND g.group_id = aa.group_id 
			AND u.user_id = ug.user_id 
		GROUP BY u.user_id, u.username, aa.forum_id 
		ORDER BY aa.forum_id, u.user_id";
//-- mod : Advanced Group Color Management -------------------------------------
//-- add
	$sql = str_replace('SELECT ', 'SELECT u.user_group_id, u.user_session_time, ', $sql);
//-- fin mod : Advanced Group Color Management ---------------------------------

	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
	}

	$forum_moderators = array();
	while( $row = $db->sql_fetchrow($result) )
	{
//-- mod : Advanced Group Color Management -------------------------------------
//-- here we added
//	 class="' . $color->get_user_color($row['user_group_id'], $row['user_session_time']) . '"
//-- modify

		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '" class="' . $color->get_user_color($row['user_group_id'], $row['user_session_time']) . '">' . $row['username'] . '</a>';
//-- fin mod : Advanced Group Color Management ---------------------------------

	}
	$db->sql_freeresult($result);

	if ( !$board_config['bday_hide'] || $userdata['session_logged_in'] )
	{
		// if birthday_display is set to "Display age (but not day or month)" (eg. BIRTHDAY_AGE), we don't display it here,
		// since this code would make it trivially easy to extrapolate that information.
		$sql = "SELECT user_id, username, user_birthday, birthday_display, user_level 
			FROM " . USERS_TABLE . " 
			WHERE user_birthday >= " . gmdate('md0000',time() + (3600 * $board_config['board_timezone'])) . " 
				AND user_birthday <= " . gmdate('md9999',time() + (3600 * $board_config['board_timezone']))." 
				AND user_active = 1 
				AND birthday_display <> " . BIRTHDAY_NONE . " 
				AND birthday_display <> " . BIRTHDAY_AGE . " 
			ORDER BY username DESC";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not query members birthday information', '', __LINE__, __FILE__, $sql);
		}

		$user_birthdays = array();
		while ( $row = $db->sql_fetchrow($result) )
		{
			// if birthday_display is set to "Display day and month (but not year)" (eg. BIRTHDAY_DATE), set the year
			// to 0.
			$bday_year = ( $row['birthday_display'] != BIRTHDAY_DATE ) ? $row['user_birthday'] % 10000 : 0;
			$age = ( $bday_year ) ? ' ('.(gmdate('Y')-$bday_year).')' : '';
			$birthday_color = '';
			if ( $row['user_level'] == ADMIN )
			{
				$birthday_color = ' style="color:#' . $theme['fontcolor3'] . '"';
			}
			else if ( $row['user_level'] == MOD )
			{
				$birthday_color = ' style="color:#' . $theme['fontcolor2'] . '"';
			}
			$user_birthdays[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $birthday_color . '>' . $row['username'] . '</a>' . $age;
		}
		$db->sql_freeresult($result);

		$birthdays = (!empty($user_birthdays)) ?
			sprintf($lang['Congratulations'],implode(', ',$user_birthdays)) :
			$lang['No_birthdays'];

		if ( $board_config['bday_lookahead'] != -1 )
		{
			$start = gmdate('md9999',strtotime('+'.$board_config['bday_lookahead'].' day') + (3600 * $board_config['board_timezone']));
			$end = gmdate('md0000',strtotime('+1 day') + (3600 * $board_config['board_timezone']));
			$operator = ($start > $end) ? 'AND' : 'OR';
			$sql = "SELECT user_id, username, user_birthday, birthday_display, user_level 
				FROM " . USERS_TABLE . " 
				WHERE (user_birthday <= $start 
					$operator user_birthday >= $end)
					AND user_birthday <> 0 
					AND user_active = 1 
					AND birthday_display <> " . BIRTHDAY_NONE . " 
					AND birthday_display <> " . BIRTHDAY_AGE . " 
				ORDER BY user_birthday ASC, username DESC";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not query upcoming birthday information', '', __LINE__, __FILE__, $sql);
			}
			$upcoming_birthdays = array();
			while ( $row = $db->sql_fetchrow($result) )
			{
				$bday_month_day = floor($row['user_birthday'] / 10000);
				$bday_year_age = ( $row['birthday_display'] != BIRTHDAY_DATE ) ? $row['user_birthday'] - 10000*$bday_month_day : 0;
				$fudge = ( gmdate('md') < $bday_month_day ) ? 0 : 1;
				$age = ( $bday_year_age ) ? ' ('.(gmdate('Y')-$bday_year_age+$fudge).')' : '';
				$birthday_color = '';
				if ( $row['user_level'] == ADMIN )
				{
					$birthday_color = ' style="color:#' . $theme['fontcolor3'] . '"';
				}
				else if ( $row['user_level'] == MOD )
				{
					$birthday_color = ' style="color:#' . $theme['fontcolor2'] . '"';
					}
				$upcoming_birthdays[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $birthday_color . '>' . $row['username'] . '</a>' . $age;
			}

			$upcoming = (!empty($upcoming_birthdays)) ?
				sprintf($lang['Upcoming_birthdays'],$board_config['bday_lookahead'],implode(', ',$upcoming_birthdays)) :
				sprintf($lang['No_upcoming'],$board_config['bday_lookahead']);
		}

		if ( !empty($user_birthdays) || !empty($upcoming_birthdays) || $board_config['bday_show'] )
		{
			$template->assign_block_vars('birthdays',array());
			if ( !empty($upcoming_birthdays) || $board_config['bday_show'] )
			{
				$template->assign_block_vars('birthdays.upcoming',array());
			}
		}
	}

	$sql = "SELECT aa.forum_id, g.group_id, g.group_name 
		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g 
		WHERE aa.auth_mod = " . TRUE . " 
			AND g.group_single_user = 0 
			AND g.group_type <> " . GROUP_HIDDEN . "
			AND ug.group_id = aa.group_id 
			AND g.group_id = aa.group_id 
		GROUP BY g.group_id, g.group_name, aa.forum_id 
		ORDER BY aa.forum_id, g.group_id";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
	}

	while( $row = $db->sql_fetchrow($result) )
	{
//-- mod : Advanced Group Color Management -------------------------------------
//-- here we added
//	 class="' . $color->get_user_color($row['group_id']) . '"
//-- modify

		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '" class="' . $color->get_user_color($row['group_id']) . '">' . $row['group_name'] . '</a>';
//-- fin mod : Advanced Group Color Management ---------------------------------

	}
	$db->sql_freeresult($result);

	//
	// Find which forums are visible for this user
	//
	$is_auth_ary = array();
	$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

	//
	// Start output of page
	//
	define('SHOW_ONLINE', true);
	$page_title = $lang['Index'];
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//START Remove Cookies
$cookie_link = '<a href="' . append_sid("remove_cookies.$phpEx") . '">' . $lang['Remove_cookies'] . '</a>';
//END Remove Cookies
	$template->set_filenames(array(
		'body' => 'index_body.tpl')
	);
// User Stealth mod - start
if ($board_config['username_hide_inac'] && $userdata['user_level'] == ADMIN)
{
	$fetched_rows = get_db_stat('inactive_total');
}
$username_inac_on = ( $board_config['username_hide_inac'] && $userdata['session_logged_in'] ) ? $lang['Newest_user_winac'] : $lang['Newest_user'];
$non_active = ( $board_config['username_hide_inac'] && $userdata['user_level'] == ADMIN ) ? ( $fetched_rows == 1 ) ? $lang['Non_active_on_index'] : $lang['Non_actives_on_index'] : '';
// User Stealth mod - end


	$template->assign_vars(array(
		'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
// Topics a user has started MOD, By Manipe (Begin)
		'TOTAL_TOPICS' => sprintf($l_total_topic_s, $total_topics),
// Topics a user has started MOD, By Manipe (End)

		'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
//-- mod : Advanced Group Color Management -------------------------------------
//-- delete
//	'NEWEST_USER' => sprintf($username_inac_on, '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">' , $newest_user , '</a>'), 
		'BIRTHDAYS' => $birthdays,
		'UPCOMING' => $upcoming,
//-- add
		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '" class="' . $color->get_user_color($newest_user_group_id, $newest_user_session_time) . '">' , $newest_user , '</a>'), 
//-- fin mod : Advanced Group Color Management ---------------------------------


// User Stealth mod - start (also replaced $lang['Newest_user'] with $username_inac_on on the line above)
		'NON_ACTIVATED_FOR_ADMIN' => sprintf($non_active, '<b>' . $fetched_rows . '</b>', '<a href="' . append_sid("memberlist.$phpEx?mode=inactive") . '" . title="' . $lang['Non_active_explain'] . '". >', $lang['Non_active_link'], '</a>'),
// User Stealth mod - end

		'FORUM_IMG' => $images['forum'],
		'FORUM_NEW_IMG' => $images['forum_new'],
		'FORUM_LOCKED_IMG' => $images['forum_locked'],

		'L_TODAYS_BIRTHDAYS' => $lang['Todays_Birthdays'],
		'L_VIEW_BIRTHDAYS' => $lang['View_Birthdays'],

		'L_FORUM' => $lang['Forum'],

		// Begin Simple Subforums MOD
		'L_SUBFORUMS' => $lang['Subforums'],
		// End Simple Subforums MOD

	
		'L_TOPICS' => $lang['Topics'],
		'L_REPLIES' => $lang['Replies'],
		'L_VIEWS' => $lang['Views'],
		'L_POSTS' => $lang['Posts'],
		'L_LASTPOST' => $lang['Last_Post'], 
		'L_NO_NEW_POSTS' => $lang['No_new_posts'],
		'L_NEW_POSTS' => $lang['New_posts'],
		'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 
		'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 
		'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 

		'L_MODERATOR' => $lang['Moderators'], 
		'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
		'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'], 
	//START Remove Cookies
	'COOKIE_LINK' => $cookie_link,
	//END Remove Cookies
		'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
	);

	//
	// Let's decide which categories we should display
	//
	$display_categories = array();

	for ($i = 0; $i < $total_forums; $i++ )
	{
		if ($is_auth_ary[$forum_data[$i]['forum_id']]['auth_view'])
		{
			$display_categories[$forum_data[$i]['cat_id']] = true;
		}
	}

	//
	// Okay, let's build the index
	//
	for($i = 0; $i < $total_categories; $i++)
	{
		$cat_id = $category_rows[$i]['cat_id'];

		//
		// Yes, we should, so first dump out the category
		// title, then, if appropriate the forum list
		//
		if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
		{
			$template->assign_block_vars('catrow', array(
				'CAT_ID' => $cat_id,
				'CAT_DESC' => $category_rows[$i]['cat_title'],

				// Start Mark Category Read MOD
				'L_MARK_CAT_READ' => $lang['Mark_category_read'],
				'U_MARK_CAT_READ' => append_sid("index.$phpEx?mark=category&" . POST_CAT_URL . "=$cat_id"),
				// End Mark Category Read MOD


				'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
			);

			// Start Mark Category Read MOD
			if ( $userdata['session_logged_in'] )
			{
				$template->assign_block_vars('catrow.switch_user_logged_in', array() );
			}
			// End Mark Category Read MOD



			if ( $viewcat == $cat_id || $viewcat == -1 )
			{
				for($j = 0; $j < $total_forums; $j++)
				{
					if ( $forum_data[$j]['cat_id'] == $cat_id )
					{
						$forum_id = $forum_data[$j]['forum_id'];

						if ( $is_auth_ary[$forum_id]['auth_view'] )
						{
							if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
							{
								$folder_image = $images['forum_locked']; 
								$folder_alt = $lang['Forum_locked'];

								// Begin Simple Subforums MOD
								$unread_topics = false;
								$folder_images = array(
									'default'	=> $folder_image,
									'new'		=> $images['forum_locked'],
									'sub'		=> ( isset($images['forums_locked']) ) ? $images['forums_locked'] : $images['forum_locked'],
									'subnew'	=> ( isset($images['forums_locked']) ) ? $images['forums_locked'] : $images['forum_locked'],
									'subalt'	=> $lang['Forum_locked'],
									'subaltnew'	=> $lang['Forum_locked'],
									);
								// End Simple Subforums MOD


							}
							else
							{
								$unread_topics = false;
								if ( $userdata['session_logged_in'] )
								{
									if ( !empty($new_topic_data[$forum_id]) )
									{
										$forum_last_post_time = 0;

										while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
										{
											if ( empty($tracking_topics[$check_topic_id]) )
											{
												$unread_topics = true;
												$forum_last_post_time = max($check_post_time, $forum_last_post_time);

											}
											else
											{
												if ( $tracking_topics[$check_topic_id] < $check_post_time )
												{
													$unread_topics = true;
													$forum_last_post_time = max($check_post_time, $forum_last_post_time);
												}
											}
										}

										if ( !empty($tracking_forums[$forum_id]) )
										{
											if ( $tracking_forums[$forum_id] > $forum_last_post_time )
											{
												$unread_topics = false;
											}
										}

										if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
										{
											if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
											{
												$unread_topics = false;
											}
										}

									}
								}

								$folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum']; 
								$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts']; 

								// Begin Simple Subforums MOD
								$folder_images = array(
									'default'	=> $folder_image,
									'new'		=> $images['forum_new'],
									'sub'		=> ( isset($images['forums']) ) ? $images['forums'] : $images['forum'],
									'subnew'	=> ( isset($images['forums_new']) ) ? $images['forums_new'] : $images['forum_new'],
									'subalt'	=> $lang['No_new_posts'],
									'subaltnew'	=> $lang['New_posts'],
									);
								// End Simple Subforums MOD


							}

							$posts = $forum_data[$j]['forum_posts'];
							$topics = $forum_data[$j]['forum_topics'];

							if ( $forum_data[$j]['forum_last_post_id'] )
							{
								$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

								$last_post = $last_post_time . '<br />';

//-- mod : Advanced Group Color Management -------------------------------------
//-- delete
//	$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
//-- add
								$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? '<span class="' . $color->get_user_color(GROUP_ANONYMOUS) . '">' . ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) . '</span>' : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '" class="' . $color->get_user_color($forum_data[$j]['user_group_id'], $forum_data[$j]['user_session_time']) . '">' . $forum_data[$j]['username'] . '</a> ';
//-- fin mod : Advanced Group Color Management ---------------------------------

								
								$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

								// Begin Simple Subforums MOD
								$last_post_sub = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . ($unread_topics ? $images['icon_newest_reply'] : $images['icon_latest_reply']) . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
								$last_post_time = $forum_data[$j]['post_time'];
								// End Simple Subforums MOD


							}
							else
							{
								$last_post = $lang['No_Posts'];

								// Begin Simple Subforums MOD
								$last_post_sub = '<img src="' . $images['icon_minipost'] . '" border="0" alt="' . $lang['No_Posts'] . '" title="' . $lang['No_Posts'] . '" />';
								$last_post_time = 0;
								// End Simple Subforums MOD


							}

							if ( count($forum_moderators[$forum_id]) > 0 )
							{
								$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
								$moderator_list = implode(', ', $forum_moderators[$forum_id]);
							}
							else
							{
								$l_moderators = '&nbsp;';
								$moderator_list = '';
							}

							$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
							$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

							$template->assign_block_vars('catrow.forumrow',	array(
								'ROW_COLOR' => '#' . $row_color,
								'ROW_CLASS' => $row_class,
								'FORUM_FOLDER_IMG' => $folder_image, 
								'FORUM_NAME' => $forum_data[$j]['forum_name'],
								'FORUM_DESC' => $forum_data[$j]['forum_desc'],
								'POSTS' => $forum_data[$j]['forum_posts'],
								'TOPICS' => $forum_data[$j]['forum_topics'],
								'LAST_POST' => $last_post,
								'MODERATORS' => $moderator_list,

								'L_MODERATOR' => $l_moderators, 
								'L_FORUM_FOLDER_ALT' => $folder_alt, 

								// Begin Simple Subforums MOD
								'FORUM_FOLDERS' => serialize($folder_images),
								'HAS_SUBFORUMS' => 0,
								'PARENT' => $forum_data[$j]['forum_parent'],
								'ID' => $forum_data[$j]['forum_id'],
								'UNREAD' => intval($unread_topics),
								'TOTAL_UNREAD' => intval($unread_topics),
								'TOTAL_POSTS' => $forum_data[$j]['forum_posts'],
								'TOTAL_TOPICS' => $forum_data[$j]['forum_topics'],
								'LAST_POST_FORUM' => $last_post,
								'LAST_POST_TIME' => $last_post_time,
								'LAST_POST_TIME_FORUM' => $last_post_time,
								// End Simple Subforums MOD



								'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
							);

							// Begin Simple Subforums MOD
							if( $forum_data[$j]['forum_parent'] )
							{
								$subforums_list[] = array(
									'forum_data'	=> $forum_data[$j],
									'folder_image'	=> $folder_image,
									'last_post'		=> $last_post,
									'last_post_sub'	=> $last_post_sub,
									'moderator_list'	=> $moderator_list,
									'unread_topics'	=> $unread_topics,
									'l_moderators'	=> $l_moderators,
									'folder_alt'	=> $folder_alt,
									'last_post_time'	=> $last_post_time,
									'desc'			=> $forum_data[$j]['forum_desc'],
									);
							}
							// End Simple Subforums MOD


						}
					}
				}
			}
		}
	} // for ... categories

}// if ... total_categories
else
{
	message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

//
// Begin USERS ONLINE TODAY
// http://russ.isitaboat.co.uk/
//  
$uot_this_timestamp_array = getdate();
$uot_when_from = mktime ( 0 , 0 , 0 , $uot_this_timestamp_array[mon] , $uot_this_timestamp_array[mday] , $uot_this_timestamp_array[year] );



$sql =  "SELECT count(*) cnt
	FROM ".USERS_TABLE." u
	WHERE u.user_session_time >= ". $uot_when_from . "
	ORDER BY u.username ASC";
if ( !($uot_result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
}

$row = $db->sql_fetchrow($uot_result);
$uot_count = $row['cnt'];



$sql =  "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, user_session_time
	FROM ".USERS_TABLE." u
	WHERE u.user_session_time >= ". $uot_when_from . "
	ORDER BY u.username ASC";
if ( !($uot_result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
}




$users_online_today=array();

$uot_hidden_count = 0;

while ( $row = $db->sql_fetchrow($uot_result) )
{
	//counter stuff
	$$which_counter++;
	$row_color = ( $$which_counter % 2 ) ? $theme['td_color1'] : $theme['td_color2'];
	$row_class = ( $$which_counter % 2 ) ? $theme['td_class1'] : $theme['td_class2'];
		
	//generate the user name (robbed from the code above)
	$uot_user_id = $row['user_id'];
	
	//reset the style...
	$uot_style = '';

	if ( $uot_user_id != $prev_user )
	{
		$uot_username_plain = $uot_username = $row['username'];

		if ( $row['user_level'] == ADMIN )
		{
			$uot_style = 'style="color:#' . $theme['fontcolor3'] . ';"';
			$uot_username = '<b>' . $uot_username . '</b>';
		}
		else if ( $row['user_level'] == MOD )
		{
			$uot_style = 'style="color:#' . $theme['fontcolor2'] . ';"';
			$uot_username = '<b>' . $uot_username . '</b>';
		}

		if ( !$row['user_allow_viewonline'] )
		{
			$uot_hidden_count++;
			$view_online = ( $userdata['user_level'] == ADMIN ) ? true : false;
			$uot_username = $lang['UOT_hidden_start'] . $uot_username . $lang['UOT_hidden_end'];
		}
		else
		{
			$view_online = true;
		}

	}

	//annon does not have a profile...
	if($row['user_id']>0){
		$uot_username = sprintf('<a href="profile.php?mode=viewprofile&u=%d" title="%s was last here at: %s" %s>%s</a>',$uot_user_id,$uot_username_plain,create_date('g:ia', $row['user_session_time'], $board_config['board_timezone']),$uot_style,$uot_username);
	}
	
	//this will show just the user's name, with the time in the tool tip.
	if($view_online)
	{
		array_push($users_online_today,$uot_username);
	}

}

if(count($users_online_today)==0){
	array_push($users_online_today,$lang['UOT_none']);
}

if( $userdata['user_level'] == ADMIN && $uot_hidden_count>0){
	array_push($users_online_today,sprintf($lang['UOT_hidden'], $uot_hidden_count));
}


$template->assign_vars(array(
	'UOT_TITLE' => $lang['UOT_title'],
	'UOT_COUNT' => $uot_count,
	'UOT_LIST' => implode(", ",$users_online_today)
	)
);
//end of UOT



// Begin Simple Subforums MOD
unset($data);
unset($item);
unset($cat_item);
unset($row_item);
for( $i = 0; $i < count($subforums_list); $i++ )
{
	$forum_data = $subforums_list[$i]['forum_data'];
	$parent_id = $forum_data['forum_parent'];
	
	// Find parent item
	if( isset($template->_tpldata['catrow.']) )
	{
		$data = &$template->_tpldata['catrow.'];
		$count = count($data);
		for( $j = 0; $j < $count; $j++)
		{
			$cat_item = &$data[$j];
			$row_item = &$cat_item['forumrow.'];
			$count2 = count($row_item);
			for( $k = 0; $k < $count2; $k++)
			{
				if( $row_item[$k]['ID'] == $parent_id )
				{
					$item = &$row_item[$k];
					break;
				}
			}
			if( isset($item) )
			{
				break;
			}
		}
	}
	
	if( isset($item) )
	{
		if( isset($item['sub.']) )
		{
			$num = count($item['sub.']);
			$data = &$item['sub.'];
		}
		else
		{
			$num = 0;
			$item[] = 'sub.';
			$data = &$item['sub.'];
		}
		
		// Append new entry
		$data[] = array(
			'NUM' => $num,
			'FORUM_FOLDER_IMG' => $subforums_list[$i]['folder_image'], 
			'FORUM_NAME' => $forum_data['forum_name'],
			'FORUM_DESC' => $forum_data['forum_desc'],
			'FORUM_DESC_HTML' => htmlspecialchars(preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $forum_data['forum_desc'])),
			'POSTS' => $forum_data['forum_posts'],
			'TOPICS' => $forum_data['forum_topics'],
			'LAST_POST' => $subforums_list[$i]['last_post'],
			'LAST_POST_SUB' => $subforums_list[$i]['last_post_sub'],
			'LAST_TOPIC' => $forum_data['topic_title'],
			'MODERATORS' => $subforums_list[$i]['moderator_list'],
			'PARENT' => $forum_data['forum_parent'],
			'ID' => $forum_data['forum_id'],
			'UNREAD' => intval($subforums_list[$i]['unread_topics']),
	
			'L_MODERATOR' => $subforums_list[$i]['l_moderators'], 
			'L_FORUM_FOLDER_ALT' => $subforums_list[$i]['folder_alt'], 
	
			'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_data['forum_id'])
		);
		$item['HAS_SUBFORUMS'] ++;
		$item['TOTAL_UNREAD'] += intval($subforums_list[$i]['unread_topics']);
		// Change folder image
		$images = unserialize($item['FORUM_FOLDERS']);
		$item['FORUM_FOLDER_IMG'] = $item['TOTAL_UNREAD'] ? $images['subnew'] : $images['sub'];
		$item['L_FORUM_FOLDER_ALT'] = $item['TOTAL_UNREAD'] ? $images['subaltnew'] : $images['subalt'];
		// Check last post
		if( $item['LAST_POST_TIME'] < $subforums_list[$i]['last_post_time'] )
		{
			$item['LAST_POST'] = $subforums_list[$i]['last_post'];
			$item['LAST_POST_TIME'] = $subforums_list[$i]['last_post_time'];
		}
		if( !$item['LAST_POST_TIME_FORUM'] )
		{
			$item['LAST_POST_FORUM'] = $item['LAST_POST'];
		}
		// Add topics/posts
		$item['TOTAL_POSTS'] += $forum_data['forum_posts'];
		$item['TOTAL_TOPICS'] += $forum_data['forum_topics'];
	}
	unset($item);
	unset($data);
	unset($cat_item);
	unset($row_item);
}
// End Simple Subforums MOD



//-- mod : Advanced Group Color Management -------------------------------------
//-- add
//
// Display Legend
//
$color->display_legend();
//-- fin mod : Advanced Group Color Management ---------------------------------

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>

file: index_body.tpl

Code: Select all

<!-- start : mod LoginBoxAtOverallHeader by maxJackal -->
<!-- BEGIN switch_user_logged_out -->
<table width="25%" cellspacing="0" cellpadding="0" border="0" align="left">
	<tr>
		<form method="post" action="{S_LOGIN_ACTION}">		
		<td align="center" width="100%" nowrap="nowrap">
			<table cellspacing="0" cellpadding="2" border="0" width="100%" class="bodyline"><tr><td align="right" nowrap="nowrap">
			&nbsp;&nbsp;<span class="gensmall"><b>{L_USERNAME}:</b> 
			<input class="post" type="text" name="username" size="10" />
			&nbsp;&nbsp;&nbsp;<b>{L_PASSWORD}:</b> 
			<input class="post" type="password" name="password" size="10" maxlength="32" />&nbsp;&nbsp;&nbsp;<BR />
			&nbsp;&nbsp; &nbsp;&nbsp;<b>{L_AUTO_LOGIN}</b> 
			<input class="text" type="checkbox" name="autologin" value="ON" />
			&nbsp;&nbsp;&nbsp;
			<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></span>&nbsp;&nbsp;</td></tr></table>
		</td>
		</form>
	</tr>
</table><BR /><BR /><BR />
<!-- END switch_user_logged_out -->
<!-- end : mod LoginBoxAtOverallHeader by maxJackal -->

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">
	<!-- BEGIN switch_user_logged_in -->
	{LAST_VISIT_DATE}<br />
	<!-- END switch_user_logged_in -->
	{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
	<td align="right" valign="bottom" class="gensmall">
		<!-- BEGIN switch_user_logged_in -->
		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
		<a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a><br />
		<a href="{U_SEARCH_WATCHED}" class="gensmall">{L_SEARCH_WATCHED}</a><br />
		<!-- END switch_user_logged_in -->
		<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
	<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
  </tr>
  <!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a>&nbsp;<!-- BEGIN switch_user_logged_in --><a href="{catrow.U_MARK_CAT_READ}" class="gensmall">[{catrow.L_MARK_CAT_READ}]</a><!-- END switch_user_logged_in --></span></td>
	<td class="rowpic" colspan="3" align="right">&nbsp;</td>
  </tr>
  <!-- BEGIN forumrow -->
  <!-- IF ! forumrow.PARENT -->


  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
	  </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
<!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
	  <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
	  <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
	</td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOTAL_TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOTAL_POSTS}</span></td>


	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
  </tr>
  <!-- ENDIF -->


  <!-- END forumrow -->
  <!-- END catrow -->
</table>

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
  <tr> 
 	<td align="left">
 	<span class="gensmall">{COOKIE_LINK}&nbsp;|&nbsp;<a href="{U_STAFF}" class="gensmall">The team</a>&nbsp;</span>
 	</td>
	<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
  </tr>
</table>
<BR />
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <tr> 
	<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="4"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
	<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}{TOTAL_TOPICS}<br />{TOTAL_USERS}{NON_ACTIVATED_FOR_ADMIN}<br />{NEWEST_USER}</span>
	</td>
  </tr>
  <tr> 
	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>

  </tr>

<tr>
		<td class="row1" align="left">
			<b class="gensmall">{L_GROUP_LEGEND} 
			<!-- BEGIN legend -->
			<!-- BEGIN color -->
			<a href="{legend.U_GROUP}" title="{legend.GROUP_DESCRIPTION}" class="{legend.GROUP_COLOR}">{legend.GROUP_NAME}</a>{legend.color.L_COMMA}
			<!-- END color -->
			<!-- END legend -->
			</b>
		</td>
	</tr>
</table>

<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
	<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
  <tr> 
	<td class="catHead" colspan="2" height="28"><span class="cattitle">{UOT_TITLE}: </span></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/top_users.gif" alt="{UOT_TITLE}" /></td>
	<td class="row1" align="left" width="100%"><span class="gensmall">{UOT_COUNT}</b> {UOT_TITLE}:&nbsp;{UOT_LIST}&nbsp;</span></td>
  </tr>
</table>
<br clear="all" />
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <!-- BEGIN birthdays -->
  <tr> 
	<td class="catHead" colspan="2" height="28"><span class="cattitle">{L_TODAYS_BIRTHDAYS}</span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle"><img src="templates/subSilver/images/icon_birthday.gif" alt="{L_VIEW_BIRTHDAYS}" /></td>
	<td class="row1" align="left" width="100%">
	  <span class="gensmall">{BIRTHDAYS}
	  <!-- BEGIN upcoming -->
	  <br />{UPCOMING}
	  <!-- END upcoming -->
	  </span>
	</td>
  </tr>
  <!-- END birthdays -->
</table>

<!-- BEGIN switch_user_logged_out -->
<!-- deleted : mod LoginBoxAtOverallHeader by maxJackal 

<form method="post" action="{S_LOGIN_ACTION}">
  <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
	<tr> 
	  <td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
	</tr>
	<tr> 
	  <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: 
		<input class="post" type="text" name="username" size="10" />
		&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
		<input class="post" type="password" name="password" size="10" maxlength="32" />
		<!-- BEGIN switch_allow_autologin -->
		&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
		<input class="text" type="checkbox" name="autologin" checked="checked" />

		<!-- END switch_allow_autologin -->
		&nbsp;&nbsp;&nbsp; 
		<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
		</span> </td>
	</tr>
  </table>
</form>
 end mod: LoginBoxAtOverallHeader --> 

<!-- END switch_user_logged_out -->

<br clear="all" />

<table cellspacing="3" border="0" align="center" cellpadding="0">
  <tr> 
	<td width="20" align="center"><img src="templates/subSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
	<td><span class="gensmall">{L_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/subSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
	<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/subSilver/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
	<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
  </tr>
</table>
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
User avatar
Prosk8er
Registered User
Posts: 1744
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: Birthdays

Post by Prosk8er »

TerraFrost wrote: Here's the solution to bprsk8r4272's problem


thanks again for fixing that
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Birthdays

Post by TerraFrost »

bonelifer - thanks - that helps!

Since I don't really want to install the AGCM Mod / Birthdays Mod on my own testboard, right now, would you be willing to provide me with a temp. FTP account? I think you may have done so, once before, but I can't remember for sure...
grchaos
Registered User
Posts: 4
Joined: Tue Mar 06, 2007 5:34 pm

Re:

Post by grchaos »

TerraFrost wrote:
I just installed the birthday 3.0.0 mod, and it works great except the pm option is not available.

That's what it's supposed to do. The PM option, in it's current capacity, is acting as a place holder for either I or someone else to implement at a later date.


Oh, okay. Thanks. :) It works perfectly then. ;)
rgponce
Registered User
Posts: 11
Joined: Thu Feb 22, 2007 12:50 am

Re:

Post by rgponce »

TerraFrost wrote:
rgponce wrote: hi, i'm brazilian and have a poor english, so sorry if you don't understand something.
i installed birthdays v2.0.1 and my acp was gone, disapear, i reinstall and have the same problem.
after this, i installed the v2.0.2, but i still can't see my control panel.
someone, please help me. i don't know what do to fix this problem and don't have a back up.

-------------------edit------------------------------
when i change my language to english, i could see the acp.

You should have a lang_admin.php file for brazilian. Can you copy / rename this to *.txt and post the link?

hi, this is the url link to brazilian lang_admin.txt:
http://www.quadrinhos.orgfree.com/forum ... _admin.txt
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: Birthdays

Post by bonelifer »

TerraFrost wrote: bonelifer - thanks - that helps!

Since I don't really want to install the AGCM Mod / Birthdays Mod on my own testboard, right now, would you be willing to provide me with a temp. FTP account? I think you may have done so, once before, but I can't remember for sure...



Nevermind, I figured out I hadn't added the OPEN action in the mod file and I was using Easymod. That and I had changed the $color variable(as per the AGCM site) in order to make the mods co-exist(totally forgot about that). Works nicely. That and now maybe I can use the changes to figure out what to do for the UOT mod.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Birthdays

Post by TerraFrost »

bonelifer - glad to hear that it's now working! :)

rpgonce - from your lang_admin.php file:

Code: Select all

$lang['bday_require_explain'] = 'O ano de nascimento será exigido somente se " Exigir data do Aniversário'" for selecionado';
replace that with this:

Code: Select all

$lang['bday_require_explain'] = 'O ano de nascimento será exigido somente se " Exigir data do Aniversário\'" for selecionado';
Did you write that translation, yourself, or did you download it from my website? If the latter, let me know, and I'll update the translation thing (I don't actively test translations...)
User avatar
alh31
Registered User
Posts: 72
Joined: Fri May 05, 2006 4:21 pm

Re: Birthdays

Post by alh31 »

I need help with the following please in memberlist_body.tpl:
#-----[ FIND ]------------------------------------------
#
<td class="catBottom" colspan="{%:1}" height="28">&nbsp;</td>
#
#-----[ INCREMENT ]-------------------------------------
#
%:1
#


Mine says:
<td class="catBottom" colspan="{NUM_COLUMNS}" height="28">&nbsp;</td>


I'm not sure what to do. Also, ages are not showing up in the Memberlist or users View Profile.
I have the Age column in Memberlist, but no ages show. I don't see anything in View Profile, but not sure if there should be anything there.

Also, can you also tell me where the option to email the birthday greeting shows up and if there is a way to show the date instead of the age on the index?

Thanks!
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Birthdays

Post by TerraFrost »

The problem, ultimately, is a MOD conflict. This MOD and some other MOD you've installed do not work well, together.

So... what MOD added the {NUM_COLUMNS} thing?

Regardless of what MOD added it, I'm currently using my testboard for something else. As such, if you want me to resolve this incompatibility, you'll have to provide me, via PM, with a temp. FTP account.
User avatar
alh31
Registered User
Posts: 72
Joined: Fri May 05, 2006 4:21 pm

Re: Birthdays

Post by alh31 »

I think it is probably cash mod, but I have decided just to elimate the age display there anyway.

How can I have the date show up instead of the age on the index page? It that possible?
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Birthdays

Post by TerraFrost »

alh31 wrote: How can I have the date show up instead of the age on the index page? It that possible?

Check out dob_index.txt in birthdays_mods.zip. It displays the age and the date, but it won't take much for you to remove the age part.
User avatar
alh31
Registered User
Posts: 72
Joined: Fri May 05, 2006 4:21 pm

Re: Birthdays

Post by alh31 »

Perfect! Thanks!
sharonspsp
Registered User
Posts: 8
Joined: Wed Jan 24, 2007 7:17 pm

Re: Birthdays

Post by sharonspsp »

I am sort of new to all of these mods but since I've done database development and maintenance for a few years, I have an understanding of editing and testing code.

So, I downloaded this birthday mod and notice there are a ton files. We dont use mail at our forum, so I dont think I would be installing that piece.

I just want to add the birthday line in the profile and be able to show it in the who's online area. Do i really need perform all of these updates from the birthday mod zip file?

Thanks
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Re: Birthdays

Post by TerraFrost »

sharonspsp wrote: I am sort of new to all of these mods but since I've done database development and maintenance for a few years, I have an understanding of editing and testing code.

So, I downloaded this birthday mod and notice there are a ton files. We dont use mail at our forum, so I dont think I would be installing that piece.

I just want to add the birthday line in the profile and be able to show it in the who's online area. Do i really need perform all of these updates from the birthday mod zip file?

That's about all 2.0.2 does.

For 3.0.0... well, 3.0.0 does quite a bit more than just mail. It adds info to the memberlist, and to viewtopic.php, among other things.

That said, you should install with EasyMOD - it'll take a lot less time, regardless of which version you decide to install :)
Post Reply

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