vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Xbox Headset in postbit. (https://vborg.vbsupport.ru/showthread.php?t=268109)

XLCR GODFATHER 08-06-2011 10:00 PM

Xbox Headset in postbit.
 
1 Attachment(s)
What this does: Allows users to choose from a list of headsets then allows it to show in their postbit legacy.

This mod should only take a few minuets to install

There are a few headsets available in the attached zip file. I used the most common ones for my community as well as the new Call of Duty MW3 headsets. There is also a no headset image containing a headset with a red ring/slash around it. They are saved in png 24 with a transparent background. You can add headsets as you need them.

I should not have to tell you to BACK UP YOUR FORUM before making any changes!

Step 1:
Upload the zip file to your images folder and unzip.

Step 2:
Create a new User Profile Field
Choose Single selection Menu
Call it "Headset"

(Optional) You can show a version of the available headsets below the dropdown menu as well as a forum link for members to request headsets that are not listed by pasting the following in the profile field description. Be sure to update the link to point to a forum on your site...
Code:

Please choose your Primary Headset from the drop down list above. If you do not see yours listed please request them <a href="www.yoursite.com/your_forum_for_requests">here. </a>
<br/>

<img src="images/headsets/No-Headset.png" alt="No-Headset" />
<img src="images/headsets/Stock-Headset.png" alt="Stock-Headset" />
<img src="images/headsets/Microsoft-Wireless.png" alt="Microsoft-Wireless" />
<img src="images/headsets/Halo3-Wireless.png" alt="Halo3-Wireless" />
<img src="images/headsets/Halo-Reach-Wireless.png" alt="Halo-Reach-Wireless" />
<img src="images/headsets/XLC.png" alt="XLC"/>
<img src="images/headsets/X1.png" alt="X1"/>
<img src="images/headsets/X11.png" alt="X11"/>
<img src="images/headsets/X31.png" alt="X31"/>
<img src="images/headsets/X41.png" alt="X41"/>
<img src="images/headsets/DX11.png" alt="DX11"/>
<img src="images/headsets/Black-Ops-Tritons.png" alt="Black-Ops-Tritons"/>
<img src="images/headsets/AX-180.png" alt="AX-180"/>
<img src="images/headsets/AX-720.png" alt="AX-720"/>
<img src="images/headsets/MW3-Bravo.png" alt="MW3-Bravo"/>
<img src="images/headsets/MW3-Charlie.png" alt="MW3-Charlie"/>
<img src="images/headsets/MW3-Delta.png" alt="MW3-Delta"/>
<img src="images/headsets/MW3-Foxtrot.png" alt="MW3-Foxtrot"/>

Step 3:
Paste the following into the profile fields options (Be sure there is a carriage return after each choice)

Code:

No-Headset
Stock-Headset
Microsoft-Wireless
Halo3-Wireless
Halo-Reach-Wireless
XLC
X1
X11
X31
X41
DX11
Black-Ops-Tritons
AX-180
AX-720
MW3-Bravo
MW3-Charlie
MW3-Delta
MW3-Foxtrot

You should not need to alter any other options when setting up the profile field unless you want something different.

Make note of the field# for the profile field you just created as you are going to need this later

Step 4:
Admincp->Styles & Templates->Style Manager
and choose edit templates from the dropdown menu of any or all parent styles you wish to edit.

Locate your postbit_legacy template and find
Code:

<vb:if condition="$show['avatar']">
                        <a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                                <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        </a>
                        </vb:if>

Add the following after the above (remember to replace the x with your field#
Code:

<!-- Headset in postbit -->
<vb:if condition="$post['fieldx']">

<img src="images/headsets/{vb:raw post.fieldx}.png" alt="{vb:raw post.fieldx}">
</vb:if>
<!-- End Headset in postbit -->

DONE!

You may choose to place your code somewhere else in your postbit legacy to suit your needs but I found I like this location the best.

XLCR GODFATHER 08-07-2011 03:27 AM

Reserved for updates...

OUTL4W 10-20-2013 09:18 AM

is there a way to have this show up in the user profile page below the gamerID's block
http://i155.photobucket.com/albums/s...8.png~original
within its own block?

CAG CheechDogg 10-20-2013 09:57 AM

Find the following line in your postbit_legacy :

Code:

{vb:raw template_hook.postbit_userinfo_right}
                                <div class="imlinks">
                                        {vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
                                </div>
                        </vb:if>

Add your code:

Code:

<!-- Headset in postbit -->
<div class="pbit"><vb:if condition="$post['fieldX']">

Headset: <img src="images/headsets/{vb:raw post.fieldX}.png" alt="{vb:raw post.fieldX}">
</vb:if></div>
<!-- End Headset in postbit -->

Make sure the code is right before the last div tag before you get to the </div>
<div class="postbody">

It needs to look like this:

Code:

{vb:raw template_hook.postbit_userinfo_right}
                                <div class="imlinks">
                                        {vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
                                </div>
                        </vb:if>
<!-- Headset in postbit -->
<div class="pbit"><vb:if condition="$post['field8']">

Headset: <img src="images/headsets/{vb:raw post.field8}.png" alt="{vb:raw post.field8}">
</vb:if></div>
<!-- End Headset in postbit -->
                </div>
                <div class="postbody">

I highlighted the last div tag that the code needs to be in between ....

franzes80 10-20-2013 10:54 AM

Good work.Please How do you call your skin?And your font?

OUTL4W 10-20-2013 03:15 PM

Quote:

Originally Posted by CAG CheechDogg (Post 2454828)
Find the following line in your postbit_legacy :

Code:

{vb:raw template_hook.postbit_userinfo_right}
                                <div class="imlinks">
                                        {vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
                                </div>
                        </vb:if>

Add your code:

Code:

<!-- Headset in postbit -->
<div class="pbit"><vb:if condition="$post['fieldX']">

Headset: <img src="images/headsets/{vb:raw post.fieldX}.png" alt="{vb:raw post.fieldX}">
</vb:if></div>
<!-- End Headset in postbit -->

Make sure the code is right before the last div tag before you get to the </div>
<div class="postbody">

It needs to look like this:

Code:

{vb:raw template_hook.postbit_userinfo_right}
                                <div class="imlinks">
                                        {vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
                                </div>
                        </vb:if>
<!-- Headset in postbit -->
<div class="pbit"><vb:if condition="$post['field8']">

Headset: <img src="images/headsets/{vb:raw post.field8}.png" alt="{vb:raw post.field8}">
</vb:if></div>
<!-- End Headset in postbit -->
                </div>
                <div class="postbody">

I highlighted the last div tag that the code needs to be in between ....

thanks cheech....but already have that setup in my postbit legacy....what I wanted was it also on each user profile page below the gamer card block....

OUTL4W 10-25-2013 12:36 PM

I have this on my one site running 4.2.1 but have another site running 3.8.7. So my question is what would be the equivalent postbit legacy code to have this show up?

OUTL4W 10-26-2013 11:42 AM

ahhh figured it out...for those still on 3.8.x look for:
Code:

</td>
        <if condition="$show['moderated']">
        <td class="alt2" id="td_post_$post[postid]" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">

and place this code above it:
Code:

<!-- Headset in postbit -->
div class="pbit"><if condition="$post['fieldx']">

Headset: <img src="images/headsets/$post[fieldx].png" alt="$post[fieldx]">
</if></div>
<!-- End Headset in postbit -->



All times are GMT. The time now is 11:41 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.01177 seconds
  • Memory Usage 1,756KB
  • 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
  • (12)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete