WordPress.org

Forums

[Plugin: The Events Calendar] template issue (40 posts)

  1. gordonthegecko
    Member
    Posted 5 years ago #

    I have a weird issue, and must be template related, just not sure where to insert code to fix.

    here's the site
    http://chippewaoffroad.org/wordpress/

    I added an event, which was easy. No issues. However, the display of the calendar, individual event, is not behaving with my template. What steps do I follow to resolve.

    It seems template related, and I am using the latest version of Thesis. Thanks.

  2. Zendarin
    Member
    Posted 5 years ago #

    I checked out your website and everything is behaving as it should for me.

    When I switched to February on your calendar there was your event. Hovering over it displayed the event details and clicking on it took me to the actual event listing.

    Perhaps it is browser specific?

  3. Shane Pearlman
    Modern Tribe
    Posted 5 years ago #

    Thanks Zendarin. We all really appreciate the help! I have a couple of heavy weeks coming up and every bit of help everyone can supply makes all the difference.

  4. tcsoul
    Member
    Posted 5 years ago #

    I'm running Thesis 1.6 and Firefox 3.5.7 OSX and I can replicate gordon's issue... having the same issue on a fresh site I'm working on right now: http://www.lifeissweetseminars.com/

    Any thoughts - I'd love to hear them. I just recognized the issue and went searching for a solution, so if I figure something out I'll post it here as well. Thanks for the *STELLAR* plugin!!!!! AWESOME!

  5. gordonthegecko
    Member
    Posted 5 years ago #

    To clarify, I am running Thesis 1.6 and Firefox too. I checked in IE, and there is still an issue.

    To summarize, I have lost the Thesis header, sidebars and footer from the calendar 'all events' view and 'single event' view. I created another 'category' based page on my site to pinpoint the issue, and that page displays as expected, w header, sidebars and footer.

    Help would be appreciated, because I DO THINK THIS PLUGIN IS GREAT and just what I need. My DONATION IS READY!!! Thanks.

  6. tcsoul
    Member
    Posted 5 years ago #

    I ran a multi-browser Litmus test on it, and the issue is most certainly with how the plugin interacts with Thesis - no doubt. The issue you are describing Gordon (and that I am experiencing as well) is across all browsers, so methinks that Thesis's styles are not being applied at all. Which makes sense really due to how Thesis itself is built.

    I haven't dug deep into Event Calendar's skinning features yet, but I know they are there and I'm thinking it may be necessary to reskin separately away from Thesis. Which is a bummer, but you know.... such is life. Killer plugin, so worth it. I'll recheck and see if anybody else has thoughts or suggestions, but I'll dig into this tomorrow (or later tonight, if I feel ambitious).

  7. tcsoul
    Member
    Posted 5 years ago #

    I've dug into this a bit this evening... haven't implemented this yet, but here's the deal. The way the plugin is written, it looks to call both the theme's standard header.php and footer.php, which works great with just about every other theme out there. as much as I love Thesis (and I do), one of it's drawbacks is that because Thesis makes itself so high level, it doesn't really operate the header.php and footer.php the same way as most themes do.. that is, put all of the markup that you might expect in those files. Instead, it throws out it's opening body hooks and "before HTML" hooks (see code below):

    <body<?php thesis_body_classes(); ?>>
    
    <?php thesis_hook_before_html(); ?>

    So what that means is that most of the typical header markup never makes it into the plugin's output, which creates the issue that we are both experiencing. Same thing is true of the footer.php file.

    So how do you fix it? Basically, unless the author of the plugin decides to support Thesis and figures out the very best way to include all of its functions (which would be nice, but ye best donate GENEROUSLY <=D), the options essentially involve creating a separate copy of the skin rebuilt in XHTML, which honestly shouldn't be that hard. The hack way of doing it would be to break the code out into a header1.php and a footer1.php (adjusting the appropriate lines of code in the plugin. That would work, but it would probably be better to include the same XHTML inside of Thesis's hook system (OpenHook is an easy way of doing this). Downside of course is if you change your theme design, you have to modify the event skin in openhook (or the hack way in header1.php and footer1.php) to match... or you can just leave it a little different, with a common header or something. It's tedious and requires some know-how, but this plugin is by far the best Events Calendar plugin I have seen yet, so well worth the time....

    I'm implementing this tomorrow myself, and I'll post again if I realize I screwed something up here :). Otherwise, hope this helps somebody else figure out what needs to happen, and saves some time....

  8. Shane Pearlman
    Modern Tribe
    Posted 5 years ago #

    We came to that exact conclusion last night. Our theme integration works with basic themes that follow the kubric model. We are looking to make it overall more friendly, but there is no simply tadah. Fancy schmancy themes will need to be done using the theme override options:

    From Documentation (http://wordpress.org/extend/plugins/the-events-calendar/other_notes/)

    Default vs. Custom Templates

    The Events Calendar plugin now comes with default templates for the list view, grid view and single post view. If you would like to alter them, create a new folder called "events" in your template directory and copy over the following files from within the plugin folder (simple-events/views/):

    * gridview.php
    * list.php
    * single.php

    Edit the new files to your hearts content. Please do not edit the one's in the plugin folder as that will cause conflicts when you update the plugin to the latest release.

  9. tcsoul
    Member
    Posted 5 years ago #

    Makes sense to me.... thanks again for the KILLER plugin!!!

  10. jarvisteam
    Member
    Posted 5 years ago #

    Could someone post their solution to the thesis 1.6 problem, as I am having the same issue.

  11. cathygraham
    Member
    Posted 5 years ago #

    OK, maybe I am missing something here. To customize the templates the instructions say:

    create a new folder called "events" in your template directory

    I don't have a "template" directory. Is this the "theme" directory that is being referenced?

  12. Shane Pearlman
    Modern Tribe
    Posted 5 years ago #

    Yes - the actual name of the directory is "Themes"

    so you need to create: /wp-content/themes/[my theme name]/events/

    and then add the proper files in there.

  13. cathygraham
    Member
    Posted 5 years ago #

    Got it! That's what I thought, but figured I should verify. Thanks!

  14. gordonthegecko
    Member
    Posted 5 years ago #

    Does anyone have an actual solution? I'd like to know the steps to follow to deploy.

    TCSOUL - it sounded like you were going to attempt a solution using 'openhook' in Thesis 1.6.

    Sorry I'm not a coding genius, so I'd like to beg/borrow/steal to get this working.

  15. tcsoul
    Member
    Posted 5 years ago #

    Fair warning... you are going to need to know how to manipulate code pretty well to do this. Ended up not going through openhook to do this - it was easier to just go with the theme's built-in override options.

    Here's the deal... after copying the three plugin files into /thesis_16/events (you will want to make a note of the fact that you did this b/c it technically violates where Thesis would prefer you set up your custom files), you will make the following mods to the files....

    Make sure you leave include (TEMPLATEPATH.'/header.php');
    The footer one didn't seem to make a difference either way.

    Then add this:

    global $thesis;
        global $thesis_design;
        
        if (is_single() || (is_page() && !$thesis['display']['comments']['disable_pages']))
            wp_enqueue_script('comment-reply');
        
        get_header(apply_filters('thesis_get_header', $name));
        
        echo '<div id="container"' . "\n";
        echo '<div id="page">' . "\n";
        
    
        thesis_header_area();
    
        thesis_hook_before_content_box();
        
            echo '    <div id="content_box" class="no_sidebars">' . "\n";

    Then you keep the primary plugin code per file... you know, so Event Calendar does what it is supposed to. Finish it off with:

     thesis_hook_after_content_box();
        thesis_footer_area();
        
        echo '</div>' . "\n";
        //echo '</div>' . "\n";
            
        get_footer(apply_filters('thesis_get_footer', $name));

    Incidentally, this is the syntax you would use to create custom templates with Thesis... all you would need to do to take this extra step....

    /*Template Name: Your Template Name Here*/

    So that's the deal... works like a champ. You will, of course, need to add some CSS styling to get things looking good, but this should get the functionality set. Again, if you are not a strong coder, this probably isn't for you... then again, if you are not a strong coder, doing significant mods to Thesis (or to plugins so that they work with Thesis) probably shouldn't be your game anyway. Just keep in mind that while Thesis is a great high-level theme and offers plenty of built-in options for non-coders, the fact that it gives you all of those options makes working with its' codebase much more difficult.

    Hope this helps somebody...!

  16. Shane Pearlman
    Modern Tribe
    Posted 5 years ago #

    TC Soul - you are a gentleman and code scholar. I am sure people will appreciate your post. Can I suggest you might create a new thread with your solution in it so people find it easily. Make sure to have the title "Thesis Theme Integration" or some such.

  17. sacredpractice
    Member
    Posted 5 years ago #

    i created a new folder called "events" in my template/theme directory and placed the 3 files (single.php, gridveiw.php, list.php) in there and made the changes for my customized template/theme but it still doesn't work. It appears a background image is not showing that i added in a div which is what started the problem... please advise!!!!!!

    the site can be viewed here.

  18. sacredpractice
    Member
    Posted 5 years ago #

    ... also the sidebar is not showing!

    thanks in advance. :)

  19. jakobmichaelis
    Member
    Posted 5 years ago #

    @sacredpractice:

    This div:

    <div id="content" class="grid">

    has a right margin of 265px so it's pushing your sidebar out.

    As far as styling, I've found that if you copy the css code from the plugin folder "resources/events.css" and paste it into your style.css in your theme, you'll see the calendar with proper styling, which you can modify to your needs.

    Hope that helps.

  20. sacredpractice
    Member
    Posted 5 years ago #

    thanks jakob, i pasted the events.css code into my style.css (of the theme) and it does change the calendar style, which is cool....but my original problem is that the header image in the theme template has disappeared and only on the events calendar page of the site.

    this problem began due to an adjustment in my theme's php template files... i needed to put an image

    in front of the body background image,

    but behind the container div,

    so i added a <div id="top_header"> with an image and z-index: 2 - which works on every page of my site... except the events calendar page.

    the problem is the top image in the header disappeared only on the events calendar page.

    the code in my theme style.css is:

    #top_header { height: 200px; width: 100%; margin-top: 0px; position: relative; background: url('img/top_banner.jpg') repeat-x top; z-index: 2;}

    then in my theme/template php files if added the div before the php:

    <div id="top_header">
    
    <?php get_header(); ?>
    
    	<div id="container">
    		<div id="content">
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    		<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<h1><?php the_title(); ?></h1>
    			<small class="meta">
      			<span class="alignleft">
              <?php the_time(__('F jS, Y', 'default')) ?> | <?php _e('By', 'default'); ?> <?php the_author() ?> | <?php _e('', '' ); the_category(', '); ?> | <?php the_tags('Topics: ', ' '); ?>
    
      			</span>
    
          </small>
    
    			<div class="entry">
    				<?php the_content(); ?>
    				<?php wp_link_pages(array('before' => '<div class="page-link clearfix"><strong>Pages:</strong>', 'after' => '</div>', 'next_or_number' => 'number', 'pagelink' => '<span>%</span>')); ?>
    
    			</div>
    
    			<div class="postmetadata">
    			  <p class="categories">
    			    <?php _e('Posted in ', 'default' ); the_category(', '); ?>
            </p>
      			<?php the_tags('<p class="tags">Topics: ', ' ', '</p>'); ?>
            <p class="infos">
    
    						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    							// Both Comments and Pings are open ?>
    							<?php _e('You can', 'default'); ?> <a href="#respond"><?php _e('leave a response', 'default'); ?></a> <?php _e(', or', 'default');?> <a>" rel="trackback nofollow"><?php _e('trackback', 'default'); ?></a> <?php _e('from your own site', 'default'); ?>.
    
    						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    							// Only Pings are Open ?>
    							<?php _e('Responses are currently closed, but you can', 'default'); ?> <a> " rel="trackback nofollow"><?php _e('trackback', 'default'); ?></a> <?php _e('from your own site', 'default'); ?>.
    
    						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    							// Comments are open, Pings are not ?>
    							<?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'default'); ?>
    
    						<?php } edit_post_link(__( 'Edit this entry', 'default' ),'','.'); ?>
    					</p>
    				</div>
    
    		</div>
    
    	<?php endwhile; else: ?>
    
        <?php include (TEMPLATEPATH . "/missing.php"); ?>
    
    <?php endif; ?>
    
    		</div><!-- #content -->
    	</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    
    </div>

    hope someone can give me a hand... i don't know about the 265px margin affecting it either... since the other templated pages seem okay with it.

    thank you in advance :)

  21. jakobmichaelis
    Member
    Posted 5 years ago #

    In this file you are starting the top header div, but are you closing it in the header.php file? It looks like you've started the top-header div, included header.php, then started with the container div. I would think you would want to close the top-header div before you start the container. If it's not closed in your header.php you would need to add a </div> after your include for header.php.

  22. sacredpractice
    Member
    Posted 5 years ago #

    thanks jakob for your help. the </div> is at the bottom under the footer.php as it was the only way to keep the container width according the design of the site.

    good news though, i was able to fix the original issue by adding the event.css to my custom theme style.css and include the top-header div in the gridview.php and single.php! what a relief!!!

    now my only issue is the sidebar is not showing up.

    i'll keep working on it and get back if I figure that part out... or if i need help.

    thanks again.

  23. ncitravel
    Member
    Posted 5 years ago #

    These problems also occur with ATAHUALPA 3.4.5 theme, which employs a different way of doing the Footer/Sidebars, etc, and so the sidebars & footer are completely destroyed in this theme (see ibooktravel.com.au). I'd really appreciate if anyone can help to make The Events Calendar & Atahualpa theme compatible.

  24. sacredpractice
    Member
    Posted 5 years ago #

    sidebar is working. i added an include in the gridview.php, list.php and single.php (in my events folder within the theme).

    add:
    <?php
    include (TEMPLATEPATH.'/sidebar.php');
    ?>

    now i'm trying to figure out why the sidebar appears lower and not where it is designed to be on the template.... not sure where some of the classes for the events calendar postings are coming from... they don't appear in the events.css.

  25. pankus
    Member
    Posted 5 years ago #

    I have the same problem of compatibility with ATAHUALPA 3.4.5 theme and this amazing plugin. Even though I try and follow the "Default vs. Custom Templates" instuctions I do not figure out how to solve it.
    Please help

  26. sacredpractice
    Member
    Posted 5 years ago #

    pankus, these are the steps that made the theme integrate with the events calendar for my issues... try:

    1. copying the files: gridview.php, list.php and single.php from the plugin folder/views

    2. put the copied files into a new folder in your theme folder and call it "events"

    3. copy all the code in the file events.css from the-events-calendar folder (in your plugin folder).

    4. paste all the css code into your theme style.css file.

    This should do it... it did it for me... of course with adjusting the files to get everything right. if your sidebar is not showing you will need to manually place the code:

    <?php get_sidebar(); ?>

    into your copied files (events/gridview.php, list.php and single.php)

    i am still trying to get the sidebar to move up as it has for some reason pushed underneath my content div... i'm close to figuring out so i'll post once i do.

    good luck!

  27. pankus
    Member
    Posted 5 years ago #

    Thank you sacredpractice, but unfortunately your method does not work with Atahualpa 3.4.5. It miss a single *.css!! If I well understand, it dinamically creates a css file with the script css.php -located in the root level-. As a consequence there's no real place where to paste the events.css code.
    I need and find a different solution.
    bye

  28. Noah_Eventbrite
    Member
    Posted 5 years ago #

    Hey pankus,

    The Dev Team will return from vacation at the end of the week. I'm sure they will provide assistance when they return. In the meantime, does anyone else have any ideas?

    Thanks,

    - Noah

  29. shadowq
    Member
    Posted 5 years ago #

    Hey Pankus & ncitravel,

    Just found this thread- and without too much mucking around (time is money!) I found that it's easy enough to make it work with Atahualpa.

    Simply do as Shaine has said

    Create a new folder called "events" in your template directory and copy over the following files from within the plugin folder (simple-events/views/):

    * gridview.php
    * list.php
    * single.php

    Edit all of the above 3 files, in the new location, and perform the two actions below on each file-

    Replace include (TEMPLATEPATH.'/header.php');
    with include (TEMPLATEPATH . '/functions/bfa_get_options.php');
    get_header();

    Replace include (TEMPLATEPATH.'/footer.php');
    with get_footer();

    All done!

    ShadowQ.

  30. kkropp
    Member
    Posted 5 years ago #

    Hey ShadowQ-

    Is the fix you explain above (the highlighted file edits, that is) specific to the Atahualpa theme, or do you suspect it's generalizable to something like iThemes Flexx? I'm a first-time WP designer who's trying to integrate The Events Calendar w/Flexx (actually a child theme implementation) and having trouble getting my theme's header and footer to appear. Interestingly, the CSS tweaks in my child theme's style sheet do seem to be working behind the calendar's grid view.

    This is a great plugin and I'd love to be able to use it on my project. Any thoughts?

    Best,
    Karl

Topic Closed

This topic has been closed to new replies.

About this Topic