Commit 61af8176 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

adding help for forums

parent 0f4a07dd
......@@ -98,13 +98,16 @@ $i = 0;
if ($forums) {
foreach ($forums as $forum) {
$forum->subscribe = pieform(array(
'name' => 'subscribe'.$i++,
'name' => 'subscribe_forum' . ($i == 0 ? '' : $i),
'plugintype' => 'interaction',
'pluginname' => 'forum',
'successcallback' => 'subscribe_forum_submit',
'autofocus' => false,
'elements' => array(
'submit' => array(
'type' => 'submit',
'value' => $forum->subscribed ? get_string('Unsubscribe', 'interaction.forum') : get_string('Subscribe', 'interaction.forum')
'value' => $forum->subscribed ? get_string('Unsubscribe', 'interaction.forum') : get_string('Subscribe', 'interaction.forum'),
'help' => $i == 0 ? true : false
),
'forum' => array(
'type' => 'hidden',
......@@ -124,6 +127,7 @@ if ($forums) {
)
)
));
$i++;
}
}
......
<h3>Subscribe to Forum</h3>
<p>If you subscribe you will receive notifications for posts to topics in this forum.</p>
<p>If you unsubscribe you will no longer receive notificatons for posts to topics in this forum.</p>
\ No newline at end of file
<h3>Subscribe to Topic</h3>
<p>If you subscribe you will receive notifications for posts in this topic.</p>
<p>If you unsubscribe you will no longer receive notificatons for posts in this topic.</p>
\ No newline at end of file
<h3>Update</h3>
<p>Select topics by checking the box to the left of each topic, then select how you want the selected topics to be updated.</p>
<p><strong>Subscribe</strong>: you will receive notifications for posts to selected topics.</p>
<p><strong>Unsubscribe</strong>: you will not receive notifications for posts to selected topics.</p>
<h3>Update</h3>
<p>Select topics by checking the box to the left of each topic, then choose an action to update the selected topics.</p>
<p><strong>Subscribe</strong>: you will receive notifications for posts to selected topics.</p>
<p><strong>Unsubscribe</strong>: you will not receive notifications for posts to selected topics.</p>
<p><strong>Sticky</strong>: selected topics will appear at the top of every page</p>
<p><strong>Unsticky</strong>: selected topics will appear no longer appear top of every page.</p>
<p><strong>Open</strong>: all group members will be able to post to selected topics.</p>
<p><strong>Close</strong>: only the group owner and forum moderators will be able to post to selected topics.</p>
......@@ -52,6 +52,11 @@
{/if}
</select>
<input type="submit" name="updatetopics1" value="{str tag="updateselectedtopics" section="interaction.forum"}" class="submit">
{if $moderator}
{contextualhelp plugintype='interaction' pluginname='forum' section='updatemod'}
{else}
{contextualhelp plugintype='interaction' pluginname='forum' section='update'}
{/if}
{/if}
<table>
<tr>
......@@ -89,6 +94,11 @@
{/if}
</select>
<input type="submit" name="updatetopics2" value="{str tag="updateselectedtopics" section="interaction.forum"}" class="submit">
{if $moderator}
{contextualhelp plugintype='interaction' pluginname='forum' section='updatemod'}
{else}
{contextualhelp plugintype='interaction' pluginname='forum' section='update'}
{/if}
{/if}
</form>
......
......@@ -82,12 +82,15 @@ $breadcrumbs = array(
if (!$topic->forumsubscribed) {
$topic->subscribe = pieform(array(
'name' => 'subscribe',
'name' => 'subscribe_topic',
'plugintype' => 'interaction',
'pluginname' => 'forum',
'autofocus' => false,
'elements' => array(
'submit' => array(
'type' => 'submit',
'value' => $topic->topicsubscribed ? get_string('unsubscribefromtopic', 'interaction.forum') : get_string('subscribetotopic', 'interaction.forum')
'value' => $topic->topicsubscribed ? get_string('unsubscribefromtopic', 'interaction.forum') : get_string('subscribetotopic', 'interaction.forum'),
'help' => true
),
'topic' => array(
'type' => 'hidden',
......@@ -184,7 +187,7 @@ function buildpost($postindex, $parentsubject, &$posts){
return $smarty->fetch('interaction:forum:post.tpl');
}
function subscribe_submit(Pieform $form, $values) {
function subscribe_topic_submit(Pieform $form, $values) {
global $USER;
if ($values['type'] == 'subscribe') {
insert_record(
......
......@@ -140,11 +140,14 @@ $breadcrumbs = array(
$forum->subscribe = pieform(array(
'name' => 'subscribe_forum',
'plugintype' => 'interaction',
'pluginname' => 'forum',
'autofocus' => false,
'elements' => array(
'submit' => array(
'type' => 'submit',
'value' => $forum->subscribed ? get_string('unsubscribefromforum', 'interaction.forum') : get_string('subscribetoforum', 'interaction.forum')
'value' => $forum->subscribed ? get_string('unsubscribefromforum', 'interaction.forum') : get_string('subscribetoforum', 'interaction.forum'),
'help' => true
),
'forum' => array(
'type' => 'hidden',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment