当前位置: 首页>>代码示例>>PHP>>正文


PHP forum_get_subscribe_link函数代码示例

本文整理汇总了PHP中forum_get_subscribe_link函数的典型用法代码示例。如果您正苦于以下问题:PHP forum_get_subscribe_link函数的具体用法?PHP forum_get_subscribe_link怎么用?PHP forum_get_subscribe_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了forum_get_subscribe_link函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: format_string

     if ($forum->visible) {
         $style = '';
     } else {
         $style = 'class="dimmed"';
     }
     $forumlink = "<a href=\"view.php?f={$forum->id}\" {$style}>" . format_string($forum->name, true) . "</a>";
     $discussionlink = "<a href=\"view.php?f={$forum->id}\" {$style}>" . $count . "</a>";
 }
 $row = array($printsection, $forumlink, $forum->intro, $discussionlink);
 if ($usetracking) {
     $row[] = $unreadlink;
     $row[] = $trackedlink;
     // Tracking.
 }
 if ($can_subscribe) {
     $row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes, 'unsubscribed' => $strno, 'forcesubscribed' => $stryes, 'cantsubscribe' => '-'), $cantaccessagroup, false);
 }
 //If this forum has RSS activated, calculate it
 if ($show_rss and $forum->rsstype and $forum->rssarticles) {
     //Calculate the tolltip text
     if ($forum->rsstype == 1) {
         $tooltiptext = get_string("rsssubscriberssdiscussions", "forum", format_string($forum->name));
     } else {
         $tooltiptext = get_string("rsssubscriberssposts", "forum", format_string($forum->name));
     }
     if (empty($USER->id)) {
         $userid = 0;
     } else {
         $userid = $USER->id;
     }
     //Get html code for RSS link
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:index.php

示例2: format_string

 if ($cm->visible) {
     $style = '';
 } else {
     $style = 'class="dimmed"';
 }
 $forumlink = "<a href=\"view.php?f={$forum->id}\" {$style}>" . format_string($forum->name, true) . "</a>";
 $discussionlink = "<a href=\"view.php?f={$forum->id}\" {$style}>" . $count . "</a>";
 $row = array($printsection, $forumlink, $forum->intro, $discussionlink);
 if ($usetracking) {
     $row[] = $unreadlink;
     $row[] = $trackedlink;
     // Tracking.
 }
 if ($can_subscribe) {
     if ($forum->forcesubscribe != FORUM_DISALLOWSUBSCRIBE) {
         $row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes, 'unsubscribed' => $strno, 'forcesubscribed' => $stryes, 'cantsubscribe' => '-'), false, false, true, $subscribed_forums);
     } else {
         $row[] = '-';
     }
     $digestoptions_selector->url->param('id', $forum->id);
     if ($forum->maildigest === null) {
         $digestoptions_selector->selected = -1;
     } else {
         $digestoptions_selector->selected = $forum->maildigest;
     }
     $row[] = $OUTPUT->render($digestoptions_selector);
 }
 //If this forum has RSS activated, calculate it
 if ($show_rss) {
     if ($forum->rsstype and $forum->rssarticles) {
         //Calculate the tolltip text
开发者ID:gwsd2015,项目名称:LogiClass,代码行数:31,代码来源:index.php

示例3: print_container_start

echo '<tr>';
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
    echo '<td style="width:' . $preferred_width_left . 'px" id="left-column">';
    print_container_start();
    blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
    print_container_end();
    echo '</td>';
}
echo '<td id="middle-column">';
print_container_start();
echo skip_main_destination();
if ($forum = forum_get_course_forum($course->id, 'social')) {
    print_heading_block(get_string('socialheadline'));
    $cm = get_coursemodule_from_instance('forum', $forum->id);
    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
    echo '<div class="subscribelink">', forum_get_subscribe_link($forum, $context), '</div>';
    forum_print_latest_discussions($course, $forum, 10, 'plain', '', false);
} else {
    notify('Could not find or create a social forum here');
}
print_container_end();
echo '</td>';
// The right column
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
    echo '<td style="width:' . $preferred_width_right . 'px" id="right-column">';
    print_container_start();
    blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
    print_container_end();
    echo '</td>';
}
echo '</tr>';
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:format.php


注:本文中的forum_get_subscribe_link函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。