Sub Menu
Links Menu
Online Users

In total there are 306 users online :: 2 registered, 0 hidden and 304 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Bing [Bot], Google [Bot] based on users active over the past 60 minutes

Sponsorship Mod

This is a members discussion forum.

Moderators: Integra Moderator, PCP Master

Sponsorship Mod

PostAuthor: MWE_001 » Mon Mar 03, 2008 9:45 pm

Hi everyone. Im working on a mod from Ozzie1's website and the pcp instructions included, resemble nothing that I have in my files.

Example, it says to edit profilcp/profilcp_register.php thats a can not do. That file dont exist. Where can I find the file that now takes care of registration?

Also it has some template edits that dont even come close to anything I have in any of the 3 files Im using.

Here is the PCP install part of the mod

Code: Select all
 ##-----[ OPEN ]------------------------------------------#profilcp/profilcp_register.php  ##-----[ FIND ]------------------------------------------#$unhtml_specialchars_replace = array('>', '<41>sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not update sponsor gains', '', __LINE__, __FILE__, $sql);             }             $sql = " SELECT user_sponsor_id FROM " . USERS_TABLE . "                 WHERE user_id = $sponsor_id ";             if ( !($result = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not update sponsor gains', '', __LINE__, __FILE__, $sql);             }             $sponsors = $db->sql_fetchrowset($result);             if ( $db->sql_numrows($result) )             {                 for ( $s = 0 ; $s <count>sql_query($sql)) )                     {                         message_die(GENERAL_ERROR, 'Could not update sponsors gains', '', __LINE__, __FILE__, $sql);                     }                 }             }         }    ##-----[ FIND ]------------------------------------------#         $sql = "INSERT INTO " . USERS_TABLE . "($sql_key) VALUES ($sql_val)";         if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )         {             message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);         }  ##-----[ AFTER, ADD ]------------------------------------------#         $sql = "UPDATE " . USERS_TABLE . "             SET user_sponsor_id = $sponsor_id             WHERE user_id = $user_id ";         if ( !$db->sql_query($sql))         {             message_die(GENERAL_ERROR, 'Could not update sponsor gains', '', __LINE__, __FILE__, $sql);         }  ##-----[ FIND ]------------------------------------------#     // get the current password ?     if ( !$create_user )     {         $template->assign_block_vars('switch_get_cur_password', array() );     }  ##-----[ AFTER, ADD ]------------------------------------------#     else if ( $board_config['sponsor_enabled'] )     {         $template->assign_block_vars('switch_sponsor', array());           if ( intval($HTTP_GET_VARS['sponsor']) )         {             $sql = " SELECT username FROM " . USERS_TABLE . "                 WHERE user_id = $sponsor_id ";             if ( !$result = $db->sql_query($sql))             {                 message_die(GENERAL_ERROR, 'Could not obtain users list', "", __LINE__, __FILE__, $sql);             }             $users = $db->sql_fetchrow($result);             $users_list = '<b>'.trim(htmlspecialchars($users['username'])).'</b>';         }         else         {             $sql = " SELECT user_id , username FROM " . USERS_TABLE . "                 WHERE user_id > 1                 ORDER BY username ";             if ( !$result = $db->sql_query($sql))             {                 message_die(GENERAL_ERROR, 'Could not obtain users list', "", __LINE__, __FILE__, $sql);             }             $users = $db->sql_fetchrowset($result);             $users_list = '<select>';             $users_list .= '<option>' . $lang['Sponsor_none'] . '</option>';             for($i = 0; $i < count($users); $i++)             {                 $selected = ( $sponsor_id == $users[$i]['user_id'] ) ? 'selected' ]['user_id'].'" '.$selected.' >' . $users[$i]['username'] . '</option>';             }             $users_list .= '</select>';         }     }  ## Note:  The following additions are required to make the Sponsorship MOD work properly#        and are added by Ozzie < <a>Goster@OzziesWorld.com</a> >  website:  http://www.OzziesWorld.com##-----[ OPEN ]------------------------------------------#templates/subSilver/profilecp/register_body.tpl  ##-----[ FIND ]------------------------------------------#         <BEGIN>  ##-----[ BEFORE, ADD ]------------------------------------------#         <BEGIN>         <tr>             <td><span>{L_SELECT_SPONSOR}</span></td>             <td>{USERS_LIST}</td>         </tr>         <END>  # #--------------[ FIND ]------------- #         'L_PASSWORD_CONFIRM_IF_CHANGED'   => $lang['password_confirm_if_changed'],  # #--------------[ AFTER, ADD ]------------- #            'L_SELECT_SPONSOR'             => $lang['Sponsor_select'],  # #--------------[ FIND ]------------- #         'EMAIL_CONFIRM'      => $view_userdata['user_email'],  # #--------------[ AFTER, ADD ]------------- #            'USERS_LIST'       => $users_list,  ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM

As you can see, these edits make completely no sence what so ever.

I think if I can get past the registration part, I can work the template issues out easily......enough :grin:

Thanks in advance

Ray
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: Sponsorship Mod

PostAuthor: found it » Tue Mar 04, 2008 8:11 am

Hi

Not being a good PCP user in fact I havnt touched it in 2 years.. but after searching through the whole of the integramod files... (got to love [url=http]powergrep[/url])

none of the code you are looking for exists the only piece of code I could find which was in profilcp/profilcp_board_config.php

Code: Select all
        $sql = "INSERT INTO " . USERS_TABLE . "($sql_key) VALUES ($sql_val)";         if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) ){             message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);         }


or close to it...

I dont know if that helps any ... probably not... maybe Helter has a better view on this...

:mrgreen:
Last edited by found it on Tue Mar 04, 2008 2:49 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:29 am
Cash on hand: 0.00

Re: Sponsorship Mod

PostAuthor: MWE_001 » Tue Mar 04, 2008 11:15 am

Yeah I searched and searched for hours on end and no such luck. Ozzie1 infact, has it installed on a 1.4.0 board but I have no clue how in the hell he pulled it off.

I have side lined it for now. Ill get it figured out sooner or later. Im guessing more later then sooner though <img>
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois

Re: Sponsorship Mod

PostAuthor: obiku » Wed Mar 05, 2008 12:16 pm

Yes Found It, the registartion part of the ProfileCP is in the profilcp_board_config.php.

I have to do this out of my memory (I'm on my work at this moment), at the beginning of that file are some loopings. Those loops are for reading out the user table.

Also the function_profilcp.php is needed (I though it was that file, otherwise look for a function .script in the profilcp directory.
Last edited by obiku on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
http://www.familie-smit.nl
http://portfolio.familie-smit.nl

Do not tsunami my inbox... instead use the forums...
Hard work may not kill me, but why take a chance?

[hr]
User avatar
obiku
Dev Team
Dev Team
 
Posts: 218
Likes: 0 post
Liked in: 0 post
Joined: Tue May 02, 2006 10:22 am
Cash on hand: 0.00
Location: level 8

Re: Sponsorship Mod

PostAuthor: MWE_001 » Wed Mar 05, 2008 3:24 pm

Ill have to have a look at my test site and see if I can do any good there. I hate to ruin a live site for experimenting. <img>

Thanks obiku for the pointers.
Last edited by MWE_001 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
"Don't gain the world and lose your soul, wisdom is better than silver and gold" -Bob Marley

If you build it, I can break it! ~ Whispered in the tone of the movie Field of Dreams.
User avatar
MWE_001
Sr Integra Member
Sr Integra Member
 
Posts: 1265
Likes: 0 post
Liked in: 0 post
Images: 12
Joined: Fri Apr 21, 2006 6:59 pm
Cash on hand: 0.00
Location: Illinois


Return to (PCP) Profile Control Panel

Who is online

Registered users: Bing [Bot], Google [Bot]

cron