Question about an install on 2.0.17

You'll automatically gain access to this forum when you will post your first post in another forum. That way it will demonstrate how the Auto Group MOD works.
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Question about an install on 2.0.17

Postby MonsterDK on Sat 03. Dec, 2005 14:15

Just installing Auto Group 1.2.2 now.

On this line..
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT post_id

I see this in my modcp.php 3 times. Should I add the code specified after all of the 3 references found, or is there a specific one?

The instructions look like they are not suppose to cover installed on anything above 2.0.6 which might explain why I have this problem. So far till now the instructions have been fine.


Regards,
MonsterDK
MonsterDK
Poster
Poster
 
Posts: 21
Joined: Sat 03. Dec, 2005 14:05

Postby MonsterDK on Sat 03. Dec, 2005 14:46

Question 2...

Instructions say...
Code: Select all
#-----[ FIND ]------------------------------------------
#
if ( $group_info['group_type'] == GROUP_CLOSED )
{
$group_details =  $lang['This_closed_group'];
$s_hidden_fields = '';
}
else if ( $group_info['group_type'] == GROUP_HIDDEN )
{
$group_details =  $lang['This_hidden_group'];
$s_hidden_fields = '';
}


Do I assume this is the correct change to make it correct for my install....


I find...
Code: Select all
else if ( $group_info['group_type'] == GROUP_CLOSED )
      {
         $group_details =  $lang['This_closed_group'];
         $s_hidden_fields = '';
      }
      else if ( $group_info['group_type'] == GROUP_HIDDEN )
      {
         $group_details =  $lang['This_hidden_group'];
         $s_hidden_fields = '';
      }


The above on my phpBB file includes the word else that is not in the instructions on the FIND instruction.

Do I assume the following to be the case?.....

The ORIGINAL REPLACE code is as follows taken from the instructions without any changed...

Code: Select all
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $group_info['group_type'] == GROUP_CLOSED )
{
if ($is_autogroup_enable)
{
   $template->assign_block_vars('switch_subscribe_group_input', array());
   $group_details =  sprintf ($lang['This_closed_group'],$lang['Join_auto']);
   $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
} else
{
   $group_details =  sprintf ($lang['This_closed_group'],$lang['No_more']);
   $s_hidden_fields = '';
}
      }
      else if ( $group_info['group_type'] == GROUP_HIDDEN )
      {
if ($is_autogroup_enable)
{
   $template->assign_block_vars('switch_subscribe_group_input', array());
   $group_details =  sprintf ($lang['This_hidden_group'],$lang['Join_auto']);
   $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
} else
{
   $group_details =  sprintf ($lang['This_closed_group'],$lang['No_add_allowed']);
   $s_hidden_fields = '';
}
}


Do I assume the following correct for my install in this case????

Code: Select all
#-----[ REPLACE WITH ]------------------------------------------
#
else if ( $group_info['group_type'] == GROUP_CLOSED )
{
if ($is_autogroup_enable)
{
   $template->assign_block_vars('switch_subscribe_group_input', array());
   $group_details =  sprintf ($lang['This_closed_group'],$lang['Join_auto']);
   $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
} else
{
   $group_details =  sprintf ($lang['This_closed_group'],$lang['No_more']);
   $s_hidden_fields = '';
}
      }
      else if ( $group_info['group_type'] == GROUP_HIDDEN )
      {
if ($is_autogroup_enable)
{
   $template->assign_block_vars('switch_subscribe_group_input', array());
   $group_details =  sprintf ($lang['This_hidden_group'],$lang['Join_auto']);
   $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
} else
{
   $group_details =  sprintf ($lang['This_closed_group'],$lang['No_add_allowed']);
   $s_hidden_fields = '';
}
}


Please advise...


Thanks!

[/code]
MonsterDK
Poster
Poster
 
Posts: 21
Joined: Sat 03. Dec, 2005 14:05

Postby Niels on Sun 04. Dec, 2005 00:23

the how-to is EM ready (tested with the version of phpBB2 that is documented in the how-to.
and should work with version higher than this - though not tested by me.

your firste qestion, should you change all 3 places - no, if it is only mentioned 1 time, you should only change it one place....witch to change ?

The how-to should be carried out in order, this mean you start at the to of the file, and do the steps according to this order - you should this way find the correct place to change the code....


your 2. question:
I have looked into this, and by looking at the code, it seam like phpBB2 have had a slight preformance improvement (adding the else in front)
it really doesen't mater for the functionallity, so you may run the how-to as it is, or (preferble) change it to leading "else"

#-----[ REPLACE WITH ]------------------------------------------
#
else if ( $group_info['group_type'] == GROUP_CLOSED )
{
if ($is
.
.


I will keep the how-to as it is, as it should be backwards compatible with older versions of phpBB2, and still work with the newest...
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Auto group [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron