[2.0.x] Anzeige der letzten Themen

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Helmut
Mitglied
Beiträge: 2048
Registriert: 27.12.2002 20:35
Wohnort: Augsburg

Beitrag von Helmut »

Hallo Acid,

ich war jetzt länger nicht hier und hatte auch aus beruflichen Gründen kaum Zeit, mich um die Erweiterung unserer Homepage zu kümmern. Ich habe folgenden Code von dir auf unserer Testhomepage in die index.php eingebaut, der Code funktioniert auch störungsfrei.

Code: Alles auswählen

//insert last topics Test2
// ############ Edit below ############
$length = '25'; // Laenge des Titels
$limit = '5'; // Anzahl der Themen
$forums = '20,21'; // ID der Foren, die nicht angezeigt werden sollen; separate them with a comma
// ############ Edit above ############

$sql = "SELECT post_id FROM " . POSTS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql);
}
$recent_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
	$recent_ids[] = $row['post_id'];
}
$db->sql_freeresult($result);

$recent_forum = ( isset($HTTP_POST_VARS['forum']) ) ? intval($HTTP_POST_VARS['forum']) : -1;
if ( $recent_forum == -1 )
{
        $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata); 
        $ignore_forum_sql = '';
        while( list($key, $value) = each($is_auth_ary) )
        {
                if ( !$value['auth_read'] )
                {
                        $ignore_forum_sql .= ( ( $ignore_forum_sql != '' ) ? ', ' : '' ) . $key;
                }
        }
        if ( $ignore_forum_sql != '' )
        {
                $auth_sql .= ( $auth_sql != '' ) ? " AND f.forum_id NOT IN ($ignore_forum_sql) " : "f.forum_id NOT IN ($ignore_forum_sql) ";
        }
}
                if ( $recent_author == '' && $auth_sql == '' )
                {
                        $sql = "SELECT topic_id FROM " . POSTS_TABLE . "
                                WHERE post_id IN (" . implode(", ", $recent_ids) . ") 
                                $where_sql GROUP BY topic_id";
                }
                else
                {
                        $from_sql = POSTS_TABLE . " p"; 
                        if ( $auth_sql != '' )
                        {
                                $from_sql .= ", " . FORUMS_TABLE . " f";
                                $where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
                        }
                        $sql = "SELECT p.topic_id FROM $from_sql 
                                WHERE p.post_id IN (" . implode(", ", $recent_ids) . ") 
                                $where_sql GROUP BY p.topic_id";
                }
                if ( !($result = $db->sql_query($sql)) )
                {
                        message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql);
                }

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

$auth_results = implode(', ', $recent_ids);

$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time 
        FROM ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u, ". POSTS_TABLE ." p, ". POSTS_TABLE ." p2, ". USERS_TABLE ." u2
        WHERE t.topic_id IN ($auth_results) AND f.forum_id NOT IN ($forums)
              AND t.topic_poster = u.user_id
              AND f.forum_id = t.forum_id 
              AND p.post_id = t.topic_first_post_id
              AND p2.post_id = t.topic_last_post_id
              AND u2.user_id = p2.poster_id
        ORDER BY t.topic_last_post_id DESC LIMIT $limit";
