Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Gamefields Icons Xbox,Wii and Playstation userfields Details »»
Gamefields Icons Xbox,Wii and Playstation userfields
Version: 1.1, by Bilderback Bilderback is offline
Developer Last Online: Feb 2018 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.7.4 Rating:
Released: 11-17-2008 Last Update: 11-18-2008 Installs: 152
DB Changes Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.

Gamefields Icons v1.1

This is my first mod and is a spinoff of the IM & GT Icons by Datenpapst.
They are different mods with different code - same concept.
I would like to thank Datenpapst for allowing me to enhance
his original mod for 3.6.5 here.

Description
This hack adds 3 fields to the User Control Panel allowing members to enter their gaming information in profiles.
Nintendo Wii Friends Code
Xbox Live Gamertag
Playstation Network ID

Features
  • adds game id fields for users - edit your details
  • displays game icons in profile - contact tab
  • displays game icons in memberslist, postbit and post legacy
  • No Template Edits! Uses plugins, phrases and hooks
  • admincp settings enable/disable/display options
  • Reusable code in $user array - fields added to user database table

INSTALLATION
  1. Upload images
  2. Import Product XML
Upgrade
  1. Import XML and select Allow Overwrite

NOTICES
1. This hack adds three database fields in your user table.
Provided "as is" with no warranty.I take no responsibility for your board
Always make a back up before modifying anything
2. The profiletab plugin uses str_replace for display.
If you have modified your profile templates, (ie Facebook MySpace template hacks),
the plugins and hooks may not work for your forum.
Since this is my first attempt at vBulletin, I cannot fully support this mod.
But I will try to provide some support if time allows.

DEMO HERE

Feature Requests
add Xfire
add Clan fields
add usergroup settings
add AJAX profile edit
add image replacement options

VERSION HISTORY
  • version 1.1
    ~fixed admin cant edit user
    ~added admincp settings and display options
  • version 1.0
    ~original beta release

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 01-04-2009, 06:06 AM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for the lack of updates.
I have decided it's not good to alter the user table and have been developing
a 3.8 version with its own table which will provide multiple field options.
It's coming along very slow since I have been busy on other projects
but I hope to have it out soon.
Feel free to hack away at this Mod though.
Reply With Quote
  #53  
Old 01-06-2009, 11:38 PM
EyeintheSky57 EyeintheSky57 is offline
 
Join Date: Dec 2008
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DragonMasterNYC View Post
Here is something for the PSN

Add This to the PlayStation Network so that it's clickable and shows the card.

Code:
<td><a href="#" onclick="openWindow('http://pid.us.playstation.com/user/$userinfo[gf_playstation].jpg', 235, 149); return false;">$userinfo[gf_playstation]</a></td>
I'm sure this will help you out for next release Bilderback

Also here is an updated PSN Icon
Can anyone tell me how to add this code?

I am a complete newbie. But, i am good at following directions.

Thanks.
Reply With Quote
  #54  
Old 01-18-2009, 05:32 AM
Bradley_Wint Bradley_Wint is offline
 
Join Date: Jul 2007
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EyeintheSky57 View Post
Can anyone tell me how to add this code?

I am a complete newbie. But, i am good at following directions.

Thanks.
Well I just mirrored the Xbox code and added the PS3 link instead.

Game Fields Icons Templates > gamefields_playstation
Code:
<input type="hidden" name="playstation code" value="$userinfo[gf_playstation]">
		<if condition="$userinfo[gf_playstation]"> <a href="#" onclick="openWindow('http://pid.us.playstation.com/user/$userinfo[gf_playstation].jpg', 255, 169); return false;"> <img src="$vboptions[bburl]/images/misc/gf_playstation.gif" alt="" title="$vbphrase[gf_playstation_network_id]: $userinfo[gf_playstation]" border="0"></a></if>
Reply With Quote
  #55  
Old 01-18-2009, 11:58 AM
Bradley_Wint Bradley_Wint is offline
 
Join Date: Jul 2007
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also, I have found a way to make it work with gXboxLive, but it would mean that if you need to update this mod, you will have the change the info in the XML each time. Basically you will not be supported by the author if you make this change. PM me for details.
Reply With Quote
  #56  
Old 01-19-2009, 05:52 AM
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bradley_Wint View Post
Also, I have found a way to make it work with gXboxLive, but it would mean that if you need to update this mod, you will have the change the info in the XML each time. Basically you will not be supported by the author if you make this change. PM me for details.
I would like to do this. I PM'ed you.

Have anybody else done this?
Reply With Quote
  #57  
Old 01-19-2009, 12:44 PM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Mod isn't supported anyway and could use some improvement.
Feel free to hack away.
Reply With Quote
  #58  
Old 01-19-2009, 11:03 PM
Bradley_Wint Bradley_Wint is offline
 
Join Date: Jul 2007
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, with that note, I guess I'll post it here.

So after taking a look at both mods, I think that sharing the db information is the way to link the two. However, each mod writes entries into separate tables in the vB database. This mod adds information to the user table and the gXboxLive uses the userfield table.

Since this is a much smaller mod, I think it would be best to mod this since it's only one file of code, rather than over 10 different files for gXboxLive. With the gXboxLive, they ask you to make a new field (lets say your field id is 5). In the MySQL backend, the userfield will have a record called field5, where the gXboxLive usernames will be stored for each individual user.

My theory is, set up your gXboxLive mod first, get the code (once again we use 5). Now in this mod, there is a bit of MySQL you need to change.

Code:
		<code>
			<installcode><![CDATA[
			if (!field_exists('user', 'gf_xbox', 'gf_wii', 'gf_playstation'))
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD gf_xbox VARCHAR( 15 ) AFTER msn");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD gf_wii VARCHAR( 19 ) AFTER msn");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD gf_playstation VARCHAR( 16 ) AFTER msn");
			function field_exists($table, $field)
			{
				global $db;
				return ($db->num_rows($db->query_read("SHOW COLUMNS FROM `" . TABLE_PREFIX .$table."` LIKE '".$field."'"))> 0);
			}
			]]></installcode>

			<uninstallcode><![CDATA[$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP gf_xbox");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP gf_wii");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP gf_playstation");]]></uninstallcode>
		</code>
Now you will want to change it to something like this
Code:
		<code>
			<installcode><![CDATA[
			if (!field_exists('userfield', 'field5', 'field6', 'field7'))
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field5 VARCHAR( 15 ) AFTER field4");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field6 VARCHAR( 19 ) AFTER field4");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field7 VARCHAR( 16 ) AFTER field4");
			function field_exists($table, $field)
			{
				global $db;
				return ($db->num_rows($db->query_read("SHOW COLUMNS FROM `" . TABLE_PREFIX .$table."` LIKE '".$field."'"))> 0);
			}
			]]></installcode>

			<uninstallcode><![CDATA[$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield DROP gf_xbox");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield DROP field6");
			$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield DROP field7");]]></uninstallcode>
		</code>
Basically I am replacing the variables.

user > userfield
gf_xbox > field5
gf_wii > field6
gf_playstation > field7

Please not these field numbers may vary depending on the number of fields you already have. So say you assigned field20 to gXboxLive, gf_xbox would be field21, gf_wii would be field22 and gf_playstation would be field23.

The excerpt above deals with only the initial set up of the tables and what not. I just highlighted that portion since it sets the stage for the entire code to function properly. Continue reading.

Now the confusing bit starts, because I didn't have time to sit down and figure what exactly was a MySQL function or a template function, even though I could pretty much tell by looking (just lazy to go through all honestly). So if you want to take the chance, remember what you assigned the initial MySQL entries as.

e.g.
user > userfield
gf_xbox > field5
gf_wii > field6
gf_playstation > field7

Now, basically it's about going into an editor and replacing all the variables in the XML document. Basically your MySQL entries will be renamed and aligned with the userfield data, so new data will be recorded there instead. However, your templates will also be renamed (e.g. field5_live_gamertag). So if you are prepared to remember how you assigned them, then in theory this should work. I haven't tested it out yet since I didn't get the time, but I think this is basic math here since the author wrote his code pretty straightforward, and replacing the vars shouldn't be a big issue, once it's done it unison.

However, please BACK UP YOUR DATABASE first before trying anything.

Then, install gXboxLive and then install this code. Im guessing if you had gXboxLive already installed, no biggie either.

I would pray that they both work simultaneously.
Reply With Quote
  #59  
Old 01-20-2009, 01:50 AM
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much for this...I followed your instructions, and the 3 fields are there and labeled properly. I am getting this error when I try to update my gamer info in User CP...

MySQL Error : Unknown column 'field66' in 'field list'
Error Number : 1054
Reply With Quote
  #60  
Old 01-20-2009, 03:13 AM
Bradley_Wint Bradley_Wint is offline
 
Join Date: Jul 2007
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We shall talk more via PM
Reply With Quote
  #61  
Old 01-20-2009, 03:16 AM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@MikesSite
Even if you change the database entries, the plugin code still uses the user table.

This was a theoretical view and I wouldnt advise attempting this quite yet.
I backed myself into a corner by releasing this Mod because if it is ever uninstalled,
all user data from the fields are deleted.
I really need to write a transfer tool which allows the data to be passed to custom
profile fields if ever it were to be uninstalled or get them into their own table which
could simply be left behind without issues.
On another note, a conditional could be used for gxboxlive detection in the plugins.
Alot could be done to enhance this but I am still new to vbulletin and cant get it from
my head into a text editor yet.

Instead of using the user table, another possiblility would be too query the fields for the
last entry and simply add three additional profile fields.
Its one of those "Why did I do that?" deals.
If anyone can enhance this or has suggestions, feel free to modify the code.
After researching the history, it appears that Datenpapst had used code from an author
who used code from another author who hasnt been around for many years and vb versions.
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 12:35 AM.


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.04854 seconds
  • Memory Usage 2,328KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (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_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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete