From 62d483e51df3d070102b7693a57a2c550101561e Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 8 Nov 2017 11:22:24 -0800 Subject: [PATCH] Comments example added to _blank --- e107_plugins/_blank/_blank.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/e107_plugins/_blank/_blank.php b/e107_plugins/_blank/_blank.php index c87216db8..a5ae95368 100644 --- a/e107_plugins/_blank/_blank.php +++ b/e107_plugins/_blank/_blank.php @@ -47,6 +47,7 @@ class _blank_front // print_a($rows); foreach($rows as $key=>$value) // loop throug { + // $sc->setVars($value); // if shortcodes are enabled. $text .= $tp->toHtml($value['blank_type'])."
"; } @@ -59,7 +60,30 @@ class _blank_front } + private function renderComments() + { + /** + * Returns a rendered commenting area. (html) v2.x + * This is the only method a plugin developer should require in order to include user comments. + * @param string $plugin - directory of the plugin that will own these comments. + * @param int $id - unique id for this page/item. Usually the primary ID of your plugin's database table. + * @param string $subject + * @param bool|false $rate true = will rendered rating buttons, false will not. + * @return null|string + */ + + $plugin = '_blank'; + $id = 3; + $subject = 'My blank item subject'; + $rate = true; + + $ret = e107::getComment()->render($plugin, $id, $subject, $rate); + + e107::getRender()->tablerender($ret['caption'],$ret['comment_form']. $ret['comment']); + + + }