Esempio n. 1
0
// get the forum row
//
// Check if the user has actually sent a forum ID with his/her request
// If not give them a nice error page.
//

$forum_row = $tree['data'][$tree['keys'][POST_FORUM_URL . $forum_id]];
if (empty($forum_row))
{
	if (!defined('STATUS_404')) define('STATUS_404', true);
	message_die(GENERAL_MESSAGE, 'NO_FORUM');
}

$meta_content = array();
$meta_content = $class_topics->meta_content_init($forum_row, 'forum');
$meta_content['forum_id'] = $forum_id;

// handle forum link type
$selected_id = POST_FORUM_URL . $forum_id;
$CH_this = isset($tree['keys'][$selected_id]) ? $tree['keys'][$selected_id] : -1;
if (($CH_this > -1) && !empty($tree['data'][$CH_this]['forum_link']))
{
	// add 1 to hit if count ativated
	if ($tree['data'][$CH_this]['forum_link_hit_count'])
	{
		$sql = "UPDATE " . FORUMS_TABLE . "
					SET forum_link_hit = forum_link_hit + 1
					WHERE forum_id = $forum_id";
		$result = $db->sql_query($sql);
		cache_tree(true);
Esempio n. 2
0
switch ($forum_topic_data['user_gender'])
{
	case 1:
		$topic_user_gender_image = '<img src="' . $images['icon_minigender_male'] . '" alt="' . $lang['Gender'].  ': ' . $lang['Male'] . '" title="' . $lang['Gender'] . ': ' . $lang['Male'] . '" />';
		break;
	case 2:
		$topic_user_gender_image = '<img src="' . $images['icon_minigender_female'] . '" alt="' . $lang['Gender']. ': ' . $lang['Female'] . '" title="' . $lang['Gender'] . ': ' . $lang['Female'] . '" />';
		break;
	default:
		$topic_user_gender_image = '';
}
$topic_user_joined = create_date($lang['JOINED_DATE_FORMAT'], $forum_topic_data['user_regdate'], $config['board_timezone']);
$topic_user_posts = $forum_topic_data['user_posts'];

$meta_content = array();
$meta_content = $class_topics->meta_content_init($forum_topic_data, 'topic');
$meta_content['post_id'] = (!empty($post_id) && (intval($post_id) > 0)) ? intval($post_id) : 0;

$this_forum_auth_read = intval($forum_topic_data['auth_read']);

if ($forum_topic_data['forum_kb_mode'])
{
	if ($kb_mode_var == 'off')
	{
		$kb_mode = false;
		$kb_mode_append = '&amp;kb=off';
		$kb_mode_append_red = '&kb=off';
	}
	else
	{
		$kb_mode = true;