if ( !$result = $db->sql_query($sql) )
{
        message_die(GENERAL_ERROR, 'Could not obtain main information', '', __LINE__, __FILE__, $sql);
}
$line = array();
while( $row = $db->sql_fetchrow($result) )
{
        $line[] = $row;
}
$db->sql_freeresult($result);		
		
        $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();
        for($i = 0; $i < count($line); $i++)
        {
                $forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $line[$i]['forum_id']);
                $forum_id = $line[$i]['forum_id'];
                $topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $line[$i]['topic_id']);
                $topic_id = $line[$i]['topic_id'];

                $orig_word = array();
                $replacement_word = array();
                obtain_word_list($orig_word, $replacement_word);
                $word_censor = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $line[$i]['topic_title']) : $line[$i]['topic_title']; 
                $topic_title = ( strlen($line[$i]['topic_title']) < $length ) ? $word_censor : substr(stripslashes($word_censor), 0, $length) . "..."; 

                $topic_type = ( $line[$i]['topic_type'] == POST_ANNOUNCE ) ? $lang['Topic_Announcement'] .' ': '';
                $topic_type .= ( $line[$i]['topic_type'] == POST_GLOBAL_ANNOUNCE ) ? $lang['Topic_global_announcement'] .' ': '';
                $topic_type .= ( $line[$i]['topic_type'] == POST_STICKY ) ? $lang['Topic_Sticky'] .' ': '';
                $topic_type .= ( $line[$i]['topic_vote'] ) ? $lang['Topic_Poll'] .' ': '';

                $views = $line[$i]['topic_views'];
                $replies = $line[$i]['topic_replies'];
                if ( ( $replies + 1 ) > $board_config['posts_per_page'] )
                {
                        $total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] );
                        $goto_page = ' [ ';
                        $times = 1;
                        for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
                        {
                                $goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '" >' . $times . '</a>';
                                if ( $times == 1 && $total_pages > 4 )
                                {
                                        $goto_page .= ' ... ';
                                        $times = $total_pages - 3;
                                        $j += ( $total_pages - 4 ) * $board_config['posts_per_page'];
                                }
                                else if ( $times < $total_pages )
                                {
                                        $goto_page .= ', ';
                                }
                                $times++;
                        }
                        $goto_page .= ' ] ';
                }
                else
                {
                        $goto_page = '';
                }

                if ( $line[$i]['topic_status'] == TOPIC_LOCKED )
                {
                        $folder = $images['folder_locked'];
                        $folder_new = $images['folder_locked_new'];
                }
                else if ( $line[$i]['topic_type'] == POST_ANNOUNCE )
                {
                        $folder = $images['folder_announce'];
                        $folder_new = $images['folder_announce_new'];
                }
                else if ( $line[$i]['topic_type'] == POST_GLOBAL_ANNOUNCE )
                {
                        $folder = $images['folder_global_announce'];
                        $folder_new = $images['folder_global_announce_new'];
                }
                else if ( $line[$i]['topic_type'] == POST_STICKY )
                {
                        $folder = $images['folder_sticky'];
                        $folder_new = $images['folder_sticky_new'];
                }
                else
                {
                        if ( $replies >= $board_config['hot_threshold'] )
                        {
                                $folder = $images['folder_hot'];
                                $folder_new = $images['folder_hot_new'];
                        }
                        else
                        {
                                $folder = $images['folder'];
                                $folder_new = $images['folder_new'];
                        }
                }

                if ( $userdata['session_logged_in'] )
                {
                        if ( $line[$i]['post_time'] > $userdata['user_lastvisit'] ) 
                        {
                                if ( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
                                {
                                        $unread_topics = true;
                                        if ( !empty($tracking_topics[$topic_id]) )
                                        {
                                                if ( $tracking_topics[$topic_id] > $line[$i]['post_time'] )
                                                {
                                                        $unread_topics = false;
                                                }
                                        }
                                        if ( !empty($tracking_forums[$forum_id]) )
                                        {
                                                if ( $tracking_forums[$forum_id] > $line[$i]['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'] > $line[$i]['post_time'] )
                                                {
                                                        $unread_topics = false;
					}
                                        }
                                        if ( $unread_topics )
                                        {
                                                $folder_image = $folder_new;
					$folder_alt = $lang['New_posts'];
                				$newest_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
                                        }
                                        else
                                        {
                                                $folder_alt = ( $line[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
                                                $folder_image = $folder;
					$folder_alt = $folder_alt;
					$newest_img = '';
                                        }
                                }
                                else if ( $line[$i]['post_time'] > $userdata['user_lastvisit'] ) 
                                {
                                        $folder_image = $folder_new;
                                        $folder_alt = $lang['New_posts'];
                                        $newest_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="'. $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
                                }
                                else 
                                {
                                        $folder_image = $folder;
                                        $folder_alt = ( $line[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
                                        $newest_img = '';
                                }
                        }
                        else
                        {
                                $folder_image = $folder;
                                $folder_alt = ( $line[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
                                $newest_img = '';
                        }
                }
                else
                {
                        $folder_image = $folder;
                        $folder_alt = ( $line[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
                        $newest_img = '';
                }
				
                $first_time = create_date($board_config['default_dateformat'], $line[$i]['topic_time'], $board_config['board_timezone']);
                $first_author = ( $line[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $line[$i]['user_id']) . '" class="genmed">'.$line[$i]['username'].'</a>' : ( ($line[$i]['post_username'] != '' ) ? $line[$i]['post_username'] : $lang['Guest'] ); 
                $last_time = create_date($board_config['default_dateformat'], $line[$i]['post_time'], $board_config['board_timezone']);
                $last_author = ( $line[$i]['id2'] == ANONYMOUS ) ? ( ($line[$i]['post_username2'] != '' ) ? $line[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $line[$i]['id2']) . '" class="genmed">' . $line[$i]['user2'] . '</a>';
                $last_url = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $line[$i]['topic_last_post_id']) . '#' . $line[$i]['topic_last_post_id'] . '"><img src="'. $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';

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

                $template->assign_block_vars('recent', array(
                        'TOPIC_TITLE' => $topic_title,
                        'TOPIC_TYPE' => $topic_type,
                        'VIEWS' => $views,
                        'REPLIES' => $replies,
                        'GOTO_PAGE' => $goto_page,
                        'TOPIC_FOLDER_IMG' => '<img src='.$folder_image.' width=19 height=18 alt='.$folder_alt.' />', 
                        'NEWEST_IMG' => $newest_img, 
                        'FIRST_TIME' => $first_time,
                        'FIRST_AUTHOR' => $first_author,
                        'LAST_TIME' => $last_time,
                        'LAST_AUTHOR' => $last_author,
                        'LAST_URL' => $last_url,
                        'ROW_CLASS' => $row_class,
                        'L_BY' => $lang['by'],
                        'L_STARTED' => $lang['Started'],
                        'L_REPLIES' => $lang['Replies'],
                        'L_VIEWS' => $lang['Views'],
                        'FORUM_NAME' => $line[$i]['forum_name'],
                        'U_VIEW_FORUM' => $forum_url, 
                        'FORUM_ID' => $forum_id,
                        'U_VIEW_TOPIC' => $topic_url,
                        'TOPIC_ID' => $topic_id
                ));
		// show only by user logged in
                if ( $userdata['session_logged_in'] )
                {
                   $template->assign_block_vars('recent.switch_user_logged', array());
                }
		//---
        }

        $template->assign_vars(array(
                'L_RECENT_TITLE' => $lang['Title']
        ));
//-----------------
Die neusten Topics werden nur eingelogten Usern gezeigt, das ist auch ok so. Was ich jetzt noch machen möchte, das ist die Anzeige des Topictitels eines bestimmten Forums. Ich habe ein Forum so eingerichtet, daß es als Newsseite fungiert. In diesem Forum gibt es nur ein Thema, an dem der Admin weitere Antworten anfügen kann. Es werden immer die neusten Antworten ganz am Anfang gezeigt.

Ich möchte es so machen, daß immer die letzten 5 Titel {recent.TOPIC_TITLE} der Antworten als Newsticker in einer Laufzeile angezeigt wird. So zum Beispiel:
<<<<<News>>>>>Titel 1<<<<<News>>>>Titel 2<<<<< ... usw.
Diese Zeile soll aber nur den Usern angezeigt werden, die nicht eingelogt sind.

Gruß Helmut :wink:
Ich bin nicht ganz dicht.... na und.
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Zusätzlich zu den anderen recent-Themen oder sollen dann nur diese "Beitragstitel" angezeigt werden?
Helmut
Mitglied
Beiträge: 2048
Registriert: 27.12.2002 20:35
Wohnort: Augsburg

Beitrag von Helmut »

Hallo Acid,

danke dir für die schnelle Antwort.

Es sollen dann nur die neusten Titel (Antworten) des Themas in diesem bestimmten Forum in der Laufzeile angezeigt werden, sonst nichts weiter.

Gruß Helmut
Ich bin nicht ganz dicht.... na und.
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Code: Alles auswählen

<?php
// ############ Edit below ############ 
$length = '25'; // Laenge des Titels 
$limit = '5'; // Anzahl der Themen 
$topic_id = '3'; // ID des Themas
// ############ Edit above ############ 

$sql = "SELECT f.forum_id, f.forum_name, p.post_id, p.post_time, p.post_username, pt.post_subject, u.user_id, u.username
	FROM ". FORUMS_TABLE ." f, ". POSTS_TABLE ." p, ". POSTS_TEXT_TABLE ." pt, ". USERS_TABLE ." u
	WHERE p.topic_id IN ($topic_id) AND p.post_id = pt.post_id AND u.user_id = p.poster_id
	ORDER BY p.post_id DESC LIMIT $limit";
if( !$result = $db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, 'Could not obtain main information.', '', __LINE__, __FILE__, $sql);
}
$line = array();
while( $row = $db->sql_fetchrow($result) )
{ 
	$line[] = $row;
}
$db->sql_freeresult($result);
       
for( $i = 0; $i < count($line); $i++ )
{
	$forum_url = append_sid("viewforum.$phpEx?". POST_FORUM_URL .'='. $line[$i]['forum_id']);
	$forum_id = $line[$i]['forum_id'];
	$topic_id = $line[$i]['post_id'];
	$topic_url = append_sid("viewtopic.$phpEx?". POST_POST_URL ."=$topic_id#$topic_id");

	$orig_word = array();
	$replacement_word = array();
	obtain_word_list($orig_word, $replacement_word);
	$word_censor = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $line[$i]['post_subject']) : $line[$i]['post_subject'];
	$topic_title = ( strlen($line[$i]['post_subject']) < $length ) ? $word_censor : substr(stripslashes($word_censor), 0, $length) . "...";
             
	$first_author = ( $line[$i]['user_id'] != ANONYMOUS ) ? '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $line[$i]['user_id']) .'" class="genmed">'. $line[$i]['username'] .'</a>' : ( ($line[$i]['post_username'] != '' ) ? $line[$i]['post_username'] : $lang['Guest'] );
	$last_time = create_date($board_config['default_dateformat'], $line[$i]['post_time'], $board_config['board_timezone']);

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

	$template->assign_block_vars('recent', array(
		'TOPIC_TITLE' => $topic_title,
                        'FIRST_AUTHOR' => $first_author,
                        'LAST_TIME' => $last_time,
                        'ROW_CLASS' => $row_class,
                        'FORUM_NAME' => $line[$i]['forum_name'],
                        'U_VIEW_FORUM' => $forum_url,
                        'FORUM_ID' => $forum_id,
                        'U_VIEW_TOPIC' => $topic_url,
                        'TOPIC_ID' => $topic_id
	));

	if( $userdata['session_logged_in'] )
	{
		$template->assign_block_vars('recent.switch_user_logged', array());
	}
}

$template->assign_vars(array(
	'L_RECENT_TITLE' => $lang['Title']
));
?>
Versuch´s mal damit. Am Codeanfang kannst du die topicID(s) eintragen.
Natürlich müsste der tpl-Teil jetzt noch ein wenig umgestellt werden.
Helmut
Mitglied
Beiträge: 2048
Registriert: 27.12.2002 20:35
Wohnort: Augsburg

Beitrag von Helmut »

Hallo Acid,

irgendwie klappt der Code nicht so wie er soll. Wenn ich nicht eingelogt bin, dann wird mir nichts angezeigt und wenn ich mich einloge, dann wird nur der Forenname, der Username und immer das gleiche Datum unten angezeigt. Irgendwo ist da noch ein Denkfehler drinnen, aber ich bin auch noch nicht dahinter gekommen. Dieser Teil ist in der index_body.tpl drinnen:

Code: Alles auswählen

		<!-- BEGIN recent -->
                    <!-- BEGIN switch_user_logged -->		
                    <tr> 
                      <td class="row1" width="100%"> 
                        <p><span class="gensmall">Forum: &raquo;&raquo; <a href="{recent.U_VIEW_FORUM}" class="genmed">{recent.FORUM_NAME} </a>««</span><br>
		      <span class="gensmall"></span><span class="topictitle">{recent.TOPIC_TYPE}
                          <a href="{recent.U_VIEW_TOPIC}" class="genmed">{recent.TOPIC_TITLE}</a></span><br>
                          <span class="gensmall">{recent.L_STARTED} {recent.FIRST_TIME} {recent.L_BY} {recent.FIRST_AUTHOR}<br>{recent.L_ON} {recent.FIRST_POST}</span></p>
		      <!-- END switch_user_logged -->
		      
			      <!-- BEGIN switch_user_logged -->
		      <p><span class="gensmall"> {recent.LAST_URL} {recent.LAST_TIME}&nbsp;&nbsp;{recent.LAST_AUTHOR}</span>&nbsp;&nbsp;</p>
		   </td>
                    </tr>
                    <!-- END switch_user_logged -->		    
		<!-- END recent -->
Nochmal kurz zur Beschreibung, wie die Topics angezeigt werden sollen.

Wenn der User nicht eingelogt ist, dann soll die Newszeile (die letzten 5 Topictitel eines bestimmten Themas eines bestimmten Forums) gezeigt werden. Wenn der User sich dann einlogt, dann sollen die letzten 5 Topics angezeigt werden (der schon bestehende Code) und die Nweszeile kann wegfallen. Daß die letzten Topics angezeigt werden, wenn der User eingelogt ist, das geht ja schon.

In der Newszeile soll nur dieser Teil angezeigt werden:

Code: Alles auswählen

<span class="gensmall"></span><span class="topictitle">{recent.TOPIC_TYPE}
                          <a href="{recent.U_VIEW_TOPIC}" class="genmed">{recent.TOPIC_TITLE}</a></span>
Gruß Helmut
Ich bin nicht ganz dicht.... na und.
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Wenn der User sich dann einlogt, dann sollen die letzten 5 Topics angezeigt werden (der schon bestehende Code) und die Nweszeile kann wegfallen.
aha :wink:
Ich schau´s mir nochma an..
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Und damit ?
Der tpl-Teil wäre..

Code: Alles auswählen

<!-- BEGIN recent -->
<!-- BEGIN user_logged_in -->
  <tr>
        <td class="{recent.ROW_CLASS}" width="100%">
                <p><span class="gensmall">Forum: &raquo;&raquo; <a href="{recent.U_VIEW_FORUM}" class="genmed">{recent.FORUM_NAME} </a>««</span><br />
                <span class="topictitle">{recent.TOPIC_TYPE} <a href="{recent.U_VIEW_TOPIC}" class="genmed">{recent.TOPIC_TITLE}</a></span><br />
                <span class="gensmall"> {recent.FIRST_TIME} &nbsp;&nbsp;{recent.FIRST_AUTHOR}<br /></span></p>
                <p><span class="gensmall"> {recent.LAST_URL} {recent.LAST_TIME}&nbsp;&nbsp;{recent.LAST_AUTHOR}</span></p></td>
  </tr>
<!-- END user_logged_in -->
<!-- BEGIN user_logged_out -->
                <span class="topictitle">{recent.TOPIC_TYPE} <a href="{recent.U_VIEW_TOPIC}" class="genmed">{recent.TOPIC_TITLE}</a></span><br />
<!-- END user_logged_out -->
<!-- END recent -->
Helmut
Mitglied
Beiträge: 2048
Registriert: 27.12.2002 20:35
Wohnort: Augsburg

Beitrag von Helmut »

Hallo Acid,

also es funktioniert nur teilweise. Jetzt wird zwar ein Titel des richtigen Forenthemas (News) angezeigt, aber nur der erste Titel und nicht die letzten fünf Titel. Ich habe mir den Seitenquelltext im Browser angeschaut, da werden die Links zu allen 5 Titel angelegt, aber nur beim ersten Titel steht auch der Text von Beitrag dabei.

Code: Alles auswählen

				<span class="topictitle"> <a href="viewtopic.php?p=2565&PHPSESSID=363b59beabf6fd78e8c443edf04a8b47#2565" class="genmed">Neuer Rahmenvertrag für TV</a></span><br />

				<span class="topictitle"> <a href="viewtopic.php?p=2534&PHPSESSID=363b59beabf6fd78e8c443edf04a8b47#2534" class="genmed"></a></span><br />

				<span class="topictitle"> <a href="viewtopic.php?p=2472&PHPSESSID=363b59beabf6fd78e8c443edf04a8b47#2472" class="genmed"></a></span><br />

				<span class="topictitle"> <a href="viewtopic.php?p=2464&PHPSESSID=363b59beabf6fd78e8c443edf04a8b47#2464" class="genmed"></a></span><br />

				<span class="topictitle"> <a href="viewtopic.php?p=2420&PHPSESSID=363b59beabf6fd78e8c443edf04a8b47#2420" class="genmed"></a></span><br />
Wo genau der Fehler liegt, das habe ich noch nicht rausgefunden. Vermutlich hängt das mit der Variable {recent.TOPIC_TITLE} zusammen, die ja normal nur einen String enthält und in diesem Fall dann die 5 Texte enthalten müßte.

Code: Alles auswählen

<!-- BEGIN user_logged_out -->
                <span class="topictitle">{recent.TOPIC_TYPE} <a href="{recent.U_VIEW_TOPIC}" class="genmed">{recent.TOPIC_TITLE}</a></span><br />
<!-- END user_logged_out --> 
Hier gehts zur Test-HP, dort kannst du dir das anschauen.

Für die Laufzeile muß ich mir auch noch was einfallen lassen, das Browserunabhängig ist.

Gruß Helmut
Ich bin nicht ganz dicht.... na und.
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Kann ich mich mal registrieren zum testen oder hast du einen Testaccount zur Verfügung?
Das is aber kein Standard-phpBB oder (zwecks PHPSESSID) ?
Helmut
Mitglied
Beiträge: 2048
Registriert: 27.12.2002 20:35
Wohnort: Augsburg

Beitrag von Helmut »

Hallo Acid,

ich habe einen Testaccount angelegt

Benutzer: Testuser
Passwort 5555

Doch es ist schon ein normales phpbb nur wurde die Homepage drumherum gebaut und einige Änderungen vorgenommen. Die Nachrichtenseite (oben der Button) ist eigentlich das Advancend Guestbook gewesen, nur wurde es so umgebaut, daß es seine Daten wie normale Beiträge ablegt. Ich habe diese Änderungen nicht selbst gemacht, darum kann ich da auch nicht soviel dazu sagen.

Gruß Helmut
Ich bin nicht ganz dicht.... na und.
Antworten

Zurück zu „phpBB 2.0: Mod Support“