vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Nintendo Wii Friend Code in Profile & Postbit (https://vborg.vbsupport.ru/showthread.php?t=133068)

Sim9 12-02-2006 10:00 PM

Nintendo Wii Friend Code in Profile & Postbit
 
A quick guide on adding a Nintendo Wii Friend Code profile field and postbit icon. Example here or see attached screenshot.

Step 1: Add Profile Field

Go to your Admin CP and add a new profile field for the Wii Code. This option can be found under User Profile Fields >> Add New User Profile Field. I suggest you use Single-Line Text Box with a maximum length of 19 (that allows for 16 digits and three spaces). Name the field something like "Nintendo Wii Friend Code."

Save, and check the Profile Field Manager. Make a note of the field name. For me, it is 'field5', but your results will differ depending on what your other profile fields are.

Step 2: Create & Upload an Appropriate Image for the Postbit

Create an image that is appropriate for Nintendo Wii and will fit nicely next to the other communication icons. Since I already made an appropriate icon for Nintendo Wii news posts, I have re-used that icon on my site for Wii Friend Codes. Create an icon that works well on your site, and upload it to your images folder. Make a note of the image URL, you will need that for the next step.

Step 3: Add Postbit Icon

Now pull up the AdminCP and go to Styles & Templates >> Style Manager. Choose Edit Template for the template your site is using (repeat this step for each unique root-level tempate your site uses). Open the Postbit Templates section and choose either Postbit or Postbit_Legacy depending on which type of postbit your site uses (vertical or horizontal).

Edit the template to include an image after your communication icons are listed.

The code template to display the image is below:

HTML Code:

<if condition="$post[YOUR_WII_FIELD_NAME_HERE]"><img src="YOUR_WII_IMAGE_PATH_HERE" alt="Wii Friend Code: $post[YOUR_WII_FIELD_NAME_HERE]"></if>
For instance, here is my communication icon line before and after edits:

Before:

HTML Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
</div>

After:

HTML Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
<if condition="$post[field5]"><img src="http://forums.editingarchive.com/images/newsposticons2/wii.jpg" alt="Wii Friend Code: $post[field5]"></if>
</div>

Step 4: Test it Out & Notify Your Users

Go to your User CP, and update your profile with your Wii Code (or make one up if you don't have a Wii :P). That number should show up on your profile and as an icon in your postbit. If everything works, annouce it to your community and encourage them to add their Wii numbers.

Devil Woman 12-03-2006 12:49 AM

Thanks for this, and in advance aswell befoe it's due out in shops.

*installed*

PabloAM 12-07-2006 11:13 AM

Thanks ;)

Saulie 12-07-2006 11:23 AM

This could be really useful if it picks up.
Im just going to wait a while for the wii to come out and see if people on my forum use it and if it does definatelly a great hack!

Thanks

GamerJunk.net 12-08-2006 11:53 PM

Annoying thing is, Nintendo Friend Code is different for each game

Sim9 12-09-2006 10:47 PM

Thanks for the support, guys :)

GamerJunk.net - The Nintendo DS friend code is indeed per-game. The Nintendo Wii code is per-system. :)

GamerJunk.net 12-11-2006 11:26 PM

Ahh didn't read the Wii part

pastapiggy 12-16-2006 04:29 AM

Installed,thanks my users wanted something like this:rolleyes:

Necrosaro420 12-18-2006 07:52 PM

Ok, when I input the wii code itself while editing the profile, I can put in the # etc etc. When it shows on my postbit, itll display the image, but will not display the number? Any ideas? Thanks!

Canis Firebrand 12-19-2006 05:40 PM

If you just cut and pasted this part,

Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
<if condition="$post[field5]"><img src="http://forums.editingarchive.com/images/newsposticons2/wii.jpg" alt="Wii Friend Code: $post[field5]"></if>
</div>

You need to look at the field number for your Wii code field. If it isn't field5, nothing will show when you over over the Wii image.

You'll have to see what the field number is in your profile fields manager and edit the template again to change it from field5 to whatever field number it is.


All times are GMT. The time now is 09:13 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.02199 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)bbcode_html_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