Location: PHPKode > projects > phpGrabComics > www/admin/desktop_creator.php
<?php
/*

Copyright © 2001, 2002, 2003, 2004, 2005 Andres Baravalle

This file is part of phpGrabComics.

phpGrabComics is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

phpGrabComics is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with phpGrabComics; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/
include_once("dir.php");
include_once($dir . "inc/prepend.php");
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><!-- InstanceBegin template="../Templates/accessible.dwt" codeOutsideHTMLIsLocked="true" -->
<head>

<?php
include_once($dir . "inc/head.php");
?>
<!-- #BeginEditable "doctitle" -->
<?php
$title="Desktop creator";
// include all the comics classes
include_once($dir . "inc/load_comics_classes.php");
// include PEAR classes
include_once($dir . "inc/load_PEAR_classes.php");
?>
<!-- #EndEditable -->
<title>
<?php 
if($title!="")
	echo "phpGrabComics - " . $title;
else
{
	$title = "phpGrabComics";
	echo $title;
}
?>
</title>
</head>
<body> 
<div id="header"> 
	<div class="left" id="logo"><a href="../index.php"><img src="<?php echo $banners_file; ?>/phpgrabcomics_10.png" alt="phpGrabComics home page" width="85" height="85" style="vertical-align: middle; margin-right: 36px;" /></a><h1><?php echo $title; ?></h1></div> 
	<?php
	// disable search bar for sites other then the main one.
	if(!empty($atomz_code))
	{
	?>	
	<div class="right" id="title" style="vertical-align: top;">		
		<form method="get" action="../search.php">
			<p style="text-align:right"><br /><input size="15" name="sp-q" value="<?php if(isset($_REQUEST["sp-q"])) echo $_REQUEST["sp-q"]; ?>" />
				<input type="hidden" name="sp-a" value="<?php echo $atomz_code; ?>" style="font-size:12px;background-color:#FFFFCC" accesskey="s" />
				<input type="hidden" name="sp-p" value="all" />
				<input type="hidden" name="sp-f" value="iso-8859-1" />
				<input type="submit" value="Search" />				
			</p>
		</form>		
	</div> 
	<?php
	}
	?>
	<hr /> 
</div> 
<div id="body"> 
	<?php
	if (isset($_GET["show_source"]) and $_GET["show_source"]==1)
	{	
		echo "<br /><h2>Source of: ".$_SERVER["SCRIPT_NAME"]."</h2>\n<hr />\n";
		highlight_file($_SERVER["SCRIPT_FILENAME"]);
		printf("<hr /><br />". _LAST_MODIFIED . ": %s", gmdate("Y/M/d H:i:s",filemtime($_SERVER["SCRIPT_FILENAME"])));
	}
	else
	{
	?> 
	<!-- #BeginEditable "testo dentro il livello" --> 
	<?php
admin::checkPerm();
if ($authenticated == True and !isset($_GET["logout"]))
{
?> 
  <p>phpGrabComics for desktop (since version 1.4) allows you to create a customised web page, including your favourite comics and using a custom background colour, in just a few clicks. </p> 
   <p>You can use the page as background for your desktop or as the default home page in your browser.</p>
  <p>Before proceeding, you can have a look at <a href="<?php admin::pCustomDesktopLink("#F5B865",Array("dilbert","userfriendly","ninetofive","glasbergen")); ?>">geek</a>, <a href="<?php admin::pCustomDesktopLink("#de3456",Array("andycapp","crock","bc","beetlebailey")); ?>">cult</a>, <a href="<?php admin::pCustomDesktopLink("#123456",Array("snoopy","calvinandhobbes","marmaduke","dennisthemenace")); ?>">children</a>, <a href="<?php admin::pCustomDesktopLink("#ff2345",Array("altan","forattini","grassilli","maramotti","lupo","vauro")); ?>">italian</a> and <a href="<?php admin::pCustomDesktopLink("#f4dd54",Array("fontanarrosa","clemente","condorito","matias","lanelly","crist","diogenes")); ?>">latin-american</a> pre-made desktops, to have an idea of what the result will be.</p> 
  <p>Building your custom desktop should only take 5 to 10 minutes. </p>  
  <h2>Prerequisites</h2> 
  <p>To use phpGrabComics for desktop you will need: </p> 
  <ol> 
    <li> An Internet connection (preferably an always on Internet, like broadband)</li> 
    <li>A operating system that allows you to have web pages as background (as Windows 2000, or Windows XP Home or Pro). Users of Unix-like systems need <a href="http://gdesklets.gnomedesktop.org/">gDdesklets</a> to use the customised web page as desktop, but can use it as default home page. </li>  
  </ol> 
  <form id="comic_form" method="get" action="desktop.php" style="padding: 4px"> 
    <h2>Step 1</h2> 
    <p>Use this menu to select the strips that you want to include in your desktop. Multiple selections are possible. </p> 
		
   
		<p>
			<label for="comic_array[]">Select strips: </label> </p>
			<p>
      <select name="comic_array[]" id="comic_array[]" size="12" multiple="multiple" class="small"> 
        <?php
		$a=0;
		
		reset($comic_list);
		while(list($key,$val) = each($comic_list))
		{
			// do not include a comic if a redirect is not possible
			if($val->checks_enabled!=True)
			{
				$selected = "";
				
				$tmp=array_search($val->unix_name, $phpgrabcomics_selected, true);
				if(is_int($tmp))
				{
					$selected = " selected=\"selected\"";
				}
				echo "\t\t\t\t\t<option value=\"" . $val->unix_name. "\"$selected>". $val->name ."</option>\n";
				$a++;
			}
		}
		
		?> 
      </select> 
    
		</p>
    <h2>Step 2</h2> 
		<p>Pick a colour for the background of your desktop, and find its hexadecimal RGB value.</p> 
    <p> 
     You can use a web colour picker:</p> 
    <ul> 
      <li><a href="http://www.colorschemer.com/online.html">www.colorschemer.com/online.html</a> (requires Microsoft Internet Explorer)</li> 
      <li><a href="http://www.free-webmaster-tools.com/colorpicker.htm">www.free-webmaster-tools.com/colorpicker.htm</a> (requires Java)</li> 
      <li><a href="http://www.htmlclinic.com/colorchart.php">www.htmlclinic.com/colorchart.php</a> (simple) </li> 
    </ul> 
    <p> 
      <label for="bg_color">Write background colour code in the following field:</label> 
    </p> 
    <p> 
      <input name="bg_color" id="bg_color" type="text" value="#cc0000" /> 
    </p> 
    <h2>Step 3</h2> 
    <p>Click on the &quot;preview desktop&quot; button: this will open a new browser window with your daily comics and the background colour you have chosen.</p> 
    <p>If you are not satisfied with your result you may return to the previous steps and change the background colour or the comics included, and make a new preview.</p> 
    <p>When you have decided what comics to use and your background colour, copy the web address of the page that you will use as background. You will need it in the next steps.</p> 
    <p><input name="button" type="submit" value="preview desktop" /></p>

    <p>The next steps are for a Microsoft Windows desktop. Users of other operating systems will need to follow a different procedure.</p> 
    <h2>Step 4</h2> 
  <p>Open up the display properties and click on the &quot;Web&quot; tab.</p>
  <h2>Step 5 </h2> 
  <p> Click the &quot;New&quot; button. </p> 
  <h2>Step 6 </h2> 
  <p> Type (or paste) the address of your custom desktop (the one that appears in the preview) as the web address.</p> 
  <h2>Step 7 (optional) </h2> 
	<p>Set up a schedule to time it for whenever you want.</p> 
  <h2>Step 8 </h2> 
  <p> Finish and click &quot;Apply&quot;. </p> 
  <h2>Step 9 </h2> 
  <p>Resize the window until you see the whole comic on your desktop. </p> 
  <h2>Step 10 </h2> 
  <p>Enjoy your new comics every morning (and be prepared for serious nostalgia...).</p>
  <p>You may need to force the refresh of the desktop using Control + F5.</p>
  <p>Enjoy!!!</p>
  <p>(based on a message posted at <a href="http://controlbooth.com/">controlbooth.com</a>  by 


 David Silvernail)</p>
  </form> <?php
}
else
{
echo _NO_AUTH;
}
?>
  <!-- #EndEditable --> 
	<?php
	}
	?> 
</div> 
<div id="footer"> 
	<hr /> 
	<div class="left" id="source"><a href="<?php echo $dir; ?>index.php"><img src="<?php echo $dir; ?>images/logo.png" id="show_source" width="32" height="48" alt="show source" /></a> <a href="<?php echo $_SERVER["SCRIPT_NAME"];?>?show_source=1">show source</a></div> 
	<div class="right" id="hosted"> <a href="http://sourceforge.net/projects/phpgrabcomics/"><img src="<?php echo $dir; ?>sourceforge.php" id="sourceforge" alt="SourceForge" /></a> phpGrabComics	project is hosted at <a href="http://sourceforge.net/projects/phpgrabcomics/">sourceforge.net</a>.</div> 
</div> 
</body>
<!-- InstanceEnd --></html>
<?php
include_once($dir . "inc/append.php");
?>
Return current item: phpGrabComics