[Beta] Paypal IPN GROUP Subscription MOD [1.1.3]

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
wb6vpm
Registered User
Posts: 35
Joined: Fri Dec 23, 2005 11:12 pm

Post by wb6vpm »

edited see first post
Last edited by wb6vpm on Fri Aug 04, 2006 6:14 pm, edited 2 times in total.
found it
Registered User
Posts: 215
Joined: Mon Oct 25, 2004 8:51 am
Contact:

Post by found it »

yes basically when you added the code to the template file you did not do it correctly and left these tags in by mistake...

'/>'

though I have to say placing all you code on nearly 2 pages of a forum doesnt help anyone as I for one wouldnt look through it.....

how about copying it to a text file and uploading it and then leaving a link here....for those who might want to look.....

Just my oppinion...

:twisted: :twisted:
User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

found it wrote: though I have to say placing all you code on nearly 2 pages of a forum doesnt help anyone as I for one wouldnt look through it.....

how about copying it to a text file and uploading it and then leaving a link here....for those who might want to look.....

Just my oppinion...

:twisted: :twisted:


Yeah I agree as well, that was totally horrible... :roll:
Always Under Construction !
wb6vpm
Registered User
Posts: 35
Joined: Fri Dec 23, 2005 11:12 pm

Post by wb6vpm »

sorry, since i dont know php very well, i have no idea as to what would be relavant (ie just pull that portion out) it is kkinda hard for me to say this is what we will need, so i posted the text here and i didnt think about it, sorry i will edit it, and have it all in text files
wb6vpm
Registered User
Posts: 35
Joined: Fri Dec 23, 2005 11:12 pm

Post by wb6vpm »

also (for once i get this fixed) how do i change this, to something else:

you are our common member

(also, where can i see what all the different options are?)
wb6vpm
Registered User
Posts: 35
Joined: Fri Dec 23, 2005 11:12 pm

Post by wb6vpm »

found it wrote: yes basically when you added the code to the template file you did not do it correctly and left these tags in by mistake...

'/>'

though I have to say placing all you code on nearly 2 pages of a forum doesnt help anyone as I for one wouldnt look through it.....

how about copying it to a text file and uploading it and then leaving a link here....for those who might want to look.....

Just my oppinion...

:twisted: :twisted:


ok, now that i have cleaned it up (and i do apologize for it) can you see where i made the error? i have been looking at it for a few days, and cannot find the error!

much thanks! (and apologies)
Tom1988
Registered User
Posts: 1
Joined: Wed Aug 09, 2006 1:29 pm

Where?

Post by Tom1988 »

Is this MOD in the MOD-Database yet??

Anyone help me out - im looking to have paypal subscription for people to become members.

Any help would be great

:D
sandodo
Registered User
Posts: 278
Joined: Mon Jul 19, 2004 7:13 am
Location: 11111111
Contact:

Post by sandodo »

wb6vpm wrote:
found it wrote:yes basically when you added the code to the template file you did not do it correctly and left these tags in by mistake...

'/>'

though I have to say placing all you code on nearly 2 pages of a forum doesnt help anyone as I for one wouldnt look through it.....

how about copying it to a text file and uploading it and then leaving a link here....for those who might want to look.....

Just my oppinion...

:twisted: :twisted:


ok, now that i have cleaned it up (and i do apologize for it) can you see where i made the error? i have been looking at it for a few days, and cannot find the error!

much thanks! (and apologies)


I have answered your question in my forum, you can go to check it out.
Tom1988 wrote: Is this MOD in the MOD-Database yet??

It is not.
My site - based on PHPBB
http://www.singapurate.com
Daz wilde
Registered User
Posts: 147
Joined: Mon Mar 20, 2006 7:01 pm

Post by Daz wilde »

wb6vpm wrote: also (for once i get this fixed) how do i change this, to something else:

you are our common member

(also, where can i see what all the different options are?)


Yeah i would like to ammend this aswell.
redcrusher
Registered User
Posts: 11
Joined: Sun Jan 05, 2003 5:48 am

Post by redcrusher »

When ever i try and creat a new group, i get a message that says :

Code: Select all

No action was specified
how do i fix this?
sopas
Registered User
Posts: 275
Joined: Mon Feb 09, 2004 3:46 am

Re: [Beta] Paypal IPN GROUP Subscription MOD [1.1.3]

Post by sopas »

Hello,

I have only one question and I was wondering if anyone could help me.

Is there any way to delete a donor from the database so it does not appear in the donor list anymore?

What files do I have to edit?

Thank you very much
Sanctudei
Registered User
Posts: 1
Joined: Sat Jun 02, 2007 8:05 pm

Re: [Beta] Paypal IPN GROUP Subscription MOD [1.1.3]

Post by Sanctudei »

I could use a hand with this...I followed all the directions but when I went to access the forum I got this error:

Parse error: parse error, unexpected $ in /home/dasaionl/public_html/cult_kruex/includes/auth.php on line 383

Any clues?

The code I have in auth.pup:

<?php


//-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------
/***************************************************************************
* auth.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : [email protected]
*
* $Id: auth.php,v 1.37.2.7 2006/03/06 17:28:51 grahamje 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.
*
***************************************************************************/

/*
$type's accepted (pre-pend with AUTH_):
VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, POLLCREATE

Possible options ($type/forum_id combinations):

* If you include a type and forum_id then a specific lookup will be done and
the single result returned

* If you set type to AUTH_ALL and specify a forum_id an array of all auth types
will be returned

* If you provide a forum_id a specific lookup on that forum will be done

* If you set forum_id to AUTH_LIST_ALL and specify a type an array listing the
results for all forums will be returned

* If you set forum_id to AUTH_LIST_ALL and type to AUTH_ALL a multidimensional
array containing the auth permissions for all types and all forums for that
user is returned

All results are returned as associative arrays, even when a single auth type is
specified.

If available you can send an array (either one or two dimensional) containing the
forum auth levels, this will prevent the auth function having to do its own
lookup
*/
function auth($type, $forum_id, $userdata, $f_access = '')
{
global $db, $lang; //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------
//-- add
global $board_config;
//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------

switch( $type )
{
case AUTH_ALL:
$a_sql = 'a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_vote, a.auth_pollcreate';
$auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
break;

case AUTH_VIEW:
$a_sql = 'a.auth_view';
$auth_fields = array('auth_view');
break;

case AUTH_READ:
$a_sql = 'a.auth_read';
$auth_fields = array('auth_read');
break;
case AUTH_POST:
$a_sql = 'a.auth_post';
$auth_fields = array('auth_post');
break;
case AUTH_REPLY:
$a_sql = 'a.auth_reply';
$auth_fields = array('auth_reply');
break;
case AUTH_EDIT:
$a_sql = 'a.auth_edit';
$auth_fields = array('auth_edit');
break;
case AUTH_DELETE:
$a_sql = 'a.auth_delete';
$auth_fields = array('auth_delete');
break;

case AUTH_ANNOUNCE:
$a_sql = 'a.auth_announce';
$auth_fields = array('auth_announce');
break;
case AUTH_STICKY:
$a_sql = 'a.auth_sticky';
$auth_fields = array('auth_sticky');
break;

case AUTH_POLLCREATE:
$a_sql = 'a.auth_pollcreate';
$auth_fields = array('auth_pollcreate');
break;
case AUTH_VOTE:
$a_sql = 'a.auth_vote';
$auth_fields = array('auth_vote');
break;
case AUTH_ATTACH:
break;

default:
break;
}

//
// If f_access has been passed, or auth is needed to return an array of forums
// then we need to pull the auth information on the given forum (or all forums)
//
if ( empty($f_access) )
{
$forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "WHERE a.forum_id = $forum_id" : '';

$sql = "SELECT a.forum_id, $a_sql
FROM " . FORUMS_TABLE . " a
$forum_match_sql";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql);
}

$sql_fetchrow = ( $forum_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset';

if ( !($f_access = $db->$sql_fetchrow($result)) )
{
$db->sql_freeresult($result);
return array();
}
$db->sql_freeresult($result);
}

//
// If the user isn't logged on then all we need do is check if the forum
// has the type set to ALL, if yes they are good to go, if not then they
// are denied access
//
$u_access = array();
if ( $userdata['session_logged_in'] )
{
$forum_match_sql = ( $forum_id != AUTH_LIST_ALL ) ? "AND a.forum_id = $forum_id" : '';

$sql = "SELECT a.forum_id, $a_sql, a.auth_mod
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id = ".$userdata['user_id']. "
AND ug.user_pending = 0
AND a.group_id = ug.group_id
$forum_match_sql";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
do
{
if ( $forum_id != AUTH_LIST_ALL)
{
$u_access[] = $row;
}
else
{
$u_access[$row['forum_id']][] = $row;
}
}
while( $row = $db->sql_fetchrow($result) );
}
$db->sql_freeresult($result);
}

$is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0;

