Code: Alles auswählen
#
#-----[ OPEN ]-----
#
includes/functions_categories_hierarchy.php
#
#-----[ FIND ]-----
#
// set the unread flag
#
#-----[ BEFORE, ADD ]-----
#
// get the forum notification status
$sql = "SELECT fw.forum_id FROM " . FORUMS_WATCH_TABLE . " fw, " . FORUMS_TABLE . " f
WHERE f.forum_id = fw.forum_id
AND f.forum_notify = 1
AND fw.user_id = " . $userdata['user_id'];
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum watch information", "", __LINE__, __FILE__, $sql);
}
$tree['forum_notify'] = array();
while( $row = $db->sql_fetchrow($result) )
{
$tree['forum_notify'][$row['forum_id']] = TRUE;
}
$db->sql_freeresult($result);
// get the status for allowed forum watchings
$sql = "SELECT forum_id FROM " . FORUMS_TABLE . "
WHERE forum_notify = 1";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain forum watch information", "", __LINE__, __FILE__, $sql);
}
$tree['forum_allow_notify'] = array();
while( $row = $db->sql_fetchrow($result) )
{
$tree['forum_allow_notify'][$row['forum_id']] = TRUE;
}
$db->sql_freeresult($result);
#
#-----[ FIND ]-----
#
switch($tree['type'][$wthis])
{
case POST_FORUM_URL:
$wpgm = append_sid("./viewforum.$phpEx?" . POST_FORUM_URL . '=' . $tree['id'][$wthis]);
break;
case POST_CAT_URL:
$wpgm = append_sid("./index.$phpEx?" . POST_CAT_URL . '=' . $tree['id'][$wthis]);
break;
default:
$wpgm = append_sid("./index.$phpEx");
break;
}
#
#-----[ AFTER, ADD ]-----
#
if ($wdata['forum_id'] != '')
{
$forum_id = $wdata['forum_id'];
if ($tree['forum_notify'][$forum_id] == TRUE)
{
$wname .= '</a> <span class="postdetails">[ '.$lang['Watching_forum_on'].' ]</span>';
}
if ($tree['forum_allow_notify'][$forum_id] == TRUE)
{
$forum_no_watch = '';
}
else
{
$forum_no_watch = '<img src="'.$images['icon_forum_no_watch'].'" border="0" title="'.$lang['Forum_watching_disabled'] . '"/>';
}
}
#
#-----[ FIND ]-----
#
$wlast_post .= '<img src="' . $wfolder_image . '" border="0" alt="' . $wfolder_alt . '" title="' . $wfolder_alt . '" align="middle" /></a>';
#
#-----[ REPLACE WITH ]-----
#
$wlast_post .= $forum_no_watch.'<img src="' . $wfolder_image . '" border="0" alt="' . $wfolder_alt . '" title="' . $wfolder_alt . '" align="middle" /></a>';
#
#-----[ FIND ]-----
#
// send to template
$template->assign_block_vars('catrow', array());
$template->assign_block_vars('catrow.forumrow', array(
#
#-----[ BEFORE, ADD ]-----
#
if ($data['forum_id'] != '')
{
$forum_id = $data['forum_id'];
if ($tree['forum_notify'][$forum_id] == TRUE)
{
$desc .= '<br /><span class="postdetails">[ '.$lang['Watching_forum_on'].' ]</span>';
}
if ($tree['forum_allow_notify'][$forum_id] == TRUE)
{
$forum_no_watch = '';
}
else
{
$forum_no_watch = '<img src="'.$images['icon_forum_no_watch'].'" border="0" title="'.$lang['Forum_watching_disabled'] . '" /> ';
}
}
#
#-----[ FIND ]-----
#
'FORUM_DESC' => $desc,
#
#-----[ AFTER, ADD ]-----
#
'FORUM_NO_WATCH' => $forum_no_watch,
#
#-----[ OPEN ]-----
#
language/lang_english/lang_main.php
#
#-----[ FIND ]-----
#
$lang['You_are_watching_forum'] = 'You are now watching this forum.';
$lang['Forum_watching_disabled'] = 'Watching this forum was disabled';
#
#-----[ AFTER, ADD ]-----
#
$lang['Watching_forum_on'] = '<i>You watch this forum</i>';
#
#-----[ OPEN ]-----
#
language/lang_german/lang_main.php
#
#-----[ FIND ]-----
#
$lang['You_are_watching_forum'] = 'Du beobachtest nun das Forum.';
$lang['Forum_watching_disabled'] = 'Das Beobachten dieses Forums wurde abgeschaltet';
#
#-----[ AFTER, ADD ]-----
#
$lang['Watching_forum_on'] = '<i>Du verfolgst dieses Forum</i>';
#
#-----[ OPEN ]-----
#
templates/subSilver/index_box.tpl
#
#-----[ FIND ]-----
#
<span class="forumlink"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br /></span>
#
#-----[ IN-LINE FIND ]-----
#
<a href="{catrow.forumrow.U_VIEWFORUM}"
#
#-----[ IN-LINE BEFORE, ADD ]-----
#
{catrow.forumrow.FORUM_NO_WATCH}
#
#-----[ OPEN ]-----
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]-----
#
?>
#
#-----[ BEFORE, ADD ]-----
#
$images['icon_forum_no_watch'] = "$current_template_images/icon_forum_no_watch.gif";
#
#-----[SAVE/CLOSE FILES ]-----
#
# EoM-- Snippet erweitert um die Anzeige der nicht verfolgbaren Foren --
Das nötige Icon im Anhang. Einfach mit rechter Maustaste und Speichern unter... herunterladen und unter templates/subSilver/images/ hochladen.

