Genosis World Events

Melih
Melih
@melih
8 years ago
198 posts
Hello Brian,

I am wondering, is it possible to localize events? I mean all events taking from wikipedia in English. But there are lots of languages in wikipedia. When you change to URL en.wikipedia.org to for example tr.wikipedia.org, events are listing localized. Maybe you can add an option to choose (or input) language (or in this case subdomain) for wikipedia.
1.PNG.png
1.PNG.png  •  23KB


updated by @melih: 03/05/17 09:01:33AM
Melih
Melih
@melih
8 years ago
198 posts
And wouldn't it be great to show an event in the same exact day if exists?
brian
@brian
8 years ago
10,148 posts
Allowing the URL to be set is not a bad idea - I can check that out. Parsing the resulting HTML to try and determine the day is probably not reliably doable, so I probably won't go down that road. Sorry!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
Thanks Brian! I am looking forward for an update then ;)
brian
@brian
8 years ago
10,148 posts
I've just pushed out version 1.1.0 of the World events module:

Quote:
Version 1.1.0:
- New: "Historical Event Browser" tool added to browse and modify existing events
- New: "Delete All Historical Events" tool in browser to reset datastore
- New: "Wikipedia URL" Global Config option for setting base Wikipedia URL

Let me know how that works for you.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
Hello Brian,

I was out of town. I just updated and tried it. Unfortunately it's not working correctly. If i use en.wikipedia.org it's taking the events. But if i use tr.wikipedia.org they are coming "empty", see attachment.

I don't understand what's going on but this link works: https://tr.wikipedia.org/w/api.php?format=json&action=query&titles=2016&prop=revisions&rvprop=content
ekran.PNG.png
ekran.PNG.png  •  42KB

brian
@brian
8 years ago
10,148 posts
I see what is going on and I'm not sure this is going to work. The problem is that Genosis needs to be able to parse the textual date into a string, and right now it understand English. In this case, dates are entered like:

28 Eylül

and Genosis does not know what month that is. I will see if there is a way to use the PHP date functions with the LOCALE set to the right lang to see if it will translate - if that works then it might work.

Sorry about that - I didn't think about the text names of the months being different.

I'll let you know.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 12/04/16 07:11:11AM
Melih
Melih
@melih
8 years ago
198 posts
I see.
Ok Brian, thank you!
brian
@brian
8 years ago
10,148 posts
What I am going to do is make it so if it is NOT en.wikipedia.org, then it will still work - it just won't have the month/day of the event and will just set the date to YYYY0000 - that way it all still works, but you just don't have the specific month/day values like you would with English. This is due to PHP's date handling functions which can only parse textual date strings if they are in English.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
If this issue caused by month names user can manually provide localized month names like we did in language strings. There are just 12 words. Do you think would this work?
updated by @melih: 12/04/16 07:42:31AM
brian
@brian
8 years ago
10,148 posts
That raises the complexity of the parser significantly. I'd rather go the other direction and make it simpler, so am just going to base everything off the year. I think it will work good so let's see once it is done how it works out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
8 years ago
10,148 posts
@melih - I've just sent you an invitation to a private Genosis marketplace channel - let me know if you get that. What I'd like to be able to do is release these updates to you first, so you can test it for me, before releasing it into the "stable" marketplace channel.

Let me know if that is OK with you - I'd prefer to have you test these changes before I make them available to everyone. That will let you provide feedback and let me know what issues you see before I push the changes to everyone.

I really appreciate it :)

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
I would love to do this. Thanks a lot! I will enthusiastically do my best since i was able to create my own family site because of you.

I added channel on my test site because i don't want to ruin actual site :)
updated by @melih: 12/04/16 08:43:31AM
brian
@brian
8 years ago
10,148 posts
Right on :)

I've just pushed version 1.1.1b1 to the private channel - update to that version then go into the World Events -> Event Browser and press "delete all historical events" so it resets.

Right now it kicks off during hourly maintenance, so keep an eye on it and see if that works.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
Ok, it's taking event in choosen language now. But i don't understand something. I will try to explain with an example; for 1976 there are 32 events in Event Browser. But when i look for the profiles which have something on 1976, it always shows the same thing. It shows the first event.
brian
@brian
8 years ago
10,148 posts
Melih:
Ok, it's taking event in choosen language now. But i don't understand something. I will try to explain with an example; for 1976 there are 32 events in Event Browser. But when i look for the profiles which have something on 1976, it always shows the same thing. It shows the first event.

Make sure caching is disabled (ACP -> Developer -> Developer Tools -> Global Config -> Run in developer mode should be CHECKED, then save). See if that makes it change on each page reload - if it does, then it is just caching which is correct - if not, then the function that retrieves the event needs to be looked at.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Melih
Melih
@melih
8 years ago
198 posts
It's finished but take too much time to retrive those events. (probably caused by my hosting). I didn't catch any pattern but generally showing the first event on the list on wiki.

And without cache events don't show up in the profiles
updated by @melih: 12/04/16 02:54:08PM

Tags