FeedForAll Forum Index ?
?Home?????FAQ????? Search ?????Register ?????Profile? ????Log in
?New version of rss2html-pro available View next topic
View previous topic
Post new topicReply to topic
Author Message
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Mon Apr 23, 2007 9:21 am Reply with quoteBack to top

A new version of rss2html-pro.php v3.0 has been uploaded.

* Enchanced support for the Atom 1.0 feed format. The feed elements in Atom 1.0 that are used by blogger.com feeds are supported.
* Add the ability to parse and access elements in the iTunes(R), Dublin Core and TrackBack extensions.
* Update documentation.

The new version is available for download to registered users of FeedForAll Mac, FeedForAll and those that have purchased the scripts directory at http://www.feedforall.com/scripts/rss2html-pro.zip

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
View user's profileVisit poster's website
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Tue Apr 24, 2007 5:50 pm Reply with quoteBack to top

RSS2HTML-Pro v3.x PHP Script Documentation

CONTENTS:
Introduction
Install
Uses
Limitations
Unique Item Link
Use in Templates
Examples
XML Namespaces and New Tags


Introduction:
-------------

RSS2HTML-Pro adds three new features to the free version of RSS2HTML:
- Allows user written PHP code to be included in the RSS2HTML template file to do advanced processing
- Allows the creation of a special link back to the same feed that displays only the one item the link is for
- Expands RSS2HTML to process and support the iTunes(R) and TrackBack namespaces.


Install:
-------------

To install RSS2HTML-Pro copy all of the .php files in rss2html-pro.zip to your web server to the same directory as rss2html.php


Uses:
-----

- Filter the items displayed by words or phrases
- Filter the display of items by time or date ranges
- Modify the contents of the RSS Feed
- Create a link to an item in the RSS Feed that displays on its own page
- Include iTunes(R) Podcast fields or TrackBack URLs in the output


Limitations:
-------------

