public function output($conf = null)
 {
     $t =& peTheme();
     if (empty($conf)) {
         $conf = $t->meta->getDefaultMboxValues(array("settings" => $this->mbox()));
         $conf->id = "";
     }
     parent::output($conf);
     $content =& $t->content;
     $settings =& $conf->settings;
     $custom = !empty($conf->data);
     $loop = $custom ? $t->data->customLoop($conf->data) : $t->content->have_posts();
     if ($loop) {
         $t->template->data($conf);
         $boxed = empty($conf->settings->layout) || $conf->settings->layout === "boxed";
         if ($loadMore = !empty($conf->settings->loadMore) && $conf->settings->loadMore === "yes") {
             add_filter("pe_theme_pager_load_more", array(&$this, "pe_theme_pager_load_more_filter"));
         }
         $bID = empty($conf->id) ? "" : sprintf('id="pe-load-more-blog-%s"', $conf->id);
         printf('<div class="%s" %s>', $boxed ? "pe-container pe-block" : "pe-block", $bID);
         $this->template(empty($settings->layout) ? "" : $settings->layout);
         printf('</div>');
         if ($loadMore) {
             remove_filter("pe_theme_pager_load_more", array(&$this, "pe_theme_pager_load_more_filter"));
         }
         if ($custom) {
             // if custom, reset the loop
             $content->resetLoop();
         }
     } else {
         $this->template("empty");
     }
 }
Example #2
0
 public function output($conf = null)
 {
     $t =& peTheme();
     if (empty($conf)) {
         $conf = $t->meta->getDefaultMboxValues(array("settings" => $this->mbox()));
         $conf->id = "";
     }
     parent::output($conf);
     $content =& $t->content;
     $settings =& $conf->settings;
     $custom = !empty($conf->data);
     $loop = $custom ? $t->data->customLoop($conf->data) : $t->content->have_posts();
     if ($loop) {
         $t->template->data($conf);
         $boxed = empty($conf->settings->layout) || $conf->settings->layout === "boxed";
         printf('<div class="%s">', $boxed ? "pe-container pe-block" : "pe-block");
         $this->template(empty($settings->layout) ? "" : $settings->layout);
         printf('</div>');
         if ($custom) {
             // if custom, reset the loop
             $content->resetLoop();
         }
     } else {
         $this->template("empty");
     }
 }
Example #3
0
 public function output($conf)
 {
     parent::output($conf);
     $t =& peTheme();
     $loop = $t->view->getViewLoop($conf);
     if ($loop) {
         $t->template->data($conf, $loop);
         $this->template();
     }
 }
Example #4
0
 public function output($conf)
 {
     parent::output($conf);
     $t =& peTheme();
     $loop = $t->view->getViewLoop($conf);
     if ($loop) {
         $t->template->data($conf, $loop);
         $boxed = empty($conf->settings->layout) || $conf->settings->layout === "boxed";
         printf('<div class="%s">', $boxed ? "pe-container pe-block" : "pe-block");
         $this->template();
         printf('</div>');
     }
 }