MDN

Go Back   Mambo - Forums Closed for posting > Mambo Technical Zone > Developer Zone > 4.5.x

 
 
Thread Tools Search this Thread Display Modes
Old September 11th, 2005, 17:26   #1
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Default [FEATURE] Require Adminstrator Approval on Registration

I've made up a patch that forces the activation of any new users who have registered by an administrator before they can log in.

You get a new option in the Administrator Panel where you can activate this.
GlobalConfiguration->Site->Require Administrator Activation

The diff is made agains Mambo 4.5.2.3 and also works if you have applied my dynamic_url patch

The patch is here:

http://smp-synergie.de/patches/activ...istrator.patch

For german users of Mambo there exists an additional patch for the German formal Language File,
to apply this please first apply the common patch above and then this

http://smp-synergie.de/patches/activ...r-german.patch

Apply all patches by

cd $MAMBO_INSTALLDIR
patch -p0 < activation-by-administrator.patch
patch -p0 < activation-by-administrator-german.patch

Maybe someone has a the same urgent need for this than I got

Carsten

P.S. BTW, anyone interested to have more fields on the registration page ? Like Company,Street,City,ZipCode,Phone ? I just ask, because I have to do that, too for my site, so I can make the changes common enough to share it among others
bootsy52 is offline  
Old September 12th, 2005, 21:32   #2
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Lightbulb And here is the >>enhanced<< version

This patch is an enhanced version of the above requiring quite a bit more changes to Mambo, so if you want to use this version of the patch you have to make changes to your database as well (but it's just to add 1 column).

So here is the description of what it does:

1) You have a new option under GlobalConfiguration->Site: Require Administrator Activation
(same as in the patch above) which also adds a new configuration variable to configuration.php

You can now use 4 combinations of the options "Require Administrator Activation" and "Use New Account Activation"

Case 1

Use New Account Activation => NO
Require Administrator Activation => NO

Same behavior as specifiying "Use New Account Activation" => NO without the patch applied.
Any new user can register without needing to activate the account by clicking on the activation link.

Case 2

Use New Account Activation => YES
Require Administrator Activation => NO

Same behavior as specifiying "Use New Account Activation" => YES without the patch applied.
Any new user receives an email containing a link to activate the account.

Case 3

Use New Account Activation => YES
Require Administrator Activation => YES

Any new user who registers receives a confirmation link which has to clicked to confirm that registration is done by the person who owns this email address and that the supplied data is correct.

Once the User has confirmed his/her registration an E-mail is send out to the Administrators containing an activation link to finally activate this account after the user/data has been reviewed.

Case 4

Use New Account Activation => NO
Require Administrator Activation => YES

Any new user who registers receives an confirmation E-mail that his/her registration has been received and that the registration has to be activated by an administrative person.

The administrators receive an E-mail informing them that a new user has registered containing an activation link to activate the account after they have reviewed the user/data.

2) You will got a new column in the users administration named "Confirmed by User" which shows the state of the user confirmation of the registration.

You can also use the normal block/unblock Link activate a user as usual this also sets "Confirmed by User" field to active

To apply this patch do the following:

1. Download it from
http://smp-synergie.de/patches/activ...enhanced.patch

2. cd $MAMBO_INSTALLDIR
3. patch -p0 < activation-by-administrator-enhanced.patch

If you have the "german formal" Language pack installed you can apply the following patch in the same way after you have applied the above patch.

Download it from:
http://smp-synergie.de/patches/activ...-germany.patch

You now have to add the column "AdministratorActivation" to your mos_users table (or whatever prefix you have chosen on installation)

Download for MySQL from:
http://smp-synergie.de/patches/activ...nced-mysql.sql

For a MySQL installation you can do the change by issuing the following SQL command:

ALTER TABLE mos_users ADD COLUMN AdministratorActivation varchar(100) AFTER activation;

Have fun, hope someone has a need for this.
Also I would be glad if this change could make it into the Mambo core.

Carsten
bootsy52 is offline  
Old September 14th, 2005, 13:14   #3
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Lightbulb Zip Archive uploaded containing patch and patched files

