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)
-   -   Add-On Releases - Country Flags - Postbit & Postbit_Legacy. vB 3.8.X (https://vborg.vbsupport.ru/showthread.php?t=238863)

Welshy2008 03-21-2010 10:00 PM

Country Flags - Postbit & Postbit_Legacy. vB 3.8.X
 
1 Attachment(s)
After receiving many PMs for me to do my version of this mod, I have obliged.

Original Credit for the Mod goes to Cobro.

If you use this Mod, Please click "Installed" and rate the Mod fairly. :)

This Mod is available for vb4.0.X here:

https://vborg.vbsupport.ru/showthrea...02#post2008102



Description:

This Add on, gives a selection of Countries that your Member (New or Existing) can choose from in a 'Drop-Down Menu'. The Country he/she selects, will be displayed as a Flag in their Postbit.


Instructions:

Firstly ?Upload? ALL the Flag GIF pics to your forum root /images/buttons/flags folder.

IE: yourforumaddress.com/forum/images/buttons/flags

Please Note: Due to the flags folder being too large to upload as one - I have been forced to upload it as "flags1", "flags2" and "flags3" - Please ensure that you add a new folder to "images/buttons/" and name it "flags". Please copy the contents of ALL THREE (3) flags folders in the attachment below to the new 'flags' folder that you have just made. (DO NOT place them as 3 seperate folders!"


Then in your Admin Control Panel (ACP), please do the following:
ACP -> User Profile Fields -> Add New User Profile Field ->Profile Field Type -> Single-Selection Menu (select ?Single-Selection Menu? from the Drop-Down Menu) -> Please enter the following into the following fields (REMEMBER to make a note of the FieldID, because you will need to replace ALL the X?s in [fieldX] with it!!!
(Please see 'FieldID.jpg' attachment below).

Add New User Profile Field Single-Selection Menu:

Title = Country Flag
Description = Add your country flag to your profile:
Profile Field Category = (Uncategorized)
Options = Copy & Paste the Whole contents of the file attached below (OPTIONS)
Set Default = None
Display Order = You Select this (dependant on how many you already have)
Field Required = yes, at registration and profile updating
Field Editable by User = Yes
Private Field = No
Field Searchable on Members List = No
Show on Members List = Yes


Optional Input:

Allow user to input their own value for this option = No
Max length of allowed user input = 100
Field Length = 25
Regular Expression = Leave this Blank


Display Page:

Which page displays this option? = Edit Your Details

** SAVE **


Then, In your Admin Control Panel (ACP)...


For Postbit:


ACP -> Styles & Templates -> Style Manager -> <<>> -> Postbit Templates -> postbit


FIND:


Code:

                                <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                                <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
                                $template_hook[postbit_userinfo_left]


ADD BELOW:


Code:

<!-- Wy Country Flags Start -->
<if condition="$post['fieldX']">
        Country: <img src="http://www.Yourforum.com/images/buttons/flags/$post[fieldX].GIF" alt="$post[username]'s Flag is: $post[fieldX]" border="" />
</if>
<!--// Wy Country Flags End -->


For Posbit_Legacy:


ACP -> Styles & Templates -> Style Manager -> <<>> -> Postbit Templates -> posbit_legacy...


FIND:


Code:

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</if>
                        <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
                        $template_hook[postbit_userinfo_left]


ADD BELOW:


Code:

<!-- Wy Country Flags Start -->
<if condition="$post['fieldX']">
        Country: <img src="http://www.Yourforum.com/images/buttons/flags/$post[fieldX].GIF" alt="$post[username]'s Flag is: $post[fieldX]" border="" />
</if>
<!--// Wy Country Flags End -->


BOTH of the codes above will give you the Username and the Name of the actual Users Country Flag on mouseover.


TIP: (If you find that you get the box with a "red x" like this http://www.sbhple.com/images/sample.png, instead of seeing your image whilst using Option 1, Above - This means that the route to your images is wrong.


** Replace the ?X? with your FieldID number **
** Replace the ?Red Text? with Your Forum Address **

** SAVE Template **





And that's it - Enjoy!


Please do not forget to click "Install"

Super-six 03-22-2010 08:28 PM

Excellente ! :D

We'll be installing this one.
BTW...thanks for the personal customer service also.

Welshy2008 03-22-2010 08:42 PM

Quote:

Originally Posted by Super-six (Post 2008383)
Excellente ! :D

We'll be installing this one.
BTW...thanks for the personal customer service also.


You're Welcome, Let us know here, how you get on with it on 3.8.5.

ShawneyJ 03-22-2010 10:57 PM

Excellent. i already have this on my forum, but its good to see finally a addon using the animated flags. ;)

MichaelDance 03-23-2010 06:01 PM

TY you know our problem with flags before, could i use mine which i did for you on vb4.0 or are they fixed on this one??

Welshy2008 03-23-2010 07:47 PM

Problem?

These are all .GIF(s), But you are able to use your own if you so wish. :)

as7apcool 03-23-2010 07:54 PM

thanks 4 this .. really good

cheech47 03-24-2010 03:04 PM

Is there anyway to get these flags to work in who's online?

Thanks

matthewhotdude 03-24-2010 07:17 PM

installed as instructions, People are able to choose the flags, but nothing shows up in the postbit. It's showing up as a red X

When I right click the red X it's linking to the flags like this http://www.chattaboxforums.com/image...ons/flags/.GIF

Why??

ghostpt 03-24-2010 07:45 PM

Quote:

Originally Posted by matthewhotdude (Post 2009586)
installed as instructions, People are able to choose the flags, but nothing shows up in the postbit. It's showing up as a red X

When I right click the red X it's linking to the flags like this http://www.chattaboxforums.com/image...ons/flags/.GIF

Why??

When you add User Profile Field check the ID of the field. Eg: If the field is field10, replace the X with 10.

Code:

Country: <img src="http://www.Yourforum.com/images/buttons/flags/$post[field10].GIF" alt="$post[username]'s Flag is: $post[field10]" border="" />


All times are GMT. The time now is 03:07 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.01511 seconds
  • Memory Usage 1,753KB
  • 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
  • (5)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