Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2012, 01:50 PM
PTGigi's Avatar
PTGigi PTGigi is offline
Crazily Friendly~HoF
 
Join Date: Jul 2009
Location: Somewhere >.>
Posts: 370
Gender: Female
Credits: 26,296
PTGigi
Default Making an RSS Feed!

I was wondering how to make these. Then I made one. It was epic. So I'm sharing this new-found knowledge with all of you now XD

For those that don't know what an RSS Feed is, it stands for Really Simple Syndication. Really Simple. They're those little orange boxes people post on their sites nowadays. (like these: ) Lots of webmasters use these to allow users to keep up-to-date with new content, making this great for News posts.

Make a new file (using whatever you make your codes in). The file should be called "rssfeed.xml".

Copy and paste this:
Code:
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

<channel>
<atom:link href="http://YOURURLHERE/rssfeed.xml" rel="self" type="application/rss+xml" />

<title>SITENAME</title>
<description>SITEDESCRIPTION</description>
<link>LINKTOSITENEWSARCHIVE</link>

<item>
<title>ENTRYTITLE</title>
<description>ENTRYDESCRIPTION</description>
<link>ENTRYLINK</link>
<guid>ENTRYLINK</guid>
</item>

</channel>
</rss>
The giant capital letters are what you need to change, I'll help you figure out what needs to go where. If you haven't yet, save this as "rssfeed.xml" (no quotes). If you name the file anything else, you need to find where it says "rssfeed.xml" and change that.

A quick overview of the different tags, then I'll help you customize this for your site. :3

  • The <?xml?> and <rss> tags are important information stuffs, this basically says that this is an xml file and this is going to be used for rss. Don't touch those.
  • The <channel> tag defines your feed's information, everything relating to your feed needs to be in this.
  • The <item> tag defines entries, this would be news posts or whatnot. Each entry needs to be in it's own <item> tag.
  • The <title> tag is the title of your site (for the first set of tags) or the title of the document/news post/whatever.
  • The <description> tag is either the description of your site (first set of tags) or the description of the document/news post/whatever.
  • The <link> tag links the user to where an archive where all the links are (first set, or you could link this to your home page) or the link of the specific entry.
  • And lastly, the <guid> tag is very similar to the <link> tag, and is not needed in the first set. How is it different? I don't quite know actually. It apparently is more important and more permanent or something. I had a website yell at me for not putting those tags in, I suggest you just do it XD


Now that we've got that out of the way, how about we customize this for yourself?

We'll start near the beginning:
Code:
<channel>
<atom:link href="http://YOURURLHERE/rssfeed.xml" rel="self" type="application/rss+xml" />
YOURURLHERE should be replaced with the url of your site. If you've put the file in a folder, but sure to include that by using "/foldername/" (no quotes) where "foldername" is whatever you called that folder. This just links to where the file is located.

Code:
<title>SITENAME</title>
<description>SITEDESCRIPTION</description>
<link>LINKTOSITENEWSARCHIVE</link>
This is your site information. SITENAME should be the name of your site. So if you called your site "MysidiaAdoptables", you'd put that there. SITEDESCRIPTION is a short description of your site. Something like "MysidiaAdoptables is a free adoptable script to use on your site.". And lastly, the ridiculously long LINKTOSITENEWSARCHIVE should be a link to the location where you have linked to all your News posts. So, if I was using MysidiaAdoptables as an example, I'd link to the "Mysidia Adoptables Official Announcements" section. Linking to an archive is entirely optional, you could very well just link to your home page; it's more to help the user.

Code:
<item>
<title>ENTRYTITLE</title>
<description>ENTRYDESCRIPTION</description>
<link>ENTRYLINK</link>
<guid>ENTRYLINK</guid>
</item>
This is the key to your RSS Feed, this links to your entries. ENTRYTITLE should be the name of your entry, so if you added a new adoptable to your site it might read "New Adoptable!". ENTRYDESCRIPTION would describe a little more, but remember, we're linking to the news post with information about this glorious event, so just keep it simple. A description such as "A new adoptable called a Dog was discovered!". And in-order to tell the reader more about this infamous Dog, you'd give the user a link to the post. Both ENTRYLINKs should be replaced with the link to the news post. If you're using a forum, simply link to the thread.

And that's all for the coding! But what about adding more content you might say? Well, that's easy enough! Just duplicate the <item> section above and edit the information to reflect a new entry. I haven't tested this out extensively, so I don't know which order you'll need to set it in to display newer information on top.

If you need a validation of your code, paste the link to your code in this website and it should tell you if you have any errors. If you need more help, just paste the code here and I'll take a look at it. :3

-----

Now that we've got the code working, let's give your users a link. First, you'll need an image; a text link works, but a cute little orange box is more adorable and demands you to click it. You can use images from this site, for free, without credit. Just be sure to save the images to your computer, then upload them to your own host.

Then, you just need to make an image with a link (someplace people will see, like your homepage and/or the news archive). The link should be to your XML file.

And that's all! The working example I made of this is sadly for a WIP site (non-adoptable, writing stuff) and has no entries in it so I figured it wouldn't be good to use. But you could click on this to subscribe to my Smackjeeves webcomic just to see how it works (then feel free to unsubscribe if you don't want to watch it). If you have Firefox you can view your RSS Feeds by clicking on Bookmarks>Bookmarks Toolbar>then your RSS Feeds will be listed there. Hovering over one will show recent feeds. Other browsers should work the same, but IDK.

Enjoy <3 If you have any questions feel free to ask! :3
__________________


"I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are."~Mewtwo
My Adoptables|Nuzlocke Webcomic
Reply With Quote
  #2  
Old 06-01-2012, 03:31 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,755
Hall of Famer is on a distinguished road
Default

This looks great Gigi, a very interesting tutorials about RSS Id say. In fact I've never used RSS on my sites, but now I guess I may give it a try. Hopefully it will help some members here, at least for those who are already kinda familiar with programming.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
News Feed Yuki Night Suggestions and Feature Requests 0 01-30-2013 12:04 AM
Implementing A News Feed Yuki Night Questions and Supports 0 01-29-2013 05:25 PM
News feed script? Aasixx Staff Central 3 06-18-2012 03:06 AM
Making a map... help! dulop Questions and Supports 5 05-23-2012 08:14 PM
Feed & Play Canaille Questions and Supports 4 08-21-2011 06:17 PM


All times are GMT -5. The time now is 08:47 AM.

Currently Active Users: 9684 (0 members and 9684 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636