vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - Country Flags - Postbit & Postbit_Legacy. vB 4.0.x (Inc GO (https://vborg.vbsupport.ru/showthread.php?t=229511)

Welshy2008 12-03-2009 10:00 PM

Country Flags - Postbit & Postbit_Legacy. vB 4.0.x (Inc GO
 
1 Attachment(s)
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.

Credit for the Flags goes to Cobro. (I have renamed each and every flag to work with this Mod).


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 ** Please note that the vB4.0.4 Version does not show this option. Please select "Edit Profile" option. The selct your country flag option, I can confirm, Also shows on registration too.
** SAVE **


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

ACP -> Styles & Templates -> Style Manager -> <<>> -> Postbit Templates -> select the template that you use (ie Postbit or Posbit_legacy) ? This is for the Postbit_Legacy?

FIND:
Code:

                    <span class="usertitle">
                        {vb:raw post.usertitle}
                    </span>


If you would like to place it under your number of user posts (to the right of your Postbit) then look for:

Code:

<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>

(upto vB4.0.5) ADD BELOW:

Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"> <dt>Country:</dt> <img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.fieldX}.GIF" alt="Users Country Flag" border="" /></vb:if>
<!-- Wy Flags End -->

(for vB4.0.6 AND 4.0.7) ADD BELLOW:

Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"> <dt>Country</dt> <img src="http://www.YOURFORUM ADDRESS.com/forum/images/buttons/flags/{vb:raw post.fieldX}.GIF" alt="This is {vb:raw post.username}'s Country Flag" border="" /></vb:if></p>
<!-- Wy Flags End -->

(Also adds the Username to the 'alt' Code on Mouseover).

(for vB4.0.8):

Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"><style="text-align:left"> Country:</dt> <img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.fieldX}.GIF" align="middle" alt="Users Country Flag" border="" /></vb:if> 
<!-- Wy Flags End -->

(Thanks to Krusty1231 for this).

(for vB4.1.0 , 4.1.0 PL2 & 4.1.1)

Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"><style="text-align:left"> Country:</dt> <img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.fieldX}.GIF" align="middle" alt="{vb:raw post.fieldX}" border="" /></vb:if> 
<!-- Wy Flags End -->

Even though I have not tested this in these versions, others have and have reported this mod to be working in them.[/B]

Please make sure the style and template edits are still there. Just one of the people can be seen on post 350


** 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"

Edit & Update TRACKER - Keep Upto date here:

** 30/05/2012 - Update "Flags2 to include correct name on Switzerland flag"..

** 27/09/2010 - Update on 4.0.6 "added code for the 4.0.6 Version, and instructions on how to place the flug under a user's postcount in posbit"..


** 12/07/2010 - Update on 4.0.4 "Which page displays this option"..

** 26/06/2010 - Updated Flag Names and Country Names in the "Options" text file. PLEASE Re-upload and overwrite all three flag folders and the options Text file...

** 15/01/2010 - Made all the Countries in the "OPTIONS.txt" in Alphabetical Order..

** 27/12/2009 - Changed the contents of OPTIONS.ZIP folder from a .docx file to a .txt file, as requested.

** 26/12/2009 - Option 2 Added
- Flag folder Updated (UK.gif changed to UK.GIF)


** 05/12/2009 - OPTIONS File Added.

Welshy2008 12-04-2009 05:56 PM

** Reserved **

Charlie98902 12-04-2009 08:40 PM

Thanks I'll try this out tomorrow.

Dr.osamA 12-04-2009 10:00 PM

thanxxx man

Installed

sorry man but wer is the list of Country ??
________
Wife Double Penetratio

Ranger375 12-05-2009 01:09 AM

Yeah, list of countries please!

Charlie98902 12-05-2009 01:16 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=228371" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=228371</a>

Dr.osamA 12-05-2009 01:29 AM

thanxx Charlie98902

but this list well work for this mod ??
________
RENT GUARANTEE FORUMS

Charlie98902 12-05-2009 01:30 AM

I can only assume.

Dr.osamA 12-05-2009 01:38 AM

thanxx Charlie98902

but is that list work with this mod ?

nestaron 12-05-2009 01:41 AM

You'll need to remove the dashes (-) in the country names if the country would not normally have a dash. The names in the list must match the file names for the graphic files; or you need to change the graphic file names to match the list.

Welshy2008 12-05-2009 07:22 AM

Quote:

Originally Posted by Dr.osamA (Post 1925462)
thanxxx man

Installed

sorry man but wer is the list of Country ??

Quote:

Originally Posted by Dr.osamA (Post 1925536)
thanxx Charlie98902

but this list well work for this mod ??



Sorry Guys,


The countries within that File, Charlie - Won't work on the vB4 - I had re-done the ones that needed to be done, but I didn't upload the file.

I Have uploaded them as a "Word doc" within a Zip file for you now.

They Can be found as an attachment in the Opening Post.

Vaupell 12-05-2009 08:20 AM

note when using {vb:stylevar imgdir_button} if you use a costum style which have its own img dir, the link dont match..

i solved it by simply removeing it and replaceing it why my own path.. :D
Just fyi

Welshy2008 12-05-2009 08:23 AM

Quote:

Originally Posted by Vaupell (Post 1925635)
note when using {vb:stylevar imgdir_button} if you use a costum style which have its own img dir, the link dont match..

i solved it by simply removeing it and replaceing it why my own path.. :D
Just fyi



Thank You Vaupell. :)

abdobasha2004 12-05-2009 11:59 AM

thanks
reserved

Ranger375 12-05-2009 12:20 PM

5 stars, thanks!

gedr80 12-05-2009 03:51 PM

Thanks :up:

Alecsmith 12-05-2009 04:04 PM

Good Work :)

Dr.osamA 12-05-2009 07:22 PM

OPTIONS.zip ??

hwat is the file
________
Shemale Hardcore

Ranger375 12-05-2009 10:01 PM

Quote:

Originally Posted by Dr.osamA (Post 1925874)
OPTIONS.zip ??

hwat is the file

It's the list of countries

hendri 12-05-2009 11:33 PM

i like it !!! work on beta 5

cyber3 12-06-2009 02:19 AM

I cant get the flags to show on Beta 5 ??

I even changed the path to be the absolute URL, and I can see the flags via the direct url, but they are not showing on the users profile area - the option to select Country shows in the edit profile, and you can select your country (in text) does not show graphic flag.

PROBLEM SOLVED!!!

SİMAR 12-06-2009 01:48 PM

thanks nice man

Welshy2008 12-06-2009 07:04 PM

Quote:

Originally Posted by cyber3 (Post 1926073)
I cant get the flags to show on Beta 5 ??

I even changed the path to be the absolute URL, and I can see the flags via the direct url, but they are not showing on the users profile area - the option to select Country shows in the edit profile, and you can select your country (in text) does not show graphic flag.



PROBLEM SOLVED!!!


What was the problem after? Root to files?

Welshy2008 12-06-2009 08:10 PM

Quote:

Originally Posted by SİMAR (Post 1926287)
thanks nice man

You're Welcome.

Abu Noor 12-07-2009 06:24 PM

This is cool, but my members in Switzerland are very annoyed that there is no flag for their country.

sean-zigster 12-08-2009 02:39 PM

great mod looks quality, 1 thing how do you get it to show in the members list if possible ?

Welshy2008 12-09-2009 01:52 PM

Quote:

Originally Posted by sean-zigster (Post 1927291)
great mod looks quality, 1 thing how do you get it to show in the members list if possible ?

Good Question.

I have had a look on mine and it isn't showim=ng on there either. Even though the "Yes" is selected to show in "Member List".

This should be standard through vB.

Britmovie 12-12-2009 06:39 AM

Hi got it all set up but no image showing just a blank space see britmovie profile www.britmovie.net it may be as my theme is root/syles/xmas but not certain what to change...any help would be great!

Welshy2008 12-12-2009 08:14 PM

Been to have a look, but it says that the site is down for Mainanence.

Welshy2008 12-12-2009 10:47 PM

Quote:

Originally Posted by Britmovie (Post 1929203)
Hi got it all set up but no image showing just a blank space see britmovie profile www.britmovie.net it may be as my theme is root/syles/xmas but not certain what to change...any help would be great!

Do you mean that you have changed the 'buttons' folder to 'styles' and the 'flags' folder to 'xmas'? (I don't believe you did).

OR

Your Route is for example:

Code:

http://www.britmovie.net/styles/xmas/

If the latter, you will need to add (If you haven't already got one in there) a folder and name it 'images', then - in that folder add another one and name it 'buttons' and finally, add a folder within the buttons and name it 'flags'.


Your route will then look like this:

Code:

http://www.britmovie.net/styles/xmas/images/buttons/flags

Then you change the following (that is in Bold Red) in your Postbit or Postbit_Legacy (whichever you use)...


Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"> Country: <img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.fieldX}.GIF" alt="Users Country Flag" border="" /></vb:if>
<!-- Wy Flags End -->


And add
Code:

http://www.britmovie.net/styles/xmas/images/buttons
in its place...


... It will then look like this...


Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"> Country: <img src="http://www.britmovie.net/styles/xmas/images/buttons/flags{vb:raw post.fieldX}.GIF" alt="Users Country Flag" border="" /></vb:if>
<!-- Wy Flags End -->




Let me know how you get on. If you'd like to, I could have a look at it for you.


Also, DON'T forget that in the TWO fieldX places - You will need to change the 'X' to the FieldID number that shows in your profile field (As can be seen in my Attachments in my 1st post / OP).

CFodder 12-14-2009 06:30 AM

1 Attachment(s)
Great mod thanks Welshy :D.

I've moved the flag to up alongside the username, was wonder if you, or anyone else, knows how I could move it more to the right in the postbit, and also have the username at the top? I could do it with html but am unsure on css at this stage. Have atrtached a pic so you can see what I mean

Vaupell 12-14-2009 07:41 AM

1 Attachment(s)
Placed mine where it says location in the first place.
makes more sense if users add something in the location field.

Attachment 107518

CFodder 12-14-2009 07:56 AM

Hmmmm, yeah, does make sense, not having location showing on ours tho, tend to get some interesting locations put in ;). Do like it centred under join date tho, sets it away from the avatar.

Welshy2008 12-14-2009 02:46 PM

May I trouble you to "Rate" the Mod Please Guys?

Thank You.

Vaupell 12-14-2009 09:43 PM

anyone on RC2 able to run this ?

just upgraded to rc2 and not working anymore.. style is ok installation is fine..
when loading my pages, i see the flag for a sec, then css hides it.. strange.

Ranger375 12-15-2009 02:44 PM

Yeah it works on RC2.

Britmovie 12-15-2009 03:09 PM

Quote:

Originally Posted by Welshy2008 (Post 1929612)
Do you mean that you have changed the 'buttons' folder to 'styles' and the 'flags' folder to 'xmas'? (I don't believe you did).

OR

Your Route is for example:

Code:

http://www.britmovie.net/styles/xmas/

If the latter, you will need to add (If you haven't already got one in there) a folder and name it 'images', then - in that folder add another one and name it 'buttons' and finally, add a folder within the buttons and name it 'flags'.


Your route will then look like this:

Code:

http://www.britmovie.net/styles/xmas/images/buttons/flags

Then you change the following (that is in Bold Red) in your Postbit or Postbit_Legacy (whichever you use)...


Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"> Country: <img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.fieldX}.GIF" alt="Users Country Flag" border="" /></vb:if>
<!-- Wy Flags End -->


And add
Code:

http://www.britmovie.net/styles/xmas/images/buttons
in its place...


... It will then look like this...


Code:

<!-- Wy Country Flags Start -->
<vb:if condition="$post['fieldX']"> Country: <img src="http://www.britmovie.net/styles/xmas/images/buttons/flags{vb:raw post.fieldX}.GIF" alt="Users Country Flag" border="" /></vb:if>
<!-- Wy Flags End -->




Let me know how you get on. If you'd like to, I could have a look at it for you.


Also, DON'T forget that in the TWO fieldX places - You will need to change the 'X' to the FieldID number that shows in your profile field (As can be seen in my Attachments in my 1st post / OP).

Thanks i'll try that

CFodder 12-15-2009 06:48 PM

Works fine on my RC2 Vaupell. Have rated it for you Welshy.

Vaupell 12-16-2009 08:42 PM

Found my problem, dureing upgrade it have somehow changed my fields.
was using field 5, and it said so in the db, but when checking the db userfields
it was now 7, and 5 didnt ewen exist..

haha minor problem, fixed.. and working again.. yay

Getting ALOT of heat from scottish people cause it says .UK on their flag..
alot of the scotish people i know are as fond about the english as the irish.. .UK tsk tsk.. :P

Cadellin 12-24-2009 03:12 PM

A great mod :) /Installed

Only one thing I could mention is the image "Autre" I think you missed in translation and should be "Other" (my French is a little rusty though).

As a suggestion to others I renamed "Autre" to "Blank" then added it to the top of the list for users who didn't want to display their nationality as I've forced users to make a selection.


All times are GMT. The time now is 06:21 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.01631 seconds
  • Memory Usage 1,854KB
  • 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
  • (16)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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