PDA

View Full Version : Coding question


Kaos
Thursday, May 1st, 2008, 01:47 AM
I'm trying to pull an rss feed from an event calendar in my site, onto the home page to show some of the upcoming events. I know I can use a file upcoming.php for it, went digging through my event calendar forum to find out how exactly to do this and they only gave me how to do it for joomla... mine and html site. They gave the code as follows:

<?php if ( mosCountModules( 'CalTrigger' )) {
echo '<div class="moduletable"><h3>Upcoming events:</h3>';
include 'calendar/upcoming.php'; //The path to where upcoming.php resides
echo '</div>';
} ?>


I'm assuming the mosCountModules is joomla mod term, anyone have any idea how I can get this accomplish through straight php coding? I have tried installing carp and using that to pull the feed, but I just get nothing but "event calendar created by blah,blah" no events. Now knowing I can pull the feed off a file though, I don't think I can use carp to accomplish this. Anyone have any ideas????

esnagel
Thursday, May 1st, 2008, 01:34 PM
So you have an RSS feed? You can be lazy and just re-parse the RSS (use XML2Array - google it) and display as you like...

Kaos
Thursday, May 1st, 2008, 02:49 PM
I like lazy I look into hat and see if I can do it that way! Is that easier then pulling the info some how from a file in the site that contains all the events?

*update.. speaking of being lazy, if I pulled the right file name it works alot better the way I had it coded LOL! Thanx for the help Eric.. I think I may be overworked lately, brain is not working good!

esnagel
Thursday, May 1st, 2008, 04:56 PM
Oh, yeah, I made the assumption you were using the right filename ;)

Kaos
Thursday, May 1st, 2008, 05:08 PM
When it comes to me...never make assumptions :cheers2: