When a user receives an email with a registration code they are directed to a link for og/subscribe/##. But, at that link, there is no place to enter the group code. I would actually think the link in the email should take you to a page like at the 'Use Group Code' page and/or auto submit it for you.

Also, I cannot figure out how to make the tab at /og for 'Use Group Code' to appear for anyone except the administrator, same for the link og/use_code. If I go to og/use_code as a user, I just get the /og page reloaded. But there are no permissions for og_reg_code available to set.

Thanks in advance,
Julie

PS: Also, did you know that if you rename the link for /og to something else like /og_list the tab does not appear at all.

Comments

brucealdridge’s picture

what i did,
was added a line in the form alter module... the line #default_value => arg(2) ...
then we can goto example.com/user/register/registrationcode
and it will be entered automagically

    $form['og_register']['og_reg_code'] = array(
      '#type' => 'textfield',
      '#title' => t('Group registration code'),
      '#required' => variable_get('og_reg_code_required', TRUE),
	  '#default_value' => arg(2),
      '#description' => t('Enter the group registration code that you received.')
    // , '#suffix' => t('Before registering, you can <a href="!url">check your group code</a>.', array('!url' => url('og/use-code')))
    );

then its just a matter of changing (adding) the link to the email thats sent out in the settings page for this module
i used

To join this group, use the register here http://www.example.com/user/register/%reg_code

(you will also want to change email settings in organic groups configuration page

doesn't sort out your second problem ....
this is an ugly hack, and i don't recommend using it, especially on a production site.
this hasn't been tested (it works, but beyond that ....)

-bruce

spyderpie’s picture

Okay - that's pretty awesome ... but it doesn't actually help when a user already has an account and is joining an additional group.

I still can't figure out why it appears that users don't have permissions to use codes ...

strange. Oddly, I vaguely remember seeing it as an option and turning it off )the ability to use reg codes at /og - or something like that.) now I can't figure out where I may have seen that.

Julie

spyderpie’s picture

You can put it here as well ....

Then og/use_code/%reg_code as a link also works automagically!

Thanks ... now just the permission thing left ....

<?php

function og_reg_codes_join() {
  global $user;

  $form['og_reg_code'] = array(
    '#type' => 'textfield',
    '#title' => t('Group registration code'),
    '#required' => TRUE,
    '#default_value' => arg(2),
    '#size' => 25,
  );

?>
spyderpie’s picture

Well, I have solved part of my own problem .. the link to use the code is og/use-code with a DASH not an underscore. So that works. But I still do not see the tabs nor can access og/activity (if that is the right link - LOL )

Anyways, i've boiled this down to a mistake I must have made in the views settings for the og view. Changing around the menu and tab setting does some very interesting things. So I will be investigating there.

Thanks for your help brucealdrige :)

Julie

pwolanin’s picture

what version of OG are you using? This module was developed to be compatible with the 5.x-1.x series of OG and HAS NOT been updated for the 5.x-2.x or -3.x series.

Feel free to open an issue or change the title if that's the problem

spyderpie’s picture

That looks like the issue. i am at 5.x-3.1.

spyderpie’s picture

Status: Active » Closed (fixed)

i will open a separate ticket. closing ....