コード例 #1
0
ファイル: default.php プロジェクト: kidaa30/lojinha
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DJ-MediaTools is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DJ-MediaTools. If not, see <http://www.gnu.org/licenses/>.
 *
 */
defined('_JEXEC') or die;
$item = $this->slides[$this->current];
$albumLink = JRoute::_(DJMediatoolsHelperRoute::getCategoryRoute($this->album->id . ($this->album->alias ? ':' . $this->album->alias : ''), $this->album->parent_id));
?>

<div id="djmediatools" class="dj-album djmediatools<?php 
echo $this->params->get('pageclass_sfx');
echo $this->params->get('show_album_title') ? '' : ' no-title';
?>
" data-album-url="<?php 
echo $albumLink;
?>
">
	
	<?php 
if ($this->params->get('show_album_title')) {
    ?>
		<h1 class="dj-album-title"><?php 
コード例 #2
0
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $pathway = $app->getPathway();
     $title = null;
     JHTML::_('behavior.framework');
     $this->document->addScript('components/com_djmediatools/assets/js/default.js');
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     $menu = $menus->getActive();
     if ($menu) {
         $this->params->def('page_heading', $this->params->get('page_title', $menu->title));
     } else {
         $this->params->def('page_heading', JText::_('COM_DJMEDIATOOLS'));
     }
     $title = $this->params->get('page_title', '');
     $id = (int) @$menu->query['id'];
     // if the menu item does not concern this article
     if ($menu && ($menu->query['option'] != 'com_djmediatools' || $menu->query['view'] != 'category' || $id != $this->category->id)) {
         if ($this->category->title) {
             $title = $this->category->title;
         }
         $path = array(array('title' => $title, 'link' => ''));
         $model = JModelLegacy::getInstance('Categories', 'DJMediaToolsModel', array('ignore_request' => false));
         $category = $model->getItem($this->category->parent_id);
         if ($category) {
             while ($category != 'root' && ($menu->query['option'] != 'com_djmediatools' || $id != $category->id)) {
                 $category->slug = $category->alias ? $category->id . ':' . $category->alias : $category->id;
                 $path[] = array('title' => $category->title, 'link' => JRoute::_(DJMediatoolsHelperRoute::getCategoryRoute($category->slug, $category->parent_id)));
                 $category = $model->getItem($category->parent_id);
             }
         }
         $path = array_reverse($path);
         foreach ($path as $item) {
             $pathway->addItem($item['title'], $item['link']);
         }
     }
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     $this->document->setTitle($title);
     if ($this->params->get('menu-meta_description')) {
         $this->document->setDescription($this->params->get('menu-meta_description'));
     }
     if ($this->params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
     }
     if ($this->params->get('robots')) {
         $this->document->setMetadata('robots', $this->params->get('robots'));
     }
 }
コード例 #3
0
 * (at your option) any later version.
 *
 * DJ-MediaTools is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DJ-MediaTools. If not, see <http://www.gnu.org/licenses/>.
 *
 */
defined('_JEXEC') or die;
?>

<a class="dj-category" href="<?php 
echo JRoute::_(DJMediatoolsHelperRoute::getCategoryRoute($this->item->slug, $this->item->parent_id));
?>
">
	<span class="dj-category-in" style="width: <?php 
echo $this->params->get('cwidth', 200);
?>
px; height: <?php 
echo $this->params->get('cheight', 150);
?>
px;
		background-image: url(<?php 
echo $this->item->thumb;
?>
); background-position: center center; background-repeat: no-repeat;">		
		<?php 
if ($this->params->get('show_cat_titles')) {