Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
requests-topic
Steam Profile in Simple Press Forum?
Avatar
stranded
Member
Free Members
sp_UserOfflineSmall Offline
Jul 21, 2010 - 4:14 pm

Is it possible to integrate this little thing: http://code.google.com/p/steamprofile/ with SPF? I mean something like a badge/custom icon below an avatar would be sweet, I have no idea how to code it to be honest and I would love to see this in SPF. I know that there's a working PHPBB3 plugin like this (user simply edits their profile info with their Steam login or ID and it displays below the avatar if he's online, playing a game etc.)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 21, 2010 - 4:22 pm

You could almost certainly use one of the program hooks. See the wiki pugin API section.

andy-signature.png
YELLOW
SWORDFISH
Avatar
stranded
Member
Free Members
sp_UserOfflineSmall Offline
Jul 24, 2010 - 6:39 am

Ok one question though, in which file can I put a javascript (.js) to load with forum only (not the whole site). Where's the forum header?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 24, 2010 - 6:47 am

have you looked at the program hooks in the wiki (p[lugin API section) ?

andy-signature.png
YELLOW
SWORDFISH
Avatar
stranded
Member
Free Members
sp_UserOfflineSmall Offline
Jul 24, 2010 - 7:30 am

yeah I did.

BUT the script does not load. I pasted the script into several hooks so far, header, profile view, profile post etc.

 

<script type="text/javascript" src="http://steamunpowered.eu/wp-content/plugins/simple-forum/steamprofile/steamprofile.js"></script>

 

somewhere to load only on the forum

 

and then this pasted to function sf_hook_post_profile_custom:

 

<div class="steamprofile" title="steamcommunity"></div> 

 

If I type any random text there it shows up without problems.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 24, 2010 - 9:15 pm

If you use a hook, make sure you return the content and not echo it... and also be sure to account for proper quotation...

why do you think its not loading?  have you viewed the page source?

Avatar
stranded
Member
Free Members
sp_UserOfflineSmall Offline
Jul 25, 2010 - 8:23 am

It does show up in source code but not on site.

 

here it works ok:

http://steamunpowered.eu/example.html

 

on forums it doesn't but we'll look into it and let you guys know, if we manage to do it we will post a ready-to-use file/files or a guide for everyone else to use

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 25, 2010 - 9:26 am

you might find it easier and more effective to use the wp_head hook to insert in the page header tags so its present at the page loading rather than with the content...  something like

add_filter('wp_head', 'mysteam_header');
function mysteam_header()
{
// load the steam js here
}

I would also recommend using the wp_enqueue_script() function to properly load js for wp...  put that stuff above in your theme functions.php file...  you can of course add additional logic if you only want to do it on forum pages...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625