Author: weaverryan
Date: 2010-02-09 04:13:07 +0100 (Tue, 09 Feb 2010)
New Revision: 27771

Modified:
   plugins/sfSympalPlugin/trunk/config/app.yml
   plugins/sfSympalPlugin/trunk/lib/helper/SympalContentSlotHelper.php
Log:
[1.4][sfSympalPlugin][1.0] Making the published_at slot renderer format 
configurable. This uses ths sfDateFormat class, which I'm not familiar with, so 
there may be a better way to do this.


Modified: plugins/sfSympalPlugin/trunk/config/app.yml
===================================================================
--- plugins/sfSympalPlugin/trunk/config/app.yml 2010-02-09 03:04:22 UTC (rev 
27770)
+++ plugins/sfSympalPlugin/trunk/config/app.yml 2010-02-09 03:13:07 UTC (rev 
27771)
@@ -7,6 +7,10 @@
   sympal_config:
     # Configure the default culture
     default_culture: en
+    
+    # used for outputting date published slot. See sfDateFormat::getPattern()
+    # 
http://trac.symfony-project.org/browser/branches/1.4/lib/i18n/sfDateFormat.class.php
+    date_published_format: D
 
     # Configure whether or not to allow the theme to be changed with a 
     # parameter in the url named sf_sympal_theme. Example: 
?sf_sympal_theme=wordpress_default

Modified: plugins/sfSympalPlugin/trunk/lib/helper/SympalContentSlotHelper.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/helper/SympalContentSlotHelper.php 
2010-02-09 03:04:22 UTC (rev 27770)
+++ plugins/sfSympalPlugin/trunk/lib/helper/SympalContentSlotHelper.php 
2010-02-09 03:13:07 UTC (rev 27771)
@@ -20,7 +20,7 @@
 function render_content_date_published(sfSympalContent $content, $slot)
 {
   use_helper('Date');
-  return format_datetime($content->date_published);
+  return format_datetime($content->date_published, 
sfSympalConfig::get('date_published_format'));
 }
 
 /**

-- 
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