[Picfinity-commit] SF.net SVN: picfinity: [9] index.php
Status: Beta
Brought to you by:
espadav8
From: <esp...@us...> - 2007-07-19 00:52:19
|
Revision: 9 http://picfinity.svn.sourceforge.net/picfinity/?rev=9&view=rev Author: espadav8 Date: 2007-07-18 17:52:19 -0700 (Wed, 18 Jul 2007) Log Message: ----------- Little clean up and add the doctype to the XML Modified Paths: -------------- index.php Modified: index.php =================================================================== --- index.php 2007-07-19 00:51:22 UTC (rev 8) +++ index.php 2007-07-19 00:52:19 UTC (rev 9) @@ -1,7 +1,7 @@ <?php // site options - $site_name = "Andrew's Gallery"; + $site_name = "Picfinity"; $theme = ($_GET['theme'] != '') ? $_GET['theme'] : "ajax" ; // not implemented yet @@ -33,7 +33,7 @@ echo $html; - // echo "<div style=\"display:none;\">$xml</div>"; + echo "<div style=\"display:none;\">$xml</div>"; function create_folder_layout($folder) @@ -44,8 +44,7 @@ // get a listing of the files/folder $folder_contents = scandir($folder); $name = substr($folder, strrpos($folder, '/') + 1); - $id = uniqid('id'); - $layout = array('name' => $name, 'id' => $id); + $layout = array('name' => $name, 'id' => uniqid('id')); // for each entry while (list(,$folder_entry) = each($folder_contents)) @@ -59,7 +58,6 @@ { // get a list of it's files and check/create thumbnail(s) $sub_layout = create_folder_layout($folder . '/' . $folder_entry); - //$layout[] = array($folder_entry => $sub_layout); $layout['folder'][] = $sub_layout; } else @@ -169,14 +167,18 @@ // An array of serializer options $serializer_options = array ( 'addDecl' => !$headless, + 'addDoctype' => true, 'encoding' => 'ISO-8859-1', 'indent' => ' ', 'indentAttributes' => '_auto', 'rootName' => 'layout', 'defaultTagName' => $tag_name, 'mode' => 'simplexml', - 'scalarAsAttributes' => true - + 'scalarAsAttributes' => true, + 'doctype' => array ( + 'id' => '-//picfinity//Gallery Layout//EN', + 'uri' => 'http://www.sunset-cigarette.co.uk/gallery/gallery.dtd' + ) ); // Instantiate the serializer with the options @@ -189,8 +191,6 @@ if (PEAR::isError($status)) { die($status->getMessage()); } - - // print_r($Serializer->options); // return the XML document return $Serializer->getSerializedData(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |