Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Wobbles101

    (@wobbles101)

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    <?php
    
    /**
     * Template Name: Diary Dates
     */
    //wp_enqueue_script('flexslider', TB_THEME_URL . '/js/jquery.flexslider.js', array('jquery'));
    wp_enqueue_script('colorbox', TB_THEME_URL . '/js/jquery.colorbox.js', array('jquery'));
    
    get_header();
    
    the_post();
    
    ?>
    
    <script type="text/javascript" language="javascript" src="<?php echo TB_THEME_URL; ?>/js/carousel.js"></script>
    
    <script>
    jQuery(function(){
    	jQuery('#jcarousel').jcarousel({vertical: true,  wrap: 'circular' , centered: true});
    });
    
    </script>
    
    <style>
    	.jcarousel-skin-default .jcarousel-vertical,
    .jcarousel-skin-default .ver-ti-cal {
        position: relative;
        overflow: hidden;
        width: 300px;
        height: 480px;
    
    }
    
    .jcarousel-skin-default .jcarousel-vertical ul,
    .jcarousel-skin-default .ver-ti-cal ul {
        width: 100%;
        height: 20000em;
        position: relative;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .jcarousel-skin-default .jcarousel-vertical li,
    .jcarousel-skin-default .ver-ti-cal li {
        height: auto;
        margin: 0 0 10px 0;
        padding: 4px 0;
    }
    
    /** Custom **/
    
    .jcarousel-skin-default li img {
        border: 0;
        display: block;
    }
    .pointer{ display: block; float:right; cursor: pointer;}
    
    </style>
    
    <div id="content" class="container diaryDates">
    	<div id="diary">
    		<div class="d-corner-right"></div>
    		<div class="d-corner-left"></div>
    		<div class="d-corner-bottom-left"></div>
    		<div class="d-corner-bottom-right"></div>
    		<div id="sidebar">
    			<?php dynamic_sidebar('left-diary-dates'); ?>
    			<?php do_action('tbto_sidebar_buttons'); ?>
    		</div>
    		<div id="left-container">
    			<h1><?php the_title(); ?></h1>
    			<?php echo do_shortcode('[sc_events_calendar]'); ?>
    			<div class="dates-list">
    				<div class="dc-corner-right"></div>
    				<div class="dc-corner-left"></div>
    				<div class="dc-corner-bottom-left"></div>
    				<div class="dc-corner-bottom-right"></div>
    				<h3><?php echo date('F'); ?> Dates</h3>
    				<?php query_posts('post_type=sc_event&posts_per_page=-1&meta_key=sc_event_date_time&orderby=meta_value_num&order=asc&post_status=publish'); ?>
    				<?php if (have_posts()) : ?>
    
    							<div class="jcarousel-skin-default">
    
    <img class="pointer" src="/wp-content/themes/upland/images/arrow-up.png" alt="" onclick="jQuery('#jcarousel').jcarousel('scroll', '-=1'); return false;">
    <div style="float:none; clear:both; height:10px;"></div>
    <div class="jcarousel jcarousel-vertical" id="jcarousel">
                <ul>
                    <?php while (have_posts()) : the_post(); ?>
    							<?php
    								$currentTime = strtotime(date('F j, Y'));
    								$eventTime = strtotime(sc_get_event_date($post->ID));
    								if($eventTime > $currentTime) {
    							?>
    							<li>
    								<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    									<?php echo sc_get_event_date($post->ID); ?>
    									<span><?php echo substr(the_title($before = '', $after = '', FALSE), 0, 20) . '...'; ?></span>
    								</a>
    							</li>
    						<?php } endwhile; ?>
                </ul>
            </div>
    
     <img style="margin-bottom:-40px;" class="pointer" src="/wp-content/themes/upland/images/arrow-active.png" alt="" onclick="jQuery('#jcarousel').jcarousel('scroll', '+=1'); return false;">
    
    </div>
    
    					<script type="text/javascript">
    					jQuery(function ($) {
    						$('.flexslider').flexslider({ animation : 'slide', direction : 'vertical',slideshow: false });
    					});
    				</script>
    				<?php else : ?>
    					<p>Apologies, but no entries were found.</p>
    				<?php endif; ?>
    				<?php wp_reset_query(); ?>
    			</div>
    		</div>
    		<div class="clear"></div>
    	</div>
    	<div class="clear"></div>
    </div>
    
    <style>
    	.diaryDates .flex-direction-nav .flex-prev{background: url("/wp-content/themes/upland/images/arrow-up.png") no-repeat scroll left top; width: 36px; height: 35px;}
    </style>
    
    <?php get_footer(); ?>
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Where did you get that theme? It helps instead of posting large unreadable code blocks.

    Thread Starter Wobbles101

    (@wobbles101)

    the website was created before I started – all I done was updated the plugin ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Callendar help’ is closed to new replies.