コード例 #1
0
ファイル: sidebar.php プロジェクト: refschool/mucms
function get_sidebar()
{
    ?>

	<div id="sidebar">
	<?php 
    hook_insert('sidebar_item');
    ?>

	</div><!--end sidebar-->

<?php 
}
コード例 #2
0
ファイル: body.php プロジェクト: refschool/mucms
function get_body()
{
    global $content, $home_compact, $sefurl, $themepath;
    switch ($content['type']) {
        case 'error404':
            echo '
			<h2>Error 404 Page Not Found</h2>
			<p>The Page you requested is not found.</p>';
            break;
        case 'index':
            if ($home_compact) {
                for ($i = 0; $i < count($content['page_element']); $i++) {
                    ?>
								
									<div class="excerpt">
										<a href="<?php 
                    echo $content['page_element'][$i]['thisurl'];
                    ?>
"><h2><?php 
                    echo $content['page_element'][$i]['sub_title'];
                    ?>
</h2></a>
										<p><?php 
                    echo $content['page_element'][$i]['social_body_text'];
                    ?>
</p>
										<span class="readmore">&nbsp;<a href="<?php 
                    echo $content['page_element'][$i]['thisurl'];
                    ?>
"><?php 
                    echo $content['page_element'][$i]['readmore'];
                    ?>
</a></span>
									</div>
									
							<?php 
                }
            } else {
                //full presentation
                for ($i = 0; $i < count($content['page_element']); $i++) {
                    ?>
										
									<div class="post">
										<div class="text">	
										<a href="<?php 
                    echo $content['page_element'][$i]['thisurl'];
                    ?>
"><h2 class="home"><?php 
                    echo $content['page_element'][$i]['sub_title'];
                    ?>
</h2></a>
										<p><?php 
                    echo $content['page_element'][$i]['main_text'];
                    ?>
</p>
										</div>
									</div>
										<?php 
                    //make a hook here
                    ?>
										
										<div class="comment-preview">
										<span class="date"><?php 
                    echo $content['page_element'][$i]['date_posted'];
                    ?>
</span>
										<a href="<?php 
                    echo $content['page_element'][$i]['thisurl'];
                    ?>
">
											<span class="comments-count"><?php 
                    echo get_comment_nb($content['page_element'][$i]['id']);
                    ?>
&nbsp;Commentaires</span>
										</a>
										</div>
										
								
								<?php 
                }
            }
            break;
        case 'thetag':
            echo '<h1>Tag search results : </h1>';
            for ($i = 0; $i < count($content['page_element']); $i++) {
                ?>
					<h2><a href="<?php 
                echo $content['page_element'][$i]['path'];
                ?>
"><?php 
                echo $content['page_element'][$i]['sub_title'];
                ?>
</a></h2>
					<p>Author :<?php 
                echo $content['page_element'][$i]['author'];
                ?>
</p>
					<p><?php 
                echo $content['page_element'][$i]['description'];
                ?>
<span class="readmore"><a href="<?php 
                echo $content['page_element'][$i]['thisurl'];
                ?>
"><?php 
                echo $content['page_element'][$i]['readmore'];
                ?>
</a></span></p>
						
					<?php 
            }
            break;
        case 'thecategory':
            //$category_list = get_category_list($sefurl);
            echo '<h1>Category search results : </h1>';
            for ($i = 0; $i < count($content['page_element']); $i++) {
                ?>
					<h2><a href="<?php 
                echo $content['page_element'][$i]['path'];
                ?>
"><?php 
                echo $content['page_element'][$i]['sub_title'];
                ?>
</a></h2>
					<p>Author :<?php 
                echo $content['page_element'][$i]['author'];
                ?>
</p>
					<p><?php 
                echo $content['page_element'][$i]['description'];
                ?>
<span class="readmore"><a href="<?php 
                echo $content['page_element'][$i]['thisurl'];
                ?>
"><?php 
                echo $content['page_element'][$i]['readmore'];
                ?>
</a></span></p>
						
					<?php 
            }
            break;
        case 'thepost':
            echo '<div class="post">';
            echo '<h1>' . $content['page_element'][0]['sub_title'] . '</h1>';
            hook_insert('after_post_title');
            echo $content['page_element'][0]['main_text'];
            hook_insert('end_of_post');
            echo '<p>Posté le ' . $content['page_element'][0]['date_posted'] . '</p>';
            /*
            	//get related posts
            	$post_id = get_post_id($sefurl);
            	$r = get_related_posts($post_id);
            	if(!empty($r)){
            	
            	echo '<div id="related"><p style="font-weight:bold;font-size:16px; color:#FF7F00">Suggested readings<p>
            				<ul>';
            		for($i=0;$i < count($r);$i++){
            			?>
            			
            			
            				
            				<li><a href="<?=$r[$i]['url']?>" ><?=$r[$i]['anchor']?></a></li>
            	
            			<?php
            
            		}
            		echo '</ul></div><br style="clear:both" />';
            	}
            echo '</div><!--end of post div-->';
            
            //end related post
            //tODO put this in a function PLEASE
            */
            ?>
									<br style="clear:both" />
									<?php 
            hook_insert('comment_count');
            hook_insert('comments');
            if ($content['page_element'][0]['com_closed'] == 'checked') {
                echo '<p>Fermé aux commentaires</p>';
            } else {
                hook_insert('comment_form');
            }
            ?>
									



									
									<?php 
            echo '</div>';
            break;
        case 'directory-home':
            for ($i = 0; $i < count($content['page_element']); $i++) {
                ?>
										
							<div class="post">
								<div class="text">	
							<a href="<?php 
                echo $content['page_element'][$i]['path'];
                ?>
"><h2 class="home"><?php 
                echo $content['page_element'][$i]['website_name'];
                ?>
</h2></a>
							
							<?php 
                echo $content['page_element'][$i]['short_desc'];
                ?>
								</div>
							</div>
						<?php 
                //make a hook here
                ?>

								<?php 
            }
            break;
        case 'directory':
            ?>
										
					<div class="post">
						<div class="text">	
							<a href="<?php 
            echo $content['page_element']['website_url'];
            ?>
"><h2 class="home"><?php 
            echo $content['page_element']['website_name'];
            ?>
</h2></a>
							
							<?php 
            echo $content['page_element']['short_desc'];
            ?>

							<?php 
            echo $content['page_element']['long_desc'];
            ?>

						</div>
					</div>
										<?php 
            //make a hook here
            ?>
										

										
								
								<?php 
            break;
    }
}
コード例 #3
0
ファイル: footer.php プロジェクト: refschool/mucms
<?php 
hook_insert('footer');
コード例 #4
0
ファイル: index.php プロジェクト: refschool/mucms
			<!-- begin sidebar-->
			
			<?php 
hook_insert('sidebar');
//
?>
			

</div><!--end main--><br style="clear:both" />



			<!-- begin footer-->
			<?php 
include $themepath . 'footer.php';
?>
			<!-- end footer-->
			
		</div><!--end frame-->
		
		
	</div><!--end superframe-->
<?php 
//echo memory_get_peak_usage().'<br>';
//echo memory_get_usage();
//_-`-_HOOK::before_body_-`-_
hook_insert('before_body');
?>
</body>
</html>
コード例 #5
0
ファイル: header.php プロジェクト: refschool/mucms
			<div id="head">
				<div id="branding">
					<img src="<?php 
echo $tld . $themepath;
?>
images/banner.jpg" width="" height="" alt="<?php 
echo $home_title;
?>
" />
				</div>	



	<?php 
//$hook['menu'][0]();
hook_insert('menu');
?>
			</div>