Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 04:33:01 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: modified rssupdate with link  (Read 361 times)
davematt

Offline Offline

Posts: 24



« on: April 10, 2008, 04:37:45 AM »

hi all, im modified rssupdate module on rss.php, i want to show rss news with only page_id='15'

Quote
....
....
//Query
$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id='15' ORDER BY posted_when DESC LIMIT 0 , 10";
$result = $database->query($query);

//Generating the page info
while($item = $result->fetchRow($result)) {

        echo "<item>";
        echo "<title>".stripslashes($item["title"])."</title>";
// Stripping HTML Tags for text-only visibility
        echo "<description>Latest update: ".date("d-M-Y, H:i",$item["posted_when"])." ".strip_tags(isset($item["content_short"])? $item["content_short"] : '')."</description>";
        echo "<link>".PAGES_DIRECTORY.$item['link'].PAGE_EXTENSION."</link>";
/* Add further (non required) information here like ie.
        echo "<author>".$item["posted_by"]."</author>");
        etc.
*/
        echo "</item>";

}


im test http://path/rss.php and the page can only display TITLE,Posted Latest and COntent Short.
but i want to show link on title, so as to user click full pages on the target link
Logged
sorin negulescu

Offline Offline

Posts: 7


« Reply #1 on: April 10, 2008, 05:10:07 AM »

As I understood, the link "is not functioning".
I think that the problem is that the characters in the link are parsed too and certain chars like & and < or > means trouble!

Maybe this will help you: http://www.w3schools.com/Xml/xml_cdata.asp
Also you may want to search google for ![CDATA[]].

Sorin.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!