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


PHP Parse::ParsePost方法代码示例

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


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

示例1: exitWithErrorPage

 }
 $results = $tc_db->GetAll("SELECT id FROM `" . KU_DBPREFIX . "posts` WHERE `boardid` = " . $board_class->board['id'] . " ORDER BY id DESC LIMIT 1");
 if (count($results) > 0) {
     $nextid = $results[0]['id'] + 1;
 } else {
     $nextid = 1;
 }
 $parse_class->id = $nextid;
 // If they are just a normal user, or vip...
 if (isNormalUser($user_authority)) {
     // If the thread is locked
     if ($thread_locked == 1) {
         // Don't let the user post
         exitWithErrorPage(_gettext('Sorry, this thread is locked and can not be replied to.'));
     }
     $post_message = $parse_class->ParsePost($_POST['message'], $board_class->board['name'], $board_class->board['type'], $thread_replyto, $board_class->board['id']);
     // Or, if they are a moderator/administrator...
 } else {
     // If they checked the D checkbox, set the variable to tell the script to display their staff status (Admin/Mod) on the post during insertion
     if (isset($_POST['displaystaffstatus'])) {
         $post_displaystaffstatus = true;
     }
     // If they checked the RH checkbox, set the variable to tell the script to insert the post as-is...
     if (isset($_POST['rawhtml'])) {
         $post_message = $_POST['message'];
         // Otherwise, parse it as usual...
     } else {
         $post_message = $parse_class->ParsePost($_POST['message'], $board_class->board['name'], $board_class->board['type'], $thread_replyto, $board_class->board['id']);
     }
     // If they checked the L checkbox, set the variable to tell the script to lock the post after insertion
     if (isset($_POST['lockonpost'])) {
开发者ID:stormeus,项目名称:Kusaba-Z,代码行数:31,代码来源:board.php

示例2: Board

    $board_class = new Board($board_name);
    if ($board_class->board['locale'] != '') {
        changeLocale($board_class->board['locale']);
    }
} else {
    die('<font color="red">Invalid board.</font>');
}
$board_class->InitializeDwoo();
$board_class->dwoo_data->assign('isexpand', true);
$board_class->dwoo_data->assign('board', $board_class->board);
$board_class->dwoo_data->assign('file_path', getCLBoardPath($board_class->board['name'], $board_class->board['loadbalanceurl_formatted'], ''));
if (isset($_GET['preview'])) {
    require KU_ROOTDIR . 'inc/classes/parse.class.php';
    $parse_class = new Parse();
    if (isset($_GET['board']) && isset($_GET['parentid']) && isset($_GET['message'])) {
        die('<strong>' . _gettext('Post preview') . ':</strong><br /><div style="border: 1px dotted;padding: 8px;background-color: white;">' . $parse_class->ParsePost($_GET['message'], $board_class->board['name'], $board_class->board['type'], $_GET['parentid'], $board_class->board['id']) . '</div>');
    }
    die('Error');
}
$posts = $tc_db->GetAll('SELECT * FROM `' . KU_DBPREFIX . 'posts` WHERE `boardid` = ' . $board_class->board['id'] . ' AND `IS_DELETED` = 0 AND `parentid` = ' . $tc_db->qstr($_GET['threadid']) . ' ORDER BY `id` ASC');
global $expandjavascript;
$output = '';
$expandjavascript = '';
$numimages = 0;
if ($board_class->board['type'] != 1) {
    $embeds = $tc_db->GetAll("SELECT filetype FROM `" . KU_DBPREFIX . "embeds`");
    foreach ($embeds as $embed) {
        $board_class->board['filetypes'][] .= $embed['filetype'];
    }
    $board_class->dwoo_data->assign('filetypes', $board_class->board['filetypes']);
}
开发者ID:stormeus,项目名称:Kusaba-Z,代码行数:31,代码来源:expand.php


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