PHP is a programming language (http://www.php.net/manual/en/introduction.php) that can be used on webservers. As such, to use the features of RSS2HTML-Pro you will need to know how to program in PHP, or be fimilar with programming and able to learn PHP.

RSS2HTML-Pro does not support the short PHP tags, for reasons noted on http://us3.php.net/manual/en/language.basic-syntax.php. Only the "" and "" PHP tags are supported.


Unique Item Link:
-----------------

RSS2HTML-Pro provides the capability to create a link that points to a specific item, allowing just that item to be displayed. This is done by placing ~~~ItemUniqueLinkWithTemplate=X~~~ into the template. A link to the item will be created using the template 'X'. This can be used to create a web page for the item showing more information than what was show on the page with all the items from the feed.


Use in Templates:
-----------------

RSS2HTML does the substitutions into the template of the RSS feed values into the special ~~~X~~~ place holders in the template. After the whole feed has been parsed and the output of RSS2HTML is complete, it is then passed to the RSS2HTML-Pro module for parsing. Since the result of replacing the ~~~X~~~ place holders produce raw strings, they must be placed inside of quotation marks for use in PHP. To prevent an quotation marks in the RSS feed values causing problems, RSS2HTML-Pro converts all quotation marks to the special value of ~~~QUOTE~~~ before processing. Then after processing all ~~~QUOTE~~~s are converted back to quotation marks.


Examples:
---------

Included in rss2html-pro.zip is a file, rss2html-pro-examples.txt, that has an ever expanding set of example code. Some of the examples are very simple, with others are very complex.


XML Namespaces and New Tags:
----------------------------

RSS2HTML-Pro adds the capability for processing XML Namespaces and using the values in your template files. The first three supported XML Namespaces are iTunes(R), TrackBack and Dublin Core. To enable the use of the extensions copy the file FeedForAll_parse_Extensions.inc.php and the FeedForAll_parse_*.inc.php files for the extensions you want to use into the same directory as FeedForAll_rss2html_pro.php and rss2html.php. The following tags are added:

~~~FeediTunesSubtitle~~~
~~~FeediTunesSummary~~~
~~~FeediTunesCategory~~~
~~~FeediTunesSubCategory~~~
~~~FeediTunesKeywords~~~
~~~FeediTunesAuthor~~~
~~~FeediTunesOwnerEmail~~~
~~~FeediTunesOwnerName~~~
~~~FeediTunesImage~~~
~~~FeediTunesExplicit~~~
~~~FeediTunesBlocked~~~
~~~ItemiTunesSubtitle~~~
~~~ItemiTunesSummary~~~
~~~ItemiTunesDuration~~~
~~~ItemiTunesKeywords~~~
~~~ItemiTunesAuthor~~~
~~~ItemiTunesExplicit~~~
~~~ItemiTunesBlocked~~~

~~~ItemTrackBackPing~~~
~~~ItemTrackBackAbout~~~

~~~ItemDCTitle~~~
~~~ItemDCDescription~~~
~~~ItemDCDate~~~
~~~ItemDCSubject~~~
~~~ItemDCCreator~~~
~~~ItemDCPublisher~~~
~~~ItemDCContributor~~~
~~~ItemDCLanguage~~~
~~~ItemDCRights~~~
~~~ItemDCType~~~
~~~ItemDCFormat~~~
~~~ItemDCIdentifier~~~
~~~ItemDCSource~~~
~~~ItemDCRelation~~~
~~~ItemDCCoverage~~~


Copyright 2006-2007 NotePage, Inc. All rights reserved

$Id: rss2html-pro-docs.txt,v 3.0 2007/04/16 14:23:03 housley Exp $

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
View user's profileVisit poster's website
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Tue Apr 24, 2007 5:52 pm Reply with quoteBack to top

Example: 1 - Is the XML tag empty?
Level: Simple
Description: This example template uses a very simple table to display a
feed. The PHP code is used to check if ~~~ItemLink~~~ is
blank. If it is blank only the title is display. If it is
not blank, the title is made into a link.

Code:
<<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

?
? ?
? ? ~~~FeedTitle~~~
?
?
? ?

~~~FeedTitle~~~


? ?

~~~FeedDescription~~~


? ?

? ?
? ? ? ~~~BeginItemsRecord~~~
? ? ?
? ? ?
? ? ?
? ? ?
? ? ? ~~~EndItemsRecord~~~
? ?
~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~

// Is the Item Link blank?
if ("~~~ItemLink~~~" != "") {
? // No it was not blank
? echo "~~~ItemTitle~~~";
} else {
? // Yes it was blank
? echo "~~~ItemTitle~~~";
}
?>
? ? ?
~~~ItemDescription~~~


?

<<<<<<<<<<<<<<<<<<<<<<<<<<<< END OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Example: 2 - How old is this item?
Level: Medium
Description: This example template uses a very simple table to display a
feed. The PHP code will only display item that between 24
and 72 hours old.

Code:
<<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

?
? ?
? ? ~~~FeedTitle~~~
?
?
? ?

~~~FeedTitle~~~


? ?

~~~FeedDescription~~~


? ?

? ?
? ? ? ~~~BeginItemsRecord~~~
$okayToDisplay = 0;

// Only find the time/date of an item if there was a PubDate
if ("~~~ItemPubDate~~~" != "" ){
? $pubDateTime = strtotime("~~~ItemPubDate~~~");
? $now = time();
? if ((24*60*60 <= ($now - $pubDateTime)) && (($now - $pubDateTime) <= 72*60*60)) {
? ? $okayToDisplay = 1;
? }
}

if ($okayToDisplay == 1) {
? echo "";
? echo "";
? echo "";
? echo "";
}
?>
? ? ? ~~~EndItemsRecord~~~
? ?
~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
~~~ItemTitle~~~
~~~ItemDescription~~~


?

<<<<<<<<<<<<<<<<<<<<<<<<<<<< END OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Example: 3 - Does the title or description contain this word?
Level: Medium
Description: This example template uses a very simple table to display a
feed. The PHP code will look for certian words in the title
or description of the items, and only those that have it.
NOTE: stristr() is use to prevent problems with captial letters

Code:
<<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

?
? ?
? ? ~~~FeedTitle~~~
?
?
? ?

~~~FeedTitle~~~


? ?

~~~FeedDescription~~~


? ?

? ?
? ? ? ~~~BeginItemsRecord~~~
$okayToDisplay = 0;

// Look for the words "puppy" or "puppies"
if ((stristr("~~~ItemTitle~~~", "puppy") !== FALSE) ||
? ? (stristr("~~~ItemDescription~~~", "puppy") !== FALSE) ||
? ? (stristr("~~~ItemTitle~~~", "puppies") !== FALSE) ||
? ? (stristr("~~~ItemDescription~~~", "puppies") !== FALSE)) {
? $okayToDisplay = 1;
}

if ($okayToDisplay == 1) {
?>
? ? ?
? ? ?
? ? ?
? ? ?
}
?>
? ? ? ~~~EndItemsRecord~~~
? ?
~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
~~~ItemTitle~~~
~~~ItemDescription~~~


?

<<<<<<<<<<<<<<<<<<<<<<<<<<<< END OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Example: 4 - Get the image embedded in the description
Level: Advanced
Description: This example template uses a very simple table to display an
items image embedded in the description. The PHP code will extract
the image, if any and display it in a seperate column and
remove it from the description.

Code:
<<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

?
? ?
? ? ~~~FeedTitle~~~
?
?
? ?

~~~FeedTitle~~~


? ?

~~~FeedDescription~~~


? ?

? ?
? ? ? ~~~BeginItemsRecord~~~
// Set initial values for our variables
$theImage = " "; // To ensure proper display with borders
$newDescription = "~~~ItemDescription~~~";
$match = Array();

// Use regular expressions to find
if (preg_match("/]*>/", $newDescription, $match) !== FALSE) {
? // Make sure it truely was a match
? if ((count($match) != 0) && ($match[0] != "")) {
? ? // Save the image
? ? $theImage = $match[0];
? ? // Remove the image from the description
? ? $newDescription = str_replace($match[0], "", $newDescription);
? }
}

echo "
";
echo "";
?>
? ? ? ~~~EndItemsRecord~~~
? ?
$theImage~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
";
echo "~~~ItemTitle~~~
";
echo "$newDescription


?

<<<<<<<<<<<<<<<<<<<<<<<<<<<< END OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Example: 5 - Don't display items with duplicate titles or links
Level: Advanced
Description: This example builds an array of the titles and links of each
item. It then check to make sure that they haven't been used before.

Code:
<<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$titleArray = Array();
$linkArray = Array();
?>

?
? ?
? ? ~~~FeedTitle~~~
?
?
? ?

~~~FeedTitle~~~


? ?

~~~FeedDescription~~~


? ?

? ?
? ? ? ~~~BeginItemsRecord~~~
$okayToDisplay = 1;

//
// Add the current item title and link to the arrays
$titleArray[] = "~~~ItemTitle~~~";
$linkArray[] = "~~~ItemLink~~~";

for ($x = 0; $x < count($titleArray)-1; $x++) {
? //
? // Look to see if there were previously used.
? if (("~~~ItemTitle~~~" == $titleArray[$x]) || ("~~~ItemLink~~~" == $linkArray[$x])) {
? ? $okayToDisplay = 0;
? ? break;
? }
}

if ($okayToDisplay == 1) {
?>
? ? ?
? ? ?
? ? ?
? ? ?
}
?>
? ? ? ~~~EndItemsRecord~~~
? ?
~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
~~~ItemTitle~~~
~~~ItemDescription~~~


?

<<<<<<<<<<<<<<<<<<<<<<<<<<<< END OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Example: 6 - Convert any tags to XHTML 1.0 compliant format
Level: Advanced
Description: XHTML 1.0 is much more strict about tags and attributes.
is not part of XHTML, so remove it. requires the ending slash
so make sure it is in the format . Lastly make sure
there is a alt="" tag.

[code]<<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Function convertToXHTML_img($source) {
// Since has not closing tag, remove all
$newDescription = str_replace("", "", "There is no img tag");

// Use regular expressions to find
if (preg_match_all("/]*>/i", $newDescription, $match) !== FALSE) {
// Make sure it truely was a match
for ($x = 0; $x < count($match[0]); $x++) {
if ($match[0][$x] != "") {
// Save the image
$theImage = $match[0][$x];

// If the tag isn't closed with />, make it so
if (stristr(str_replace(" ", "", $theImage), "/>") === FALSE) {
$theImage = str_replace(">", "/>", $theImage);
}

// Check for the alt="" tag
if (stristr(str_replace(" ", "", $theImage), "alt=") === FALSE) {
$theImage = str_replace("/>", " alt=\"\" />", $theImage);
}

// Remove the image from the description
$newDescription = str_replace($match[0][$x], $theImage, $newDescription);
}
}
}

return $newDescription;
}
?>



~~~FeedTitle~~~


~~~FeedTitle~~~






~~~BeginItemsRecord~~~




~~~EndItemsRecord~~~
~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
~~~ItemTitle~~~




<<<<<<<<<<<<<<<<<<<<<<<<<<<< END OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[/code[

Copyright 2006-2007 NotePage, Inc. All rights reserved

$Id: rss2html-pro-examples.txt,v 3.0 2007/04/16 14:23:03 housley Exp $

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
View user's profileVisit poster's website
webwizard



Joined: 09 Oct 2009
Posts: 4

PostPosted: Fri Oct 09, 2009 4:13 am Reply with quoteBack to top

Please help how to remove remove the text in description after certain word. Like in description when it comes to ... then the text after ... should not be displayed

OR

How to remove links in description. The feed I am using shows small Advertisement in description with OBL.
View user's profile
terryhan



Joined: 04 Dec 2009
Posts: 2

PostPosted: Mon Dec 21, 2009 9:53 am Reply with quoteBack to top

I didn't understand it very well.who can share some tutorial?
View user's profile
asharfraz



Joined: 03 Jan 2010
Posts: 1

PostPosted: Sun Jan 03, 2010 9:32 am Reply with quoteBack to top

what is the passwod to donwload the script
View user's profileVisit poster's websiteMSN Messenger
Tech Support



Joined: 27 Aug 2004
Posts: 2692

PostPosted: Tue Jan 05, 2010 11:12 am Reply with quoteBack to top

Please email sales at feedforall dot com with a request for the information. They can look up your registration and provide the password for the templates or pro script, depending on what you have access to.

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
FeedForAll Sales



Joined: 10 Jun 2009
Posts: 249

PostPosted: Tue Jan 05, 2010 12:36 pm Reply with quoteBack to top

If the RSS Scripts Directory or FeedForAll software were purchased, please email the order number or license number to: sales at feedforall dot com

The order number can be located in the order confirmation email or receipt, or in FeedForAll's About screen.

Or order at http://www.feedforall.com/order.htm

_________________
FeedForAll Sales
View user's profileVisit poster's website
wiger123



Joined: 05 Oct 2012
Posts: 1

PostPosted: Fri Oct 05, 2012 8:02 am Reply with quoteBack to top

I didn't understand it well.who can share some tutorial?
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2692

PostPosted: Fri Oct 05, 2012 8:15 am Reply with quoteBack to top

Have a look at this video tutorial on how to configure the script:

http://www.feedforall.com/videos/config-rss2html.htm

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
Display posts from previous:?? ? ?
Post new topicReply to topic


?Jump to:? ?



View next topic
View previous topic


Powered by phpBB ? 2001, 2002 phpBB Group :: FI Theme