Version: 1.00, by Cobro
Developer Last Online: Nov 2022
Category: Profile Enhancements -
Version: 3.7.0
Rating:
Released: 05-27-2008
Last Update: 05-27-2008
Installs: 140
Re-useable Code
No support by the author.
This is not my work but i got these flags from my friend made them and he uses them on his forum and i just wanted to share it with you these are gif's so they are moving very cool just check them out and tell me what you think
I took flag's and applied to this code and it works.
Flags Install File - Country Only
1. Create Flags Profile Fields:
Go to AdminCP > Profile Fields > Add new Profile field > Single Select Menu
Title - Country Flag
Description - Select your Country Flag
Options - [copy and paste list of countries in country_flags_list.txt to this option field]
Set Default: None
Editable By User: Yes
Display Page: Edit Profile
Write down your field number, ie field8
2. Edit the postbit_legacy template:
Go to AdminCP > Styles & Templates > Style Manager
In your template list on the right select Edit Templates from the dropdown menu of the desired template
Double click Postbit Templates
Double click postbit_legacy
Change X to the field id for your country flag.
ie, if your country flag is field8 the code will look like this:
<!-- / flags start -->
<div>
<if condition="$post[field8]"><img src="images/flags/$post[field8].gif"></if>
</div>
<!-- / flags end -->
3. Upload the folder flags to the images directory of your forum.
hey brother any demo on this i follow ur instruction but its not showing on postbit legacy??
something is wrong with file name (extension) GIF --- should be gif and how and where implement that code " {title}: <img src="./style_images/flag/flag_{key}.GIF" /> "
also must change all filenames to flags ... to countryname.gif
reg
macc
can some fix that and make wright code to put in postbit and postbit_legacy?
I am new at modding vB - first one actually - and I had this mod on phpBB so I have added it according to the user profile custom field addition and then linking to the flag name in postbit_legacy - and this does indeed work if the file is renamed from the list provided ie:
flag_au.GIF --> Australia.GIF works but that requires renaming all the flags according to the names in the list whilst the original bundle already provides a translation key:
...
au=Australia
...
in phpBB this is done using a language key where anything called for as 'au' shows up as 'Australia'; then the menu list would be the list of keys
...
au
...
which is an easier job to edit than the actual file names - including the fact that there are spaces and capitalisation in the file names and also some exceptions to the two letter country code etc...
There must be some simple code that would allow the supplied list to be used in both the dropdown and the image file translation without a lot of editing?
Language key:
at=Austria
au=Australia
aw=Aruba
ax=Aaland
Drop down menu is then set up as
at
au
aw
ax
but displays to users as
Austria
Australia
Aruba
Aaland
and when one is selected by the language key in the profile it translates to:
flag_at.GIF
flag_au.GIF
flag_aw.GIF
flag_ax.GIF
or
flag_$post[fieldX].GIF
Sort of thinking out loud since I don't even know if this is where such a question should be asked...