Possible bug in day/list views

Home Forums Calendar Products Events Calendar PRO Possible bug in day/list views

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #77714
    deshub
    Participant

    I have duplicated the day and list view files into my theme folder. I was trying to make a small change to the order of elements, ie. remove the venue link from within the meta div, and move it down below the excerpt text. What I find is that editing the single-event.php in ‘themes/twentytwelve/day’ has no effect, while editing single-event.php in ‘themes/twentytwelve/list’ will cause the display to appear in the desired order in both list and day views. Now that I know this, it’s not a big deal because I want the same display for both, but it was rather frustrating until I happened to discover it.

    Have I misunderstood how the theme modifications are supposed to work? Is this the intended behavior? Or is this actually a bug? Someone who wanted a different display for the list and day views might be bothered by this. Thanks!

    Ted

    #77763
    Barry
    Member

    Hi Ted,

    Our Themer’s Guide is a great starting point for learning about safely making customizations.

    One thing that stands out is that you don’t seem to be using a tribe-events subdirectory. For instance:

    themes/twentytwelve/tribe-events/list.php

    Which is expected by the plugin. Does that help at all?

    #77817
    deshub
    Participant

    Hi Barry,
    I’m sorry, I am using a ‘tribe-events’ subdirectory, I just forgot to include that in the paths when I typed my note.

    #77943
    Barry
    Member

    OK, and for day view are you also locating your custom template within a /pro/ sub-directory? In other words, it should live at

    your-theme/tribe-events/pro/day/single-event.php

    If it is missing the /pro/ directory then that would certainly explain why it seems to have no effect in your case. Does that help at all?

    #78038
    deshub
    Participant

    Hi Barry,
    Thanks, I’ll try that, I’m not using the ‘pro’ subdirectory. Your documentation is somewhat inconsistent on this point. In the single-event.php comments at the beginning of the file it reads:

    <?php
    /**
    * Day View Single Event
    * This file contains one event in the day view
    *
    * Override this template in your own theme by creating a file at [your-theme]/tribe-events/day/single-event.php
    *
    * @package TribeEventsCalendar
    * @since 3.0
    * @author Modern Tribe Inc.
    *
    */

    so you might want to address that. The Pro theme file comments are not always consistent on that point, you might want to review all of them. In the themer's guide, the wording of item 1 could be made more clear (in my opinion) to indicate that Pro templates need to be in a 'pro' subfolder. You are very clear about this in the section about CSS so maybe I should have figured that out, but never hurts to be explicit.

    All that said, I put my template into the folder structure you suggest and it still isn't working. For example, if I comment out the following line:
    echo tribe_events_event_schedule_details()
    in the 'day' version, no effect; in the 'list' version, the info vanishes on both day and list views.

    #78173
    deshub
    Participant

    One other data point: we created a custom module to add a category sorting feature to the top of some pages. When I add it to tribe-events/list/content.php, it works fine. Add it to tribe-events/pro/day/content.php, nothing, and other edits to the page aren’t working either.

    #78187
    deshub
    Participant

    Hi Barry,
    OK, did some more testing: I moved my ‘day’ folder up one level, out of the ‘pro’ folder, so it’s now in the ‘tribe-events’ folder. The changes I made to day/content.php then stared working. I then tried making changes to tribe-events/day/loop.php and tribe-events/day/nav.php and they work. But I can hack big chunks of code out of tribe-events/day/single-event.php and nothing happens. So to sum up, if the Day View templates are located in ‘tribe-events’ I can successfully edit everything but single-event.php. If I move the Day View templates to a ‘pro’ subfolder, no edit, to any file, has any effect. If it helps, I’m running ECP with an unedited version of the TwentyTwelve template. Thanks!

    #78247
    deshub
    Participant

    Sorry, one more thing, we made a similar edit to the week view content.php and it worked, but it’s not in our ‘pro’ subfolder either. It’s at tribe-events/week/content.php. Not sure about other week template files, I haven’t gotten around to tweaking those yet and probably won’t have time today…

    #78311
    Barry
    Member

    We could definitely do with tightening up the comments in those templates and indeed the themer’s guide – thanks for that feedback. That said, I think we’ve crossed wires here a little, though. Let me try to clarify:

    * If you wish to edit the display of single events within day view, you should copy Event Calendar Pro’s views/pro/day/single-event.php template and locate your overriding version at tribe-events/pro/day/single-event.php

    * Removing venue information should be as simple as removing the whole of the block beginning if ( $venue_details ) : in that same template

    If you are experiencing something else it might be a residual issue from an earlier release (looking at the URL you shared when you opened this thread, you seem to be using version 3.1 of both plugins even though you stated you are using 3.2 – so please do check on that).

    I hope that helps!

    #78471
    deshub
    Participant

    Hi Barry,
    Thanks for the reply. I updated to 3.2 this morning and it seems to have fixed the issue I had with day view. I can edit the single-event.php in the day folder and those edits now take effect. I’m having a different problem now that may be related, however.
    In ‘tribe-events/list/content.php’ I added a custom category sorting toolbar. Works fine, shows up in list view just great. But without making ANY edits to the default single organizer or single venue view, the toolbar also shows up on all my single organizer and venue pages, right below the list title ‘h2 class=”tribe-events-page-title”>Upcoming Events /h2’and immediately before the list of events starts. If I comment out the custom function on ‘tribe-events/list/content.php’, it goes away. The reason I think this may be related is that, as with my previous problems with the Day view, a file in the List folder seems to be taking precedence over the file that (I think) is supposed to be controlling the display. Do the single venue and organizer pages rely on ‘list/content.php’ in some way that isn’t discussed in the Themer’s Guide?
    I’m happy to give you access to the site if it would help resolve this faster, I’m going to be running up against a deadline soon and once-a-day-interaction is kind of a slow way to work (although I do appreciate your help!). Just shoot me an email and I’ll get you in if you’d like to look at it.

    #78534
    Barry
    Member

    Do the single venue and organizer pages rely on ‘list/content.php’ in some way that isn’t discussed in the Themer’s Guide?

    The organizer and venue views do indeed re-use a number of list view templates: if you look for the call to tribe_include_view_list() within pro/single-venue.php you can get a sense of the mechanics of this.

    One “cheap and cheerful” means of working around the situation you described might be to set a global variable from within customized single venue and organizer templates, then test for its presence before calling your custom piece of code. Or you could indeed look at and inspect the current request and make a decision that way.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Possible bug in day/list views’ is closed to new replies.