[2.0.21] Invitation_Only_U2U

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
37
73%
Very Good
9
18%
Good
2
4%
Fair
1
2%
Poor
2
4%
 
Total votes: 51

GTF
Registered User
Posts: 29
Joined: Fri May 12, 2006 3:15 pm

Post by GTF » Fri May 12, 2006 4:09 pm

EasyMod

User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved » Fri May 12, 2006 11:40 pm

Ok, it is officially strange then.

How were the invites handed out? Where they given by/for a group?

GTF
Registered User
Posts: 29
Joined: Fri May 12, 2006 3:15 pm

Post by GTF » Sat May 13, 2006 1:12 am

In the Administrative Panel, in the Invite section, I assigned the Group a number of invites. At this point only the Mod is a member, and the assigned number of invites is being listed for the Mod. (Although I did try test adding a member to see if that would change the behavior and it didn't.)

After testing inviting, I also readded back in the prior tested/used invite via the Administrative Invite Panel, which I believe I added back directly via the Mod's user name rather than the Group. (But now can't remember for sure). But the behavior was present from the get-go, long before I did that.

In both rounds of testing, the behavior is: if you click on the top link for Invite a friend having the (No invites left) wording listed to the right of the link, the Group Mod can send out an invitation. All aspects of the invitation being mailed, received, using the link and invite code to register and join - all work fine. I also assigned invites to myself as Admin (a different number) and as with the Group, the behaviors are the same.

The (No invites left) remains ever there.

I've also since noticed that in the Profile area for the Mod (or for me as Admin) - when you click on the number of invites remaining, it throws a 404 error rather than doing anything else.

But as long as you just click on the top link to Invite a friend - it works fine.

Since last responding here:

I tried to test-remove the (No invites left) wording in the language file to see what would happen - but the wording still appeared despite its absence from the language file, so I put it back.

I next even went so far as to completely drop all mysql tables and data inserts in the database, reinstalled the forum, then EasyMod and then lastly this mod, thinking perhaps I had a corrupt mod installation - but the symptoms remained after reinstalling.

Since removing the wording from the language file had no impact whatsoever, I'm wondering if that may point to it being database-related.

BTW: I have now restored the database backup I'd made prior to reinstalling the forum and two above mods - not wanting to lose all my work entirely. I can live with the odd behavior - and can just post an explanatory note to disregard the (No invites left) message.

User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved » Sat May 13, 2006 8:39 am

No actually the behavior is not weird. Invites given to a group (to be used by the moderator) are not included in the header. Hence the "no invites left".

There is an option to "hide" the link in the header, for this precise reason. ( the - at the moment flawed - link on the group panel is intended as a replacement).

My reason for not factoring in the invites given to groups is that those are stored in the groups table. It would have required a rather ugly new database query on each single page, just to look up the number.
I tried to write the mod with as little an overhead as possible, thus an additional query was completely out of question.

You can change the look in the overall_header.tpl template file.

Me-Crazy
I've Been Banned!
Posts: 142
Joined: Thu Apr 27, 2006 4:45 am

Post by Me-Crazy » Sat May 13, 2006 12:51 pm

What is the instruction for installation this MOD?

GTF
Registered User
Posts: 29
Joined: Fri May 12, 2006 3:15 pm

Post by GTF » Sat May 13, 2006 2:05 pm

Oh, I get it now. I didn't realize I hadn't actually assigned invites to the Mod as an individual user, only assigned them under his Group.

(And while the Mods are able to use the Group's invites, the Group's invites aren't going to show up at the top when the Mod is logged in.)

I've found where to assign INDIVIDUALS invites. In case anyone else might find it useful, I'll outline exactly where you give INDIVIDUALS (as opposed to a group) a number of invites:

In the Administration Panel Invites section, click on Information.

At the next screen, input a user name.

Once you have the user listed, click on Lookup user - that takes you to the User Invite Stats screen, which will have the user listed.

Click on Lookup user again at the User Invite Stats screen displaying the user you specified in the prior step.

That takes you to the User Administration screen.

Scroll to the bottom. The last section under User Administration has a field for adding a number of invites. You assign whatever number of invites you want to that particular user, click on submit, and Presto Domino - the (No invites left) message at the top of forum navigation is replaced with the number of invites the user has (visible only after they have logged in).

User avatar
Siava
Registered User
Posts: 134
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Post by Siava » Sun May 14, 2006 4:39 pm

Kellanved, Thanks, great mod! :)

But in the instruction 1.0.3a I found small mistake:
#
#-----[ OPEN ]------------------------------------------
#
groupcp.php
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('switch_add_member', array());
#
#-----[ AFTER, ADD ]------------------------------------------
#

//BEGIN Invitation Only U2U MOD
if ($board_config['invite_u2u']==2 || (!empty($group_info['group_invites']) &&$board_config['invite_u2u']==1 ))
{
if (empty($group_info['group_invites']))
{
$invites_text = $lang['No_invites'];
}
elseif ($group_info['group_invites'] == 1)
{
$invites_text = $lang['One_invite_left'];
}
else
{
$invites_text = $group_info['group_invites'] .' '.$lang['Invites_left'];
}

$template->assign_block_vars('switch_invite_option', array());
$template->assign_vars(array(
'L_SEND_INVITE' => $lang['Send_invite'],
'L_SEND_INVITE_EXPLAIN' => $lang['Group_send_invite_explain'],
'INVITE_LINK' => append_sid("invite.$phpEx&".POST_GROUPS_URL."=$group_id&mode=group",true),
'INVITES_LEFT' => $invites_text
));

}
//END Invitation Only U2U MOD


This code is correct:
#
#-----[ OPEN ]------------------------------------------
#
groupcp.php
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('switch_add_member', array());
#
#-----[ AFTER, ADD ]------------------------------------------
#

//BEGIN Invitation Only U2U MOD
if ($board_config['invite_u2u']==2 || (!empty($group_info['group_invites']) &&$board_config['invite_u2u']==1 ))
{
if (empty($group_info['group_invites']))
{
$invites_text = $lang['No_invites'];
}
elseif ($group_info['group_invites'] == 1)
{
$invites_text = $lang['One_invite_left'];
}
else
{
$invites_text = $group_info['group_invites'] .' '.$lang['Invites_left'];
}

$template->assign_block_vars('switch_invite_option', array());
$template->assign_vars(array(
'L_SEND_INVITE' => $lang['Send_invite'],
'L_SEND_INVITE_EXPLAIN' => $lang['Group_send_invite_explain'],
'INVITE_LINK' => append_sid("invite.$phpEx?".POST_GROUPS_URL."=$group_id&mode=group",true),
'INVITES_LEFT' => $invites_text
));

}
//END Invitation Only U2U MOD

User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved » Sun May 14, 2006 4:44 pm

Siava wrote: Kellanved, Thanks, great mod! :)

But in the instruction 1.0.3a I found small mistake:


My pleasure.

Thanks for the feedback, it's among the things that will be fixed in the next release.

-link on groupcp
-pagination of the list


BTW :
http://www.phpbb.com/phpBB/viewtopic.ph ... 58#2093758 :D

Skull Guardian
Registered User
Posts: 3
Joined: Fri May 19, 2006 4:46 am

Post by Skull Guardian » Fri May 19, 2006 5:09 am

Fantastic MOD! I'm looking for a MOD like this a lot of time !!!! :P

I have a little problem ... This error below appeared to me in phpBB Administration >> Configure Invitations

Warning: Invalid argument supplied for foreach() in public_html\forums\admin\admin_invites_config.php on line 308

What I have to do to fix this ?



PS: My english is very poor.

Me-Crazy
I've Been Banned!
Posts: 142
Joined: Thu Apr 27, 2006 4:45 am

Post by Me-Crazy » Fri May 19, 2006 10:53 am

Hi all last time I tried to install this MOD, i had problem with logging to c´panel also with admins c`panel. Can somebody guide me?

Also someone guide me to install SQL. I just creat these tow tabvles on SQL

Code: Select all

#-----[ SQL ]------------------------------------------ 
# 
CREATE TABLE phpbb_invitations (
	invitation_id MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
	invitation_code VARCHAR( 8 ) NOT NULL ,
	invitation_description TEXT NOT NULL,
	invitation_uses MEDIUMINT( 8 ) NOT NULL DEFAULT '1',
	invitation_sender MEDIUMINT( 8 ) NOT NULL DEFAULT '0',
	invitation_group MEDIUMINT( 8 ) NOT NULL DEFAULT '0',
	invitation_group_auto_activate TINYINT( 1 ) NOT NULL DEFAULT '0',
	invitation_email TEXT NOT NULL,
	PRIMARY KEY ( invitation_id ) 
);

Code: Select all



CREATE TABLE phpbb_invitation_users (
	invitation_id MEDIUMINT( 8 ) NOT NULL,
	user_id MEDIUMINT( 8 ) NOT NULL,	
	PRIMARY KEY ( user_id ) 
);	

INSERT INTO phpbb_config ( config_name , config_value ) 
	VALUES ('invitation_only', '2');
	
INSERT INTO phpbb_config ( config_name , config_value ) 
	VALUES ('invite_u2u', '2');
 
	
INSERT INTO phpbb_config ( config_name , config_value ) 
	VALUES ('additional_rules', '');
 
ALTER TABLE phpbb_users ADD user_invites MEDIUMINT( 8 ) NOT NULL DEFAULT '0';

ALTER TABLE phpbb_groups ADD group_invites MEDIUMINT( 8 ) NOT NULL DEFAULT '0';
	
#
And this, I don´t know the rest of this guidence, so please explain it!

Code: Select all

INSERT INTO phpbb_config ( config_name , config_value ) 
	VALUES ('invitation_only', '2');
	
INSERT INTO phpbb_config ( config_name , config_value ) 
	VALUES ('invite_u2u', '2');
 
	
INSERT INTO phpbb_config ( config_name , config_value ) 
	VALUES ('additional_rules', '');
 
ALTER TABLE phpbb_users ADD user_invites MEDIUMINT( 8 ) NOT NULL DEFAULT '0';

ALTER TABLE phpbb_groups ADD group_invites MEDIUMINT( 8 ) NOT NULL DEFAULT '0';
	
#

User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved » Fri May 19, 2006 5:03 pm

Skull Guardian wrote: Fantastic MOD! I'm looking for a MOD like this a lot of time !!!! :P

I have a little problem ... This error below appeared to me in phpBB Administration >> Configure Invitations

Warning: Invalid argument supplied for foreach() in public_html\forums\admin\admin_invites_config.php on line 308

What I have to do to fix this ?



PS: My english is very poor.


Truth be told: I have never encountered that error before.
Do you have a mod affecting the ranks system installed? What database system are you using and which PHP version?

@Me-Crazy:
I don't understand where you are stuck.
My basic recommendation ist to use easymod for the installation, as the manual editing of files yields unreproducable errors.

Skull Guardian
Registered User
Posts: 3
Joined: Fri May 19, 2006 4:46 am

Post by Skull Guardian » Fri May 19, 2006 6:31 pm

Kellanved wrote:
Skull Guardian wrote:Fantastic MOD! I'm looking for a MOD like this a lot of time !!!! :P

I have a little problem ... This error below appeared to me in phpBB Administration >> Configure Invitations

Warning: Invalid argument supplied for foreach() in public_html\forums\admin\admin_invites_config.php on line 308

What I have to do to fix this ?



PS: My english is very poor.


Truth be told: I have never encountered that error before.
Do you have a mod affecting the ranks system installed? What database system are you using and which PHP version?


I installed these mods: Yellow Card, Cash Mod, Cracker Tracker, Rules Management, Inactive Users, DB Maintenance, Toic Description and Color Groups.
I'm using PHP 5.1.2 AND MySQL 5.
Note: My default template in my phpBB is FI Black 3D Blue

Image

User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved » Fri May 19, 2006 7:34 pm

Hmm. Are there any values in the rank dropbox?

Me-Crazy
I've Been Banned!
Posts: 142
Joined: Thu Apr 27, 2006 4:45 am

Post by Me-Crazy » Fri May 19, 2006 8:32 pm

Kellanved wrote: @Me-Crazy:
I don't understand where you are stuck.
My basic recommendation ist to use easymod for the installation, as the manual editing of files yields unreproducable errors.


Thanks, for replaing me. I´m tring to install it, but one thing I have to recommand it in here, and asking one question i´v to ask you, as you know i´m tring to install this MOD, but I get nothing, look at bolow pic!

Image


Also this query is missing, look and find the sulotion.

Code: Select all

				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) .  
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$avatar_sql . "

User avatar
Siava
Registered User
Posts: 134
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Post by Siava » Fri May 19, 2006 8:34 pm

Me-Crazy, copy mods language files to your language folder =)

Post Reply

Return to “[2.0.x] MOD Database Releases”