Beispiel #1
0
function get_comment_count()
{
    global $post_id;
    ?>
		<div class="comment-preview">
			
				<span class="comments-count"><?php 
    echo get_comment_nb($post_id);
    ?>
&nbsp;Commentaires</span>
			
		</div>
<?php 
}
Beispiel #2
0
<?php 
//if(!isset($editid)){$editid = 1;}
if (isset($_GET['id'])) {
    $editid = $_GET['id'];
    $post = get_post_content($editid);
    //pretty($post);
    ?>
	
	

<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Body Element</a></li>
		<li><a href="#tabs-2">Category</a></li>
		<li><a href="#tabs-3">Comments (<?php 
    echo get_comment_nb($_GET['id']);
    ?>
)</a></li>
		<li><a href="#tabs-4">History
		<?php 
    if (!empty($post['note'])) {
        echo '(' . str_word_count($post['note']) . ' words)';
    } else {
        echo 'Empty';
    }
    ?>

		</a></li>		
		<li><a href="#tabs-5">Ping</a></li>
	</ul>
	
Beispiel #3
0
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;
    }
}