You are not logged in! If you have not registered yet then click here to join the community!

TOLRA Community Forums


Go Back   TOLRA Community Forums > TOLRA Products (PHP Scripts) > Web Directory Script > Directory Script Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2008, 12:08 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
Per Listing RSS Feed Display

The attached mod reads an RSS feed from a remote site as specified by the listing and displays the feed on the listings detail page.

It make use of lastRSS and requires V4 of the directory script.

To install:
  • Create a folder called extensions if it doesn't already exist.
  • Unpack the attached zip file
  • Upload the listingrss folder from the archive to the extensions folder on the server.
  • Make the cache folder just uploaded writable by the web server, usually permissions must be set to 0777. (Note: This step can be skipped if hosting with TOLRA)
  • Create a file called extensioninfo.php with the following:
    <?php
    $extBasePath = dirname(__FILE__) . '/';
    include($extBasePath . 'listingrss/init_listingrss.php');
    ?>
  • Upload extensioninfo.php to the extensions folder on the server.
  • In your browser access extensions/listingrss/listingrssinst.php
  • Add {$listingFeed} to the t!wddetail.html template where the feed should be shown, {$listingFeedURL} is the URL of the feed, e.g.
    Code:
    <!--@listingFeed-->
    <h2>Latest News <a href="{$listingFeedURL}"><img src="images/feed.gif" alt="RSS feed from site" /></a></h2>
    {$listingFeed}
    <!--/listingFeed-->
Note: If the file extensioninfo.php already exists on the server then edit it and add the following line just above ?>:

include($extBasePath . 'listingrss/init_listingrss.php');

By default this mod only shows the feeds for express submissions however you can set LISTINGRSSALL to true in listingrss.php to enable feeds or all listings.

An example of this mod can be seen at http://www.worldsiteindex.com/wdird2096766866
Attached Files
File Type: zip listingrss.zip (6.6 KB, 42 views)

Last edited by Paul; 15-05-2008 at 01:48 PM.
Reply With Quote
Sponsored Links
  #2  
Old 10-03-2008, 03:17 AM
John John is offline
Senior Member
 
Join Date: Jul 2006
Location: Brisbane, Australia
Posts: 125
I think this mod is just great!

It is probably better than LivePages because with LivePages listings can submit any unchecked story or URL etc.
If you restrict the "Per Listing RSS Feed Display" to feeds from the same URL as the listing, then at least you can be guaranteed that your directory will only show news from a site that they are actually posting on their own site as well.

It also means that website owners can just set and forget: instead of sending new stories, they know that their listing is constantly updated!

And then just one other question: when an Express listing expires, I guess the feed on the detail page also expires/disappears or not?

Top job, Paul!

Last edited by John; 10-03-2008 at 03:22 AM.
Reply With Quote
  #3  
Old 10-03-2008, 03:36 AM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
The default is to remove the feed once an express listing expires.

You could tweak the display code to avoid that, but I'm working on the principle that it takes more server resources to show the feed and so restricted it to current express listing by default.
Reply With Quote
  #4  
Old 15-05-2008, 01:49 PM
Paul's Avatar
Paul Paul is offline
Moderator
 
Join Date: May 2006
Location: UK
Posts: 568
Blog Entries: 3
Updated to fix an issue where free updates to express listings could delete the RSS feed from the listing.

If you already have this extension install then you only need to upload the file listingrss/listingrss.php from the ZIP over the existing extensions/listingrss/listingrss.php file.
Reply With Quote
Reply

Bookmarks

Tags
display, feed, listing, rss

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:23 AM.