Featured Content Gallery | WordPress Plugin | iePlexus

Feature Request: WordPress MU Support

New releases, ideas for the future, and known issues

Feature Request: WordPress MU Support

PostBy anewpress on Tue Jan 27, 2009 6:44 am

Let me cast a vote for FCG to support WordPress MU. The previous version (prior to iePlexus) failed at the "options" screen.
anewpress
 
Posts: 7
Joined: Sun Jan 25, 2009 10:58 am

Re: Feature Request: WordPress MU Support

Thank you for using the Featured Content Gallery Forum
 

Re: Feature Request: WordPress MU Support

PostBy Kris Themstrup on Tue Jan 27, 2009 1:25 pm

Noted. Although we want WPMU support, I can't give a date on it. On the list though.
Kris Themstrup
 
Posts: 518
Joined: Fri Jan 16, 2009 1:46 pm
Location: Seattle, WA

Re: Feature Request: WordPress MU Support

PostBy coreone on Mon Feb 09, 2009 8:06 am

Hello,
I had a need to get FCG running on WPMU, so I did some digging and found the following post on the WPMU site:

http://mu.wordpress.org/forums/topic.php?id=9210

Following the generic directions there, I made a patch for FCG to make it work with WPMU. Although I haven't tested it extensively, the options section does now appear to function correctly in WPMU. The code below is the diff between 3.1.0 downloaded from the Install & Setup section and what I changed to get it to work with WPMU:

Code: Select all
--- content-gallery/content-gallery.php.old     2009-02-09 10:52:33.000000000 -0500
+++ content-gallery/content-gallery.php 2009-02-09 10:52:33.000000000 -0500
@@ -101,7 +101,23 @@
                setup_postdata($post);
}

+function fcg_alter_whitelist_options($whitelist) {
+  if(is_array($whitelist)) {
+    $option_array = array('featured_content_gallery' =>
+                         array('gallery-width','gallery-height',
+                               'gallery-info','gallery-items',
+                               'gallery-border-color','gallery-bg-color',
+                               'gallery-text-color',
+                               'gallery-use-featured-content',
+                               'gallery-use-thumb-image','gallery-way',
+                               'gallery-items-pages','gallery-category'));
+    $whitelist = array_merge($whitelist,$option_array);
+  }
+  return $whitelist;
+}
+
/* we want to add the above xhtml to the header of our pages: */
add_action('wp_head', 'gallery_styles');
add_action('admin_menu', 'gallery_options_page');
-?>
\ No newline at end of file
+add_filter('whitelist_options','fcg_alter_whitelist_options');
+?>
--- content-gallery/options.php.old     2009-02-09 10:52:33.000000000 -0500
+++ content-gallery/options.php 2009-02-09 10:53:21.000000000 -0500
@@ -8,7 +8,13 @@
     Visit the <a href="http://www.featuredcontentgallery.com">Featured Content Gallery Plugin</a> website for more information.</p>

     <div style="margin-left:0px;">
-    <form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?>
+    <form method="post" action="options.php">
+<?php
+    if(function_exists('wpmu_create_blog'))
+      wp_nonce_field('featured_content_gallery-options');
+    else
+      wp_nonce_field('update-options');
+?>
                <fieldset name="general_options" class="options">

         Gallery Width in Pixels:<br />
@@ -119,6 +125,7 @@
         </div><br />
                 
         <input type="hidden" name="action" value="update" />
+        <input type="hidden" name="option_page" value="featured_content_gallery" />
         <input type="hidden" name="page_options" value="gallery-width,gallery-height,gallery-info,gallery-items,gallery-border-color,gallery-bg-color,gallery-text-color,gallery-use-featured-content,gallery-use-thumb-image,gallery-way,gallery-items-pages,gallery-category" />

                </fieldset>


I have also added an attachment of the patch if anyone needs it. As I said, I have only done very basic testing on this and verified that settings are saved. I have not tested this completely to see if there are possibly other WPMU-specific bugs that effect the operation of the plugin.
Attachments
wpmu-plugin-featured-content-gallery-wpmu.patch.bz2
WPMU patch file
(961 Bytes) Downloaded 185 times
coreone
 
