Reply
Using RSS on own site to highlight own content
Old 10-14-2005, 05:51 PM Using RSS on own site to highlight own content
Skilled Talker

Posts: 76
I would like to add a table to each article with a list of the most recently added articles. I add the list of articles to one big list. If you are wondering what I am talking about, my site is in my profile. It's kind of hard to describe.

Basically it's like this. Each article page is bland, and it struck me that the best way to spice it up a bit is to incorporate a feed that auto updates itself with the titles of the articles I add to the articles index. I don't want to do all this manually, so it struck me that RSS is the way to go. Only problem is, I have no idea what I'm doing.

Any help would be appreciated.
SirKenin is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-14-2005, 07:10 PM
webfreak's Avatar
Extreme Talker

Posts: 236
Location: USA
I see two basic options:
1. Create an RSS feed, manually update it each time and use JavaScript to display the feed on your pages.

2. Use a content management system for your articles directory that publishes an RSS feed and use that feed to display what you want.

Both cases will require the use of JavaScript.

Last edited by webfreak : 10-14-2005 at 08:49 PM.
webfreak is offline
Reply With Quote
View Public Profile Visit webfreak's homepage!
 
Old 10-14-2005, 08:52 PM
monkey's Avatar
Ultra Talker

Posts: 439
your site isn't in your sig. so i dont know what you are talking about. perhaps depending on the cms you are using you could use a simple PHP include. you may also want to check into using a feed reader like this one http://www.neonbubble.com/a/scripts?sid=5
monkey is offline
Reply With Quote
View Public Profile Visit monkey's homepage!
 
Old 10-14-2005, 09:03 PM
Skilled Talker

Posts: 76
Ok, my site is http://www.northernprotocol.com/

The article list can be found at http://www.northernprotocol.com/articles/

That's where the index starts, anyways. All the articles are then posted in that same directory, obviously. Makes things a little neater and easier for me to handle. I want to make a feed from that list and post the results on each one of those article pages in a table or something off to one side, much like I included the feed at http://www.northernprotocol.com/onsite.htm in the bottom right hand corner. It uses javascript, which is perfect, but I don't know how they did it. All I did was cut and paste some code.

If I manually create the XML file, which I really didn't want to do but will if I have to, how do I export it to a javascript so I can import it into my page? I want it to look the same way as the other one, with a frame around it and everything else.
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-14-2005, 09:07 PM
webfreak's Avatar
Extreme Talker

Posts: 236
Location: USA
For JavaScript, use this:
http://jade.mcli.dist.maricopa.edu/feed/

It'll require some custom CSS to achieve the look you want.

You can put the articles through a CMS and have the CMS as the articles directory.
webfreak is offline
Reply With Quote
View Public Profile Visit webfreak's homepage!
 
Old 10-14-2005, 09:21 PM
Skilled Talker

Posts: 76
Uhhh. For fear of sounding REALLY stupid, what is a CMS?

See, fix and sell computers I can do. Web design is definitely not my strong point. I ended up making that whole site with Frontpage.
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-14-2005, 09:44 PM
Skilled Talker

Posts: 76
I just did a Google search and found something called Sapid. Is that in the same ballpark you were talking about?

http://sapid.sourceforge.net/
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-15-2005, 07:52 AM
webfreak's Avatar
Extreme Talker

Posts: 236
Location: USA
CMS = content management system.

A popular CMS is called Mambo.
webfreak is offline
Reply With Quote
View Public Profile Visit webfreak's homepage!
 
Old 10-15-2005, 09:32 AM
monkey's Avatar
Ultra Talker

Posts: 439
its silly to turn the rss into javascript. just use a feed reader to put the data on your site. the link i gave you to neonbubbles script is perfect for displaying rss feeds. you can control the look of everything via css. if you use java search engines wont crawl the data.
monkey is offline
Reply With Quote
View Public Profile Visit monkey's homepage!
 
Old 10-16-2005, 05:15 PM
Skilled Talker

Posts: 76
Ok, I just used Javascript. Every time I tried to use a program on the server side I got errors and I gave up. I used up every swear word in the book. That Feed2JS did the trick just fine.

So, my next question. I would like to randomize the results of the feed. Can I do that? I have 19 items in my feed, and I set the thing to display 6 items at a time. I would like those to be randomized. The Feed2JS server caches for 60 minutes which is going to be a problem, but other than that. What can I do to randomize the results?

The errors I was getting, by the way, were permission denied errors, even though I set the permissions on the files the way they were asked for.

Last edited by SirKenin : 10-16-2005 at 05:18 PM.
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-16-2005, 05:51 PM
Skilled Talker

Posts: 76
Quote:
Originally Posted by monkey
its silly to turn the rss into javascript. just use a feed reader to put the data on your site. the link i gave you to neonbubbles script is perfect for displaying rss feeds. you can control the look of everything via css. if you use java search engines wont crawl the data.
Ok, I got this script loaded on the server. It was quite simple to do actually. Problem is, how do I make use of it to make it look like what I already have? And do I have to change all my pages to PHP?

Here is an article page for an example:

http://www.northernprotocol.com/articles/digicam.htm
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-16-2005, 05:59 PM
webfreak's Avatar
Extreme Talker

Posts: 236
Location: USA
You have to use CSS to change the look of that table to the one on your main page.

If it is a PHP script, and you want to add it to all the pages, then you would need to change your article pages to PHP.
webfreak is offline
Reply With Quote
View Public Profile Visit webfreak's homepage!
 
Old 10-16-2005, 06:44 PM
Skilled Talker

Posts: 76
I believe the script that monkey gave me is a PHP script. All the snippets they use as examples are PHP. I guess I will have to find a PHP tutorial. I already have a CSS script set up to make the table the way I like it. I wonder how I can use it in conjunction with monkey's script?

I was just thinking... Frontpage is good for something.. it can make webpages for even the biggest amateur. Just take my website for example.
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-16-2005, 06:50 PM
webfreak's Avatar
Extreme Talker

Posts: 236
Location: USA
You'll probably encounter something called classes. Make the RSS table on your pages have the same "class" as the one on your main page.

For PHP, make sure you rename your files with a .php extension to "show" the server to parse the files as PHP. If you don't, all you will see is the PHP code.
webfreak is offline
Reply With Quote
View Public Profile Visit webfreak's homepage!
 
Old 10-16-2005, 08:03 PM
monkey's Avatar
Ultra Talker

Posts: 439
Quote:
Originally Posted by SirKenin
I believe the script that monkey gave me is a PHP script. All the snippets they use as examples are PHP. I guess I will have to find a PHP tutorial. I already have a CSS script set up to make the table the way I like it. I wonder how I can use it in conjunction with monkey's script?

I was just thinking... Frontpage is good for something.. it can make webpages for even the biggest amateur. Just take my website for example.
if you already have the css to create the table its really quite easy. you should check out some of the example pages included with the script to help give you an idea on how to go about doing this.

as for making the pages php you really don't need to know much. you could just change your existing pages to .php and there you go. i think you'll be pretty happy if you learn even just a little php it really makes things so much easier.

anyway if you run into some problems with the feeds script you can always shoot me a pm.
monkey is offline
Reply With Quote
View Public Profile Visit monkey's homepage!
 
Old 10-16-2005, 09:12 PM
Skilled Talker

Posts: 76
Ok.. I'm actually getting somewhere. Finally. Now, I have a stylesheet saved that I want to use, but I can't figure out how to apply it to the feed. Here is the code I'm using in my head tags:

Code:
<link rel="stylesheet" href="http://www.northernprotocol.com/articles/feedstyle.css"
media="all">
Here is the code that I need to apply it to. I'm not quite sure how to edit this so that I can use it for just one feed and make the display random. Any input would be great. You guys have been awesome so far:

Code:
<?
	if($_GET['cat']==1)
	{
		print "<p>This example lists 10 random headlines from all the active XML 

feeds in category 1.</p>";
		$cat = 1;
	}
	else
	{
		print "<p>This example lists 10 random headlines from all the active XML 

feeds.</p>";
		$cat = 0;
	}

	include_once("nbxmlconfig.php");
	XMLRandomHeadlines(
		"<a href=\"<xmlurl>\" target=\"_blank\"><xmltitle></a><br />",
		10, 0 , $cat
	);
?>
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-16-2005, 09:21 PM
Skilled Talker

Posts: 76
Here is my CSS. I'm beginning to think it's not set up properly. It worked for the Feed2JS feed. I'm thinking that it was custom for that and I need to alter stuff, but I have no idea what. I want it to look exactly the same as what I have now. Otherwise, I guess I can create tables to do my look and then just insert a straight feed. I know how to do that.

Code:
/* begin styles for RSS Feed */

.rss_box {
	 margin: 0.5em;
	 width: 200px;
	 background-color: #FFFFFF;
         border: 1px solid #000000;
	 
}
.rss_items {
	margin-top:0px;
	padding:0.5em; 0.5em;
	margin-left:0px;
	color: #D3DEE7;
}
p.rss_title {padding:0em;}
.rss_title {
	text-decoration: none;
	font-family: Arial;
	font-size: 15px;
	background-color:#D3DEE7;
	color:black;
	font-weight:bold;
	margin: 0px;
	padding:0em;
	text-align: left;
}

.rss_item  {
  font-family: Arial;
  font-size: 10px;
  font-weight : normal;
  list-style:none;
  padding-bottom:1em;
}

.rss_item a {
	text-decoration : none;
	color: #000000;
	font-size: 12px;
	font-weight:light;
	font-family:Arial;
	}
	
.rss_item a:visited {
	color: #000000;
}

.rss_date {
	font-size: 85%;
	font-weight : normal;
	color: #fff;
	}
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-16-2005, 09:23 PM
webfreak's Avatar
Extreme Talker

Posts: 236
Location: USA
To link to your stylesheet:

Code:
<link rel="stylesheet" type="text/css" href="http://www.northernprotocol.com/articles/feedstyle.css">
The CSS from the Feed2JS does not apply to the script you're using now.
webfreak is offline
Reply With Quote
View Public Profile Visit webfreak's homepage!
 
Old 10-16-2005, 10:51 PM
Skilled Talker

Posts: 76
Ok, I can't figure out the borders and title I guess, but I got the style sheet applied to the links, which is a bonus. I guess I can do the rest with tables. Unless, of course, there is some handy dandy guide that can teach me how to put borders around the feed and make that little header thing I have going on in my current one.

By the way, thanks a million for the help so far. Without it, this would have been impossible for me. This little script even randomizes the output, so it's perfect for what I wanted.
SirKenin is offline
Reply With Quote
View Public Profile
 
Old 10-17-2005, 12:55 AM
Skilled Talker

Posts: 76
AAAAAAAAAGH!!! For Pete's sake! I used the style sheet and it toasted every single url on the page, and not just the stupid feed. Every time I turn around there's something else.

Here is the code I'm using. I know why it's doing it, but I don't know how to change it to affect just the feed. Any help would be appreciated.

Code:
/* begin styles for RSS Feed */



a {
	display: block;
        text-decoration : none;
	color: #000000;
	font-size: 12px;
	font-weight:light;
	font-family:Arial;
        padding: 0.1em;
	}
	
a:visited {
	display: block;
        color: #000000;
        padding: 0.1em;
}
It is the "a" that is doing it, but every time I try and change it it defaults back to no text formatting. Aargh. How do I fix that?
SirKenin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Using RSS on own site to highlight own content

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML