Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Multisite »

Multisite header images array atahualpa376


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Apr 27, 2012, 12:34 PM
Aubergine's Avatar
Aubergine
 
15 posts · Sep 2009
Maryville, TN
With WP MultiSite, bfa_m_find_in_dir.php appears to create a header image array that includes every folder and file in blogs.dir/n/files/ for subsites, and in wp-content/uploads/ for the primary site.

This behavior is the same whether header images are placed directly in the files folder, or uploaded via Media Manager (according to the new instructions). It does this with a single header image file as well as multiple image files, rotated or not. (Yes, files that reference /wpmu-settings.php were changed to /wp-includes/ms-settings.php and I also tried using is_multisite(), with same results.)

If rotated with Javascript, the #header background image url will list files that don't fit the pattern, atahualpa_header_x.ext, but the rotated files in ul/list-items may be correct.

If using a single header image, or multiple images not rotated with Javascript, incorrect images with filenames that don't fit the pattern, atahualpa_header_x.ext will be displayed in the rotation. Images on the primary site will always be incorrect.

With a single-site installation, version 3.7.6 works fine. I rolled back from 376 to 367 on multisite, except for a test web with no plugins. If you paste the 376 bfa_m_find_in_dir.php contents into the 367 version on a multisite that's working fine, you can also replicate the problem.

I've been using Atahualpa for several years and this is the first time I've had a serious problem, so I'm optimistic about a fix.

Last edited by Aubergine; Apr 27, 2012 at 12:44 PM.
  #2  
Old Sep 18, 2012, 03:30 PM
jeffvand
 
4 posts · Sep 2012
Did you ever find a solution to this one? I am having the same problem after my update to 3.4.2 to my multisite network today. Would love to find a header solution that works for folks on a multisite network!
  #3  
Old Sep 18, 2012, 03:36 PM
jeffvand
 
4 posts · Sep 2012
Here is a post on wordpress.org that explains the problem as well: http://wordpress.org/support/topic/t...ages?replies=2
  #4  
Old Sep 18, 2012, 03:40 PM
jeffvand
 
4 posts · Sep 2012
Sorry for all the links. Here is one other that might help:

http://alantait.net/2011/01/13/wordp...-multisite-wp/

This was for an earlier version. It was working for me, but now that I upgraded to 3.4.2 it is not working either any more. Wonder if that branch is about done.
  #5  
Old Oct 4, 2012, 02:22 PM
ctrl-alt-esc
 
2 posts · Feb 2011
I just updated to 3.7.9 and also hit this issue.

I found several problems in the functions/bfa_m_find_inDir.php file. Replace the contents of that file with the following code for the fix:

PHP Code:
<?php
function bfa_m_find_in_dir$root$pattern$recursive true$case_sensitive false ) {
    
$result = array();
    if( 
$case_sensitive ) {
        if( 
false === bfa_m_find_in_dir__$root$pattern$recursive$result )) {
            return 
false;
        }
    } else {
        if( 
false === bfa_m_find_in_dir_i__$root$pattern$recursive$result )) {
            return 
false;
        }
    }
    return 
$result;
}

/**
 * @access private
 */
function bfa_m_find_in_dir__$root$pattern$recursive, &$result ) {
    
$dh = @opendir$root );
    if( 
false === $dh ) {
        return 
false;
    }
    while( 
$file readdir$dh )) {
        if( 
"." == $file || ".." == $file ){
            continue;
        }
//              Note: ereg() is depreciated in php 5.3
//      if( false !== @ereg( $pattern, "{$root}/{$file}" )) {
        
if( == @preg_match'/'.$pattern.'/'"{$root}/{$file}" )) {
            
$result[] = "{$root}/{$file}";
        }
        if( 
false !== $recursive && is_dir"{$root}/{$file}" )) {
            
bfa_m_find_in_dir__"{$root}/{$file}"$pattern$recursive$result );
        }
    }
    
closedir$dh );
    return 
true;
}

/**
 * @access private
 */
function bfa_m_find_in_dir_i__$root$pattern$recursive, &$result ) {
    
$dh = @opendir$root );
    if( 
false === $dh ) {
        return 
false;
    }
    while( 
$file readdir$dh )) {
        if( 
"." == $file || ".." == $file ){
            continue;
        }
//              Note: ergi() is depreciated in php 5.3
//      if( false !== @eregi( $pattern, "{$root}/{$file}" )) {
        
if( == @preg_match'/'.$pattern.'/i'"{$root}/{$file}" )) {
            
$result[] = "{$root}/{$file}";
        }
        if( 
false !== $recursive && is_dir"{$root}/{$file}" )) {
            
bfa_m_find_in_dir_i__"{$root}/{$file}"$pattern$recursive$result );
        }
    }
    
closedir$dh );
    return 
true;
}
?>

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Auto Updating Header Image Loss and Seperate Rotating on MultiSite, MultiNet LANtait Header configuration & styling 2 Jun 8, 2011 11:18 PM
[SOLVED] HOW TO: MultiSite or WP Multi Network: Easy Header Images LANtait Header configuration & styling 26 Jun 8, 2011 11:15 PM
Header Images - One fixed image for Home Page - Rotate all images on all other pages? ClearlyRobert Header configuration & styling 10 Oct 12, 2010 12:12 PM
Array of Comments andreamen Comments, trackbacks & pings 10 Sep 21, 2010 04:38 AM


All times are GMT -6. The time now is 08:33 AM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.