[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

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25388
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [2.0.21] Invitation_Only_U2U

Post by Paul » Fri Dec 07, 2007 8:08 am

You will need to replace all instances of phpbb_ with forum_ :)
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Hannibal_King
Registered User
Posts: 436
Joined: Mon Apr 03, 2006 6:24 am
Location: SLOVAKIA
Contact:

mass mail - weird problem

Post by Hannibal_King » Sat Dec 22, 2007 9:19 pm

Hello, its christmas and i as an admin of one forum would like to send mass mail to all members, but i have weird problem now and i need your help guys :(
i have installed Invitation Only U2U ("Gmail invites") phpBB.de - Edition 1.0.4a and everything is working fine, after installation that was few months ago i checked everything, every functions that has something to do with the mod and all wroks fine, except one thing that i discovered right now :( I wanted to send the mass mail.. s i wrote the mail and i was trying to send it but nothing.. no email was sent to anybody. and where i think the problem is? i think it has something to do with the invitations.. because after i submitted the form with mass mail instead "Your message has been sent" there was "Invitation-Email sent." and as i said, no email was send :( Does anybody know where the problem could be?
Or can anybody tell me how could i send mass mail to all member on forum via php my admin? is it possible to do this please?

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

Re: [2.0.21] Invitation_Only_U2U

Post by Kellanved » Sat Dec 22, 2007 11:53 pm

The MOD doesn't affect the mass email mechanism.
Nocando is in Idontwanna county. No support via PM

Hannibal_King
Registered User
Posts: 436
Joined: Mon Apr 03, 2006 6:24 am
Location: SLOVAKIA
Contact:

Re: [2.0.21] Invitation_Only_U2U

Post by Hannibal_King » Sun Dec 23, 2007 8:22 am

hmm so why after sending the mass email there is "Invitation-Email sent." instead of "Your message has been sent"? this has something to do with the mod..

my admin_mass_email.php file:

Code: Select all

<?php
/***************************************************************************
*                             admin_mass_email.php
*                              -------------------
*     begin                : Thu May 31, 2001
*     copyright            : (C) 2001 The phpBB Group
*     email                : support@phpbb.com
*
*     $Id: admin_mass_email.php,v 1.15.2.7 2003/05/03 23:24:01 acydburn Exp $
*
****************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', 1);

if( !empty($setmodules) )
{
	$filename = basename(__FILE__);
	$module['General']['Mass_Email'] = $filename;
	
	return;
}

//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);

//
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
// allowed.
//
@set_time_limit(1200);

$message = '';
$subject = '';

//
// Do the job ...
//
if ( isset($HTTP_POST_VARS['submit']) )
{
	$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
	$message = stripslashes(trim($HTTP_POST_VARS['message']));
	
	$error = FALSE;
	$error_msg = '';

	if ( empty($subject) )
	{
		$error = true;
		$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject'];
	}

	if ( empty($message) )
	{
		$error = true;
		$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
	}

	$group_id = intval($HTTP_POST_VARS[POST_GROUPS_URL]);

//-- mod : No mass mail to banned members ------------------------------------------------------------
//-- add
	if ( $group_id != -1 )
	{
		$sql = 'SELECT u.user_email FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
			LEFT JOIN " . BANLIST_TABLE . " b ON u.user_id = b.ban_userid
				WHERE ug.group_id = $group_id
				AND ug.user_pending <> " . TRUE . '
				AND u.user_id = ug.user_id
				AND ISNULL( b.ban_userid )';
	}
	else
	{
		$sql = 'SELECT u.user_email FROM ' . USERS_TABLE . " u
			LEFT JOIN " . BANLIST_TABLE . " b ON u.user_id = b.ban_userid
				WHERE ISNULL( b.ban_userid )";
	}
//-- fin mod : No mass mail to banned members --------------------------------------------------------
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not select group members', '', __LINE__, __FILE__, $sql);
	}

	if ( $row = $db->sql_fetchrow($result) )
	{
		$bcc_list = array();
		do
		{
			$bcc_list[] = $row['user_email'];
		}
		while ( $row = $db->sql_fetchrow($result) );

		$db->sql_freeresult($result);
	}
	else
	{
		$message = ( $group_id != -1 ) ? $lang['Group_not_exist'] : $lang['No_such_user'];

		$error = true;
		$error_msg .= ( !empty($error_msg) ) ? '<br />' . $message : $message;
	}

	if ( !$error )
	{
		include($phpbb_root_path . 'includes/emailer.'.$phpEx);

		//
		// Let's do some checking to make sure that mass mail functions
		// are working in win32 versions of php.
		//
		if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery'])
		{
			$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';

			// We are running on windows, force delivery to use our smtp functions
			// since php's are broken by default
			$board_config['smtp_delivery'] = 1;
			$board_config['smtp_host'] = @$ini_val('SMTP');
		}

		$emailer = new emailer($board_config['smtp_delivery']);
	
		$emailer->from($board_config['board_email']);
		$emailer->replyto($board_config['board_email']);

		for ($i = 0; $i < count($bcc_list); $i++)
		{
			$emailer->bcc($bcc_list[$i]);
		}

		$email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
		$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
		$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
		$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";

		$emailer->use_template('admin_send_email');
		$emailer->email_address($board_config['board_email']);
		$emailer->set_subject($subject);
		$emailer->extra_headers($email_headers);

		$emailer->assign_vars(array(
			'SITENAME' => $board_config['sitename'], 
			'BOARD_EMAIL' => $board_config['board_email'], 
			'MESSAGE' => $message)
		);
		$emailer->send();
		$emailer->reset();

		message_die(GENERAL_MESSAGE, $lang['Email_sent'] . '<br /><br />' . sprintf($lang['Click_return_admin_index'],  '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'));
	}
}	

if ( $error )
{
	$template->set_filenames(array(
		'reg_header' => 'error_body.tpl')
	);
	$template->assign_vars(array(
		'ERROR_MESSAGE' => $error_msg)
	);
	$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}

//
// Initial selection
//

$sql = "SELECT group_id, group_name 
	FROM ".GROUPS_TABLE . "  
	WHERE group_single_user <> 1";
if ( !($result = $db->sql_query($sql)) ) 
{
	message_die(GENERAL_ERROR, 'Could not obtain list of groups', '', __LINE__, __FILE__, $sql);
}

$select_list = '<select name = "' . POST_GROUPS_URL . '"><option value = "-1">' . $lang['All_users'] . '</option>';
if ( $row = $db->sql_fetchrow($result) )
{
	do
	{
		$select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
	}
	while ( $row = $db->sql_fetchrow($result) );
}
$select_list .= '</select>';

//
// Generate page
//
include('./page_header_admin.'.$phpEx);

$template->set_filenames(array(
	'body' => 'admin/user_email_body.tpl')
);

$template->assign_vars(array(
	'MESSAGE' => $message,
	'SUBJECT' => $subject, 

	'L_EMAIL_TITLE' => $lang['Email'],
	'L_EMAIL_EXPLAIN' => $lang['Mass_email_explain'],
	'L_COMPOSE' => $lang['Compose'],
	'L_RECIPIENTS' => $lang['Recipients'],
	'L_EMAIL_SUBJECT' => $lang['Subject'],
	'L_EMAIL_MSG' => $lang['Message'],
	'L_EMAIL' => $lang['Email'],
	'L_NOTICE' => $notice,

	'S_USER_ACTION' => append_sid('admin_mass_email.'.$phpEx),
	'S_GROUP_SELECT' => $select_list)
);

$template->pparse('body');

include('./page_footer_admin.'.$phpEx);

?>
//i havent found anything strange in it :(

elsbeth
Registered User
Posts: 1
Joined: Fri Jan 04, 2008 6:44 pm

Re: [2.0.21] Invitation_Only_U2U

Post by elsbeth » Fri Jan 04, 2008 6:48 pm

Little problem. Tried installing with EasyMod on version 2.0.17 and got the following error:

Critical Error

FIND FAILED: In file [includes/usercp_register.php] could not find:

$strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim'

MOD script line #366

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25388
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [2.0.21] Invitation_Only_U2U

Post by Paul » Fri Jan 04, 2008 7:30 pm

I would suggest you to upgrade to 2.0.22, and also that you install the MOD by hand :).
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

dankybett
Registered User
Posts: 18
Joined: Fri Feb 29, 2008 12:57 pm

Re: [2.0.21] Invitation_Only_U2U

Post by dankybett » Fri Feb 29, 2008 1:02 pm

Please help, I have been trying to instal this mod using easymod but I just get this error:

Critical Error

FIND FAILED: In file [includes/usercp_register.php] could not find:

$template->assign_block_vars('switch_confirm', array());
}

MOD script line #432 :: FAQ :: Report

Iam really new to this, so if anyone could walk me through what to do it would be greatly appreciated.
Thanks in advance.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25388
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [2.0.21] Invitation_Only_U2U

Post by Paul » Fri Feb 29, 2008 5:47 pm

Try installing it by hand :).
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
meadwench
Registered User
Posts: 1
Joined: Thu Apr 24, 2008 6:37 am

Re: [2.0.21] Invitation_Only_U2U

Post by meadwench » Thu Apr 24, 2008 6:48 am

Hello,

I've read all the posts in the thread, but had a couple questions. I've been asked to change a forum for a group I'm a member of, and they'd like to have restricted boards, and member-only (by invitation) access to these boards.

Here are my questions:

- the invitation numbers would need to be the member's ID number, which he knows (so we don't need to send a specific invite code, just a request for them to use their ID to access). Can the system be set (either manually or via the admin, I'm ok with manual DB changes) so that a discrete list of member ID's are created in the invitation table, and when a member gets the invitation email, it would just say 'please enter your ID number to access the members-only area'. When they enter their code, the system should then note that the particular ID number is no longer available for invites, so that later people can't grab the number.

- Do I need to create an 'unlimited' access code for non-members to access the open areas of the board, or will they still be able to access it without this (i.e. can only certain members be invited to the restricted area via their ID number, leaving the 'regular' members with no changes)?)

Thanks for any insights. I'm going to make a backup of the board on another hosting space to play with while I work on it, but was hoping for these clarifications.
Thanks!!

Vicky Rowe
Satori Digital Marketing
Gotmead.com

aleksa
Registered User
Posts: 1
Joined: Mon Aug 11, 2008 9:17 pm

Re: [2.0.21] Invitation_Only_U2U

Post by aleksa » Mon Aug 11, 2008 10:14 pm

I set MOD, but in an administrator panel in place of "List" I see a white screen

Where to search an error?

Thank you!

P.S. Error corrected, a question is abolished

User avatar
Cama
Registered User
Posts: 21
Joined: Sun Sep 16, 2007 9:39 pm

Re: [2.0.21] Invitation_Only_U2U

Post by Cama » Mon Oct 20, 2008 2:46 pm

It is used "eXtreme Styles mod". It is necessary to make so that at job" Invitation Only U2U" the cache was not used. As it to make I do not know...

Post Reply

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