Пример #1
0
function weaver_fix_IE()
{
    $add_PIE = (weaver_getopt('ttw_rounded_corners') || weaver_getopt('ttw_wrap_shadow')) && !weaver_getopt('ttw_hide_PIE');
    echo "\n";
    ?>
<!--[if lte IE 7]>
<style type="text/css" media="screen">
div.menu { display:inline !important;}
.menu-add, .menu-add-left {margin-top:-4px !important;}
</style>
<![endif]-->
<?php 
    if ($add_PIE) {
        ?>
<!--[if lte IE 8]>
<style type="text/css" media="screen">
<?php 
        weaver_bake_PIE();
        ?>
</style>
<![endif]-->
<?php 
    }
}
Пример #2
0
function weaver_admin_page_process_options()
{
    /* Process all options - called upon entry to options forms */
    // echo("WEAVER-SETTINGS:"); var_dump($weaver_main_settings);
    // echo "POST-weaver-settings:" ; var_dump($_POST['weaver_main_settings']);
    // echo "POST-FULL:" ; var_dump($_POST);
    settings_errors();
    // display results from SAPI save settings
    /* ================ Weaver Upgrade 2020 Weaver buttons ================== */
    if (weaver_submitted('hide_import_old_weaver')) {
        weaver_setopt('wvr_hide_if_are_oldWeaver_opts', true);
        weaver_save_msg(__('Hide 2010 Weaver Notice', WEAVER_TRANSADMIN));
    }
    if (weaver_submitted('import_old_weaver')) {
        weaver_import_2010_weaver();
        weaver_save_msg(__("Previously existing settngs imported.", WEAVER_TRANSADMIN));
    }
    /* ================ Weaver Themes Tab ================== */
    if (weaver_submitted('setsubtheme') || weaver_submitted('setsubtheme2')) {
        /* seems like Mozilla doesn't like 2 sets of select inputs on same page, so we make up 2 ids/names to use */
        if (isset($_POST['setsubtheme'])) {
            $pID = 'ttw_subtheme';
        } else {
            $pID = 'ttw_subtheme2';
        }
        $cur_subtheme = weaver_filter_textarea($_POST[$pID]);
        /* must have been set to get here */
        if ($cur_subtheme == '') {
            $cur_subtheme = 'Wheat';
        }
        /* but just in case */
        /* now, I set all values for theme */
        weaver_activate_subtheme($cur_subtheme);
        $t = weaver_getopt('ttw_subtheme');
        if ($t == '') {
            $t = 'Wheat';
        }
        /* did we save a theme? */
        weaver_save_msg(__("Weaver current sub-theme set to: ", WEAVER_TRANSADMIN) . $t);
    }
    /* ================ Weaver FTP File Access ================== */
    if (weaver_submitted('ftp_save_form')) {
        if (isset($_POST['ftp_hostnamex'])) {
            weaver_setopt('ftp_hostname', trim(weaver_filter_textarea($_POST['ftp_hostnamex'])));
        }
        if (isset($_POST['ftp_usernamex'])) {
            weaver_setopt('ftp_username', trim(weaver_filter_textarea($_POST['ftp_usernamex'])));
        }
        if (isset($_POST['ftp_passwordx'])) {
            weaver_setopt('ftp_password', weaver_encrypt(trim($_POST['ftp_passwordx'])));
        }
        if (isset($_POST['ftp_hide_check_messagex'])) {
            weaver_setopt('ftp_hide_check_message', true);
        } else {
            weaver_setopt('ftp_hide_check_message', false);
        }
        weaver_save_msg(__('FTP File Access Form Settings Saved.', WEAVER_TRANSADMIN));
    }
    /* ================ Weaver Main Options Tab ================== */
    /* Weaver Main and Advanced Options processed in validation callbacks */
    /* ================ Weaver Advanced Options Tab ================== */
    /* SAPI settings are handled in the Main Options Tab section above */
    if (weaver_submitted('reset_weaver')) {
        // delete everything!
        weaver_save_msg(__('All Weaver settings have been reset to the defaults.', WEAVER_TRANS));
        delete_option('weaver_main_settings');
        delete_option('weaver_advanced_settings');
        weaver_load_cache();
        // be sure cache has something valid in it
        weaver_init_opts('reset_weaver');
    }
    /* ================ Weaver Save/Restore Themes Tab ================== */
    /* this tab has the most individual forms and submit commands */
    if (weaver_submitted('changethemename')) {
        if (isset($_POST['newthemename'])) {
            $new_name = sanitize_user($_POST['newthemename']);
            weaver_setopt('ttw_themename', $new_name);
            echo '<div id="message" class="updated fade"><p><strong>Theme name changed to ' . $new_name . '</strong></p></div>';
        }
        global $weaver_dev;
        if ($weaver_dev) {
            // used to save a theme for distribution/inclusion in dynamic theme db
            if (isset($_POST['newthemeimage'])) {
                weaver_setopt('ttw_theme_image', $_POST['newthemeimage']);
            }
            if (isset($_POST['newthemedesc'])) {
                weaver_setopt('ttw_theme_description', $_POST['newthemedesc']);
            }
        }
    }
    if (weaver_submitted('savemytheme')) {
        if (weaver_savemytheme()) {
            weaver_save_msg(__('All current main and advanced options backed up in <em>My Saved Theme</em>.', WEAVER_TRANSADMIN));
        } else {
            weaver_save_msg(__('ERROR: Saving <em>My Saved Theme</em> failed.', WEAVER_TRANSADMIN));
        }
    }
    if (weaver_submitted('backup_settings')) {
        $name = weaver_savebackup();
        if ($name !== false) {
            weaver_save_msg(__('All current main and advanced options backed up in:', WEAVER_TRANSADMIN) . ' "' . $name . '.wvb"');
        } else {
            weaver_save_msg(__('ERROR: Saving backup failed.', WEAVER_TRANSADMIN));
        }
    }
    if (weaver_submitted('filesavetheme')) {
        $base = strtolower(sanitize_file_name($_POST['savethemename']));
        $temp_url = weaver_write_current_theme($base);
        if ($temp_url == '') {
            weaver_save_msg(__('Invalid name supplied to save theme to file.', WEAVER_TRANSADMIN));
        } else {
            weaver_save_msg(__("All current main and advanced options saved in ", WEAVER_TRANSADMIN) . $temp_url);
        }
    }
    if (weaver_submitted('uploadtheme') && isset($_POST['uploadit']) && $_POST['uploadit'] == 'yes') {
        weaver_uploadit();
    }
    if (weaver_submitted('restoretheme')) {
        $base = $_POST['ttw_restorename'];
        $valid = validate_file($base);
        // make sure an ok file name
        $fn = weaver_f_uploads_base_dir() . 'weaver-subthemes/' . $base;
        if ($valid < 1 && weaver_upload_theme($fn)) {
            $t = weaver_getopt('ttw_subtheme');
            if ($t == '') {
                $t = 'Wheat';
            }
            /* did we save a theme? */
            weaver_save_msg(__("Weaver theme restored from file, saved as: ", WEAVER_TRANSADMIN) . $t);
        } else {
            weaver_save_msg('<em style="color:red;">' . __('INVALID FILE NAME PROVIDED - Try Again', WEAVER_TRANSADMIN) . "({$fn})" . '</em>');
        }
    }
    if (weaver_submitted('deletetheme')) {
        $myFile = $_POST['selectName'];
        $valid = validate_file($myFile);
        if ($valid < 1 && $myFile != "None") {
            weaver_f_delete(weaver_f_uploads_base_dir() . 'weaver-subthemes/' . $myFile);
            echo '<div style="background-color: rgb(255, 251, 204);" id="message" class="updated fade"><p>File: <strong>' . $myFile . '</strong> has been deleted.</p></div>';
        } else {
            echo '<div style="background-color: rgb(255, 251, 204);" id="message" class="updated fade"><p>File: <strong>' . $myFile . '</strong> invalid file name, not deleted.</p></div>';
        }
    }
    /* ====================================================== */
    if (weaver_submitted('wvrx_save_extension')) {
        /* for theme extensions */
        do_action('wvrx_save_extension');
    }
    if (weaver_submitted('wvrx_plus_save_plus')) {
        do_action('wvrx_plus_save_plus');
    }
    // All plus submit buttons...
    weaver_save_opts('Weaver Admin');
    /* FINALLY - SAVE ALL OPTIONS AND UPDATE CURRENT CSS FILE */
}
Пример #3
0
function weaver_show_posts_shortcode($args = '')
{
    /* implement [weaver_get_posts opt1="val1" opt2="value"] shortcode */
    /* DOC NOTES:
    CSS styling: The group of posts will be wrapped with a <div> with a class called
    .wvr-show-posts. You can add an additional class to that by providing a 'class=classname' option
    (without the leading '.' used in the actual CSS definition). You can also provide inline styling
    by providing a 'style=value' option where value is whatever styling you need, each terminated
    with a semi-colon (;).
    
    The optional header is in a <div> called .wvr_show_posts_header. You can add an additional class
    name with 'header_class=classname'. You can provide inline styling with 'header_style=value'.
    
    .wvr-show-posts .hentry {margin-top: 0px; margin-right: 0px; margin-bottom: 40px; margin-left: 0px;}
    .widget-area .wvr-show-posts .hentry {margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;}
    */
    global $more;
    global $weaver_cur_post_id;
    extract(shortcode_atts(array('cats' => '', 'tags' => '', 'author' => '', 'single_post' => '', 'orderby' => 'date', 'sort' => 'DESC', 'number' => '5', 'show' => 'full', 'hide_title' => '', 'hide_top_info' => '', 'hide_bottom_info' => '', 'show_featured_image' => '', 'show_avatar' => '', 'show_bio' => '', 'excerpt_length' => '', 'style' => '', 'class' => '', 'header' => '', 'header_style' => '', 'header_class' => '', 'more_msg' => ''), $args));
    $save_cur_post = $weaver_cur_post_id;
    $save_excerpt_length = weaver_getopt('ttw_excerpt_length');
    if (!empty($excerpt_length)) {
        weaver_setopt('ttw_excerpt_length', $excerpt_length);
    }
    $save_more_msg = weaver_getopt('ttw_excerpt_more_msg');
    if (!empty($more_msg)) {
        weaver_setopt('ttw_excerpt_more_msg', $more_msg);
    }
    /* Setup query arguments using the supplied args */
    $qargs = array('ignore_sticky_posts' => 1);
    $qargs['orderby'] = $orderby;
    /* enter opts that have defaults first */
    $qargs['order'] = $sort;
    $qargs['posts_per_page'] = $number;
    if (!empty($cats)) {
        $qargs['cat'] = weaver_cat_slugs_to_ids($cats);
    }
    if (!empty($tags)) {
        $qargs['tag'] = $tags;
    }
    if (!empty($single_post)) {
        $qargs['name'] = $single_post;
    }
    if (!empty($author)) {
        $qargs['author_name'] = $author;
    }
    $ourposts = new WP_Query($qargs);
    // now modify the query using custom fields for this page
    /* now start the content */
    $div_add = '';
    if (!empty($style)) {
        $div_add = ' style="' . $style . '"';
    }
    $content = '<div class="wvr-show-posts ' . $class . '"' . $div_add . '/>';
    $h_add = '';
    if (!empty($header_style)) {
        $h_add = ' style="' . $header_style . '"';
    }
    if (!empty($header)) {
        $content .= '<div class="wvr-show-posts-header ' . $header_class . '"' . $h_add . '>' . $header . '</div>';
    }
    ob_start();
    // use built-in weaver code to generate a weaver standard post
    while ($ourposts->have_posts()) {
        $ourposts->the_post();
        $weaver_cur_post_id = get_the_ID();
        weaver_per_post_style();
        if (!is_sticky()) {
            ?>
	<div id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class();
            ?>
>
	<?php 
            if (empty($hide_title)) {
                ?>
	<h2 class="entry-title"><?php 
                weaver_post_title();
                ?>
</h2>
	<?php 
            }
            ?>

	<?php 
            if (empty($hide_top_info)) {
                weaver_posted_on('blog');
            }
            if ($show == 'excerpt') {
                /* excerpt? */
                ?>
		<div class="entry-summary">
		<?php 
                weaver_the_excerpt_featured(true, !empty($show_featured_image));
                ?>
		</div><!-- .entry-summary -->

	<?php 
            } else {
                if ($show != 'title') {
                    ?>
		<div class="entry-content">
		<?php 
                    $more = false;
                    // let <!-- more --> work, still use single
                    weaver_the_content_featured_single(!empty($show_featured_image));
                    ?>
		</div><!-- .entry-content -->
	<?php 
                }
            }
            if (!empty($show_bio) && get_the_author_meta('description')) {
                // If a user has filled out their description, show a bio on their entries
                ?>
		<div id="entry-author-info">
		    <div id="author-avatar">
			<?php 
                echo get_avatar(get_the_author_meta('user_email'), apply_filters('weaver_author_bio_avatar_size', 60));
                ?>
		    </div><!-- #author-avatar -->
		    <div id="author-description">
			<h2><?php 
                printf(esc_attr__('About %s', WEAVER_TRANS), get_the_author());
                ?>
</h2>
			<?php 
                the_author_meta('description');
                ?>
			<div id="author-link">
			    <a href="<?php 
                echo get_author_posts_url(get_the_author_meta('ID'));
                ?>
">
				<?php 
                printf(__('View all posts by %s <span class="meta-nav">&rarr;</span>', WEAVER_TRANS), get_the_author());
                ?>
			    </a>
			</div><!-- #author-link	-->
		    </div><!-- #author-description -->
		</div><!-- #entry-author-info -->
	<?php 
            }
            if (empty($hide_bottom_info)) {
                weaver_posted_in('blog');
            } else {
                echo '<div style="clear:both;"></div>';
            }
            ?>
	</div><!-- #post-## -->
	<?php 
        }
        // end !sticky
    }
    // end loop
    $content .= ob_get_clean();
    // get the output
    // get posts
    $content .= '</div><!-- #wvr-show-posts -->';
    wp_reset_query();
    $weaver_cur_post_id = $save_cur_post;
    weaver_setopt('ttw_excerpt_length', $save_excerpt_length);
    weaver_setopt('ttw_excerpt_more_msg', $save_more_msg);
    return $content;
}
Пример #4
0
weaver_put_wvr_widgetarea('postpages-widget-area', 'ttw-top-widget', 'ttw_hide_special_posts');
?>

	    <div id="content" role="main">

		<?php 
printf('<h1 id ="category-title-%s" class="page-title category-title">', strtolower(str_replace(' ', '-', single_cat_title('', false))));
echo "\n";
printf(__('Category Archives: %s', WEAVER_TRANS), '<span>' . single_cat_title('', false) . '</span></h1>');
$category_description = category_description();
if (!empty($category_description)) {
    echo '<div class="archive-meta">' . $category_description . '</div>';
}
/* Run the loop for the category page to output the posts.
 * If you want to overload this in a child theme then include a file
 * called loop-category.php and that will be used instead.
 */
get_template_part('loop', 'category');
?>

	    </div><!-- #content -->
	    <?php 
weaver_put_wvr_widgetarea('sitewide-bottom-widget-area', 'ttw-site-bot-widget');
?>
	</div><!-- #container -->

<?php 
if (!weaver_getopt('ttw_hide_special_post_sidebars')) {
    get_sidebar();
}
get_footer();
Пример #5
0
		    <div class="nav-previous"><?php 
        previous_post_link('%link', '<span class="meta-nav">' . _x('&larr;', 'Previous post link', WEAVER_TRANS) . '</span> %title');
        ?>
</div>
		    <div class="nav-next"><?php 
        next_post_link('%link', '%title <span class="meta-nav">' . _x('&rarr;', 'Next post link', WEAVER_TRANS) . '</span>');
        ?>
</div>
		</div><!-- #nav-below -->

		<?php 
        comments_template('', true);
        ?>

<?php 
    }
}
// end of the loop.
?>

	    </div><!-- #content -->
	    <?php 
weaver_put_wvr_widgetarea('sitewide-bottom-widget-area', 'ttw-site-bot-widget');
?>
	</div><!-- #container -->

<?php 
if (!weaver_getopt('ttw_hide_single_sidebars') && !weaver_is_checked_page_opt('ttw_hide_sidebars')) {
    get_sidebar();
}
get_footer();
Пример #6
0
function weaver_output_editor_style($sout)
{
    /* This outputs the CSS overrides. It will output to a file pointer, so it can write to a .css file saved
          in the user's upload directory - just like the saved style .wvr files. It is included via a standard
          css include. It needs to be loaded only for the admin page.
       */
    // Put a options that can be overridden by the CSS option at the top!
    /*  ttw_contentlist_bullet  */
    $val = weaver_getopt("ttw_contentlist_bullet");
    /* add a new lsit bullet */
    if ($val && $val != '' && $val != 'default') {
        if ($val == 'none' || $val == 'circle' || $val == 'disc' || $val == 'square') {
            weaver_f_write($sout, sprintf("ul {list-style:%s;}\n", $val));
        } else {
            weaver_f_write($sout, sprintf("ul {list-style:none;list-style-image: url(%s/images/bullets/%s.gif);}\n", get_template_directory_uri(), $val));
        }
    }
    /*  ttw_content_font  */
    if (($useFont = weaver_get_font_value('ttw_content_font')) != '') {
        weaver_css_fontfamily($sout, '*', $useFont);
    }
    /*  ttw_title_font  */
    if (($useFont = weaver_get_font_value('ttw_title_font')) != '') {
        weaver_css_fontfamily($sout, 'thead th, tr th', $useFont);
    }
    /* need to handle bg color of content area - need to do the cascade ourself */
    if (($optVal = weaver_getopt("ttw_content_bgcolor")) && strcasecmp($optVal, 'transparent') != 0) {
        /* #content */
        weaver_css_bgcolor($sout, 'html .mceContentBody', $optVal);
    } else {
        if (($optVal = weaver_getopt("ttw_container_bgcolor")) && strcasecmp($optVal, 'transparent') != 0) {
            /* #container */
            weaver_css_bgcolor($sout, 'html .mceContentBody', $optVal);
        } else {
            if (($optVal = weaver_getopt('ttw_main_bgcolor')) && strcasecmp($optVal, 'transparent') != 0) {
                /* #main */
                weaver_css_bgcolor($sout, 'html .mceContentBody', $optVal);
            } else {
                if (($optVal = weaver_getopt('ttw_page_bgcolor')) && strcasecmp($optVal, 'transparent') != 0) {
                    /* #wrapper */
                    weaver_css_bgcolor($sout, 'html .mceContentBody', $optVal);
                } else {
                    if (($name = weaver_getopt('ttw_subtheme')) && strcasecmp($name, 'Transparent Dark') == 0) {
                        weaver_css_bgcolor($sout, 'html .mceContentBody', '#222');
                    } else {
                        if (($name = weaver_getopt('ttw_subtheme')) && strcasecmp($name, 'Transparent Light') == 0) {
                            weaver_css_bgcolor($sout, 'html .mceContentBody', '#ccc');
                        }
                    }
                }
            }
        }
    }
    /*  ttw_content_color  - text color of content */
    if ($optVal = weaver_getopt_color('ttw_content_color')) {
        weaver_css_color($sout, '*, table,tr td,tr th', $optVal);
    }
    if ($optVal = weaver_getopt('ttw_content_color_css')) {
        weaver_css_css($sout, '*, table,tr td,tr th', $optVal);
    }
    /*  ttw_small_content_font  */
    if (!weaver_getopt('ttw_small_content_font')) {
        weaver_f_write($sout, sprintf("* {font-size: 16px; line-height: 1.5; }\n"));
        // write content font
        weaver_f_write($sout, sprintf("p,dl,td,th,ul,ol,blockquote {font-size: 16px; line-height: 1.5; }\n"));
        // line height styling
    }
    /*  ttw_hr_color  */
    if ($optVal = weaver_getopt_color('ttw_hr_color')) {
        weaver_css_bgcolor($sout, 'hr', $optVal);
    }
    if ($optVal = weaver_getopt('ttw_hr_color_css')) {
        weaver_css_css($sout, 'hr', $optVal);
    }
    /*  ttw_link_color  */
    /*  ttw_link_hover_color  */
    /*  ttw_link_visited_color  */
    if ($optVal = weaver_getopt_color('ttw_link_color')) {
        weaver_css_color($sout, 'a:link', $optVal);
    }
    if ($optVal = weaver_getopt_color('ttw_link_hover_color')) {
        weaver_css_color($sout, 'a:active, a:hover', $optVal);
    }
    if ($optVal = weaver_getopt_color('ttw_link_visited_color')) {
        weaver_css_color($sout, 'a:visited', $optVal);
    }
    if ($optVal = weaver_getopt('ttw_link_color_css')) {
        weaver_css_css($sout, 'a:link', $optVal);
    }
    if ($optVal = weaver_getopt('ttw_link_hover_color_css')) {
        weaver_css_css($sout, 'a:active, a:hover', $optVal);
    }
    if ($optVal = weaver_getopt('ttw_link_visited_color_css')) {
        weaver_css_css($sout, 'a:visited', $optVal);
    }
    /*  ttw_caption_color  */
    if ($optVal = weaver_getopt_color('ttw_caption_color')) {
        weaver_css_color($sout, '.wp-caption, .wp-caption p.wp-caption-text', $optVal);
    }
    if ($optVal = weaver_getopt('ttw_caption_color_css')) {
        weaver_css_css($sout, '.wp-caption, .wp-caption p.wp-caption-text', $optVal);
    }
    /*    ttw_media_lib_border    */
    if ($optVal = weaver_getopt('ttw_media_lib_border')) {
        weaver_f_write($sout, sprintf(".size-full, .size-large, .size-medium, .size-thumbnail,.size-thumbnail {background-color: %s;}\n", $optVal));
    }
    if ($optVal = weaver_getopt('ttw_media_lib_border_css')) {
        weaver_css_css($sout, '.size-full, .size-large, .size-medium, .size-thumbnail', $optVal);
    }
    /*    ttw_media_lib_captioned_border    */
    if ($optVal = weaver_getopt('ttw_media_lib_captioned_border')) {
        weaver_f_write($sout, sprintf(".wp-caption, .wp-caption p.wp-caption-text,\n.wp-caption .size-full, .wp-caption .size-large, .wp-caption .size-medium,\n.wp-caption .size-thumbnail, .wp-caption .size-thumbnail {background-color: %s;}\n", $optVal));
    }
    if ($optVal = weaver_getopt('ttw_media_lib_captioned_border_css')) {
        weaver_css_css($sout, '.wp-caption, .wp-caption p.wp-caption-text,
.wp-caption .size-full, .wp-caption .size-large, .wp-caption .size-medium,
.wp-caption .size-thumbnail, .wp-caption .size-thumbnail', $optVal);
    }
    /*  ttw_text_color  */
    if ($textColor = weaver_getopt_color('ttw_text_color')) {
        weaver_css_color($sout, 'h1, h2, h3, h4, h5, h6, dt, th', $textColor);
    }
    if ($textColor = weaver_getopt('ttw_text_color_css')) {
        weaver_css_css($sout, 'h1, h2, h3, h4, h5, h6, dt, th', $textColor);
    }
    /*  ttw_weaver_tables  */
    /* based on code in wvr-generatecss - the standard not 'none' code is in editor-style.css so you
       get a reasonable display when 'None' is the style. Also have to add !important to all borders. */
    $table = weaver_getopt('ttw_weaver_tables');
    if ($table != 'None') {
        // Need to write default style values
        if ($table != 'Default') {
            // Non-default styles based on Weaver table style
            weaver_f_write($sout, "table { border: 2px solid #AAA !important; text-align: left; margin: auto; margin-bottom: 5px; width: auto; }\ntr th, thead th { color: inherit; background-color: rgba(0,0,0,.1); font-size: medium;\n   font-weight: normal; line-height: normal; padding: 5px 10px; }\ntr td { border: 1px solid #AAA !important; padding: 5px 10px; }\ntr.odd td { background: inherit; }\n");
        }
    }
    if ($table == 'Default') {
        // make backward compatible with 1.4 and before when Twenty Ten was default
        weaver_f_write($sout, sprintf("table {border: 1px solid #e7e7e7 !important;margin: 0 -1px 24px 0;text-align: left;width: 100%%;}\ntr th, thead th {color: #888;font-size: 12px;font-weight: bold;line-height: 18px;padding: 9px 24px;}\ntr td {border-style:none !important; border-top: 1px solid #e7e7e7; padding: 6px 24px;}\ntr.odd td {background: #f2f7fc;}\n"));
    } else {
        if ($table == 'Bold Headings') {
            weaver_f_write($sout, sprintf("table {border: 2px solid #888;}\ntr th, thead th {font-weight: bold;}\ntr td {border: 1px solid #888 !important;}\n"));
        } else {
            if ($table == 'No Borders') {
                weaver_f_write($sout, sprintf("table {border-style:none;}\ntr th, thead th {font-weight: bold;border-bottom: 1px solid #888 !important;background-color:transparent;}\ntr td {border-style:none !important;}\n"));
            } else {
                if ($table == 'Full Width') {
                    weaver_f_write($sout, sprintf("table {width:100%%;}\ntr th, thead th {font-weight:bold;}\n"));
                }
            }
        }
    }
    // else 'Weaver' - handled previously
    if (function_exists('weaver_plus_output_editor_style')) {
        weaver_plus_output_editor_style($sout);
    }
}
Пример #7
0
                echo '<div class="menu-add">';
            }
            $add_div = false;
            wp_loginout();
            $add_enddiv = true;
        }
        if ($add_enddiv) {
            echo '</div>';
        }
        ?>
			</div></div><!-- #access -->
		    <?php 
    } else {
        if (has_nav_menu('secondary')) {
            ?>
			<div id="nav-top-menu"><div id="access2" role="navigation">
		        <?php 
            if (weaver_getopt('ttw_use_superfish')) {
                wp_nav_menu(array('container_class' => 'menu', 'theme_location' => 'secondary', 'fallback_cb' => '', 'menu_class' => 'sf-menu'));
            } else {
                wp_nav_menu(array('container_class' => 'menu', 'theme_location' => 'secondary', 'fallback_cb' => ''));
            }
            ?>

			</div></div><!-- #access2 -->
		<?php 
        }
    }
    /* end move menu if-else */
}
/* end hide menus */
Пример #8
0
function weaver_hide_site_title()
{
    if (weaver_getopt('ttw_hide_site_title') || weaver_is_checked_page_opt('ttw-hide-site-title')) {
        return 'style="display:none;"';
    }
    return '';
}
Пример #9
0
<?php

/* ========== HEAD TITLE ========== */
?>
<title><?php 
if (weaver_getopt('ttw_hide_metainfo')) {
    wp_title('');
    /* this is compatible with SEO plugins */
} else {
    /*
     * Print the <title> tag based on what is being viewed.
     */
    global $page, $paged;
    wp_title('|', true, 'right');
    /* Add the blog name. */
    bloginfo('name');
    /* Add the blog description for the home/front page. */
    $site_description = get_bloginfo('description', 'display');
    if ($site_description && (is_home() || is_front_page())) {
        echo " | {$site_description}";
    }
    /* Add a page number if necessary: */
    if ($paged >= 2 || $page >= 2) {
        echo ' | ' . sprintf(__('Page %s', WEAVER_TRANS), max($paged, $page));
    }
}
?>
</title>
Пример #10
0
    ?>
	<div id="masthead">
