Можно ли в RSS-фид добавить свою ссылку дополнительно?

Контента через RSS воруют много… Можно ли как-то добавлять в фид дополнительную ссылку. Например на свой сайт. То есть, если уж кто-то транслирует твой РСС-канал, так чтобы в каждой выводимой на стороне новости ссылка была на сайт-донор.

Я тут нашел пару плагинов, но они почему-то ни хрена не добавляют. Вернее добавляют, но только в виде обычного текста. Выводится только текстовый якорь ссылки, а html-теги вырезаются. Ссылки, как таковой, нет.

плагин copyrightfeeds.php

<?php
/*
Plugin Name: Angsuman's Feed Copyrighter
Plugin URI: http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/
Description: Inserts copyright message in Feeds. The message is of the standard format (can be customized): Copyright &copy; 2005 <strong><a href="http://YOUR_BLOG_SITE/">YOUR BLOG NAME</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@BLOG_ADDRESS so we can take legal action immediately.
Author: Angsuman Chakraborty
Author URI: http://blog.taragana.com/
Version: 1.0
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
*/
// Change this to your email address to handle legal affairs. The default is legal@YOUR_SERVER_NAME.
$legal = '';

// Change $message to a legal blurb of your choice
$message = '"<u>йа</u><a href="#">копирайт</a><span>этого блога</span>"';

// You should not change below this line.
// -------------------------------------

// This creates a default email address for legal matters if it hasn't been spoecified above.
// For example for my blog - blog.taragana.com the default email address is legal@blog.taragana.com
if(!$legal) {
    $legal = 'legal@' . $_SERVER['SERVER_NAME'];
}

// This is the final copyright message.
// WARNING: It is a php expression so be very very careful if you really want to change this. If you are modifying this you are on your own buddy.
$copyright = 'Copyright &copy; ' . date("Y") . ' <strong><a href="' . get_bloginfo('url') . '">' . get_bloginfo('name') . '</a></strong>. ' . $message . ' Транслировать запрещено.';

function addCopyrightToFeed($content) {
    global $copyright;
    // Little attribution for our hard work. It helps others to find about this plugin.
    $pluginmessage = ' ';
    if(is_feed()) {
        return $content.$copyright;
    } else {
        return $content;
    }
}
add_filter('the_content', 'addCopyrightToFeed');
?>

спасибо не мне а ивану

http://www.wordpressplugins.ru/cat-rss/ozh-better-feed.html

плагин copyrightfeeds.php

<?php
/*
Plugin Name: Angsuman's Feed Copyrighter
Plugin URI: http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/
Description: Inserts copyright message in Feeds. The message is of the standard format (can be customized): Copyright &copy; 2005 <strong><a href="http://YOUR_BLOG_SITE/">YOUR BLOG NAME</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@BLOG_ADDRESS so we can take legal action immediately.
Author: Angsuman Chakraborty
Author URI: http://blog.taragana.com/
Version: 1.0
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
*/
// Change this to your email address to handle legal affairs. The default is legal@YOUR_SERVER_NAME.
$legal = '';

// Change $message to a legal blurb of your choice
$message = '"<u>йа</u><a href="#">копирайт</a><span>этого блога</span>"';

// You should not change below this line.
// -------------------------------------

// This creates a default email address for legal matters if it hasn't been spoecified above.
// For example for my blog - blog.taragana.com the default email address is legal@blog.taragana.com
if(!$legal) {
    $legal = 'legal@' . $_SERVER['SERVER_NAME'];
}

// This is the final copyright message.
// WARNING: It is a php expression so be very very careful if you really want to change this. If you are modifying this you are on your own buddy.
$copyright = 'Copyright &copy; ' . date("Y") . ' <strong><a href="' . get_bloginfo('url') . '">' . get_bloginfo('name') . '</a></strong>. ' . $message . ' Транслировать запрещено.';

function addCopyrightToFeed($content) {
    global $copyright;
    // Little attribution for our hard work. It helps others to find about this plugin.
    $pluginmessage = ' ';
    if(is_feed()) {
        return $content.$copyright;
    } else {
        return $content;
    }
}
add_filter('the_content', 'addCopyrightToFeed');
?>

спасибо не мне а ивану

Установил и активировал, потом посмотрел свой фид на двух онлайн сервисах:

http://www.newsrss.ru/ – ситуация та же, что и с ранее найденными мною плагинами. Копирайт выводится просто текстом без ссылки

http://liverss.ru/ – вообще не выводит копирайта, как будто его нет.

Глянул еще на сайте, на котором транслируется мой фид – тоже нет копирайта.

пробуем отключить все плагины работающие с фидом, подключаем этот, и не спеша включая оставшиеся смотрим, где происходит обрыв.

Установил и активировал, потом посмотрел свой фид на двух онлайн сервисах:

http://www.newsrss.ru/ - ситуация та же, что и с ранее найденными мною плагинами. Копирайт выводится просто текстом без ссылки

http://liverss.ru/ - вообще не выводит копирайта, как будто его нет. 

Глянул еще на сайте, на котором транслируется мой фид - тоже нет копирайта.

вы шутите? эти сервисы берут не полный текст фида, а лишь <description> (цитату), в которой по умолчанию все html-теги вырезаются. причем не на стороне этих читалок, а самим вордпрессом.

Anonymous
Отправить
Ответ на: