Permalink
Browse files

theme settings page done, single page is done. fixed some issues in u…

…pcoming post type's styles
  • Loading branch information...
1 parent 226f309 commit 5408247fe8f9de9b443951a165c3b6782d7dc35c @zakirsajib committed May 18, 2012
View
@@ -12,7 +12,9 @@
<div id="cat-sidebar" class="left-sidebar">
- <div class="cat-title"></div>
+ <div class="cat-title">
+ <div><span class="">Gift Ideas</span></div>
+ </div>
<div style="clear:both">&nbsp;</div>
@@ -323,7 +325,7 @@
<?php endwhile; ?>
- <?php else : ?><h1>Currently There are no posts available!</h1><?php endif; ?>
+ <?php else : ?><h1>Currently There are no products available!</h1><?php endif; ?>
</div>
</div>
View
@@ -0,0 +1,13 @@
+jQuery(document).ready(function() {
+
+ jQuery('#upload_image_button_4').click(function() {
+ formfield = jQuery('#box_four_photo').attr('name');
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
+ return false;
+ });
+ window.send_to_editor = function(html) {
+ imgurl = jQuery('img',html).attr('src');
+ jQuery('#' + formfield).val(imgurl);
+ tb_remove();
+ }
+});
View
@@ -0,0 +1,13 @@
+jQuery(document).ready(function() {
+
+ jQuery('#upload_image_button_1').click(function() {
+ formfield = jQuery('#box_one_photo').attr('name');
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
+ return false;
+ });
+ window.send_to_editor = function(html) {
+ imgurl = jQuery('img',html).attr('src');
+ jQuery('#' + formfield).val(imgurl);
+ tb_remove();
+ }
+});
View
@@ -0,0 +1,13 @@
+jQuery(document).ready(function() {
+
+ jQuery('#upload_image_button_3').click(function() {
+ formfield = jQuery('#box_three_photo').attr('name');
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
+ return false;
+ });
+ window.send_to_editor = function(html) {
+ imgurl = jQuery('img',html).attr('src');
+ jQuery('#' + formfield).val(imgurl);
+ tb_remove();
+ }
+});
View
@@ -0,0 +1,13 @@
+jQuery(document).ready(function() {
+
+ jQuery('#upload_image_button_2').click(function() {
+ formfield = jQuery('#box_two_photo').attr('name');
+ tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
+ return false;
+ });
+ window.send_to_editor = function(html) {
+ imgurl = jQuery('img',html).attr('src');
+ jQuery('#' + formfield).val(imgurl);
+ tb_remove();
+ }
+});
@@ -1,36 +1,15 @@
<?php
-echo '<style type="text/css" media="screen">
- #up-date, #up-title, #up-link, #up-descr{
- padding: 9px;
- border: solid 1px #E5E5E5;
- outline: 0;
- font: normal 13px/100% Verdana, Tahoma, sans-serif;
- background: #FFFFFF;
- box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
- -moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
- -webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
-}
-.lbl_1, .lbl_2, .lbl_3, .lbl_4 {
- float: left;
- text-align: left;
- color: #336699;
- width: 120px;
- font-family:"Century Gothic"; font-size: 12px; font-weight:bold;
- margin: 10px 0;
-}
- </style>';
-
add_action('init', 'upcoming_occassions_register');
function upcoming_occassions_register() {
$labels = array(
- 'name' => _x('Upcoming Occassions', 'post type general name'),
- 'singular_name' => _x('Upcoming Occassions List', 'post type singular name'),
- 'add_new' => _x('Add New', 'Occassion Item'),
- 'add_new_item' => __('Add New Occassion'),
- 'edit_item' => __('Edit Occassion List Item'),
- 'new_item' => __('New Occassion List Item'),
- 'view_item' => __('View Occassion List Item'),
- 'search_items' => __('Search Occassion List'),
+ 'name' => _x('Upcoming Occasions', 'post type general name'),
+ 'singular_name' => _x('Upcoming Occasions List', 'post type singular name'),
+ 'add_new' => _x('Add New', 'Occasion Item'),
+ 'add_new_item' => __('Add New Occasion'),
+ 'edit_item' => __('Edit Occasion List Item'),
+ 'new_item' => __('New Occasion List Item'),
+ 'view_item' => __('View Occasion List Item'),
+ 'search_items' => __('Search Occasion List'),
'not_found' => __('Nothing found'),
'not_found_in_trash' => __('Nothing found in Trash'),
'parent_item_colon' => ''
@@ -119,7 +98,26 @@ function upcoming_details_meta($object, $box){
<input name="upcoming_descr" id="up-descr" value= "<?php echo $upcoming_descr ?>" size="50" type="textfield">
</p>
</div>
-
+<style type="text/css">
+ #up-date, #up-title, #up-link, #up-descr{
+ padding: 9px;
+ border: solid 1px #E5E5E5;
+ outline: 0;
+ font: normal 13px/100% Verdana, Tahoma, sans-serif;
+ background: #FFFFFF;
+ box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
+ -moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
+ -webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
+}
+.lbl_1, .lbl_2, .lbl_3, .lbl_4 {
+ float: left;
+ text-align: left;
+ color: #336699;
+ width: 120px;
+ font-family:"Century Gothic"; font-size: 12px; font-weight:bold;
+ margin: 10px 0;
+}
+</style>
<?php }
add_action('save_post', 'save_details');
View
@@ -1,14 +1,14 @@
<?php
$current_path = dirname(__FILE__);
-if(is_admin()){
+//if(is_admin()){
+ require_once($current_path. '/theme-options.php');
require_once( $current_path. '/content-type/upcoming/functions.php');
require_once( $current_path. '/meta-box/functions.php');
require_once( $current_path. '/store/dbtable-store.php');// create 'store_meta' table for store taxonomy
require_once( $current_path. '/store/functions.php');
-
-}
+//}
// REmove admin bar
if (!function_exists('disableAdminBar')) {
@@ -48,7 +48,9 @@ function my_setup(){
add_theme_support( 'post-thumbnails' ); // This theme uses post thumbnails
//set_post_thumbnail_size( 600, 390 ); // 299 pixels wide by 375 pixels tall, set last parameter to true for hard crop mode
add_image_size( 'featured-image', 680, 280 );
- add_image_size( 'product-thumbnail', 150, 150 );
+ add_image_size( 'product-featured-image', 250, 250 );
+ add_image_size( 'product-thumbnail', 150, 150 );
+ add_image_size( 'sidebar-product-thumbnail', 80, 80 );
}
endif;
add_action( 'init', 'register_my_menus' );
@@ -95,7 +97,27 @@ function my_register_sidebars() {
$category_sidebar=array(
'id' => 'category_sidebar',
'name' => __( 'Category page Sidebar' ),
- 'description' => __( 'This is for google ad in left sidebar of category page.' ),
+ 'description' => __( 'This is for google ad in left sidebar of category page. Recommended size: 160 X 600 pixels.' ),
+ 'before_widget' => '<div id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</div>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>'
+ );
+
+ $item_google_adsense_sidebar_one=array(
+ 'id' => 'item_google_adsense_sidebar_one',
+ 'name' => __( '1. Google Adsense Sidebar' ),
+ 'description' => __( 'This is for google adsense in bottom of items page.Recommended size: 312 X 282 pixels.' ),
+ 'before_widget' => '<div id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</div>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>'
+ );
+
+ $item_google_adsense_sidebar_two=array(
+ 'id' => 'item_google_adsense_sidebar_two',
+ 'name' => __( '2. Google Adsense Sidebar' ),
+ 'description' => __( 'This is for google adsense in bottom of items page.Recommended size: 312 X 282 pixels.' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
@@ -125,7 +147,8 @@ function my_register_sidebars() {
/* Register the sidebars. */
register_sidebar( $sidebar_search );
register_sidebar( $category_sidebar );
- //register_sidebar( $f_sidebar_one );
+ register_sidebar( $item_google_adsense_sidebar_one );
+ register_sidebar( $item_google_adsense_sidebar_two );
}
function upcoming_ticker(){
@@ -196,16 +219,23 @@ function my_admin_scripts() {
wp_enqueue_script('media-upload');
wp_enqueue_script('thickbox');
wp_register_script('category-upload', WP_CONTENT_URL.'/themes/gift/category/catupload.js', array('jquery','media-upload','thickbox'));
+ wp_register_script('boxone-upload', WP_CONTENT_URL.'/themes/gift/category/box-one.js', array('jquery','media-upload','thickbox'));
+ wp_register_script('boxtwo-upload', WP_CONTENT_URL.'/themes/gift/category/box-two.js', array('jquery','media-upload','thickbox'));
+ wp_register_script('boxthree-upload', WP_CONTENT_URL.'/themes/gift/category/box-three.js', array('jquery','media-upload','thickbox'));
+ wp_register_script('boxfour-upload', WP_CONTENT_URL.'/themes/gift/category/box-four.js', array('jquery','media-upload','thickbox'));
wp_enqueue_script('category-upload');
-
+ wp_enqueue_script('boxone-upload');
+ wp_enqueue_script('boxtwo-upload');
+ wp_enqueue_script('boxthree-upload');
+ wp_enqueue_script('boxfour-upload');
}
function my_admin_styles() {
wp_enqueue_style('thickbox');
}
-// These actions were called for both category and store extra fields. We cant use more than one of each fucntion in one theme.
+// These actions were called for both category and store extra fields. We can't use more than one of each fucntion in one theme.
add_action('admin_print_scripts', 'my_admin_scripts');
add_action('admin_print_styles', 'my_admin_styles');
View
@@ -111,9 +111,9 @@
<ul class="s-icons">
Subscribe:
- <li class="one"><a href=""><img src="<?php bloginfo('template_url');?>/images/social-rss.gif"></a></li>
- <li class="one"><a href=""><img src="<?php bloginfo('template_url');?>/images/social-twitter.gif"></a></li>
- <li class="one"><a href=""><img src="<?php bloginfo('template_url');?>/images/social-google-plus.gif"></a></li>
+ <li class="one"><a href="<?php echo get_option('rss_link'); ?>" target="_blank"><img src="<?php bloginfo('template_url');?>/images/social-rss.gif"></a></li>
+ <li class="one"><a href="<?php echo get_option('twt_link'); ?>" target="_blank"><img src="<?php bloginfo('template_url');?>/images/social-twitter.gif"></a></li>
+ <li class="one"><a href="<?php echo get_option('gplus_link'); ?>" target="_blank"><img src="<?php bloginfo('template_url');?>/images/social-google-plus.gif"></a></li>
</ul>
<div class="fblike">
Oops, something went wrong.

0 comments on commit 5408247

Please sign in to comment.