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)

mikez006 01-03-2015 03:09 PM

Ran into a problem with usergroups.

Primary usergroup for all new members (including Steam Connect) is: usergroup1
Steam Connect users are added to a secondary usergroup: Steam Users

We have multiple membership plans which move members to different primary usergroups.

If a "Steam" user upgrades their account, their primary usergroup is changed. However when the Steam Connect cache time expires, it reacquires their Steam info, but then changes their primary usergroup back to the default usergroup (usergroup1).

Increasing cache time to a very large number will solve this, but then their info will never update.

Is there a way that the primary usergroup change can be disabled after the Steam users registers for the first time?

Update: I doesn't appear to be the cache time. I set it for 90 days, but members are still being removed from their upgraded usergroups and are being move back to the default usergroup1.

Any ideas?

Grouper 01-05-2015 01:56 PM

Your get_user_steamid() is broken. user info doesn't include steam_link even though it is in the database. If you provide get_user_steamid() with no params then you will always get a return false because of this.

Yumiyashi 01-06-2015 10:55 PM

Possibility of port to vb5?

ozzy47 01-06-2015 11:08 PM

I doubt it. vB5 is not made to be mod friendly.

mikez006 01-07-2015 01:57 AM

Using 4.2.2.

I commented out this line from the Steam Connect cron job and it solved the problem.

Code:

$finishat = update_user_steamgroup_assoc(null, null, 1, 1, 1);

ozzy47 01-07-2015 02:13 AM

Glad to hear you came up with a solution to your issue mikez006. :)

Skyrider 01-24-2015 06:03 AM

Quote:

Originally Posted by tdev1 (Post 2530011)
Works fine here, except when steam web API goes down, then even 1 second timeout is too much.

The following change allows timeouts below 1 second:
PHP Code:

    $timeout 0.3;
// ...
    
curl_setopt$chCURLOPT_CONNECTTIMEOUT_MS$timeout 1000 );
    
curl_setopt$chCURLOPT_TIMEOUT_MS$timeout 1000 ); 


You never 'mentioned' where you changed this though. Showing the code is awesome, but the location of where to find it is another question.

mfowler70 01-27-2015 07:07 PM

Quote:

Had another idea. Hopefully this one is good like my last one was.

Regarding the Steam avatars, when they're online in Steam, the border is Green. When they're offline, it's Blue. When you click the avatar, it sends you to their community profile.

Did anyone ever figure out how to accomplish this?

mfowler70 01-28-2015 12:05 PM

By the way, this is how I tackle the issue with non-Steam avatars not showing up using the method outlined previously in this thread. I'm sure the code isn't proper and I'm no programmer but this works for me.

PHP Code:

<vb:if condition="$post['steam_code']"><a href="http://steamcommunity.com/profiles/{vb:raw post.steamid}" target="_blank" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}"><img src="{vb:raw post.steamavatarmedium}" /></a>
            <
vb:else /><class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}"><img src="{vb:raw post.avatarurl}" /></a>
            </
vb:if> 


Doc913 01-29-2015 06:04 AM

Quote:

Originally Posted by mfowler70 (Post 2535003)
By the way, this is how I tackle the issue with non-Steam avatars not showing up using the method outlined previously in this thread. I'm sure the code isn't proper and I'm no programmer but this works for me.

PHP Code:

<vb:if condition="$post['steam_code']"><a href="http://steamcommunity.com/profiles/{vb:raw post.steamid}" target="_blank" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}"><img src="{vb:raw post.steamavatarmedium}" /></a>
            <
vb:else /><class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}"><img src="{vb:raw post.avatarurl}" /></a>
            </
vb:if> 


Where should the code be pasted?


All times are GMT. The time now is 04:04 AM.

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.01503 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
  • (3)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
  • (1)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