Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate langicon.php from old site to current one #21

Closed
proycon opened this issue Aug 15, 2017 · 8 comments
Closed

Migrate langicon.php from old site to current one #21

proycon opened this issue Aug 15, 2017 · 8 comments
Assignees

Comments

@proycon
Copy link
Owner

proycon commented Aug 15, 2017

langicon.php is extensively used in bbcode for flags. The forum still references the old www.unilang.org version as there is no replacement yet (I think).

@proycon proycon self-assigned this Aug 15, 2017
proycon added a commit that referenced this issue Aug 15, 2017
@proycon
Copy link
Owner Author

proycon commented Aug 15, 2017

Implemented, now only the BBCode need to adapt to forum.unilang.org/langicon.php

@lromao
Copy link
Collaborator

lromao commented Aug 15, 2017

Thanks!
I just changed the BBCode and it works perfectly now :)

@proycon
Copy link
Owner Author

proycon commented Aug 15, 2017

Great! :)

@proycon proycon closed this as completed Aug 15, 2017
@lromao
Copy link
Collaborator

lromao commented Aug 15, 2017

Perhaps wikidirect.php should be migrated as well? It doesn't seem to be working for any new languages either. Not that it's as important as flags showing up, but just to let you know...

@proycon
Copy link
Owner Author

proycon commented Aug 15, 2017

Hmm, right, I'll have to find out what that was for again..

@lromao
Copy link
Collaborator

lromao commented Aug 16, 2017

@proycon : I'm not sure how this was before, but the logic on the migrated langicon.php seems to be somewhat simplified (compare with the langicon function on lang_functions.php).
The major effect is that complex languages based on countries stopped working (e.g. en-US, pt-BR)
I'm not sure if the other function can be reused (PHP is not exactly my forte), so I tried to implement a quick fix by detecting if a language code follows this pattern and send it to the country flag instead (pretty much the logic that existed before)
However, the whole thing breaks whenever I add that condition. I left it commented at the moment and would appreciate if you (or anyone else who understands PHP better than me) can have a look :) Thanks

@lromao
Copy link
Collaborator

lromao commented Aug 16, 2017

Fixed.
I turns out there was some freaking invisible character on that line that was causing a syntax error (note to self: use a proper IDE)

@lromao lromao closed this as completed Aug 16, 2017
@proycon
Copy link
Owner Author

proycon commented Aug 16, 2017

Ah! Great that you managed to find it already :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants