Slider size

resolved (18 posts) (4 voices)

  1. tjcameron
    Member

    Hello -
    When I reduce the size of the slider width and adjust the slider images accordingly, the images autosize to the default slider size. Is there a autosize script or something causing this to happen?

    Even if I upload a image with a narrower width than the default slider width, the image expands... see attached screen shot.

    Also, I changed colors of the cufon font for the headers... but only H1, H2, & H3 changed..

    thanks for the help.

    Attachments

    1. Screen_shot_2011-03-21_at_3.00.53_PM.jpg (73.3 KB, 10 downloads) 1 year old
    Posted 1 year ago #
  2. Elliott
    Support

    Hello tjcameron,

    Open up /wp-content/themes/awake/lib/functions/sliders.php and on lines 51 - 54 you can find where the images are being resized,

    if (($$slider_stage == "floating_slide") || ($$slider_stage == "staged_slide")){$img_height=350; $img_width=900;}
    if ($$slider_stage == "partial_staged_slide"){$img_height=334; $img_width=567;}
    if ($$slider_stage == "partial_gradient_slide"){ $img_height=344; $img_width=510;}
    if ($$slider_stage == "full_slide"){$img_height=420; $img_width=980;}

    Lines 171 - 174 if you are using the tabbed slider. Just play around with the width and height and the images should be resized.

    As for the Cufon colors see this thread, http://mysitemyway.com/support/topic/tutorial-using-cufon?message=support-forums-topic-status-updated.

    Let us know if this works for you tjcameron.

    Posted 1 year ago #
  3. tjcameron
    Member

    I was able to change the slider size and the slider works normal for slides already setup. When I try to add a new slide and then save it, my browser refreshes to this message:

    Warning: Cannot modify header information - headers already sent by (output started at /home1/tjcamero/public_html/newblog/wp-content/themes/awake/lib/functions/sliders.php:1) in /home1/tjcamero/public_html/newblog/wp-content/themes/awake/lib/admin/admin-interface.php on line 466

    Posted 1 year ago #
  4. Elliott
    Support

    When you edit your PHP files make sure that there are no spaces or blank lines at the beginning or end of your file.

    Go ahead and check those two files to make sure you did not leave any spaces before or after the <?php ?> tags.

    Posted 1 year ago #
  5. tjcameron
    Member

    Didn't find any spaces... even though I get the warning message, the slider images still loads and works correctly...

    Posted 1 year ago #
  6. tjcameron
    Member

    Actually, now anytime I update my blog, I am getting warnings:

    Warning: Cannot modify header information - headers already sent by (output started at /home1/tjcamero/public_html/newblog/wp-content/themes/awake/lib/functions/sliders.php:1) in /home1/tjcamero/public_html/newblog/wp-includes/pluggable.php on line 890

    That was given when I posted to the blog

    Posted 1 year ago #
  7. tjcameron
    Member

    My slider is now below the homepage content: http://tjcameron.net/newblog/

    I attached my sliders.php file

    Posted 1 year ago #
  8. tjcameron
    Member

    Couldn't upload php file so I posted code below:

    <?php
    /**
    * Functions to Output Header Slider
    *
    */

    /**
    * webtreats_fading_header_slider() - outputs HTML for fading header slider
    *
    */
    function webtreats_fading_header_slider(){
    global $shortname, $homepage_slider_source;

    if($homepage_slider_source == 'custom'){
    $get_options = get_option($shortname.'_slider_settings');
    }

    if($homepage_slider_source == 'categories'){
    $get_options = webtreats_category_slider();
    $number = $get_options['counter']+1; $numbers = range(1,$number);
    }

    if(get_option($shortname.'_slider_settings') == false) { $get_options = webtreats_preview_slider(); }

    foreach ($get_options as $key => $value ) {
    if ( preg_match("/(fading_slider_)/i", $key) ) {
    $$key = $value;
    }
    }

    if($homepage_slider_source == 'custom'){
    $number = $fading_slider_count; $numbers = range(1,$number);
    }

    $out .= '<div id="webtreats_fading_slider">';
    $out .= '<div id="loading_slider"></div>';
    $out .= '<div class="fading_slides noscript">';

    $counter = 0;
    foreach ($numbers as $number) {

    $slider_img = 'fading_slider_url_' . $counter;
    $slider_link = 'fading_slider_link_' . $counter;
    $slider_title = 'fading_slider_title_' . $counter;
    $slider_stage = 'fading_slider_stage_' . $counter;
    $slider_desc = 'fading_slider_desc_' . $counter;
    $slider_btn = 'fading_slider_btn_' . $counter;
    $disable_text = 'fading_slider_text_disable_' . $counter;

    if (($$slider_stage == "floating_slide") || ($$slider_stage == "staged_slide")){$img_height=350; $img_width=900;}
    if ($$slider_stage == "partial_staged_slide"){$img_height=334; $img_width=567;}
    if ($$slider_stage == "partial_gradient_slide"){ $img_height=344; $img_width=510;}
    if ($$slider_stage == "full_slide"){$img_height=300; $img_width=980;}

    $img_resize = webtreats_image_resize($img_height, $img_width, $$slider_img);

    $out .= '<div class="single_fading_slide ' .$$slider_stage. '">';

    if($$slider_img){

    if(preg_match_all('!.+\.(?:jpe?g|png|gif)!Ui',$$slider_img,$matches)){
    if($$slider_link){
    $out .= '<div class="positioning"><span class="rm_slider_img"><img alt="" class="single_slide_image" src="' .$img_resize. '" /></span></div>';
    }else{
    $out .= '<div class="positioning load_slider_img"><span class="rm_slider_img"><img alt="" class="single_slide_image" src="' .$img_resize. '" /></span></div>';
    }
    }

    if(preg_match_all('#http://(www.vimeo|vimeo)\.com(/|/clip:)(\d+)(.*?)#i',$$slider_img,$matches)){

    $img_width +=1;

    $slider_video = '[vimeo framed="0" height="' .$img_height. '" width="' .$img_width. '"]' .$$slider_img. '[/vimeo]';
    $out .= '<div class="positioning" style="width:' .$img_width. 'px;">' .do_shortcode($slider_video). '</div>';
    }

    if(preg_match( '#http://(www.youtube|youtube|[A-Za-z]{2}.youtube)\.com/(.*?)#i', $$slider_img, $matches )){

    $img_width +=1;

    $slider_video = '[youtube framed="0" height="' .$img_height. '" width="' .$img_width. '"]' .$$slider_img. '[/youtube]';
    $out .= '<div class="positioning" style="width:' .$img_width. 'px;">' .do_shortcode($slider_video). '</div>';
    }

    }

    if( (!$$disable_text && $$slider_desc) || ($$slider_title) ){
    $out .= '<div class="slider_content">';
    if($$slider_title){
    $slider_title = stripslashes($$slider_title);
    $out .= '<h2 class="slider_title">' .do_shortcode($slider_title). '</h2>';
    }

    if($$slider_desc){
    $slider_desc = stripslashes($$slider_desc);
    $out .= '<p>' .do_shortcode($slider_desc). '</p>';
    }

    if($$slider_link && !$$slider_btn){ $out .= '<p><span>Read More</span></p>'; }
    $out .= '</div>';
    }

    $out .= '</div>';

    $counter++;
    }

    $out .= '</div><!-- fading_slides -->';

    $one_slide = ($number == 1) ? ' noscript' : '';

    $out .= '<div class="slidetabs' .$one_slide. '">';

    foreach ($numbers as $number) { $out .= ''; $counter++; }

    $out .= '</div><!-- slidetabs -->
    </div><!-- webtreats_fading_slider -->';

    echo $out;
    }

    /**
    * webtreats_tabbed_header_slider() - outputs HTML for tabbed header slider
    *
    */
    function webtreats_tabbed_header_slider(){
    global $shortname, $homepage_slider_source;

    if($homepage_slider_source == 'custom'){
    $get_options = get_option($shortname.'_slider_settings');
    }

    if($homepage_slider_source == 'categories'){
    $get_options = webtreats_category_slider();
    $number = $get_options['counter']+1; $numbers = range(1,$number);
    }

    foreach ($get_options as $key => $value ) {
    if ( preg_match("/(tabbed_slider_)/i", $key) ) {
    $$key = $value;
    }
    }

    if($homepage_slider_source == 'custom'){
    $number = $tabbed_slider_count; $numbers = range(1,$number);
    }

    $out .= '<div id="loading_slider" style="position:absolute;"></div>';
    $out .= '<div id="webtreats_tabbed_slider">';
    $out .= '<div id="tabbed_slides">';

    $counter = 0;
    foreach ($numbers as $number) {

    $slider_img = 'tabbed_slider_url_' . $counter;
    $slider_link = 'tabbed_slider_link_' . $counter;
    $slider_title = 'tabbed_slider_title_' . $counter;
    $slider_stage = 'tabbed_slider_stage_' . $counter;
    $slider_desc = 'tabbed_slider_desc_' . $counter;
    $slider_btn = 'tabbed_slider_btn_' . $counter;
    $disable_text = 'tabbed_slider_text_disable_' . $counter;

    if (($$slider_stage == "floating_slide") || ($$slider_stage == "staged_slide")){$img_height=350; $img_width=900;}
    if ($$slider_stage == "partial_staged_slide"){$img_height=334; $img_width=567;}
    if ($$slider_stage == "partial_gradient_slide"){ $img_height=344; $img_width=510;}
    if ($$slider_stage == "full_slide"){$img_height=300; $img_width=980;}

    $img_resize = webtreats_image_resize($img_height, $img_width, $$slider_img);

    $out .= '<div class="single_tabbed_slide ' . $$slider_stage . ' noscript" style="z-index:1000;">';

    if($$slider_img){

    if(preg_match_all('!.+\.(?:jpe?g|png|gif)!Ui',$$slider_img,$matches)){
    if($$slider_link){
    $out .= '<div class="positioning"><span class="rm_slider_img"><img alt="" class="single_slide_image" src="' .$img_resize. '" /></span></div>';
    }else{
    $out .= '<div class="positioning load_slider_img"><span class="rm_slider_img"><img alt="" class="single_slide_image" src="' .$img_resize. '" /></span></div>';
    }
    }

    if(preg_match_all('#http://(www.vimeo|vimeo)\.com(/|/clip:)(\d+)(.*?)#i',$$slider_img,$matches)){

    $img_width +=1;

    $slider_video = '[vimeo framed="0" height="' .$img_height. '" width="' .$img_width. '"]' .$$slider_img. '[/vimeo]';
    $out .= '<div class="positioning" style="width:' .$img_width. 'px;">' .do_shortcode($slider_video). '</div>';
    }

    if(preg_match( '#http://(www.youtube|youtube|[A-Za-z]{2}.youtube)\.com/(.*?)#i', $$slider_img, $matches )){

    $img_width +=1;

    $slider_video = '[youtube framed="0" height="' .$img_height. '" width="' .$img_width. '"]' .$$slider_img. '[/youtube]';
    $out .= '<div class="positioning" style="width:' .$img_width. 'px;">' .do_shortcode($slider_video). '</div>';
    }

    }

    if( (!$$disable_text && $$slider_desc) || ($$slider_title) ){
    $out .= '<div class="slider_content">';
    if($$slider_title){
    $slider_title = stripslashes($$slider_title);
    $out .= '<h2 class="slider_title">' .do_shortcode($slider_title). '</h2>';
    }

    if($$slider_desc){
    $slider_desc = stripslashes($$slider_desc);
    $out .= '<p>' .do_shortcode($slider_desc). '</p>';
    }

    if($$slider_link && !$$slider_btn){ $out .= '<p><span>Read More</span></p>'; }
    $out .= '</div>';
    }

    $out .= '</div>';

    $counter++;
    }

    $out .= '</div><!-- tabbed_slides -->';

    $out .= '<div class="clearboth"></div><!-- required for IE6/IE7 -->';

    $out .= '<div id="thumbs" class="t noscript">';

    $out .= '<div class="navi">';

    $counter = 0;
    foreach ($numbers as $number) {

    $slider_thumb = 'tabbed_slider_url_' . $counter;

    if(preg_match_all('!.+\.(?:jpe?g|png|gif)!Ui',$$slider_thumb,$matches)){
    $slider_thumb = $$slider_thumb;
    }else{
    $slider_thumb = get_template_directory_uri() .'/styles/_shared/default_movie_thumb_small.png';
    }

    $active = ($counter == 0) ? ' active' : '';

    $out .= '<img alt="" class="fade_hover" src="' .webtreats_image_resize($img_height=45, $img_width=64, $slider_thumb). '" />';

    $counter++;

    }

    $out .= '</div><!-- navi -->';

    $out .= '</div><!-- thumbs -->';

    $out .= '</div><!-- webtreats_tabbed_slider -->';

    echo $out;

    }

    /**
    * webtreats_category_slider() - retrieves post meta for category slider
    *
    */
    function webtreats_category_slider(){
    global $post, $wpdb, $homepage_slider, $homepage_slider_source, $slider_showcats, $slider_count;
    $slider_settings = array();
    $counter = 0;

    $cat_slider_query = new WP_Query("cat=$slider_showcats&showposts=$slider_count");

    if($cat_slider_query->have_posts()) : while($cat_slider_query->have_posts()) : $cat_slider_query->the_post();

    $custome_image = get_post_meta($post->ID, 'frontpage_image', true);
    $stage_effect = get_post_meta($post->ID, 'frontpage_stage', true);
    $disable_text = get_post_meta($post->ID, 'frontpage_disable_text', true);

    $slider_settings[$homepage_slider.'_slider_url_'.$counter] = $custome_image;
    $slider_settings[$homepage_slider.'_slider_link_'.$counter] = get_permalink($post->ID);
    $slider_settings[$homepage_slider.'_slider_title_'.$counter] = the_title( $before, $after, $display=false);
    $slider_settings[$homepage_slider.'_slider_desc_'.$counter] = webtreats_excerpt(200, ' ... ');
    $slider_settings[$homepage_slider.'_slider_stage_'.$counter] = $stage_effect;
    $slider_settings[$homepage_slider.'_slider_text_disable_'.$counter] = $disable_text;

    $slider_settings['counter'] = $counter;

    $counter++;

    endwhile; endif;

    wp_reset_query();

    return $slider_settings;
    }

    /**
    * webtreats_preview_slider() - slider images for WordPress theme preview on 1st time activation
    *
    */
    function webtreats_preview_slider(){

    $options_slider = array(

    "fading_slider_count" => 5,

    "fading_slider_url_0" => WEBTREATS_IMAGES . "/sliders/default_floating_slide.jpg",
    "fading_slider_link_0" => "",
    "fading_slider_title_0" => "",
    "fading_slider_stage_0" => "staged_slide",
    "fading_slider_desc_0" => "",

    "fading_slider_url_1" => WEBTREATS_IMAGES . "/sliders/default_partial_staged_slide.jpg",
    "fading_slider_link_1" => "http://memamw.me",
    "fading_slider_title_1" => "Partial Staged Efffect",
    "fading_slider_stage_1" => "partial_staged_slide",
    "fading_slider_desc_1" => "To easily create this slide effect simply choose 'Partial Staged' in the homepage slider settings and your image will be cropped and framed for you. ",

    "fading_slider_url_2" => WEBTREATS_IMAGES . "/sliders/default_partial_gradient_slide.jpg",
    "fading_slider_link_2" => "http://memamw.me",
    "fading_slider_title_2" => "Partial Gradient Efffect",
    "fading_slider_stage_2" => "partial_gradient_slide",
    "fading_slider_desc_2" => "To easily create this slide effect simply choose 'Partial Gradient' in the homepage slider settings and your image will be cropped and framed for you. ",

    "fading_slider_url_3" => WEBTREATS_IMAGES . "/sliders/default_floating_slide.jpg",
    "fading_slider_link_3" => "",
    "fading_slider_title_3" => "",
    "fading_slider_stage_3" => "floating_slide",
    "fading_slider_desc_3" => "",

    "fading_slider_url_4" => WEBTREATS_IMAGES . "/sliders/default_full_slide.jpg",
    "fading_slider_link_4" => "",
    "fading_slider_title_4" => "",
    "fading_slider_stage_4" => "full_slide",
    "fading_slider_desc_4" => "",

    );

    return $options_slider;
    }

    /**
    * webtreats_header_slider_switcher() - switches header slider
    *
    * @param string $homepage_slider name of slider selected
    */
    function webtreats_header_slider_switcher($homepage_slider){

    if($homepage_slider == 'fading'){
    webtreats_fading_header_slider();
    }

    if($homepage_slider == 'tabbed'){
    webtreats_tabbed_header_slider();
    }

    }

    ?>

    Posted 1 year ago #
  9. Elliott
    Support

    You most likely have a typo or a blank line in one of your php files. Go ahead and download a fresh copy of Awake 1.3 and copy over the "lib" folder to your server to overwrite the old one.

    Make sure to completely delete the "lib" directory from your server before uploading the fresh copy.

    Posted 1 year ago #
  10. tjcameron
    Member

    H4, H5, & H6 still isn't changing colors http://tjcameron.net/newblog/
    I've changed all color settings I see... any ideas?

    Thank you

    Posted 1 year ago #
  11. Elliott
    Support

    Hello tjcameron,

    I just wanted to make sure that you took a look at this thread, http://mysitemyway.com/support/topic/tutorial-using-cufon?message=support-forums-topic-status-updated, as suggested in my previous post.

    You need to take off the linear gradient for the H3's. You should be able to switch the H4, and H5 color regardless. How are you changing the colors?

    If it is a specific element you are trying to change then take a screenshot and highlight it. I took a look at your page but it appears to have undergone quite a bit of customization.

    Posted 1 year ago #
  12. tjcameron
    Member

    I did look at the thread. I'm not sure what I'm missing. I've attached a screen shot of my code and custom color code is #ff8700.

    Attachments

    1. Screen_shot_2011-03-23_at_7.09.32_AM.jpg (102.1 KB, 4 downloads) 1 year old
    Posted 1 year ago #
  13. Elliott
    Support

    You need to place a "#" before your color code like this, #ff8700. But it would probably be best to leave the color code off and just style it with CSS by adding this line in the bottom of your style.css file,

    h3 { color: #ff8700; }

    If that does not work for you then go ahead and let us know exactly which element on your page you are wanting to change. Sometimes even though it is an h3 it will have a class or ID that is overwriting the style.

    Posted 1 year ago #
  14. tjcameron
    Member

    Oops! I missed the "#" but it was still reading the color correctly. I think I'd like to leave H1, H2, & H3 as is, but I'd like H4, H5 & H6 in black - #000000. Is that possible?

    Thanks again for all the help

    Posted 1 year ago #
  15. Elliott
    Support

    Add this line in your style.css file,

    h4, h5, h6 { color: black !important; }

    If that does not work then if possible take a screenshot of the area you are wanting to change so we can get a better idea.

    Posted 1 year ago #
  16. I know this is an old thread, but how do you change the auto image resizing for the slider on the latest version of Awake? I tried to find the line of code mentioned in the second post of this thread, but the latest version of code does not have the pixel dimensions for the images.

    Posted 6 months ago #
  17. Nevermind, found the solution digging through the files. For those of you with the same issue, open up the framework.php look around line 418 to 426 and you'll be able to edit the auto resize settings for the slider.

    Posted 6 months ago #
  18. Ruderic
    Support

    Hello kyleamorgan,

    Take a look at this guide for more information about this customization: http://mysitemyway.com/docs/index.php/Changing_Slider_Dimensions

    Posted 6 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme