aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authordougk_ff7 <dougk_ff7@users.sourceforge.net>2001-10-16 01:00:47 +0000
committerdougk_ff7 <dougk_ff7@users.sourceforge.net>2001-10-16 01:00:47 +0000
commit8f45c77883d9349e974e19f7db8526176d09f201 (patch)
tree5616afc2168c05c83635e9337497d76912966d91 /phpBB/viewforum.php
parenta1c1036b8c8c1bbb27105df9c4b7b6d11612c888 (diff)
downloadforums-8f45c77883d9349e974e19f7db8526176d09f201.tar
forums-8f45c77883d9349e974e19f7db8526176d09f201.tar.gz
forums-8f45c77883d9349e974e19f7db8526176d09f201.tar.bz2
forums-8f45c77883d9349e974e19f7db8526176d09f201.tar.xz
forums-8f45c77883d9349e974e19f7db8526176d09f201.zip
Just the start to the wonderful world of global announcements. Adds support for them as well as creates a new forum, id -1. Do not delete the forum. I'll write the admin later.
git-svn-id: file:///svn/phpbb/trunk@1215 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 1ad3c7cd96..ee8b398f08 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -435,21 +435,24 @@ if($total_topics)
if($topic_type == POST_ANNOUNCE)
{
$topic_type = $lang['Topic_Announcement'] . " ";
+ $is_announcement = TRUE;
}
else if($topic_type == POST_STICKY)
{
$topic_type = $lang['Topic_Sticky'] . " ";
+ $is_announcement = FALSE;
}
else
{
$topic_type = "";
+ $is_announcement = FALSE;
}
if( $topic_rowset[$i]['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . " ";
}
-
+
$topic_id = $topic_rowset[$i]['topic_id'];
$replies = $topic_rowset[$i]['topic_replies'];
@@ -553,8 +556,14 @@ if($total_topics)
}
}
}
-
- $view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
+ if($is_announcement == TRUE)
+ {
+ $view_topic_url = append_sid("viewtopic.$phpEx?mode=viewannounce&". POST_FORUM_URL . "=" . $forum_id . "&" . POST_TOPIC_URL . "=$topic_id");
+ }
+ else
+ {
+ $view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
+ }
$topic_poster = $topic_rowset[$i]['username'];
$topic_poster_profile_url = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']);
@@ -563,7 +572,14 @@ if($total_topics)
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
$last_post .= ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? $topic_rowset[$i]['user2'] . " " : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $topic_rowset[$i]['id2']) . "\">" . $topic_rowset[$i]['user2'] . "</a> ";
- $last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
+ if($is_announcement == TRUE)
+ {
+ $last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?mode=viewannounce&" . POST_FORUM_URL . "=" . $forum_id . "&" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
+ }
+ else
+ {
+ $last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
+ }
$views = $topic_rowset[$i]['topic_views'];