• When the event is clicked on I would like like it to go directly to the event post and not the lightbox window. Is this possible?

    I am using the sidebar events calendar.

    Thanks

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter ianmcabee

    (@ianmcabee)

    Bump

    BUMP

    Plugin Author snumb130

    (@snumb130)

    I am working on a new version and this is a good idea. I will see what I can do.

    Hi, is there anything I can do now to disable the thickbox before the next release is out? Which file i should be looking at?

    Thanks!

    Plugin Author snumb130

    (@snumb130)

    In ec_js.class.php around 256 is where the information is written. The click event can be changed to have JavaScript send you to a particular location.

    Thanks so much snumb130, forgive me for my stupidity as I’m not a programmer.

    I guess this is the part I need to make changes to?

    .click(function() {
           	tb_show(	"<?php echo $date_show; ?>", "<?php bloginfo('siteurl');?>?EC_view=day&EC_month=<?php echo $month;?>&EC_day=<?php echo $day;?>&EC_year=<?php echo trim($year);?>&TB_iframe=true&width=<?php echo $tbw;?>&height=<?php echo $tbh;?>", false);
    			})

    What should I do so that the click function will lead to the post of that event? I’m looking at how the event list does it, something to do with POST id, but I still don’t have a clue..

    Much appreciated for the help!

    Plugin Author snumb130

    (@snumb130)

    I will have to nail this down when I am back at a computer and not a phone. It might be Monday, but keep watching this thread and i’ll post my response here.

    thank you so much for your time.

    hi snumb130, have you got a chance to look into this yet? Anyway, i will keep watching. Thank you.

    Plugin Author snumb130

    (@snumb130)

    OK, looking the only problem is going to be is when you haev multiple events on the same day. If this is not going to be an issue, then you can do the following.

    File: ec_js.class.php
    Lines: 141-143
    Change:

    $lastDay = date('t', mktime(0, 0, 0, $month, 1, $year));
    
    for ($day = 1; $day <= $lastDay; $day++) {

    To:

    $lastDay = date('t', mktime(0, 0, 0, $month, 1, $year));
    $linktopost = '';
    for ($day = 1; $day <= $lastDay; $day++) {

    File: ec_js.class.php
    Lines: 157-159
    Change:

    $endTime = isset($e->eventEndTime) ? $e->eventEndTime : '';
    
    $output .= '<li class="EC-tt-widget-day-event-title">'.$title.'</li>';

    To:

    $endTime = isset($e->eventEndTime) ? $e->eventEndTime : '';
    $linktopost = isset($e->postID) && !empty($e->postID) ? get_permalink( $e->postID ) : '';
    $output .= '<li class="EC-tt-widget-day-event-title">'.$title.'</li>';

    File: ec_js.class.php
    Lines: 263
    Change:

    tb_show(	"<?php echo $date_show; ?>", "<?php bloginfo('siteurl');?>?EC_view=day&EC_month=<?php echo $month;?>&EC_day=<?php echo $day;?>&EC_year=<?php echo trim($year);?>&TB_iframe=true&width=<?php echo $tbw;?>&height=<?php echo $tbh;?>", false);

    To:

    <?php if($linktopost == '') {?>
    tb_show(	"<?php echo $date_show; ?>", "<?php bloginfo('siteurl');?>?EC_view=day&EC_month=<?php echo $month;?>&EC_day=<?php echo $day;?>&EC_year=<?php echo trim($year);?>&TB_iframe=true&width=<?php echo $tbw;?>&height=<?php echo $tbh;?>", false);
    <?php }else{?>
    window.location.href = '<?php echo $linktopost;?>';
    <?php }?>

    If you have more than one event on a day, this will cause the click to link to the first event for the day.

    Also, if there is not post for the event the thickbox will still popup.

    You can copy the code for the whole file from here.

    Hopefully this will get you by until the new version is released.

    hi snumb130, thank you so much for working on it.

    My solution is, I will only use category display mode to display all of the events. So it doesn’t matter which date it is or how many events there are on the same date, all will direct to the same page.

    I tried the replacing the entire php file but the site won’t open after that, I’m looking into the modified lines now, and I will keep you posted.

    Thanks again, you are an amazing guy.

    When I replaced the entire ec_js.class.php file , the website won’t open anymore, a blank page.

    I did the changes line by line according to your last post, it works smoothly.

    I’m trying to change it from linking to individual post to linking to a fixed url.

    Sorry to bother you again, if I want to link any date that has event to a fixed url, say “http://domain.com/events/&#8221;, instead of the actual post to the event, which line shall I change?

    Plugin Author snumb130

    (@snumb130)

    No worries.

    Changing the following should work.

    File: ec_js.class.php
    Line: 158
    Change:

    $linktopost = isset($e->postID) && !empty($e->postID) ? get_permalink( $e->postID ) : '';

    To:

    $linktopost = 'http://domain.com/events/';

    It works like a charm.

    Hats off, thank you.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Plugin: Events Calendar] Disable Lightbox?’ is closed to new replies.