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


PHP C::m方法代码示例

本文整理汇总了PHP中C::m方法的典型用法代码示例。如果您正苦于以下问题:PHP C::m方法的具体用法?PHP C::m怎么用?PHP C::m使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在C的用法示例。


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

示例1: unset

            if ($_G['setting']['bannedmessages']) {
                $post['groupid'] = $users[$post['authorid']]['groupid'];
            }
            $postlist[$k] = $post;
        }
    }
    unset($uids, $users);
    if ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) {
        $attachlist = getattach(0);
        $attachs = $attachlist['attachs'];
        $imgattachs = $attachlist['imgattachs'];
        unset($attachlist);
    }
    getgpc('infloat') ? include template('forum/post_infloat') : (include template('forum/post'));
} else {
    $modpost = C::m('forum_post', $_G['tid']);
    $bfmethods = $afmethods = array();
    $params = array('subject' => $subject, 'message' => $message, 'special' => $special, 'extramessage' => $extramessage, 'bbcodeoff' => $_GET['bbcodeoff'], 'smileyoff' => $_GET['smileyoff'], 'htmlon' => $_GET['htmlon'], 'parseurloff' => $_GET['parseurloff'], 'usesig' => $_GET['usesig'], 'isanonymous' => $_GET['isanonymous'], 'noticetrimstr' => $_GET['noticetrimstr'], 'noticeauthor' => $_GET['noticeauthor'], 'from' => $_GET['from'], 'sechash' => $_GET['sechash'], 'geoloc' => diconv($_GET['geoloc'], 'UTF-8'));
    if (!empty($_GET['trade']) && $thread['special'] == 2 && $_G['group']['allowposttrade']) {
        $bfmethods[] = array('class' => 'extend_thread_trade', 'method' => 'before_newreply');
    }
    $attentionon = empty($_GET['attention_add']) ? 0 : 1;
    $attentionoff = empty($attention_remove) ? 0 : 1;
    $bfmethods[] = array('class' => 'extend_thread_rushreply', 'method' => 'before_newreply');
    if ($_G['group']['allowat']) {
        $bfmethods[] = array('class' => 'extend_thread_allowat', 'method' => 'before_newreply');
    }
    $bfmethods[] = array('class' => 'extend_thread_comment', 'method' => 'before_newreply');
    $modpost->attach_before_method('newreply', array('class' => 'extend_thread_filter', 'method' => 'before_newreply'));
    if ($_G['group']['allowat']) {
        $afmethods[] = array('class' => 'extend_thread_allowat', 'method' => 'after_newreply');
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:post_newreply.php

示例2: showmessage

     if (!$article['allowcomment']) {
         showmessage('no_privilege_commentadd', '', array(), array('return' => true));
     }
     if ($article['idtype'] == 'blogid') {
         $currentid = $article['id'];
         $currenttype = 'blogid';
     } elseif ($article['idtype'] == 'tid') {
         $currentid = $article['id'];
         $currenttype = 'thread';
     }
 }
 if ($currenttype == 'thread') {
     if ($commentcable[$type] == 'article') {
         $_POST['portal_referer'] = $article_url ? $article_url : 'portal.php?mod=view&aid=' . $id;
     }
     $modpost = C::m('forum_post', $currentid);
     $params = array('subject' => '', 'message' => $_POST['general']);
     $modpost->newreply($params);
     if ($_POST['portal_referer']) {
         $redirecturl = $_POST['portal_referer'];
     } else {
         if ($modnewreplies) {
             $redirecturl = "forum.php?mod=viewthread&tid=" . $currentid;
         } else {
             $redirecturl = "forum.php?mod=viewthread&tid=" . $currentid . "&pid=" . $modpost->pid . "&page=" . $modpost->param('page') . "&extra=" . $extra . "#pid" . $modpost->pid;
         }
     }
     $showmessagecontent = $modnewreplies && $commentcable[$type] != 'article' ? 'do_success_thread_share_mod' : '';
 } elseif ($currenttype == 'article') {
     if (!checkperm('allowcommentarticle')) {
         showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:spacecp_share.php

示例3: getgpc

    getgpc('infloat') ? include template('forum/post_infloat') : (include template('forum/post'));
} else {
    if ($_GET['mygroupid']) {
        $mygroupid = explode('__', $_GET['mygroupid']);
        $mygid = intval($mygroupid[0]);
        if ($mygid) {
            $mygname = $mygroupid[1];
            if (count($mygroupid) > 2) {
                unset($mygroupid[0]);
                $mygname = implode('__', $mygroupid);
            }
            $message .= '[groupid=' . intval($mygid) . ']' . $mygname . '[/groupid]';
            C::t('forum_forum')->update_commoncredits(intval($mygroupid[0]));
        }
    }
    $modthread = C::m('forum_thread');
    $bfmethods = $afmethods = array();
    $params = array('subject' => $subject, 'message' => $message, 'typeid' => $typeid, 'sortid' => $sortid, 'special' => $special);
    $_GET['save'] = $_G['uid'] ? $_GET['save'] : 0;
    if ($_G['group']['allowsetpublishdate'] && $_GET['cronpublish'] && $_GET['cronpublishdate']) {
        $publishdate = strtotime($_GET['cronpublishdate']);
        if ($publishdate > $_G['timestamp']) {
            $_GET['save'] = 1;
        } else {
            $publishdate = $_G['timestamp'];
        }
    } else {
        $publishdate = $_G['timestamp'];
    }
    $params['publishdate'] = $publishdate;
    $params['save'] = $_GET['save'];
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:post_newthread.php

示例4: template

    $imgattachs['unused'] = !$sortid ? $imgattachs['unused'] : '';
    include template('forum/post');
} else {
    if ($_GET['mygroupid']) {
        $mygroupid = explode('__', $_GET['mygroupid']);
        $mygid = intval($mygroupid[0]);
        if ($mygid) {
            $mygname = $mygroupid[1];
            if (count($mygroupid) > 2) {
                unset($mygroupid[0]);
                $mygname = implode('__', $mygroupid);
            }
            $message .= '[groupid=' . intval($mygid) . ']' . $mygname . '[/groupid]';
        }
    }
    $modpost = C::m('forum_post', $_G['tid'], $pid);
    $modpost->param('redirecturl', "forum.php?mod=viewthread&tid={$_G['tid']}&page={$_GET['page']}&extra={$extra}" . ($vid && $isfirstpost ? "&vid={$vid}" : '') . "#pid{$pid}");
    if (empty($_GET['delete'])) {
        if ($isfirstpost) {
            if ($thread['special'] == 1 && ($_G['group']['alloweditpoll'] || $isorigauthor) && !empty($_GET['polls'])) {
            } elseif ($thread['special'] == 3 && $isorigauthor) {
            } elseif ($thread['special'] == 4 && $_G['group']['allowpostactivity']) {
            } elseif ($thread['special'] == 5 && $_G['group']['allowpostdebate']) {
            } elseif ($specialextra) {
                @(include_once DISCUZ_ROOT . './source/plugin/' . $_G['setting']['threadplugins'][$specialextra]['module'] . '.class.php');
                $classname = 'threadplugin_' . $specialextra;
                if (class_exists($classname) && method_exists($threadpluginclass = new $classname(), 'editpost_submit')) {
                    $threadpluginclass->editpost_submit($_G['fid'], $_G['tid']);
                }
            }
        } else {
开发者ID:wait121000,项目名称:discuz3.0forsae,代码行数:31,代码来源:post_editpost.php


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