How To Modify jrEvent

derrickhand300
@derrickhand300
10 years ago
1,353 posts
I am using JR to build a school sports website and using the jrEvent Module to create a schedule of upcoming events

Some events have a start time of "To Be announced" or TBA....how would I go about adding this to the drop down of start times for events when creating a new event?

Thanks...also i would like past events to stop appearing on my page...is there a setting for this also?

updated by @derrickhand300: 02/13/16 08:05:08PM
douglas
@douglas
10 years ago
2,804 posts
I'm not aware of a way to set the date to "TBA" since the date is a required field in order to create an event.

You can stop showing past events by unchecking the "Show Past Events" check box in your ACP > Profiles > Profile Events > Global Config section.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
paul
@paul
10 years ago
4,335 posts
Use the Form Designer to change the date field type from 'datetime' to just 'date'. That will stop the time select field from showing. Then create a select field under it called 'event_time' and put all the times, including a 'TBA' as the field options.

An alternative to stopping past events from showing is to include a search="event_date >= `$smarty.now`" in the template event jrCore_list call.
hth


--
Paul Asher - JR Developer and System Import Specialist
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Thanks Brian- I have that box UNCHECKED but past events still showing up
Thanks doug but not sure how to create the new form field with all the possible times-I will play with it.
douglas
@douglas
10 years ago
2,804 posts
If your the profile owner you'll see the past events even with the past events check box unchecked.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
paul
@paul
10 years ago
4,335 posts
derrickhand300:
Thanks doug but not sure how to create the new form field with all the possible times-I will play with it.

Create a 'select' field and enter this in its options section -

TBA
00:00AM
00:15AM
00:30AM
.
.
.
.
11:30PM
11:45PM

Doesn't have to be 15 minutes steps - enter whatever you need.


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 10/27/15 12:34:35PM
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Yeah Thats what I was trying to remove as profile owner..

trying to edit the form using Pauls instructions on form designer

In the CREATE
I have changed the datetime to just date ( so no time shows in the create)
Then because all my events are either TBA 430pm or 6;30pm so i created3 check boxes so that when I create an event I can save time by choosing from the 3...the problem is when I finish and save the event they all say that they start at 12:00am....even though I am checking the event time box i created for 4:30pm...
So either I got it wrong or something is not working as expected...( because i do not have 12:00am entered anywhere)
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Thanks Paul- I switched to "select" and created the choices from the drop down-then saved...but still testing shows the time to be 12:00am even though 12:00am is not an option...any ideas what im doing wrong?
paul
@paul
10 years ago
4,335 posts
You'll also need to edit the template(s) where the date and time shows. Change {$item.event_date|jrCore_date_format} to

{$item.event_date|jrCore_date_format:"%d %b %Y"} {$item.event_time}

The "%d %b %Y" tells the modifier just to output 'dd mmm yyyy' so change that to the format you want - http://www.plus2net.com/php_tutorial/php_date_format.php


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 10/27/15 12:43:03PM
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Thank you Paul- that makes it all work now
derrickhand300
@derrickhand300
10 years ago
1,353 posts
I would like more details on
An alternative to stopping past events from showing is to include a search="event_date >= `$smarty.now`" in the template event jrCore_list call.
sometime-it would be really useful if all the old events that were past were removed from the calendar
paul
@paul
10 years ago
4,335 posts
$smarty.now returns the current date and time (in Unix time) so the above is just adding a search option to the function that lists events to say "only return events whose date is greater than 'now'". See https://www.jamroom.net/the-jamroom-network/documentation/development/89/jrcore-list then modify the template(s) to suit. The template might be the prevent/templates/item_index.tpl and/or it might be in your active skin (depends on what skin you are using).


--
Paul Asher - JR Developer and System Import Specialist
derrickhand300
@derrickhand300
10 years ago
1,353 posts
Thanks Paul...this part is still out of my league...but I appreciate your help

Tags