JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-02T19:57:16Z
1 - How can I display the country flag in the user box of a posted message?
Option for allowing country flag display is checked, and I guess I have to add something to the userbox display template.
But what?

2 - How can I add more countries & flags? Need to add eg Scotland and also some fantasy places...
Flags for eg Scotland, England are already there ...
Have seen the flags section in the clean slate theme XML file but don't quite get it yet.

3 - How can I edit the country text labels?
Looks horrible with all upper case letters in most country labels...
Ie how do I edit the source of the Country dropdown box? Related to 2, I guess...
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Sponsor
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-02-02T20:19:03Z
It's impossible until Microsoft will make it. If someone from your customers lives in Middle-earth it's a problem... Flags are linked to official country codes in .NET Framework. So a hobbit will surely be in tears 🙂
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-02T20:51:14Z
I suppose that was a partial answer to my 2 & 3 question, right? 😉
Other forums have these features working perfectly, also for hobbits, so please do not blame MS.. 😁

Number one still remains unanswered...
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Dr-Hack
2012-02-02T21:07:59Z
Originally Posted by: bbobb 

It's impossible until Microsoft will make it. If someone from your customers lives in Middle-earth it's a problem... Flags are linked to official country codes in .NET Framework. So a hobbit will surely be in tears 🙂


+1 Lolz

yes because they are not linked with the framework, they are just like medals. with a hard coded list of country flags where admin can add more flags as well (in which the hobbits are catered for)
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-02T21:19:01Z
I suppose there is an Enum somewhere in the code that defines the Country dropdown box content...
Or even better, an XML file somewhere...

Have just installed 1.9.6 RC1, so I am asking questions about the obvious differences related to 1.9.5.5...

Just need some help with pointers and basic understanding of the new release... 😉

If possible, a forum source recompile should of course be avoided - too "Linuxy" in design if it is so... 😂
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-02-02T22:04:20Z
Originally Posted by: JP 


Number one still remains unanswered...


Look in the CleanSlate theme - a /flags folder and .xml content entries - there're country codes. Country names are in a 'language' file. Region names are there too. When you enable your feature and save a country in your profile and clear cache you'll see flags. There are generic flags too for all themes and the CleanSlate only contains all what's required to cut on distro size.

You use DNN and it's better ask tha_watcha how it works there.
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-02T22:07:02Z
Did all that earlier, but no flag visible (question 1)... 😟
"Language file", where?

No DNN here, please... 😉
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
tha_watcha
2012-02-03T00:28:46Z
To Display The Flag in the UserBox you need to Update the UserBox Template in the Host Settings

and add

<yaf:countryimage />


to make sure you have all new items in the userbox for example the new reputation bar this is the new default Userbox Template.

<yaf:avatar /><div class=""section""><yaf:rankimage /><yaf:rank /></div><br /><yaf:reputation /><yaf:medals /><div class=""section""><yaf:groups /><yaf:joindate /><yaf:posts /><yaf:gender /><yaf:countryimage /><yaf:location /></div><br/ ><div class=""section""><yaf:thanksfrom /><yaf:thanksto /></div>

UserPostedImage
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-04T12:14:24Z
Thanks bbobb and tha_watcha! 👍
Got it all sorted now...

Better looking countries list attached...
File Attachment(s):
countries.txt (11kb) downloaded 35 time(s).

He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader Topic Starter
2012-02-04T19:57:42Z
Wonder why there is a flags subdir in the Clean Slate theme... 😕

Flag images seem to be collected from /resources/images/flags/ when presented anyway...


@tha_watcha: Thanks for showing the userbox parameters. However, the "reputation" thing is nothing I will implement quite yet...Will have to plan that...😉
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
tha_watcha
2012-02-04T20:18:19Z
Originally Posted by: JP 

Wonder why there is a flags subdir in the Clean Slate theme... 😕

Flag images seem to be collected from /resources/images/flags/ when presented anyway...


@tha_watcha: Thanks for showing the userbox parameters. However, the "reputation" thing is nothing I will implement quite yet...Will have to plan that...😉



Because there where put there first

/resources/images/flags/ is the default folder which can be overridden by the theme
UserPostedImage
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-02-04T20:23:22Z
Originally Posted by: tha_watcha 


/resources/images/flags/ is the default folder which can be overridden by the theme


It can't be overridden now.


bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-02-04T22:22:24Z
Update. It can. The problem is in browser cache.:)

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved