PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 07-08-2004, 09:00 PM   #1
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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!
vinyl-junkie is offline   Reply With Quote
Old 07-08-2004, 09:05 PM   #2
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
I should clarify my question. I have ALLOW_RSS_FEED set to true. I put the following in my template:
PHP Code:
<div align="center">
<
phpdig:powered_by_link/>
</
div
but all it gave me was "Powered By PhpDig." Shouldn't that give me the "RSS" thing?
vinyl-junkie is offline   Reply With Quote
Old 07-10-2004, 06:59 AM   #3
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-11-2004, 09:21 AM   #4
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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?
vinyl-junkie is offline   Reply With Quote
Old 07-11-2004, 09:43 AM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-11-2004, 11:55 AM   #6
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
OK, I discovered the problem, quite by accident actually. I had the following statement in my .htaccess file:
PHP Code:
AddType application/x-httpd-php .php .php3 .php4 .phtml .js 
That should have had .rss on the end of it. I don't remember why I thought I needed that statement in the first place, but after adding .rss to it, I got a parse error on line 1 for the .rss file, so I removed that line from my .htaccess altogether, and now all is right with the world again.
vinyl-junkie is offline   Reply With Quote
Old 07-16-2004, 09:53 PM   #7
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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?
vinyl-junkie is offline   Reply With Quote
Old 07-16-2004, 09:57 PM   #8
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
What is that? Are you trying to stick images in the RSS feeds?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-16-2004, 10:02 PM   #9
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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.
vinyl-junkie is offline   Reply With Quote
Old 07-16-2004, 10:06 PM   #10
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-16-2004, 10:51 PM   #11
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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 &gt; but that's a separate problem). Anyway, is it possible that the XML is incorrect? Here is the latest RSS feed that I created.
vinyl-junkie is offline   Reply With Quote
Old 07-16-2004, 11:11 PM   #12
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
From http://www.xml.com/pub/a/tools/ruwf/check.html:
  • Your URL: http://search.napathon.net/rss/10900425591375076543search.rss

    Congratulations the XML is well formed!
From http://feeds.archive.org/validator/:
  • This feed does not validate.

    line 25, column 20: dc:date must be an W3CDTF date (3 occurrences)

    <dc:date>07-13-2004</dc:date>
The feed isn't validating at the second site because you set mm-dd-yyyy in the config file instead of yyyy-mm-dd. Change that and it'll validate there too. It's possible that your RSS parser isn't handling the way the HTML entities are being coded for the RSS that comes with PhpDig. For instance, you see <span>foo</span> onscreen, but if you look at the RSS source, you'll see &amp;lt;span&amp;gt;foo&amp;lt;/span&amp;gt; instead.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-16-2004, 11:35 PM   #13
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
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?
vinyl-junkie is offline   Reply With Quote
Old 07-16-2004, 11:42 PM   #14
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML FEED MOD FOR YOUR DIGGER GunMuse Mod Submissions 4 05-19-2005 10:27 AM
Rss Feed djavet Feedback & News 1 01-07-2005 08:04 AM
RSS Feed For These Forums vinyl-junkie Feedback & News 6 08-16-2004 07:06 AM
what is the purpose of th rss feed vip562 How-to Forum 1 07-21-2004 05:46 PM
Relevancy and xml feed searchboy Mod Requests 3 04-04-2004 08:48 AM


All times are GMT -8. The time now is 04:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.