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


PHP Comments::update_comment方法代码示例

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


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

示例1: isset

         // Handle "Post as Anonymous" feature
         $post_author = $post_as_anonymous ? '' : $user;
         $qId = $commentslib->post_new_comment($comments_objectId, $parent_id, $post_author, $_REQUEST["comments_title"], $_REQUEST["comments_data"], $message_id, $in_reply_to, 'n', '', '', isset($_REQUEST['contributions']) ? $_REQUEST['contributions'] : '', $anonymous_name);
         if ($object[0] != "forum") {
             $smarty->assign("comments_parentId", 0);
             // to display all the comments
             $_REQUEST["comments_parentId"] = 0;
         }
         $_REQUEST["comments_reply_threadId"] = $_REQUEST["comments_parentId"];
         // to have the right re:
         $smarty->assign("comments_reply_threadId", $_REQUEST["comments_parentId"]);
         // without the flag
     } else {
         $qId = $_REQUEST["comments_threadId"];
         if ($tiki_p_edit_comments == 'y' && (!isset($forum_mode) || $forum_mode == 'n') || ($tiki_p_forum_post == 'y' || $tiki_p_admin_forum == 'y') && isset($forum_mode) && $forum_mode == 'y' || $commentslib->user_can_edit_post($user, $_REQUEST["comments_threadId"])) {
             $commentslib->update_comment($_REQUEST["comments_threadId"], $_REQUEST["comments_title"], $_REQUEST["comment_rating"], $_REQUEST["comments_data"], 'n', '', '', $comments_objectId, isset($_REQUEST['contributions']) ? $_REQUEST['contributions'] : '');
         }
     }
 }
 if (isset($_REQUEST['contributions'])) {
     unset($_REQUEST['contributions']);
 }
 $object = explode(':', $comments_objectId);
 if ($object[0] == 'forum') {
     // Deal with attachment
     if (($forum_info['att'] == 'att_all' || $forum_info['att'] == 'att_admin' && $tiki_p_admin_forum == 'y' || $forum_info['att'] == 'att_perm' && $tiki_p_forum_attach == 'y') && isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
         $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
         $data = '';
         $fhash = '';
         if ($forum_info['att_store'] == 'dir') {
             $name = $_FILES['userfile1']['name'];
开发者ID:Kraiany,项目名称:kraiany_site_docker,代码行数:31,代码来源:comments.php

示例2: sendForumEmailNotification

                     if ($threadId) {
                         // Deal with mail notifications.
                         include_once 'lib/notifications/notificationemaillib.php';
                         sendForumEmailNotification('forum_post_topic', $_REQUEST['forumId'], $forum_info, $_REQUEST["comments_title"], $_REQUEST["comments_data"], $user, $_REQUEST["comments_title"], $message_id, '', $threadId);
                     }
                 }
                 // PROCESS ATTACHMENT HERE
                 if ($threadId && isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
                     check_ticket('view-forum');
                     $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
                     $commentslib->add_thread_attachment($forum_info, $threadId, $fp, '', $_FILES['userfile1']['name'], $_FILES['userfile1']['type'], $_FILES['userfile1']['size']);
                 }
                 //END ATTACHMENT PROCESSING
                 $commentslib->register_forum_post($_REQUEST["forumId"], 0);
             } elseif ($tiki_p_admin_forum == 'y' || $commentslib->user_can_edit_post($user, $_REQUEST["comments_threadId"])) {
                 $commentslib->update_comment($_REQUEST["comments_threadId"], $_REQUEST["comments_title"], '', $_REQUEST["comments_data"], $_REQUEST["comment_topictype"], $_REQUEST['comment_topicsummary'], $_REQUEST['comment_topicsmiley']);
                 // PROCESS ATTACHMENT HERE
                 if ($threadId && isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
                     check_ticket('view-forum');
                     $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
                     $commentslib->add_thread_attachment($forum_info, $_REQUEST["comments_threadId"], $fp, '', $_FILES['userfile1']['name'], $_FILES['userfile1']['type'], $_FILES['userfile1']['size']);
                 }
                 //END ATTACHMENT PROCESSING
             }
         }
     } else {
         $smarty->assign('msg', tra("Please wait 2 minutes between posts"));
         $smarty->display("error.tpl");
         die;
     }
 } else {
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:tiki-view_forum.php

示例3: explode

         $parent_id = $_REQUEST["comments_parentId"];
     }
     $qId = $commentslib->post_new_comment($comments_objectId, $parent_id, $user, $_REQUEST["comments_title"], $_REQUEST["comments_data"], $message_id, $in_reply_to);
     if ($object[0] != "forum") {
         $smarty->assign("comments_parentId", 0);
         // to display all the comments
         $_REQUEST["comments_parentId"] = 0;
     }
     $_REQUEST["comments_reply_threadId"] = $_REQUEST["comments_parentId"];
     // to have the right re:
     $smarty->assign("comments_reply_threadId", $_REQUEST["comments_parentId"]);
     // without the flag
 } else {
     $qId = $_REQUEST["comments_threadId"];
     if ($tiki_p_edit_comments == 'y' && (!isset($forum_mode) || $forum_mode == 'n') || ($tiki_p_forum_post == 'y' || $tiki_p_admin_forum == 'y') && isset($forum_mode) && $forum_mode == 'y' || $commentslib->user_can_edit_post($user, $_REQUEST["comments_threadId"])) {
         $commentslib->update_comment($_REQUEST["comments_threadId"], $_REQUEST["comments_title"], $_REQUEST["comment_rating"], $_REQUEST["comments_data"]);
     }
 }
 $object = explode(':', $comments_objectId);
 if ($object[0] == 'forum') {
     // Deal with attachment
     if (isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
         $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
         $commentslib->add_thread_attachment($forum_info, $qId, $fp, '', $_FILES['userfile1']['name'], $_FILES['userfile1']['type'], $_FILES['userfile1']['size']);
     }
     // Deal with mail notifications.
     include_once 'lib/notifications/notificationemaillib.php';
     sendForumEmailNotification('forum_post_thread', $qId, $forum_info, $_REQUEST["comments_title"], $_REQUEST["comments_data"], $user, $thread_info['title'], $message_id, $in_reply_to, $_REQUEST['comments_parentId'], $_REQUEST['comments_grandParentId']);
     $commentslib->register_forum_post($_REQUEST["forumId"], $_REQUEST["comments_parentId"]);
 }
 if ($feature_user_watches == 'y' && $wiki_watch_comments == 'y' && isset($_REQUEST["page"])) {
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:comments.php

示例4: sendForumEmailNotification

             include_once 'lib/notifications/notificationemaillib.php';
             sendForumEmailNotification('forum_post_topic', $_REQUEST['forumId'], $forum_info, $_REQUEST['comments_title'], $_REQUEST['comments_data'], $user, $_REQUEST['comments_title'], $message_id, '', $threadId, isset($_REQUEST['comments_parentId']) ? $_REQUEST['comments_parentId'] : 0, isset($_REQUEST['contributions']) ? $_REQUEST['contributions'] : '');
             // Set watch if requested
             if ($prefs['feature_user_watches'] == 'y' && $user && isset($_REQUEST['set_thread_watch']) && $_REQUEST['set_thread_watch'] == 'y') {
                 $tikilib->add_user_watch($user, 'forum_post_thread', $threadId, 'forum topic', $forum_info['name'] . ':' . $_REQUEST["comments_title"], "tiki-view_forum_thread.php?forumId=" . $forum_info['forumId'] . "&comments_parentId=" . $threadId);
             }
         }
     } elseif ($_REQUEST['forumId'] != $prefs['wiki_forum_id']) {
         // the threadId already exists
         $smarty->assign('duplic', 'y');
         unset($_REQUEST['comments_postComment']);
         // not to go in the topic redirection
     }
     $commentslib->register_forum_post($_REQUEST["forumId"], 0);
 } elseif ($tiki_p_admin_forum == 'y' || $commentslib->user_can_edit_post($user, $_REQUEST["comments_threadId"])) {
     $commentslib->update_comment($_REQUEST["comments_threadId"], $_REQUEST["comments_title"], '', $_REQUEST["comments_data"], $_REQUEST["comment_topictype"], $_REQUEST['comment_topicsummary'], $_REQUEST['comment_topicsmiley'], 'forum:' . $_REQUEST["forumId"], isset($_REQUEST['contributions']) ? $_REQUEST['contributions'] : '');
     // TAG Stuff
     $cat_type = 'forum post';
     $cat_objid = $_REQUEST["comments_threadId"];
     $cat_desc = substr($_REQUEST["comments_data"], 0, 200);
     $cat_name = $_REQUEST["comments_title"];
     $cat_href = "tiki-view_forum_thread.php?comments_parentId=" . $_REQUEST["comments_threadId"] . "&forumId=" . $_REQUEST["forumId"];
     include_once "freetag_apply.php";
     // PROCESS ATTACHMENT HERE
     if ($_REQUEST['comments_threadId'] && isset($_FILES['userfile1']) && !empty($_FILES['userfile1']['name'])) {
         if (is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
             check_ticket('view-forum');
             $fp = fopen($_FILES['userfile1']['tmp_name'], "rb");
             $commentslib->add_thread_attachment($forum_info, $_REQUEST["comments_threadId"], $fp, '', $_FILES['userfile1']['name'], $_FILES['userfile1']['type'], $_FILES['userfile1']['size']);
         } else {
             $smarty->assign('msg', $tikilib->uploaded_file_error($_FILES['userfile1']['error']));
开发者ID:Kraiany,项目名称:kraiany_site_docker,代码行数:31,代码来源:tiki-view_forum.php


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