The Categories Bar ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ --> <div id="cat-bar"> <?php if (function_exists('hmt_extras')) { // Extras plugin? Then go get the suckerfish Javascript hmt_suckerfish_catbar(); } else { ?> <div id="cat-bar-content"> <ul> <?php $exclude = hmt_get_option(hmt_exclude_categories); $clean_cats = wp_list_categories('sort_column=menu_order&title_li=&depth=1&exclude=' . $exclude); //...again, categories can be excluded here as specified in the options page $clean_cats = str_replace('No categories', '', $clean_cats); // added 31/1/10 - strip out the 'No Categories' message when there are no categories - to leave just a blank line echo $clean_cats; ?> </ul> </div> <!-- id="cat-bar-content" --> <?php } ?> </div> <!-- id="cat-bar" --> <!--
function hmt_admin() { global $themename, $shortname, $options, $baseversion, $thisversion, $subtitle; if ($_REQUEST['saved']) { echo '<div id="message" class="updated fade"><p><strong>' . $themename . ' Theme settings saved.</strong></p></div>'; } if ($_REQUEST['reset']) { echo '<div id="message" class="updated fade"><p><strong>' . $themename . ' Theme settings reset.</strong></p></div>'; } ?> <div class="wrap"> <h2><img src="<?php echo bloginfo('template_url'); ?> /images/mappy-wp-bw-45-web.png" align="absbottom" width="47px" height="45px" /> <?php echo $themename; ?> Options</h2> <div style="width:965px;"> <div style="float:left"> <form method="post"> <?php // if we are in preset mode then we have to do some fancy footwork to bring the preset mode turner-off-er up to the top of the options page $preset_mode_already_shown = FALSE; $this_mode = hmt_get_option(hmt_preset_mode_activated); if ($this_mode == "ON" || $this_mode == "") { $preset_mode = TRUE; $show_next_time = FALSE; ?> <div id="message" class="updated fade"> <p><span style="color:#F00"><strong>Preset Mode</strong></span> is activated. To activate <strong>Full Widget Mode</strong> (recommended) and activate all Widget Positions turn off Preset Mode below :) </div> <?php } ?> <?php foreach ($options as $value) { // Loop through the options array and display all the options in a form for editing. switch ($value['type']) { /* This is the left column of the options page -------------------------------------------------------------- */ /* Open -------------------------------------------------------------- */ case "open": ?> <table class="widefat" cellspacing="0" style="width:600px;"><tbody> <?php break; /* Close -------------------------------------------------------------- */ /* Close -------------------------------------------------------------- */ case "close": ?> </tbody></table> <br /> <?php break; /* Title -------------------------------------------------------------- */ /* Title -------------------------------------------------------------- */ case "title": ?> <thead> <tr> <th colspan="2" scope="col"> <?php echo $value['name']; ?> <div style="float:right"> <input name="save" type="submit" value="Save" class="button-primary"/> <input type="hidden" name="action" value="save" /> </div> </th> </tr> </thead> <?php break; /* Text -------------------------------------------------------------- */ /* Text -------------------------------------------------------------- */ case 'text': ?> <tr> <td width="250px"><strong><?php echo $value['name']; ?> </strong><br /> <small><a href="http://heatmaptheme.com/<?php echo $subtitle; ?> /version-<?php echo $baseversion; ?> /<?php echo $value['userguide']; ?> /"><strong>[User Guide]</strong></a></small><br /><br /> <?php echo $value['desc']; ?> </td> <td width="350px"> <input style="width:340px; font-size:11px;" name="<?php echo $value['id']; ?> " id="<?php echo $value['id']; ?> " type="text" value="<?php if (get_option($value['id']) != "") { echo htmlspecialchars(stripslashes(get_option($value['id']))); } else { echo $value['std']; } ?> " /> </td> </tr> <?php break; /* Text Area -------------------------------------------------------------- */ /* Text Area -------------------------------------------------------------- */ case 'textarea': ?> <tr> <td width="250px"><strong><?php echo $value['name']; ?> </strong><br /> <small><a href="http://heatmaptheme.com/<?php echo $subtitle; ?> /version-<?php echo $baseversion; ?> /<?php echo $value['userguide']; ?> /"><strong>[User Guide]</strong></a></small><br /><br /> <?php echo $value['desc']; ?> </td> <td width="350px"> <textarea name="<?php echo $value['id']; ?> " style="width:340px; height:120px; font-size:11px;" cols="" rows=""><?php if (get_option($value['id']) != "") { echo stripslashes(htmlspecialchars(get_option($value['id']))); } else { echo $value['std']; } ?> </textarea> </td> </tr> <?php break; /* Checkbox -------------------------------------------------------------- */ /* Checkbox -------------------------------------------------------------- */ case 'checkbox': ?> <tr> <td width="250px"><strong><?php echo $value['name']; ?> </strong><br /> <small><a href="http://heatmaptheme.com/<?php echo $subtitle; ?> /version-<?php echo $baseversion; ?> /<?php echo $value['userguide']; ?> /"><strong>[User Guide]</strong></a></small><br /><br /> <?php echo $value['desc']; ?> </td> <td width="350px"> <?php if (get_option($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; ?> /> </td> </tr> <?php break; /* Selection - a bit of a hack on this one - just using the select for preset mode in this case... I'll neaten this whole area of code up later I promise ;) -------------------------------------------------------------- */ /* Selection - a bit of a hack on this one - just using the select for preset mode in this case... I'll neaten this whole area of code up later I promise ;) -------------------------------------------------------------- */ case 'select': if ($preset_mode == TRUE && !$preset_mode_already_shown || $show_next_time == TRUE) { ?> <table class="widefat" cellspacing="0" style="width:600px;"><tbody> <thead> <tr> <th colspan="2" scope="col"> <?php echo 'Preset Mode'; ?> <div style="float:right"> <input name="save" type="submit" value="Save" class="button-primary"/> <input type="hidden" name="action" value="save" /> </div> </th> </tr> </thead> <tr> <td width="250px"><strong><?php echo $value['name']; ?> </strong><br /> <small><a href="http://heatmaptheme.com/<?php echo $subtitle; ?> /version-<?php echo $baseversion; ?> /<?php echo $value['userguide']; ?> /"><strong>[User Guide]</strong></a></small><br /><br /> <?php echo $value['desc']; ?> </td> <td width="350px"><select style="width:100px;" name="<?php echo $value['id']; ?> " id="<?php echo $value['id']; ?> "><?php foreach ($value['options'] as $option) { ?> <option<?php if (get_settings($value['id']) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?> ><?php echo $option; ?> </option><?php } ?> </select></td> </tr> </tbody></table> <br /> <?php } $preset_mode_already_shown = TRUE; if ($preset_mode == FALSE) { $show_next_time = TRUE; } break; /* Ad Combo box -------------------------------------------------------------- */ /* Ad Combo box -------------------------------------------------------------- */ case 'ad-combo': ?> <tr> <td width="250px"> <input style="width:200px; font-size:11px; font-weight:bold;" name="<?php echo $value['id'] . '_name'; ?> " id="<?php echo $value['id'] . '_name'; ?> " type="text" value="<?php if (get_option($value['id'] . '_name') != "") { echo get_option($value['id'] . '_name'); } else { echo $value['name']; } ?> " /><br /> <?php foreach ($value['checkbox'] as $checkbox_name => $checkbox_setting) { $this_key = $value['id'] . '_' . $checkbox_name; $this_setting = get_option($this_key); if ($this_setting == '') { $checked = ""; } else { $checked = "checked=\"checked\""; } ?> <input type="checkbox" name="<?php echo $this_key; ?> " id="<?php echo $this_key; ?> " value="true" <?php echo $checked; ?> /> <label for="<?php echo $this_key; ?> "><?php echo $checkbox_name; ?> </label><br /> <?php } ?> <small><a href="http://heatmaptheme.com/<?php echo $subtitle; ?> /version-<?php echo $baseversion; ?> /<?php echo $value['userguide']; ?> /"><strong>[User Guide]</strong></a></small><br /> </td> <td width="350px"> <textarea name="<?php echo $value['id']; ?> " style="width:340px; height:120px; font-size:11px;" cols="" rows=""><?php if (get_option($value['id']) != "") { echo stripslashes(htmlspecialchars(get_option($value['id']))); } else { echo $value['std']; } ?> </textarea> </td> </tr> <?php break; } } ?> <?php /* Submit and Reset Buttons -------------------------------------------------------------- */ ?> <p class="submit"> <input name="save" type="submit" value="Save changes" class="button-primary"/> <input type="hidden" name="action" value="save" /> </p> </form> <form method="post"> <p class="submit"> <input name="reset" type="submit" value="Reset" class="button-secondary" /> <input type="hidden" name="action" value="reset" /> </p> </form> </div> <div style="float:left"> <?php /* This is the right column of the options page -------------------------------------------------------------- */ ?> <table class="widefat" cellspacing="0" style="width:350px; margin-left:15px;"> <tbody> <thead> <tr> <th colspan="2" scope="col"> Latest News from <a href="http://heatmaptheme.com">HeatMapTheme.com</a> </th> </tr> </thead> <tr> <td width="350px"> <?php include_once ABSPATH . WPINC . '/rss.php'; wp_rss('http://heatmaptheme.com/feed', 3); ?> </td> </tr> </tbody> </table> <br /> <table class="widefat" cellspacing="0" style="width:350px; margin-left:15px;"> <tbody> <thead> <tr> <th colspan="2" scope="col"> HeatMap Theme <a href="http://heatmaptheme.com/adsense-theme-for-wordpress/version-2/positioning-adsense-widgets-on-your-blog/" target="_blank">Widget Positions</a> </th> </tr> </thead> <tr> <td width="350px"> <center><a href="http://heatmaptheme.com/adsense-theme-for-wordpress/version-2/positioning-adsense-widgets-on-your-blog/" target="_blank"><img src="<?php echo bloginfo('template_url'); ?> /images/preset-images/widget-layout-small.gif" align="absbottom" width="150px" height="173px" alt="View Widget Positions User Guide"/></a></center> <?php /* <center><a href="http://heatmaptheme.com"><img src="<?php echo bloginfo('template_url'); ?>/images/mappy-wp-bw-250-web.png" align="absbottom" width="250px" height="181px" /></a></center> */ ?> </td> </tr> </tbody> </table> <br /> <table class="widefat" cellspacing="0" style="width:350px; margin-left:15px;"> <tbody> <thead> <tr> <th colspan="2" scope="col"> Base Theme Info </th> </tr> </thead> <tr> <td width="150px"> Author:<br /> Theme Name:<br /> Base Version:<br /> This Version: </td> <td width="200px"> <a href="http://stuartwider.com">Stuart Wider</a><br /> <?php echo $themename; ?> <br /> <?php echo $baseversion; ?> <br /> <?php echo $thisversion; ?> </td> </tr> </tbody> </table> <br /> <?php $ct = current_theme_info(); if ($ct->parent_theme != '') { // if the current theme is a child theme then display extra details form the current theme array. ?> <table class="widefat" cellspacing="0" style="width:350px; margin-left:15px;"> <tbody> <thead> <tr> <th colspan="2" scope="col"> Child Theme Info </th> </tr> </thead> <tr> <td width="150px"> Author:<br /> Theme Name:<br /> Version: </td> <td width="200px"> <?php echo $ct->author . '<br />'; echo $ct->name . '<br />'; echo $ct->version; ?> </td> </tr> </tbody> </table> <br /> <?php } ?> <table class="widefat" cellspacing="0" style="width:350px; margin-left:15px;"> <tbody> <thead> <tr> <th colspan="2" scope="col"> © Copyright, Licensing and Trademarks </th> </tr> </thead> <tr> <td width="350px"> <p><a href="http://heatmaptheme.com">HeatMap Theme</a> is copyright <a href="http://stuartwider.com">Stuart Wider</a> 2009 and distributed under the GPL3 License.</p> <?php if ($ct->parent_theme != '') { ?> <p>Child Themes are copyright of their respective Authors.</p><?php } ?> <p>Google Adsense, Analytics, FeedBurner and Custom Search are trademarks of Google Inc.</p> </td> </tr> </tbody> </table> </div> </div> <?php }
home.php ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ --> <!-- Content of the page (inc comments and post details) ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ --> <div id="page-body-wrapper"> <div id="content"> <!-- The Home Page 'Page Block' ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ --> <?php $thispage = new WP_Query(); $option = hmt_get_option(hmt_featured); // get the featured page option $thispage->query('page_id=' . $option); if ($option != "" && !is_paged()) { // if a featured home page option has been specified // and this is is the first page of posts, then show the featured page $thispage->the_post(); ?> <!-- The Home Page 'Page Block' content ~~~ --> <div class="featured-page-content"> <!--