For those of you unfamilar with patching (or don't have a unix based OS) I've uploaded a zip archive containing the patch together with the already patched files, so you could simply unzip this file in the MAMBO_INSTALLATION directory and you're done

Download from here:

http://smp-synergie.de/patches/Activ...inistrator.zip
bootsy52 is offline  
Old September 28th, 2005, 19:28   #4
eskim
 
Join Date: Sep 2005
Posts: 1
eskim is on a distinguished road
Default

Great stuff!
One question, this works only in english o german istalled languages, how can modify it to work with other languages.
Thanx ))
eskim is offline  
Old October 4th, 2005, 06:08   #5
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Default Modifying for other languages

Just add and translate the following constants
o the language file language/language.php

DEFINE('_SEND_SUB_ACTIVATE_BYADMINISTRATOR'
DEFINE('_SEND_SUB_ACTIVATE_COMPLETE'
DEFINE('_USEND_MSG_ACTIVATE_BYADMINISTRATOR'
DEFINE('_USEND_MSG_ACTIVATE_COMPLETE'
DEFINE('_ASEND_MSG_ACTIVATE_BYADMINISTRATOR'
DEFINE('_USEND_MSG_ACTIVATE_COMBINED'
DEFINE('_REG_COMPLETE_ACTIVATE_BYADMINISTRATOR'
DEFINE('_REG_COMPLETE_ACTIVATE_BYUSER'
DEFINE('_REG_ACTIVATE_COMPLETE_BYUSER'
bootsy52 is offline  
Old October 10th, 2005, 01:24   #6
hbmarar
 
Join Date: Jun 2005
Location: Kerala,India
Posts: 39
hbmarar is on a distinguished road
Default

Quote:
Originally Posted by bootsy52

P.S. BTW, anyone interested to have more fields on the registration page ? Like Company,Street,City,ZipCode,Phone ? I just ask, because I have to do that, too for my site, so I can make the changes common enough to share it among others
hi,

Thanks bootsy52. I was looking for such a feature and if you have any new version releae with above entioned please do update me.

Though I have not installed, I would like to thank you for your tweaking was the exact thing i was looking for.

The all I can do is wishing you a nice day and great time and thanks once again for sharing it.

Regards
Harish
__________________
True innocence is the pure love endowed with discrimination and clear understanding.
hbmarar is offline  
Old October 10th, 2005, 01:34   #7
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Lightbulb Updated Version

The latest Version should be always available from here:

http://smp-synergie.de/patches/Activ...inistrator.zip
bootsy52 is offline  
Old October 31st, 2005, 04:11   #8
hbmarar
 
Join Date: Jun 2005
Location: Kerala,India
Posts: 39
hbmarar is on a distinguished road
Default yes it is working fine

hi,

I am having a problem with your Activation-by-administraor.I have attached a screenshot of the file in the frontend.

please do help me and i believe you would find some time to sugest me what i should be doing.

Harish


NO problems for now.i just missed the AdministratorActivatioon table yesterday as Indian team was killing the sri lankan team in cricket.

Sorry
__________________
True innocence is the pure love endowed with discrimination and clear understanding.

Last edited by hbmarar : October 31st, 2005 at 20:27. Reason: fault in my part,not with product
hbmarar is offline  
Old October 31st, 2005, 09:41   #9
eendsley
 
Join Date: Oct 2005
Posts: 5
eendsley is on a distinguished road
Default

Can this be made into a component, module, mambot that runs the scripts to do the complete install without patch/upload/modify?
eendsley is offline  
Old November 1st, 2005, 12:39   #10
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Question

Quote:
Originally Posted by hbmarar
hi,

I am having a problem with your Activation-by-administraor.I have attached a screenshot of the file in the frontend.

please do help me and i believe you would find some time to sugest me what i should be doing.

Harish
Where should that screenshot be ?
bootsy52 is offline  
Old November 1st, 2005, 12:40   #11
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Default

I'm not sure if this can be made up into a component or mambot.

I'll take a look at it
bootsy52 is offline  
Old November 8th, 2005, 03:34   #12
MrFullSwing
 
Join Date: Jul 2004
Posts: 10
MrFullSwing is on a distinguished road
Default

Can this be used at the same time as your extended_registration modification? If the extended_registration is installed first & then the activation_by_administrator you do not see the extended fields in the backend admin for users. If you install the activation_by_administrator first & then the extended_registration you then cannot login to the backend admin.

Obviously both modifiactions replace some of the same mambo files. Is it possible that you could create a zip file that has the mambo files modified for both your modifications to work togeather??

Thanks.
MrFullSwing is offline  
Old November 8th, 2005, 06:53   #13
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Default

Quote:
Originally Posted by MrFullSwing

Obviously both modifiactions replace some of the same mambo files. Is it possible that you could create a zip file that has the mambo files modified for both your modifications to work togeather??

Thanks.
The Extended Registration includes also the Activation-by-Administrator patch,
remember that this patch was made against Mambo-4.5.2.3

So if you download:

http://smp-synergie.de/patches/Exten...ion-Fields.zip

you get both the Activation-by-Administrator Patch and Extended-Registration-Fields Patch, installing this is sufficient to get both.
bootsy52 is offline  
Old November 8th, 2005, 07:09   #14
MrFullSwing
 
Join Date: Jul 2004
Posts: 10
MrFullSwing is on a distinguished road
Default

Thanks
MrFullSwing is offline  
Old November 8th, 2005, 07:21   #15
djkac
 
Join Date: Jul 2005
Posts: 14
djkac is on a distinguished road
Default

Sorry for the total nOOb question but how do I:

Quote:
Add the following columns to the "mos_users" table:

company varchar(80) NOT NULL default '',
address varchar(100) NOT NULL default '',
zipcode int NOT NULL default '0',
city varchar(50) NOT NULL default '',
phone varchar(50) NOT NULL default ''
Is there a tutorial somewhere you can point me to...please?
djkac is offline  
Old November 8th, 2005, 07:41   #16
djkac
 
Join Date: Jul 2005
Posts: 14
djkac is on a distinguished road
Default

..nevermind. I think I figured it out.
djkac is offline  
Old December 22nd, 2005, 13:14   #17
Bon@karl
 
Join Date: Dec 2005
Posts: 3
Bon@karl is on a distinguished road
Default Activation-by-Administrator

Hi Carsten,
I want to patch my Joomla 1.04 installation with your fine Activation-by-Administrator, but while doing so, I get an error. The System let me know:

Warning: Invalid argument supplied for foreach() in /web/includes/frontend.php on line 64

I tested it out. I copied file per file back from my backup. As I copied the joomla.php back, the error disappeared.

Do you something know about this Problem, or does somewhere a component or modul exist where this error occurs? Could you send me the changes you made in this File?

Next step is to try the Patch in an new clean installation, and then install all my used modules and componentes.

The activation works fine with the original joomla.php, but when I click on "fastactivation" in the eMail the system send me, it tells me that no such account exist. If I approve the user by the admin-interface, the user don't get a message, that his account is active.

I hope you could help me. If you need files, or other informations, please let me know.

Best regards from Trier (Germany)
Mathias
Bon@karl is offline  
Old December 22nd, 2005, 13:21   #18
Bon@karl
 
Join Date: Dec 2005
Posts: 3
Bon@karl is on a distinguished road
Default

STOP...

I did find the Problem... while uploading the patch via FTP again, I found some backupfiles including a backup of joomla.php. JACL made the backup. So I deleted JACL, and patch again... great, works fine.

So, if someone use JACL, first delet the modul, patch the system, and install the modul again.

Great Patch... :-D

Best regards
Mathias
Bon@karl is offline  
Old December 22nd, 2005, 13:27   #19
Bon@karl
 
Join Date: Dec 2005
Posts: 3
Bon@karl is on a distinguished road
Default

Attention. Groups and Accesslevel will be deleted while uninstalling JACL.

Best regards
Mathias
Bon@karl is offline  
Old December 24th, 2005, 01:18   #20
bootsy52
 
Join Date: Sep 2005
Posts: 16
bootsy52 is on a distinguished road
Default

Nice, I just thought I had to work during christmas and new year :-)
BTW, for all others, I'm not available until 01th of 2006
Best regards from Lemgo (Germany)
bootsy52 is offline  
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cpanel Email Registration for Mambo Mod Release fijian Open Source Products for Mambo 14 February 26th, 2006 01:28
Modify registration slightly... netscan Administration Questions 3 December 22nd, 2005 22:04
PHP-Shop and automated Registration Confirmation X-Dimension General Questions 0 May 30th, 2005 13:41
Add "terms of use" to user registration? ebiz101 General Questions 6 May 20th, 2005 18:03
PAF "Interfaces" for site registration question sinemac Components 2 February 8th, 2005 21:38


All times are GMT -7. The time now is 07:45.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.