Новости Joomla

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

mrfruze

  • Осваиваюсь на форуме
  • 35
  • 0 / 0
Главная страница шаблона
« : 11.11.2014, 11:09:05 »
Добрый день, подскажите как найти файл главной страницы шаблона yoo_vanilla_j15 ?
Задача - нужно вставить в тег head скрипт Google.
Зашел templates/мой шаблон -yoo_vanilla_j15/warp/systems/joomla.1.5/layouts
нашел head.php
Код
<jdoc:include type="head" />
<?php

// load jQuery, if not loaded before
if (!$this->warp->system->application->get('jquery')) {
$this->warp->system->application->set('jquery', true);
$this->warp->system->document->addScript($this->warp->path->url('lib:jquery/jquery.js'));
}

$style_urls  = array_keys($this->warp->stylesheets->get());
$script_urls = array_keys($this->warp->javascripts->get());

// get compressed styles and scripts
if ($compression = $this->warp->config->get('compression')) {
$options = array();

if ($compression >= 2) {
$options['gzip'] = true;
}

if ($compression == 3) {
$options['data_uri'] = true;
}

if ($urls = $this->warp->cache->processStylesheets($style_urls, $options)) {
$style_urls = $urls;
}

if ($urls = $this->warp->cache->processJavascripts($script_urls, $options)) {
$script_urls = $urls;
}

$head = $this->warp->system->document->getHeadData();

if (count($head['styleSheets'])) {
foreach ($head['styleSheets'] as $style => $meta) {
if (preg_match('/\.css$/i', $style) && ($url = $this->warp->cache->processStylesheets(array($style), array_merge($options, array('data_uri' => false))))) {
$style = array_shift($url);
}

$styles[$style] = $meta;
}
$head['styleSheets'] = $styles;
}

if (count($head['scripts'])) {
foreach ($head['scripts'] as $script => $meta) {
if (preg_match('/\.js$/i', $script) && ($url = $this->warp->cache->processJavascripts(array($script), $options))) {
$script = array_shift($url);
}

$scripts[$script] = $meta;
}
$head['scripts'] = $scripts;
}

$this->warp->system->document->setHeadData($head);
}

// add styles
foreach ($style_urls as $style) {
echo '<link rel="stylesheet" href="'.$style.'" type="text/css" />'."\n";
}

// add scripts
foreach ($script_urls as $script) {
echo '<script type="text/javascript" src="'.$script.'"></script>'."\n";
}

// add style declarations
foreach ($this->warp->stylesheets->getDeclarations() as $type => $style) {
  echo '<style type="'.$type.'">'.$style.'</style>'."\n";
}

// add script declarations
foreach ($this->warp->javascripts->getDeclarations() as $type => $script) {
  echo '<script type="'.$type.'">'.$script.'</script>'."\n";
}

$this->output('head');

Подскажите можно ли внизу после
Код
$this->output('head');
  прописать
Код
<script>мой код гула</script>
Или как правильно его вставить и куда?
Сам не программист  - верстальщик.
Спасибо надеюсь на любую подсказку и вашу помощь.
*

mrfruze

  • Осваиваюсь на форуме
  • 35
  • 0 / 0
Re: Главная страница шаблона
« Ответ #1 : 11.11.2014, 14:22:32 »
Ни кто не поможет? >:(
*

darkghost

  • Живу я здесь
  • 2212
  • 97 / 0
Re: Главная страница шаблона
« Ответ #2 : 11.11.2014, 14:33:40 »
пробуйте установить перед
Код
$this->output('head');
*

mrfruze

  • Осваиваюсь на форуме
  • 35
  • 0 / 0
Re: Главная страница шаблона
« Ответ #3 : 11.11.2014, 14:57:31 »
пробуйте установить перед
Код
$this->output('head');
спасибо, т.е внутри php кода?
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Главная страница шаблона
« Ответ #4 : 11.11.2014, 15:07:18 »
спасибо, т.е внутри php кода?
Нет.После <jdoc:include type="head" />, перед <?php
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Как вывести путь до шаблона с помощью API Joomla?

Автор elche

Ответов: 13
Просмотров: 13839
Последний ответ 11.09.2018, 23:48:50
от DK-Scorp
Стили шаблона

Автор karkan25

Ответов: 12
Просмотров: 2972
Последний ответ 21.05.2017, 16:40:32
от karkan25
Проблема с изменением логотипа штатного шаблона rhuk_milkyway Joomla_1.5

Автор Porohok

Ответов: 6
Просмотров: 3287
Последний ответ 22.03.2017, 10:34:23
от Porohok
Настройка неадаптивного шаблона

Автор Zegeberg

Ответов: 4
Просмотров: 3216
Последний ответ 21.06.2016, 00:21:06
от Zegeberg
Редактирование шаблона

Автор gdmitry

Ответов: 1
Просмотров: 2969
Последний ответ 04.06.2016, 20:25:32
от Taatshi