$auth_user = array();
for($i = 0; $i < count($auth_fields); $i++)
{
$key = $auth_fields[$i];

//
// If the user is logged on and the forum type is either ALL or REG then the user has access
//
// If the type if ACL, MOD or ADMIN then we need to see if the user has specific permissions
// to do whatever it is they want to do ... to do this we pull relevant information for the
// user (and any groups they belong to)
//
// Now we compare the users access level against the forums. We assume here that a moderator
// and admin automatically have access to an ACL forum, similarly we assume admins meet an
// auth requirement of MOD
//
if ( $forum_id != AUTH_LIST_ALL )
{
$value = $f_access[$key];

switch( $value )
{
case AUTH_ALL:
$auth_user[$key] = TRUE;
$auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;

case AUTH_REG:
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
$auth_user[$key . '_type'] = $lang['Auth_Registered_Users'];
break;

case AUTH_ACL:
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access, $is_admin) : 0;
$auth_user[$key . '_type'] = $lang['Auth_Users_granted_access'];
break;

case AUTH_MOD:
$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
$auth_user[$key . '_type'] = $lang['Auth_Moderators'];
break;

case AUTH_ADMIN:
$auth_user[$key] = $is_admin;
$auth_user[$key . '_type'] = $lang['Auth_Administrators'];
break;

default:
$auth_user[$key] = 0;
break;
}
}
else
{
for($k = 0; $k < count($f_access); $k++)
{
$value = $f_access[$k][$key];
$f_forum_id = $f_access[$k]['forum_id'];
$u_access[$f_forum_id] = isset($u_access[$f_forum_id]) ? $u_access[$f_forum_id] : array();

switch( $value )
{
case AUTH_ALL:
$auth_user[$f_forum_id][$key] = TRUE;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;

case AUTH_REG:
$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? TRUE : 0;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Registered_Users'];
break;

case AUTH_ACL:
$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access[$f_forum_id], $is_admin) : 0;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Users_granted_access'];
break;

case AUTH_MOD:
$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Moderators'];
break;

case AUTH_ADMIN:
$auth_user[$f_forum_id][$key] = $is_admin;
$auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Administrators'];
break;

default:
$auth_user[$f_forum_id][$key] = 0;
break;
}
}
}
}

//-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------
//-- add
//is user a vip?
$uservip = 0;
if($userdata['user_rank'] > 0)
{
$sql = "SELECT r.rank_id, r.rank_title
FROM " . RANKS_TABLE . " r
WHERE r.rank_id = " . $userdata['user_rank'];
if ( ($resultr = $db->sql_query($sql)) )
{
if( $rowr = $db->sql_fetchrow($resultr) )
{
if(strcmp($rowr['rank_title'], VIP_RANK_TITLE) == 0)
{
$uservip = 1;
}
}
}
}
//or is it a temp vip: within trial period
if($userdata['user_expire_date'] == 0 && time() <= ( $userdata['user_expire_date'] == 0 ? ($userdata['user_regdate'] + intval($board_config['lw_trial_period']) * 24 * 60 * 60) : (time() - 100) ))
{
$uservip = 1;
}
//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP ----------------------------------------------------------- //
// Is user a moderator?
//
if ( $forum_id != AUTH_LIST_ALL )
{
$auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
//-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------
if($uservip == 1)
{
$auth_user['auth_view'] = TRUE;
$auth_user['auth_read'] = TRUE;
$auth_user['auth_post'] = TRUE;
$auth_user['auth_reply'] = TRUE;
$auth_user['auth_edit'] = TRUE;
$auth_user['auth_delete'] = TRUE;
$auth_user['auth_vote'] = TRUE;
$auth_user['auth_pollcreate'] = TRUE;
}
//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP ----------------------------------------------------------- }
else
{
for($k = 0; $k < count($f_access); $k++)
{
$f_forum_id = $f_access[$k]['forum_id'];
$u_access[$f_forum_id] = isset($u_access[$f_forum_id]) ? $u_access[$f_forum_id] : array();

$auth_user[$f_forum_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0; //-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------
if($uservip == 1)
{
$auth_user[$f_forum_id]['auth_view'] = TRUE;
$auth_user[$f_forum_id]['auth_read'] = TRUE;
$auth_user[$f_forum_id]['auth_post'] = TRUE;
$auth_user[$f_forum_id]['auth_reply'] = TRUE;
$auth_user[$f_forum_id]['auth_edit'] = TRUE;
$auth_user[$f_forum_id]['auth_delete'] = TRUE;
$auth_user[$f_forum_id]['auth_vote'] = TRUE;
$auth_user[$f_forum_id]['auth_pollcreate'] = TRUE;
}
//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP -----------------------------------------------------------
}
}

return $auth_user;
}

function auth_check_user($type, $key, $u_access, $is_admin)
{
$auth_user = 0;

if ( count($u_access) )
{
for($j = 0; $j < count($u_access); $j++)
{
$result = 0;
switch($type)
{
case AUTH_ACL:
$result = $u_access[$j][$key];

case AUTH_MOD:
$result = $result || $u_access[$j]['auth_mod'];

case AUTH_ADMIN:
$result = $result || $is_admin;
break;
}

$auth_user = $auth_user || $result;
}
}
else
{
$auth_user = $is_admin;
}

return $auth_user;
}

?>
found it
Registered User
Posts: 215
Joined: Mon Oct 25, 2004 8:51 am
Contact:

Re: [Beta] Paypal IPN GROUP Subscription MOD [1.1.3]

Post by found it »

Check your code edits in includes/auth.php and please post files in a link to a text file..

:D :D
doughall
Registered User
Posts: 6
Joined: Sun Jun 10, 2007 7:47 pm

Re: [Beta] Paypal IPN GROUP Subscription MOD [1.1.3]

Post by doughall »

Is this ready for phpbb3 yet?
User avatar
steve8675537
Registered User
Posts: 215
Joined: Mon Mar 19, 2007 6:02 pm
Location: phpbb3 newbie

-

Post by steve8675537 »

-delete post
Post Reply

Return to “[2.0.x] MODs in Development”