Lines Matching +full:comment +(+path:plugin +path:discussion) -(+path:plugin +path:discussion +path:lang)

128             print $this->_render($_REQUEST['comment']);
204 * Handles comment actions, dispatches data processing routines
222 if (in_array($_REQUEST['comment'], array('add', 'save'))) {
268 switch ($_REQUEST['comment']) {
272 $comment['user']['id'] = $_SERVER['REMOTE_USER'];
273 $comment['user']['name'] = $INFO['userinfo']['name'];
274 $comment['user']['mail'] = $INFO['userinfo']['mail'];
281 $comment['user']['id'] = 'test'.hsc($_REQUEST['user']);
282 $comment['user']['name'] = hsc($_REQUEST['name']);
283 $comment['user']['mail'] = hsc($_REQUEST['mail']);
286 … $comment['user']['address'] = ($this->getConf('addressfield')) ? hsc($_REQUEST['address']) : '';
287 … $comment['user']['url'] = ($this->getConf('urlfield')) ? $this->_checkURL($_REQUEST['url']) : '';
288 … $comment['subscribe'] = ($this->getConf('subscribe')) ? $_REQUEST['subscribe'] : '';
289 $comment['date'] = array('created' => $_REQUEST['date']);
290 $comment['raw'] = cleanText($_REQUEST['text']);
293 $comment['show'] = false;
295 $comment['show'] = true;
297 $this->_add($comment, $repl);
317 * Main function; dispatches the visual comment actions
326 switch ($_REQUEST['comment']) {
337 * Redirects browser to given comment anchor
412 // set status to show the comment form
450 // comment form
488 * Adds a new comment and then displays all comments
490 * @param array $comment
494 protected function _add($comment, $parent) { argument
498 $otxt = $TEXT; // set $TEXT to comment text for wordblock check
499 $TEXT = $comment['raw'];
508 && ($comment['user']['id'] != $_SERVER['REMOTE_USER'])
527 if ($comment['date']['created']) {
528 $date = strtotime($comment['date']['created']);
537 $cid = md5($comment['user']['id'].$date); // create a unique id
540 $parent = NULL; // invalid parent comment
543 // render the comment
544 $xhtml = $this->_render($comment['raw']);
546 // fill in the new comment
548 'user' => $comment['user'],
550 'raw' => $comment['raw'],
554 'show' => $comment['show']
557 if($comment['subscribe']) {
558 $mail = $comment['user']['mail'];
580 // update parent comment
592 // save the comment metadata file
601 * Saves the comment with the given ID and then displays all comments
611 if(!$cids) return false; // do nothing if we get no comment id
616 $otxt = $TEXT; // set $TEXT to comment text for wordblock check
643 // someone else was trying to edit our comment -> abort
669 } elseif ($act == 'show') { // show comment
673 $type = 'sc'; // show comment
675 } elseif ($act == 'hide') { // hide comment
679 $type = 'hc'; // hide comment
681 } elseif (!$raw) { // remove the comment
685 $type = 'dc'; // delete comment
687 } else { // save changed comment
690 // now change the comment's content
695 $type = 'ec'; // edit comment
699 // save the comment metadata file
708 * Recursive function to remove a comment
721 * Prints an individual comment
731 if (!isset($data['comments'][$cid])) return false; // comment was removed
732 $comment = $data['comments'][$cid];
734 if (!is_array($comment)) return false; // corrupt datatype
736 if ($comment['parent'] != $parent) return true; // reply to an other comment
738 if (!$comment['show']) { // comment hidden
745 // print the actual comment
747 // replies to this comment entry?
764 $comment = $data['comments'][$cid];
766 // comment head with date and user data
773 if (is_array($comment['user'])) { // new format
774 $user = $comment['user']['id'];
775 $name = $comment['user']['name'];
776 $mail = $comment['user']['mail'];
777 $url = $comment['user']['url'];
778 $address = $comment['user']['address'];
780 $user = $comment['user'];
781 $name = $comment['name'];
782 $mail = $comment['mail'];
783 $url = $comment['url'];
784 $address = $comment['address'];
786 if (is_array($comment['date'])) { // new format
787 $created = $comment['date']['created'];
788 $modified = $comment['date']['modified'];
790 $created = $comment['date'];
791 $modified = $comment['edited'];
832 // main comment content
835 echo ($HIGH?html_hilight($comment['xhtml'],$HIGH):$comment['xhtml']).DOKU_LF;
842 if (($data['status'] == 1) && !$reply && $comment['show']
851 … $label = ($comment['show'] ? $this->getLang('btn_hide') : $this->getLang('btn_show'));
881 $comment = $data['comments'][$cid];
882 if (!count($comment['replies'])) {
886 $visible = ($comment['show'] && $visible);
887 foreach ($comment['replies'] as $rid) {
934 * Outputs the comment form
952 if (!$raw && ($_REQUEST['comment'] == 'show')) {
962 <input type="hidden" name="comment" value="<?php echo $act ?>" />
964 // for adding a comment
976 …<input type="text" class="edit<?php if($_REQUEST['comment'] == 'add' && empty($_REQUEST['name'])) …
982 …<input type="text" class="edit<?php if($_REQUEST['comment'] == 'add' && empty($_REQUEST['mail'])) …
1012 // allow setting the comment date
1024 // for saving a comment
1042 …<textarea class="edit<?php if($_REQUEST['comment'] == 'add' && empty($_REQUEST['text'])) echo ' er…
1104 <input type="hidden" name="comment" value="<?php echo $act ?>" />
1224 * Sends a notify mail on new comment
1226 * @param array $comment data array of the new comment
1232 protected function _notify($comment, &$subscribers) { argument
1249 'DATE' => dformat($comment['date']['created'], $conf['dformat']),
1250 'NAME' => $comment['user']['name'],
1251 'TEXT' => $comment['raw'],
1252 'COMMENTURL' => wl($ID, '', true) . '#comment_' . $comment['cid'],
1329 // notify comment subscribers
1360 foreach ($data['comments'] as $comment) {
1361 if ($comment['parent']) continue;
1362 if (!$comment['show']) continue;
1364 $rids = $comment['replies'];
1392 * Renders the comment text
1541 if ($_REQUEST['comment'] == 'save') {
1542 $_REQUEST['comment'] = 'edit';
1543 } elseif ($_REQUEST['comment'] == 'add') {
1544 $_REQUEST['comment'] = 'show';
1565 if ($_REQUEST['comment'] == 'save') {
1566 $_REQUEST['comment'] = 'edit';
1567 } elseif ($_REQUEST['comment'] == 'add') {
1568 $_REQUEST['comment'] = 'show';
1633 if (!isset($data['comments'][$cid])) return false; // comment was removed
1634 $comment = $data['comments'][$cid];
1636 if (!is_array($comment)) return false; // corrupt datatype
1637 if ($comment['parent'] != $parent) return false; // reply to an other comment
1638 if (!$comment['show']) return false; // hidden comment
1640 $text = utf8_strtolower($comment['raw']);
1645 if (is_array($comment['replies'])) { // and the replies
1646 foreach ($comment['replies'] as $rid) {
1656 * Saves the current comment status and title in the .comments file
1694 * Adds the words of a given comment to the index
1703 if (!isset($data['comments'][$cid])) return ''; // comment was removed
1704 $comment = $data['comments'][$cid];
1706 if (!is_array($comment)) return ''; // corrupt datatype
1707 if ($comment['parent'] != $parent) return ''; // reply to an other comment
1708 if (!$comment['show']) return ''; // hidden comment
1710 $text = $comment['raw']; // we only add the raw comment text
1711 if (is_array($comment['replies'])) { // and the replies
1712 foreach ($comment['replies'] as $rid) {