lucabosurgi
05-07-2005, 07:53 PM
What it does.
Collects content from the FMag.net RSS feed and displays it in a self contained manner. No external RSS modules are needed. The module may be configured to display any number of reviews up to and including the number within the RSS feed (currently set at 6). If fewer than 6 reviews are specified then the reviews will be displayed in a random order so that all reviews will eventually be displayed.
The module reads the RSS feed and locally caches a copy of the data for the period specified in the "Time to Live" record.
Installation.
Installation is straightforward due to the fact that the module is self contained.
Edit the fmag.php file and specify;
The location of the cache file on line #10, and
The number of items to be displayed on line #13
The location of the cache file must be world-writable (chmod 777) and so should be outside the public accessible area. Once done, upload the file to the modules directory.
Create 2 new templates.
adv_portal_fmag
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat">
<span class="smallfont"><strong>$vba_options[portal_blockbullet] <a href="$rss_channel[LINK]">$rss_channel[TITLE]</a></strong>
</span>
</td>
</tr>
$fmagbits
<tr>
<td class="tfoot" align="center">
<span class="smallfont"><a href="$rss_channel[LINK]">$rss_channel[COPYRIGHT]</a></span>
</td>
</tr>
</table>
<br />
adv_portal_fmagbits
<tr>
<td class="$getbgrow">
<if condition="$mods[modcol]==1"><span class="smallfont" style="float:right"><strong>$rss_item_genre</strong></span><else /><span class="smallfont"><strong>$rss_item_genre<br /></strong></span></if><span class="smallfont"><strong><a href="$rss_item_link" title="">$rss_item_title</a><br />$rss_item_author</strong></span>
<div class="smallfont">$rss_item_description</div>
</td>
</tr>
Create the new CMPS module using the new templates and file.
Module Title: F Magazine Reviews
File to Include: fmag.php
Active: Yes
Column: Center Column (you may use Left/Right if desired as the template detects which column it is in and adjusts as best it can. When using the side columns it is recommended to limit the number of items displayed to 1 or 2.)
Templates Used: adv_portal_fmag,adv_portal_fmagbits
Update All Pages? No
Finally, specify which pages you wish the module to show up on.
The first time the module executes it will pull the data directly from the RSS feed an build the cache file. From that point on the cache file will be used so long as it has not aged more than the time contained in the RSS file. When the file has grown stale the RSS feed will again be queried and the cache file updated.
Collects content from the FMag.net RSS feed and displays it in a self contained manner. No external RSS modules are needed. The module may be configured to display any number of reviews up to and including the number within the RSS feed (currently set at 6). If fewer than 6 reviews are specified then the reviews will be displayed in a random order so that all reviews will eventually be displayed.
The module reads the RSS feed and locally caches a copy of the data for the period specified in the "Time to Live" record.
Installation.
Installation is straightforward due to the fact that the module is self contained.
Edit the fmag.php file and specify;
The location of the cache file on line #10, and
The number of items to be displayed on line #13
The location of the cache file must be world-writable (chmod 777) and so should be outside the public accessible area. Once done, upload the file to the modules directory.
Create 2 new templates.
adv_portal_fmag
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat">
<span class="smallfont"><strong>$vba_options[portal_blockbullet] <a href="$rss_channel[LINK]">$rss_channel[TITLE]</a></strong>
</span>
</td>
</tr>
$fmagbits
<tr>
<td class="tfoot" align="center">
<span class="smallfont"><a href="$rss_channel[LINK]">$rss_channel[COPYRIGHT]</a></span>
</td>
</tr>
</table>
<br />
adv_portal_fmagbits
<tr>
<td class="$getbgrow">
<if condition="$mods[modcol]==1"><span class="smallfont" style="float:right"><strong>$rss_item_genre</strong></span><else /><span class="smallfont"><strong>$rss_item_genre<br /></strong></span></if><span class="smallfont"><strong><a href="$rss_item_link" title="">$rss_item_title</a><br />$rss_item_author</strong></span>
<div class="smallfont">$rss_item_description</div>
</td>
</tr>
Create the new CMPS module using the new templates and file.
Module Title: F Magazine Reviews
File to Include: fmag.php
Active: Yes
Column: Center Column (you may use Left/Right if desired as the template detects which column it is in and adjusts as best it can. When using the side columns it is recommended to limit the number of items displayed to 1 or 2.)
Templates Used: adv_portal_fmag,adv_portal_fmagbits
Update All Pages? No
Finally, specify which pages you wish the module to show up on.
The first time the module executes it will pull the data directly from the RSS feed an build the cache file. From that point on the cache file will be used so long as it has not aged more than the time contained in the RSS file. When the file has grown stale the RSS feed will again be queried and the cache file updated.