Exemplo n.º 1
0
<?php

$label = function_exists('mh_tour_label') ? mh_tour_label('plural') : __('Tours');
echo head(array('maptype' => 'none', 'title' => $label, 'bodyid' => 'tours', 'bodyclass' => 'browse'));
?>
<div id="content">
<section class="browse tour">			
<h2>All <?php 
echo $label;
?>
: <?php 
echo total_tours();
?>
</h2>

	<div id="page-col-left">
		<aside>
		<!-- add left sidebar content here -->
		</aside>
	</div>


	<div id="primary" class="browse">
	
	<section id="results">
	<nav class="tours-nav navigation secondary-nav">
	  <?php 
echo public_nav_tours();
?>
	</nav>	
	<div class="pagination bottom"><?php 
Exemplo n.º 2
0
function mh_display_random_tours($num = 20)
{
    // Get the database.
    $db = get_db();
    // Get the Tour table.
    $table = $db->getTable('Tour');
    // Build the select query.
    $select = $table->getSelect();
    $select->from(array(), 'RAND() as rand');
    $select->where('public = 1');
    // Fetch some items with our select.
    $items = $table->fetchObjects($select);
    shuffle($items);
    $num = count($items) < $num ? count($items) : $num;
    echo '<h2>' . mh_tour_header() . '</h2>';
    for ($i = 0; $i < $num; $i++) {
        echo '<article class="item-result">';
        echo '<h3 class="home-tour-title"><a href="' . WEB_ROOT . '/tours/show/' . $items[$i]['id'] . '">' . $items[$i]['title'] . '</a></h3>';
        echo '</article>';
    }
    echo '<p class="view-more-link"><a href="' . WEB_ROOT . '/tours/browse/">View all <span>' . count($items) . ' ' . mh_tour_label('plural') . '</span></a></p>';
}
Exemplo n.º 3
0
        ?>
						
		    			</div>
					<?php 
    }
    ?>
			         
			         <div class="item-description"><?php 
    echo snippet(metadata($tourItem, array('Dublin Core', 'Description')), 0, 250);
    ?>
</div>
		         </article>
	         <?php 
    $i++;
}
?>
		</section>
			   
	</div>


	<div id="page-col-right">	
	</div>	
	
	
</article>
</div> <!-- end content -->

<?php 
echo function_exists('mh_share_this') ? '<div id="share-this" class="browse">' . mh_share_this(mh_tour_label()) . '</div>' : null;
echo foot();