umka.dk
Forum Replies Created
-
Nice one! ??
DO NOT replace the entire function!!
Take out only line 196 (it should match the line prefixed with
-
in the patch above) and replace it with:if ( defined('MSUM_MANAGED_BLOGS') ) $blogs = $wpdb->get_results( $wpdb->prepare( "SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND archived = '0' AND spam = '0' AND deleted = '0' AND blog_id IN (". MSUM_MANAGED_BLOGS .") ORDER BY registered DESC", $wpdb->siteid ), ARRAY_A ); else $blogs = $wpdb->get_results( $wpdb->prepare( "SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND archived = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid ), ARRAY_A );
Hey greatkanishka,
Apologies if anything I say seems a bit basic but I have no idea of how familiar you are with WP or PHP, so please bear with me… Also, I’m assuming that your WP runs on a Unix server and that you have command line access to that server.
The first thing you want to do is to edit your
wp-config.php
, which is located in the root directory of your WP installation, and adddefine('MSUM_MANAGED_BLOGS', '12');
just above the/* That's all, stop editing! Happy blogging. */
line.On it’s own, MSUM_MANAGED_BLOGS constant does absolutely nothing, so now you need to modify Multisite User Management plugin to look for it.
Go to the plugin directory (
cd wp-content/plugins/multisite-user-management
) and save the above patch into a file calledmsum.patch
. Now, you can apply that patch by running the following from the command line (stay in the plugin’s directory!):patch -p0 < /path/to/msum.patch
This will effectively replace line 196 (version 1.1 of the MSUM) of the
ms-user-management.php
file with the four lines prefixed with+
above.Hope it helps,
Dmytro
Thanks for such a quick response! Just read your comment and thought I better make sure that I didn’t imagine things:
I’ve reinstalled version 2.1 onto my WP-MultiSite and did two tests. First, I’ve “network activated” plugin and went to Settings, then I “network deactivated” and activated it on my primary blog only (ID 1). Plugin was configured with “Networked” option is set to ON.
In both instances I could login to my test blog (ID:2) as a simple blog admin (no elevated privileges) and was able to not only see “Permalink Finder” menu in Settings but also was able to modify plugin settings for the entire network.
Dmytro
Forum: Hacks
In reply to: Hooking into user_admin_menu fails to add menu.Ok, after digging around a bit more, I finally managed to solve my own problem: in order for the menu to appear
add_menu_page()
needs to know the lowest possible capability for which to display that menu….As it turns out, the lowest capability for a network user without a blog is
'exist'
and notnull
. Thus, my origin code works provided I change theadd_menu_page()
line to:add_menu_page('Test Menu', 'Test Menu', 'exist', 'test', 'test_user_admin_page');
Forum: Plugins
In reply to: [Antispam Bee] [Plugin: Antispam Bee] Multisite support!@sarangan112: If hiding the link from normal users is the only objective then have a look at Admin Menu Editor. It can hide/move/edit admin menu links and restrict access to the plugin’s settings page based on user’s capability/role.
PS: I appreciate that the thread is quite old and to be honest I didn’t really expect a reply … I’m just hoping that Sergej will take notice of it, as it would be ace to be able to use AntiVirus, Antispam & Statify in multisite environment.
Forum: Plugins
In reply to: [Antispam Bee] [Plugin: Antispam Bee] Multisite support!Hmmm … that’s a lot of blogs! ??
I’ve tested the plugin on my development server which only has 6-ish blogs, so I’m afraid I wouldn’t know how the plugin behaves in a big scale mu-environment, especially if it has over 4,000 blogs.
In my case, plugin was Network Activate and appeared forcibly enabled for all users of the multisite (as Network Activated plugin should). However, there was no way to define network default settings and each user was able to customise setting to their own needs.
I could fix the latter issue by hiding the menu item using Admin Menu Editor but I believe that the former issue (network wide defaults) definitely needs to be addressed before the plugin can be used in mu environment.
@ sarangan112: When you say “it didn’t work”, did you get any errors? Anything in the logs? Could you give us a few more details? I would be very much interested to learn what happened.
Forum: Plugins
In reply to: [Antispam Bee] [Plugin: Antispam Bee] Multisite support!Just thought I’ll add my 2p to this discussion. This are just ideas but it would be nice to hear what others think :
1. I’m not sure how “Allow comments only in certain language” works but it would be nice to be able to define a custom list of languages (more then on) similar to “Block comments and pings from specific countries”.
2. Maybe add a few more “Search comment spammers in …” projects: StopForumSpam.com? BotScout.com? …or how about the ability to add custom projects? Though, this might have to be done via a plugin/hook interface.
3. Maybe consider using existing checks (IP / email address) to protect against spam registrations as well as spam comments.
@sarangan112: Yes, would be very nice to see dedicated multisite support, especially the ability for super-admin to set global settings for all sites on the network.
@pixelyzed: No idea about resources load, sorry.
David, my apologies. I’ve just worked out what I was doing wrong. As the readme say:
Comment out
DOMAIN_CURRENT_SITE
line in yourwp-config.php
file.Now that I’ve read the readme and done what I was suppose to do in the first place, everything works great!