Forums / General Questions / trying to get RSS feed working in my EZ-page

trying to get RSS feed working in my EZ-page

Locked

Views: 3,762

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
1 Oct 2007, 12:56 AM
#1
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

trying to get RSS feed working in my EZ-page

Hi. I was able to clumsily have an RSS feed appear in a new EZ page. All is fine except it has returned an error message that is cryptic to me as follows:

Fatal error: Call to a member function get_template_dir() on a non-object in C:\Webs\theribbondiva\includes\functions\html_output.php on line 294

have a look at : http://www.theribbondiva.com/index.php?main_page=holiday_news

I added the link from the 'more information box' now called 'of interest.

I cant believe I got this far! I would love one of you zenners to help me figure out how to correct the error above.

There is a template file in the root that controls the output and a parser caller rss2html.php in the root.

Thanks!

1 Oct 2007, 1:19 AM
#2
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

I just noticed that the footer doesn't load on that page.

1 Oct 2007, 2:37 AM
#3
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

this is the code generated for the feed:

 
<?php
$XMLFILE = "[URL]http://www.associatedcontent.com/rss/recent_74.xml[/URL]";
$TEMPLATE = "[URL]http://www.theribbondiva.com/holiday-template.html[/URL]";
include("rss2html.php");
?>

is there a conflict??

1 Oct 2007, 6:18 PM
#4
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

Is this a hard one?

Did I try to do the undoable?

:smartalec:

2 Oct 2007, 9:11 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: trying to get RSS feed working in my EZ-page

studeo:

Hi. I was able to clumsily have an RSS feed appear in a new EZ page.

The error is related to whatever you did to get this new page ... which, by the way, doesn't appear to be an EZ-Page, but rather an actual different "page".

For some reason your page has broken the normal availability of variables related to the template system.

What exact steps did you follow to make this new page?
It will probably help if you zip and post a copy of all the files you created to make it happen.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Oct 2007, 11:03 PM
#6
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

Hi. Thanks for a look. I used the 'about_us' mod which I have used about on 10 other pages. I have double checked it all. I will send you the zip file asap.

Thanks

2 Oct 2007, 11:23 PM
#7
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

here is a zip file doc. One file is missing since it has the same name as the overide file and the override file has the code in it.

I've included the related files...the file that parses, the file that calls the template and converts it ti html and the file used as the template.

Thanks. I know you are abrilliant man. I hope we can figure this out as it might be useful for others to add content to pages other than the index.

3 Oct 2007, 2:02 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: trying to get RSS feed working in my EZ-page

The RSS mod you're using resets the $template variable used in Zen Cart to something else. And then, when control returns to Zen Cart, Zen Cart doesn't understand what to do because the dependencies have been changed.

To work around that, try this:
In your define_holiday_news.php file, try adding two extra lines, as shown:```

<?php [B]$zenCartTemplate = $template;[/B] $XMLFILE = "http://www.associatedcontent.com/rss/recent_74.xml"; $TEMPLATE = "http://www.theribbondiva.com/holiday-template.html"; include("rss2html.php"); [B]$template = $zenCartTemplate;[/B] ?>


In v1.4 the Zen Cart internal code will be using less-common names (as a byproduct of various transitions) and will thus be less prone to conflicts such as you're experiencing here.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Oct 2007, 12:43 PM
#9
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

Thank You. You are an amazing man!

I knew the template was being hijacked, I had no clue that I could write a fix on the page itself!

A million thanks!

What do you think of this way to add rss to zen? not bad right?

12 Oct 2007, 2:09 AM
#10
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: trying to get RSS feed working in my EZ-page

I have searched this support forum on keywords "RSS" and "ezpage" (or "ez-page") and have not located anything specific.

Is there in existence a documented method (or FAQ) to create an ez-pages RSS feed for Zen Cart?

I have installed Andrew's latest RSS feed mod v2.03 and it's very nice. However I have not yet figured out how to apply to creating a feed of ez-pages. Andrew's updated mod has built in support for the "News Articles & Mgmt" mod, but I see no reference to ez-pages or info pages).

Or does ez-pages have some sort of built in RSS feed support I am not aware of?

Studeo, if possible, can you please package up your current working files as a mod and upload to Zen Cart download area? Assuming you have fully tested on Zen Cart 1.3.7.1. :wink:

Thanks,
Woody

12 Oct 2007, 11:53 AM
#11
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

Hi Woody:

First let me say it's really not an ez page i used but the "about_us" mod to make a new page. But I see no reason why it couldn't be placed in an EZ page since its so simple. No, I haven't tested it except for the fact that it IS working.

I found a free feed file called rss2html.php which also comes with 2 other files, one being a customizable template file that is called when the feed or blog is parsed by another file called "FeedforAll_XMLParser.inc. All files are placed in the root directory and the code that Doc Byte fixed for me is placed on the page.

I am going to upload to here the files I used. Go ahead and test or place them in the downloads area as I have never done that before. You can give me credit if it all tests out fine. How about "EZ_feed"

The syntax placed on the page is as follows:

 
<?php
$zenCartTemplate = $template;
$XMLFILE = [URL="http://www.URL"]http://www.[B]URL[/B][/URL][B] of source feed[/B];
$TEMPLATE = "http://www.[B]your_site[/B].com/[B]your-template[/B].html";
include("rss2html.php");
$template = $zenCartTemplate;
?>

Studeo

13 Oct 2007, 11:49 PM
#12
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

Woody:

I just re-read your post and now I think maybe you are asking about converting a zen ez-page into an RSS feed?

If that's the case, this isn't it, as you must have figured out already.

4 Nov 2007, 5:12 PM
#13
jmartrican avatar

jmartrican

New Zenner

Join Date:
Oct 2007
Posts:
3
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

studeo,

I think your RSS feed came out great. Can you show me how you did it?

thanks a lot!

12 Nov 2007, 12:56 AM
#14
studeo avatar

studeo

Zen Follower

Join Date:
Jan 2007
Posts:
198
Plugin Contributions:
0

Re: trying to get RSS feed working in my EZ-page

go to http://www.feedforall.com

and download the files. Look above for the coding to place on the page as corrected by Dr. Byte. Of course, capture the url of the feed you want to publish. The downloaded template page can be html-styled anyway you like it, otherwise it will implement your own template's style sheet. It's amazingly easy to use!