![]() |
RSS Feed Code For Template?
I want to add the code for "view rss for this page" to my existing custom template but I can't figure out how to do that. Help!
|
I should clarify my question. I have ALLOW_RSS_FEED set to true. I put the following in my template:
PHP Code:
|
Hi. Take a look at search.php and see how it calls the custom page. Also in search. php check that the $rssdf variable is being passed to the phpdigSearch function call, where this function call is the one for the search results, not the RSS feed.
|
Ah, yes. There are differences in the 1.8.1 version of search.php. I don't recall you telling us that we had to overwrite that file to upgrade, but the old memory ain't what it used to be. ;)
Next question about that: I am now getting the "View RSS for this Page" link, but when I click on it, nothing happens. The RSS document is on the server because I checked that. Any idea what the problem could be? |
Hi. The MIME type is probably wrong. A MIME type of application/xml should work. There is also application/rss+xml and text/xml but check with your host or have a read here.
|
OK, I discovered the problem, quite by accident actually. I had the following statement in my .htaccess file:
PHP Code:
|
I'm still messing with this RSS thing. I have been able to create feeds, but the formatting is really screwy. Take a look, here. :( What can be done to fix it?
|
What is that? Are you trying to stick images in the RSS feeds?
|
No. All I did was click on the "View RSS for this page" link on my search page, then add that feed to my news aggregator. That image is what the feed looks like from my news aggregator.
|
Do a search here, and then click the "View RSS for this Page" link. That shows valid RSS so I'm not sure what you're doing. What is a news aggregator? Is it meant to parse RSS feed?
|
Well, it turns out that I still had something messed up in my .htaccess file. I fixed that, but I still have the display problem.
To answer your question, a news aggregator is software to accumulate all your RSS feeds into a single place, and yes, it does parse the content for display. My feed from phpdig still isn't displaying correctly. I just added a different feed to Awasu (my news aggregator). I notice the first news item displays all that HTML garbage but the other two in the list display okay (except for a > but that's a separate problem). Anyway, is it possible that the XML is incorrect? Here is the latest RSS feed that I created. |
From http://www.xml.com/pub/a/tools/ruwf/check.html:
|
I think you're right about it not parsing that data correctly for phpdig. If I changed the phpdig code to regular HTML entities, do you think it would break something somewhere else in phpdig?
|
Just go to custom_search_page.php, look for the xmlentities function, and modify the function to whatever you want, and no, it won't break PhpDig outside of the feed. Even if you do break the RSS feed, the rest of PhpDig will be fine.
|
All times are GMT -8. The time now is 06:06 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.