/** * Decorates an article or block with the art-post style. * * Elements of the $data array: * 'classes' * 'header-text' * 'header-icon' * 'header-link' * 'metadata-header-icons' * 'metadata-footer-icons' * 'content' */ function artxPost($data) { if (is_string($data)) { $data = array('content' => $data); } $classes = isset($data['classes']) && strlen($data['classes']) ? $data['classes'] : ''; artxFragmentBegin("<article class=\"art-post" . $classes . "\">"); artxFragmentBegin("<h2 class=\"art-postheader\">"); if (isset($data['header-text']) && strlen($data['header-text'])) { if (isset($data['header-link']) && strlen($data['header-link'])) { artxFragmentContent('<a href="' . $data['header-link'] . '">' . $data['header-text'] . '</a>'); } else { artxFragmentContent($data['header-text']); } } artxFragmentEnd("</h2>"); artxFragmentBegin("<div class=\"art-postheadericons art-metadata-icons\">"); if (isset($data['metadata-header-icons']) && count($data['metadata-header-icons'])) { foreach ($data['metadata-header-icons'] as $icon) { artxFragment('', $icon, '', ' | '); } } artxFragmentEnd("</div>"); artxFragmentBegin("<div class=\"art-postcontent clearfix\">"); if (isset($data['content']) && strlen($data['content'])) { artxFragmentContent(artxPostprocessPostContent($data['content'])); } artxFragmentEnd("</div>"); return artxFragmentEnd("</article>", '', true); }
artxFragmentBegin('<span class="art-metadata-icons">'); if ($this->params->get('show_pdf_icon')) { artxFragment('', JHTML::_('icon.pdf', $this->article, $this->params, $this->access), '', ' '); } if ($this->params->get('show_print_icon')) { artxFragment('', JHTML::_('icon.print_popup', $this->article, $this->params, $this->access), '', ' '); } if ($this->params->get('show_email_icon')) { artxFragment('', JHTML::_('icon.email', $this->article, $this->params, $this->access), '', ' '); } artxFragmentEnd('</span>', ' | '); if ($canEdit) { artxFragment('', JHTML::_('icon.edit', $this->article, $this->params, $this->access), '', ' | '); } } else { artxFragment('', JHTML::_('icon.print_screen', $this->article, $this->params, $this->access, array('class' => 'art-metadata-icon')), '', ' | '); } artxFragmentEnd("\r\n</div>\r\n"); echo "<div class=\"art-PostContent\">\r\n"; if (!$this->params->get('show_intro')) { echo $this->article->event->afterDisplayTitle; } echo $this->article->event->beforeDisplayContent; if ($this->params->get('show_section') && $this->article->sectionid || $this->params->get('show_category') && $this->article->catid) { ?> <table class="contentpaneopen<?php echo $this->params->get('pageclass_sfx'); ?> "> <tr> <td>
if ($this->params->get('show_url') && $this->article->urls) { artxFragment('', '<a href="http://' . $this->item->urls . '" target="_blank">' . $this->item->urls . '</a>', '', ' | '); } artxFragmentBegin('<span class="art-metadata-icons">'); if ($this->item->params->get('show_pdf_icon')) { artxFragment('', JHTML::_('icon.pdf', $this->item, $this->item->params, $this->access), '', ' '); } if ($this->item->params->get('show_print_icon')) { artxFragment('', JHTML::_('icon.print_popup', $this->item, $this->item->params, $this->access), '', ' '); } if ($this->item->params->get('show_email_icon')) { artxFragment('', JHTML::_('icon.email', $this->item, $this->item->params, $this->access), '', ' '); } artxFragmentEnd('</span>', ' | '); if ($canEdit) { artxFragment('', JHTML::_('icon.edit', $this->item, $this->item->params, $this->access), '', ' | '); } artxFragmentEnd("\r\n</div>\r\n"); echo "<div class=\"art-PostContent\">\r\n"; if (!$this->item->params->get('show_intro')) { echo $this->item->event->afterDisplayTitle; } echo $this->item->event->beforeDisplayContent; if ($this->item->params->get('show_section') && $this->item->sectionid || $this->item->params->get('show_category') && $this->item->catid) { ?> <table class="contentpaneopen<?php echo $this->item->params->get('pageclass_sfx'); ?> "> <tr> <td>