Global Announcement MOD und Portal MOD

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.
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

Und diese werden auch in den Foren angezeigt ?

Ist die Box im Portal zu sehen ?

Hast du im ACP eingestellt wieviele GA angezeigt werden sollen ?
(Limit)

Markus
jimxstark
Mitglied
Beiträge: 135
Registriert: 13.05.2004 15:38

Beitrag von jimxstark »

die fetchposts werden angezeigt, ja!

die GA-box ist nichtmal zu sehen, im ACP hab ich ein limit von 2 angegeben!

aber ich hab so im gefühl das da noch was fehlt, denn der will ja z.b. {L_GLOBALANNOUNCEBOX_TITLE} auslesen, nur wo wird denn definiert was {L_GLOBALANNOUNCEBOX_TITLE} ist?!

grüsse
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

Ist die Box im ACP auch aktiviert ?

Auf deinem geposteten Bild ist sie noch deaktiviert ....

Markus
jimxstark
Mitglied
Beiträge: 135
Registriert: 13.05.2004 15:38

Beitrag von jimxstark »

hey,

ja ist aktiviert...

wie gesagt ich danke das prob liegt bei den variablen {L_GLOBALANNOUNCEBOX_TITLE} etc.

denn wenn ich die tabelle aus

<!-- ##### GLOBALANNOUNCEBOX START ##### --> und
<!-- ##### GLOBALANNOUNCEBOX END ##### -->

rausnehme zeigt er zwar die tabellenstruktur aber 0 inhalt...
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Verlinke mal bitte die portal.php als Textdatei ....

Markus
jimxstark
Mitglied
Beiträge: 135
Registriert: 13.05.2004 15:38

Beitrag von jimxstark »

Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

Ich habe das bei mir so gemacht ...

suche:

Code: Alles auswählen

        $template->assign_vars(array(
                'L_RECENT_TITLE' => $lang['Title']
        ));
$template->assign_block_vars('switch_lasttopics_active', array());
}
ersetze mit:

Code: Alles auswählen

        $template->assign_vars(array(
                'L_GLOBALANNOUNCEBOX_TITLE' => $lang['Globalannouncebox_title']
        ));
$template->assign_block_vars('switch_globalannouncebox_active', array());
}
Markus
jimxstark
Mitglied
Beiträge: 135
Registriert: 13.05.2004 15:38

Beitrag von jimxstark »

geändert!

trotzdem wird nix angezeigt... :cry:
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

mach das mal oben wieder rückgängig ... und füge dafür nach ...

Code: Alles auswählen

// LAST TOPICS END
das hier ein:

Code: Alles auswählen

// GLOBAL ANNOUNCEMENT START
if( $introportalmod_config['globalannouncebox_active'] == "1" )
{
$length = $introportalmod_config['lasttopics_length_portal'];
$limit = $introportalmod_config['globalannouncebox_limit'];

$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_type = 3
              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_GLOBAL_ANNOUNCE ) ? $lang['Topic_global_announcement'] .' ': '';
                $topic_type .= ( $line[$i]['topic_type'] == POST_ANNOUNCE ) ? $lang['Topic_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_GLOBAL_ANNOUNCE )
				{
						$folder = $images['folder_global_announce'];
						$folder_new = $images['folder_global_announce_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="gensmall">'.$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="gensmall">' . $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('globalannounce', array(
                        'TOPIC_TITLE' => $topic_title,
                        'TOPIC_TYPE' => $topic_type,
                        'VIEWS' => $views,
                        'REPLIES' => $replies,
                        'GOTO_PAGE' => $goto_page,
						'TOPIC_FOLDER_IMG' => $folder_image,
                        '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
                ));
        }

        $template->assign_vars(array(
                'L_GLOBALANNOUNCEBOX_TITLE' => $lang['Globalannouncebox_title']
        ));
$template->assign_block_vars('switch_globalannouncebox_active', array());
}
// GLOBAL ANNOUNCE END
Markus[/code]
jimxstark
Mitglied
Beiträge: 135
Registriert: 13.05.2004 15:38

Beitrag von jimxstark »

JAWOLL mein bester ;)

das wars nun ist die box sichtbar...spitze....vielen dank!
Antworten

Zurück zu „phpBB 2.0: Mod Support“