RSS problem HESK
Posted: Thu May 27, 2010 8:15 am
I already tried the code you provided in one of the Thread's here to achive RSS in Hesk
The above code I just modified to display all the Articles from all Categories.
I think there is some problem.
I do not see the Link to the Original Article and also I do not see the Content.
I only see the Title of the Article.
Please let me know how can i correct this
To see how the RSS look
Check here http://hefin.in/rss.php
Thanks In Advance
Code: Select all
<?php
header("Content-Type: application/xml; charset=ISO-8859-1");
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.1 from 7th August 2009
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2009 Klemen Stirn. All Rights Reserved.
* HESK is a trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
define('IN_SCRIPT',1);
define('HESK_PATH','');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
$hesk_settings['debug_mode']=0;
error_reporting('E_ALL');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/database.inc.php');
/* Is Knowledgebase enabled? */
if (!$hesk_settings['kb_enable'])
{
hesk_error($hesklang['kbdis']);
}
$now = date("D, d M Y H:i:s T");
$output = "<?xml version=\"1.0\"?>
<rss version=\"2.0\">
<channel>
<title>" . $hesk_settings['site_title'] . "</title>
<link>" . $hesk_settings['site_url'] . "rss.php" . "</link>
<description>" . $hesk_settings['hesk_title'] . "</description>
<language>en-us</language>
<pubDate>$now</pubDate>
<lastBuildDate>$now</lastBuildDate>
<docs>http://hefin.in</docs>
<managingEditor>" . $hesk_settings['webmaster_mail'] . "</managingEditor>
<webMaster>webmaster@hefin.in</webMaster> ";
print $output;
/* Connect to database */
hesk_dbConnect();
/* Any category ID set? */
$catid = isset($_GET['category']) ? intval($_GET['category']) : 2;
$artid = isset($_GET['article']) ? intval($_GET['article']) : 0;
$hesk_settings['kb_link'] = ($artid || $catid != 1 || $query) ? '<a href="knowledgebase.php" class="smaller">'.$hesklang['kb_text'].'</a>' : $hesklang['kb_text'];
/*** START FUNCTIONS ***/
function hesk_show_kb_article($catid) {
global $hesk_settings, $hesklang;
$sql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_articles` ';
//print $sql;
$result = hesk_dbQuery($sql);
$items = '';
while ($article = hesk_dbFetchAssoc($result))
{
$items .= '<item>
<title>'. $article['subject'] .'</title>
<link>'. $row["link"] .'</link>
<description><![CDATA['. $row["content"] .']]></description>
</item>';
} // while
$items .= '</channel>
</rss>';
print $items;
} // END hesk_show_kb_article()
//hesk_show_kb_article(3);
hesk_show_kb_article(0);
?>
I think there is some problem.
I do not see the Link to the Original Article and also I do not see the Content.
I only see the Title of the Article.
Please let me know how can i correct this
To see how the RSS look
Check here http://hefin.in/rss.php
Thanks In Advance