Documentation

iCagenda user guide and tips

3.2.8 : New option 'All Dates'

Adapt your Custom Theme Pack to the new option 'All Dates'.

If you have created a custom theme pack to be used with versions before 3.2.8, you will have to add a new file to be able to used the 'All Dates' option for the Events List.

The file YOUR_THEME_list.php has been removed from the new official theme packs default and ic_rounded.
This file can still be used for Next/Last date display, but not for all dates.

 

UPGRADING YOUR CUSTOM THEME PACK

  1. Copy/paste the file YOUR_THEME_list.php, and renamed it YOUR_THEME_events.php
  2. Open it in a text editor.
  3. Removed the 3 highlighted lines as shown below :

    <?php // List of Events Template ?>
    
    	<?php // List of Events ?>
    	<div class="items">
    
    -	<?php // Display for each event ?>
    -	<?php foreach ($stamp->items as $item){ ?>
    
    		<?php // START Event ?>
    		<div class="event">
    
    			<?php // START Date Box with Event Image as background ?>
    			<?php if ($item->next): ?>
    
    			<?php // Link to Event ?>
    			<a href="/<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
    
    			<?php // If no Event Image set ?>
    			<?php if (!$item->image): ?>
    			<div class="box_date">
    				<span class="day"><?php echo $item->day; ?></span><br/>
    				<span><?php echo $item->monthShort; ?></span>
    				<span class="noimage"><?php echo JTEXT::_('COM_ICAGENDA_EVENTS_NOIMAGE'); ?></span>
    			</div>
    			<?php endif; ?>
    
    			<?php // In case of Event Image ?>
    			<?php if ($item->image): ?>
    			<div class="box_date" style="background: url(/<?php echo $item->image; ?>) no-repeat center center; background-size: cover; border: 1px solid <?php echo $item->cat_color; ?>">
    				<span class="day"><?php echo $item->day; ?></span><br/>
    				<span><?php echo $item->monthShort; ?></span>
    			</div>
    			<?php endif; ?>
    
    			</a>
    			<?php endif; ?><?php // END Date Box ?>
    
    			<?php // START Right Content ?>
    			<div class="content">
    
    				<?php // Header (Title/Category) of the event ?>
    				<div class="eventtitle">
    
    					<?php // Title of the event ?>
    					<div class="title-header">
    						<h2>
    							<a href="/<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>"><?php echo $item->titlebar; ?></a>
    						</h2>
    					</div>
    
    					<?php // Category ?>
    					<div class="title-cat" style="color:<?php echo $item->cat_color; ?>;">
    						<?php echo $item->cat_title; ?>
    					</div>
    
    				</div>
    				<div style="clear:both"></div>
    
    				<?php // Next Date ('next' 'today' or 'last date' if no next date) ?>
    				<?php if ($item->day): ?>
    				<div class="nextdate">
    					<strong><?php echo $item->nextDate; ?></strong>
    				</div>
    				<?php endif; ?>
    
    				<?php // Location (different display, depending on the fields filled) ?>
    				<?php if ($item->place_name OR $item->city): ?>
    				<div class="place">
    
    					<?php // Place name ?>
    					<?php if ($item->place_name): ?><?php echo $item->place_name;?><?php endif; ?>
    
    					<?php // If Place Name exists and city set (Google Maps). Displays Country if set. ?>
    					<?php if ($item->city AND $item->place_name): ?>
    						<span> - </span>
    						<?php echo $item->city;?><?php if ($item->country): ?>, <?php echo $item->country;?><?php endif; ?>
    					<?php endif; ?>
    
    					<?php // If Place Name doesn't exist and city set (Google Maps). Displays Country if set. ?>
    					<?php if ($item->city AND !$item->place_name): ?>
    						<?php echo $item->city;?><?php if ($item->country): ?>, <?php echo $item->country;?><?php endif; ?>
    					<?php endif; ?>
    
    				</div>
    				<?php endif; ?>
    
    				<?php // Short Description ?>
    				<?php if ($item->desc): ?>
    				<div class="descshort">
    					<?php echo $item->descShort ; ?>
    				</div>
    				<?php endif; ?>
    
    				<?php // + infos Text ?>
    			 	<div class="moreinfos">
    			 		<a href="/<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
    			 			<?php echo JTEXT::_('COM_ICAGENDA_EVENTS_MORE_INFO'); ?>
    			 		</a>
    			 	</div>
    
    			</div><?php // END Right Content ?>
    			<div style="clear:both"></div>
    
    		</div><?php // END Event ?>
    
    -		<?php } ?>
    
    		<?php // AddThis Social Sharing ?>
    		<?php if ($this->atlist): ?>
    		<div class="share">
    			<?php echo $item->share; ?>
    		</div>
    		<?php endif; ?>
    
    	</div>
    	<div style="clear:both"></div>


  4. You can test this file by selecting the 'All Dates' option. If the test is successful, you can remove the file YOUR_THEME_list.php from your custom theme pack.

Follow Us

Search