Hi there, basically I want to create a field where one can select its country (name) and the flag would appear on one's profile and post.
Basically the Country Flags mod but for 2.1 but since there's none, all I did was come up with what I did on the attachment lol
I don't want to annoy someone with a perfect answer but where should I be looking at to create such field?
Are you on 2.1 or 2.0.x?
Wouldn't this mod accomplish what you want? https://custom.simplemachines.org/index.php?mod=417
Quote from: Steve on September 14, 2021, 08:21:36 PMAre you on 2.1 or 2.0.x?
Wouldn't this mod accomplish what you want? https://custom.simplemachines.org/index.php?mod=417
Ehh?
Quote from: Ritsu on September 14, 2021, 05:22:48 PMBasically the Country Flags mod but for 2.1 but since there's none, all I did was come up with what I did on the attachment lol
I don't want to annoy someone with a perfect answer but where should I be looking at to create such field?
I'd say he's on 2.1 but wants the mod updated! ;) :P
I'm thinking so too but wanted to make sure before I moved this to the correct support board. :)
I made custom profile field on my forum, with this code:
<img src="https://bg-nacionalisti.org/BNF/images/{INPUT}.png" alt="{INPUT}" /> {INPUT}
Set field type to 'Select box', you need to add image flag files for all countries you want; these images must have same names as related countries (and without accented characters).
Be sure that URL to image files is typed correctly in the code.
Moving to 2.1 support.
basically, most custom field stuff can be duplicated in 2.1 without a mod - by using the custom profile fields, as speed king has noted.
The only downside is porting over old fields to new ones but that's often not *that* hard to do with a very careful INSERT INTO ... SELECT FROM query.
Quote from: Speed King on September 14, 2021, 10:42:28 PMI made custom profile field on my forum, with this code:
<img src="https://bg-nacionalisti.org/BNF/images/{INPUT}.png" alt="{INPUT}" /> {INPUT}
Set field type to 'Select box', you need to add image flag files for all countries you want; these images must have same names as related countries (and without accented characters).
Be sure that URL to image files is typed correctly in the code.
Phew! That was a lot of countries to add but thanks for that! ;) 8)