The MU forums have moved to WordPress.org

Themes that allow users to upload their own headers (29 posts)

  1. Farms2
    Member
    Posted 18 years ago #

    How you all doin :)

    So, am starting a new site and trying to find themes that allow users to either:

    - Upload their own headers
    OR
    - Insert new header URLs

    Problem is that many of the themes that allow users to upload their own headers (K2, gluedidias_subtle etc.) do so to the theme folder - so are not WPMU compatible.

    Does anyone have a list of atwo or three themes that are auto-compatible with WPMU and allow users to upload their own headers... Regulus is one that works so far (in terms of inserting a link to an image) but I'd love a few with simple uploads.

    Cheers, James

  2. stutley
    Member
    Posted 18 years ago #

    K2 only needs editing in two lines in order to work properly with MU.

    options\display\headers.php:2 : Use $blog_id to set $path to the current blog's directory in the blogs.dir folder.

    options\display\headers.php:208 : Use get_bloginfo('url') to set the path to the image.

  3. selad
    Member
    Posted 18 years ago #

  4. kahless
    Member
    Posted 18 years ago #

    stutley,

    Can you be a little more explicit? Would it become
    $path = $blog_id . '/images/headers/';
    url('.get_bloginfo('url').'/images/headers/'.$picture.') no-repeat center center;';
    I haven't worked with the built in functions much and I thought the upload would put it in /files/year/month/image.jpg. Are you indicating that upload could create the /images/headers/image.jpg structure in blogs.dir/blog_id? Would this require modification to .htaccess? Thanks.

  5. andrea_r
    Moderator
    Posted 18 years ago #

    I'll secodn Striped Plus and Water. Still have to make that k2 edit though, and I need new skins for it. :-/

  6. stutley
    Member
    Posted 18 years ago #

    Kahless >

    $path = '/your/installations/absolute/path/wp-content/blogs.dir/' . $blog_id . '/files/';

    $pic = 'background: url('.get_bloginfo('url').'/files/'.$picture.') no-repeat center center;

    This will upload the image to the blog's files-folder, which is what I have done on my installation. It should work like a charm unless you have other plugins putting files here ;)

  7. andrea_r
    Moderator
    Posted 18 years ago #

    thanks stutley, I'd been meaning to fix that for ages, and hadn't had time or brainspace for it.

  8. Farms2
    Member
    Posted 18 years ago #

    You're legends guys, mucho appreciated!

  9. dsader
    Member
    Posted 18 years ago #

    Clap clap clap.
    I have a TripleK2.
    Slick trick.

  10. kahless
    Member
    Posted 18 years ago #

    Thanks for the clarification.

  11. kahless
    Member
    Posted 18 years ago #

    Actually I think you can put

    $path = ABSPATH.'/wp-content/blogs.dir/'.$blog_id.'/files/';

    in line 2. I haven't tried it but that is what is used in other places.

  12. stutley
    Member
    Posted 18 years ago #

    Oh... Yeah, that might work :D

  13. drmike
    Member
    Posted 18 years ago #

    I have a TripleK2.

    Should we be hearing that in public? :)

  14. newquest
    Member
    Posted 17 years ago #

    hi stutley and drmike,

    May I know which file you modify to add the following?

    $path = '/your/installations/absolute/path/wp-content/blogs.dir/' . $blog_id . '/files/';

    $pic = 'background: url('.get_bloginfo('url').'/files/'.$picture.') no-repeat center center;

    Cannot seem to find them in K2. Can anyone let me know how to get it working on triple K2?

    Cheers.

  15. drmike
    Member
    Posted 17 years ago #

    Look at the second post in this thread. :)

  16. newquest
    Member
    Posted 17 years ago #

    Sorry, I may be a bit dense, but I there is no options\display\headers.php in the latest version of

    http://getk2.com/download/

    But I found the app/display/options and found these lines,
    Should I modify this?

    // Check that the header path is there
    $is_header_dir = is_dir(K2_HEADERS_PATH);

    // Get the header pictures
    $picture_files = $is_header_dir ? K2::files_scan(K2_HEADERS_PATH, array('gif','jpg','png'), 1) : array();

    Or yes, after trying the nightly version of K2, it seems to work out of the box! But the path is wrong, it uploads to the themes directory.

  17. dsader
    Member
    Posted 17 years ago #

    k2/app/classes/header.php

    class K2Header {
    	function init() {
    		global $blog_id;
    
    		$path = '/home/BLABBITY/public_html/BLAH/wp-content/blogs.dir/' . $blog_id . '/files/';
    
    		define('K2_HEADERS_PATH', $path );
    
    		if (function_exists('add_custom_image_header')) {
    			$scheme_info = get_scheme_info(get_option('k2scheme'));
    			$header_image = get_option('k2header_picture');
    
    			define('HEADER_IMAGE_HEIGHT', empty($scheme_info['header_height'])? 200 : $scheme_info['header_height']);
    			define('HEADER_IMAGE_WIDTH', empty($scheme_info['header_width'])? 780 : $scheme_info['header_width']);
    			define('HEADER_TEXTCOLOR', empty($scheme_info['header_text_color'])? 'ffffff' : $scheme_info['header_text_color']);
    			define('HEADER_IMAGE', empty($header_image)? '%s/images/transparent.gif' : '%s/images/headers/'.$header_image);
    
    			add_custom_image_header(array('K2Header', 'output_header_css'), array('K2Header', 'output_admin_header_css'));
    		} else {
    			add_action('wp_head', array('K2Header', 'output_header_css'));
    		}
    	}
    
    
  18. newquest
    Member
    Posted 17 years ago #

    really appreciate your help dsader,
    but I got this error when I go to the site,
    Checked the file directory and saw the files correctly uploaded in the individual blog user space:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY year(post_date), month(post_date), dayofmonth(post_date]
    SELECT DISTINCT post_date FROM GROUP BY year(post_date), month(post_date), dayofmonth(post_date)

    Fatal error: Call to undefined function: is_active_module() in /home/webadmin/yo.sg/html/wp-content/themes/k2/theloop.php on line 76

  19. dsader
    Member
    Posted 17 years ago #

    I use widgets so I removed the lines from k2 theloop.php:

    delete

    			// Check if to display asides inline or not
    			if (is_home() and is_active_module('asides_sidebar_module')) {
    				$hide_asides = true;
    			} 
  20. newquest
    Member
    Posted 17 years ago #

    thanks,

    think i got rid of the fatal error.

    but the script is still unable to grab the right image as it is in the wrong folder. It is uploading the files to the /files folder instead of the /files/2007/04/ folder. Is there a way to tell it to fetch image from the year month folder?

  21. dsader
    Member
    Posted 17 years ago #

    Nope. wp-admin/options-misc.php will turn off the year-month folders, though.

  22. ala101
    Member
    Posted 17 years ago #

    Hello!
    is there any downloadable link for any theme that allow users to upload their own headers ?
    iam confused with this problem :(

  23. ekusteve
    Member
    Posted 17 years ago #

    Download the Farms Really Big Theme Pack from the link below. There are some very good themes in there and several allow upload of custom headers.

    http://wpmudevorg.wordpress.com/themes.php

    Steve

  24. ala101
    Member
    Posted 17 years ago #

    Thanks a lot Steve!
    I deleted K2 and now uploading this big farm :)

  25. tdcaron1
    Member
    Posted 16 years ago #

    Hi Again this is Tim.

    I'm not sure if this falls along the same topic but I need some help if you don't mind.

    I'm using WPMU on a test website http://101.thejvs.com.
    I went ahead and activated UserThemes and uploaded a copy of theme-edit.php from the current version of wordpress because mu does not have theme-edit.php.

    I've actived a couple of userthemes and started working with the editor.

    When I make the changes say for example (sidebar.php) and click the update button I get the following error:
    ---------------------------------------------------
    Warning: Cannot modify header information - headers already sent by (output started at /wpmu/wp-admin/theme-editor.php:1) in /wpmu/wp-admin/theme-editor.php on line 65
    -----------------------------------------------------

    When I look at the code line # 65 is a follows:
    -----------------------------------------------------
    header("Location: $location");
    exit();
    -----------------------------------------------------
    So i tried to uncomment the line and tried the editor again
    and came up with a blank page.

    In either case the page (sidebar.php) use updated.

    But I had to click the back button on my browser to return to the current page.

    In Wordpress (all versions) after an update was made to a particular page it would bring you back to the same page and let you know that it was updated.

    Is there any way to fix this error.
    Thank You
    Tim

  26. tdcaron1
    Member
    Posted 16 years ago #

    Thanks guys andrea_r found the answer I was looking for.
    Tim

  27. BytesForAll
    Member
    Posted 16 years ago #

    Atahualpa v. 2.2 does this

    http://wordpress.bytesforall.com/?p=56

  28. mypatricks
    Member
    Posted 16 years ago #

  29. burtonkent
    Member
    Posted 16 years ago #

    dsader wrote:
    Nope. wp-admin/options-misc.php will turn off the year-month folders, though.

    I need to turn off the year-month folders, but all I see are options to change the thumbnail size and medium size. My regular WP blogs have a checkbox for disabling/enabling "Organize my uploads into month- and year-based folders".

    Is there any way to get that checkbox back? Thanks.

About this Topic

  • Started 18 years ago by Farms2
  • Latest reply from burtonkent