MyBB Community Forums

Full Version: [MOD] Country Flags in Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Attached is a folder of 204 country flags.  To have these shown in postbit follow these instructions.


1.  Upload flag images folder to root/images/flags/
2.  In admincp create a new Custom Profile Field.
   a.  Make is a "select box"
   b.  Paste the country.txt text into the select field
   c.  I advise a required field as well otherwise you will have a blank image spot in postbit
3. Edit your postbit template with the instructions below

Find
{$post['user_details']}

Add below (change the X of fidX to your custom profile ID for the country flag i.e fid4 instead of fidX)

  
<img src="images/flags/{$post['fidX']}.gif" border="0" alt="{$post['fidX']}" /><br />

You should now be all set.

Attached is the folder you will need with txt file and country gifs.

Download Link
Thanks for your help with this! I'll give it a try!  Big Grin

Also, are you sure you included the text file?  All I see are the flags!

EDIT:  It WORKS!!!!   LOL...luckily, the editing I had done to Zaher's mod already had the custom profile field created, so I didn't have to do that step!  Phew! Thanks, labrocca!

And I have an idea for those that don't want to make this a mandatory field.  Create a .gif image that is clear or has "no map selected" or similar and name it something like Select Map and just be sure to put that name at the top of the list of maps in the custom profile field. That way, if nothing is selected, there won't be that red x to signify a missing image!  Big Grin It will still have to be listed as a mandatory field, but it won't trip new members up if they don't select their map.
Does it work with mybb vesion 1.2.xx ?
i dunno, but we need to use some prettier country flags.
This is a modified mod for 1.2...and how can we use prettier flags? LOL  Toungue

and though I never got a response, the countries txt file is within the country maps! I just didn't see it the first time I looked.
The country list is inside the ZIP download I have in the original post. It matches the flag images I have in the folder.
The official plugin is now here. The plugin will remove all this rule of thumb handy work you have to do with this modification.

Also i'd like from you labrocca, to set this down. Smile no offense. Reasons explained in my mods and plugins list.
Ooo, thankies for this ^^
zaher1988 Wrote:The official plugin is now here. The plugin will remove all this rule of thumb handy work you have to do with this modification.

Also i'd like from you labrocca, to set this down. Smile no offense. Reasons explained in my mods and plugins list.

This plugin do NOT work with MyBB 1.2.3
I followed the installation and choose the swedish flag to be shown but there is no flag at all, not even when i use ID 301 which should be the swedish flag
labrocca Wrote:Attached is a folder of 204 country flags. To have these shown in postbit follow these instructions.


1. Upload flag images folder to root/images/flags/
2. In admincp create a new Custom Profile Field.
a. Make is a "select box"
b. Paste the country.txt text into the select field
c. I advise a required field as well otherwise you will have a blank image spot in postbit
3. Edit your postbit template with the instructions below

Find
{$post['user_details']}

Add below (change the X of fidX to your custom profile ID for the country flag i.e fid4 instead of fidX)

<img src="images/flags/{$post['fidX']}.gif" border="0" alt="{$post['fidX']}" /><br />

You should now be all set.

Attached is the folder you will need with txt file and country gifs.

Download Link

There is no country.txt file in that zip fil, just the flags
Pages: 1 2