Closed Bug 472612 Opened 16 years ago Closed 15 years ago

Subscribe new users to "Community @ SFX" group by default

Categories

(Websites Graveyard :: spreadfirefox.com, defect)

defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: abuchanan, Assigned: paul)

References

()

Details

Attachments

(1 file, 6 obsolete files)

http://www.spreadfirefox.com/user/register

Under "Groups", "Join Community @ SFX" should be checked by default

Paul, do you know how best to do this?
Hi Alex,

I think if this cannot be done in the latest version of OG for D5 then perhaps the best approach is implementing this feature in OG so that a user with a specific role can decide if a given group is checked by default on the registration page.

A quick fix would probably be to write a little jquery to check that particular box.

If this level of control can be done in D6 now then perhaps just press on with the migration

Hope that helps.
Best, Paul
Target Milestone: --- → 3.0
Assignee: nobody → paul
Working on this with the drupal community over @
http://drupal.org/node/365071
Thanks :)
Working on this now Mary ...
Thank you!
This module includes the jquery for auto selecting Join Community @ SFx checkbox on the registration page (Drupal6 platform)
(In reply to comment #6)
> Created an attachment (id=360689) [details]
> A module that will be used for additional jquery functionality
> 
> This module includes the jquery for auto selecting Join Community @ SFx
> checkbox on the registration page (Drupal6 platform)

There must be a better way to do this than adding a module and using JS.  Maybe you should add the option to the OG module to be able to select default groups on the user registration page.
Thanks Alex ,I'll look at adding a checkbox now that will be visible to site administrators so that they can allow a group to be checked by default on the registration page.
Attachment #360689 - Attachment is obsolete: true
Attachment #363403 - Flags: review?(buchanae)
Attachment #363403 - Flags: review?(buchanae) → review-
Comment on attachment 363403 [details] [diff] [review]
Allows an administrator to configure any group to be selected by default on the registration page

Sorry, this patch changes the OG module, which we don't own/maintain, so we can't modify it, same as Drupal core.

Maybe you can do this with a hook_form_alter?
Im going to talk with the OG project maintainer and try and get this modification into the module on drupal.org.
Paul, any updates on this?  We can't wait until the OG maintainer decides to get around to this bug.  Do you have a way to complete this without modifying the OG module?
Thanks for the heads up Alex , i'll update shorty ...
Need to put the registration_default field in a separate table outside of the og table and do some final testing in the morning
Attachment #363403 - Attachment is obsolete: true
Attachment #363979 - Attachment is obsolete: true
Attachment #363981 - Attachment is obsolete: true
Attachment #364054 - Flags: review?(buchanae)
Removes some redundant code and correct a permissions problem
Attachment #364054 - Attachment is obsolete: true
Attachment #364054 - Flags: review?(buchanae)
Attachment #364057 - Flags: review?(buchanae)
Blocks: 468644
Let me know if this can be committed into SVN
Buchanan?
Severity: normal → blocker
Comment on attachment 364057 [details]
 Allows an administrator to configure any group to be selected by default on the registration page

I don't think this needs it's own DB table, can you do this with variable_get/set?

You're also using undefined variables on line 10.

Why do you need hook_nodeapi()?

Let me know if you need any help implementing this.  I'm on IRC/Skype/email

Also, it'd make me *really* happy if you could be more consistent/better with your code formatting, specifically 4 spaces per indent, no tabs, spaces after commas, and breaking up long SQL queries into multiple, shorter lines.  Thanks!
Attachment #364057 - Flags: review?(buchanae) → review-
Thanks for the feedback Alex.

I have to do some other work for my employer now, so i don't think i will get to work on this today. I'll reassign this to Mary. If you want to make any modifications etc please do.

Paul
Assignee: paul → mary
Assignee: mary → paul
(In reply to comment #20)
> (From update of attachment 364057 [details])
> I don't think this needs it's own DB table, can you do this with
> variable_get/set?

The variable table is used for configuration, i would say the approach used here is best

> 
> You're also using undefined variables on line 10.

Reinserted this line ..
list($types, $in) = og_get_sql_args();

> 
> Why do you need hook_nodeapi()?

The reason is so that 'og_register_default' can be added to every group $node object. This will then determine if the group checkbox for any given group is ticked by default on the registration page
> 
> Let me know if you need any help implementing this.  I'm on IRC/Skype/email

Thanks Alex. I think this is ok now.

> 
> Also, it'd make me *really* happy if you could be more consistent/better with
> your code formatting, specifically 4 spaces per indent, no tabs, spaces after
> commas, and breaking up long SQL queries into multiple, shorter lines.  Thanks!

I just noticed the formatting was not very good at all :-( . Hopefully now everything is put right. 

Just to be clear i'm using 2 spaces per indent.

I'll upload the latest files ....
Comment on attachment 367246 [details]
 Allows an administrator to configure any group to be selected by default on the registration page

same as last time
Attachment #367246 - Flags: review?(buchanae) → review-
Can you be a little clearer Alex. 

Are you saying that the despite the formatting changes the strategy used is not to your liking. If that's the case then please let me know what i can do better to get this patch committed for everyone

Best, Paul
Paul, thanks for you work on this.  I ended up using system_settings_form() and hook_form_alter() to set this up.  You can see this in r23571

The default groups  can be set at /admin/settings/sfx
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
That's nicely reworked, thanks :-)
Under "Groups", "Join Community @ SFX" is checked by default.Marking this Verified FIXED.
Status: RESOLVED → VERIFIED
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: