Home › Forums › Calendar Products › Events Calendar PRO › Customize Event Calendar Pro mini Calendar widget click
- This topic has 7 replies, 2 voices, and was last updated 13 years, 1 month ago by
Barry.
-
AuthorPosts
-
March 7, 2013 at 10:39 am #41886
hoangker
ParticipantHi, with respect to the current mini calendar widget in Event Calendar Pro I’d like to instead of doing a page redirect to the event page, on date clicked, I want to load a div say #eventdetails, on my current custom page template, using jquery with the event details (ex.time,place,description,full size photo of event?). To do this I realize that I first need to hook / override a calendar widget php file by copying this widget calendar php file (I don’t know which) into my own /events folder.
Then once I’ve done that I need to override the corresponding JavaScript by copying it into the /events folder for my current theme as well – I also don’t know which file that is. I think these files are table-mini.php and event.js so I copied both files to my /events folder, made my modifications “echo ‘YOYOYO'” and “Alert(‘YOYOYO’)” to table-mini.php and event.js respectively, but, they didn’t get called. I then just made changes to the original files and it worked. What am I missing to correctly override these files? unregister/register in functions.php? What is the classname to unregister? what is the classname to register? What are the files I need to copy to my /events folder (i will be needing to change the style of the mini calendar widget so which css file do I copy to override as well?)
Could you please give me step-by-step instructions on how to go about with my customization?
Thank you very much,
Tin
March 7, 2013 at 11:22 am #41891Barry
MemberThere are excellent instructions on templating/theming here:
Javascript is a slightly different kettle of fish – there’s a brief overview here, just keep in mind that – for what you want to accomplish – you may not need to dequeue the scripts put in place by The Events Calendar.
March 7, 2013 at 11:44 am #41899hoangker
Participanthi Barry,
thanks for the reply. But, you still left out why my overriding might not be working. I created the /events folder in my theme’s directory and copied table-mini.php and event.js, but, my changes to ~/theme/events/table-mini.php and ~/theme/events/event.js were not applied.
Also, why do you say I might not need to dequeue the javascript?
If I have the event $post->ID what function can I call to return me the details of the event (ex. event name, event date, thumbnail etc?)
Thanks,
Tin
March 7, 2013 at 12:17 pm #41909Barry
MemberBut, you still left out why my overriding might not be working.
It’s hard to answer. If you have carefully followed the steps in the links I provided then it ought to be working. Can you share a link to your site and/or the code in your custom templates?
March 7, 2013 at 12:19 pm #41911Barry
MemberAlso, why do you say I might not need to dequeue the javascript?
Because it sounds as if you want to add new behaviour (showing the event details in a “modal” window, for instance, and prohibiting navigation via the mini-calendar to individual event pages) rather than wanting to strip away existing functionality.
The decision of course is yours, you will have a more complete understanding of what you want to achieve than I do 🙂
March 7, 2013 at 12:21 pm #41912Barry
MemberIf I have the event $post->ID what function can I call to return me the details of the event (ex. event name, event date, thumbnail etc?)
Take a look at our technical documentation (there’s a link in the Useful Resources widget over on the right) – from there you can find details of various template tags that you may be interested in here.
March 7, 2013 at 12:29 pm #41913hoangker
ParticipantThhanks Barry. You’ve given me some ideas. I might just scrap the loading my div#eventdetail and just override the single event view that the calendar widget redirects me to. What view is single event view php file that I would need to override Barry?
Thanks,
Tin
March 7, 2013 at 12:43 pm #41914Barry
Membersingle.php
-
AuthorPosts
- The topic ‘Customize Event Calendar Pro mini Calendar widget click’ is closed to new replies.
