да ладно, по-ходу обиженный юзерок не совладал с нервами, вот и пост накатал, да приврал маленько..:)
как раз таки говорит об обратном...
благодарю, че-то я ступил...
атрибут itemprop="photo"
Вариант вижу только через базу mysql, но там под раздачу попадут все картинки в шаблоне..., а хотелось бы только из статей.
народ, неужели никто не знает?
Господа, возник такой вопрос, как всем картинкам из различных статей назначить определенный атрибут? Не каждую же ручками пробегать...
Приветствую. Требуется привести страницы сайта к такому виду:
<div itemscope itemtype="http://webmaster.yandex.ru/vocabularies/enc-article.xml">
<h2 itemprop="title">Барто Агния Львовна</h2>
<meta itemprop="category" content="Детская литература">
<meta itemprop="category" content="Советские писатели">
<div itemprop="content">Барто Агния Львовна [р. 4(17).2.1906, Москва], русская советская поэтесса. Начала
печататься в 1925. Пишет для детей — о жизни советской школы, семьи, пионерах. Автор сборников стихов:
"Братишки" (1928), "Мальчик наоборот" (1934), "Игрушки" (1936), "Снегирь" (1939), "Стихи детям" (1949;
Государственная премия СССР, 1950), "Я расту" (1968) и др., сценариев кинофильмов "Подкидыш" (1939),
"Слон и верёвочка" (1946), "Алеша Птицын вырабатывает характер" (1958) и др. Стихи Б., отмеченные мягким
юмором, ясностью языка, завоевали большую популярность у юных читателей и у взрослых; они переведены на языки
народов СССР и многие иностранные языки.
В прозаических книгах для взрослых "Найти человека" (1969) автор рассказывает о своих поисках семей
детей, потерявшихся во время Великой Отечественной войны. Награждена 3 орденами, а также медалями.
Соч.: Стихи детям, т. 1-2, М., 1966.
</div>
<div itemprop="references">Лит.: Дмитриева В., Агния Барто, М.-Л., 1953; Соловьев Б., Агния Барто, М., 1967.</div>
<div>
<span itemprop="author">Е. А. Таратута</span>.
<span itemprop="source">БСЭ</span>,
<span itemprop="source-date">1969-1978</span>.
<img itemprop="photo" src="http://slovari.yandex.ru/illustrations/bse/fullsize/02222/543420.jpg"></img>
Сам файл я так понимаю правится /components/com_content/views/article/tmpl/default.php
Вот такой там код:
<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$canEdit = ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own'));
?>
<?php if ($this->params->get('show_page_title', 1) && $this->params->get('page_title') != $this->article->title) : ?>
<div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
<?php if ($canEdit || $this->params->get('show_title') || $this->params->get('show_pdf_icon') || $this->params->get('show_print_icon') || $this->params->get('show_email_icon')) : ?>
<table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<tr>
<?php if ($this->params->get('show_title')) : ?>
<td class="contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="100%">
<h1><?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
<a href="<?php echo $this->article->readmore_link; ?>"class="contentpagetitle<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<?php echo $this->escape($this->article->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->article->title); ?>
<?php endif; ?></h1>
</td>
<?php if (!$this->print) : ?>
<?php if ($this->params->get('show_pdf_icon')) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHTML::_('icon.pdf', $this->article, $this->params, $this->access); ?>
<?php if ( $this->params->get( 'show_print_icon' )) : ?>
<?php echo JHTML::_('icon.print_popup', $this->article, $this->params, $this->access); ?>
<?php if ($this->params->get('show_email_icon')) : ?>
<?php echo JHTML::_('icon.email', $this->article, $this->params, $this->access); ?>
<?php if ($canEdit) : ?>
<?php echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?>
<?php echo JHTML::_('icon.print_screen', $this->article, $this->params, $this->access); ?>
</tr>
</table>
<?php if (!$this->params->get('show_intro')) :
echo $this->article->event->afterDisplayTitle;
endif; ?>
<?php echo $this->article->event->beforeDisplayContent; ?>
<?php if (($this->params->get('show_section') && $this->article->sectionid) || ($this->params->get('show_category') && $this->article->catid)) : ?>
<td>
<?php if ($this->params->get('show_section') && $this->article->sectionid && isset($this->article->section)) : ?>
<span>
<?php if ($this->params->get('link_section')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->article->sectionid)).'">'; ?>
<?php echo $this->escape($this->article->section); ?>
<?php echo '</a>'; ?>
<?php if ($this->params->get('show_category')) : ?>
<?php echo ' - '; ?>
</span>
<?php if ($this->params->get('show_category') && $this->article->catid) : ?>
<?php if ($this->params->get('link_category')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catslug, $this->article->sectionid)).'">'; ?>
<?php echo $this->escape($this->article->category); ?>
<?php if (($this->params->get('show_author')) && ($this->article->author != "")) : ?>
<td valign="top">
<span class="small">
<?php JText::printf( 'Written by', ($this->escape($this->article->created_by_alias) ? $this->escape($this->article->created_by_alias) : $this->escape($this->article->author)) ); ?>
<?php if ($this->params->get('show_create_date')) : ?>
<td valign="top" class="createdate">
<?php echo JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC2')) ?>
<?php if ($this->params->get('show_url') && $this->article->urls) : ?>
<a href="http://<?php echo $this->article->urls ; ?>" target="_blank">
<?php echo $this->escape($this->article->urls); ?></a>
<?php if (isset ($this->article->toc)) : ?>
<?php echo $this->article->toc; ?>
<?php echo $this->article->text; ?>
<?php if ( intval($this->article->modified) !=0 && $this->params->get('show_modify_date')) : ?>
<td class="modifydate">
<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'))); ?>
<span class="article_separator"> </span>
<?php echo $this->article->event->afterDisplayContent; ?>
<h2><?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
И как создать специализированное поле, например, "Литература" при добавлении статьи ну и помещалась в <div itemprop="references"></div> как в примере.
Есть ли варианты решения такой задачи? Если кто сомжет, отблагодарю!
Обменом ссылок занимаетесь? Т.е. я Вам пациента (сайт), Вы проводите обмен контекстными ссылками с другими сайтами, не из каталогов, т.е. ручной.
мне тоже, заказал бы!
для такого кол-ва параметры сайта маловаты... доноры хероваты?