From 476be9ca4af0520454f6eacf02d592d9240b12df Mon Sep 17 00:00:00 2001 From: Sjokomelk Date: Sun, 16 Nov 2014 19:17:24 +0100 Subject: [PATCH] Files from MyBB post fixes for 1.8 fix by IceMan Hi, an user send me an email yesterday and he request my version of steam login. So I will put here for all who updated to 1.8 and have problems with this plugin. Steam Login 1.6.1 Updated to run on mybb 1.6 and 1.8 Fixed an error when you try to activate the plugin on 1.8 Add steam signature on user profile If have some problems or found bugs please tell me. Also I will improve this plugin if Ryan don't have time to continue this work. Note: Do not forget first to install Display Name plugin and then Steam Login. Download: https://mega.co.nz/#!RRd2iLAb!OhlpXa9rBwmXUSgP3FVd4Gydh3k9It7lxBgybrv6Sy8 Have a good day! IceMan http://community.mybb.com/thread-132123-post-1117921.html#pid1117921 --- inc/plugins/steamlogin.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/inc/plugins/steamlogin.php b/inc/plugins/steamlogin.php index 8645eb3..45744b0 100644 --- a/inc/plugins/steamlogin.php +++ b/inc/plugins/steamlogin.php @@ -4,6 +4,7 @@ * ---------------------------------- * Provided with no warranties by Ryan Stewart (www.calculator.tf) * This has been tested on MyBB 1.6 + * This has been fixed and tested for MyBB 1.8 by IceMan (www.tf2.ro) */ // Disallow direct access to this file for security reasons @@ -46,11 +47,11 @@ function steamlogin_info() "name" => "Steam Login", "description" => "Allows the registration of accounts through Steam. (For support/issues please visit https://github.com/stewartiee/Steam-OpenID--MyBB-)$curl_message", "website" => "http://www.calculator.tf", - "author" => "Ryan Stewart", + "author" => "Ryan Stewart & IceMan", "authorsite" => "http://www.calculator.tf", - "version" => "1.6", + "version" => "1.6.1", "guid" => "", - "compatibility" => "*" + "compatibility" => "16, 18" ); } // close function steamlogin_info @@ -117,9 +118,9 @@ function steamlogin_activate() "title" => "Avatar Size", "description" => "Set whether to use the small, medium or large avatar from the Steam API.", "optionscode" => "select -0=Small -1=Medium -2=Large", + 0=Small + 1=Medium + 2=Large", "value" => "2", "disporder" => 4, "gid" => $gid @@ -143,7 +144,7 @@ function steamlogin_activate() $db->insert_query("settings", $steamlogin_required_field_setting); // Rebuild our settings to show our new category. - rebuildsettings(); + rebuild_settings(); /** * Perform an update to the username length. @@ -163,7 +164,7 @@ function steamlogin_activate() $plugin_templates = array( "tid" => NULL, "title" => 'steamlogin_profile_block', - "template" => $db->escape_string('
Steam Details
Steam Verified{$steam_verified}
Level{$steam_level}
SteamID 32{$steamid_32}
SteamID 64http://www.steamcommunity.com/profiles/{$steamid_64}
SteamRep{$steamrep_link}

'), + "template" => $db->escape_string('
Steam Details
Steam Verified{$steam_verified}
Level{$steam_level}
SteamID 32{$steamid_32}
SteamID 64http://www.steamcommunity.com/profiles/{$steamid_64}
SteamRep{$steamrep_link}
Steam Status{$steam_status}

'), "sid" => "-1", "version" => $mybb->version + 1, "dateline" => time() @@ -435,7 +436,7 @@ function steam_output_to_misc() { function steamify_user_profile() { - global $db, $mybb, $steamid_32, $steamid_64, $steamrep_link, $steam_level, $steam_verified, $steamlogin_profile_block, $templates, $theme; + global $db, $mybb, $steamid_32, $steamid_64, $steamrep_link, $steam_level, $steam_status, $steam_verified, $steamlogin_profile_block, $templates, $theme; require_once MYBB_ROOT.'inc/class_steam.php'; $steam = new steam; @@ -451,6 +452,7 @@ function steamify_user_profile() $steamid_32 = 'N/A'; $steamrep_link = 'N/A'; $steam_level = '?'; + $steam_status = 'N/A'; // Check to see if loginname is empty, and make sure it's numeric. if($user_details['loginname'] != null and is_numeric($user_details['loginname'])) @@ -468,6 +470,9 @@ function steamify_user_profile() // Create a link for SteamRep. $steamrep_link = 'http://www.steamrep.com/profiles/'.$steamid_64.''; + // Get our steam status + $steam_status = ''; + eval("\$steamlogin_profile_block = \"".$templates->get("steamlogin_profile_block")."\";"); } // close if($user_details['loginname'] != null and is_numeric($user_details['loginname']))