siv1987 Posted January 13, 2015 Share Posted January 13, 2015 Валидатор микроформатов ругается на два пропущенных сущности в разметке hatom-entry (hatom-feed): Ошибка. Missing required field "updated". Ошибка. Missing required field "entry-title". "updated" в принципе лечится легко добавив его на тот же элемент где published.Внешний вид -> %шаблон% -> Темы -> post (в 3.1x - Темы -> topicViewTemplate)НайтиpublishedЗаменить наpublished updated А на чтобы повесть entry-title?... Есть идея добавить его к автору сообщения. 2 Link to comment Share on other sites More sharing options...
siv1987 Posted January 13, 2015 Author Share Posted January 13, 2015 Раз гуру верстки молчат, решил пока так. В том же шаблоне Темы -> post находим:author vcardЗаменяем на:author vcard entry-title Ниже мы добавляем ответил: чтобы сделать более объемным название сущности entry-title - "%username ответил:". Вы можете его не добавлять, тогда entry-title будет равен только имени автора поста. Для 3.2x-3.4x находим{parse template="userHoverCard" group="global" params="$post['author']"}</span>Заменяем на{parse template="userHoverCard" group="global" params="$post['author']"}<span style="display:none;"> ответил:</span></span>И для гостей, найти: <else /> {parse template="userHoverCard" group="global" params="$post['author']"}Заменить на <else /> <span class="entry-title">{parse template="userHoverCard" group="global" params="$post['author']"}<span style="display:none;"> ответил:</span></span>Для 3.1x находим<a class="url fn" href='{parse url="showuser={$post['author']['member_id']}" base="public" template="showuser" seotitle="{$post['author']['members_seo_name']}"}'>{$post['author']['members_display_name']}</a>Заменяем на<a class="url fn" href='{parse url="showuser={$post['author']['member_id']}" base="public" template="showuser" seotitle="{$post['author']['members_seo_name']}"}'>{$post['author']['members_display_name']}</a><span style="display:none;"> ответил:</span>Для гостей, находим <else /> {$post['author']['members_display_name']} Заменяем на <else /> <span class="entry-title">{$post['author']['members_display_name']}<span style="display:none;"> ответил:</span></span> 2 Link to comment Share on other sites More sharing options...
Viktar83 Posted March 16, 2015 Share Posted March 16, 2015 Ещё ругается на отсутствие "author". просто<span class="author vcard">имя-ник</span>видимо недостаточно, надо что-то вроде<span class="author vcard"><span class="nickname">имя-ник</span></span> или <span class="author vcard"><span class="fn">имя-ник</span></span> http://microformats.org/wiki/hcard Поэтому строка будет выглядеть так:<span itemprop="creator name" class="author vcard"><span class="nickname">{parse template="userHoverCard" group="global" params="$post['author']"}</span></span>А с учётом entry-title, что в сообщении выше:<span itemprop="creator name" class="author vcard entry-title"><span class="nickname">{parse template="userHoverCard" group="global" params="$post['author']"}</span><span style="display:none;"> ответил:</span></span> Только вот не уверен, как более правильно: fn или nickname. Link to comment Share on other sites More sharing options...
siv1987 Posted March 16, 2015 Author Share Posted March 16, 2015 Ещё ругается на отсутствие "author".Это наверное при запрете просмотра профилей, когда не генерируется ссылка на профиль. fn является обязательным. Поэтому строка будет выглядеть так:Здесь лучше сразу править шаблон userHoverCard. Link to comment Share on other sites More sharing options...
Viktar83 Posted March 16, 2015 Share Posted March 16, 2015 Да, в userHoverCard уже стоит fn Link to comment Share on other sites More sharing options...
siv1987 Posted March 16, 2015 Author Share Posted March 16, 2015 Да, в userHoverCard уже стоит fnДля ссылке на профиль. Скорее всего в шаблоне есть вторая часть условия, где вместо ссылки выводится только имя автора, вот там fn видимо отсутствует. 1 Link to comment Share on other sites More sharing options...
Viktar83 Posted March 16, 2015 Share Posted March 16, 2015 Для ссылке на профиль. Скорее всего в шаблоне есть вторая часть условия, где вместо ссылки выводится только имя автора, вот там fn видимо отсутствует.Так и есть. Дописал туда <span class="fn">. Спасибо. <if test="canSeeProfiles:|:$member['member_id'] && ( $this->memberData['g_is_supmod'] || ($this->memberData['g_mem_info'] && ! IPSMember::isInactive($member) ) ) && !$this->request['forcePrint']"> ... <else /> <span class="fn">{$member['members_display_name']}</span> </if> 1 Link to comment Share on other sites More sharing options...
salex Posted May 11, 2016 Share Posted May 11, 2016 У меня еще такая ошибка в валидаторе Яндекса.article ПРЕДУПРЕЖДЕНИЕ: Не выполнено обязательное условие для структурированных сниппетов творческих работ: поле description или articleBody отсутствует или пусто ПРЕДУПРЕЖДЕНИЕ: значение "10 Окт 2013 12:25" в поле dateCreated не является корректными значением даты. Дата должна быть в формате ISO 8601 ПРЕДУПРЕЖДЕНИЕ: поле interactionCount не определено в спецификации http://schema.org/Article itemType = http://schema.org/Article aggregaterating aggregaterating itemType = http://schema.org/AggregateRating ratingcount = 1 ratingvalue = 5 creator = Salex datecreated = 10 Окт 2013 12:25 interactioncount = UserComments:11 Ни у кого такого нет? Как лечить? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now