[Phpslash-commit] CVS: phpslash-dev/public_html backend.php,1.2,1.3
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2004-11-01 17:35:58
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8704/phpslash-dev/public_html Modified Files: backend.php Log Message: Added Atom and RSS2.0 feeds. Default changed to RSS2.0. Index: backend.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/backend.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** backend.php 13 Sep 2004 23:35:24 -0000 1.2 --- backend.php 1 Nov 2004 17:35:44 -0000 1.3 *************** *** 73,76 **** --- 73,80 ---- // What to build for output switch( $ary['view']) { + case 'atom': + $viewtpl = 'backendAtom.tpl'; + header("Content-type: text/xml"); + break; case 'avantgo': $viewtpl = 'backendAV.tpl'; *************** *** 106,109 **** --- 110,119 ---- header("Content-type: text/xml"); break; + case 'rss1': + $viewtpl = 'backendRSS1.tpl'; + // RSS-1.0 needs a extra listing. + $link_ary = array(); + header("Content-type: text/xml"); + break; case 'txt': $viewtpl = 'backendTxt.tpl'; *************** *** 118,126 **** break; case 'rss': ! case 'rss1': default: ! $viewtpl = 'backendRSS1.tpl'; ! // RSS-1.0 needs a extra listing. ! $link_ary = array(); break; } --- 128,135 ---- break; case 'rss': ! case 'rss2': default: ! $viewtpl = 'backendRSS2.tpl'; ! header("Content-type: text/xml"); break; } *************** *** 135,139 **** // Create the template object, and set some options for silent running ! $template = pslNew("slashTemplate",$_PSL['templatedir']); $template->debug = 0; $template->set_unknowns('remove'); --- 144,148 ---- // Create the template object, and set some options for silent running ! $template = pslNew("slashTemplate"); $template->debug = 0; $template->set_unknowns('remove'); *************** *** 158,161 **** --- 167,171 ---- 'PHP_SELF' => $_PSL['phpself'], 'ROOTDIR' => $_PSL['rooturl'], + 'ROOTURL' => $_PSL['rooturl'], 'DATE' => $date, 'IMAGEDIR' => $_PSL['imageurl'], *************** *** 189,196 **** --- 199,210 ---- $template->set_var(array( 'STORY_ID' => $stories[$i]['story_id'], + 'NAME' => $stories[$i]['name'], + 'URL' => $stories[$i]['url'], 'TITLE' => htmlspecialchars(strip_tags($stories[$i]['title'])), 'TITLE_HTML' => $stories[$i]['title'], 'INTRO_TEXT' => $description, 'INTRO_TEXT_HTML' => $stories[$i]['intro_text'], + 'BODY_TEXT' => htmlspecialchars(strip_tags($stories[$i]['body_text'])), + 'BODY_TEXT_HTML' => $stories[$i]['body_text'], 'IDX' => $i, 'DATEF' => $stories[$i]['datef'], |