Changing Year Range

  • David McCreary
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 4 months ago #74756 by David McCreary
Changing Year Range was created by David McCreary
At present the displayed year range is
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016" selected="selected">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
</select>

Where do i change that to
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016" selected="selected">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
</select>

as we have archived events back 10 years.

thanks...

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

More
9 years 4 months ago #74794 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Changing Year Range
Hi David

Could you please let me know where do you see/select this range? If you can make a screenshot, that would be great

Tuan

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

  • David McCreary
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 4 months ago #74827 by David McCreary
Replied by David McCreary on topic Changing Year Range
same site you and your developers have been working on for import. (still need aliases, see note in support ticket).
Here's the calendar showing date range. I just need to know what table or file to change

, can't seem to find it.
Attachments:

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

More
9 years 4 months ago #74843 by Brian F
Replied by Brian F on topic Changing Year Range
Hi David. Tuan may have a better answer but in the html.php file within the calendar folder (/components/com_eventbooking/view/calendar/html.php) on or around line 84, you can modify the “- 3” and “+ 5” numbers as needed in the line:
Code:
for ($i = $year - 3; $i < ($year + 5); $i++)

Such as in your case, you’d change the 3 to a 11:
Code:
for ($i = $year - 11; $i < ($year + 5); $i++)

With that being a core file change, you’ll of course have to make that change any time you update Event Booking.
The following user(s) said Thank You: Tuan Pham Ngoc, David McCreary

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

  • David McCreary
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 4 months ago #74848 by David McCreary
Replied by David McCreary on topic Changing Year Range
Worked perfectly. Thank you very much for the help. Much appreciated
The following user(s) said Thank You: Brian F

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

Moderators: Tuan Pham Ngoc