×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Change event numbering algorithm

Change event numbering algorithm 8 years 8 months ago #32013

  • Martin Grob
  • Martin Grob's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 44
  • Karma: 1
  • Thank you received: 0
Hi Yves
In one of the youtube tutorials it's mentioned that it is possible to change the algorithm for event numbering (not the id, but the field "Number" in the event creation form).
But I cannot find how/where to do this.
Thanks
Martni

Change event numbering algorithm 8 years 8 months ago #32014

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Martin,

hmm only to the number? Then you have to edit the menu entry for the event-list. In the advanced tab there is a field "order events by".

Change it a.semnum ASC (or DESC if you want it the other way around)

Kind regards,
Yves

Change event numbering algorithm 8 years 8 months ago #32016

  • Martin Grob
  • Martin Grob's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 44
  • Karma: 1
  • Thank you received: 0
Missunderstanding ;-)
Now the number is generated automatically like 1/15, 2/15, 3/15. I'd like to change this numbering algorithm for example to something like "Eventname_2015-08-29".

Change event numbering algorithm 8 years 8 months ago #32017

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Ah okay. That's a bit more complicated, have that on my todo-list for a while (really really old code there), currently you would need to change the code for the generation algorithm. :(

administrator/components/com_matukio/helpers/util_events.php

Line 31 - function createNewEventNumber

At line 78 you see the return - this one needs to be modified. You don't have the event in this function.

return date('Y-m-d');

That would return the current date - but not the event begin.. The event name / begin is not even populated when this number is generated (when you create a new event), so probably the easiest solution would be to change it during saving :/

If you want i help you with that.

Yves

Change event numbering algorithm 8 years 8 months ago #32018

  • Martin Grob
  • Martin Grob's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 44
  • Karma: 1
  • Thank you received: 0
Cool. Thanks for that. Should be able to change to my needs with this info.
  • Page:
  • 1
Time to create page: 0.149 seconds