vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Profile Enhancements - Gamercard in Profiles (https://vborg.vbsupport.ru/showthread.php?t=225280)

TheInsaneManiac 10-14-2009 10:00 PM

Gamercard in Profiles
 
1 Attachment(s)
Display your gamercard in your profiles with ease. Gamercards will display under the about tab in profiles.

Installation:
1.) In the AdminCP go to User Profile Fields -> Add New User Profile Field.

2.) Select Single-Line Text Box.

3.) Apply the following settings:
Title:
Gamertag
Description:
Put your Xbox Live Gamertag here.
Max length of allowed user input:
16
Field Required:
No
Private Field:
No
Field Searchable on Members List:
Yes
Show on Members List:
No

4.) After saving take note of what the ID is of the field.

5.) In the AdminCP under Gamertag Profile put the ID in there.
Ex: field123


Optional:
You can now view gamercards in posts by hovering over their gamertag. See screenshot for better explanation.

To do this go into your headinclude template and find:
<!-- / CSS Stylesheet -->

Below add:
$gamercardinpostbit

In postbit find:
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>

Add the following code after, be sure to change XX to your gamertag field ID:
<if condition="$post['fieldXX']"><div">$vbphrase[gamertag]: <a href="http://profile.mygamercard.net/$post[fieldXX]" target="_blank" onmouseover="return overlibImage('', 'http://card.mygamercard.net/$post[fieldXX].png');" onmouseout="return overlibMouseout();">$post[fieldXX]</a></div></if>


FAQ:
Question: I get a "Parse error: syntax error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING" error.
Answer: You did not fill in your profile field correctly or at all.


Known Issues:
Gamercard will not display if gamertags have spaces. -Fix being worked on


Upgrading:
Import the product and select Allow Overwrite.


Changelog:
2.0 - Fixed a bug which prevented the gamercard script from running in the postbit.
1.8 - Fixed a bug that prevented gamercards to show in profiles.
1.5 - Added the ability to see the gamercard via posts.
1.0 - Release

TheInsaneManiac 10-28-2009 04:50 PM

-Reserved-

inspiration100 10-28-2009 09:51 PM

Nice!! I could really use this, however I am doing a PS3 site. Any way to work that in?

dnelsalty 10-30-2009 01:46 AM

doesnt let me save the profile field i need to put something in the options

TheInsaneManiac 10-30-2009 05:24 PM

Quote:

Originally Posted by inspiration100 (Post 1907578)
Nice!! I could really use this, however I am doing a PS3 site. Any way to work that in?

I was planning on making a separate modification for this. No ETA though.

Quote:

Originally Posted by dnelsalty (Post 1908138)
doesnt let me save the profile field i need to put something in the options

You set the profile field up incorrectly then.

msken 10-31-2009 12:26 PM

Quote:

Originally Posted by TheInsaneManiac (Post 1908399)
You set the profile field up incorrectly then.

No you gave incomplete/incorrect directions. With Single-Selection Menu you HAVE to put something in the options field in order to save it. I think you meant to put Single-Line Text Box. Please complete/fix your directions. Thanks.

TheInsaneManiac 10-31-2009 08:38 PM

Quote:

Originally Posted by msken (Post 1908667)
No you gave incomplete/incorrect directions. With Single-Selection Menu you HAVE to put something in the options field in order to save it. I think you meant to put Single-Line Text Box. Please complete/fix your directions. Thanks.

Ahh my mistake. I copied directions from a previous modification, as I was about to go to work and was in a hurry, so I must have forgotten to change them.

msken 11-01-2009 09:29 AM

Mistakes happen :). Also on line 60 of product-gamercardprofile.xml you have an error. You are pointing to
Code:

$add = '<iframe src=\"http://gamercardprofile.xbox.com/$userinfo['.$vbulletin->options['gamertag_profile_field'].'].card\" scrolling=\"no\"
and it should be:
Code:

$add = '<iframe src=\"http://gamercard.xbox.com/$userinfo['.$vbulletin->options['gamertag_profile_field'].'].card\" scrolling=\"no\"
http://gamercardprofile.xbox.com isn't an active URL. Other then that, great mod. :) I haven't been able to get the hover mod to work just yet but I have a custom theme, so that is most likely my issue. Once I figure it out I will post a solution so everyone will know what to do. Thank you for this mod, it really is nice!

TheInsaneManiac 11-02-2009 04:53 PM

Quote:

Originally Posted by msken (Post 1908950)
Mistakes happen :). Also on line 60 of product-gamercardprofile.xml you have an error. You are pointing to
Code:

$add = '<iframe src=\"http://gamercardprofile.xbox.com/$userinfo['.$vbulletin->options['gamertag_profile_field'].'].card\" scrolling=\"no\"
and it should be:
Code:

$add = '<iframe src=\"http://gamercard.xbox.com/$userinfo['.$vbulletin->options['gamertag_profile_field'].'].card\" scrolling=\"no\"
http://gamercardprofile.xbox.com isn't an active URL. Other then that, great mod. :) I haven't been able to get the hover mod to work just yet but I have a custom theme, so that is most likely my issue. Once I figure it out I will post a solution so everyone will know what to do. Thank you for this mod, it really is nice!

Hmm that's strange. Both of those URLs work for me lol. Anyway since it isn't working for you I will fix that in my upcoming update.

In the upcoming update it will fix the issue with the hover not working for people who have spaces in their gamertags. MyGamerCard.net seems to have issues with spaces so they use +... I believe a simple fix in the profile field itself should make things proper.

No ETA at the moment.

KasparP 02-12-2010 07:51 PM

Hmm, it wont appear in the postbit even after I added the hover edit.

Any idea why? The gamercard is perfect in the profile however.


All times are GMT. The time now is 02:29 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.01451 seconds
  • Memory Usage 1,750KB
  • 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
  • (4)bbcode_code_printable
  • (5)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