Featured Content Gallery | WordPress Plugin | iePlexus

Getting it to work in Wordpress MU

New releases, ideas for the future, and known issues

Re: Getting it to work in Wordpress MU

PostBy volkoff007 on Tue Nov 24, 2009 5:59 pm

I still cannot get this to work on WPMU 2.8.1 (I hope to upgrade soon)

I applied the changes mentioned here, and had to deal with redirect issues before that. For some reason, going to the options page in Admin would throw a 500 error up, which was really this:

The requested URL /wp-admin/featured-content-gallery/options.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Obviously, wp-admin/featured-content-gallery/options.php DOESN'T exist, but I don't know why it even looked there. To try to work around it, I copied the entire fcg directory from plugins into the wp-admin folder. Finally it was able to access the options page, but gives this error:

Call to undefined function: settings_fields() in /public_html/wp-admin/featured-content-gallery/options.php on line 14

I'm guessing it doesn't know of those functions because it's running from the wp-admin folder. Any ideas?
volkoff007
 
Posts: 1
Joined: Tue Nov 24, 2009 5:56 pm

Re: Re: Getting it to work in Wordpress MU

Thank you for using the Featured Content Gallery Forum
 

Re: Getting it to work in Wordpress MU

PostBy CI@Wham on Tue Apr 27, 2010 8:56 am

I could also not get either solution to work. Currently I see the FCG on my home page but have the infamous empty white box.

Image

Website is http://ci.siu.edu/specialty/ec

I have since undone both solutions thinking that maybe my problem is not caused by using WPMU but by something else. I have inserted the custom code articleimg on each of the 5 posts that I want to use. I have also deactivated every plug-in except fcg.

Could somebody at least let me know if my problem is wpmu related or something I am doing wrong?
CI@Wham
 
Posts: 2
Joined: Tue Apr 27, 2010 8:40 am

Re: Getting it to work in Wordpress MU

PostBy fuzzie on Wed Aug 18, 2010 8:20 pm

We have FFG working on MU...with this magic code in the theme:
Code: Select all
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage==$currentpage) {
    include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
   
}

But this only solves the issues of it not working anywhere...it doesn't allow for multiple blogs to run it (because the sub-blogs use the same theme).
Has anyone got it to work on multiple blogs?
fuzzie
 
Posts: 5
Joined: Wed Jul 28, 2010 7:34 pm

SOLVED: Getting it to work in Wordpress MU

PostBy fuzzie on Wed Aug 18, 2010 9:01 pm

We solved this by:
Code: Select all
<?php
$currentpage = $_SERVER['REQUEST_URI'];
if($currentpage=='/' || $currentpage=='/BLOG2/' || $currentpage=='/BLOG14hvsr/' || $currentpage=='/BLOG35/' ) {
    include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}

?>

I tried the is_plugin_active statement, but that doesn't exist in WP3.0.1 as far as I can find.
So we did an if this or that or that2 or that3, etc, show FCC else don't.
Works like a charm!
fuzzie
 
Posts: 5
Joined: Wed Jul 28, 2010 7:34 pm

BETTER FIX: Getting it to work in Wordpress MU

PostBy fuzzie on Thu Aug 19, 2010 7:10 am

Easier to understand code:
Code: Select all
<?php
// Featured Gallery Fix
$currentpage = $_SERVER['REQUEST_URI'];
switch ($currentpage) {
  case "/":
  case "/BLOG2/":
  case "/BLOG14/":
  case "/BLOG32/":
    include(ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
    break;
}
// end Featured Gallery Fix
?>
fuzzie
 
Posts: 5
Joined: Wed Jul 28, 2010 7:34 pm

Re: Getting it to work in Wordpress MU

PostBy temporary_saint on Wed Aug 25, 2010 7:02 am

Hi Fuzzie - this is great news as I've built a site template that includes FCG and will need to re-use it in a number of places in a wordpress multisite install.

Please excuse my newbie-ness, but where in the plugin file would I drop this code (and in which file)?

As well, is BLOG 2, BLOG3, etc. a standard naming structure? So all I'd need to do is update those lines to whichever blogs will be using the FCG right?

case "/BLOG2/":
case "/BLOG14/":
case "/BLOG32/":

Cheers and thank you :)
temporary_saint
 
Posts: 2
Joined: Wed Aug 25, 2010 6:57 am

Re: Getting it to work in Wordpress MU

PostBy fuzzie on Wed Aug 25, 2010 7:09 am

It goes in your main index.php file under your theme directory, right before the loop starts.
fuzzie
 
Posts: 5
Joined: Wed Jul 28, 2010 7:34 pm

Re: Getting it to work in Wordpress MU

PostBy temporary_saint on Wed Aug 25, 2010 12:03 pm

HI Fuzzie - thanks for the quick reply. I don't mean to sound *too* foolish but the index.php file in the themes directory have always just been blank files. Why would there be a loop in that file? Is this meant for the index.php file in the root directory for the main wordpress install?

Cheers!
dale
temporary_saint
 
Posts: 2
Joined: Wed Aug 25, 2010 6:57 am

Previous

Return to Development, Improvement, and Conflicts

Who is online

Users browsing this forum: No registered users and 0 guests