<?php 
    /* ======== SITE TITLE ======== */
    get_template_part('hdr', 'sitetitle');
    /* ======== TOP MENU ======== */
    get_template_part('nav', 'top');
    /* ======== HEADER INSERT CODE ======== */
    echo "\n\t    " . '<div id="branding" role="banner">' . "\n";
    $per_page_code = weaver_get_per_page_value('page-header-insert-code');
    /* or on a per page basis! */
    if (!empty($per_page_code)) {
        echo do_shortcode($per_page_code);
    } elseif (weaver_getopt('ttw_custom_header_insert')) {
        /* header insert defined? */
        echo do_shortcode(weaver_getopt('ttw_custom_header_insert'));
    }
    /* The Dynamic Headers shows headers on a per page basis - will also optionally add site link */
    if (function_exists('show_media_header')) {
        show_media_header();
    }
    /* **Dynamic Headers** built-in support for plugin */
    ?>

	    </div><!-- #branding -->

	    <?php 
    /* ======== BOTTOM MENU ======== */
    get_template_part('nav', 'bottom');
    ?>
Пример #11
0
function weaver_adv_admin_opts()
{
    ?>
		<a name="adminopts" id="adminopts"></a>
		<label><span style="color:#00f; font-weight:bold; font-size: larger;"><b>Administrative Options</b></span></label><br/>
		These options control some administrative options and appearance features.
		<br />

<br /> <small><span style="color:red;"><b>IMPORTANT NOTE:</b></span> Weaver includes support for Rounded Corners and Shadows for Internet Explorer 7/8
via an add-on script called PIE. The script has been <strong>enabled</strong> by default. PIE doesn't work with the rounded menus. It also may have
a few incompatibilities with some Flash content and other images that might require z-index adjustment.
If you have difficulties or don't like the way your site renders in IE 7/8, you can disable the support.</small>

<br />
    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_hide_PIE');
    ?>
" id="ttw_hide_PIE" <?php 
    checked(weaver_getopt_checked('ttw_hide_PIE'));
    ?>
 />
    <label>Disable IE rounded corners support - </label><small>If you are having issues with IE and rounded corners, please disable this option.</small><br />

<br />
    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_hide_editor_style');
    ?>
" id="ttw_hide_editor_style" <?php 
    checked(weaver_getopt_checked('ttw_hide_editor_style'));
    ?>
 />
	<label>Disable Page/Post Editor Styling - </label><small>Checking this box will disable the Weaver sub-theme based styling in the Page/Post editor.
	If you have a theme using transparent backgrounds, this option will likely improve the Post/Page editor visibility.</small><br />

    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_show_preview');
    ?>
" id="ttw_show_preview" <?php 
    checked(weaver_getopt_checked('ttw_show_preview'));
    ?>
 />
	<label>Show Site Preview - </label><small>Checking this box will show a Site Preview at the bottom of the screen which might slow down response a bit.</small><br />

    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_hide_updatemsg');
    ?>
" id="ttw_hide_updatemsg" <?php 
    checked(weaver_getopt_checked('ttw_hide_updatemsg'));
    ?>
 />
	<label>Hide Update Messages - </label><small>Checking this box will hide the Weaver version update announcements on the Weaver Admin page.</small><br />

    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_hide_theme_thumbs');
    ?>
" id="ttw_hide_theme_thumbs" <?php 
    checked(weaver_getopt_checked('ttw_hide_theme_thumbs'));
    ?>
 />
	<label>Hide Theme Thumbnails - </label><small>Checking this box will hide the Sub-theme preview thumbnails on the Weaver Themes tab which might speed up response a bit.</small><br />

    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_hide_auto_css_rules');
    ?>
" id="ttw_hide_auto_css_rules" <?php 
    checked(weaver_getopt_checked('ttw_hide_auto_css_rules'));
    ?>
 />
	<label>Don't auto-display CSS rules - </label><small>Checking this box will disable the auto-display of Main Option elements that have CSS settings.</small><br />

    <input name="<?php 
    weaver_sapi_advanced_name('ttw_css_rows');
    ?>
" id="ttw_css_rows" type="text" style="width:30px;height:20px;" class="regular-text" value="<?php 
    echo weaver_esc_textarea(weaver_getopt('ttw_css_rows'));
    ?>
" />
    <label>Set CSS+ text box height - </label><small>You can increase the default height of the CSS+ input area.</small>
<br />

    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_notab_mainoptions');
    ?>
" id="ttw_notab_mainoptions" <?php 
    checked(weaver_getopt_checked('ttw_notab_mainoptions'));
    ?>
 />
	<label>Show All Main Options at once - </label><small>If you want to see all the main options at once (not displayed by tabs), check this box.</small><br />

    <input type="checkbox" name="<?php 
    weaver_sapi_advanced_name('ttw_force_inline_css');
    ?>
" id="ttw_force_inline_css" <?php 
    checked(weaver_getopt_checked('ttw_force_inline_css'));
    ?>
 />
	<label>Use Inline CSS - </label><small>Checking this box will have Weaver generate CSS inline rather than use the style-weaver.css external style sheet.</small><br />

<?php 
    if (get_option('ttw_options')) {
        ?>
	<input type="checkbox" name="<?php 
        weaver_sapi_advanced_name('wvr_hide_if_are_oldWeaver_opts');
        ?>
" id="wvr_hide_if_are_oldWeaver_opts" <?php 
        checked(weaver_getopt_checked('wvr_hide_if_are_oldWeaver_opts'));
        ?>
 />
	<label>Hide import notice if settings from old Weaver versions exist - </label><small>This option controls the display of the import old Weaver settings box.</small><br />
<?php 
    }
    $type = get_filesystem_method(array());
    if ($type == 'ftpext' && !function_exists('weaver_fileio_plugin')) {
        ?>
	<br /><br /><label><span style="color:#00f; font-weight:bold; font-size: larger;"><b>FTP File Access</b></span></label><br/>
	<p>Your system requires internal FTP access for full file access functionality. You do not have the Weaver File Access
	Plugin installed. If you don't have the ftp access credentials defined in your wp-config.php file, you will have options
	here to provide the required values.
<?php 
        if (!(defined('FTP_HOST') && defined('FTP_USER') && defined('FTP_PASS'))) {
            _e('Please enter your FTP credentials to proceed.', WEAVER_TRANSADMIN);
            echo ' ';
            _e('If you do not remember your credentials, you should contact your web host.', WEAVER_TRANSADMIN);
            echo "</p>\n";
            ?>
	<br /><label><?php 
            _e('Hostname', WEAVER_TRANSADMIN);
            ?>
: &nbsp;&nbsp;&nbsp;</label><input name="<?php 
            weaver_sapi_advanced_name('ftp_hostname');
            ?>
" id="ftp_hostname" type="text" style="width:300px;height:20px;" class="regular-text" value="<?php 
            echo weaver_esc_textarea(weaver_getopt('ftp_hostname'));
            ?>
" />
    <small>Specify the name of your host. Usually something like 'example.com'.</small>
    <br /><label><?php 
            echo __('FTP Username', WEAVER_TRANSADMIN);
            ?>
: </label><input name="<?php 
            weaver_sapi_advanced_name('ftp_username');
            ?>
" id="ftp_username" type="text" style="width:300px;height:20px;" class="regular-text" value="<?php 
            echo weaver_esc_textarea(weaver_getopt('ftp_username'));
            ?>
" />
    <small>Specify your FTP Username.</small>
    <br /><label><?php 
            _e('FTP Password', WEAVER_TRANSADMIN);
            ?>
: </label><input name="<?php 
            weaver_sapi_advanced_name('ftp_password');
            ?>
" id="ftp_password" type="password" style="width:300px;height:20px;" class="regular-text" value="<?php 
            echo weaver_esc_textarea(weaver_decrypt(weaver_getopt('ftp_password')));
            ?>
" />
    <small>Specify your FTP Password. This will be saved in an encrypted form.</small>
<br />
<?php 
        } else {
            ?>
	    <p><em>FTP Credentials used from your wp-config.php file.</em></p>
<?php 
        }
        ?>
<br /><label>Hide FTP Access Start up Dialog: </label>
<input type="checkbox" name="<?php 
        weaver_sapi_advanced_name('ftp_hide_check_message');
        ?>
" id="ftp_hide_check_message" <?php 
        checked(weaver_getopt_checked('ftp_hide_check_message'));
        ?>
 />
	<small>If you check this, then the FTP File Access message box will not be displayed when you enter Weaver Admin. Weaver will continue to operate in
	reduced functionality mode: no editor styling, no save/restore, Inline CSS.</small><br />
<?php 
    }
    ?>

    <br /><?php 
    weaver_sapi_submit('saveadvanced', 'Save All Advanced Options');
    ?>
<br /><br />
    <?php 
    /* The following three hidden inputs allow the SAPI to save the values. If you don't do this here, then the values will
       be set to false, and lost! SAPI is not tolerant of submitting a form that doesn't include every setting for the form group. */
    ?>
    <input name="<?php 
    weaver_sapi_advanced_name('ttw_subtheme');
    ?>
" id="ttw_subtheme" type="hidden" value="<?php 
    echo weaver_getopt('ttw_subtheme');
    ?>
" />
    <input name="<?php 
    weaver_sapi_advanced_name('ttw_theme_image');
    ?>
" id="ttw_theme_image" type="hidden" value="<?php 
    echo weaver_getopt('ttw_theme_image');
    ?>
" />
    <input name="<?php 
    weaver_sapi_advanced_name('ttw_theme_description');
    ?>
" id="ttw_theme_description" type="hidden" value="<?php 
    echo weaver_getopt('ttw_theme_description');
    ?>
" />
    <input name="<?php 
    weaver_sapi_advanced_name('ttw_themename');
    ?>
" id="ttw_themename" type="hidden" value="<?php 
    echo weaver_getopt('ttw_themename');
    ?>
" />
    <input name="<?php 
    weaver_sapi_advanced_name('ttw_version_id');
    ?>
" id="ttw_version_id" type="hidden" value="<?php 
    echo weaver_getopt('ttw_version_id');
    ?>
" />
    <input name="<?php 
    weaver_sapi_advanced_name('ttw_style_version');
    ?>
" id="ttw_style_version" type="hidden" value="<?php 
    echo weaver_getopt('ttw_style_version');
    ?>
" />

    <hr />
    <p><em>Note: </em>Clear all settings moved to Save/Restore tab<p>
<?php 
}
Пример #12
0
function weaver_f_WP_Filesystem()
{
    // see if we can get some credentials
    static $creds = false;
    global $wp_filesystem;
    if ($creds != false && is_object($wp_filesystem)) {
        return true;
    }
    $method = '';
    // change to ftpext to force ftp
    if ($method == '') {
        if (!function_exists('get_filesystem_method')) {
            return false;
        }
        $type = get_filesystem_method(array());
        // lets see if we have direct or ftpx
        if ($type != 'direct' && $type != 'ftpext') {
            return false;
        }
        if ($type == 'direct') {
            return WP_Filesystem() ? true : false;
        }
    } else {
        $type = $method;
    }
    if ($type == 'ftpext' && !(defined('FTP_HOST') && defined('FTP_USER') && defined('FTP_PASS'))) {
        // See if we can fill in the FTP credentials
        // Are they in wp-config.php?
        $host = weaver_getopt('ftp_hostname');
        // we should have these filled in
        $user = weaver_getopt('ftp_username');
        $password = weaver_decrypt(weaver_getopt('ftp_password'));
        if (!($host && $user && $password)) {
            return false;
        }
        $_POST['hostname'] = $host;
        $_POST['user'] = $user;
        $_POST['password'] = $password;
    }
    $url = "";
    ob_start();
    /* use output buffering to hide the form */
    $creds = request_filesystem_credentials($url, $method);
    ob_end_clean();
    if (false === $creds) {
        // if we get here, then we don't have credentials yet,
        // This should only happen if we provided bad info
        return false;
    }
    // now we have some credentials, try to get the wp_filesystem running
    if (!WP_Filesystem($creds)) {
        weaver_f_wp_filesystem_error();
        return false;
    }
    return true;
    // we are good to go
}
Пример #13
0
function weaver_ftp_form()
{
    // display warning message, and ftp info
    $readme = get_template_directory_uri() . '/help.html';
    ?>
      <br /><br /><br /><div style="background-color:#FFEEEE; border: 5px ridge red; margin: 10px 60px 0px 20px; padding:15px;">
<strong style="color:#f00; line-height:150%;">*** IMPORTANT NOTICE! ***</strong> <small style="padding-left:20px;">(But don't panic!)</small>
<?php 
    weaver_help_link('help.html#File_access_plugin', 'Weaver File Access Plugin');
    ?>
	<p>Your web host configuration needs "FTP" file access for full Weaver functionality. You need to use one of the following options. There are more details in the help file. <?php 
    weaver_help_link('help.html#File_access_plugin', 'Weaver File Access Plugin');
    ?>
</p>
	<ul style="list-style-type:disc !important;list-style-position:inside !important;">
	  <li><strong>For a shared web host</strong>: Provide FTP credentials to enable file access. You can do this by filling the form below, or by adding the proper information to your wp-config.php file as described in the help file. <small>Note: most shared hosts do not need FTP file access, and won't generate this message.</small></li>
      <li><strong>For a private server or VPS</strong>: Provide FTP credentials, or install the <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a>. The Weaver File Access Plugin will provide the required file access with the most efficiency.</li>
      <li><strong>For compatibility with existing Weaver installations:</strong> install the <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a>. This will provide the required file access with the most compatibility with previous versions, but with a very small security risk. See the help file.
      If you have an existing Weaver installation, you may find switching file access methods (Weaver File Access Plugin to FTP, or the opposite) may result in file or directory access permission issues. See the help file.</li>
      <li><strong>For reduced functionality mode:</strong> Check the <em>Hide FTP Access Start up Dialog</em> below.
      Weaver <strong>will continue to operate</strong> in reduced functionality mode (no editor styling, no save/restore, Inline CSS)
	until you provide FTP credentials, or download and activate the <em>Weaver File Access Plugin</em>, either from <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">WordPress.org</a>, or <a href="http://wpweaver.info/themes/weaver/weaver-file-access-plugin/" target="_blank">WPWeaver.info</a>.</li>
</ul>
	<ul style="list-style-type:disc !important;list-style-position:inside !important;">
	    <li>If your host requires secure FTP or SSH access, you will need to provide the proper credentials using the wp-config.php file.</li>
      <li>Installing the <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a> will allow full Weaver functionality on any host, but sometimes with a small security risk</li>
</ul>
	<p><strong>Please read more details in the
<?php 
    echo '<a href="' . $readme . '#File_access_plugin" target="_blank">';
    ?>
	Weaver File Access Plugin</a> topic from the <em>Weaver Help tab</em></strong>.
	</p>
	</div><br />


    <form name="weaver_set_ftp_form" method="post">
      <p><span style="color:#00f; font-weight:bold; font-size: larger;"><strong>Provide FTP File Access Credentials</strong></span></p>
	<?php 
    if (!(defined('FTP_HOST') && defined('FTP_USER') && defined('FTP_PASS'))) {
        echo "<p>\n";
        _e('Please enter your FTP credentials to proceed.', WEAVER_TRANSADMIN);
        echo ' ';
        _e('If you do not remember your credentials, you should contact your web host.', WEAVER_TRANSADMIN);
        echo "</p>\n";
        ?>
	<label><?php 
        _e('Hostname', WEAVER_TRANSADMIN);
        ?>
: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input name="ftp_hostnamex" id="ftp_hostnamex" type="text" style="width:300px;height:20px;" class="regular-text" value="<?php 
        echo weaver_esc_textarea(weaver_getopt('ftp_hostname'));
        ?>
" />
    <small>Specify the name of your host. Usually something like 'example.com'.</small>
    <br /><label><?php 
        echo __('FTP Username', WEAVER_TRANSADMIN);
        ?>
: </label><input name="ftp_usernamex" id="ftp_usernamex" type="text" style="width:300px;height:20px;" class="regular-text" value="<?php 
        echo weaver_esc_textarea(weaver_getopt('ftp_username'));
        ?>
" />
    <small>Specify your FTP Username.</small>
    <br /><label><?php 
        _e('FTP Password', WEAVER_TRANSADMIN);
        ?>
: </label><input name="ftp_passwordx" id="ftp_passwordx" type="password" style="width:300px;height:20px;" class="regular-text" value="<?php 
        echo weaver_esc_textarea(weaver_decrypt(weaver_getopt('ftp_password')));
        ?>
" />
    <small>Specify your FTP Password. This will be saved in an encrypted form.</small>
<br />
<?php 
    } else {
        ?>
<p><em>Credentials provided in the wp-config.php file.</em> There must be some kind of problem because you shouldn't be seeing
this page unless you need to provide FTP access credentials. Perhaps the password is not included in wp-config.php.</p>
<?php 
    }
    ?>
<p>If you continue to get this message even after entering your credentials, please double check the values. If that
	that continues to fail, you can install the
	<a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a> instead.</p><br />

<p><span style="color:#00f; font-weight:bold; font-size: larger;"><strong>Install Weaver File Access Plugin</strong></span><br />
      The easiest way to install the <em>Weaver File Access Plugin</em> is to open the Plugins&rarr;Add New panel, and enter
      <em>Weaver File Access Plugin</em> into the search box. Then install and activate the plugin.
</p>

<p><span style="color:#00f; font-weight:bold; font-size: larger;"><strong>Continue with reduced file access</strong></span><br />
      If want to continue to use Weaver without full file access, check
the box below. You can still use all of Weaver's options. You just won't be able to use the Save/Restore features, the
Page/Post editor will use plain styling, and CSS rules will be included Inline on your site's pages. <em>You can still
install the Weaver File Access Plugin, or provide FTP credentials later.</em></p>

<label><strong>Hide FTP Access Start up Dialog:</strong> </label><input type="checkbox" name="ftp_hide_check_messagex" id="ftp_hide_check_messagex" <?php 
    checked(weaver_getopt_checked('ftp_hide_check_message'));
    ?>
 />
	<small>If you check this, then this FTP File Access message box when you enter Weaver Admin will not be displayed. Weaver will function in
	reduced functionality mode: no editor styling, no save/restore, Inline CSS.</small><br /><br />

<input class="button-primary" type="submit" name="ftp_save_form" value="Save FTP File Access Options"/>
	<?php 
    weaver_nonce_field('ftp_save_form');
    ?>
    </form>



    </div> <!-- #wrap -->
<?php 
}
Пример #14
0
" width="<?php 
                echo $weaverii_header['width'];
                ?>
" height="<?php 
                echo $weaverii_header['height'];
                ?>
" alt="<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
" />
<?php 
            } else {
                ?>
			<img src="" width="<?php 
                echo $weaverii_header['width'];
                ?>
" height="<?php 
                echo $weaverii_header['height'];
                ?>
" />
<?php 
            }
        }
        if (weaver_getopt('ttw_link_site_image')) {
            echo "</a>\n";
        }
        /* need to close link */
    }
    /* closes header > 0 */
}
/* end ttw-hide-header-image */
Пример #15
0
    function weaver_st_pick_theme($altID)
    {
        // display a picker for the list of themes.
        global $weaver_theme_list;
        // the master list
        $themeimgs = get_template_directory_uri() . '/subthemes/';
        /* define control items for theme picker */
        $curTheme = weaver_getopt('ttw_subtheme');
        $showImg = 'custom.jpg';
        $selectID = 'ttw_subtheme' . $altID;
        // allows more than one form on the same admin page
        $subName = 'setsubtheme' . $altID;
        ?>

    <form name="weaver_select_theme_form" method="post">  <table class="optiontable">
     <tr>
	<th style="width:110px;">Select a theme: &nbsp;</th>
	<td>
	<select <?php 
        echo "name='{$selectID}' id='{$selectID}'";
        ?>
 >
        <?php 
        foreach ($weaver_theme_list as $theme) {
            $name = $theme['name'];
            ?>
	    <option<?php 
            if ($curTheme == $name) {
                $showImg = $theme['img'];
                echo ' selected="selected"';
            }
            ?>
><?php 
            echo $name;
            ?>
</option>
	    <?php 
        }
        ?>
 	</select>
	</td>
	<td ><small>Select a predefined sub-theme from the list.</small>
	<?php 
        echo "&nbsp; &nbsp;<small>Current theme: <strong>{$curTheme}</strong></small>";
        ?>
	</td>
	<td valign="middle" align="left" style="width:120px;">
	<?php 
        echo "&nbsp;&nbsp;<img src='" . $themeimgs . $showImg . "' width=67 height=50 />";
        ?>
	</td>
	</tr>

	<tr><td>&nbsp;</td><td><span class='submit' style="padding-right:15px;"><input <?php 
        echo "name='{$subName}'";
        ?>
 type='submit' value='Set to Selected Sub-Theme'/></span></td>
<?php 
        if (!weaver_allow_multisite()) {
            ?>
                <td ><small><strong>Please note:</strong> Changing sub-theme will replace all theme related your current "Main Options" settings.
		<em>Per site options</em> (those marked with a &diams; on
		the Main Options Page are not changed.)
		You can save them first with the "Save in My Saved Theme" button below.</small></td>
                </tr>
		<tr><td>&nbsp;</td>
		<td><span class='submit'><input name='savemytheme' type='submit' value='Save in My Saved Theme'/></span></td>
		<td colspan='2'><small>Save <u>all</u> currently saved options as <strong>My Saved Theme</strong>.
 You will be able to restore these later by selecting <strong>My Saved Theme</strong>. Please note: be sure to click <em>Save Current Settings</em>
 on the Main Options panel first to save any changes you might have made.</td>
		</tr>
<?php 
        } else {
            ?>
                <td><small><strong>Please note:</strong> Changing sub-theme will replace all theme related settings. <em>Per site options</em> (those marked with a &diams; on
		the Main Options Page, as well as most "Advanced Options" are not changed. (Important: Using "My Saved Theme" saves and restores ALL settings. You can also backup all
		current settings from the Save/Restore tab).</small></td>
                </tr>
<?php 
        }
        /* end TTW_MULTISITE */
        ?>
        </table>
	<?php 
        weaver_nonce_field($subName);
        weaver_nonce_field('savemytheme');
        ?>
    </form>
<?php 
    }
Пример #16
0
            printf(__('Proudly powered by %s.', WEAVER_TRANS), 'WordPress');
            ?>
</a>
 <?php 
            echo WEAVER_THEMENAME;
            ?>
 by WeaverTheme.com
 </div></td> <?php 
        }
        ?>
