 |
|
Author |
Message |
lofatlabs
Joined: 22 Nov 2008
Posts: 2
|
Posted:
Sat Nov 22, 2008 12:51 pm |
  |
I have installed rss2html and rssfilter.
The code on my /index.php for rss2html is:
Code: |
<?php
$XMLFILE = "http://lofatlabs.com/inc/rss/site_update_feed.php";
$TEMPLATE = "http://lofatlabs.com/inc/rss/excerpt_template.html";
$MAXITEMS = "2";
include 'inc/rss/rss2html.php';
?> |
and my rssfilter script is:
Code: |
<?PHP
// The URL of the feed.
$XMLfilename = "http://lofatlabs.com/blog/feed/";
$outputCacheTTL = 3600;
$useOutputCaching = 0;
//
// The function that decides if the current item will be used.
// return TRUE to use the itme, FALSE to not
if (!isset($_REQUEST["buildScript"])) {
Function rssFilter_useItem($currentItem) {
// the default fall through is to use the item
if ($currentItem->contains("~~~ItemCategory~~~", "Site Update", 0) &&
$currentItem->notEmpty("~~~ItemDescription~~~", "", 0)) {
return TRUE;
}
return FALSE;
}
}
//
// Since we are calling rssFilter.php from here, we don't want
// to include a separate script file.
$FilterScriptFilename = "DO_NOT_INCLUDE_SCRIPT";
if (!isset($_REQUEST["buildScript"])) {
@include_once("rssFilter.php");
}
$matchType = "AND";
$filterElements = Array(
// Entry #1
Array("Field" => "~~~ItemCategory~~~",
"Filter" => "contains",
"Value" => "Site Update",
"MatchCase" => "0"
)
,
// Entry #2
Array("Field" => "~~~ItemDescription~~~",
"Filter" => "notEmpty",
"Value" => "",
"MatchCase" => "0"
)
);
?> |
The output for running this is a very lovely styled:
$errorCode = 4
xml_error_string() = Empty document
xml_get_current_line_number() = 2
xml_get_current_column_number() = 1
xml_get_current_byte_index() = 40
When I check the script in rssfilter build it works great. Please see http://test.lofatlabs.com/index.php for the result.
Any help is greatly appreciated,
Nick |
|
|
 |
 |
lofatlabs
Joined: 22 Nov 2008
Posts: 2
|
Posted:
Sat Nov 22, 2008 1:16 pm |
  |
Solved. Thanks for the great software. Well worth the price. |
|
|
 |
 |
|
| |