2.8.1 Refresh.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-09-04 08:39:27 -07:00
parent 8d3a70325f
commit 626c1af3df
10 changed files with 140 additions and 102 deletions

View File

@ -1,19 +1,19 @@
<?php
//COMIC CATEGORY -the WordPress ID # of your comic category (default "3")
$comiccat = "3";
$comiccat = "4";
//BLOG CATEGORY - the WordPress ID of your blog category (default "1")
$blogcat = "1";
$blogcat = "3";
//COMIC FOLDER - the folder your comics files are located in (default "comics")
$comic_folder = "comics";
//RSS COMIC FOLDER - the folder your comic files are in for the RSS feed (default "comics")
$rss_comic_folder = "comics";
$rss_comic_folder = "comics-rss";
//ARCHIVE COMIC FOLDER - the folder your comic files are in for your archive pages (default "comics")
$archive_comic_folder = "comics";
$archive_comic_folder = "comics-archive";
//ARCHIVE COMIC WIDTH - the width your comics will appear on archive or search results (default "380")
$archive_comic_width = "380";

View File

@ -199,6 +199,11 @@ $options = array (
"default" => "default",
"type" => "comicpress-calendar_directory"),
array(
"id" => "comicpress-disable_dynamic_menubar_links",
"default" => "no",
"type" => "comicpress-disable_dynamic_menubar_links"),
array("type" => "close")
);

View File

@ -78,9 +78,10 @@ function comicpress_admin() {
<div id="cpadmin">
<div class="on" title="themestyle"><span>Theme Style</span></div>
<div class="off" title="generaloptions"><span>General Settings</span></div>
<div class="off" title="generaloptions"><span>General</span></div>
<div class="off" title="indexoptions"><span>Index Page</span></div>
<div class="off" title="postoptions"><span>Post Options</span></div>
<div class="off" title="postoptions"><span>Post</span></div>
<div class="off" title="menubaroptions"><span>Menubar</span></div>
<div class="off" title="customheader"><span>Custom Header</span></div>
<div class="off" title="buyprintoptions"><span>Buy Print</span></div>
@ -143,63 +144,6 @@ function comicpress_admin() {
<?php
foreach ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-enable_search_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable Search Form in Menubar?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
Searchforms can be fun when you have something to search for.
</td>
</tr>
<?php break;
case "comicpress-enable_rss_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable RSS Link in Menubar?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
It's a link, it links to the RSS. It does *not* link to your the winning lottory numbers.
</td>
</tr>
<?php break;
case "comicpress-enable_navigation_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable mini navigation buttons in the Menubar?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
Mini Navigation arrows reside on the right side of the menubar, just the previous and next arrows.
</td>
</tr>
<?php break;
case "comicpress-contact_in_menubar": ?>
<tr>
<th scope="row"><strong>Contact Link in Menubar</strong><br /><br />Setting to &quot;Yes&quot will put [&nbsp;CONTACT&nbsp;] in the menubar and associate it with your admin's email.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
You can also create a links category called "menulinks" and whatever link you add to that will appear in the menubar.
</td>
</tr>
<?php break;
case "comicpress-enable_widgetarea_use_sidebar_css": ?>
<tr>
<th scope="row"><strong>Enable Sidebar CSS?</strong><br /><br />Enabling this will use the standard CSS styling of the sidebars for all the widget areas.<br /><br /></th>
@ -622,6 +566,94 @@ function comicpress_admin() {
</div>
</div>
<div id="menubaroptions" class="hide">
<div class="inside">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-enable_search_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable Search Form in Menubar?</strong><br /><br /></th>
<td valign="top" width="100">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
Searchforms can be fun when you have something to search for.
</td>
</tr>
<?php break;
case "comicpress-enable_rss_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable RSS Link in Menubar?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
It's a link, it links to the RSS. It does *not* link to your the winning lottory numbers.
</td>
</tr>
<?php break;
case "comicpress-enable_navigation_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable mini navigation buttons in the Menubar?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
Mini Navigation arrows reside on the right side of the menubar, just the previous and next arrows.
</td>
</tr>
<?php break;
case "comicpress-contact_in_menubar": ?>
<tr>
<th scope="row"><strong>Contact Link in Menubar</strong><br /><br />Setting to &quot;Yes&quot will put [&nbsp;CONTACT&nbsp;] in the menubar and associate it with your admin's email.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
You can also create a links category called "menulinks" and whatever link you add to that will appear in the menubar.
</td>
</tr>
<?php break;
case "comicpress-disable_dynamic_menubar_links": ?>
<tr>
<th scope="row"><strong>Disable the dynamically generated wordpress links?</strong><br /><br />Setting this to Yes will turn off the dynamic links in your menubar.<br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
<td valign="top">
Setting this to yes will allow you to use the links category menulinks to create specific menu links for customizing the menubar, mostly used for making graphic images as links.
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<div id="customheader" class="hide">
<div class="inside">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">

View File

@ -28,8 +28,8 @@ if (!empty($wpmu_version)) {
'comicsarchive_path' => 'archive_comic_folder',
'archive_comic_width' => 'archive_comic_width',
'rss_comic_width' => 'rss_comic_width',
'blog_postcount' => 'blog_postcount') as $option => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${option}");
'blog_postcount' => 'blog_postcount') as $options => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
}
extract($variables_to_extract);
@ -82,7 +82,8 @@ if (get_option('upload_path') !== false) {
'enable_navigation_in_menubar' => 'enable_navigation_in_menubar',
'disable_lrsidebars_frontpage' => 'disable_lrsidebars_frontpage',
'calendar_directory' => 'calendar_directory',
'contact_in_menubar' => 'contact_in_menubar' ) as $options => $variable_name) {
'contact_in_menubar' => 'contact_in_menubar',
'disable_dynamic_menubar_links' => 'disable_dynamic_menubar_links' ) as $options => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
}
@ -106,8 +107,6 @@ global $cp_theme_style;
return false;
}
require_once(get_template_directory() . '/functions/userpages.php');
// WIDGETS WP 2.8 compatible ONLY, no backwards compatibility here.
require_once(get_template_directory() . '/widgets/control-panel.php');

View File

@ -20,14 +20,12 @@ function display_comic() {
?>
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
<param name="movie" value="<?php echo get_comic_url(); ?>" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="<?php echo get_comic_url(); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
<!--<![endif]-->
<!--[if !IE]>--><object type="application/x-shockwave-flash" data="<?php echo get_comic_url(); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>"><!--<![endif]-->
<div>
<h1>Get Flash!</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>--></object><!--<![endif]--></object>
<!--[if !IE]>--></object><!--<![endif]--></object>
<?php } else {
if ($comic_clicks_next == 'yes') {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );

View File

@ -53,9 +53,12 @@
<?php the_project_wonderful_ad('header'); ?>
</div>
<?php } ?>
<h1><a href="<?php echo get_settings('home') ?>"><?php bloginfo('name') ?></a></h1>
<div class="description"><?php bloginfo('description') ?></div>
<?php get_sidebar('header'); ?>
<?php if (!comicpress_is_active_sidebar('Header')) { ?>
<h1><a href="<?php echo get_settings('home') ?>"><?php bloginfo('name') ?></a></h1>
<div class="description"><?php bloginfo('description') ?></div>
<?php } else { ?>
<?php get_sidebar('header'); ?>
<?php } ?>
<div class="clear"></div>
</div>
<?php get_sidebar('menubar'); ?>

View File

@ -23,12 +23,11 @@
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
<div id="comic-head"><?php get_sidebar('over'); ?></div>
<div id="comic">
<?php get_sidebar('comicleft'); ?>
<?php display_comic(); ?>
<?php get_sidebar('comicright'); ?>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div id="comic-left"><?php get_sidebar('comicleft'); ?></div>
<div id="comic"><?php display_comic(); ?></div>
<div id="comic-right"><?php get_sidebar('comicright'); ?></div>
<div class="clear"></div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
<?php endwhile; ?>

View File

@ -1,7 +1,7 @@
<?php if (comicpress_is_active_sidebar('Header')) { ?>
<div id="sidebar-header">
<div class="customsidebar <?php global $enable_if_widgetarea_use_sidebar_css; if ($enable_widgetarea_use_sidebar_css == 'yes') { ?> sidebar<?php } ?>">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Header') ) : ?><?php endif; ?>
</div>
</div>
<?php } ?>

View File

@ -18,14 +18,13 @@
<?php while (have_posts()) : the_post();
if (in_comic_category()) { ?>
<div id="comic-head"><?php get_sidebar('over'); ?></div>
<div id="comic">
<?php get_sidebar('comicleft'); ?>
<?php display_comic(); ?>
<?php get_sidebar('comicright'); ?>
<div class="clear"></div>
</div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
<div id="comic-head"><?php get_sidebar('over'); ?></div>
<div class="clear"></div>
<div id="comic-left"><?php get_sidebar('comicleft'); ?></div>
<div id="comic"><?php display_comic(); ?></div>
<div id="comic-right"><?php get_sidebar('comicright'); ?></div>
<div class="clear"></div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
<?php } endwhile; ?>

View File

@ -11,7 +11,7 @@ Author URI: http://webcomicplanet.com/
function comicpress_menubar() {
global $contact_in_menubar,$enable_search_in_menubar,$enable_rss_in_menubar,$enable_navigation_in_menubar;
global $contact_in_menubar,$enable_search_in_menubar,$enable_rss_in_menubar,$enable_navigation_in_menubar,$disable_dynamic_menubar_links;
if (file_exists(get_template_directory() . '/custom-menubar.php') || function_exists('suckerfish')) {
if (function_exists('suckerfish')) {
suckerfish();
@ -49,15 +49,18 @@ function comicpress_menubar() {
<?php } ?>
</div>
<?php
$menulinks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menubar');
$menulinks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $menulinks);
$menulinks = preg_replace('#<ul ([^>]*)>#', '', $menulinks);
$menulinks = str_replace('</ul>', '', $menulinks);
$bookmarkargs =
$bookmarks = wp_list_bookmarks('echo=0&title_li=&categorize=1&title_before=&title_after=&exclude_name=menubar');
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $bookmarks);
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
$listpages = wp_list_pages('echo=0&sort_column=menu_order&depth=4&title_li=');
$menulinks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menubar');
$menulinks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $menulinks);
$menulinks = preg_replace('#<ul ([^>]*)>#', '', $menulinks);
$menulinks = str_replace('</ul>', '', $menulinks);
$bookmarkargs =
$bookmarks = wp_list_bookmarks('echo=0&title_li=&categorize=1&title_before=&title_after=&exclude_name=menubar');
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $bookmarks);
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
$listpages = '';
if ($disable_dynamic_menubar_links != 'yes') {
$listpages = wp_list_pages('echo=0&sort_column=menu_order&depth=4&title_li=');
}
if (!empty($bookmarks)) {
$listpages = str_replace('Links</a></li>', 'Links</a>
<ul>