</tr></table>
		</div><!-- #colophon -->
	</div><!-- #footer -->
    <?php 
    }
    weaver_put_area('postfooter');
}
/* end of ttw-hide-footer */
if (!weaver_getopt_checked('ttw_footer_last')) {
    echo "</div><!-- #wrapper -->\n";
}
?>

<?php 
echo do_shortcode(weaver_getopt('ttw_end_opts')) . "\n";
/* and this is the end options insertion */
wp_footer();
?>
</body>
</html>
Пример #17
0
			<?php 
        the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', WEAVER_TRANS));
        echo "<div class=\"clear-cols\"></div>";
        wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', WEAVER_TRANS), 'after' => '</div>'));
        ?>
			</div><!-- .entry-content -->

			<div class="entry-utility">
				<?php 
        weaver_posted_in('single');
        ?>
			</div><!-- .entry-utility -->
		</div><!-- #post-## -->

<?php 
        if (weaver_getopt('ttw_allow_attachment_comments')) {
            comments_template();
        }
        ?>

<?php 
    }
}
?>

	    </div><!-- #content -->
	    <?php 
weaver_put_wvr_widgetarea('sitewide-bottom-widget-area', 'ttw-site-bot-widget');
?>
	</div><!-- #container -->
Пример #18
0
	</div><!-- #post-<?php 
        the_ID();
        ?>
 -->
<?php 
    } else {
        weaver_put_page_title('h2', 'style="margin-bottom:10px;"');
    }
    echo "<div id=\"wvr-sitemap\">\n";
    echo "<h3>" . __('Pages', WEAVER_TRANS) . "</h3><ul class='xoxo sitemap-pages'>\n";
    wp_list_pages(array('title_li' => false));
    echo "</ul>\n";
    echo "<h3>" . __('Posts', WEAVER_TRANS) . "</h3><ul class='xoxo sitemap-pages-month'>\n";
    wp_get_archives(array('type' => 'monthly', 'show_post_count' => true));
    echo "</ul>\n";
    if (!weaver_getopt('ttw_post_hide_cats')) {
        echo "<h3>" . __('Categories', WEAVER_TRANS) . "</h3><ul class='xoxo sitemap-categories'>\n";
        wp_list_categories(array('show_count' => true, 'use_desc_for_title' => true, 'title_li' => false));
        echo "</ul>\n";
        // If you want to show authors, simply uncomment the next 3 lines
        // echo("<h3>" . __('Authors') ."</h3><ul class='xoxo sitemap-authors'>\n");
        // wp_list_authors(array('exclude_admin' => false, 'optioncount' => true, 'title_li' => false));
        // echo("</ul>\n");
        echo "<h3>" . __('Tag Cloud', WEAVER_TRANS) . "</h3><ul class='xoxo sitemap-tag'>\n";
        wp_tag_cloud(array('number' => 0));
        echo "</ul>\n";
    }
    echo "</div><!-- wvr-sitemap -->\n";
    ?>
	<?php 
    edit_post_link(__('Edit', WEAVER_TRANS), '<span class="edit-link">', '</span>');
Пример #19
0
function weaver_page_menu()
{
    /* handle sf-menu for wp_page_menu */
    $menu = wp_page_menu(array('echo' => false));
    if (weaver_getopt('ttw_use_superfish')) {
        $ulpos = stripos($menu, '<ul>');
        if ($ulpos !== false) {
            echo substr_replace($menu, '<ul class="sf-menu">', $ulpos, 4);
        }
    } else {
        echo $menu;
    }
}
Пример #20
0
function weaver_sidebar_css($sout)
{
    /* output the CSS to support different sidebars at different widths */
    $sidebars = weaver_getopt('ttw_sidebars');
    $themewidth = weaver_getopt('ttw_header_image_width');
    if (!$themewidth) {
        $themewidth = '940';
    }
    $sidebarwidth = weaver_getopt('ttw_sidebar_width');
    $sb_adjust = (int) weaver_getopt('ttw_border_adjust_sidebar');
    $fw_use = 4;
    $fw_new_count = weaver_getopt('ttw_footer_widget_count');
    if (!empty($fw_new_count)) {
        $val = (int) $fw_new_count;
        // try to get an int
        if ($val > 0 && $val < 4) {
            // ignore all but valid values
            $fw_use = $val;
        }
    }
    /* SIDEBAR layout - need to calculate and override items if change width.
     *	First, calculate and emit everything that is constant for each alternative:
     *	Footer width, site-info, site-generator, site-title, site-description.
     */
    $mw = (int) $themewidth;
    /* main width */
    $fw = (int) (($mw + $fw_use * 5 - 2) / $fw_use - 25);
    /* footer widget width ((mainwidth+(num*5)/num)-25  */
    $si = (int) (($mw - 40) * 0.5);
    /* site info = 60% of mainwidth-40*/
    $sg = (int) ($mw - 50 - $si);
    /* site generator - left over space */
    $caw = (int) $mw - 40;
    /* mainwidth - 40 */
    $ocw = (int) ($mw * 0.9);
    /* one column width */
    $tbmult = 0.85;
    // usually make top/bottom widget areas 85%
    if (weaver_getopt('ttw_wide_top_bottom')) {
        $tbmult = 1;
    }
    if (weaver_getopt_checked('ttw_header_first')) {
        weaver_f_write($sout, sprintf("#masthead {margin:0 auto;width:%dpx;}\n", $mw));
    }
    if ($mw != WVR_WIDTH) {
        /* non-default width means override footer, etc. */
        weaver_f_write($sout, sprintf("#access .menu-header, #access2 .menu-header, #access3 .menu-header, div.menu, #colophon, #branding, #main, #wrapper { width: %dpx; }\n", $mw));
        weaver_f_write($sout, sprintf("#footer-widget-area .widget-area {width: %dpx !important; }\n", $fw));
        weaver_f_write($sout, sprintf("#site-info { width: %dpx;}\n", $si));
        weaver_f_write($sout, sprintf("#site-generator {text-align:right; width: %dpx; }\n", $sg));
        weaver_f_write($sout, sprintf("#site-title {width: 55%%;} "));
        weaver_f_write($sout, sprintf("#site-description {text-align:right; padding-right: 20px; width: 40%%;}\n"));
        weaver_f_write($sout, sprintf("#access, #access2, #access3 {width: %dpx; }\n", $mw));
        weaver_f_write($sout, sprintf("#access .menu-header, #access2 .menu-header, #access3 .menu-header, div.menu {width: %dpx;}\n", $mw - 12));
        weaver_f_write($sout, sprintf("#content .attachment img {max-width: %dpx;}\n", $caw));
        weaver_f_write($sout, sprintf(".single-attachment #content {width: %dpx;}\n", $caw));
        weaver_f_write($sout, sprintf(".one-column #content {margin: 0 auto !important; width: %dpx;}\n", $ocw));
        weaver_f_write($sout, sprintf("#main {margin-bottom:4px;}\n"));
        weaver_f_write($sout, sprintf(".one-column #ttw-top-widget, .one-column #ttw-bot-widget, .one-column #ttw-site-top-widget,\n .one-column #ttw-site-bot-widget, .one-column #per-page-widget { margin-left:%dpx !important; margin-right:auto !important; width: %dpx !important;}\n", (int) ($mw * 0.045), $ocw));
        $altcontainer = $mw - 240;
        // alt templates
        weaver_f_write($sout, sprintf(".right-alt #container {width: %dpx;}\n.right-alt #content {width: %dpx;}\n.right-alt #content img {max-width: %dpx;}\n", $altcontainer, $altcontainer - 20, $altcontainer - 30));
        weaver_f_write($sout, sprintf(".left-alt #content {width: %dpx;}\n.left-alt #contentl img {max-width: %dpx;}", $altcontainer - 42, $altcontainer - 50));
    } elseif ($fw_use != 4) {
        weaver_f_write($sout, sprintf("#footer-widget-area .widget-area {width: %dpx !important; }\n", $fw));
    }
    if ($sidebars == weaver_SB_none) {
        /* no sidebars - simply hide them */
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1) {
            $sidebarwidth = 0;
            /* use default if not set */
            /* contentwidth + primary_secondary_width == (mainwidth-50) */
            $contentw = (int) ($mw - 50 - $sidebarwidth);
            /* from formula */
            $containerw = (int) ($contentw + 38);
            /* contentwidth + 38 */
            if (weaver_getopt('ttw_wide_top_bottom')) {
                $ttwwid = $contentw;
            } else {
                $ttwwid = (int) ($contentw - 70);
            }
            /* contentwidth - 70 */
            weaver_f_write($sout, sprintf("#container { float: left; margin: 0 0px 4px 0; width: %dpx; }\n", $containerw));
            weaver_f_write($sout, sprintf("#content {width: %dpx; overflow:hidden; margin:0 0px 10px 0px; padding: 5px 0px 0px 20px;}\n", $contentw));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#primary, #secondary { visibility:hidden; width:0px; height: 0px;}\n"));
            weaver_f_write($sout, sprintf(".one-column #ttw-top-widget, .one-column #ttw-bot-widget, .one-column #ttw-site-top-widget, .one-column #ttw-site-bot-widget { margin-left:80px !important; margin-right:auto !important; width: %dpx !important;}\n", (int) ($contentw * 0.85)));
            if (weaver_getopt('ttw_wide_top_bottom')) {
                weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx; margin-left: 20px;}\n", $ttwwid));
            } else {
                weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx;}\n", $ttwwid));
            }
        } else {
            /* using defaults, so make shorter */
            weaver_f_write($sout, sprintf("#container { width:940px; margin: 0px 0px -30px 0px; }\n#content { width: 860px; margin: 0 100px 30px 0px; overflow:hidden; padding-top: 10px;}\n#content img { max-width: 860px;}\n#primary { visibility:hidden; width:0px; height: 0px;}\n#secondary { visibility:hidden; width:0px; height: 0px;}\n#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: 800px;}\n"));
        }
    } elseif ($sidebars == weaver_SB_2c) {
        /* 2 sidebars, main central column */
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1 || $sb_adjust != 0) {
            if (!$sidebarwidth) {
                $sidebarwidth = 220;
            }
            /* use default if not set */
            /* contentwidth = mainwidth - 40 - (2*sidebarwidth ) */
            $contentw = (int) ($mw - 40 - $sidebarwidth * 2);
            /* from formula */
            $containerw = (int) $mw;
            /* same a mw */
            $ttwwid = (int) ($contentw * $tbmult);
            /* 85%  or 100% */
            if ($tbmult == 1) {
                $ttwmargin = $sidebarwidth + 20;
                $ttwwid -= 10;
            } else {
                $ttwmargin = (int) ($sidebarwidth + $contentw * 0.115);
            }
            if (weaver_getopt('ttw_useborders')) {
                $second_left = (int) $sidebarwidth + 6;
            } else {
                $second_left = (int) $sidebarwidth + 4;
            }
            weaver_f_write($sout, sprintf("\n#container { width:%dpx; float:left; margin:0 0 4px 0px;}\n", $containerw));
            weaver_f_write($sout, sprintf("#content { width: %dpx; margin: 0px 0px 5px %dpx; overflow:hidden; padding: 5px 20px 4px 20px; }\n", $contentw, $sidebarwidth));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#primary { width:%dpx; float:left; margin: 0 0 4px -%dpx; }\n", $sidebarwidth - 6 - $sb_adjust, $mw));
            weaver_f_write($sout, sprintf("#secondary { width:%dpx; float:left; margin: 0 0 4px -%dpx;}\n", $sidebarwidth - 6 - $sb_adjust, $second_left));
            weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx; margin-left: %dpx;}\n", $ttwwid, $ttwmargin));
        } else {
            /* using defaults, so make shorter */
            weaver_f_write($sout, sprintf("#container { width:940px; float:left; margin:0 0 4px 0px; }\n#content { width: 460px; margin: 0px 0px 5px 220px; overflow:hidden; padding: 5px 20px 4px 20px; }\n#content img { max-width: 460px;}\n#primary { width:214px; float:left; margin: 0 0 4px -940px; }\n#secondary { width:214px; float:left; margin: 0 0 4px -226px;}\n#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: 400px; margin-left: 265px;}\n"));
        }
    } elseif ($sidebars == weaver_SB_2r) {
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1 || $sb_adjust != 0) {
            if (!$sidebarwidth) {
                $sidebarwidth = 220;
            }
            /* use default if not set */
            $sb2 = (int) ($sidebarwidth * 0.75);
            $contentw = (int) ($mw - 60 - $sidebarwidth - $sb2);
            /* from formula */
            if (weaver_getopt('ttw_useborders')) {
                $containerw = (int) ($contentw + 36);
            } else {
                $containerw = (int) ($contentw + 40);
            }
            $ttwwid = (int) ($contentw * $tbmult);
            if ($tbmult == 1) {
                $ttwmargin = 0;
                $ttwwid += 5;
            } else {
                $ttwmargin = (int) ($contentw * 0.115);
            }
            weaver_f_write($sout, sprintf("#container { width:%dpx; float:left; margin:0 0px 4px 0px;}\n", $containerw));
            weaver_f_write($sout, sprintf("#content {width: %dpx; overflow:hidden; margin:0 0px 10px 0px; padding: 5px 0px 0px 20px;}\n", $contentw));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#primary { width:%dpx; float:left; margin:0 0px 4px 0px;}\n", $sidebarwidth - $sb_adjust));
            weaver_f_write($sout, sprintf("#secondary { width:%dpx; float:left; margin:0 0 4px 0px;}\n", $sb2));
            weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx;margin-left:%dpx;}\n", $ttwwid, $ttwmargin));
        } else {
            /* using defaults, so make shorter */
            weaver_f_write($sout, sprintf("#container { width:525px; float:left; margin:0 0px 4px 0px;}\n#content { width: 490px; overflow:hidden; margin:0 0px 10px 0px; padding: 5px 0px 0px 20px;}\n#content img { max-width: 490px;}\n#primary { width:220px; float:left; margin:0 0px 4px 0px;}\n#secondary { width:170px; float:left; margin:0 0 4px 0px;}\n#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: 420px; margin-left: 40px;}\n"));
        }
    } elseif ($sidebars == weaver_SB_2l) {
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1 || $sb_adjust != 0) {
            if (!$sidebarwidth) {
                $sidebarwidth = 220;
            }
            /* use default if not set */
            $sb2 = (int) ($sidebarwidth * 0.75);
            $contentw = (int) ($mw - 60 - $sidebarwidth - $sb2);
            /* from formula */
            if (weaver_getopt('ttw_useborders')) {
                $containerw = (int) ($contentw + 36);
            } else {
                $containerw = (int) ($contentw + 40);
            }
            $ttwwid = (int) ($contentw * $tbmult);
            if ($tbmult == 1) {
                $ttwmargin = 18;
            } else {
                $ttwmargin = (int) ($contentw * 0.115);
            }
            weaver_f_write($sout, sprintf("#container { width:%dpx; float:right; margin:0 0 4px 0px;}\n", $containerw));
            weaver_f_write($sout, sprintf("#content { width: %dpx; overflow:hidden; float:right; padding: 5px 10px 5px 0px; margin:0 10px 4px 0px;}\n", $contentw));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#primary { width:%dpx; float:left; margin:0 0px 4px 0px;}\n", $sidebarwidth - 4 - $sb_adjust));
            weaver_f_write($sout, sprintf("#secondary { width:%dpx; float:left; margin:0 0 4px 0px; clear:none;}\n", $sb2));
            weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx;margin-left:%dpx;}\n", $ttwwid, $ttwmargin));
            weaver_f_write($sout, sprintf(".one-column #content {margin-right: 20px !important; padding-left:20px; width: %dpx;}\n", $ocw + 20));
        } else {
            /* using defaults, so make shorter */
            weaver_f_write($sout, sprintf("#container { width:530px; float:right; margin:0 0 4px 0px;}\n#content { width: 490px; overflow:hidden; float:right;  padding: 5px 10px 5px 0px; margin:0 10px 4px 0px;}\n#content img { max-width: 490px;}\n#primary { width:216px; float:left; margin:0 0px 4px 0px;}\n#secondary { width:170px; float:left; margin:0 0 4px 0px; clear:none;}\n#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: 420px;}\n.one-column #content {margin-right: 20px !important; padding-left:20px; width: 850px;}\n"));
        }
    } elseif ($sidebars == weaver_SB_1l) {
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1 || $sb_adjust != 0) {
            if (!$sidebarwidth) {
                $sidebarwidth = 220;
            }
            /* use default if not set */
            $contentw = (int) ($mw - 70 - $sidebarwidth);
            /* from formula */
            $ttwwid = (int) ($contentw * $tbmult);
            if ($tbmult == 1) {
                $ttwmargin = 30;
            } else {
                $ttwmargin = (int) ($contentw * 0.115);
            }
            weaver_f_write($sout, sprintf("#container { float: right; margin: 0 -%dpx 4px 0; width: 100%%;}\n", $sidebarwidth + 20));
            weaver_f_write($sout, sprintf("#content { margin: 0px %dpx 4px 0px; width: %dpx; padding: 10px 25px 5px 25px;}\n", $sidebarwidth + 20, $contentw));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#container.one-column-iframe #content {margin:0 0 0 -%dpx;padding:0px;width:100%%;}\n", $sidebarwidth + 20));
            weaver_f_write($sout, sprintf("#primary, #secondary { float: left;  width: %dpx; padding-left: 15px; margin-bottom:4px;}\n", $sidebarwidth + 3 - $sb_adjust));
            weaver_f_write($sout, sprintf("#secondary { clear: left; }\n"));
            weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx; margin-left: %dpx;}\n", $ttwwid, $ttwmargin));
            //weaver_f_write($sout, sprintf(".one-column #ttw-top-widget, .one-column #ttw-bot-widget, .one-column #ttw-site-top-widget, .one-column #ttw-site-bot-widget, .one-column #per-page-widget { margin-left:-%dpx !important; margin-right:auto !important; width: %dpx !important;}\n",
            //		  (int)($sidebarwidth-20), (int)($mw*.88-10)));
        } else {
            /* using defaults, so make shorter */
            weaver_f_write($sout, sprintf("#container { float: right; margin: 0 -240px 4px 0; width: 100%%;}\n#content { margin: 0px 240px 4px 0px; width: 640px; padding: 10px 25px 5px 25px;}\n#container.one-column-iframe #content {margin:0 0 0 -240px;padding:0;width:100%%;}\n#content img { max-width: 640px;}\n#primary, #secondary { float: left;  width: 223px; padding-left: 15px; margin-bottom:4px;}\n#secondary { clear: left;}\n#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: 580px;}\n"));
        }
    } elseif ($sidebars == weaver_SB_1rw) {
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1 || $sb_adjust != 0) {
            if (!$sidebarwidth) {
                $sidebarwidth = 300;
            }
            /* use default if not set */
            /* contentwidth + primary_secondary_width == (mainwidth-50) */
            $contentw = (int) ($mw - 50 - $sidebarwidth);
            /* from formula */
            $containerw = (int) ($contentw + 38);
            /* contentwidth + 38 */
            $ttwwid = (int) ($contentw - 70);
            /* contentwidth - 70 */
            if ($tbmult == 1) {
                $ttwwid = $contentw;
            }
            weaver_f_write($sout, sprintf("#container { float: left; margin: 0 0px 4px 0; width: %dpx; }\n", $containerw));
            weaver_f_write($sout, sprintf("#content {width: %dpx; overflow:hidden; margin:0 0px 10px 0px; padding: 5px 0px 0px 20px;}\n", $contentw));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#primary, #secondary { float: right; overflow: hidden; width: %dpx; margin: 0 0 4px 0;}\n", $sidebarwidth - $sb_adjust));
            if ($tbmult == 1) {
                weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx; margin-left: 1px; margin-right: 1px;}\n", $ttwwid));
            } else {
                weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx;}\n", $ttwwid));
            }
        } else {
            /* using defaults, so make shorter */
            weaver_f_write($sout, sprintf("#main {margin-bottom:4px;}\n#container { float: left; margin: 0 0px 4px 0; width: 628px; }\n#content {width: 590px; overflow:hidden; margin:0 0px 10px 0px; padding: 5px 0px 0px 20px;}\n#content img { max-width: 590px;}\n#primary, #secondary { float: right; overflow: hidden; width: 300px; margin: 0 0 4px 0;}\n#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: 520px;}\n"));
        }
    } else {
        /* default right sidebar */
        if ($themewidth != WVR_WIDTH || $sidebarwidth || $tbmult == 1 || $sb_adjust != 0) {
            if (!$sidebarwidth) {
                $sidebarwidth = 220;
            }
            /* use default if not set */
            /* contentwidth + primary_secondary_width == (mainwidth-50) */
            $contentw = (int) ($mw - 50 - $sidebarwidth);
            /* from formula */
            $containerw = (int) ($contentw + 38);
            /* contentwidth + 38 */
            $ttwwid = (int) ($contentw - 70);
            /* contentwidth - 70 */
            if ($tbmult == 1) {
                $ttwwid = $contentw;
            }
            weaver_f_write($sout, sprintf("#container { float: left; margin: 0 0px 4px 0; width: %dpx; }\n", $containerw));
            weaver_f_write($sout, sprintf("#content {width: %dpx; overflow:hidden; margin:0 0px 10px 0px; padding: 5px 0px 0px 20px;}\n", $contentw));
            weaver_f_write($sout, sprintf("#content img { max-width: %dpx;}\n", $contentw));
            weaver_f_write($sout, sprintf("#primary, #secondary { float: right; overflow: hidden; width: %dpx; margin: 0 0 4px 0;}\n", $sidebarwidth - $sb_adjust));
            weaver_f_write($sout, sprintf(".one-columnsb1r #content {margin-left: %dpx; padding: 0; width: %dpx;}\n", (int) ($mw * 0.05), $ocw));
            if ($tbmult == 1) {
                weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx; margin-left: 1px; margin-right: 1px;}\n", $ttwwid));
            } else {
                weaver_f_write($sout, sprintf("#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {width: %dpx;}\n", $ttwwid));
            }
        }
    }
}
Пример #21
0
    }
} else {
    ?>
<style type="text/css">
body, p, #wrapper, #main {
	background: transparent;
	border: 0;
	margin: 0;
	padding: 0;
	vertical-align: baseline;
}
</style>
<?php 
}
if (!weaver_getopt('ttw_hide_metainfo')) {
    echo weaver_getopt('ttw_metainfo') . "\n";
}
$per_page_code = weaver_get_per_page_value('page-head-code');
if (!empty($per_page_code)) {
    echo $per_page_code;
}
echo "\n<!-- End of Weaver options -->\n";
?>
</head>

<body <?php 
body_class();
?>
>
<?php 
if (!weaver_getopt_checked('ttw_header_first')) {