Steam Login Displays the buttons required to allow the user to login with steam Adam Lavin adam@lavoaster.co.uk http://www.lavoaster.co.uk http://www.lavoaster.co.uk/update.php?app=steam_login 1.1.2 11002 From skin_ucp: manageSteam";s:6:"custom";s:24:"install_steamInstall.php";}s:8:"language";a:1:{s:23:"core_public_steam_login";a:10:{i:0;s:9:"use_steam";i:1;s:13:"sign_in_steam";i:2;s:12:"manage_steam";i:3;s:20:"steam_already_linked";i:4;s:12:"log_in_steam";i:5;s:18:"steam_link_account";i:6;s:20:"steam_linked_account";i:7;s:12:"unlink_steam";i:8;s:17:"unlink_steam_desc";i:9;s:16:"unlink_steam_sub";}}s:9:"templates";a:2:{s:15:"skin_steamlogin";a:4:{i:0;s:18:"globalTemplateIcon";i:1;s:17:"inlineLoginButton";i:2;s:18:"registerFormButton";i:3;s:19:"showLoginFormButton";}s:8:"skin_ucp";a:1:{i:0;s:11:"manageSteam";}}s:6:"custom";s:16:"steamInstall.php";}]]> steam_login steamDisplayButtonAjax.php templateHooks steamDisplayButtonAjax registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_steam_login'), 'core'); } public function getOutput() { if (IPSLib::loginMethod_enabled('facebook') || IPSLib::loginMethod_enabled('twitter') || IPSLib::loginMethod_enabled('live')) { return $this->registry->getClass('output')->getTemplate('steamlogin')->inlineLoginButton(); } } }]]> steamDisplayButtonAjax2.php templateHooks steamDisplayButtonAjax2 registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_steam_login'), 'core'); } public function getOutput() { if (!(IPSLib::loginMethod_enabled('facebook') || IPSLib::loginMethod_enabled('twitter') || IPSLib::loginMethod_enabled('live'))) { return $this->registry->getClass('output')->getTemplate('steamlogin')->inlineLoginButton(true); } } }]]> steamHandleData.php dataHooks steamHandleData steamDisplayButton.php templateHooks steamDisplayButton registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_steam_login'), 'core'); } public function getOutput() { return $this->registry->getClass('output')->getTemplate('steamlogin')->showLoginFormButton(); } }]]> steamDisplayIcon.php templateHooks steamDisplayIcon registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_steam_login'), 'core'); } public function getOutput() { return $this->registry->getClass('output')->getTemplate('steamlogin')->globalTemplateIcon(); } }]]> steamDisplayButtonRegister2.php templateHooks steamDisplayButtonRegister2 registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_steam_login'), 'core'); } public function getOutput() { if (!(IPSLib::loginMethod_enabled('facebook') || IPSLib::loginMethod_enabled('twitter'))) { return $this->registry->getClass('output')->getTemplate('steamlogin')->registerFormButton(true); } } }]]> steamDisplayButtonRegister.php templateHooks steamDisplayButtonRegister registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_steam_login'), 'core'); } public function getOutput() { if (IPSLib::loginMethod_enabled('facebook') || IPSLib::loginMethod_enabled('twitter')) { return $this->registry->getClass('output')->getTemplate('steamlogin')->registerFormButton(); } } }]]> steamLinkAccount.php libraryHooks steamLinkAccount lang->loadLanguageFile(array('public_steam_login')); $return = parent::getLinks(); $target = 6; if(count($return) < $target) { $target = count($return); } foreach ($return as $tabk => $tabv) { if ($tabk == $target) { $return[$tabk] = array('url' => 'area=managesteam', 'title' => $this->lang->words['manage_steam'], 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'managesteam' ? 1 : 0, 'area' => 'managesteam' ); $return[$tabk + 1] = $tabv; } elseif ($tabk > $target) { $return[$tabk + 1] = $tabv; } else { $return[$tabk] = $tabv; } } return $return; } public function showForm($current_area, $errors = array()) { if ($current_area == 'managesteam') { require_once(IPS_ROOT_PATH . 'sources/loginauth/steam/lib/steam_openid.php'); $data = array(); $data['url'] = SteamSignIn::genUrl($this->settings['board_url'] . '/interface/board/linksteam.php'); $this->hide_form_and_save_button = 1; if ($_GET['steam'] == 'process') { $steam_id = SteamSignIn::validate(); if ($steam_id) { /* Test locally */ $localMember = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'members', 'where' => "steamid='" . $steam_id . "'")); $notify = ''; // If a member is found with the steam id but there is no display name set // assume that they didn't go complete their sign in and remove the // temporary account that they created if ($localMember['member_id'] && !$localMember['members_display_name']) { IPSMember::remove($localMember['member_id'], false); IPSMember::save($this->memberData['member_id'], array('core' => array('steamid' => $steam_id))); $notify .= "&completed=1"; } elseif (!$localMember['member_id']) { // No member was found, great lets just update the user as normal IPSMember::save($this->memberData['member_id'], array('core' => array('steamid' => $steam_id))); $notify .= "&completed=1"; } else { // We found an existing member who had already linked their account $notify .= "&error=true"; } } $this->registry->output->silentRedirect($this->settings['base_url'] . 'app=core&module=usercp&tab=core&area=managesteam' . $notify); exit; } elseif ($this->request['steam'] == 'unlink') { IPSMember::save($this->memberData['member_id'], array('core' => array('steamid' => null))); //Update user steamid $this->memberData['steamid'] = null; } return $this->registry->getClass('output')->getTemplate('ucp')->manageSteam($data); } return parent::showForm($current_area, $errors); } }]]> steamInstall.php checkForField('steamid', 'members')) { ipsRegistry::DB()->addField('members', 'steamid', 'VARCHAR(17)', NULL); } } public function uninstall() { if (ipsRegistry::DB()->checkForField('steamid', 'members')) { ipsRegistry::DB()->dropField('members', 'steamid'); } } }]]> core public_steam_login use_steam Use Steam core public_steam_login sign_in_steam Sign In with Steam core public_steam_login manage_steam Manage Steam core public_steam_login steam_already_linked This steam account is already associated with another account on this site. core public_steam_login log_in_steam Log In with Steam core public_steam_login steam_link_account Your account is currently not linked with a steam account. To link it to one press the button below. core public_steam_login steam_linked_account This account has been, or is already, successfully linked with a steam account. core public_steam_login unlink_steam Unlink Steam Account core public_steam_login unlink_steam_desc Clicking this button will unlink your steam account from your forum account so you will no longer be able to sign in using it. core public_steam_login unlink_steam_sub Unlink your steam account. skin_steamlogin member->form_hash}" base="public"}"> {$this->lang->words['log_in_steam']} ]]> globalTemplateIcon 1414100247 0 0 0 0 root skin_steamlogin ]]> globalTemplateIcon 1414100247 0 0 0 0 xmlskin skin_steamlogin ]]> globalTemplateIcon 1414100248 0 0 0 0 mobile skin_steamlogin ]]> inlineLoginButton $wrapButton=false 1414100247 0 0 0 0 root skin_steamlogin ]]> inlineLoginButton 1414100247 0 0 0 0 xmlskin skin_steamlogin ]]> inlineLoginButton 1414100248 0 0 0 0 mobile skin_steamlogin
{$this->lang->words['want_to_save_time']}
]]>
registerFormButton $wrapButton=false 1414100247 0 0 0 0 root
skin_steamlogin ]]> registerFormButton $wrapButton=false 1414100247 0 0 0 0 xmlskin skin_steamlogin ]]> registerFormButton $wrapButton=false 1414100248 0 0 0 0 mobile skin_steamlogin member->form_hash}" base="public"}" class="ipsButton_secondary fixed_width">Steam   {$this->lang->words['sign_in_steam']}]]> showLoginFormButton 1414100247 0 0 0 0 root skin_steamlogin ]]> showLoginFormButton 1414100247 0 0 0 0 xmlskin skin_steamlogin ]]> showLoginFormButton 1414100248 0 0 0 0 mobile skin_ucp request['error']">

{$this->lang->words['steam_already_linked']}


{$this->lang->words['steam_link_account']}





{$this->lang->words['steam_linked_account']}


{$this->lang->words['unlink_steam_sub']}

{$this->lang->words['unlink_steam_desc']}


{$this->lang->words['unlink_steam']}

]]>
manageSteam $data 1414100247 0 0 0 0 root
skin_ucp ]]> manageSteam $data 1414100247 0 0 0 0 xmlskin skin_ucp ]]> manageSteam $data 1414100248 0 0 0 0 mobile