WordPress MU signup recaptcha

93 views
Skip to first unread message

fouad fakhr

unread,
Jun 4, 2008, 10:33:15 AM6/4/08
to reCAPTCHA
wordpress mutli-user version - fround here http://mu.wordpress.org -
is a version of wordpress once installed it acts as a blog hosting
provider
and it's used by nearly 2000 service provider. all of them are easy
target to spammers , some of them have spammers accounts more than the
real users accounts as the spammers target the system via the signup
page and sometimes the comments on the hosted blogs

the script itself is a wonderful multi-blog solution and it contains
two types of plugins to be installed on the system:
1- plugins : which acts the same as the normal wp plugin and the user
have the full control to enable or disable it
2- mu-plugins : which is activated by default sitewide and the user
has no control over it

recaptcha is working as a single user plugin , actually most of users
don't enable plugins and don't want to get into all of this and they
are not in majority of technical knowledge to even signup to other
service
that makes their blogs easy target to spammers
, i read on the forums here it can be coded to enable it sitewide
the main problem on WPMU installation is the signup page
we need the recaptcha on the signup page to prevent spammers from
signing up and establish blogs containing their stuff
i think wpmu signup page plugin from recaptcha will be the most
wonderful project from recaptcha and i know alot will be happy and
using it
thanks

Jorge Peña

unread,
Jun 4, 2008, 6:17:37 PM6/4/08
to reca...@googlegroups.com
Hello, I'm the developer for that plugin (wp-recaptcha) and it has been my intention (Due to many requests) to make it MU-capable, the only 'problem' is I haven't gotten around to figuring out what it is that this entails.

If anyone would be so kind as to answer a few questions rather than making a new thread (And if you don't then I guess I'll make a new one to get more exposure). Does MU use actions and filters? The main filters I use are:

wp_head - CSS for the reCAPTCHA related things on the blog such as hidden emails (filter)
admin_head - CSS for the admin settings (filter)
login_head - CSS for the reCAPTCHA on the registration page (filter)
register_form - To display the reCAPTCHA on the registration page (action)
registration_errors - In case the user typed in the wrong CAPTCHA or failed the test, display the errors (filter)
the_content - Email hiding using MailHide (filter)
get_comment_text - Email hiding for comments (filter)
the_content_rss - Email hiding for the content in RSS (filter)
comment_text_rss - Email hiding for comments in RSS (filter)
comment_form - To display the reCAPTCHA form (action)
pre_comment_approved - To mark comments as spam (action)
preprocess_comment - To check the comment before we post it (filter)
comment_post_redirect - To redirect if the user failed the CAPTCHA (filter)
admin_menu - For the plugin options (action)
admin_footer - For plugin warnings (action)

Or is it even a matter of what hooks aren't available but something else? I'll gladly figure this out myself I just don't know where to start, thanks I would appreciate any help.

Jorge Peña

unread,
Jun 4, 2008, 6:18:17 PM6/4/08
to reca...@googlegroups.com
For some reason I thought this was the WordPress mailing list, hah, disregard.

fouad fakhr

unread,
Jun 4, 2008, 7:21:51 PM6/4/08
to reCAPTCHA
thanks Jorge for your reply , i posted your questions to the MU
official forums to get a reply from some experienced developers and
coders in the MU script there and i'll post it here once i get
accurate replies
thanks

On Jun 5, 1:18 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> For some reason I thought this was the WordPress mailing list, hah,
> disregard.
>

fouad fakhr

unread,
Jun 4, 2008, 7:30:01 PM6/4/08
to reCAPTCHA
i posted your questions at the official MU forums to get more details
about your inquiries from the guys involved in developing WPMU
but the plugins in MU is alittle different from WP single user
in MU there're 2 folders to put pluging
first is the normal plugin folder in which the admin put the plugins
that can be activated by the users in the system if they want to ,
just the same as normal wordpress behaviour , and that's not the point
from my topic here as most of normal wp plugins works fine if they are
used as a plugin
the second plugins type are the plugins in mu-plugins folder - located
under the wp-content folder - in which the plugins are activated
system wide by default and users don't have control over it , only
site admin can change the settings from admin panel , dashboard- site
admin - mu-plugin-option-page
that's the one we are seeking
recaptcha to be into mu-plugin and shown on the signup form located in
http://domail.com/wp-signup.php
and the mail hide and comment recaptchas to be controlled via site
admin panel by default

thanks for your help

On Jun 5, 1:18 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> For some reason I thought this was the WordPress mailing list, hah,
> disregard.
>

Jorge Peña

unread,
Jun 4, 2008, 8:28:21 PM6/4/08
to reca...@googlegroups.com
I think I've enabled WPMU support but I'm not positive as I don't have an installation to try it on. Do you have experience with Subversion? Would you mind checking out the latest revision from http://svn.wp-plugins.org/wp-recaptcha/trunk/ ? If you don't know how let me know and I will create a tarball for you to try out. I'm still not positive on how WPMU works because there's shockingly little documentation of it (No list of hooks for example). I think the only problem you had was adding the reCAPTCHA to the sign up pages though and I think I've done that with this release. Simply go into the options and enable 'Enable site-wide activation in a WPMU environment.' and let me know if it works. If you have a cache plugin, you will want to flush the cache after setting that option to see if it takes effect.

Please let me know how it goes, no one seems to cooperate with this (I've asked on IRC and on the mailing list and no one seems to know anything about WPMU). I hope it works!

Jorge Peña

unread,
Jun 4, 2008, 8:33:09 PM6/4/08
to reca...@googlegroups.com
A zip is now available here: http://downloads.wordpress.org/plugin/wp-recaptcha.zip in case you don't want to use subversion.

fouad fakhr

unread,
Jun 5, 2008, 2:36:53 AM6/5/08
to reCAPTCHA
i tried the version available on wordpress plugin directory but didn't
work on the signup-wp.php page
i'll try the subversion and inform you about the results

the problem is huge cuz even the people on wpmu don't know well about
recaptcha !!!!
or they don't believe recaptcha will be of any difference to splogs
the only captcha plugin available for wpmu is kinda weak , it only
contains few numbers to be shown and the user can't choose to refresh
it nor to listen to the letters and it's only 4 numbers are shown
actually i tried it and made no huge difference to the spam blogs
created daily on the system
you can find it here
http://wpmudev.org/project/WPMU-Signup-Captcha i think it might help
you to take a look at the source of this plugin

i really don't know why the two communities of WPMU and reCAPTCHA
didn't meet or even know about eachother yet , as i know recaptcha is
the most powerful captcha over here and wpmu install is a target to
every spammer online

i'll try my best helping and trying it with you

On Jun 5, 3:33 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> A zip is now available here:http://downloads.wordpress.org/plugin/wp-recaptcha.zipin case you don't
> want to use subversion.
>
> On Wed, Jun 4, 2008 at 5:28 PM, Jorge Peña <jorgepbl...@gmail.com> wrote:
> > I *think* I've enabled WPMU support but I'm not positive as I don't have
> > an installation to try it on. Do you have experience with Subversion? Would
> > you mind checking out the latest revision from
> >http://svn.wp-plugins.org/wp-recaptcha/trunk/? If you don't know how let
> > me know and I will create a tarball for you to try out. I'm still not
> > positive on how WPMU works because there's shockingly little documentation
> > of it (*No list of hooks for example*). I think the only problem you had
> > was adding the reCAPTCHA to the sign up pages though and I think I've done
> > that with this release. Simply go into the options and enable 'Enable
> > site-wide activation in a WPMU environment.' and let me know if it works. If
> > you have a cache plugin, you will want to flush the cache after setting that
> > option to see if it takes effect.
>
> > Please let me know how it goes, no one seems to cooperate with this (I've
> > asked on IRC and on the mailing list and no one seems to know anything about
> > WPMU). I hope it works!
>

Jorge Peña

unread,
Jun 5, 2008, 2:54:14 AM6/5/08
to reca...@googlegroups.com
That's the plugin that I looked at to modify my code, I hope it works, if not, I'll figure it out eventually but let me know how it goes as quickly as you can so that I can finish this as quickly as I can myself.

fouad fakhr

unread,
Jun 5, 2008, 5:13:07 AM6/5/08
to reCAPTCHA
here's what i did till now
1-i got the latest code from subversion
2-uploaded it to mu-plugin folder , result : not working and not shown
on the site
3-uploaded it to plugins directory, result : working but on the blog
that activate it but the registration form shows the recaptcha box
above the contents in a very ugly way , when it's left blank there's
no error message and when it's typed incorrectly i got this error
message
Warning: extract() [function.extract]: First argument should be an
array in /dir/.to./wp-signup.php on line 290
Fatal error: Call to a member function get_error_code() on a non-
object in /dir/.to./wp-signup.php on line 292

so i guess it needs
to be only activated by the site admin/s
to be placed under mu-plugins
and controlled from the admin panel for the signup page at least ,
so it shouldn't be under settings tab , it should goes under siteadmin
tab
most of wpmu users are into coding and hacking it , so it won't be a
big problem to get everything done by hardcoding the files itself -
the same as the plugin you saw from wpmudev -

this way you will save alot of time coding for a solution , depending
on the code of wpmudev to place the code on registration form without
backend options , the private and pub keys to be placed manually in
the files , then for every blog to activate the normal wp-recaptcha
manually

thanks jorge for your help which i think will be of a big help to alot
of other wpmu users


On Jun 5, 9:54 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> That's the plugin that I looked at to modify my code, I hope it works, if
> not, I'll figure it out eventually but let me know how it goes as quickly as
> you can so that I can finish this as quickly as I can myself.
>
> On Wed, Jun 4, 2008 at 11:36 PM, fouad fakhr <fouad.fa...@gmail.com> wrote:
>
> > i tried the version available on wordpress plugin directory but didn't
> > work on the signup-wp.php page
> > i'll try the subversion and inform you about the results
>
> > the problem is huge cuz even the people on wpmu don't know well about
> > recaptcha !!!!
> > or they don't believe recaptcha will be of any difference to splogs
> > the only captcha plugin available for wpmu is kinda weak , it only
> > contains few numbers to be shown and the user can't choose to refresh
> > it nor to listen to the letters and it's only 4 numbers are shown
> > actually i tried it and made no huge difference to the spam blogs
> > created daily on the system
> > you can find it here
> >http://wpmudev.org/project/WPMU-Signup-Captchai think it might help
> > you to take a look at the source of this plugin
>
> > i really don't know why the two communities of WPMU and reCAPTCHA
> > didn't meet or even know about eachother yet , as i know recaptcha is
> > the most powerful captcha over here and wpmu install is a target to
> > every spammer online
>
> > i'll try my best helping and trying it with you
>
> > On Jun 5, 3:33 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> > > A zip is now available here:
> >http://downloads.wordpress.org/plugin/wp-recaptcha.zipincase you don't
> > > want to use subversion.
>
> > > On Wed, Jun 4, 2008 at 5:28 PM, Jorge Peña <jorgepbl...@gmail.com>
> > wrote:
> > > > I *think* I've enabled WPMU support but I'm not positive as I don't
> > have
> > > > an installation to try it on. Do you have experience with Subversion?
> > Would
> > > > you mind checking out the latest revision from
> > > >http://svn.wp-plugins.org/wp-recaptcha/trunk/?If you don't know how

fouad fakhr

unread,
Jun 5, 2008, 9:37:13 AM6/5/08
to reCAPTCHA
register_form & registration_errors

These would be diferent in WPMU. Look at wpmu-signup.php for any
special hooks.

i can paste you the code from wpmu-signup.php here if you want to
thanks in advance

Jorge Peña

unread,
Jun 5, 2008, 3:09:42 PM6/5/08
to reca...@googlegroups.com
Did you go into the options and enable 'Enable site-wide activation in a WPMU environment.'? That would make it use the WPMU alternative hooks ( signup_extra_fields and wpmu_validate_user_signup ). Oh, and the plugin settings need to be under the site admin tab? Okay I'll look into that.

Jorge Peña

unread,
Jun 5, 2008, 3:38:58 PM6/5/08
to reca...@googlegroups.com
I think I found a problem, can you tell me the path to the mu-plugins folder? Is it yourblog.com/mu-plugins/wp-recaptcha/wp-recaptcha.php? You are putting the entire folder into the mu-plugins folder right? Also can you tell me the version of WPMU you are using? Thanks.

Jorge Peña

unread,
Jun 5, 2008, 4:12:09 PM6/5/08
to reca...@googlegroups.com
I have updated the code, would you mind getting the latest revision from subversion again? Remember, you need the entire folder. Does it appear in the admin menu at all? If so, what happens when you turn on the option 'Enable site-wide activation in a WPMU environment.', check it the signup recaptcha works now. Remember, disable the plugin before you install the new version to make sure the options get flushed.

Let me know how it goes.
--
- Blaenk Denum

Jorge Peña

unread,
Jun 5, 2008, 4:28:59 PM6/5/08
to reca...@googlegroups.com
Okay, I've updated the plugin again this time I think I've fixed the registration form error about errors not being an object or something. Please try again.
--
- Blaenk Denum

Jorge Peña

unread,
Jun 6, 2008, 3:38:27 AM6/6/08
to reca...@googlegroups.com
2.8.3 now fully supports WordPress MU. Make sure you follow the instructions. It is available here [ http://wpmudev.org/project/WP-reCAPTCHA ], but I PREFER that you download it from here http://wordpress.org/extend/plugins/wp-recaptcha/ where you can also find installation instructions.
--
- Blaenk Denum

fouad fakhr

unread,
Jun 6, 2008, 4:20:17 AM6/6/08
to reCAPTCHA
hi jorge
sorry for the time differences :-)
yes in the subversion i uploaded the whole directory and enable it
site-wide option.

-the latest version of wpmu 1.5.1 is what i'm using , nearly everyone
upgraded to it
-mu-plugins folder is domain.com/wp-content/mu-plugins/plugin-dir or
plugin file
-i'll try the latest version now , can we continue on wpmudev.org ? so
other users can participate and may help too ?

thanks jorge for your time and efforts

On Jun 5, 10:09 pm, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> Did you go into the options and enable 'Enable site-wide activation in a
> WPMU environment.'? That would make it use the WPMU alternative hooks (
> signup_extra_fields and wpmu_validate_user_signup ). Oh, and the plugin
> settings need to be under the site admin tab? Okay I'll look into that.
>

fouad fakhr

unread,
Jun 6, 2008, 6:34:32 AM6/6/08
to reCAPTCHA
i posted a reply on your project home
http://wpmudev.org/project/WP-reCAPTCHA
thanks jorge

On Jun 6, 10:38 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> 2.8.3 now fully supports WordPress MU. Make sure you follow the
> instructions. It is available here [http://wpmudev.org/project/WP-reCAPTCHA], but I PREFER that you
> download it from herehttp://wordpress.org/extend/plugins/wp-recaptcha/where you can also find
> installation instructions.
>
>
>
> On Thu, Jun 5, 2008 at 1:28 PM, Jorge Peña <jorgepbl...@gmail.com> wrote:
> > Okay, I've updated the plugin again this time I think I've fixed the
> > registration form error about errors not being an object or something.
> > Please try again.
>
> > On Thu, Jun 5, 2008 at 1:12 PM, Jorge Peña <jorgepbl...@gmail.com> wrote:
>
> >> I have updated the code, would you mind getting the latest revision from
> >> subversion again? Remember, you need the entire folder. Does it appear in
> >> the admin menu at all? If so, what happens when you turn on the option
> >> 'Enable site-wide activation in a WPMU environment.', check it the signup
> >> recaptcha works now. Remember, disable the plugin before you install the new
> >> version to make sure the options get flushed.
>
> >> Let me know how it goes.
>
> >> On Thu, Jun 5, 2008 at 12:38 PM, Jorge Peña <jorgepbl...@gmail.com>
> >> wrote:
>
> >>> I think I found a problem, can you tell me the path to the mu-plugins
> >>> folder? Is it yourblog.com/mu-plugins/wp-recaptcha/wp-recaptcha.php? You
> >>> are putting the entire folder into the mu-plugins folder right? Also can you
> >>> tell me the version of WPMU you are using? Thanks.
>
> >>> On Thu, Jun 5, 2008 at 12:09 PM, Jorge Peña <jorgepbl...@gmail.com>
> >>> wrote:
>
> >>>> Did you go into the options and enable 'Enable site-wide activation in a
> >>>> WPMU environment.'? That would make it use the WPMU alternative hooks (
> >>>> signup_extra_fields and wpmu_validate_user_signup ). Oh, and the plugin
> >>>> settings need to be under the site admin tab? Okay I'll look into that.
>
> >>>> On Thu, Jun 5, 2008 at 6:37 AM, fouad fakhr <fouad.fa...@gmail.com>

fouad fakhr

unread,
Jun 6, 2008, 8:48:02 AM6/6/08
to reCAPTCHA
yes it works fine , thanks jorge
just i don't know why it's shown above the signup form , it supposed
to be shown below it !!! and it couldn't be moved to the center too

On Jun 6, 10:38 am, "Jorge Peña" <jorgepbl...@gmail.com> wrote:
> 2.8.3 now fully supports WordPress MU. Make sure you follow the
> instructions. It is available here [http://wpmudev.org/project/WP-reCAPTCHA], but I PREFER that you
> download it from herehttp://wordpress.org/extend/plugins/wp-recaptcha/where you can also find
> installation instructions.
>
>
>
> On Thu, Jun 5, 2008 at 1:28 PM, Jorge Peña <jorgepbl...@gmail.com> wrote:
> > Okay, I've updated the plugin again this time I think I've fixed the
> > registration form error about errors not being an object or something.
> > Please try again.
>
> > On Thu, Jun 5, 2008 at 1:12 PM, Jorge Peña <jorgepbl...@gmail.com> wrote:
>
> >> I have updated the code, would you mind getting the latest revision from
> >> subversion again? Remember, you need the entire folder. Does it appear in
> >> the admin menu at all? If so, what happens when you turn on the option
> >> 'Enable site-wide activation in a WPMU environment.', check it the signup
> >> recaptcha works now. Remember, disable the plugin before you install the new
> >> version to make sure the options get flushed.
>
> >> Let me know how it goes.
>
> >> On Thu, Jun 5, 2008 at 12:38 PM, Jorge Peña <jorgepbl...@gmail.com>
> >> wrote:
>
> >>> I think I found a problem, can you tell me the path to the mu-plugins
> >>> folder? Is it yourblog.com/mu-plugins/wp-recaptcha/wp-recaptcha.php? You
> >>> are putting the entire folder into the mu-plugins folder right? Also can you
> >>> tell me the version of WPMU you are using? Thanks.
>
> >>> On Thu, Jun 5, 2008 at 12:09 PM, Jorge Peña <jorgepbl...@gmail.com>
> >>> wrote:
>
> >>>> Did you go into the options and enable 'Enable site-wide activation in a
> >>>> WPMU environment.'? That would make it use the WPMU alternative hooks (
> >>>> signup_extra_fields and wpmu_validate_user_signup ). Oh, and the plugin
> >>>> settings need to be under the site admin tab? Okay I'll look into that.
>
> >>>> On Thu, Jun 5, 2008 at 6:37 AM, fouad fakhr <fouad.fa...@gmail.com>

Jorge Peña

unread,
Jun 6, 2008, 3:30:35 PM6/6/08
to reca...@googlegroups.com
That's because you didn't follow the instructions. I posted a reply with them at the same page you did.
--
- Blaenk Denum

Jorge Peña

unread,
Jun 6, 2008, 7:08:57 PM6/6/08
to reca...@googlegroups.com
Okay ignore everything I've said and get version 2.8.4 http://wordpress.org/extend/plugins/wp-recaptcha/ All you have to do now is put the wp-recaptcha folder in mu-plugins and move the wp-recaptcha.php file out of wp-recaptcha/ so that it's in mu-plugins/, and that's it, you don't have to edit line 20 or anything anymore, it should work, it works perfectly now according to my tests :)

Let me know if you find anything else though.
--
- Blaenk Denum
Reply all
Reply to author
Forward
0 new messages