Advertisement
Guest User

Comments.php

a guest
Apr 17th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?php if (!is_preview()) {
  2. $options = get_option(VF_OPTIONS_NAME);
  3. $categoryid = vf_get_value('embed-categoryid', $options, '0');
  4. ?>
  5. <div id="vanilla-comments"></div>
  6. <script type="text/javascript">
  7. var vanilla_forum_url = '<?php echo vf_get_value('url', $options); ?>'; // Required: the full http url & path to your vanilla forum
  8. var vanilla_identifier = '<?php echo $post->ID; ?>'; // Required: your unique identifier for the content being commented on
  9. var vanilla_url = '<?php echo get_permalink(); ?>'; // Current page's url
  10. <?php if ($categoryid > 0) { ?>
  11. var vanilla_category_id = '<?php echo $categoryid; ?>'; // Embed comments in this category
  12. <?php } ?>
  13. (function() {
  14. var vanilla = document.createElement('script');
  15. vanilla.type = 'text/javascript';
  16. var timestamp = new Date().getTime();
  17. vanilla.src = vanilla_forum_url + '/js/embed.js';
  18. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(vanilla);
  19. })();
  20. </script>
  21. <noscript>Please enable JavaScript to view the <a href="http://vanillaforums.com/?ref_noscript">comments powered by Vanilla.</a></noscript>
  22. <div class="vanilla-credit"><a class="vanilla-anchor" href="http://vanillaforums.com">Comments by <span class="vanilla-logo">Vanilla</span></a></div>
  23. <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement