Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Calendar : how to filter categories on calendar menu item type?

Calendar : how to filter categories on calendar menu item type? 2 weeks 4 days ago #26630

Hi,

I had to translate events in a multilingual site (French + UK)
As JEM does not comply with the Joomla multilingual language feature, I had to duplicate French categories + events and translate them in English. So for each event I have 2 items (1 Fr and 1 UK)

It worked fine… until I saw the global calendar:
index.php?option=com_jem&view=calendar
where of course all the events are shown. So all twice: 1 French, 1 UK
It's just normal but unwanted... I'd like to show a French calendar or a UK calendar.

As far as I know, there’s no parameter to set for this menu item type to filter categories/events to be shown
(I know the Calendar Legend at the bottom of the page, were you can filter categories. But I'd like categories to be already filtered at page loading...)

What do you suggest to me?

Override this file /components/com_jem/views/calendar/tmpl/default.php
check the user language choosen by user and filter categories ids that should be displayed?

Thanks for your help
PAul

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

Last edit: by Mister PAul.

Calendar : how to filter categories on calendar menu item type? 2 weeks 3 days ago #26631

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3091
  • Karma: 45
  • Thank you received: 327
There is a calendar for a category. So you cab create one for english category and one for french. I think, this should help
Testing JEM 2.3.0 beta3 local on clean latest Joomla (3.9.11) Protostar php7.3.8 (no mails)
The following user(s) said Thank You: Mister PAul

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

Calendar : how to filter categories on calendar menu item type? 2 weeks 3 days ago #26632

It's a good idea!
But do you think that I'll get the subcategorie name and color?

There will be:
category 1 French
- subcategory fr 1 green
- subcategory fr 2 yellow
- ...

category 2 English
- subcategory uk 1 green
- subcategory uk 2 yellow
- ...

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

Last edit: by Mister PAul.

Calendar : how to filter categories on calendar menu item type? 2 weeks 3 days ago #26633

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3091
  • Karma: 45
  • Thank you received: 327
I don't know and never tried, if this works.
Testing JEM 2.3.0 beta3 local on clean latest Joomla (3.9.11) Protostar php7.3.8 (no mails)

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

Calendar : how to filter categories on calendar menu item type? 2 weeks 3 days ago #26634

Hum... it seems to work...
if I set 2 global "master" categories: French and English,
and give to each event one of these master categories + it's own sub category,
then I get all the French or English category events are listed in the calendar and with the subcategory color !...
:)
I'll try to deploy it tomorrow and report here.
Thanks

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

Last edit: by Mister PAul.

Calendar : how to filter categories on calendar menu item type? 2 weeks 2 days ago #26641

It works but I have more than 100 events to edit:
I have to add to each one it’s « mother » category (French or English) depending of it’s actual category.

I’d prefer do a PHP / myySQL script to automate that, no ?

I should have to create a php/SQL request that would parse the table `jem_cats_event_relations` from the id ‘7000` (before, they are passed events), copy the `catid` and just depending of the French/UK belonging ids, add a new line for this `itemid` with the French or UK catid

Could I do that directly with phpMyAdmin or should I create a php file with the whole script (if… then…)?
And if you could guide me a little bit, I would be grateful.
;-)

Thanks for your help
PAul

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

  • Page:
  • 1
  • 2
Time to create page: 0.212 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......