How to connect Rss channels. Creation and configuration of RSS feed. Optional RSS Feed Elements

Makes it possible to quickly broadcast news and updates to readers. This format is somewhat outdated, but the audience of users is still large. The ability to organize RSS feeds is included in many popular engines, such as WordPress, Joomla, Drupal and many others. In some places this feature is standard, in others it is implemented using plugins. It doesn’t make much sense to consider the process of installing plugins, so we’ll try to figure out how to organize an RSS feed on our own, without using plugins.

RSS feed for a static site on html

To begin with, we will look at a manual method that allows you to implement news broadcasting on any website, even a static one built on bare html pages. We will create this functionality using simple code, which is placed in the rss.xml file at the root of the site:

- this line indicates the encoding <span>News from Site.ru</span>- indicate the name of the news feed http://site.ru/rss.xml- indicate the address of the feed News feed from Site.ru- enter a description of our feed Fri, 03 Jul 2015 17:51:00 +0300- date of last update of the feed - indicate the news title http://site.ru/news1.html- indicate the address of the page with the full news - enter a brief summary of the news

If necessary, in this code you can specify the language of the feed, which is necessary when registering it in some RSS feed directories, as well as add additional elements.

The presented code is updated manually. That is, to make changes you need to open the rss.xml file and enter new data into it. Need some news? Then the edited file with the tape should contain several structures of the following form:

<span>A new section has opened on our website</span> http://site.ru/news1.html A new section has opened on our website, we invite everyone to familiarize themselves with the new information

Each such construction is a separate piece of news, which is located between the item tags. As news is added, old entries can be deleted. The number of entries can be any, but you shouldn’t include more than 10 of the latest news - it’s unlikely that anyone will need outdated entries.

We automate the creation of RSS feeds

Let's assume that our website was created on a custom CMS, or on a CMS that does not have an RSS feed. In this case, you need to understand the structure of the MySql database used to store data and find out how data about page titles, their addresses and the contents of news pages is stored. Having understood the structure of the database, it is necessary to slightly modernize the file with the RSS feed. First, let's give it another extension so that it can execute the PHP code necessary to work with the MySql database. Otherwise, our RSS feed will not work. The internal contents of the file also need to be reworked:

  • We implement a connection to the database;
  • We select the required data, setting a limit on the last 10 records;
  • We display the contents of the received variables in a loop;

Everything is clear with the first point - we need to connect to the database to retrieve information from there. The second point is also clear - we need to get 10 dates, 10 id links to news pages, 10 news headlines and 10 news bodies. In the third text, we sequentially display everything that we published between the item tags in the manual format of our RSS feed. Thus, having understood the structure of the database, we can organize an RSS feed for any resource. This approach is good because we do not touch the CMS source code and do not create additional loads on the hosting - this is the problem with some plugins that load sites with kilometers of unnecessary code. In addition, our technique will allow you to get rid of possible errors in the functionality of the existing website at the stage of implementing an RSS feed. The maximum that can happen is that you receive the wrong data that is needed to create a feed on our website.

Now let's look at the code itself:

News from Site.ru http://site.ru/rss.php News feed from Site.ru"; $result=MYSQL_QUERY("SELECT id, title, text, date, FROM article ORDER BY date DESC LIMIT 10"); while ($row=MYSQL_FETCH_ARRAY($result)) ( $id=$row["id"] ; $title=$row["title"]; $text=$row["text"]; $date=$row["date"]; echo " $title link to article indicating id $text $date "; ) echo " "; ?>

The first lines of this code are similar to the manual code described above and contain general information about our news feed - the title, description and full address of the feed. There is no date for the last update of the feed, but it can be implemented by updating the source code. Next, the necessary data is selected from the MySql database and the RSS feed generation cycle is started.

Everything is clear with the date of the news, its text and title - they are derived from the variables $title , $text and $date . As for the link to the full news, its id is taken here, after which we can generate a full link, based on the structure of link formation on our site. For example, links may look like http://site.ru/news.php?id=48. Here we describe only the general principle of link formation, therefore, during practical implementation, appropriate changes must be made to the above code.

As soon as the formation of the rss.php file is ready, we can upload it to the hosting and start testing.

Useful tips
When visiting some sites, we can see in the address bar of the browser a direct link to the RSS feed of these sites. In order to keep up with fashion, we will carry out another modernization of our site and add just one line of code to it:

Hello friends of my blog site! When you create a personal resource, you are probably attracted not only by the prospect of self-expression through articles and the possibility of receiving additional or main profit? In most cases, it is very important to see the result of your work in the form of the number of subscribers who regularly read his articles with great interest. That's why I decided to tell you what an RSS feed is and why subscribers like to read news from different sites using it.

What are the benefits of RSS?

We are all busy people and almost everyone has a list of important things to do for the day. Even if you like a certain site, it’s unlikely that you will visit it every day in the hope of seeing a new publication, right? RSS helps a user explore news articles from sites he or she subscribes to in an organized manner through a feed or email. And the webmaster benefits from the feed in the form of regular, growing traffic. In the end, everyone is happy. 🙂

How to create a news feed?

If you have a blog on the WordPress engine, then you need to start with the following.

I suggest you check out the automated method, but keep in mind that you can also tape manually. How exactly to create it is up to you to choose.

So, a service from Google will come to our aid - feedburner.

When you follow the link, you will see that the system welcomes you as if it were family, addressing you by your nickname (or rather, your gmail email address). If you don't already have a Google mailbox, be sure to. It is more reliable than mailboxes and many others; it will definitely come in handy for the development of a Wordpress website and other work.

If you are not an English speaker, you can change the text display language. To do this, click on the word “ Languages", located in the upper right corner and select " Russian ».

Now you should enter the address of your blog and add the word “ feed" as shown in the image below. Done? Press the button " Next ».

The system prompts you to write the name of your feed or agree to the automatic option.

Feedburner invites you to sign up for its newsletter. Be sure to agree and move on to the next step. The feed from the example will be at: http://feeds.feedburner.com/ stroitelstvo-i-remont-domov:

You can limit yourself to free feed management functions, but if you wish, choose additional services on a paid basis:

If you did everything correctly, you will go to this window:

You can go to the tabs, see the number of subscribers in the “ tab Analyze" and see how the feed is displayed in the " Optimize», « Your feed" Make adjustments if desired.

Installing a plugin for working with the feed

Now let's move on to the most interesting part - installing a plugin for the site. I recommend you Feedburner Form Russian version.

After downloading and activation, it can be found in the tab of the same name in the “ Plugins ».

Designed in the form of a widget:

After adding the widget, let's move on to filling out the form. A few more simple clarifications and the form will work!

The following fields must be filled in:

  • Headline: news subscription/RSS feed and so on. Choose what you like best.
  • I personally will leave the widget text empty, but you can write something if you wish. For example " Stay up to date with blog news! " and so on.
  • The link to the icon assumes the path to the RSS image that will be displayed next to the form (use png format). You need to select it on the Internet and upload it to the website in a folder with images.
  • The button text can be left as default " OK"or choose another option: " forward" , "subscribe" .
  • I recommend entering the text in the email field as follows: "Enter your email" .
  • Link to the feed in our case: stroitelstvo-i-remont-domov .
  • Configure the remaining data at your own discretion.

The end result will be something like this:

To edit the form's design styles, you can go to the file " fbstyle.css"in the plugin folder" control ».

To be able to share links to new blog posts on multiple social networks, follow these steps:


You can also activate " FeedFlare", which will add buttons for reposting on social networks under each of your posts.

Subscription activation

To activate your subscription, go to the " Publish", tab " Email Subscriptions ", change the default language to Russian and click " activate " or " save" Now your subscribers will be able to subscribe to new publications and keep abreast of your progress on the site.

In the " Communication preferences » you can register a message for those who want to subscribe to the newsletter. " Email branding" allows you to customize the appearance of your emails, and " Delivery Options» set the time for sending emails. Also activate " PingShot ».

There are many high-quality RSS aggregators through which you can promote your feeds, as well as other proven methods, but more about them next time. Subscribe to blog updates, I will be sincerely glad to see you!

Until next time.

P/S

Best regards, Alexander Sergienko

The WordPress site content management system allows you to configure an RSS feed for adding information posted on the pages of blogs and information sites. Let's look at ways to customize and improve your RSS feed.

Brief description of RSS technology

What are the functions of an RSS feed, what does the term "RSS path" mean? According to the definition formulated in Wikipedia, it can be attributed to a variety of XML formats that are used to describe news feeds, new materials being prepared, and changes occurring in blogs.

As a rule, it is easier for the average user to learn how to configure cron than to understand the professional definition. Simplifying it a little, we can say that the concept of an RSS feed means a website page, which usually includes the last 10 of all posts posted on it in a special format - XML, universal for reading by a variety of services and aggregators.

How does the tape benefit users? If you are interested in ten blogs, then you probably want to receive information about updates on them, and even better, be able to familiarize yourself with them on one resource. Usually this can be achieved by subscribing using email, but if you add, say, 10 articles to the site every day, you will only receive 10 messages from it by email, which can create some inconvenience. A good solution in this case is to use subscriptions to the subscribe.ru information channel or the smartresponder service, but many sites do not have this type of subscription.

In such a case, it is very convenient to use RSS. To do this, you should register with an aggregator (the most commonly used ones include Yandex Feed and Google Reader, which is about to close soon) and enter the addresses of the sites you are interested in. Then you just need to go to it and get information about all the updates added to these sites.

