User profile cp not working!!

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
albosky
Registered User
Posts: 463
Joined: Sun Apr 09, 2006 7:13 pm

Post by albosky »

the code above is the body of the portal page , not the included header template , as i dont know the portal script , I dont know what header is being included

most likely , its overall_header.tpl , worth checking
CoRuP7ioN
Registered User
Posts: 215
Joined: Thu Jul 21, 2005 6:58 am

Post by CoRuP7ioN »

Code: Select all

<?php
/***************************************************************************
 *                                portal.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : ---- NA -----
 *
 *   $Id: index.php,v 1.99 2002/03/31 13:58:01 d-ArkAngel 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');
$portal_file_name = 'portal.'.$phpEx;
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
define('SHOW_ONLINE', 1);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_nutport.' . $phpEx);

//
// End session management
//


if(!isset($board_config['nutport_installed']) )
{
	message_die(GENERAL_MESSAGE, "You didn't install NutPort yet!<br /> Click <a href=\"" . "./admin/admin_portal." . $phpEx . '?sid=' . $userdata['session_id'] . "\">here</a> to install now", "Nutport Not installed");
}

if ( isset($HTTP_GET_VARS['page']) )
{
	$page_id = intval($HTTP_GET_VARS['page']);
}
else
{
	$sql = "SELECT portal_id FROM " . PORTAL_TABLE . " ORDER BY portal_order ASC LIMIT 1";

	if( !$result = $db->sql_query($sql) )
	{
	   message_die(GENERAL_ERROR, "Couldn't obtain portal information", "", __LINE__, __FILE__, $sql);
	}

	if( $row = $db->sql_fetchrow($result) )
	{
		$page_id = $row['portal_id'] ;
	}
	else
	{
		message_die(GENERAL_MESSAGE, "Sorry there are no pages defined in nutport admin", "", __FILE__, __LINE__);
	}
}

//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);

//
// If you don't use these stats on your portal 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'];

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 output of page
//
$page_title = $lang['Home_Header'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
	'body' => 'portal_body.tpl')
);

$user_avatar = '';
if ( $userdata['user_avatar_type'] && $userdata['session_logged_in'] && $userdata['user_allowavatar'] )
{
	switch( $userdata['user_avatar_type'] )
	{
		case USER_AVATAR_UPLOAD:
			$user_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_REMOTE:
			$user_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_GALLERY:
			$user_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
	}
}

$template->assign_vars(array(
	'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
	'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
	'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 
	'USER_AVATAR' => ( $userdata['user_avatar'] && $userdata['user_allowavatar']) ? '<div align="center">' . $user_avatar . '</div><br />' : '',
	'USERNAME' => $userdata['username'],

	'L_FORUM' => $lang['Forum'],
	'L_TOPICS' => $lang['Topics'],
	'L_REPLY' => $lang['Nutport_Reply'],
	'L_REPLIES' => $lang['Nutport_Replys'],
	'L_REMEMBERME' => $lang['Nutport_autologin'],
	'L_VIEWS' => $lang['Views'],
	'L_POSTS' => $lang['Posts'],
	'L_AUTHOR' => $lang['Author'],
	'L_WELCOME' => $lang['Nutport_WelcomeBack'],
	'L_LASTPOST' => $lang['Last_Post'],
	'L_COMMENTS' => $lang['Nutport_Comments'],
	'L_POLL' => $lang['Nutport_Poll'],
	'L_NAVIGATE' => $lang['Nutport_Navigate'],
	'L_ARCHIVE' => $lang['Nutport_Complete_archive'],
	'L_LATEST_POSTS' => $lang['Nutport_Latest_posts'],
	'L_BY' => $lang['Nutport_By'],
	'L_IN' => $lang['Nutport_In'],
	'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_POSTED_AT' => $lang['Nutport_Posted_at'],

	'L_MODERATOR' => $lang['Moderators'], 
	'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
	'L_MARK_FORUMS_READ' => $lang['Mark_all_forums']
	)
);

//
// Display the nav bar and the page description
//

$sql = "SELECT n.* 
	FROM " . PORTAL_TABLE . " n
	ORDER BY n.portal_order ASC " ;

if( !$result = $db->sql_query($sql) )
{
   message_die(GENERAL_ERROR, "Couldn't obtain navigation information", "", __LINE__, __FILE__, $sql);
}

$total_nav = 0;
while( $row = $db->sql_fetchrow($result) )
{
	$portal_rowset[] = $row;
	$total_nav++;
}

$db->sql_freeresult($result);


//
// Okay, lets dump out the page ...
//
if( $total_nav )
{
	$display_navbar = 0 ;
	$display_login = 0 ;
	$display_online = 0 ;
	$display_latest = '' ;
	$display_poll = 0 ;

	$no_date = 0 ;
	$sort_asc = 0 ;
	$list_limit = 0 ;

	$page_found = false;


	$sql = "SELECT *
		FROM " . THEMES_TABLE . "
		WHERE themes_id = " . (isset($userdata['user_style']) ? $userdata['user_style'] : $board_config['default_style']);
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(CRITICAL_ERROR, 'Could not query database for theme info');
	}

	if ( !($row = $db->sql_fetchrow($result)) )
	{
		message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
	}

	$template_path = 'templates/' ;
	$template_name = $row['template_name'] ;

	$portal_image_path = $phpbb_root_path . $template_path . $template_name . '/images/lang_' . (isset($userdata['user_lang']) ? $userdata['user_lang'] : $board_config['default_lang']) . '/portal/' ;

	// get the nav bar info
	for($i = 0; $i < $total_nav; $i++)
	{
		$portal_id = $portal_rowset[$i]['portal_id'] ;
		$portal_url = append_sid("$portal_file_name?page=$portal_id");
		if ($portal_rowset[$i]['portal_use_url'] == 1)
		{
			$portal_url = $portal_rowset[$i]['portal_url'] ;
		}
		$portal_button_name = $portal_rowset[$i]['portal_button_name'] ;
		$portal_button_image = $portal_rowset[$i]['portal_button_image'];
		if ( $portal_rowset[$i]['portal_id'] == $page_id)
		{
			$page_found = true;
			$portal_button_image = preg_replace("/^(.*)\.(jpe?g|png|gif)/i", "\$1_selected.\$2", $portal_rowset[$i]['portal_button_image']);
			$page_forum = $portal_rowset[$i]['portal_forum'] ;
			$display_navbar = $portal_rowset[$i]['portal_navbar'] ;
			$display_login = $portal_rowset[$i]['portal_login'] ;
			$display_online = $portal_rowset[$i]['portal_online'] ;
			$display_latest = $portal_rowset[$i]['portal_latest'] ;
			$display_poll = $portal_rowset[$i]['portal_poll'] ;
			$no_date = $portal_rowset[$i]['portal_nodate'] ;
			$sort_asc = $portal_rowset[$i]['portal_ascending'] ;
			$list_limit = $portal_rowset[$i]['portal_list_limit'] ;

			$message = $portal_rowset[$i]['portal_description'] ;
			$bbcode_uid = $portal_rowset[$i]['portal_bbcode_id'] ;
			$message = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $message);
			$message = bbencode_second_pass($message, $bbcode_uid) ;
			$message = make_clickable($message);
			if( count($orig_word) )
			{
				$message = preg_replace($orig_word, $replacement_word, $message);
			}
			$message = smilies_pass($message);
			$message = str_replace("\n", "\n<br />\n", $message);


			$template->assign_block_vars("pagedesc", array(
				"PAGE_TITLE" => $portal_rowset[$i]['portal_title'],
				"PAGE_HEADER" => $message)
			);
		}

		if ($portal_rowset[$i]['portal_button_image'] != "")
		{
			$portal_button_image = $portal_image_path . $portal_button_image;
			$portal_button_name = '<IMG SRC="' . $portal_button_image . '" BORDER=0>';
		}

		$template->assign_block_vars("navrow", array(
			"NAV_IMG" => $portal_button_image,
			"NAV_ALT" => $portal_button_name,

			"U_NAVIGATE" => $portal_url)
		);
	}
}
else
{
	message_die(GENERAL_MESSAGE, "Sorry there are no pages defined in nutport admin", "", __FILE__, __LINE__);
}

if(!$page_found)
{
	message_die(GENERAL_MESSAGE, "The page you have selected is not valid", "", __FILE__, __LINE__);
}

//
// Archive forum
//
$template->assign_vars(array(
	'U_ARCHIVE' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$page_forum"))
);

if ($display_navbar)
{
	$template->set_filenames(array(
		"index_links" => "portal_navbar.tpl")
	);
	$template->assign_var_from_handle("INDEX_LINKS", "index_links");

	$template->assign_block_vars("displaynavbar", array() );
}

//
// display log in/out info
//
if ($display_login)
{
	if ( !$userdata['session_logged_in'] )
	{
		$template->assign_block_vars('displaylogin_user_logged_out', array());
	}
	else
	{
		$template->assign_block_vars('displaylogin_user_logged_in', array());
	}
}

//
// Display who's online
//
if ($display_online)
{
	$template->assign_block_vars("displayonline", array() );
}

//
// Display archive link for news
//
if ($list_limit > 0)
{
	$template->assign_block_vars("displayarchive", array() );
}

//
// Display the news!
//
	
$sql = "SELECT t.*, u.username, u.user_id, p.*, x.*
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " x 
	WHERE t.forum_id = $page_forum 
		AND t.topic_poster = u.user_id
		AND p.post_id = t.topic_first_post_id
		AND x.post_id = t.topic_first_post_id" ;

$sql = ($sort_asc) ? $sql . " ORDER BY t.topic_time ASC" : $sql . " ORDER BY t.topic_time DESC" ;
$sql = ($list_limit) ? $sql . " LIMIT 0, $list_limit" : $sql ;

if( !$result = $db->sql_query($sql) )
{
   message_die(GENERAL_ERROR, "Couldn't obtain news information", "", __LINE__, __FILE__, $sql);
}

$total_topics = 0;
while( $row = $db->sql_fetchrow($result) )
{
	$topic_rowset[] = $row;
	$total_topics++;
}
$db->sql_freeresult($result);


//
// Okay, lets dump out the news ...
//
if( $total_topics > 0 )
{
	for($i = 0; $i < $total_topics; $i++)
	{
		$topic_id = $topic_rowset[$i]['topic_id'];

		$post_subject = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];

		$replies = $topic_rowset[$i]['topic_replies'];

		$topic_poster = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']) . '">' : '';
		$topic_poster .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != "" ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
		$topic_poster .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

		$topic_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);

		$views = $topic_rowset[$i]['topic_views'];
		$bbcode_uid = $topic_rowset[$i]['bbcode_uid'];


		//
		// Format the message
		//
		$message = $topic_rowset[$i]['post_text'];

		if( ( !$board_config['allow_html'] ) && ( $topic_rowset[$i]['enable_html'] ))
		{
			$message = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $message);
		}

		if( ( $board_config['allow_bbcode']) && ( $bbcode_uid != "" ))
		{
			$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $message);
		}

		$message = make_clickable($message);


		//
		// Replace naughty words
		//
		if( count($orig_word) )
		{
			$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
			$message = preg_replace($orig_word, $replacement_word, $message);
		}

		//
		// Parse smilies
		//
		if( $board_config['allow_smilies'] )
		{
			if( $topic_rowset[$i]['enable_smilies'] )
			{
				$message = smilies_pass($message);
			}
		}

		//
		// Replace newlines
		//
		$message = str_replace("\n", "\n<br />\n", $message);

		$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
		$reply_topic_url = append_sid("posting.$phpEx?mode=reply&" . POST_TOPIC_URL . "=$topic_id");

		$template->assign_block_vars("topicrow", array(
			"FORUM_ID" => $forum_id,
			"TOPIC_ID" => $topic_id,
			"TOPIC_POSTER" => $topic_poster,
			"TOPIC_TIME" => ($no_date) ? '' : $topic_time ,
			"TOPIC_ALIGN" => ($no_date) ? 'center' : 'left',
			"REPLIES" => $replies,
			"TOPIC_TITLE" => $post_subject,
			"VIEWS" => $views,
			"POST_TEXT" => $message,

			"U_VIEW_TOPIC" => $view_topic_url,
			"U_REPLY_TOPIC" => $reply_topic_url
			
		));
	}
	if($total_topics == $list_limit)
	{
		$template->assign_block_vars("showarchive", array() );
	}
}
else
{
	//
	// No topics
	//
	$template->assign_block_vars("notopicsrow", array("L_NO_TOPICS" => $lang['Nutport_No_articles']) );
}

///
///
/// Display the latest posts
///
///

if ($display_latest != '')
{
	$template->assign_block_vars('displaylatest', array());

	$sql = "SELECT t.*, u.username, u.user_id, p.*, f.forum_name
		FROM ((( " . TOPICS_TABLE . " t
			LEFT JOIN " . POSTS_TABLE . " p ON t.topic_last_post_id = p.post_id )
			LEFT JOIN " . USERS_TABLE . " u ON p.poster_id = u.user_id )
			LEFT JOIN " . FORUMS_TABLE . " f ON t.forum_id = f.forum_id )
				WHERE t.forum_id in ($display_latest)
					ORDER BY p.post_time DESC";

	if( !$result = $db->sql_query($sql) )
	{
	   message_die(GENERAL_ERROR, "Couldn't obtain news information", "", __LINE__, __FILE__, $sql);
	}

	$is_auth_ary = array();
	$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata);

	$total_topics = 0;
	while( $total_topics < 30 && $row = $db->sql_fetchrow($result) )
	{
		if ( $is_auth_ary[$row['forum_id']]['auth_read'] )
		{
			$last_rowset[] = $row;
			$total_topics++;
		}
	}
	$db->sql_freeresult($result);

	//
	// Okay, lets dump out the latest posts ...
	//
	if( $total_topics )
	{
		for($i = 0; $i < $total_topics; $i++)
		{
			$topic_id = $last_rowset[$i]['topic_id'];
			$post_id = $last_rowset[$i]['post_id'];

			$post_subject = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $last_rowset[$i]['topic_title']) : $last_rowset[$i]['topic_title'];
			
			$forum_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $last_rowset[$i]['forum_name']) : $last_rowset[$i]['forum_name'];
			$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $last_rowset[$i]['forum_id']);

			$last_post_time = create_date($board_config['default_dateformat'], $last_rowset[$i]['post_time'], $board_config['board_timezone']);

			$last_post = $last_post_time ;

			$poster_username = ( $last_rowset[$i]['user_id'] == ANONYMOUS ) ? ( ($last_rowset[$i]['username'] != "" ) ? $last_rowset[$i]['username'] . ' ' : $lang['Guest'] . ' ' ) : '<a class="gensmall" href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "="  . $last_rowset[$i]['user_id']) . '">' . $last_rowset[$i]['username'] . '</a> ';

			$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id");

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

			$template->assign_block_vars("lasttopicrow", array(
				"FORUM_ID" => $forum_id,
				"TOPIC_ID" => $topic_id,
				"POST_USERNAME" => $poster_username,
				"POST_TIME" => $last_post_time,
				"TOPIC_TITLE" => $post_subject,
				"FORUM_TITLE" => $forum_title,
				"FORUM_URL" => $forum_url,

				"ROW_COLOR" => $row_color,
				"ROW_CLASS" => $row_class,

				"U_VIEW_TOPIC" => $view_topic_url)
			);
		}
	}
	else
	{
		//
		// No topics
		//
		$template->assign_block_vars("lastnotopicsrow", array("L_NO_TOPICS" => $lang['Nutport_No_latest_posts']) );
	}
}

//
// Display the latest poll
//
if ($display_poll != 0)
{
	//
	// Go ahead and pull all data for this forum
	//
	$sql = "SELECT topic_id
		FROM " . TOPICS_TABLE . " 
		WHERE forum_id = $display_poll
		AND topic_vote = 1
		ORDER BY topic_id DESC 
		LIMIT 1 " ;

	if(!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, "Couldn't obtain poll information.", "", __LINE__, __FILE__, $sql);
	}

	if( !($pollrow = $db->sql_fetchrow($result) ) )
	{
		$template->assign_block_vars('displaynopoll', array("L_NO_POLL" => $lang['Nutport_No_poll']));
	}
	else
	{
		$template->assign_block_vars('displaypoll', array());
		$db->sql_freeresult($result);

		$topic_id = $pollrow['topic_id'];

		$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vr.vote_option_id, vr.vote_option_text, vr.vote_result, vd.topic_id
			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
			WHERE vd.topic_id = $topic_id
				AND vr.vote_id = vd.vote_id
			ORDER BY vr.vote_option_id ASC";
		if( !$result = $db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, "Couldn't obtain vote data for this topic", "", __LINE__, __FILE__, $sql);
		}

		if( $vote_options = $db->sql_numrows($result) )
		{
			$vote_info = $db->sql_fetchrowset($result);

			$vote_id = $vote_info[0]['vote_id'];
			$vote_title = $vote_info[0]['vote_text'];

			$sql = "SELECT vote_id
				FROM " . VOTE_USERS_TABLE . "
				WHERE vote_id = $vote_id
					AND vote_user_id = " . $userdata['user_id'];
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't obtain user vote data for this topic", "", __LINE__, __FILE__, $sql);
			}

			$user_voted = ( $db->sql_numrows($result) ) ? TRUE : 0;

			if( isset($HTTP_GET_VARS['vote']) || isset($HTTP_POST_VARS['vote']) )
			{
				$view_result = ( ( ( isset($HTTP_GET_VARS['vote']) ) ? $HTTP_GET_VARS['vote'] : $HTTP_POST_VARS['vote'] ) == "viewresult" ) ? TRUE : 0;
			}
			else
			{
				$view_result = 0;
			}

			$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;

			if( $user_voted || $view_result || $poll_expired )
			{

				$template->assign_block_vars('displaypoll.showresult', array());
				$vote_results_sum = 0;

				for($i = 0; $i < $vote_options; $i++)
				{
					$vote_results_sum += $vote_info[$i]['vote_result'];
				}

				$vote_graphic = 0;
				$vote_graphic_max = count($images['voting_graphic']);

				for($i = 0; $i < $vote_options; $i++)
				{
					$vote_percent = ( $vote_results_sum > 0 ) ? $vote_info[$i]['vote_result'] / $vote_results_sum : 0;
					$vote_graphic_length = round($vote_percent * $board_config['vote_graphic_length']);

					$vote_graphic_img = $images['voting_graphic'][$vote_graphic];
					$vote_graphic = ($vote_graphic < $vote_graphic_max - 1) ? $vote_graphic + 1 : 0;

					if( count($orig_word) )
					{
						$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
					}

					$template->assign_block_vars("displaypoll.showresult.poll_option", array(
						"POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'],
						"POLL_OPTION_RESULT" => $vote_info[$i]['vote_result'],
						"POLL_OPTION_PERCENT" => sprintf("%.1d%%", ($vote_percent * 100)),

						"POLL_OPTION_IMG" => $vote_graphic_img,
						"POLL_OPTION_IMG_WIDTH" => $vote_graphic_length/10)
					);
				}

$template->assign_vars(array(
					"L_TOTAL_VOTES" => $lang['Total_votes'],
					"TOTAL_VOTES" => $vote_results_sum)
				);

			}
			else
			{
				$template->assign_block_vars('displaypoll.showoptions', array());
				for($i = 0; $i < $vote_options; $i++)
				{
					if( count($orig_word) )
					{
						$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
					}

					$template->assign_block_vars("displaypoll.showoptions.poll_option", array(
						"POLL_OPTION_ID" => $vote_info[$i]['vote_option_id'],
						"POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'])
					);
				}

				$template->assign_vars(array(
					"L_SUBMIT_VOTE" => $lang['Submit_vote'],
					"L_VIEW_RESULTS" => $lang['View_results'],

					"U_VIEW_RESULTS" => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&vote=viewresult"))
				);

				$s_hidden_fields = '<input type="hidden" name="topic_id" value="' . $topic_id . '"><input type="hidden" name="mode" value="vote">';
			}

			if( count($orig_word) )
			{
				$vote_title = preg_replace($orig_word, $replacement_word, $vote_title);
			}
		
			$template->assign_vars(array(
				"POLL_QUESTION" => $vote_title,

				"S_HIDDEN_FIELDS" => ( !empty($s_hidden_fields) ) ? $s_hidden_fields : "",
				"S_POLL_ACTION" => append_sid("posting.$phpEx?" . POST_TOPIC_URL . "=$topic_id"))
			);
		}

		$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id);
		$template->assign_vars(array(
			'U_POLL_VIEWTOPIC' => $view_topic_url,
		));
	}
}

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

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

?>
This is portal.php... Its the only other file with this mod..
albosky
Registered User
Posts: 463
Joined: Sun Apr 09, 2006 7:13 pm

Post by albosky »

overall_header.tpl

You'll find it in the style folder (templates/air)


edit the line below to change to the image desired
th {
color: #757C84; font-size: 10px; font-weight : normal;
background-color: #EDEDED; height: 10px;
background-image: url(templates/air/images/strip_back.gif);
}
Last edited by albosky on Wed May 31, 2006 3:44 am, edited 1 time in total.
CoRuP7ioN
Registered User
Posts: 215
Joined: Thu Jul 21, 2005 6:58 am

Post by CoRuP7ioN »

I understand that. And that I could change the Image that way. But I want to know where in the code it tells it to take it from that part of the overall header... Cause I want to change the portal without having to change the forums
Locked

Return to “2.0.x Support Forum”