View Single Post
Old 2007-04-01, 02:07 PM   #1
T Pat
You can now put whatever you want in this space :)
 
T Pat's Avatar
 
Join Date: Aug 2003
Location: Paridise
Posts: 3,244
Send a message via ICQ to T Pat
RSS2HTML-PRO anyone using it?

I’ve been playing with this script for a couple days now, what a pain.
In the documentation they show the code for an example page that is supposed to strip the image out of the description so you can place the image where ever you want.

I can’t get it to work, here’s the example:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>~~~FeedTitle~~~</title>
</head>
<body>
<h1>~~~FeedTitle~~~</h1>
<p>~~~FeedDescription~~~</p>
<hr>
<table width="100%">
~~~BeginItemsRecord~~~
<?php
// Set initial values for our variables
$theImage = "&nbsp;"; // To ensure proper display with borders
$newDescription = "~~~ItemDescription~~~";
$match = Array();

// Use regular expressions to find <img ... >
if (preg_match("/<img[^>]*>/", $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 "<tr><td>$theImage</td><td>~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~<br>";
echo "~~~ItemTitle~~~<br>";
echo "$newDescription</td></tr>";
echo "<tr><td colspan=\"2\"><hr></td></tr>";
?>
~~~EndItemsRecord~~~
</table>
</body>
</html>

This is what I end up with
http://www.rssnobrainer.com/test3.php
HELP!
__________________
How To Keep An Asshole In Suspense

I'll Tell You Later
T Pat is offline   Reply With Quote