Author: weaverryan
Date: 2010-02-07 21:17:11 +0100 (Sun, 07 Feb 2010)
New Revision: 27665
Added:
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsComponents.class.php
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/templates/_blog_popular_tags.php
Modified:
plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml
Log:
[1.4][sfSympalCommentsPlugin][1.0] Adding a sidebar that will be added to the
blog plugin if that plugin is present
Modified: plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml
===================================================================
--- plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml 2010-02-07
20:16:04 UTC (rev 27664)
+++ plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml 2010-02-07
20:17:11 UTC (rev 27665)
@@ -12,3 +12,9 @@
requires_auth: false
allow_websites: true # whether to allow a "websites" field on the
comments
websites_no_follow: true # whether to make website links nofollow
+
+ # add comments to the sidebar widget
+ blog-post:
+ sidebar:
+ widgets:
+ tags: sympal_comments/blog_popular_tags
\ No newline at end of file
Added:
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsComponents.class.php
===================================================================
---
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsComponents.class.php
(rev 0)
+++
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsComponents.class.php
2010-02-07 20:17:11 UTC (rev 27665)
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Components class for comments
+ *
+ * @package sfSympalCommentsPlugin
+ * @subpackage components
+ * @author Ryan Weaver <[email protected]>
+ * @since 2010-02-07
+ * @version svn:$Id$ $Author$
+ */
+class Basesympal_commentsComponents extends sfComponents
+{
+
+ /**
+ * displays popular tags in a list - used by sfSympalBlogPlugin if it
+ * is installed, but this basic idea could be extended to other content types
+ */
+ public function executeBlog_popular_tags(sfWebRequest $request)
+ {
+ $this->tags =
Doctrine::getTable('sfSympalTag')->retrieveTagsForContentType('sfSympalBlogPost',
5);
+ }
+}
\ No newline at end of file
Added:
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/templates/_blog_popular_tags.php
===================================================================
---
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/templates/_blog_popular_tags.php
(rev 0)
+++
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/templates/_blog_popular_tags.php
2010-02-07 20:17:11 UTC (rev 27665)
@@ -0,0 +1,6 @@
+<h3>Tags</h3>
+<ul>
+ <?php foreach ($tags as $tag => $postCount): ?>
+ <li><?php echo $tag ?> (<?php echo $postCount ?>)</li>
+ <?php endforeach; ?>
+</ul>
\ No newline at end of file
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.