Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

Multisite header images array atahualpa376


  #1  
Old Apr 27, 2012, 01: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 01:44 PM.
  #2  
Old Sep 18, 2012, 04: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, 04: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, 04: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, 03: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



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 9, 2011 12:18 AM
[SOLVED] HOW TO: MultiSite or WP Multi Network: Easy Header Images LANtait Header configuration & styling 26 Jun 9, 2011 12:15 AM
Header Images - One fixed image for Home Page - Rotate all images on all other pages? ClearlyRobert Header configuration & styling 10 Oct 12, 2010 01:12 PM
Array of Comments andreamen Comments, trackbacks & pings 10 Sep 21, 2010 05:38 AM


All times are GMT -6. The time now is 04:48 PM.


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