We have a charity art project site for our fundraising company that I'd like to use WPMU with. For obvious reasons, I don't want people to be able to just sign up for a blog and start representing us or other charities. I'd like to only be able to create blogs/projects thru the site admin.
So I know I can delete wp-signup.php but how can I then let people sign up to comment?
I don't want people to be able to just sign up for a blog
Hmm, that's a new one.
Try this:
- Open up for editing wp-signup.php and find line 370
- Change the 'all' to 'user'
- Save and give it a try.
Create a new text file.
Paste this
<?php
function close_new_blog_signups($blah) {
$blah = 'user';
return $blah;
}
add_filter('wpmu_active_signup', 'close_new_blog_signups');
?>
Name it something.php
Drop in MU plugins.
And change wp-signup back to original?
Yes, if you want. Do remember though that adding in another plugin means yet another file that mu has to load and go through. That means load and usage on your box.
Granted we're not talking about a lot here but it's still soemthing to keep in mind.
My solution means no load or stress change. You just have to pay attention though when you upgrade,
lunabyte
Member
Posted 15 years ago #
Agreed Doc. While a lot of things can be plugged into, sometimes it doesn't mean that they should be plugged into.
I think that both of you are right. The best thing is to know both ways to solve problems, and to choose what to apply on a per-project basis.
I agree that another mu-plugin is another file that WPMU has to load, but if you (=me) are writing a huge WPMU customization by plugins, another hook calls is just 3 lines into a thousand-lines context (and something *less* to remember when you upgrade ;)
That's why I love WordPress and its side projects: they allow me to develop something with them (as many frameworks do), but also they allow me to choose *how* to develop ;)
By the way: dsader solution will disable signups and return 404 errors (or something alike), but there's a way to point to *another* page instead to disable it completely?
For example: point to the homepage or a FAQ page on the primary blog? I'm looking into WPMU code but I'm a bit confused...
The filter is in wp-signup.php and the clues to plugin are left by donncha I presume.
line 371(version1.2.4)
$active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); // return "all", "none", "blog" or "user"
If developers give you a hook/filter, use it I say.
What else could cause your 404s here?