/[drupal]/contributions/modules/conference_organizing/conference_organizing.module
ViewVC logotype

Diff of /contributions/modules/conference_organizing/conference_organizing.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.9, Mon Nov 5 23:42:58 2007 UTC revision 1.10, Mon Dec 24 17:15:22 2007 UTC
# Line 1  Line 1 
1  <?php // $Id: conference_organizing.module,v 1.8 2007/10/15 01:35:50 zacker Exp $  <?php // $Id: conference_organizing.module,v 1.9 2007/11/05 23:42:58 zacker Exp $
2    
3  /**  /**
4   *  @file   *  @file
# Line 974  function conference_organizing_form_alte Line 974  function conference_organizing_form_alte
974   */   */
975  function conference_organizing_form_alter_hide_og(&$form, $group) {  function conference_organizing_form_alter_hide_og(&$form, $group) {
976    // make all posts private for 'closed' groups and public otherwise    // make all posts private for 'closed' groups and public otherwise
977    if ($group->og_selective == 3) {    if ($group->og_selective == OG_CLOSED) {
978      $form['og_nodeapi']['visible']['og_public']['#default_value'] = 0;      $form['og_nodeapi']['visible']['og_public']['#default_value'] = 0;
979    }    }
980    else {    else {
# Line 1226  function conference_organizing_nodeapi(& Line 1226  function conference_organizing_nodeapi(&
1226            $group = conference_organizing_get_conference_context();            $group = conference_organizing_get_conference_context();
1227    
1228            // if conference is closed and user is not a member display nice helper message            // if conference is closed and user is not a member display nice helper message
1229            if ($group->og_selective == 3 && !conference_organizing_access('group member', $group->nid)) {            if ($group->og_selective == OG_CLOSED && !conference_organizing_access('group member', $group->nid)) {
1230              $organizer = l($group->name, 'user/'. $group->uid .'/contact');              $organizer = l($group->name, 'user/'. $group->uid .'/contact');
1231              drupal_set_message(t("%group registration is closed, please contact $organizer if you would like to register.", array('%group' => $group->title)));              drupal_set_message(t("%group registration is closed, please contact $organizer if you would like to register.", array('%group' => $group->title)));
1232            }            }
# Line 1301  function conference_organizing_access($o Line 1301  function conference_organizing_access($o
1301        // conference_organizing_can_see_attendees        // conference_organizing_can_see_attendees
1302        if ($gid) {        if ($gid) {
1303          $group = node_load($gid);          $group = node_load($gid);
1304          if (($group->og_selective != 3) || (in_array($group->nid, array_keys($account->og_groups)))) {          if (($group->og_selective != OG_CLOSED) || (in_array($group->nid, array_keys($account->og_groups)))) {
1305            return TRUE;            return TRUE;
1306          }          }
1307        }        }
# Line 1815  function conference_organizing_block_con Line 1815  function conference_organizing_block_con
1815          'href' => 'post_conference/'. $group->nid,          'href' => 'post_conference/'. $group->nid,
1816        );        );
1817      }      }
1818      if (conference_organizing_access('group member', $group->nid) == FALSE) {      if (conference_organizing_access('group member', $group->nid) == FALSE && $group->og_selective == OG_OPEN) {
1819          $links[] = array(          $links[] = array(
1820            'title' => t('Sign Up'),            'title' => t('Sign Up'),
1821            'href' => 'og/subscribe/'. $group->nid,            'href' => 'og/subscribe/'. $group->nid,
# Line 1993  function conference_organizing_block_sit Line 1993  function conference_organizing_block_sit
1993    
1994    // if viewing a conference node and conference registration is open    // if viewing a conference node and conference registration is open
1995    if ($user->uid == 0 && arg(0) == 'node' && is_numeric(arg(1)) && $node = node_load(arg(1))) {    if ($user->uid == 0 && arg(0) == 'node' && is_numeric(arg(1)) && $node = node_load(arg(1))) {
1996      if (($node->og_selective <= 1) && ($node->type == 'webform')) {      if (($node->og_selective <= OG_OPEN) && ($node->type == 'webform')) {
1997        $block['subject'] = t('Register');        $block['subject'] = t('Register');
1998        $block['content'] = drupal_get_form('user_register', array('nid' => $node->nid));        $block['content'] = drupal_get_form('user_register', array('nid' => $node->nid));
1999      }      }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.2