vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Xbox.com gamercard for all users (https://vborg.vbsupport.ru/showthread.php?t=99867)

stonyarc 10-31-2005 10:00 PM

Xbox.com gamercard for all users
 
Function

These modifications on a vbulletin forum allow you to fully integrate the xbox.com gamercard on your forum next to each and every post a user makes.

This will make it look more or less like the integration on our forum.

Important

First always backup the files that you're going to edit so you can revert to the old version if something goes wrong.

We do appreciate if you gave us the due credits for these functions.

Installation

This modification was tested on vbulletin 3.5.0. You might have to put some codes on another location in your files depending on the version of vbulletin your have.

http://www.xboxusersgroup.com/images...ngamercard.jpg

1. Add a gamertag field to your user (editable in profile) =>

vBulletin features a wide array of input options for you to gather information from your members through the creation of custom profile fields. With these fields you can present a list of options for the user to choose from or you can ask the user to give their own input.

Go to the adminCP and add a custom field => User Profile fields => Add New User Profile Field

You need a "Single-Line Text Box"

Title => Gamertag
Description => Xbox Live Gamertag
Default Value => Leave empty
Max length of allowed user input => 30
Display Size => 30
Display Order => put something like 10 or 15
Field Required => No as default but you can change if you want
Field Editable by User => Yes because gamertags do tend to change
Private Field => No the field is public
Field Searchable on Members List => No
Show on Members List => Yes
Regular Expression => leave empty

Save the field

Go to the User Profile Field Manager and look for your custom field you just added and look for the name column there is an ID for the field.
Something like "fieldXX" where XX is a number. Make sure you remember this value.

2. Go to the template you are using (Styles & Templates/Style Manager) and select Edit templates.

Go to "postbit templates" and select the template you are using (probably postbit or postbit_legacy).
and add the following code:

fieldXX is the field value you got from step 1.

You can embed the code in a div or a special table construction but that is up to you.

Code:

<if condition="$post[fieldXX]">
<iframe src="http://gamercard.xbox.com/$post[fieldXX].card" scrolling="no" frameBorder="0" height="140" width="204">$post[fieldXX]</iframe>
</if>

Demonstration

You can see it active on the forum of http://www.xboxusersgroup.com

Support

For support contact us through the feedback forum. ALL MODIFICATIONS ARE DONE AT YOUR OWN RISK. XBOX USERS GROUP IS NOT RESPONSIBLE FOR ANY LOSS OF DATA.

For gamertags with spaces look here for the solution.

Credits

All code is (c)2005 Xboxusersgroup.com and StonyArc.

You are however allowed to change the location / display location of the gamercard however you see fit.

predatorkill 11-01-2005 09:44 PM

i ll definetly install this in my site... you rule m8!!! :D :D

moethelawn 11-01-2005 09:49 PM

I'll have to keep this in mind... thanks dude!

Extreme John 11-02-2005 03:07 AM

If I didnt drink tonight I would so install this, you rule... this goes in 2morrow.

john1744 11-02-2005 04:14 AM

If there was a way to add this as a button next to the aim, msn, yahoo icons, that when clicked on would bring a hover image of this up. It would be perfect. :)

stonyarc 11-02-2005 07:14 AM

Quote:

Originally Posted by john1744
If there was a way to add this as a button next to the aim, msn, yahoo icons, that when clicked on would bring a hover image of this up. It would be perfect. :)

There is the danger teamxbox.com might think you copied them.

But I'll have a look. Maybe it's doable with the "standard" collaps function of VB (should look cool)

DarkDestinyD 11-02-2005 12:43 PM

I think a option to make it pop up in a window or like something that says [Gamercard] then when you click it shows up in a drop down list. But either way nice mod man it will definatly fit my new gamer community i just opened.

FleaBag 11-02-2005 06:18 PM

This would be nice in the profile... My site is not about gaming, but a lot of the users have XBOX Live!; I wouldn't want it in the postbit as most users would not understand what it was for.

BLazeD1 11-02-2005 06:53 PM

I had this running in my postbit, and I am certain that there was some certain text that some user had put in their profile that made load spike to 100+. We were playing around all day yesterday trying to find it, and as soon as I removed the code from the postbit load is back to normal.

Is there anyway to make a php script that would convert the gamercard into a simple jpg file we could use with normal img src tags and no iframe?

stonyarc 11-02-2005 06:55 PM

Quote:

Originally Posted by FleaBag
This would be nice in the profile... My site is not about gaming, but a lot of the users have XBOX Live!; I wouldn't want it in the postbit as most users would not understand what it was for.

To add it to the profile it should be easy enough

http://www.xboxusersgroup.com/forums/member.php?u=25035

Just drop me a line if you need help with it

Just add a custom field in the sameway and add in the applicable template for your members


All times are GMT. The time now is 04:26 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.01133 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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