Author: Jonathan.Wage
Date: 2010-01-14 20:55:31 +0100 (Thu, 14 Jan 2010)
New Revision: 26649
Modified:
plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml
plugins/sfSympalCommentsPlugin/branches/1.4/config/sfSympalCommentsPluginConfiguration.class.php
plugins/sfSympalCommentsPlugin/branches/1.4/lib/helper/CommentsHelper.php
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/config/generator.yml
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsActions.class.php
Log:
[1.4][sfSympalCommentsPlugin][1.0] Updates for latest changes in core
Modified: plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml
===================================================================
--- plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml 2010-01-14
19:43:37 UTC (rev 26648)
+++ plugins/sfSympalCommentsPlugin/branches/1.4/config/app.yml 2010-01-14
19:55:31 UTC (rev 26649)
@@ -1,5 +1,8 @@
all:
sympal_config:
+ admin_modules:
+ sympal_comments: ~
+
recaptcha_forms: [sfSympalNewCommentForm]
sfSympalCommentsPlugin:
default_status: Approved
Modified:
plugins/sfSympalCommentsPlugin/branches/1.4/config/sfSympalCommentsPluginConfiguration.class.php
===================================================================
---
plugins/sfSympalCommentsPlugin/branches/1.4/config/sfSympalCommentsPluginConfiguration.class.php
2010-01-14 19:43:37 UTC (rev 26648)
+++
plugins/sfSympalCommentsPlugin/branches/1.4/config/sfSympalCommentsPluginConfiguration.class.php
2010-01-14 19:55:31 UTC (rev 26649)
@@ -1,4 +1,5 @@
<?php
+
class sfSympalCommentsPluginConfiguration extends sfPluginConfiguration
{
public static
@@ -12,8 +13,19 @@
{
$this->dispatcher->connect('sympal.load_config_form', array($this,
'loadConfigForm'));
$this->dispatcher->connect('sympal.load_admin_menu', array($this,
'loadAdminMenu'));
+ $this->dispatcher->connect('sympal.content_renderer.filter_content',
array($this, 'filterSympalContent'));
}
+ public function filterSympalContent(sfEvent $event, $content)
+ {
+ if (sfSympalConfig::get('sfSympalCommentsPlugin', 'installed') &&
sfSympalConfig::get('sfSympalCommentsPlugin', 'enabled') &&
sfSympalConfig::get($event['content']->getType()->getSlug(), 'enable_comments'))
+ {
+ use_helper('Comments');
+ $content .= get_sympal_comments($event['content']);
+ }
+ return $content;
+ }
+
public function loadAdminMenu(sfEvent $event)
{
$menu = $event->getSubject();
@@ -32,7 +44,7 @@
$contentTypes = Doctrine::getTable('sfSympalContentType')->findAll();
foreach ($contentTypes as $contentType)
{
- $form->addSetting($contentType['name'], 'enable_comments', 'Enable
Comments', 'InputCheckbox', 'Boolean');
+ $form->addSetting($contentType['slug'], 'enable_comments', 'Enable
Comments', 'InputCheckbox', 'Boolean');
}
$form->addSetting('Comments', 'default_status', 'Default Status');
Modified:
plugins/sfSympalCommentsPlugin/branches/1.4/lib/helper/CommentsHelper.php
===================================================================
--- plugins/sfSympalCommentsPlugin/branches/1.4/lib/helper/CommentsHelper.php
2010-01-14 19:43:37 UTC (rev 26648)
+++ plugins/sfSympalCommentsPlugin/branches/1.4/lib/helper/CommentsHelper.php
2010-01-14 19:55:31 UTC (rev 26649)
@@ -2,8 +2,5 @@
function get_sympal_comments($content)
{
- if (sfSympalConfig::get('sfSympalCommentsPlugin', 'enabled') &&
sfSympalConfig::get($content['Type']['name'], 'enable_comments'))
- {
- return get_component('sympal_comments', 'for_content', array('content' =>
$content));
- }
+ return get_component('sympal_comments', 'for_content', array('content' =>
$content));
}
\ No newline at end of file
Modified:
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/config/generator.yml
===================================================================
---
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/config/generator.yml
2010-01-14 19:43:37 UTC (rev 26648)
+++
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/config/generator.yml
2010-01-14 19:55:31 UTC (rev 26649)
@@ -1,8 +1,8 @@
generator:
- class: sfSympalDoctrineGenerator
+ class: <?php echo sfSympalConfig::getAdminGeneratorClass()
?>
param:
model_class: sfSympalComment
- theme: sympal_admin
+ theme: <?php echo sfSympalConfig::getAdminGeneratorTheme()
?>
non_verbose_templates: true
with_show: false
singular: ~
Modified:
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsActions.class.php
===================================================================
---
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsActions.class.php
2010-01-14 19:43:37 UTC (rev 26648)
+++
plugins/sfSympalCommentsPlugin/branches/1.4/modules/sympal_comments/lib/Basesympal_commentsActions.class.php
2010-01-14 19:55:31 UTC (rev 26649)
@@ -2,15 +2,9 @@
class Basesympal_commentsActions extends autoSympal_commentsActions
{
- public function preExecute()
- {
- parent::preExecute();
- $this->useAdminTheme();
- }
-
public function executeCreate(sfWebRequest $request)
{
- $this->useDefaultTheme();
+ $this->loadDefaultTheme();
if (sfSympalConfig::get('sfSympalCommentsPlugin', 'requires_auth') &&
!$this->getUser()->isAuthenticated())
{
--
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.