Posts: 1
Joined: Mon Feb 09, 2009 7:58 am

Re: Feature Request: WordPress MU Support

PostBy anewpress on Mon Feb 09, 2009 8:13 am

Thanks! I hope the FCG "powers that be" read your post and integrate the patch in an upcoming version. After using WPMU for months and enjoying the added graphic splash of an image gallery, it would be hard to choose one or the other.
anewpress
 
Posts: 7
Joined: Sun Jan 25, 2009 10:58 am

Re: Feature Request: WordPress MU Support

PostBy Kris Themstrup on Mon Feb 09, 2009 3:46 pm

The "powers that be" appreciate the patch :) - we'll take a look and see what we can do for WPMU support. It's definitely on our list. In the meantime, anyone else have success with this?
Kris Themstrup
 
Posts: 518
Joined: Fri Jan 16, 2009 1:46 pm
Location: Seattle, WA

Re: Feature Request: WordPress MU Support

PostBy michale on Mon Mar 02, 2009 6:42 pm

Hello,

this is my first wp/wpmu setup ever, so please excuse me, when there is something wrong ;)

I changed/added the following in wp-content/plugins/featured-content-gallery/options.php to pass the check_admin_referer/whitelist section in wp-admin/options.php successfully

old:
Code: Select all
   
<form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?>
<fieldset name="general_options" class="options">


new:
Code: Select all
   
<form method="post" action="options.php"><?php wp_nonce_field('options-options'); ?>
<fieldset name="general_options" class="options">
<input type="hidden" name="option_page" value="options" />


Now the settings are stored and displayed correctly. Now I’m to test it working with categories and images ...
michale
 
Posts: 3
Joined: Mon Mar 02, 2009 6:22 pm

Re: Feature Request: WordPress MU Support

PostBy TimRWC on Fri Mar 20, 2009 9:07 am

Nevermind, I got the dynamic-content-gallery to work! Thanks,

previous post:
Hello, I tried the patch and it makes my entire blog disappear. Can you tell me what code to put into what .php file for FCG to work on WPMU? I have the options set, but I'm getting a blank black framed box at the top of my page where the FCG should be. Am I missing something? Thanks, pretty new to this WPMU stuff. :) I downloaded 3.2 version of FCG plugin, by-the-way. And I'm using WPMU 2.6.3.

URL is http://assurx.white.navpoint.com/wpmu/

I've tried deactivating the plugins too and all I get is the empty box at the top of the homepage.
TimRWC
 
Posts: 1
Joined: Fri Mar 20, 2009 9:04 am

Re: Feature Request: WordPress MU Support

PostBy Dace on Thu Mar 26, 2009 12:23 pm

i will be very insterested to have an official support for WPMU ! Thx for the good work !
Dace
 
Posts: 4
Joined: Thu Mar 26, 2009 12:16 pm

Re: Feature Request: WordPress MU Support

PostBy michale on Mon Mar 30, 2009 12:46 pm

@TimRWC

my fix was made for the "page-not-found-error" when saving the options as admin. It worked for WPMU 2.7+FCG 3.1.0.

But I have experienced, that this would only work for the global administrator, the blog admins get a "Not admin"-warning when saving the options. (But this was no problem for my recent project, so I didn’t go after it)

I've posted the fix as a hint to set focus at the basic cause of the this save-problem (-> in the plugin management of wpmu.) Sorry, I can’t giv any further support.
michale
 
Posts: 3
Joined: Mon Mar 02, 2009 6:22 pm

Re: Feature Request: WordPress MU Support

PostBy eironae on Fri Apr 03, 2009 7:12 am

Just wanted to post and say thanks for the hack for WPMU. You saved my bacon with that one.
eironae
 
Posts: 2
Joined: Mon Feb 02, 2009 9:17 am

Next

Return to Development, Improvement, and Conflicts

Who is online

Users browsing this forum: No registered users and 0 guests