Ejemplo n.º 1
0
	<div id="disqus_thread"></div>
	<script type="text/javascript">
	  <?php 
    // Newer versions pass the post object so we can access a custom disqus identifier
    ?>
	  <?php 
    // from a Wordpress import etc. Older versions do not and we shouldn't break older
    ?>
	  <?php 
    // overrides of those templates. The prefix app.yml option only makes sense when we
    ?>
	  <?php 
    // are not using a legacy identifier imported from another system
    ?>
    var disqus_identifier = <?php 
    echo json_encode(aBlogItemTable::getDisqusIdentifier(isset($post) ? $post : null, $id));
    ?>
;
	  (function() {
	   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
	   dsq.src = "http://<?php 
    echo $disqus_shortname;
    ?>
.disqus.com/embed.js";
	   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	  })();
	<?php 
    if (sfConfig::get('app_aBlog_disqus_developer', true)) {
        ?>
		var disqus_developer = true;
	<?php 
Ejemplo n.º 2
0
Archivo: _meta.php Proyecto: hashir/UoA
$a_blog_post = isset($a_blog_post) ? $sf_data->getRaw('a_blog_post') : null;
?>

<ul class="a-blog-item-meta">
  <li class="post-date"><?php 
echo aDate::pretty($a_blog_post['published_at']);
?>
</li>
  <li class="post-author">
		<?php 
include_partial('aBlog/author', array('a_blog_post' => $a_blog_post));
?>
	</li>
	<?php 
slot('disqus_needed', 1);
?>
	<?php 
if (sfConfig::get('app_aBlog_disqus_enabled')) {
    ?>
	<li><a class="disqus-comment-count" data-disqus-identifier="<?php 
    echo htmlspecialchars(aBlogItemTable::getDisqusIdentifier($a_blog_post));
    ?>
" href="<?php 
    echo url_for('a_blog_post', $a_blog_post);
    ?>
#disqus_thread">0</a></li>   
	<?php 
}
?>
</ul>