Customizing Your Feed in WordPress

The WordPress system has a built-in RSS feed; you can find it by entering in the search bar: the name of your site.ru/feed. The only setting that is available by default in the WordPress admin is changing the number of posts, which is done by clicking on the buttons: Admin panel - Options - Reading. I believe that this is not enough, since it may be necessary to delete or change some categories or make other manipulations, but this cannot be done using the WP admin panel.

Therefore, setting up RSS for WordPress is done in one of the following ways: installing special plugins or editing the code manually. Based on my experience, I can note that it is most convenient to use the “Ozh’ Better Feed” plugin. Although it hasn't had any updates, it makes making changes to your RSS feed as easy as possible.

If you want to add small pictures to your feed along with your posts, you can use the “Insert RSS Thumbnails” plugin. Meanwhile, customization can be done without using plugins.

To add thumbnail images to the functions.php file located in the site theme, enter the special code:

Function img_rss($content) ( global $post; if (has_post_thumbnail($post->ID)) ( $content = "" . get_the_post_thumbnail($post->ID, "thumbnail", array("style" => "float :left; margin:0 10px 10px 0;")) . "" . $content; ) return $content; ) add_filter("the_excerpt_rss", "img_rss"); add_filter("the_content_feed", "img_rss");

If you want to make changes to the view of the feed manually, you need to paste the code into the same file:

Function acme_product_feed_rss2($for_comments) ( $rss_template = "new_rss.php"; load_template($rss_template); ) remove_all_actions("do_feed_rss2"); add_action("do_feed_rss2", "acme_product_feed_rss2", 10, 1);

Then you should save the file located in the root directory called feed2.php under the name new_rss.php. After this operation, all types of changes made to this file will allow you to change the feed - remove unnecessary information, make changes regarding the content of posts and other manipulations.

Connect Feedburner

Feedburner is a service provided by Google that, when connected to your site's feed, allows you to stream it to the following address: http://feeds.feedburner.com/feed_name.

Using this service, consumers are subscribed by email to your website feed, but its main advantage is that it determines the number of people who have subscribed. Using a regular WP feed, it is impossible to count the number of users who are exposed to information on your site using RSS, but this data can be obtained thanks to Feedburner.

Despite the fact that Google made an announcement that support for this service will be discontinued while it is working. And most likely, other companies also have similar services, the services of which can be resorted to if Feedburner is closed.

The procedure for connecting to Feedburner is quite simple: go to http://feedburner.google.com/, log in using your account, then in the window that appears, enter the address of your website feed (site.ru/feed). Then open a new window in which you need to enter a new address (you can use the domain name for it, removing the dot from it).

After completing these steps, the feed can already be used using the feedburner service. Now all that remains is to provide a link to the feed on your site (it may look, for example, like an RSS image). Users can then subscribe to it by clicking on it.

Good day. Today we will talk about setting up an RSS feed. First, we will figure out what it is, how to configure it correctly and why it is needed at all. Let's consider all the disadvantages and the possibility of eliminating them.

WHAT IT IS?

Each of you reads several news sites. For example, you read 3 blogs, how do you know that a new article has been published? You need to go to three sites and look, but now imagine that you don’t need to do this, you will need to go to 1 site and there you will find out all the necessary information about new articles. Sounds good, you agree, now let's figure out who it is intended for.

If you have your own blog or website that publishes various news, then RSS feed is for you. It will help you promote your website, but if you have a corporate website for a company or a business card, then this is pointless, because the information on them is not updated so often. Conclusion: RSS feed is needed only on sites where information is updated several times a week.

Many well-known sites and programs work on the same principle: “Yandex.Zen”, “News in win 10”, etc. They collect news from other sites where there is an RSS feed, they do not write the news themselves, they simply collect them from other sites.

HOW TO MAKE IT ?




Tape title
http://www.link to site
Brief description of the channel
Date of last change in the channel*


Heading of news or article No. 1
Link to full text of news or article No. 1
Text of news No. 1 (length is arbitrary)


Heading of news or article No. 2
Link to full text of news or article No. 2
Text of news No. 2 (length is arbitrary)


This is a standard type of RSS feed.

After this, you need to install an RSS icon on the site. You can scroll down to the footer of the site and see what it looks like, although I'm sure you've seen it hundreds of times already.

ORGANIZATION OF SUBSCRIPTION TO RSS FEED

To organize the ability to subscribe to your RSS feed, you need to do 2 things:

2. Insert between tags And the following line:

This step is necessary in order to inform browsers about the presence of an RSS feed - as you remember, self-respecting browsers have their own RSS readers.

OPTIONAL RSS FEED ELEMENTS

You can enter additional information about the channel, source site or channel author.

language
The language in which the channel is written. Allows collectors, for example, to combine all sites in one language on one page. The list of valid values ​​for this element is .

Example: ru-ru

Example: (Copyright 2017, Ivan Petrov)

managingEditor
Email address of the person responsible for the editorial text.

Example:

webMaster
The email address of the person responsible for the technical aspects of the channel.
([email protected](Vasily Petrov)

pubDate
Date the text was published in the feed Date and time in RSS follow the RFC 822 specification, except that the year can be represented by two or four digits (the latter is preferred).

lastBuildDate
The time the channel content was last modified.

cloud
Specifies a web service that supports the rssCloud interface that implements a subscription to channel updates. .

Example:

(In this example, to request a notification, you would send an XML-RPC message to ccc.com, port 80, path /RPC2. The procedure called is myCloud.rssPleaseNotify.)

ttl
Lifetime - the number of minutes for which a channel can be cached before updating from a resource.
Example: (60)

image
An image (in GIF, JPEG, or PNG format) that can be displayed with the channel.

The maximum width is 144 (default is 88).
The maximum height is 400 (default is 31).

Element may also contain additional elements such as:

author
Email address of the author of the message. This is relevant, for example, for RSS feeds of online media, in which each article has its own author. Element Format:

[email protected](Andrew Petrov)

comments
The URL of the page for comments related to the post. Element Format:

http://domain.com/article4403.php#comments

enclosure
Describes the media object attached to the message. It has 3 required attributes: url (application address), length (application size in bytes) and type (application MIME type). Example.

Previously, the abbreviation RSS meant absolutely nothing to me. Although it was interesting to know what it is and how it works. Because on many sites I saw this nice icon and an invitation to subscribe to the news feed.

Therefore, for those who, like me recently, do not yet know how convenient this thing is, I will try to explain clearly and intelligibly, especially since there is nothing complicated about it. The main thing is to understand why you need to read other sites directly from your browser.

Do you have a Gmail account?

So, Gmail account owners, let's get to work! First, let's translate the term RSS into Russian and get its definition: “a very simple way to receive information.” Since there are many ways to obtain information, a very simple method will definitely be useful to us. You can add your favorite and interesting sites to, or you can collect them all in one place, for example, on your browser panel and quickly view updates every day.

I do this at my job every day. I can’t say that at home I would be able to view all the sites that I read every day, but at work this method helps me a lot: I look at news from official sites in the field of certification in the morning, get the latest information and stay up to date with events. As a result, I manage to keep up with changes in legislation, which means that my clients will receive only relevant information from me.

This method of reading the event feed of other sites is convenient for me because it is more effective compared to other methods. I save time and can use it for another purpose.

Read the RSS feed from a browser

Friends, follow this link and install the RSS Feed Reader extension. After installing the extension, the familiar RSS icon will appear on the browser panel, and all that remains for us to do is select the sites that we would like to view more often than others and visit them only if the news title and short description interest us.

I would like to draw your attention to the fact that not all sites have the opportunity to subscribe to an RSS feed. I noticed this when I was looking for a way to add the necessary sites to my reader. In this case, you will have to add such sites to your bookmarks and fish out information from there.

But for the most part, site owners care about their visitors and readers and provide the opportunity to receive the latest articles and news directly to email or news aggregators (directly in your Google account). And on almost any website you will see an orange symbol for simple and effective obtaining of information.

Click on the icon and add it to your extension. By clicking on the extension icon on the browser, in one window you can see a list of all sites whose RSS feed you added. By clicking on the desired site, a list of new articles or news will be displayed that attract your attention with headlines and announcements.

Another simple way to add a site to the RSS Feed Reader: if for some reason you are unable to add a site, copy the site address, click on the RSS Feed Reader extension, at the very bottom of the window that opens there will be an inscription Subscribe to feeds on this page, click on it, you will be transferred to the next window. Click on the bottom link Organize your feeds, and go to the extension settings, where you add the site url to + new feed. In fact, everything is very simple, and all these actions will take place in 10-20 seconds.

By the way, thanks to the fact that I added popular city sites to my reader, I am now constantly aware of all city events, which is also necessary for work activities. News of cultural and sporting events will allow you not to miss important city events. Agree, there is not always enough time to visit each site separately. And with such a convenient extension, you can cover all the information in its entirety and concentrate your attention on the most important thing.

You will feel the convenience of using this extension immediately: the icon displays the number of new messages. The amount of work to be done can be planned in advance.

The technology for reading RSS feeds from the Googlt Chrome browser only brings benefits, without annoying with the volume and amount of information. Understanding how effective a tool you now have saves a lot of time for other things.

I hope my tips helped you find out how to read RSS feed from Google Chrome browser fast. This great technology brings news and events from your favorite sites to your browser.

Stay up to date with news and events. Be efficient. Add the blog “Tip Box for an Effective Person” to your browser and find interesting articles much faster.