vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Mini Mods - PS3 Gamercard in postbit (https://vborg.vbsupport.ru/showthread.php?t=225643)

zombietom 10-19-2009 10:00 PM

PS3 Gamercard in postbit
 
This is a mod i made several Months ago it should work on any version on VB.
The Good part about my code is that if a person don't enter their PS3 info nothing will show up.

Special note: To Get this mod to work and show the ps3 gamercard, your users will have to go to www.us.playstation.com and login with their PSN info, which is their email address and password. Once they do this they will just need to click on "Portable Id" and this will make the PS3 gamercard show on your forums. Even forum members from the UK will still need to go to the US playstation site.. no need to go to the EU playstation site.

There is a few options to consider with adding this ps3 gamercard mod.

If you don't have a Field ID that allows user to add in the PS3 gamertag you will need to create one.

Heres how:
Create a new profile Field (remember the field id number)
Directions:
1. In adminCP go to user profile fields
2. Click on add new profile field
3. add The following
Title - PS 3 ID
Description -Type in PS3 GamerTag.
Default Value -leave blank
Max length of allowed user input - set to whatever you want
Field Length- Set to whatever you want
Profile Field Type -Single-Line Text Box
Field Required - yes or no ..up to you..i set mine to no
Field Editable by User - YES
Private Field - NO
Field Searchable on Members List - Yes or No ..up to you
Show on Members List -yes or no ..up to you
Regular Expression - Left mine blank
Which page displays this option - select "edit your details" from the menu
Finish - Click save and remember you fieldID number

Here is the Code, Add it to your Postbit Legacy.
Look for this
PHP Code:

$post[musername]
</if>
</
div

Add this code under it and replace the X in fieldx with the field id you just created.
PHP Code:

<if condition="$post[field5]">
<
img src="http://fp.profiles.us.playstation.com/playstation/psn/pid/$post[fieldX].png" scrolling="no" frameBorder="0" height="140" width="204">
</if> 

Now here is another option.
If you have the Gamefields Icons mod installed you will use the following code.
Gamefields mod is here
https://vborg.vbsupport.ru/showthread.php?t=196587

So if you have the above mod installed use this code in your postbit legacy.

Look for this
PHP Code:

$post[musername]
</if>
</
div

Add this code under it
PHP Code:

<if condition="$post[gf_playstation]">
<
img src="http://fp.profiles.us.playstation.com/playstation/psn/pid/$post[gf_playstation].png" scrolling="no" frameBorder="0" height="140" width="204">
</if> 


Also if you want to install Xbox Live Gamercard Block in Profile
Found here
https://vborg.vbsupport.ru/showthread.php?t=171157

You can add the code to show up in your profile under the xbox card.
You just need to edit the memberinfo_block_gamercard ..If anyone needs help with this just let me know.

Here is a demo of this mod in action
Postbit view
http://www.tzaclan.net/forum/showthread.php?t=12925

Profile view
http://www.tzaclan.net/forum/member.php?u=25

This works very well with UK and USA members.Just make sure all your forum members go to www.us.playstation.com even if they live out of the USA.

tome109109 01-18-2010 11:07 PM

For some reaosn when users still go to the us.playstation.com site it still doesn't show. Mine works and i didn't need to go there but seems everyone else does why is this? How do i fix this?

zombietom 01-19-2010 01:42 AM

No way to fix it..you have to go to US.playstation.com and login and then click portable id...sony's website has been acting up the last few days....just keep trying.
I can change the code to another site and if sonys site keeps acting up i will post an update.

As for your card working ..it is because at some point you did login over there..may even have been a long time ago

thanks

tome109109 01-19-2010 07:40 PM

i told people to login they said they did but it still doesn't show up. Do they need to re-add it or something else?

zombietom 01-20-2010 01:49 AM

It has to be just like their gamername..meaning it is CaSe aware...other than that just keep trying to login to sonys site...and it will work.

thanks

Gamelobby 02-28-2010 06:21 PM

Quote:

You can add the code to show up in your profile under the xbox card.
You just need to edit the memberinfo_block_gamercard ..If anyone needs help with this just let me know.
How do we put it on their profile..!? (what do we edit)

Just add "$post[musername]" to template.?
There is no XML to import.?

I have the Xbox Live Gamercard Block in Profile installed & the Gamefield Icons, but i dont see any directions on how to add the PS3 Gamercard to Profile.?

Maybe i missed it, but ive read this 5 times. lol

Thanks

zombietom 03-01-2010 12:47 AM

you just need to add this code to it

<if condition="$post[gf_playstation]">
<img src="http://fp.profiles.us.playstation.com/playstation/psn/pid/$post[gf_playstation].png" scrolling="no" frameBorder="0" height="140" width="204">
</if>
</if>

under the xbox code in your memberinfo_block_gamercard

Thanks

PS- also click installed.

Gamelobby 03-02-2010 05:46 PM

Quote:

Originally Posted by zombietom (Post 1994163)
you just need to add this code to it

<if condition="$post[gf_playstation]">
<img src="http://fp.profiles.us.playstation.com/playstation/psn/pid/$post[gf_playstation].png" scrolling="no" frameBorder="0" height="140" width="204">
</if>
</if>

under the xbox code in your memberinfo_block_gamercard

Thanks

PS- also click installed.

Quote:

The conditional on line 25 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.
If I add a 2nd </if> there needs to be an added <if> at the beginning.!?
So this still does not work, & i will gladly click installed once it does work.

I realize the mod does work. I've seen it in use, but the directions on how to make it work are VERY sketchy at best, unless you are a coder & these errors are obvious.


Here is what is in that template now...
Code:

<!-- gamercard -->
<if condition="$userinfo[field6]">
<div id="gamercard" class="tborder content_block">
        <h4 class="thead block_title">
                <a href="#top" class="collapse_gadget" onclick="return toggle_collapse('gamercard')"><img id="collapseimg_gamercard" src="images/buttons/collapse_generic.gif" alt="" border="0" /></a>
                <a name="albums"></a>
                <span class="block_name">Gamercard</span>
        </h4>
        <div class="block_content" id="collapseobj_gamercard" style="">
       
       
<div class="alt1 smallfont block_row">Gamertag:&nbsp;$userinfo[field6]</div>
        <div class="alt2" align="center">               
        <iframe src="http://gamercard.xbox.com/$userinfo[field6].card" frameborder="0" height="140" scrolling="no" width="204">$userinfo[field6]</iframe>       
        HERE</div>

</div>
</div>
</if>
<!-- / gamercard -->

I'm guessing HERE is where im supposed to add the code.? (i tried it both before & after the </div>)


Thanks :cool:

zombietom 03-03-2010 02:10 AM

Here is what the code should look like...i took out the extra "if" ...it is just a copy error i made. You should be able to just copy and paste this code now,It should work perfect.let me know if you need more help. Thanks

<!-- gamercard -->
<if condition="$userinfo[field6]">
<div id="gamercard" class="tborder content_block">
<h4 class="thead block_title">
<a href="#top" class="collapse_gadget" onclick="return toggle_collapse('gamercard')"><img id="collapseimg_gamercard" src="images/buttons/collapse_generic.gif" alt="" border="0" /></a>
<a name="albums"></a>
<span class="block_name">Gamercard</span>
</h4>
<div class="block_content" id="collapseobj_gamercard" style="">




<div class="alt1 smallfont block_row">Gamertag:&nbsp;$userinfo[field6]</div>
<div class="alt2" align="center">
<iframe src="http://gamercard.xbox.com/$userinfo[field6].card" frameborder="0" height="140" scrolling="no" width="204">$userinfo[field6]</iframe>
</div>
</if>
<if condition="$userinfo[gf_playstation]">
<div class="alt1 smallfont block_row">PSN Network Id:&nbsp;$userinfo[gf_playstation]</div>
<div class="alt2" align="center">
<a href="http://profiles.us.playstation.com/playstation/psn/visit/profiles/$userinfo[gf_playstation]" target="blank"><img src="http://fp.profiles.us.playstation.com/playstation/psn/pid/$userinfo[gf_playstation].png" frameborder="0" height="140" scrolling="no" width="204"></img></a>
</div>

</div>
</div>
</if>
<!-- / gamercard -->

Gamelobby 03-03-2010 05:02 AM

I dont know what else you changed, but it definitely did something. lol
I tried it without the extra </if> & that didn't work, but whatever you did i is working... Except.. the place it is supposed to show up is there, but it is a blank box with a red x that links to the trophy room (on PSN) of the correct account, just no image showing up on my site.?

Any idea.?
Where does that image come from.?

Thanks


All times are GMT. The time now is 07:03 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.01084 seconds
  • Memory Usage 1,769KB
  • 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
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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