Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何修改Jomi Joomla模板_Php_Joomla_Joomla3.0 - Fatal编程技术网

Php 如何修改Jomi Joomla模板

Php 如何修改Jomi Joomla模板,php,joomla,joomla3.0,Php,Joomla,Joomla3.0,我有一个Jomi安装,我看到社交图标被插入到我文章的底部,而我会在标题部分之后显示它们。由于模板设置只允许我打开/关闭社交栏,我应该寻找什么来修改它?我应该查看布局或样式文件夹吗 感觉上,我查看了layouts/com_content/article,其中有一个default.php,看起来像是我文章的模板,但我找不到任何关于social bar的内容,下面是它的内容: <?php /** * @package Warp Theme Framework * @author YO

我有一个Jomi安装,我看到社交图标被插入到我文章的底部,而我会在标题部分之后显示它们。由于模板设置只允许我打开/关闭社交栏,我应该寻找什么来修改它?我应该查看布局或样式文件夹吗

感觉上,我查看了layouts/com_content/article,其中有一个default.php,看起来像是我文章的模板,但我找不到任何关于social bar的内容,下面是它的内容:

<?php

/**
* @package   Warp Theme Framework
* @author    YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

// no direct access
defined('_JEXEC') or die;

// get view
$menu = JSite::getMenu()->getActive();
$view = is_object($menu) && isset($menu->query['view']) ? $menu->query['view'] : null;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params     = $this->item->params;
$images     = json_decode($this->item->images);
$urls       = json_decode($this->item->urls);
$canEdit    = $this->item->params->get('access-edit');
$user       = JFactory::getUser();
?>

<div id="system">
    <?php if ($this->params->get('show_page_heading', 1)) : ?>
    <h1 class="title"><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
    <?php endif; ?>
    <article class="item"<?php if ($view != 'article') printf(' data-permalink="%s"', JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catslug), true, -1)); ?>>
        <?php if ($params->get('show_title')) : ?>
        <header>
            <?php if (!$this->print) : ?>
                <?php if ($params->get('show_email_icon')) : ?>
                <div class="icon email"><?php echo JHtml::_('icon.email',  $this->item, $params); ?></div>
                <?php endif; ?>
                <?php if ($params->get('show_print_icon')) : ?>
                <div class="icon print"><?php echo JHtml::_('icon.print_popup',  $this->item, $params); ?></div>
                <?php endif; ?>
            <?php else : ?>
                <div class="icon printscreen"><?php echo JHtml::_('icon.print_screen',  $this->item, $params); ?></div>
            <?php endif; ?>

            <?php if ($params->get('show_create_date')) : ?>
            <header class="clearfix">
            <time datetime="<?php echo substr($this->item->created, 0,10); ?>" pubdate>
                <span class="day"><?php echo JHTML::_('date',$this->item->created, JText::_('d')); ?></span>
                <span class="month"><?php echo JHTML::_('date',$this->item->created, JText::_('M')); ?></span>
                <span class="year"><?php echo JHTML::_('date',$this->item->created, JText::_('Y')); ?></span>
            </time>
            <?php endif; ?>

            <h1 class="title"><?php echo $this->escape($this->item->title); ?></h1>

            <?php if (($params->get('show_author') && !empty($this->item->author)) || $params->get('show_category')) : ?>
            <p class="meta">
                <?php
                    if ($params->get('show_author') && !empty($this->item->author )) {

                        $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author;

                        if (!empty($this->item->contactid) && $params->get('link_author') == true) {
                            $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
                            $menu = JFactory::getApplication()->getMenu();
                            $item = $menu->getItems('link', $needle, true);
                            $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
                         echo JText::sprintf('<i class="icon-user"></i>');
                            echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author));
                        } else {
                          echo JText::sprintf('<i class="icon-user"></i>');
                            echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author);
                        }

                    }

                    if ($params->get('show_author') && !empty($this->item->author )) {
                        echo '. ';
                    }
                    if ($params->get('show_category')) {
                        echo JText::_('<i class="icon-folder-open-alt"></i>').' ';
                        echo JText::_('TPL_WARP_POSTED_IN').' ';
                        $title = $this->escape($this->item->category_title);
                        $url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';
                        if ($params->get('link_category') AND $this->item->catslug) {
                            echo $url;
                        } else {
                            echo $title;
                        }
                    }
                ?>  
            </p>
            <?php endif; ?>
        </header>
        <?php endif; ?>

        <?php
            if (!$params->get('show_intro')) {
                echo $this->item->event->afterDisplayTitle;
            }

            echo $this->item->event->beforeDisplayContent;

            if (isset ($this->item->toc)) {
                echo $this->item->toc;
            }
        ?>
        <div class="content clearfix">
        <?php
            if ($params->get('access-view')) {
                if (isset($urls) AND ((!empty($urls->urls_position) AND ($urls->urls_position=='0')) OR ($params->get('urls_position')=='0' AND empty($urls->urls_position) ))
                    OR (empty($urls->urls_position) AND (!$params->get('urls_position')))) {
                        echo $this->loadTemplate('links');
                }
                if (isset($images->image_fulltext) and !empty($images->image_fulltext)) {
                    $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext;
                    $class = (htmlspecialchars($imgfloat) != 'none') ? ' class="size-auto align-'.htmlspecialchars($imgfloat).'"' : ' class="size-auto"';
                    $title = ($images->image_fulltext_caption) ? ' title="'.htmlspecialchars($images->image_fulltext_caption).'"' : '';
                    echo '<img'.$class.$title.' src="'.htmlspecialchars($images->image_fulltext).'" alt="'.htmlspecialchars($images->image_fulltext_alt).'" />';
                }

                echo $this->item->text;

                if (isset($urls) AND ((!empty($urls->urls_position)  AND ($urls->urls_position=='1')) OR ( $params->get('urls_position')=='1') )) {
                    echo $this->loadTemplate('links');
                }
            // optional teaser intro text for guests
            } elseif ($params->get('show_noauth') == true AND $user->get('guest')) {
                echo $this->item->introtext;

                // optional link to let them register to see the whole article.
                if ($params->get('show_readmore') && $this->item->fulltext != null) {
                    $link1 = JRoute::_('index.php?option=com_users&view=login');

                    $link = new JURI($link1);
                    echo '<p class="links">';
                    echo '<a href="'.$link.'">';
                    $attribs = json_decode($this->item->attribs);

                    if ($attribs->alternative_readmore == null) {
                        echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
                    } elseif ($readmore = $this->item->alternative_readmore) {
                        echo $readmore;
                        if ($params->get('show_readmore_title', 0) != 0) {
                            echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
                        }
                    } elseif ($params->get('show_readmore_title', 0) == 0) {
                        echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE'); 
                    } else {
                        echo JText::_('COM_CONTENT_READ_MORE');
                        echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
                    }
                    echo '</a></p>';
                }
            }
        ?>
        </div>

        <?php if ($canEdit) : ?>
        <p class="edit"><?php echo JHtml::_('icon.edit', $this->item, $params); ?> <?php echo JText::_('TPL_WARP_EDIT_ARTICLE'); ?></p>
        <?php endif; ?>
        <?php echo $this->item->event->afterDisplayContent; ?>
    </article>
</div>

';
如果($params->get('link_category')和$this->item->catslug){
echo$url;
}否则{
echo$标题;
}
}
?>  


请下一次。。。不要为每个换行符粘贴20个换行符@RobQuist原始文件就是这样的:)
<?php echo $this->item->event->afterDisplayContent; ?>