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


PHP Forum::addPost方法代码示例

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


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

示例1: Forum

     $forum = new Forum($db, $user);
     $user->updateLastForumAccess();
     list($result, $totalCount) = $forum->getPosts((int) $params[3], (int) $_GET["limit"] ?: 10, (int) $_GET["index"] ?: 0);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('POST', 'forums/\\d+/topics'):
     $forum = new Forum($db, $user);
     $user->updateLastForumAccess();
     $topicId = $forum->addTopic((int) $params[1], $postdata["subject"], $postdata["sub"] ?: '', $postdata["body"]);
     httpResponse(array("topicId" => $topicId));
     break;
 case validateRoute('POST', 'forums/\\d+/topics/\\d+/posts'):
     $mailbox = new Mailbox($db, $user);
     $forum = new Forum($db, $user, $mailbox);
     $user->updateLastForumAccess();
     $forum->addPost((int) $params[3], $postdata);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('PATCH', 'forums/\\d+/topics/\\d+/posts/\\d+'):
     $forum = new Forum($db, $user);
     $forum->updatePost((int) $params[1], (int) $params[3], (int) $params[5], $postdata["postData"]);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('DELETE', 'forums/\\d+/topics/\\d+/posts/\\d+'):
     $forum = new Forum($db, $user);
     $forum->deletePost((int) $params[1], (int) $params[3], (int) $params[5]);
     httpResponse();
     break;
 case validateRoute('GET', 'forums/users-online'):
     httpResponse($user->getForumOnline());
     break;
开发者ID:lordgabber,项目名称:rartracker,代码行数:31,代码来源:api-v1.php

示例2:

     $forums->moveTopic();
     break;
 case 'deltopic':
     $forums->delTopic();
     break;
 case 'addtopic':
     $forums->addTopic();
     break;
 case 'newtopic':
     $forums->newTopic();
     break;
 case 'newpost':
     $forums->newPost();
     break;
 case 'addpost':
     $forums->addPost();
     break;
 case 'delpost':
     $forums->delPost();
     break;
 case 'addsubscription':
     $forums->setAbo('on');
     break;
 case 'unsubscription':
     $forums->setAbo('off');
     break;
 case 'forumlogin':
     $forums->forumsLogin();
     break;
 case 'change_type':
     $forums->changeType();
开发者ID:laiello,项目名称:avecms,代码行数:31,代码来源:modul.php


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