The MU forums have moved to WordPress.org

Allow blog owners to upload header image (7 posts)

  1. lindsayanng
    Member
    Posted 13 years ago #

    Ok.. so i found this:
    http://wpmututorials.com/how-to/giving-your-users-changeable-custom-headers/

    and this:
    http://mu.wordpress.org/forums/topic/13723?replies=24

    I have tried everything possible to get this to work. I have 3 templates that I would like it to work with but for some odd reason, it just is NOT working. I have already gone through the thread and checked everything out as far as common problems.

    The weirdest thing is that I am not seeing anything in my error logs so I am REALLY at a loss here!

    Here is MY version of the code given:

    //make changeable header
    define('HEADER_TEXTCOLOR', '');
    define('HEADER_IMAGE', 'images/header.gif'); // %s is theme dir uri and image filename
    define('HEADER_IMAGE_WIDTH', 985);  // make sure these values match the theme header
    define('HEADER_IMAGE_HEIGHT', 200);
    define( 'NO_HEADER_TEXT', true );
    
    function blue-business-10_admin_header_style() {   // change atypxmas to your theme name
    ?>
    
    // this part adds the header in the admin area
    #headimg {
    height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
    width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
    }
    
    #headimg h1, #headimg #desc {
    display: none;}
    }
    
    function header_style() {
    ?>
    
    #header{
    background: url(<?php header_image() ?>) no-repeat;}
    }
    <?php
    add_custom_image_header(’header_style’, ‘blue-business-10_admin_header_style’);  // change atypxmas
    ?>

    Now, I could possibly have the wrong name for the theme (not really sure which name it is refering to) but I have tried this with one single word theme and one multi-word theme.. NOTHING..

    the lack of an error is what is truly bothering me though.. usually I can hack my way to an answer using errors, but theres a whole lot of nothing going on here

  2. lindsayanng
    Member
    Posted 13 years ago #

    ahh shit.. it seems that whatever i did to my htaccess file effed up my file paths for uploaded images
    SEE HERE

    The only images missing are the two at the bottom that were uploaded using the wordpress image uploader

  3. andrea_r
    Moderator
    Posted 13 years ago #

    Does your theme has the #headimg { div in the header.php? They have to match.

  4. lindsayanng
    Member
    Posted 13 years ago #

    yes, I made the adjustments to the theme before adding that code

  5. andrea_r
    Moderator
    Posted 13 years ago #

    You don't change it in the theme, you change the code to match the theme.

  6. lindsayanng
    Member
    Posted 13 years ago #

    I'm sorry.. that's what I mean.. saying I changed the theme NAME in your code to display mine. Also changed the theme a little because it was using a background image as an image and I knew that wouldn't really work for your addon so I had to change things around a little in the header in general.

  7. lindsayanng
    Member
    Posted 13 years ago #

    Any thoughts as to what happened to the file path for those uploaded images???

About this Topic

  • Started 13 years ago by lindsayanng
  • Latest reply from lindsayanng