Author: weaverryan
Date: 2010-02-07 21:24:58 +0100 (Sun, 07 Feb 2010)
New Revision: 27667

Added:
   
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/actions/components.class.php
   
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/lib/Basesympal_tagsComponents.class.php
   
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/templates/_blog_popular_tags.php
Modified:
   plugins/sfSympalTagsPlugin/branches/1.4/config/app.yml
Log:
[1.4][sfSympalTagsPlugin][1.0] Adding a sidebar component that will hookup with 
sfSympalBlogPlugin if it is installed


Modified: plugins/sfSympalTagsPlugin/branches/1.4/config/app.yml
===================================================================
--- plugins/sfSympalTagsPlugin/branches/1.4/config/app.yml      2010-02-07 
20:23:39 UTC (rev 27666)
+++ plugins/sfSympalTagsPlugin/branches/1.4/config/app.yml      2010-02-07 
20:24:58 UTC (rev 27667)
@@ -3,4 +3,10 @@
     tags:
       jquery_token_input:
         enabled:      true
-      max_suggestions: 10
\ No newline at end of file
+      max_suggestions: 10
+
+    # add comments to the sidebar widget
+    blog-post:
+      sidebar:
+        widgets:
+          tags: sympal_tags/blog_popular_tags
\ No newline at end of file

Added: 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/actions/components.class.php
===================================================================
--- 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/actions/components.class.php
                            (rev 0)
+++ 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/actions/components.class.php
    2010-02-07 20:24:58 UTC (rev 27667)
@@ -0,0 +1,7 @@
+<?php
+
+require_once dirname(__FILE__).'/../lib/Basesympal_tagsComponents.class.php';
+
+class sympal_tagsComponents extends Basesympal_tagsComponents
+{
+}
\ No newline at end of file


Property changes on: 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/actions/components.class.php
___________________________________________________________________
Added: svn:executable
   + *

Added: 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/lib/Basesympal_tagsComponents.class.php
===================================================================
--- 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/lib/Basesympal_tagsComponents.class.php
                         (rev 0)
+++ 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/lib/Basesympal_tagsComponents.class.php
 2010-02-07 20:24:58 UTC (rev 27667)
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Components class for tags
+ * 
+ * @package     sfSympalTagsPlugin
+ * @subpackage  components
+ * @author      Ryan Weaver <[email protected]>
+ * @since       2010-02-07
+ * @version     svn:$Id$ $Author$
+ */
+class Basesympal_tagsComponents 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/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/templates/_blog_popular_tags.php
===================================================================
--- 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/templates/_blog_popular_tags.php
                                (rev 0)
+++ 
plugins/sfSympalTagsPlugin/branches/1.4/modules/sympal_tags/templates/_blog_popular_tags.php
        2010-02-07 20:24:58 UTC (rev 27667)
@@ -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.

Reply via email to