[pLog-svn] r3513 - in plugins/trunk/cocomment: . template templates
pwestbro at devel.lifetype.net
pwestbro at devel.lifetype.net
Fri Jun 2 20:56:54 GMT 2006
Author: pwestbro
Date: 2006-06-02 20:56:53 +0000 (Fri, 02 Jun 2006)
New Revision: 3513
Added:
plugins/trunk/cocomment/templates/
plugins/trunk/cocomment/templates/cocomment.template
Removed:
plugins/trunk/cocomment/template/cocomment.template
Modified:
plugins/trunk/cocomment/plugincocomment.class.php
Log:
Fixed the admin page of the coComment plugin
Modified: plugins/trunk/cocomment/plugincocomment.class.php
===================================================================
--- plugins/trunk/cocomment/plugincocomment.class.php 2006-06-02 19:37:53 UTC (rev 3512)
+++ plugins/trunk/cocomment/plugincocomment.class.php 2006-06-02 20:56:53 UTC (rev 3513)
@@ -44,32 +44,34 @@
function show($postId)
{
- $locale = $this->blogInfo->getLocale();
-
- // articles object
- $articles = new Articles;
-
- $rg = $this->blogInfo->getBlogRequestGenerator();
- $baseUrl = $rg->getBaseUrl();
- $post = $articles->getBlogArticle($postId);
-
$str = '';
- $str = '<script type="text/javascript">';
- $str .= 'var blogTool = "LifeType";';
- $str .= 'var blogURL = "'.$rg->blogLink().'";';
- $str .= 'var blogTitle = "'.$this->blogInfo->getBlog().'";';
- $str .= 'var postURL = "'.$rg->postPermalink($post).'";';
- $str .= 'var postTitle = "'.$post->getTopic().'";';
- $str .= 'var commentAuthorFieldName = "userName";';
- $str .= 'var commentAuthorLoggedIn = false;';
- $str .='var commentFormID = "NewComment";';
- $str .='var commentTextFieldName = "commentText";';
- $str .='var commentButtonName = "Add";';
-// $str .='var cocomment_force = false;';
- $str .='</script>';
- $str .='<script id="cocomment-fetchlet" src="http://www.cocomment.com/js/enabler.js"></script>';
-
+
+ if ($this->isEnabled())
+ {
+
+ // articles object
+ $articles = new Articles;
+
+
+ $rg = $this->blogInfo->getBlogRequestGenerator();
+ $post = $articles->getBlogArticle($postId);
+
+ $str = '<script type="text/javascript">';
+ $str .= 'var blogTool = "LifeType";';
+ $str .= 'var blogURL = "'.$rg->blogLink().'";';
+ $str .= 'var blogTitle = "'.$this->blogInfo->getBlog().'";';
+ $str .= 'var postURL = "'.$rg->postPermalink($post).'";';
+ $str .= 'var postTitle = "'.$post->getTopic().'";';
+ $str .= 'var commentAuthorFieldName = "userName";';
+ $str .= 'var commentAuthorLoggedIn = false;';
+ $str .='var commentFormID = "NewComment";';
+ $str .='var commentTextFieldName = "commentText";';
+ $str .='var commentButtonName = "Add";';
+ // $str .='var cocomment_force = false;';
+ $str .='</script>';
+ $str .='<script id="cocomment-fetchlet" src="http://www.cocomment.com/js/enabler.js"></script>';
+ }
return $str;
}
}
Deleted: plugins/trunk/cocomment/template/cocomment.template
===================================================================
--- plugins/trunk/cocomment/template/cocomment.template 2006-06-02 19:37:53 UTC (rev 3512)
+++ plugins/trunk/cocomment/template/cocomment.template 2006-06-02 20:56:53 UTC (rev 3513)
@@ -1,24 +0,0 @@
-{include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=coComment title=$locale->tr("cocomment_plugin")}
-<form name="cocommentPluginConfig" method="post">
- <fieldset class="inputField">
- <legend>{$locale->tr("label_configuration")}</legend>
- {include file="$admintemplatepath/successmessage.template"}
- {include file="$admintemplatepath/errormessage.template"}
- <div class="field">
- <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
- <div class="formHelp">
- <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" />{$locale->tr("cocomment_plugin_enabled")}
- </div>
- </div>
-
- </fieldset>
-
- <div class="buttons">
- <input type="hidden" name="op" value="updatecoCommentConfig" />
- <input type="reset" name="{$locale->tr("reset")}" />
- <input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}" />
- </div>
-</form>
-{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
Copied: plugins/trunk/cocomment/templates/cocomment.template (from rev 3507, plugins/trunk/cocomment/template/cocomment.template)
More information about the pLog-svn
mailing list