Nicolas

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: custom theme : get the displayed date in day view #958297
    Nicolas
    Participant

    Dear George, I thank you very much !

    Your answer has much details, big thanks for the example script you made ! You understood my problem and I was able to solve it easily with your solution as it works in every place I needed it (including /mytheme/tribe-events/modules/bar.php and /mytheme/tribe-events/pro/widgets/mini-calendar/single-day).

    Then I can trash my “dirty” solution related on the page url…
    Once again big thanks, great support, problem solved !

    Best regards,
    Nicolas

    in reply to: custom theme : get the displayed date in day view #958008
    Nicolas
    Participant

    Hi George and thanks for your attention.
    I’m not a native english speaker and it’s sometimes hard to explain such things.

    Here is the situation :

    – My site uses Events Calendar Pro and the mini-calendar widget

    – Please imagine that a user clicks on a date in the minicalendar widget, let’s say for example that he clicks on June 28, 2015.

    – The click opens a page with an url like http://www.mysite.com/events/2015-06-28/.
    This view is called “the day view” in all your own documentation.
    Thsi view displays all the events of a chosen day as a list.

    – I want to be able to retrieve (get), with PHP, the information about the date that the user is on.
    In our case : “2015-06-28”.

    – with this data (“2015-06-28”), I can php code some conditions in my page (highlight this date in the mini-calendar, change the page title and include the date in, etc).

    I can get this info from the url, but maybe there is a cleaner solution to do this ?
    I was expecting that a function like tribe_get_viewed_date() or something like this, but can’t find such functions in your docs.

    Can you help me getting the date of the day the user is viewing in the day view ?

    I hope this explanation is better that the last ones ? I don’t know how to say it better…
    Is it understandable for you ?

    in reply to: custom theme : get the displayed date in day view #956467
    Nicolas
    Participant

    Hello,

    Thanks for your answer but that’s not at all a response to the question I submitted 🙂
    Maybe my explanation wasn’t understandable and I’me sorry for this.

    I need to get the date of the day that is actually displayed in the “day view” list (date.php file of tribe events views), then we are not inside an event but on the day events list.

    As I use the mini-calendar pro widget, visitors can click on a day in the calendar and view all the events for the day they want in the day view (plugins/the-events-calendar/views/day).

    How can I get the date of the actually viewed day in the day view, that was my question.
    I will use this data to highlight some navigation and calendar elements, then I need to know if the visitor is actually viewing the events in day viw list for today or for another date.

    Is it clearer for you ?
    Thanks for your help !

Viewing 3 posts - 1 through 3 (of 3 total)