EzPortal - Portal Software for Forums

EzPortal Forums => ezBlock Coding Forums => Topic started by: KarmicStigmata on May 29, 2012, 02:44:38 pm

Title: Linking username to separate table
Post by: KarmicStigmata on May 29, 2012, 02:44:38 pm
I run a gaming site and I am trying to streamline data without having to input additional information.  So my question is:  How would I take data from the SMF profile and link it to another table?

Here is a better breakdown:
The EZBlock calls for:
Profile Field:  Call Sign (unique to my site)  at mySQL database smf_

The Call Sign field would then link to a separate database games_ where it would associate to the Call Sign listed there... So i.e.

Call Sign:  EZPortal at SMF_ would link to Call Sign: EZPortal at games_

I don't want them to have to log in, I want it to be part of the session.  That way when they are going through that portion of the site, they can see their profile information for that game.  If you can provide me with the linking code to continue the session in the block I'd appreciate it.

Whom ever decides to help me will be credited on my site.
Title: Re: Linking username to separate table
Post by: KarmicStigmata on June 27, 2012, 10:27:23 am
Well that took a while but I figured it out on my own! 

global $user_info, $memberContext;

Code: [Select]
loadMemberData($user_info['id']);
loadMemberContext($user_info['id'], true);
$custom_profiled_filed = $memberContext[$user_info['id']];

// Define fields
$Callsign   = $custom_profiled_filed['options'];

^^ That was all I needed, and then I was able to link it to the database, and fyi it does work with EZBlocks :)  Even though I just sat down for a day and tried to figure it out myself >_<