Country Flag

Where should the web site go - what should we do? Who has the time between rows?

Moderator: The forum police - (nee naw)

Post Reply
User avatar
JonT
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 2133
Joined: Tue Nov 11, 2014 2:31 pm
I row on...: Model D with PM5
Location: Bath, Somerset, UK

Country Flag

Post by JonT »

As Euron has identified and Tako has confirmed, the ability to change the country flag is broken in Meterboard3. I suspect this has never worked since Thomas launched this version of the meterboard. The complication (for those who are interested) is that the flag override is set using the user control panel. The control panel is actually part of the PHPBB system that we use to run our forum and not part of the Meterboard. Meterboard2 checks the forum to see if the user has set their country code and if they have it uses that code instead of the one registered with Concept2. This is why if you change the country code and the run the old Meterboard2 the flag is updated correctly.

For some reason, the code to do this update from PHPBB to the meterboard has been removed when Meterboard3 was launched and I now need to find a way of reintroducing it. This isn't trivial. Gve me some time.

Jon
58 years old, 5"10', clinging on to 75kg and frustratingly but understandably inconsistent
Image
User avatar
JonT
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 2133
Joined: Tue Nov 11, 2014 2:31 pm
I row on...: Model D with PM5
Location: Bath, Somerset, UK

Re: Country Flag

Post by JonT »

OK I think this is now working. Anyone should now be able to change their country code in the profile tab of the user control panel once they have logged in to the forum. Looking at Meterboard3 will trigger the flag being changed to your selected country.

Euron, yours will not change for anyone else until you have looked at the Meterboard yourself at which point the flag should be changed for you.

That was actually quite tricky to fix because of the complications of the interaction between the forum and the meterboard, the fact that cookies are involved (never an easy thing to debug) and the fact that the development system and the live system actually share data for this particular feature which meant testing was very tricky. Anyway, it keeps my brain busy.

Can someone confirm that this is now working?

Jon
58 years old, 5"10', clinging on to 75kg and frustratingly but understandably inconsistent
Image
User avatar
JonT
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 2133
Joined: Tue Nov 11, 2014 2:31 pm
I row on...: Model D with PM5
Location: Bath, Somerset, UK

Re: Country Flag

Post by JonT »

Thanks to Tako for testing this and finding an error in my code. The fix was not working properly for anyone viewing the Meterboard when not logged in to the forum #-o

Did I ever mention I hate code involving manipulation of cookies and depending on others to set cookies consistently? Just saying.

Anyway, back to actually having a life (aka getting over the 5x3k Threshold row at lunch time).
58 years old, 5"10', clinging on to 75kg and frustratingly but understandably inconsistent
Image
Euron Thomas
Warming up
Posts: 8
Joined: Fri Sep 12, 2014 6:48 am
I row on...: Model D with PM5
Location: Beddgelert, Gwynedd, UK

Re: Country Flag

Post by Euron Thomas »

Hi Jon,
Thanks for trying to sort this. And sorry for making so much work for you.

Unfortunately, my flag still not changing, unless I’m doing something wrong. When you say I have to view the flag before it changes, do you mean just visit the meter board and scroll down to my listing?

Sorry again for making work for you. It isn’t the end of. The world if it doesn’t change.

Regards

Euron.
User avatar
JonT
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 2133
Joined: Tue Nov 11, 2014 2:31 pm
I row on...: Model D with PM5
Location: Bath, Somerset, UK

Re: Country Flag

Post by JonT »

Euron Thomas wrote: Mon Aug 28, 2023 4:03 pm Hi Jon,
Thanks for trying to sort this. And sorry for making so much work for you.

Unfortunately, my flag is still not changing, unless I’m doing something wrong. When you say I have to view the flag before it changes, do you mean just visit the meter board and scroll down to my listing?

Sorry again for making work for you. It isn’t the end of. The world if it doesn’t change.
Hmmm. That's odd. I'm sure you are doing this correctly, but here are the steps:
  • Login to the forum if you are not logged in. If you are then your name will appear on the right hand side of the forum page
  • Click on your name and select "User Control Panel"
  • Select the "profile" tab
  • Enter WAL as the Meterboard Flag Override
  • Press the submit button at the bottom of the page.
  • Now visit the Meterboard and the flag should be there. Just as a test I have become an honorary member of the Welsh nation. It seems to work for me.
