aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-07-05 10:44:48 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-07-05 10:44:48 -0400
commitd9fd0cce0a5b323bff785af401e90370a3d73972 (patch)
treefad7e45e42186efaef6365dcb83c6dca87d8ae57 /phpBB/viewtopic.php
parentc54d74ec0ed24a9ee7c0d722eb185f1c8a58aab9 (diff)
parentf1056a9b2fd6e4ff7bc107372e9210bae9e077f0 (diff)
downloadforums-d9fd0cce0a5b323bff785af401e90370a3d73972.tar
forums-d9fd0cce0a5b323bff785af401e90370a3d73972.tar.gz
forums-d9fd0cce0a5b323bff785af401e90370a3d73972.tar.bz2
forums-d9fd0cce0a5b323bff785af401e90370a3d73972.tar.xz
forums-d9fd0cce0a5b323bff785af401e90370a3d73972.zip
Merge PR #759 branch 'nickvergessen/ticket/10811' into develop
* nickvergessen/ticket/10811: [ticket/10811] Make toogle_subscribe more generic so it can toogle all links [ticket/10811] Make it easier for MODs/Extensions to define the alt-text [ticket/10811] Make subscribe/unsubscribe repeatable with AJAX [ticket/10811] Fix AJAX callback alt_text so it can be repeated.
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index b75f4aeccf..0d6e9afd54 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -449,7 +449,9 @@ $viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&a
// Are we watching this topic?
$s_watching_topic = array(
'link' => '',
+ 'link_toggle' => '',
'title' => '',
+ 'title_toggle' => '',
'is_watching' => false,
);
@@ -649,13 +651,15 @@ $template->assign_vars(array(
'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&amp;view=print' : '',
'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;t=$topic_id") : '',
- 'U_WATCH_TOPIC' => $s_watching_topic['link'],
- 'L_WATCH_TOPIC' => $s_watching_topic['title'],
+ 'U_WATCH_TOPIC' => $s_watching_topic['link'],
+ 'U_WATCH_TOPIC_TOGGLE' => $s_watching_topic['link_toggle'],
+ 'S_WATCH_TOPIC_TITLE' => $s_watching_topic['title'],
+ 'S_WATCH_TOPIC_TOGGLE' => $s_watching_topic['title_toggle'],
'S_WATCHING_TOPIC' => $s_watching_topic['is_watching'],
'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&amp;bookmark=1&amp;hash=' . generate_link_hash("topic_$topic_id") : '',
- 'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
- 'L_BOOKMARK_TOPIC_REAL' => $user->lang['BOOKMARK_TOPIC'],
+ 'S_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
+ 'S_BOOKMARK_TOGGLE' => (!$user->data['is_registered'] || !$config['allow_bookmarks'] || !$topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
'S_BOOKMARKED_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? true : false,
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&amp;f=$forum_id") : '',