bnjp
11-20-2004, 07:16 PM
This is a little beyond the norm, but here's what I'm trying to do. I've got a calendar program that will display the current 7 days of events on a page through an SSI call (or I have been using PHP's "virtual" call to do it on a php page. I'm trying to get this to work on ArticleLive but am having a problem.
I've got the events showing but it doesn't show the events in the panel, but puts them at the top of the page, above the page html. It puts a little number "1" where the data should go.
Here's the page: http://northpointeonline.org/articlelive/
the data I'm trying to import is here: http://northpointeonline.org/cgi-bin/calendar/calendar.pl?template=ssi2.html&duration=7d
I created a new panel called "CalendarPanel" and am trying to use that on the DefaultRightColumnPanel.
Here is my Calendar Panel:
/*******************************************\
* *
* Generic ArticleLive Panel Parsing Class *
* *
\*******************************************/
$panelClass = "AL_CALENDAR_PANEL";
CLASS AL_CALENDAR_PANEL
{
var $_htmlFile;
function AL_CALENDAR_PANEL($HTMLFile)
{
$this->_htmlFile = $HTMLFile;
}
function ParsePanel()
{
$htmlPanelData = "";
$parsedPanelData = "";
if(file_exists($this->_htmlFile))
{
if($fp = @fopen($this->_htmlFile, "rb"))
{
while(!feof($fp))
$htmlPanelData .= fgets($fp, 4096);
@fclose($fp);
}
}
// Parse the panel of tokens, etc
$GLOBALS["CalData"] = include ("http://northpointeonline.org/cgi-bin/calendar/calendar.pl?template=ssi2.html&duration=7d");
$parsedPanelData = $GLOBALS["AL_CLASS_TEMPLATE"]->ParseGL($htmlPanelData);
return $parsedPanelData;
}
}
and my DefaultRightColumnPanel code:
/*******************************************\
* *
* Generic ArticleLive Panel Parsing Class *
* *
\*******************************************/
$panelClass = "AL_DEFAULTRIGHTCOLUMN_PANEL";
CLASS AL_DEFAULTRIGHTCOLUMN_PANEL
{
var $_htmlFile;
function AL_DEFAULTRIGHTCOLUMN_PANEL($HTMLFile)
{
$this->_htmlFile = $HTMLFile;
}
function ParsePanel()
{
$parsedPanelData = "";
/*
This template is comprised of up to 5 external panels, which we simply
parse and then return combined:
1. SmallArticleFavouritesPanel1
2. ArticlesToReadPanel1
3. ArticleHistoryPanel1
4. PopularArticlesPanel1
5. PopularAuthorsPanel1
*/
$GLOBALS["imagePath"] = AL_TPL_IMAGE_PATH;
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("CalendarPanel");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("SmallArticleFavouritesPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("ArticlesToReadPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("ArticleHistoryPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("PopularArticlesPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("PopularAuthorsPanel1");
return $parsedPanelData;
}
}
Anybody see what am I doing wrong? or will this work at all? I just figure if I can get it on the page at all, I should be able to get it in the right spot.... :(
I've got the events showing but it doesn't show the events in the panel, but puts them at the top of the page, above the page html. It puts a little number "1" where the data should go.
Here's the page: http://northpointeonline.org/articlelive/
the data I'm trying to import is here: http://northpointeonline.org/cgi-bin/calendar/calendar.pl?template=ssi2.html&duration=7d
I created a new panel called "CalendarPanel" and am trying to use that on the DefaultRightColumnPanel.
Here is my Calendar Panel:
/*******************************************\
* *
* Generic ArticleLive Panel Parsing Class *
* *
\*******************************************/
$panelClass = "AL_CALENDAR_PANEL";
CLASS AL_CALENDAR_PANEL
{
var $_htmlFile;
function AL_CALENDAR_PANEL($HTMLFile)
{
$this->_htmlFile = $HTMLFile;
}
function ParsePanel()
{
$htmlPanelData = "";
$parsedPanelData = "";
if(file_exists($this->_htmlFile))
{
if($fp = @fopen($this->_htmlFile, "rb"))
{
while(!feof($fp))
$htmlPanelData .= fgets($fp, 4096);
@fclose($fp);
}
}
// Parse the panel of tokens, etc
$GLOBALS["CalData"] = include ("http://northpointeonline.org/cgi-bin/calendar/calendar.pl?template=ssi2.html&duration=7d");
$parsedPanelData = $GLOBALS["AL_CLASS_TEMPLATE"]->ParseGL($htmlPanelData);
return $parsedPanelData;
}
}
and my DefaultRightColumnPanel code:
/*******************************************\
* *
* Generic ArticleLive Panel Parsing Class *
* *
\*******************************************/
$panelClass = "AL_DEFAULTRIGHTCOLUMN_PANEL";
CLASS AL_DEFAULTRIGHTCOLUMN_PANEL
{
var $_htmlFile;
function AL_DEFAULTRIGHTCOLUMN_PANEL($HTMLFile)
{
$this->_htmlFile = $HTMLFile;
}
function ParsePanel()
{
$parsedPanelData = "";
/*
This template is comprised of up to 5 external panels, which we simply
parse and then return combined:
1. SmallArticleFavouritesPanel1
2. ArticlesToReadPanel1
3. ArticleHistoryPanel1
4. PopularArticlesPanel1
5. PopularAuthorsPanel1
*/
$GLOBALS["imagePath"] = AL_TPL_IMAGE_PATH;
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("CalendarPanel");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("SmallArticleFavouritesPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("ArticlesToReadPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("ArticleHistoryPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("PopularArticlesPanel1");
$parsedPanelData .= $GLOBALS["AL_CLASS_TEMPLATE"]->_GetPanelContent("PopularAuthorsPanel1");
return $parsedPanelData;
}
}
Anybody see what am I doing wrong? or will this work at all? I just figure if I can get it on the page at all, I should be able to get it in the right spot.... :(