0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 1860 Просмотров
*

skorpion97

  • Новичок
  • 3
  • 0 / 0
Я извиняюсь, что не в тот раздел, т.к раздела Joomla 1.6 просто нет! Так вот, я однажды переделал шаблон от SiteGround под себя, вот и он:

index.php:

Код
<?php
/**
 * @version $Id: index.php $
 * @package Joomla.Site
 * @copyright Copyright (C) 2009 - 2011 SiteGround.com - All Rights Reserved.
 * @license GNU General Public License version 3 or later; see LICENSE.txt
   
 * This program is free software: you can redistribute it and/or modify
 *  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.

 *  This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// No direct access.
defined('_JEXEC') or die;

JHTML::_('behavior.framework', true);

/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
$tplparams = $app->getTemplate(true)->params;

$sliding_background = $tplparams->get('sliding_background');

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
<!-- The following line loads the template CSS file located in the template folder. -->
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />

<!-- The following line loads the template JavaScript file located in the template folder. It's blank by default. -->

<script type="text/javascript" src="http://davidwalsh.name/dw-content/mootools-1.3.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/CreateHTML5Elements.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/sgmenu.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/AnimateBG.js"></script>
</head>

<body class="page_bg" <?php if($sliding_background) : ?> id="page_bg" <?php endif; ?>>
<div class="wrapper">
<!--<header>
<h1><a href="<?php echo $this->baseurl ?>"><?php echo $app->getCfg('sitename'); ?></a></h1>

<div class="top-menu">
<div id="sgmenu">
<jdoc:include type="modules" name="menuload" />
</div>
</div>

<div id="search">
<jdoc:include type="modules" name="position-0" />
</div>
</header> */-->
<div align="center"><img class="headimg" src="../images/had.png"></img></div>
<div class="topround"></div>
<section id="content">
<?php if( ($this->countModules('position-7')) and ($this->countModules('position-4')) ) : ?>
<div class="maincol">
<?php elseif( !$this->countModules('position-7') and ($this->countModules('position-4') ) ) : ?>
<div class="maincol_w_left">
<?php elseif( ($this->countModules('position-7')) and (!$this->countModules('position-4') ) ) : ?>
<div class="maincol_w_right">
<?php else: ?>
<div class="maincol_full">
<?php endif; ?>

<?php if( $this->countModules('position-7') ) : ?>
<div class="leftcol">
<jdoc:include type="modules" name="position-7" style="rounded"/>
</div>
<?php endif; ?>

<div class="cont">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>

<?php if( $this->countModules('position-4') ) : ?>
<div class="rightcol">
<jdoc:include type="modules" name="position-4" style="rounded"/>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
</section>
<div class="bottomround"></div>
<div class="pusher"></div>
</div>
<footer>
<p style="text-align:center;"><?php $sg = ''; include "templates.php"; ?></p>
</footer>
</body>
</html>

Суть в том что я хочу добавить шапку в самом верху, кодом:

Код
<div align="center"><img class="headimg" src="../images/had.png"></img></div>

Но ничего не получается! Помогите с проблемой!
*

hoock

  • Захожу иногда
  • 378
  • 42 / 0
Re: Проблема с шаблоном Joomla 1.6
« Ответ #1 : 04.02.2012, 19:24:38 »
Было бы лучше еслиб был сайт в сети, но примерно так
сразу после BODY

<body class="page_bg" <?php if($sliding_background) : ?> id="page_bg" <?php endif; ?>>
   <div style="height:100px;width:960px;margin:0 auto;"><img class="headimg" src="../images/had.png"></img></div>
   <div class="wrapper">


Параметры ставьте под себя:
height:100px - высота шапки
width:960px - ширина

и желательно стили закинуть в файл стилей.

вот как-то так! это так на быструю руку.
В случае что помог - спасибо слишком много, пиво и + будет в самый раз *DRINK*
*

skorpion97

  • Новичок
  • 3
  • 0 / 0
Re: Проблема с шаблоном Joomla 1.6
« Ответ #2 : 05.02.2012, 12:06:24 »
У же есть успехи, но всё же, выше предложенным кодом у меня высвечивается всего лишь область для картинки, а самого изображения нет...
Вот скрин:


Заранее благодарю!
« Последнее редактирование: 05.02.2012, 12:14:18 от skorpion97 »
*

skorpion97

  • Новичок
  • 3
  • 0 / 0
Re: Проблема с шаблоном Joomla 1.6
« Ответ #3 : 05.02.2012, 12:29:15 »
Всё решил проблему с отображением изображения (проблема была в url ), картинка появилась но не в центре, в "style=" я пишу text-align="center", но не помогает, также я писал атрибут align="center", но тоже ничего... Помогите пожалуйста! Заранее благодарю!
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Avion Joomla Template

Автор chechelnitskiy

Ответов: 0
Просмотров: 260
Последний ответ 09.03.2024, 12:14:36
от chechelnitskiy
Качественный адаптивный(для мобильных) лендинг пейдж на joomla, как создать?

Автор esert

Ответов: 0
Просмотров: 1015
Последний ответ 18.05.2023, 18:39:17
от esert
Аналог Protostar для Joomla 4

Автор Zegeberg

Ответов: 2
Просмотров: 1520
Последний ответ 22.05.2022, 20:42:45
от Zegeberg
С шаблоном it_milano 1.13.0

Автор chechelnitskiy

Ответов: 7
Просмотров: 1395
Последний ответ 14.05.2022, 18:25:39
от marksetter
Где взять шаблон Cassiopeia от Joomla 4 к Joomla 3?

Автор web1

Ответов: 0
Просмотров: 2060
Последний ответ 25.07.2021, 00:23:53
от web1