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. <<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~~~FeedTitle~~~

~~~FeedTitle~~~

~~~FeedDescription~~~


~~~BeginItemsRecord~~~ ~~~EndItemsRecord~~~
~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~
~~~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. <<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~~~FeedTitle~~~

~~~FeedTitle~~~

~~~FeedDescription~~~


~~~BeginItemsRecord~~~ "; 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 <<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~~~FeedTitle~~~

~~~FeedTitle~~~

~~~FeedDescription~~~


~~~BeginItemsRecord~~~ ~~~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 table to display a 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. <<<<<<<<<<<<<<<<<<<<<<<<<<< START OF FILE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~~~FeedTitle~~~

~~~FeedTitle~~~

~~~FeedDescription~~~


~~~BeginItemsRecord~~~ 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 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>