By Jordie Bodlay
I will now demonstrate how to include a feed as a panel in ArticleLive. The first step is to include the Magpie RSS files. Open up your init.php file (in the base directory of ArticleLive) and locate this code near the top:
ob_start();
Place the include after this line, so it looks like this:
ob_start();
include_once('magpierss/rss_fetch.inc');
Now that we have included the files, the functions will be available to use throughout the entire application. This also means that we can include multiple feeds without including the file more than once.
We now need to create a new panel file set. Navigate to /templates/{your template}/Panels/ and create 2 new files; InterspireArticles.html and InterspireArticles.php (the file names should be exact).
InterspireArticles.php will look like this:
<?phpOur InterspireArticles.html file will have the following content:
<table class="Panel RootArticleCategoriesPanel" id="Table1">
<tr>
<td class="Heading">
</td>
</tr>
<tr>
<td style="padding:10px 0px 10px 0px ; ">
</td>
</tr>
</table>
Now all we need to do is open up the directory /templates/{your template}/ and place the placeholder
We want it to appear on the top of the right hand side, so we will place it before
Note: The placeholder is determined by the File name. If you created a panel with the file names MyPanel.php and MyPanel.html, then you would use
You panel will now show up with the links straight from our the feed. This can be used for any RSS feed and allows your site to be updated with the latest news and information automatically.