Keyword

sort k2 tags

  • shahrouz
  • shahrouz's Avatar Topic Author
  • Offline
  • New Member
More
5 months 3 weeks ago #171051 by shahrouz
shahrouz created the topic: sort k2 tags
Hi
I appreciate your hep regarding my question in the following link:
www.joomlaworks.net/forum/k2-en/46487-the-problem-in-view-of-k2-by-alphabetical-persian-ordering?limitstart=0

I have another question in the same field:
The Persian letters in the module tags K2 do not appear in lists in proper alphabetical order. To sort this module, which table of the database is to be changed?

Thank you for your assistance.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
5 months 3 weeks ago #171060 by Fotis
Fotis replied the topic: sort k2 tags
Are you referring to the Tag Cloud option in the "K2 Tools" module (mod_k2_tools)?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • shahrouz
  • shahrouz's Avatar Topic Author
  • Offline
  • New Member
More
5 months 2 weeks ago #171067 by shahrouz
shahrouz replied the topic: sort k2 tags
yes that is right

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
5 months 2 weeks ago #171073 by Fotis
Fotis replied the topic: sort k2 tags
The sorting mechanism is alphabetical already but perhaps it has trouble applying properly to Persian.

Can you send me a link to your site with the module on and let me know what the actual order should be so I can replicate it to my dev environment for testing?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • shahrouz
  • shahrouz's Avatar Topic Author
  • Offline
  • New Member
More
5 months 2 weeks ago #171086 by shahrouz
shahrouz replied the topic: sort k2 tags
Thank you for your quick reply.
You can see the desired order in right section of the following link, the actual order of letters must be as indicated by numbers, 1. 2, etc.:
transcoiran.com/k2/index.php/fa/

The alphabetical order in K2 menu category is now correct.
I need an email from you to send the control panel password, if it is needed. Or you may give me another suggestion so that i can keep it private.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
5 months 2 weeks ago #171112 by Fotis
Fotis replied the topic: sort k2 tags
So, I guess the sorting we do is not Persian friendly. The good news is that you can simply re-order the foreach loop in the mod_k2_tools tags.php override here: github.com/getk2/k2/blob/master/modules/mod_k2_tools/tmpl/tags.php#L16

Can you generally use e.g. sort() in PHP on your server to properly order alphabetically an array of Persian words?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • shahrouz
  • shahrouz's Avatar Topic Author
  • Offline
  • New Member
More
5 months 2 weeks ago #171152 by shahrouz
shahrouz replied the topic: sort k2 tags
Thank you very much.
The link you have mentioned is exactly the same we use. Unfortunately, I am not skillful enough to perform what you have suggested. Would you please do me a favor and perform the necessary changes yourself?
Many thanks indeed!

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
5 months 1 week ago #171162 by Fotis
Fotis replied the topic: sort k2 tags
I would recommend you follow the hints outlined here: stackoverflow.com/questions/22796522/php-array-sorting-and-compatibility-with-persian-alphabets

These will help to check if your server has the right locale and then you can use the "Collator" solution mentioned here stackoverflow.com/a/46765380/1157949 to do the proper sorting.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • shahrouz
  • shahrouz's Avatar Topic Author
  • Offline
  • New Member
More
5 months 1 week ago #171181 by shahrouz
shahrouz replied the topic: sort k2 tags
Thank you.
I changed all collations to utf8_persian_ci in phpadmin.
I also visited and used stackoverflow.com/questions/22796522/php-array-sorting-and-compatibility-with-persian-alphabets .
Unfortunately, the problem has not been solved yet.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
5 months 1 week ago #171194 by Fotis
Fotis replied the topic: sort k2 tags
Do you have the required PHP modules to use the Collator class?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Moderators: william white

Powered by Kunena Forum