vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - Steam Connect - Sign in with your Steam Account! [RC3] (https://vborg.vbsupport.ru/showthread.php?t=266883)

Cadellin 01-14-2012 10:48 AM

I feel like an idiot for having to ask but why doesn't this work? The default fields work fine but I can't get the additional fields to work.

Code:

$stc_user_info = fetch_userinfo($currentuserid);

$additional_fields = array(primaryclanid,lastlogoff);

$steam_info = fetch_steam_info(get_user_steamid($stc_user_info), $vbulletin->options['stc_apikey'], $additional_fields);

$steamavatar = $steam_info['avatarfull'];
$steamusername = $steam_info['personaname'];
$visibility = $steam_info['communityvisibilitystate'];
$clanid = $steam_info['primaryclanid'];
$lastlogoff = $steam_info['lastlogoff'];

Thanks for any help - I know it's not really your job to sort out issues with customisation.

Disasterpiece 01-14-2012 04:30 PM

PHP Code:

$stc_user_info fetch_userinfo($currentuserid);

$additional_fields = array('primaryclanid','lastlogoff');

$steam_info fetch_steam_info(get_user_steamid($stc_user_info), $vbulletin->options['stc_apikey'], $additional_fields);

$steamavatar $steam_info['avatarfull'];
$steamusername $steam_info['personaname'];
$visibility $steam_info['communityvisibilitystate'];
$clanid $steam_info['primaryclanid'];
$lastlogoff $steam_info['lastlogoff']; 

Almost correct, you need to put quotes around strings in php ;)

hakkuo23 01-20-2012 02:20 PM

Hmmm, I was unable to load threads, then i disabled SteamCONNECT and now I am able to D: Why would it be causing so much problems?

Disasterpiece 01-20-2012 02:41 PM

Steam community is apparently very slow and sometimes down, at least from my location.

I'm still working on a way to solve the problem that steam connect becomes slow too, but that'll take some time.

hakkuo23 01-21-2012 05:58 PM

Make it ping steam community, if it becomes X slow, then stop connecting to it.

billstelling 01-23-2012 12:00 AM

Quote:

Originally Posted by hakkuo23 (Post 2290212)
Hmmm, I was unable to load threads, then i disabled SteamCONNECT and now I am able to D: Why would it be causing so much problems?

Dependencies := lib cUrl (PHP)

tonjohn 01-23-2012 03:35 AM

Quote:

Originally Posted by Disasterpiece (Post 2290216)
Steam community is apparently very slow and sometimes down, at least from my location.

I'm still working on a way to solve the problem that steam connect becomes slow too, but that'll take some time.

It seems like you should only query the Steam APIs on user login (or with a cron job that runs once a day; maybe add a button for users to refresh their own data) and store it in memcache. The forum will then always read the data out of memcache and won't be impacted by slow or failed Steam API requests.

Cadellin 01-24-2012 09:05 PM

+1 the idea for a cache. Perhaps optional?

What about the idea of having a steam icon in the header in a similar way to Facebook Connect as well?

Quote:

Originally Posted by Disasterpiece (Post 2287736)
PHP Code:

$stc_user_info fetch_userinfo($currentuserid);

$additional_fields = array('primaryclanid','lastlogoff');

$steam_info fetch_steam_info(get_user_steamid($stc_user_info), $vbulletin->options['stc_apikey'], $additional_fields);

$steamavatar $steam_info['avatarfull'];
$steamusername $steam_info['personaname'];
$visibility $steam_info['communityvisibilitystate'];
$clanid $steam_info['primaryclanid'];
$lastlogoff $steam_info['lastlogoff']; 

Almost correct, you need to put quotes around strings in php ;)

Afraid that doesn't work for me all the default information is retrieved and the profile is set to public but I can't get any information from additional fields.

Disasterpiece 01-25-2012 12:27 AM

It already has a cache, but apparently there is a small bug which makes the plugin use the cache inefficently.

I'll improve the caching and the steam api query in the next version which will hopefully be done sometime by the end of the week.

Skyrider 01-25-2012 03:49 PM

Had to disable the whole plugin :-\, loading threads is taking so much longer now with the steam login system enabled.


All times are GMT. The time now is 11:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01480 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete