Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 07:24:58 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155524 Posts in 21712 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News Module RSS  (Read 578 times)
itsnick

Offline Offline

Posts: 24


WWW
« on: July 16, 2009, 06:07:24 PM »

The RSS feed for the news module currently links back to the "Long Post" on the site.  The feed displays the "Short Post" and I would like it to link back to the "Short Post" on the site as well instead of long.

You can view the site here if need: www.escapeintolife. com

Whats the best way of changing this?   - Appreciate any help.
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #1 on: July 16, 2009, 06:32:43 PM »

It is not really made to do that. You will have to change the file rss.php in the modules "news":
http://project.websitebaker2.org/browser/trunk/wb/modules/news/rss.php#L89

The Linkgeneration starts at Line 89 (the link is directly the anchor).

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

itsnick

Offline Offline

Posts: 24


WWW
« Reply #2 on: July 17, 2009, 01:43:33 AM »

The link back to the site seems to be on Lines 95 and 96. 

95.  <guid><?php echo WB_URL.PAGES_DIRECT ORY.$item["link"].PAGE_EXTENSION; ?></guid>
96.  <link><?php echo WB_URL.PAGES_DIRECT ORY.$item["link"].PAGE_EXTENSION; ?></link>

It currently echos a link back to the long post.  How could I change this to just echo a link back to the page that the post is on.  For example: /pages/home.php

Thanks again
Logged
itsnick

Offline Offline

Posts: 24


WWW
« Reply #3 on: July 17, 2009, 03:23:21 PM »

I was able to get the rss.php file to link back to the page and not the post.

I changed lines 95 and 96 to the following:

95. <guid><?php echo WB_URL.'/pages/'.MENU_TITLE.'.php'; ?></guid>
96. <link><?php echo WB_URL.'/pages/'.MENU_TITLE.'.php'; ?></link>

Also, your pages need to be in lowercase in the website baker admin.  Just in case someone else is looking for the same answer in the future.

Thanks for all your help.
Logged
itsnick

Offline Offline

Posts: 24


WWW
« Reply #4 on: July 20, 2009, 03:21:27 PM »

I would like to edit "rss.php" to display only the latest post instead of every post.  On line 90 there is a while loop so it will display multiple "<items>" in your feed.

If this while loop was removed would it only display one item in the feed?  Would this one item be the latest post?  And how do I remove this while loop?

Thanks

Logged
aldus

Offline Offline

Posts: 1238


« Reply #5 on: July 20, 2009, 03:44:27 PM »

Not a realy good idea ... a better way would be to modify the mySQL-Query at the end

Code:
... ORDER BY modified_when DESC LIMIT 1

to get only one result ...

Regards
Aldus
Logged
itsnick

Offline Offline

Posts: 24


WWW
« Reply #6 on: July 20, 2009, 04:25:04 PM »

Thanks again to everyone.  I simply changed "while" to "if" and now its displaying the latest post.

Also, I'm using yahoo pipes to aggregate all the page feeds into one feed for the entire site.

I know this site probably would of been better suited for wordpress, but we became to invested into website baker.  So if anyone needs a similar solution feel free to contact me.

Thanks,

Nick
Logged
snark
Guest
« Reply #7 on: July 22, 2009, 09:16:21 PM »

is it possible to display pics in the rss feed?

I know that rss is not meant for this but as a customer works with a narrowcastingsystem in his shop and wants to have his own newsitems on those screens... including the pic's

narrowcasting: tv screen to bring info to your customers
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!