Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2010, 05:19 AM
Deep-X Deep-X is offline
 
Join Date: Mar 2006
Location: Southern New Jersey
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Steam Avatar

I dont know much of php / xml

But after reviewing some forums that I see that private users are able to "get" information from Steam/Valve, communities / profiles.

This is the function that I have so far

"field7" is actually the Steam Profile link such as

http://www.noobsticks.com/home.php?pageid=lookup



Code:
<!-- Steam Avatar hack -->
<if condition="$post['field7']">
<a href=http://steamcommunity.com/profiles/$post[field7]>
<img src="$post['field7']_medium.jpg" align="center" width="254" height="48" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"></a>
</if>
<!-- Steam Avatar hack -->
This is my Steam profile

http://steamcommunity.com/profiles/$post['field7']/?xml=1

http://steamcommunity.com/profiles/7...4246361/?xml=1

http://media.steampowered.com/steamc...d0b_medium.jpg

How do I get this link which is the <avatarMedium><![CDATA[http://media.steampowered.com/steamcommunity/public/images/avatars/f2/f2a6ad2b7f7c7feb43e237b66e6838034640ad0b_medium.jp g]]></avatarMedium>

Sounds all confusing to myself.

Here is a external link for help this would be a great mod for many of our communities are based off of Steam.

--------------- Added [DATE]1281344926[/DATE] at [TIME]1281344926[/TIME] ---------------

actually found some code that works with this

Code:
 if (($p1=strpos($data,'<div class="avatarFull">'))!==false){
                $p1=strpos($data,'<',$p1+24);
                $p2=strpos($data,'>',$p1+1);
                $tmp=substr($data,$p1,$p2-$p1+1);
                $link_full=get_link_src($tmp);
                download($link_full,'/folder/where/avatars/should/be/stored/prefix_full'.$ret['uid'].'.jpg');
                $ret['img_full']=$tmp;
                
                $tmp=str_replace('_full','',$tmp);
                $link_small=get_link_src($tmp);
                download($link_small,'/folder/where/avatars/should/be/stored/prefix_small'.$ret['uid'].'.jpg');
                $ret['img_small']=$tmp;
            }

function get_link_src($data){
    $p1=strpos($data,chr(34));
    $p2=strpos($data,chr(34),$p1+1);
    return substr($data,$p1+1,$p2-$p1-1);
}
 
function download ($url,$target){    
    $data=file_get_contents($url);
    if ($data) {
        file_put_contents($target,$data);    
    }
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:19 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.10800 seconds
  • Memory Usage 2,199KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete