new options for buyprint and other stuff

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-12 18:37:15 -08:00
parent 0b002190ad
commit b86b35c8fd
7 changed files with 59 additions and 26 deletions

View File

@ -1,9 +1,10 @@
<?php
/*
Template Name: Buy Print
Templete Author: Philip M. Hofer (Frumph)
Templete URL: http://webcomicplanet.com/forum/
Templete Author Email: philip@frumph.net
Template Author: Philip M. Hofer (Frumph)
Template URL: http://webcomicplanet.com/forum/
Template Author Email: philip@frumph.net
Template Version: 2.14
*/
if (isset($_REQUEST['comic'])) $comicnum = (int)$_REQUEST['comic'];
?>
@ -44,19 +45,19 @@ Templete Author Email: philip@frumph.net
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="shipping2" value="<?php echo $buy_print_us_amount; ?>">
<input type="hidden" name="cn" value="<?php _e('Special Instructions (optional)','comicpress'); ?>">
<input type="hidden" name="cancel_return" value="<?php echo get_bloginfo('wpurl'); ?>">
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
<input type="hidden" name="notify_url" value="<?php echo get_bloginfo('wpurl'); ?>">
<input type="hidden" name="page_style" value="">
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
<input type="hidden" name="amount" value="<?php echo $buy_print_us_amount; ?>">
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
<input type="hidden" name="business" value="<?php echo $buy_print_email; ?>">
<?php if ($buy_print_add_shipping == 'yes') { ?>
<input type="hidden" name="shipping" value="<?php echo $buy_print_us_ship; ?>">
US/Canada<br>
$<?php echo $buy_print_us_amount; ?> + $<?php echo $buy_print_us_ship; ?> <?php _e('shipping','comicpress'); ?><br />
<?php } else { ?>
US/Canada<br>
$<?php echo $buy_print_us_amount; ?><br />
<?php } ?>
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
</form>
</td>
@ -66,19 +67,19 @@ Templete Author Email: philip@frumph.net
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="shipping2" value="<?php echo $buy_print_int_amount; ?>">
<input type="hidden" name="cn" value="<?php _e('Special Instructions (optional)','comicpress'); ?>">
<input type="hidden" name="cancel_return" value="<?php echo get_bloginfo('wpurl'); ?>">
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
<input type="hidden" name="notify_url" value="<?php echo get_bloginfo('wpurl'); ?>">
<input type="hidden" name="page_style" value="">
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
<input type="hidden" name="amount" value="<?php echo $buy_print_int_amount; ?>">
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
<input type="hidden" name="business" value="<?php echo $buy_print_email; ?>">
<?php if ($buy_print_add_shipping == 'yes') { ?>
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>">
International<br>
$<?php echo $buy_print_int_amount; ?> + $<?php echo $buy_print_int_ship; ?> <?php _e('shipping','comicpress'); ?><br />
<?php } else { ?>
International<br>
$<?php echo $buy_print_int_amount; ?><br />
<?php } ?>
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
</form>
</td>

View File

@ -54,6 +54,11 @@ $options = array (
"default" => "29.95",
"type" => "comicpress-buy_print_int_amount"),
array(
"id" => "comicpress-buy_print_add_shipping",
"default" => "yes",
"type" => "comicpress-buy_print_add_shipping"),
array(
"id" => "comicpress-buy_print_us_ship",
"default" => "4.95",

View File

@ -60,6 +60,7 @@ if (get_option('upload_path') !== false) {
'buy_print_url' => 'buy_print_url',
'buy_print_us_amount' => 'buy_print_us_amount',
'buy_print_int_amount' => 'buy_print_int_amount',
'buy_print_add_shipping' => 'buy_print_add_shipping',
'buy_print_us_ship' => 'buy_print_us_ship',
'buy_print_int_ship' => 'buy_print_int_ship',
'cp_theme_layout' => 'cp_theme_layout',

View File

@ -36,6 +36,20 @@
</tr>
<?php break;
case "comicpress-buy_print_add_shipping": ?>
<tr>
<th scope="row"><strong><?php _e('Add shipping to each item?','comicpress'); ?></strong><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"; } ?> /><?php _e('Yes','comicpress'); ?></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"; } ?> /><?php _e('No','comicpress'); ?></label>
</td>
<td valign="top">
<?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?>
</td>
</tr>
<?php break;
case "comicpress-buy_print_us_amount": ?>
<tr>
<th scope="row"><b><?php _e('Print Cost (US/Canada)','comicpress'); ?></b><br /><br /><?php _e('How much does a print cost for people in the United State and Canada?','comicpress'); ?></th>

View File

@ -8,20 +8,20 @@
switch ( $value['type'] ) {
case "comicpress-enable_widgetarea_use_sidebar_css": ?>
<tr>
<th scope="row"><strong><?php _e('Enable Sidebar CSS in non-left/right sidebars?','comicpress'); ?></strong><br /><br /><?php _e('Enabling this will use the standard CSS styling of the sidebars for all the sidebar areas.','comicpress'); ?><br /><br /></th>
<th scope="row"><strong><?php _e('Enable Sidebar CSS in non-left/right sidebars?','comicpress'); ?></strong><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"; } ?> /><?php _e('Yes','comicpress'); ?></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"; } ?> /><?php _e('No','comicpress'); ?></label>
</td>
<td valign="top">
<?php _e('If not enabled it will use the .customwidgetarea user made styling only and only the Sidebar-left and Sidebar-right will use sidebar styling.','comicpress'); ?><br />
<?php _e('If enabled, all #sidebars will use .sidebar css','comicpress'); ?><br />
</td>
</tr>
<?php break;
case "comicpress-enable_numbered_pagination": ?>
<tr>
<th scope="row"><strong><?php _e('Enable numbered pagination?','comicpress'); ?></strong><br /><br /><?php _e('Setting to &quot;Yes&quot; will make the Previous Entries and Next Entries turn into numbered pages to click on.','comicpress'); ?></th>
<th scope="row"><strong><?php _e('Enable numbered pagination?','comicpress'); ?></strong><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"; } ?> /><?php _e('Yes','comicpress'); ?></label>
&nbsp;&nbsp;
@ -35,17 +35,14 @@
<?php break;
case "comicpress-disable_page_restraints": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the #page / #page-wide restraints?','comicpress'); ?></strong><br />
<br />
<?php _e('Turning this option to Yes will make it so that the divs for #page and #page-wide will not load.','comicpress'); ?><br />
<br />
<th scope="row"><strong><?php _e('Disable the #page / #page-wide restraints?','comicpress'); ?></strong><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"; } ?> /><?php _e('Yes','comicpress'); ?></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"; } ?> /><?php _e('No','comicpress'); ?></label>
</td>
<td valign="top">
<?php _e('What you can do with this is use the entire browser for your canvas instead of the 780px/980px that the two elements keep you in.','comicpress'); ?></th>
<?php _e('What you can do with this is use the entire browser for your canvas instead of the 780px/980px that the two elements keep you in. Not recommended enabling this option unless your an expert in CSS','comicpress'); ?></th>
</td>
</tr>
@ -53,14 +50,14 @@
case "comicpress-comic_clicks_next": ?>
<tr>
<th scope="row"><strong><?php _e('Make the comic an Href that goes to next comic?','comicpress'); ?></strong><br /><br /><?php _e('In doing this if someone clicks the comic it will go to the next comic (if possible)','comicpress'); ?><br /></th>
<th scope="row"><strong><?php _e('Make the comic an Href that goes to next comic?','comicpress'); ?></strong><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"; } ?> /><?php _e('Yes','comicpress'); ?></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"; } ?> /><?php _e('No','comicpress'); ?></label>
</td>
<td valign="top">
<?php _e('When a user or yourself puts their mouse cursor over the comic that is displayed on either the index or single page the action that happens next is the first step in the larger, bigger, more astonishing consequence of actually having any the other things you place your mouse cursor over and click. You click, it goes to the next comic.','comicpress'); ?>
<?php _e('In doing this if someone clicks the comic it will go to the next comic (if possible)','comicpress'); ?>
</td>
</tr>
@ -81,7 +78,7 @@
<?php break;
case "comicpress-disable_footer_text": ?>
<tr>
<th scope="row"><strong><?php _e('Disable the default text in the footer?','comicpress'); ?></strong><br /><br /><?php _e('Set to &quot;Yes&quot; and the text in the footer will not show.','comicpress'); ?><br /><br /></th>
<th scope="row"><strong><?php _e('Disable the default text in the footer?','comicpress'); ?></strong><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"; } ?> /><?php _e('Yes','comicpress'); ?></label>
&nbsp;&nbsp;
@ -194,6 +191,10 @@
</select>
</label>
</td>
<td valign="top">
<?php _e('To not use the comicpress avatar graphics, set this as "none".','comicpress'); ?><br />
<br />
</td>
</tr>
<?php break;
}

View File

@ -833,7 +833,7 @@ ul.children {
padding: 0;
}
.widget {
.sidebar .widget {
margin-bottom: 10px;
}
@ -849,7 +849,7 @@ ul.children {
background: #000;
}
.comic-bookmark {
.sidebar .comic-bookmark {
width: 185px;
margin: 0 auto;
margin-bottom: 10px;

View File

@ -9,6 +9,17 @@ Author URI: http://webcomicplanet.com/
*/
/*
function comicpress_archive_dropdown_storyline() {
$storyline = new ComicPressStoryline();
$storyline->create_structure(get_option('comicpress-storyline-category-order'));
$categories = array_keys($storyline->_structure);
foreach ($categories as $id) {
$post = ComicPressDBInterface::get_instance()->get_first_comic($id);
}
}
*/
function comicpress_archive_dropdown() { ?>
<div class="archive-dropdown-wrap">
<select name="archive-dropdown" class="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>