public function eventRmcommonLoadRightWidgets($widgets) { global $xoopsModule; if (!isset($xoopsModule) || $xoopsModule->getVar('dirname') != 'system' && $xoopsModule->getVar('dirname') != 'mywords') { return $widgets; } // Check edition $id = RMHttpRequest::request('id', 'integer', 0); $op = RMHttpRequest::request('op', 'string', ''); $edit = $op == 'edit' ? 1 : 0; $post = null; if ($edit) { //Verificamos que el software sea válido if ($id <= 0) { $params = ''; } $post = new MWPost($id); } if (defined("RMCSUBLOCATION") && RMCSUBLOCATION == 'new_post') { include_once '../widgets/widget-publish.php'; $widgets[] = mywords_widget_publish($post); include_once '../widgets/widget-post-type.php'; $widgets[] = mywords_widget_post_type($post); include_once '../widgets/widget-image.php'; $widgets[] = mywords_widget_image($post); include_once '../widgets/widget-categories.php'; $widgets[] = mywords_widget_categories($post); include_once '../widgets/widget-tags.php'; $widgets[] = mywords_widget_addtags($post); } return $widgets; }
<h3 class="panel-title"><?php echo $w['title']; ?> </h3> </div> <div class="panel-body"> <?php echo $w['content']; ?> </div> </div> <!-- Add tags --> <?php include 'widgets/widget-tags.php'; $w = mywords_widget_addtags($post); ?> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><?php echo $w['title']; ?> </h3> </div> <div class="panel-body"> <?php echo $w['content']; ?> </div> </div>