Commits

Doug Stewart  committed c53b76b

Added correct code so templates should get parsed correctly; added arl (Subtraction-style) archives; added checkbox functionality to functions.php.

  • Participants
  • Parent commits e7744a0

Comments (0)

Files changed (4)

File archive.php

-<?php get_header(); ?>
-
-<div id="wrapper">
-	<div id="content">
-		<?php include( TEMPLATEPATH . '/theloop.php' ); ?>
-	</div>
-</div>
-
-<?php get_sidebar(); ?>
-
-<?php get_footer(); ?>

File archives.php

+<?php
+/*
+Template Name: Archives
+*/
+?>
+<?php get_header(); ?>
+
+<div id="wrapper">
+	<div id="content">
+	<?php arl_subtraction_archives_posts(); ?>
+	</div>
+</div>
+
+<?php get_sidebar(); ?>
+
+<?php get_footer(); ?>

File functions.php

 
 
 $options = array (
-				array(	"name" => "Number of Columns",
-						"id" => $shortname."_num_columns",
-						"std" => "3",
-						"type" => "radio",
-						"options" => array("1" => "One","2" => "Two","3" => "Three") ),
 	
+				array(	"name" => "Use Custom Headers",
+						"id" => $shortname."_use_custom_header",
+						"std" => "false",
+						"type" => "checkbox"),
+						
 				array(	"name" => "\"About\" Text",
 						"id" => $shortname."_about_text",
 						"std" => "This is a little blurb about your site.",
 				$radio_setting = get_settings($value['id']);
 				if($radio_setting != ''){
 		    		if ($key == get_settings($value['id']) ) {
-						$checked = "checked";
+						$checked = "checked=\"checked\"";
 						} else {
 							$checked = "";
 						}
 				}else{
 					if($key == $value['std']){
-						$checked = "checked";
+						$checked = "checked=\"checked\"";
 					}else{
 						$checked = "";
 					}
 	        </td>
 	    </tr>
 		<?php
-
+		break;
+		
+		case "checkbox":
+		?>
+			<tr valign="top"> 
+		        <th scope="row"><?php echo $value['name']; ?>:</th>
+		        <td>
+		           <?php
+						if(get_settings($value['id'])){
+							$checked = "checked=\"checked\"";
+						}else{
+							$checked = "";
+						}
+					?>
+		            <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
+		            <?php  ?>
+		        </td>
+		    </tr>
+			<?php
 		break;
 
 		default:
 <?php
 }
 
+function option_wrapper_header($values){
+	?>
+	<tr valign="top"> 
+	    <th scope="row"><?php echo $value['name']; ?>:</th>
+	    <td>
+	<?php
+}
+
+function option_wrapper_footer(){
+	?>
+	    </td>
+    </tr>
+	<?php 
+}
+
 function mytheme_wp_head() { /*?>
 <link href="<?php bloginfo('template_directory'); ?>/style.php" rel="stylesheet" type="text/css" />
 <?php*/ }
+<?php
+/*
+Template Name: Page
+*/
+?>
 <?php get_header(); ?>
 
 <div id="wrapper">