Let me know how you get on. [-o<

Because this involves the code changing cookies there is always the risk that your browser settings are stopping this working properly, which is why I hate cookies. We'll crack this at some point, I'm sure.

EDIT - I have just looked inside the system databases and I can see that you have correctly set your country code to WAL in the forum control panel. This means that just by viewing the Meterboard while you are still logged in to the forum (you will be unless you have explicitly logged out) 'should' copy the flag data from the forum to the Meterboard. You have to be logged on to the forum though, otherwise the Meterboard doesn't know it is you and won't look to see if your flag should be changed.

I have temporarily put some debugging information at the top of the Meterboard. If it still isn't working can you send me a message with the information in the top lines of the Meterboard when you view it. There should always be two lines of green text and there may be one of blue (which would be good news). If the 'forum id' line is showing a value of 1 then it means you are not logged in as far as the Meterboard is concerned.

Jon
58 years old, 5"10', clinging on to 75kg and frustratingly but understandably inconsistent
Image
Euron Thomas
Warming up
Posts: 8
Joined: Fri Sep 12, 2014 6:48 am
I row on...: Model D with PM5
Location: Beddgelert, Gwynedd, UK

Re: Country Flag

Post by Euron Thomas »

Hi Jon,
Thanks for your efforts. I've logged in, ensured WAL is in the flag box, then headed to the meter board,flag not changed. I get following at top

Member id is: 0
Forum id is: 2461
flag override is: WAL

Guess 0 shows not logged in. Then I head back to forum, shows me as logged in!!

Sorry for the hassle!

Euron.
Euron Thomas
Warming up
Posts: 8
Joined: Fri Sep 12, 2014 6:48 am
I row on...: Model D with PM5
Location: Beddgelert, Gwynedd, UK

Re: Country Flag

Post by Euron Thomas »

Sorry does 0 mean I am logged in??
User avatar
JonT
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 2133
Joined: Tue Nov 11, 2014 2:31 pm
I row on...: Model D with PM5
Location: Bath, Somerset, UK

Re: Country Flag

Post by JonT »

No, that 0 shouldn't be happening. If you are not logged on then Forum id would be 1.

Can you do me a favour and click on your name on the Meterboard and then click the 'this is me' button.

Looking at the old code, there is a link between that button and setting the cookie for the member id. Thinking about it, that makes sense, otherwise how does the meterboard know which flag to change?

If my theory is correct then clicking the 'this is me' button and then viewing the meterboard again should set your member id to 6822 which will then be picked up by the meterboard and used to update your flag.

If you are thinking "my god this is all so complicated" welcome to the world of how the Meterboard is implemented. Meanwhile, I have just added Dwayne to the Welsh nation as part of my testing and need to figure out how to put him back in the USA #-o

Jon
58 years old, 5"10', clinging on to 75kg and frustratingly but understandably inconsistent
Image
Euron Thomas
Warming up
Posts: 8
Joined: Fri Sep 12, 2014 6:48 am
I row on...: Model D with PM5
Location: Beddgelert, Gwynedd, UK

Re: Country Flag

Post by Euron Thomas »

Jon,
It worked!
I feel whole again :)

Thanks for your efforts.

Euron.
User avatar
JonT
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 2133
Joined: Tue Nov 11, 2014 2:31 pm
I row on...: Model D with PM5
Location: Bath, Somerset, UK

Re: Country Flag

Post by JonT »

Euron Thomas wrote: Tue Aug 29, 2023 2:44 pm Jon,
It worked!
I feel whole again :)
Thank goodness for that!

...and thanks for pointing out it wasn't working. Without the feedback and queries, I never know whether anyone is actually using any of this stuff.

Those who were concerned will be pleased to know I have safely restored Dwayne to being a US citizen. A sad loss for the Welsh nation.

Jon
58 years old, 5"10', clinging on to 75kg and frustratingly but understandably inconsistent
Image
Euron Thomas
Warming up
Posts: 8
Joined: Fri Sep 12, 2014 6:48 am
I row on...: Model D with PM5
Location: Beddgelert, Gwynedd, UK

Re: Country Flag

Post by Euron Thomas »

A sad loss indeed.

Thanks again.
Wolfmiester
Friend of the Free Spirits web site 2020
Friend of the Free Spirits web site 2020
Posts: 4089
Joined: Fri Nov 17, 2006 2:16 pm
I row on...: Model D with PM5
Location: Henley in Arden, UK

Re: Country Flag

Post by Wolfmiester »

Congratulations Jon for working that out, and taking the time for it!
Wolfie

Image
Age 59 Height 6'4" Weight 93k
Post Reply