Foren Tour Problem

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Foren Tour Problem

Beitrag von der Matze »

Hi Oxpus,

toll das die Tour schon zum Download steht.
Nun habe ich im Portal ein dummes Problem,
es stehen keine neuen Beiträge mehr da, nur ein Beitrag der nicht existiert.

Guck es dir bitte mal an.

Gruss Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Poste mal die portal.php.
Der Mod verändert nichts an selbiger Datei und erstellt auch keine Beiträge. Irgendwas muss da anderswo falsch laufen...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Hi Oxpus,

hier ist meine portal.php

Code: Alles auswählen

<?php
/***************************************************************************
 *                                portal.php
 *                            -------------------
 *   begin                : Tuesday, August 13, 2002
 *   copyright            : (C) 2002 Smartor
 *   email                : smartor_xp@hotmail.com
 *
 *   $Id: portal.php,v 2.1.7 2003/01/30, 17:05:58 Smartor 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.
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   Some code in this file I borrowed from the original index.php, Welcome
 *   Avatar MOD and others...
 *
 ***************************************************************************/

//
// Set configuration for ezPortal
//

// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = 'Welcome to <b>My Community</b><br /><br />Thanks for using ezPortal,<br /><br />Have a good time! ^_^';

// Number of news on portal
//$CFG['number_of_news'] = '5';

// Length of news
//$CFG['news_length'] = '200';

// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
//$CFG['news_forum'] = '1';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
//$CFG['poll_forum'] = '1';

//
// END configuration
// --------------------------------------------------------

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

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

//
// 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');
$total_topics = get_db_stat('topiccount');
$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'];
}



// Read Portal Configuration from DB
define('PORTAL_TABLE', $table_prefix.'portal');

$CFG = array();
$sql = "SELECT * FROM " . PORTAL_TABLE;

if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$CFG[$row['portal_name']] = $row['portal_value'];
} 
if( $userdata['session_logged_in'] )
{
	$sql = "SELECT COUNT(post_id) as total
			FROM " . POSTS_TABLE . "
			WHERE post_time >= " . $userdata['user_lastvisit'];
	$result = $db->sql_query($sql);
	if( $result )
	{
		$row = $db->sql_fetchrow($result);
		$lang['Search_new'] = $lang['Search_new'] . "&nbsp;(" . $row['total'] . ")";
	}
}

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

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

// Newest Nickpages Mod
$sql = "SELECT a.user_id, a.username, b.name, b.created FROM ".USERS_TABLE." a, ".NICKPAGE_TABLE." b WHERE b.uid=a.user_id ORDER BY b.created DESC LIMIT 6";

if (!$result = $db->sql_query($sql))
    {
        message_die(GENERAL_ERROR, 'Could not query Nickpage information', '', __LINE__, __FILE__, $sql);
    }
    
$nickpage_list = $db->sql_fetchrowset($result);
for($i = 0; $i < count($nickpage_list); $i++)
{
	$username = $nickpage_list[$i]['username'];
	$userdate = $nickpage_list[$i]['created'];
	
		
	if(strlen($username) > 17) { // Limit title length to avoid wrap
            $username = strip_tags($username, '<a><i><b><ul><li>');
            $username = substr($username,0,15);
            $username .= "...";
             }
	
		
	$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
	$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
	
	$template->assign_block_vars('nickpagemod', array(
			"ROW_COLOR" => "#" . $row_color,
			"ROW_CLASS" => $row_class,
			'NAME' => '<a href="' . append_sid("nickpage.php?user=$username") . '">' . $username . '</a>',
			'LSEEN_TIME'     => date("m.d.y", $nickpage_list[$i]['created']),
			)
			);
		}
//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
	switch( $userdata['user_avatar_type'] )
	{
		case USER_AVATAR_UPLOAD:
			$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_REMOTE:
			$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_GALLERY:
			$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
	}
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
	$name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile&" . $userdata['user_id']) . '">' . $userdata['username'] . '</a>';
}
else
{
	$name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//


//  
 // Get Newest Pic  
 //  
 $Display = 'Recent';   // Replace 'Recent' with 'Random'  
 $CategoryID = 0;   // Replace 0 with a category ID. Otherwise, keep it as it is  
          // Example: http://www.zweizimmerkuechebad.de/phpBB2/album_cat.php?cat_id=3  
          // Category ID is 3  
  
 if ($Display == 'Random')  
 {  
    if ($CategoryID != 0)  
    {  
       $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_approval, u.username  
          FROM ". ALBUM_TABLE ." AS p  
          LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id  
          WHERE  pic_approval = 1 AND pic_lock = 0 AND pic_cat_id = $CategoryID  
          ORDER BY RAND()  
          LIMIT 0,1";  
    }  
    else {  
       $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_lock, p.pic_approval, u.username  
          FROM ". ALBUM_TABLE ." AS p  
          LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id  
          WHERE  pic_approval = 1 AND pic_lock = 0  
          ORDER BY RAND()  
          LIMIT 0,1";  
    }  
 }  
  
 else if ($Display == 'Recent')  
 {  
    if ($CategoryID != 0)  
    {  
       $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_approval, u.username  
          FROM ". ALBUM_TABLE ." AS p  
          LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id  
          WHERE  pic_approval = 1 AND pic_lock = 0 AND pic_cat_id = $CategoryID  
          ORDER BY pic_time DESC  
          LIMIT 0,1";  
    }  
    else  
    {  
       $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_lock, p.pic_approval, u.username  
          FROM ". ALBUM_TABLE ." AS p  
          LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id  
          WHERE  pic_approval = 1 AND pic_lock = 0  
          ORDER BY pic_time DESC  
          LIMIT 0,1";  
    }  
 }  
  
 if (!$result = $db->sql_query($sql))  
 {  
    message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);  
 }  
  
 $picrow = $db->sql_fetchrow($result);  
  
 $pic_poster = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $picrow['pic_user_id']) .'">'. $picrow['pic_username'] .'</a>';  
 //  
 // END: Get Newest Pic  
 //  



$template->assign_vars(array(
	'WELCOME_TEXT' => $CFG['welcome_text'],
	'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
	'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
	'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
	'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
	'L_FORUM' => $lang['Forum'],
	'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
	'L_STATISTICS' => $lang['Statistics'],	
	'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
	'L_POSTED' => $lang['Posted'],
	'L_COMMENTS' => $lang['Comments'],
	'L_VIEW_COMMENTS' => $lang['View_comments'],
	'L_POST_COMMENT' => $lang['Post_your_comment'],
	'L_SEND_PASSWORD' => $lang['Forgotten_password'],
	'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
	'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
	'L_REMEMBER_ME' => $lang['Remember_me'],
	'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
	'L_POLL' => $lang['Poll'],
	// Photo Album  
    	'L_NEWEST_PIC' => $lang['Newest_pic'],  
    	'PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $picrow['pic_id']),  
    	'PIC_TITLE' => $picrow['pic_title'],  
    	'PIC_POSTER' => $pic_poster,  
    	'U_PIC_LINK' => append_sid('album_comment.' . $phpEx . '?pic_id=' . $picrow['pic_id']),  
    	'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['pic_time'], $board_config['board_timezone']),  
    	'PIC_DESCR' => $picrow['pic_desc'],  
    	'L_PIC_TITLE' => $lang['Pic_Title'],  
    	'L_POSTER' => $lang['Poster'],  
    	'L_POSTED' => $lang['Posted'], 
	'L_VOTE_BUTTON' => $lang['Vote'],
	// ChatBox 
'L_WHO_IS_CHATTING' => $lang['Who_is_Chatting'],
'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ],$chatters),
'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],
'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox',
	'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day']>1) ? sprintf((($birthday_week_list) ? $lang['Birthday_week'].$birthday_week_list : $lang['Nobirthday_week']), $board_config['birthday_check_day']) : '',
	'L_WHOSBIRTHDAY_TODAY' => ($board_config['birthday_check_day']) ? ($birthday_today_list) ? $lang['Birthday_today'].$birthday_today_list : $lang['Nobirthday_today'] : '',
	'L_NEWEST_NICKPAGES' => $lang['Newest_Nickpages'],
	
	// Welcome Avatar
	'L_NAME_WELCOME' => $lang['Welcome'],
	'U_NAME_LINK' => $name_link,
	'AVATAR_IMG' => $avatar_img)
);

//
// Fetch Posts from Announcements Forum
//
if(!isset($HTTP_GET_VARS['article']))
{
	$template->assign_block_vars('welcome_text', array());

	$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']);

	for ($i = 0; $i < count($fetchposts); $i++)
	{
		if( $fetchposts[$i]['striped'] == 1 )
		{
			$open_bracket = '[ ';
			$close_bracket = ' ]';
			$read_full = $lang['Read_Full'];
		}
		else
		{
			$open_bracket = '';
			$close_bracket = '';
			$read_full = '';
		}

		$template->assign_block_vars('fetchpost_row', array(
			'TITLE' => $fetchposts[$i]['topic_title'],
			'POSTER' => $fetchposts[$i]['username'],
			'TIME' => $fetchposts[$i]['topic_time'],
			'TEXT' => $fetchposts[$i]['post_text'],
			'REPLIES' => $fetchposts[$i]['topic_replies'],
			'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
			'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id']),
			'U_READ_FULL' => append_sid('portal.' . $phpEx . '?article=' . $i),
			'L_READ_FULL' => $read_full,
			'OPEN' => $open_bracket,
			'CLOSE' => $close_bracket)
		);
	}
}
else
{
	$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0);

	$i = intval($HTTP_GET_VARS['article']);

	$template->assign_block_vars('fetchpost_row', array(
		'TITLE' => $fetchposts[$i]['topic_title'],
		'POSTER' => $fetchposts[$i]['username'],
		'TIME' => $fetchposts[$i]['topic_time'],
		'TEXT' => $fetchposts[$i]['post_text'],
		'REPLIES' => $fetchposts[$i]['topic_replies'],
		'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
		'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id'])
		)
	);
}
//
// END: Fetch Announcements
//

//
// Fetch Poll
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);

if (!empty($fetchpoll))
{
	$template->assign_vars(array(		
		'S_POLL_QUESTION' => $fetchpoll['vote_text'],
		'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
		'S_TOPIC_ID' => $fetchpoll['topic_id'],
		'L_SUBMIT_VOTE' => $lang['Submit_vote'],
		'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']		
		)
	);

	for ($i = 0; $i < count($fetchpoll['options']); $i++)
	{
		$template->assign_block_vars('poll_option_row', array(
			'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
			'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
			'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result'],
			)
		);
	}	
}
else
{
	$template->assign_vars(array(		
		'S_POLL_QUESTION' => $lang['No_poll'],
		'DISABLED' => 'disabled="disabled"'
		)
	);
}


// Let's add some more code, this will be fun. ;)
$active_topics_sql="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time 
			FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d 
			where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id 
				and d.forum_id=a.forum_id 
				and d.auth_view=0 
			ORDER BY topic_last_post_id DESC 
			LIMIT 5"; 
$active_topics = $db->sql_query($active_topics_sql); 

$active_topics_sql2="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time 
			FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d 
			where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id 
				and d.forum_id=a.forum_id 
				and d.auth_view=0 
			ORDER BY topic_replies DESC 
			LIMIT 5"; 
$active_topics2 = $db->sql_query($active_topics_sql2); 

$active_topics_sql3="SELECT a.topic_id,a.topic_title,  a.topic_views, a.topic_replies,  a.topic_last_post_id, c.post_time
			FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d 
			where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id 
				and d.forum_id=a.forum_id 
				and d.auth_view=0 
			ORDER BY topic_views DESC 
			LIMIT 5"; 
$active_topics3 = $db->sql_query($active_topics_sql3); 

	while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
	{
		if (strlen($line['topic_title']) > 40)
		{
			$line_topic_title = substr($line['topic_title'], 0, 40)." ...";
		}
		else
		{
			$line_topic_title = $line['topic_title'];
		}
		if (strlen($line2['topic_title']) > 40)
		{
			$line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
		}
		else
		{
			$line_topic_title2 = $line2['topic_title'];
		}
		if (strlen($line3['topic_title']) > 40)
		{
			$line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
		}
		else
		{
			$line_topic_title3 = $line3['topic_title'];
		}
		$lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>";
		$poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>";
		$poppostc = $line2['topic_replies'];
		$popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>";
		$popviewpostc = $line3['topic_views'];
		$template->assign_block_vars('topicrecentpopular', array(
			'TOPICSPOPULAR' => $poppost, 
			'TOPICSPOPULARC' => $poppostc, 
			'TOPICSPOPULARVIEW' => $popviewpost, 
			'TOPICSPOPULARVIEWC' => $popviewpostc, 
			'TOPICSRECENT' => $lastpost)
		);
	}
// You added more pointless code, go you!


//
// Generate the page
//
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx);
$template->pparse('body');

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

?>
Gruss
Bild
Dani
Beiträge: 66
Registriert: Do 26.Feb, 2004 22:27
Wohnort: NRW
Kontaktdaten:

Beitrag von Dani »

Ey, das kommt mir gerade passend. Ich habe mir mal die Portal.php angesehen und etwas entdeckt. Vielleciht kann mir jetzt jemand ne Antwort auf folgende Frage geben. Von welchem Mod stammt dieser Code?

Code: Alles auswählen

// Let's add some more code, this will be fun. ;) 
$active_topics_sql="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time 
         FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d 
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id 
            and d.forum_id=a.forum_id 
            and d.auth_view=0 
         ORDER BY topic_last_post_id DESC 
         LIMIT 5"; 
$active_topics = $db->sql_query($active_topics_sql); 

$active_topics_sql2="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time 
         FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d 
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id 
            and d.forum_id=a.forum_id 
            and d.auth_view=0 
         ORDER BY topic_replies DESC 
         LIMIT 5"; 
$active_topics2 = $db->sql_query($active_topics_sql2); 

$active_topics_sql3="SELECT a.topic_id,a.topic_title,  a.topic_views, a.topic_replies,  a.topic_last_post_id, c.post_time 
         FROM phpbb_topics a, phpbb_users b, phpbb_posts c, phpbb_forums d 
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id 
            and d.forum_id=a.forum_id 
            and d.auth_view=0 
         ORDER BY topic_views DESC 
         LIMIT 5"; 
$active_topics3 = $db->sql_query($active_topics_sql3); 

   while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3))) 
   { 
      if (strlen($line['topic_title']) > 40) 
      { 
         $line_topic_title = substr($line['topic_title'], 0, 40)." ..."; 
      } 
      else 
      { 
         $line_topic_title = $line['topic_title']; 
      } 
      if (strlen($line2['topic_title']) > 40) 
      { 
         $line_topic_title2 = substr($line2['topic_title'], 0, 40)." ..."; 
      } 
      else 
      { 
         $line_topic_title2 = $line2['topic_title']; 
      } 
      if (strlen($line3['topic_title']) > 40) 
      { 
         $line_topic_title3 = substr($line3['topic_title'], 0, 40)." ..."; 
      } 
      else 
      { 
         $line_topic_title3 = $line3['topic_title']; 
      } 
      $lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>"; 
      $poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>"; 
      $poppostc = $line2['topic_replies']; 
      $popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>"; 
      $popviewpostc = $line3['topic_views']; 
      $template->assign_block_vars('topicrecentpopular', array( 
         'TOPICSPOPULAR' => $poppost, 
         'TOPICSPOPULARC' => $poppostc, 
         'TOPICSPOPULARVIEW' => $popviewpost, 
         'TOPICSPOPULARVIEWC' => $popviewpostc, 
         'TOPICSRECENT' => $lastpost) 
      ); 
   } 
// You added more pointless code, go you! 
Gruß
Dani
Zuletzt geändert von Dani am So 29.Feb, 2004 00:29, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

@Dani
Keine Ahnung, ehrlich :(

@der Matze
Also, das Portal wird durch die Foren Tour definitiv nicht verändert.
Hast Du vielleicht irgend was an der Portal-Einstellung verändert? Z.B. das falsche Forum für die Portal-News?
Und zeigt das Portal wieder alles korrekt an, wenn die Forun Tour von mir deinstalliert wurde?
Ich habe auf meinem Board keine Probleme und benutze das gleiche Portal und den gleichen ACP-Mod dafür.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Hi,

als ich den Mod installiert hatte sah das Portal so aus...
Es funktioniert sonst alles.

Was könnte es sonst sein? Hast du eine Idee, so sieht es halt schon dumm aus nicht.

Gruss Matze
Bild
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Wenn ich im ACP alle Foren die im ortal angezeigt werden sollen, kommt das.
Could not query announcements information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ') AND t.topic_time <= 1078090225 AND t.topic_poster = u.user_id AND ' at line 23

SELECT t.topic_id, t.topic_time, t.topic_title, pt.post_text, u.username, u.user_id, t.topic_replies, pt.bbcode_uid, t.forum_id, t.topic_poster, t.topic_first_post_id, t.topic_status, pt.post_id, p.post_id, p.enable_smilies FROM phpbb_topics AS t, phpbb_users AS u, phpbb_posts_text AS pt, phpbb_posts AS p WHERE t.forum_id IN () AND t.topic_time <= 1078090225 AND t.topic_poster = u.user_id AND t.topic_first_post_id = pt.post_id AND t.topic_first_post_id = p.post_id AND t.topic_status <> 2 ORDER BY t.topic_time DESC
Line : 86
File : /home/www/web45/html/zweizimmerkuechebad/phpBB2/fetchposts.php
Hat es vielleicht damit zu tun?

Gruss
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Öhm, da werden keine Werte an das SQL-Statement übergeben, somit kann auch nichts dargestellt werden ;) Sprich: Die im ACP eingegebenen Werte werden schinbar nicht in der Datenbank gespeichert!
Und wenn im ACP nichts eingegeben wird, dann erscheint logischerweise auch nichts. Irgendwo ist da halt der Wurm drinnen.
Du kannst in der portal.php aber auch die Zeilen für die Einstellungen, aus welchen Foren die News kommen nicht mehr auskommentieren und damit die Foren festlegen.
Schau aber mal in die Tabelle phpbb_portal, ob überhaupt die News-Foren gespeichert werden. Vielleicht liegt hier ein Fehler in der admin_portal.php vor...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Es sind alle Zeilen in der Datenbank vorhanden.

Son Schrott.

Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Gib mir bitte noch ein paar Tage, dann schaue ich nochmal nach. Momentan bin ich etwas zu sehr ausgelastet...

Du kannst mir aber schon einmal ein Backup der Portal-Tabelle per PN schicken. Dann kann ich gleich das Portal mal lokal bei mir testen.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Morgen,

ich habe dir bei mir Admin rechte gegeben, das vereinfacht die Sache bestimmt.
Wie ich das mit dem Backup der Portal-Tabelle machen muss weiss ich nicht.

Gruss Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay. Das hilft auch schon einmal weiter.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Ich kann suchen, soviel ich will: Es ist kein Fehler zu finden. Der muss also eher in der Portal Konfiguration, bzw. der Forum Tour zu suchen sein.
Mit Letzterem kann ich aber auch keinen Zusammenhang feststellen, da weder die Einstellungen, noch Variablen des Portals verändert werden.

Hast Du in der constants.php diese Zeile entsprechend angepasst:

Code: Alles auswählen

define('PAGE_FORUM_TOUR', -12); // Increase "-12" if already in use!
also die -12 verändert, sofern die schon vorhanden war?
Das kann im schlimmsten Fall das Sessions Management durcheinander bringen und vielleicht auch Auswirkungen auf das includieren von php-Files haben.
Und hast Du die Tour auch schon einmal wieder ausgebaut oder aktuell nur auf Eis gelegt?
Poste auch bitte mal die fetchposts.php. Vielleicht hat die Datei Probleme.
Und dazu: Mach mal ein Screenshot von der Portal Administration. Da, denke ich, ist evtl. der Fehler drinnen.
BTW: Auf Deinem Board habe ich nur Moderator-Rechte. Hilft dann doch nicht so unbedingt weiter. Aber mit dem Screenshot von den Portal-Einstellungen kann ich schon was anfangen, brauchst also keine weiteren Rechte erteilen.

Dann zum Backup der Tabelle phpbb_portal: Du kannst ein Backup der gesamten Datenbank erstellen und nur den Teil dieser Tabelle posten. Dann musst Du nicht umständlich ein Backup dieser einen Tabelle anfertigen.

Nochmals: Die Forum Tour benutzt eine eigene Tabelle, so daß die Posts nicht verändert werden. Dazu habe ich eindeutige Variablen Namen verwendet und im Board-Bereich werden lediglich in der page_header.php und overall_header.tpl der Link zur Tour angelegt. Daher kann ich keinen direkten Zusammenhang zwischen Portal und Tour feststellen und Deinen Fehler nachvollziehen.
Da ich das gleiche Portal und auch die ACP-Verwaltung desselbigen verwende, ist der Fehler bei Dir schon etwas kurios...

Zum Test, das Dein Portal funktioniert, habe ich das mal hier hochgeladen: http://www.oxpus.de/matze_portal.php
Nicht wundern, wegen den abweichenden Boxen rechts und links, die sind in der portal_body.tpl fest verdrahtet und werden aus der page_header.tpl mit Inhalten versorgt. Es ist aber ansonsten definitiv Deine portal.php.
Lediglich Funktionen wie der Mini Kalender und die Chatbox musste ich herausnehmen, da ich diese Mods nicht installiert habe.
Du siehst da, das Deine portal.php fehlerfrei funktioniert. Also verträgt sich entweder meine Forum Tour nicht mir einem anderen Mod auf Deinem Board oder die Einstellungen sind eben hinüber.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Hallo Oypus,

ich glaube auch nicht mehr das es daran lag das ich den Tour Mod installiert habe.
Zur Zeit ist er nicht installiert, ich habe ihn weider runtergenommen um zu sehen ob es daran lag.

Du hast jetzt Admin Rechte.

Hier ist diefetchpost.php als txt

Bild

Gruss Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Es ist zum Haareausraufen. Alles scheint in Ordnung zu sein. Selbst, wenn ich die Einstellungen verändere, wird nichts angezeigt.
Ich verstehe es einfach nicht :(
Schon einmal die portal.php und fetchposts.php neu hochgeladen?
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Du sagts es, es ist schon sehr merkwürdig.

Langsam gehen einem auch die Ideen aus.

Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Dann bliebe nur noch eine Frage: Hattest Du nach dem Einbau der Forum Tour etwas neues installiert oder an den Board-Einstellungen verändert?
Oder hattest Du am Portal selber irgend was seit der Board-Installation verändert?
Ich weiss leider keinen Rat mehr. Sorry.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Morgen,

im Portal sind die Mod die du siehst (nach der erstinstallation) hinzugekommen.

Gruss Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Bliebe vielleicht nur noch die Möglichkeit, das Portal neu zu installieren und die entsprechenden Blöcke nachzuziehen.
Aber ob das was nützt :confused:
Du kannst aber auch mal folgendes direkt in der Datenbank (z.B. mit phpmyadmin) ausführen:

Code: Alles auswählen

SELECT t.topic_id, t.topic_time, t.topic_title, pt.post_text, u.username, u.user_id,
	t.topic_replies, pt.bbcode_uid, t.forum_id, t.topic_poster, t.topic_first_post_id,
	t.topic_status, pt.post_id, p.post_id, p.enable_smilies
	FROM phpbb_topics AS t, phpbb_users AS u, phpbb_posts_text AS pt, phpbb_posts AS p
	WHERE t.forum_id IN (3,4,9,11,12,13,14,16,18,22,24,25,26,27,28,29,30,31,32,33,36,37,39,40,41,42,43,44)
	AND t.topic_poster = u.user_id
	AND t.topic_first_post_id = pt.post_id
	AND t.topic_first_post_id = p.post_id
	AND t.topic_status <> 2
	ORDER BY t.topic_time DESC
	LIMIT 0, 7;
Das ist die Abfrage der letzten Themen aus der fetchposts.php. Ich habe hier lediglich die Tabellen ausgeschrieben, da die Datenbank ja nicht die Konstanten dafür kennt.
Wenn da etwas herauskommt, liegt es auch nicht am Portal, sondern am Weg dorthin.

Poste auch bitte mal die portal_body.tpl. Da will ich auch mal reinschauen...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Problem möglicherweise gefunden:
In Deiner portal_body.tpl steht

Code: Alles auswählen

<!-- END fetch_post_row -->
und müsste lauten:

Code: Alles auswählen

<!-- END fetchpost_row -->
Das könnte den Fehler schon beheben!
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
der Matze
Beiträge: 16
Registriert: Fr 13.Feb, 2004 18:13

Beitrag von der Matze »

Vielen Vielen Dank,

es funktioniert wieder.

Danke für deine grosse mühe das Problem zu lösen

Viele Grüsse Matze
Bild
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Na also! Manchmal ist es eben auch nur eine Kleinigkeit die man ständig übersieht.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
SilkeButhmann
Beiträge: 16
Registriert: Do 17.Feb, 2005 10:36

Beitrag von SilkeButhmann »

Kann ich den Link zur Forum Tour auch in den Index einbauen? Ich habe meine Navigation auf der linken Indexseite eingebaut und nicht mehr in der overallheader.
Wo muß ich dann die Sachen für die overallheader und evt. pageheader reinsetzen. Vielen Dank im voraus und liebe Grüße Silke
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Klar. Du kannst den Link überall reinsetzen.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
SilkeButhmann
Beiträge: 16
Registriert: Do 17.Feb, 2005 10:36

Beitrag von SilkeButhmann »

Aber wenn ich den Link in die indexbody einbaue und versuche die Seite zu öffnen passiert nichts. Unten steht dann Fehler auf der Seite. Scroll ich über den Link steht dort javascript:tour()
Habe ich was falsch eingebaut??

Code: Alles auswählen

includes/functions_post.php

# 
#-----[ FIND ]------------------------------------------
#  
	if ($mode == 'window')
	{
		$userdata = session_pagestart($user_ip, $page_id);
		init_userprefs($userdata);

		$gen_simple_header = TRUE;

		$page_title = $lang['Review_topic'] . " - $topic_title";
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);

		$template->set_filenames(array(
			'smiliesbody' => 'posting_smilies.tpl')
		);
	}
Dort habe ich vor dem Einbau dies stehen:

Code: Alles auswählen

if ($mode == 'window')
	{
		$userdata = session_pagestart($user_ip, $page_id);
		init_userprefs($userdata);

		$gen_simple_header = TRUE;

		$page_title = $lang['Emoticons'] . " - $topic_title";
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);

		$template->set_filenames(array(
			'smiliesbody' => 'posting_smilies.tpl')
		);
	}
Habe dann die Neuerung trotzdem eingebaut. Liegt es an dem 'Emoticons' was ja nun fehlt?
Zuletzt geändert von SilkeButhmann am Di 30.Aug, 2005 15:59, insgesamt 1-mal geändert.
Antworten