PDA

View Full Version : RSS - Changing the number of items in the RSS feed


Kariminal
11-22-2006, 06:22 PM
Hi ALL... its my first post.. I have been using Pixel post for a while now... and big thanks a bunch to the community.

I would not classify myself as a PHP expert by a long shot, but i can dabble a little... and am wondering what the best way of having my feed show all my photos... or changing the number of items in the RSS feed...

Many thanks


Karim

taquinade
11-22-2006, 08:59 PM
Hi,

Look in the index.php, search this ligne:
$query = mysql_query("SELECT id,datetime,headline,body,image FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime<='$cdate') ORDER BY datetime desc limit 10");

And change the limit 10 with an other value.

If you want all your picture, erase this limit 10 But if you have a lot of picture ...... the RSS will be big !

;)
Thierry

joey dee
11-29-2006, 02:25 AM
Hey fellas,

I guess my question is similars to Kariminal's... I have done a search for the code you mentioned Thierry and I don't see it anywhere :(

What should I do? also my RSS on my photoblog points another link on my site. have a look

www.pumatalk.com/photoblog it will point to feed://www.PumaTalk.com/rss.php which is the RSS for my forum... I just viewed the source on my photoblog and copied the code to show you folks to see if we can rectify this issue.

<!-- Link for ATOM feed autodiscovery -->
<link rel="service.feed" type="application/x.atom+xml" href="http://www.pumatalk.com/photoblog/&amp;x=atom" title="" />
<!-- Link for RSS feed autodiscovery -->
<link rel="alternate" type="application/rss+xml" title=" - RSS feed" href="/index.php?x=rss" />

How would I change that? Also are there online RSS directories I can submit my photoblog?

regards,
Joey Dee

joey dee
11-29-2006, 02:33 AM
OK I think I figured out the link for my RSS it's this: feed://www.pumatalk.com/photoblog/?x=rss

So i guess I gotta go in my index.php and change it from

$rss_auto = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"$pixelpost_site_title - RSS Feed\" href=\"".$cfgrow["siteurl"]."index.php?x=rss\" />";

to

$rss_auto = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"$pixelpost_site_title - RSS Feed\" href=\"".$cfgrow["siteurl"]."feed://www.pumatalk.com/photoblog/?x=rss" />";

I'm ganna try that now i'll keep you folks posted :)

Joey

joey dee
11-29-2006, 02:50 AM
Uhmmm... well I got the RSS entrie URL but here's my situation... Im on a MAC and using Safari, you'll notice in the link below (Snapshot i took) everytime I click the RSS icon in the address back it will take me to my FORUM FEEDS however I entered a link @ the buttom footer and when i click it, it will take me to the PhotoBlog RSS URL...

http://img208.imageshack.us/img208/5180/untitledan5.jpg

So how can I get the top ICON in the bar to do the same?

Finally, how can I change the HEADER TITLE in the browser to the title of my photoBlog? And aren't links supposed to show in RSS? for example I put a link to the word PUMA on my PhotoBlog post but in the RSS it doesn't show the link just shows the text. Here's a snapshot.

http://img84.imageshack.us/img84/7142/untitlediq1.jpg

Let me know plz,
my best,
Joey Dee

joey dee
11-29-2006, 03:30 AM
how can I change the HEADER TITLE in the browser to the title of my photoBlog?
That's been resolved :)

So just 2 things - the LINK in the RSS don't show and the RSS icon in the address bar is linking to my "FORUM RSS" no idea what's going on there, however I put a link @ the footer of the page of the appropriate RSS...

Any help would be great ;)
Thanks - Im ganna get back to work on this ;)
Joey Dee

GeoS
11-29-2006, 08:24 AM
1. Give us a link to your blog.
2. Check if at bottom you have same link to feed as at address bar! If not then change both to correct one.
3. What link in RSS doent show? HTML (also links) are stripped out from feeds!

joey dee
11-29-2006, 12:51 PM
1. Give us a link to your blog.
http://www.PumaTalk.com/photoblog
2. Check if at bottom you have same link to feed as at address bar! If not then change both to correct one.
I did put the same address as the buttom in my RSS code in the index.php again here's the code
$rss_auto = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"$pixelpost_site_title - RSS Feed\" href=\"".$cfgrow["siteurl"]."feed://www.pumatalk.com/photoblog/?x=rss" />";
3. What link in RSS doent show? HTML (also links) are stripped out from feeds!
Im not sure I understand that one mate? what do you mean?

Ok I hope this helps - again the only issue Im having is the RSS icon in the address bar is redirecting to my "Forum RSS"

Thanks again,
my best,
Joey Dee

GeoS
11-29-2006, 06:39 PM
Problem with feed is really easy so solve. You use:
<link rel="alternate" type="application/rss+xml" title="PUMA Lifestyle PhotoBlog - RSS feed" href="/index.php?x=rss" />
And you dont have definition of absolute path (<base href=...>) with which this link would be in relation so it goes to the root of address what is equal to domain and you have as result link to http://www.pumatalk.com/index.php?x=rss.
Take out this slash at the beginning or put there full path.

joey dee
11-30-2006, 01:45 AM
Hey mate,

Thanks alot for the info :) - i tried to do what you suggested but I think my previous code might be a little screwy.. so here it is and tell me what I should remove from that code bro

$rss_auto = "<link rel=\"http://www.pumatalk.com/photoblog/index.php?x=rss\" type=\"application/rss+xml\" title=\"PUMA Lifestyle PhotoBlog\" href=\"http://www.pumatalk.com/photoblog/index.php?x=rss".$cfgrow["http://www.PumaTalk.com/photoblog"]."http://www.pumatalk.com/photoblog/index.php?x=rss\" />";

my best,
Joey Dee

GeoS
11-30-2006, 09:01 PM
Look into your template files and change:
<!-- Link for ATOM feed autodiscovery -->
<link rel="service.feed" type="application/x.atom+xml" href="http://www.pumatalk.com/photoblog/&amp;x=atom" title="PUMA Lifestyle PhotoBlog" />
<!-- Link for RSS feed autodiscovery -->
<link rel="alternate" type="application/rss+xml" title="PUMA Lifestyle PhotoBlog - RSS feed" href="/index.php?x=rss" />
to:
<!-- Link for ATOM feed autodiscovery -->
<link rel="service.feed" type="application/x.atom+xml" href="http://www.pumatalk.com/photoblog/&amp;x=atom" title="PUMA Lifestyle PhotoBlog" />
<!-- Link for RSS feed autodiscovery -->
<link rel="alternate" type="application/rss+xml" title="PUMA Lifestyle PhotoBlog - RSS feed" href="http://www.pumatalk.com/photoblog/index.php?x=rss" />

joey dee
12-02-2006, 12:02 AM
Geos,

Thanks for the help but wheN I do what you suggested here's what happened. First here's my code from line 895 to 909

// ################################################## ########################################//
// RSS- + ATOM - tags
// ################################################## ########################################//
// keeping this "old" tag because it is used in user's template maybe
$atom_url = "http://".$HTTP_HOST.$REQUEST_URI."&amp;x=atom";
$tpl = str_replace("<ATOM_AUTODETECT>",$atom_url,$tpl);
$atom_auto = "<link rel="service.feed" type="application/x.atom+xml" href="http://www.pumatalk.com/photoblog/&amp;x=atom" title="PUMA Lifestyle PhotoBlog" />";
$tpl = ereg_replace("<ATOM_AUTODETECT_LINK>",$atom_auto,$tpl);
$tpl = ereg_replace("<SITE_ATOM_LINK>","<a href='./index.php?x=atom'>ATOM feed</a>",$tpl);

$rss_auto = "<link rel="alternate" type="application/rss+xml" title="PUMA Lifestyle PhotoBlog - RSS feed" href="http://www.pumatalk.com/photoblog/index.php?x=rss" />";
$tpl = ereg_replace("<RSS_AUTODETECT_LINK>",$rss_auto,$tpl);
$tpl = ereg_replace("<SITE_RSS_LINK>","<a href='./http://www.pumatalk.com/photoblog/?x=rss'>RSS 2.0</a>",$tpl);

// ################################################## ########################################//

Ok so when I do that here's what happens: http://img216.imageshack.us/img216/6927/untitledpj7.jpg

Tells me there's an error on line 901 and here's Line 901

$atom_auto = "<link rel="service.feed" type="application/x.atom+xml" href="http://www.pumatalk.com/photoblog/&amp;x=atom" title="PUMA Lifestyle PhotoBlog" />";


So Im not sure how to fix this little problem, sorry I really don't mean to be annoying Geos and I really appreciate your help mate!!!

my best,
Joey Dee

taquinade
12-02-2006, 07:23 AM
echap your " with a \ like this \" :
$atom_auto = "<link rel=\"service.feed\" type=\"application/x.atom+xml\" href=\"http://www.pumatalk.com/photoblog/&amp;x=atom\" title=\"PUMA Lifestyle PhotoBlog\" />";

;)

GeoS
12-02-2006, 08:53 AM
Leave core files as it was at the beginning and put that code (which I gave you) to the template files!!!!
I said you about changing template files at beginning of previous post!!

joey dee
12-02-2006, 02:06 PM
Leave core files as it was at the beginning and put that code (which I gave you) to the template files!!!!
I said you about changing template files at beginning of previous post!!
I failed to look @ that - I just did it and it works - Dzi?kuj?!!!

My best mate and thanks again for all your help :)
Joey Dee

GeoS
12-02-2006, 04:34 PM
No proble - nie ma za co :)