[pLog-svn] r1898 - in plog/trunk: class/action locale
templates/blueish templates/grey templates/standard
templates/standard-with-plugins
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Fri Apr 22 14:01:44 GMT 2005
Author: oscar
Date: 2005-04-22 14:01:44 +0000 (Fri, 22 Apr 2005)
New Revision: 1898
Modified:
plog/trunk/class/action/commentaction.class.php
plog/trunk/locale/locale_en_UK.php
plog/trunk/templates/blueish/commentform.template
plog/trunk/templates/grey/commentform.template
plog/trunk/templates/standard-with-plugins/commentform.template
plog/trunk/templates/standard/commentform.template
plog/trunk/templates/standard/footer.template
Log:
if users click the "reply" link in a comment, the form that appears in the
next page will have "Re: xxxx" as the subject. This is accomplished by
loading the comment to which we're replying, adding a "Re:" (localized) string
to it and then passing it to the template as the "$topic" variable. A slight
change is also needed in commentform.template that I have applied to all the stock templates.
Modified: plog/trunk/class/action/commentaction.class.php
===================================================================
--- plog/trunk/class/action/commentaction.class.php 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/class/action/commentaction.class.php 2005-04-22 14:01:44 UTC (rev 1898)
@@ -70,6 +70,15 @@
// fetch the comments so far
$comments = new ArticleComments();
$postComments = $comments->getPostComments( $article->getId());
+ if( $this->_parentId > 0 ) {
+ // get a pre-set string for the subject field, for those users interested
+ $comment = $comments->getPostComment( $article->getId(), $this->_parentId );
+ // create the string
+ if( $comment ) {
+ $replyString = $this->_locale->tr("reply_string").$comment->getTopic();
+ }
+ }
+
// if everything's fine, we set up the article object for the view
$this->_view->setValue( "category", $category );
@@ -78,6 +87,7 @@
$this->_view->setValue( "parentId", $parentId );
$this->_view->setValue( "comments", $postComments );
$this->_view->setValue( "postcomments", $postComments );
+ $this->_view->setValue( "topic", $replyString );
$this->setCommonData();
Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/locale/locale_en_UK.php 2005-04-22 14:01:44 UTC (rev 1898)
@@ -910,4 +910,5 @@
$messages['error_marking_trackback_as_nonspam'] = 'There was an error marking the trackback as non-spam';
$messages['trackback_marked_as_nonspam_ok'] = 'The trackback was marked successfully as non-spam';
$messages['upload_here'] = 'Upload here';
+$messages['reply_string'] = 'Re: ';
?>
\ No newline at end of file
Modified: plog/trunk/templates/blueish/commentform.template
===================================================================
--- plog/trunk/templates/blueish/commentform.template 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/templates/blueish/commentform.template 2005-04-22 14:01:44 UTC (rev 1898)
@@ -2,7 +2,7 @@
<form name="comments_form" action="{$url->getIndexUrl()}" method="post">
<div style="width:180px; padding-right:15px; margin-right:15px; float:left; text-align:left; border-right:1px dotted #bbb;">
<label for="subject">{$locale->tr("comment_topic")}:</label><br />
- <input tabindex="1" id="subject" name="commentTopic" /><br /><br />
+ <input tabindex="1" id="subject" name="commentTopic" value="{$topic}" /><br /><br />
<label for="author">{$locale->tr("comment_username")}:</label><br />
<input tabindex="2" id="author" name="userName" /><br /><br />
<label for="email">{$locale->tr("comment_email")}:</label><br />
Modified: plog/trunk/templates/grey/commentform.template
===================================================================
--- plog/trunk/templates/grey/commentform.template 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/templates/grey/commentform.template 2005-04-22 14:01:44 UTC (rev 1898)
@@ -1,6 +1,6 @@
<form action="{$url->getIndexUrl()}" method="post">
<p>
- {$locale->pr("comment_topic")}<br/><input type="text" name="commentTopic" value=""/><br/>
+ {$locale->pr("comment_topic")}<br/><input type="text" name="commentTopic" value="{$topic}"/><br/>
{$locale->pr("comment_text")} <br/><textarea rows="10" cols="37" name="commentText"></textarea><br/>
{$locale->pr("comment_username")}<br/> <input type="text" name="userName" value=""/><br/>
{$locale->pr("comment_email")}<br/> <input type="text" name="userEmail" value=""/><br/>
Modified: plog/trunk/templates/standard/commentform.template
===================================================================
--- plog/trunk/templates/standard/commentform.template 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/templates/standard/commentform.template 2005-04-22 14:01:44 UTC (rev 1898)
@@ -3,7 +3,7 @@
<form id="NewComment" action="{$url->getBaseUrl()}/index.php" method="post">
<fieldset>
<legend>{$locale->tr("add_comment")}</legend>
- <div><label for="commentTopic">{$locale->pr("comment_topic")}</label><input type="text" name="commentTopic" id="commentTopic" value="" /></div>
+ <div><label for="commentTopic">{$locale->pr("comment_topic")}</label><input type="text" name="commentTopic" id="commentTopic" value="{$topic}" /></div>
<div><label for="commentText">{$locale->pr("comment_text")}</label><textarea rows="10" cols="30" name="commentText" id="commentText"></textarea></div>
<div><label for="userName">{$locale->pr("comment_username")}</label><input type="text" name="userName" id="userName" value="" /></div>
<div><label for="userEmail">Email</label><input type="text" name="userEmail" id="userEmail" value="" /></div>
Modified: plog/trunk/templates/standard/footer.template
===================================================================
--- plog/trunk/templates/standard/footer.template 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/templates/standard/footer.template 2005-04-22 14:01:44 UTC (rev 1898)
@@ -23,6 +23,15 @@
</fieldset>
</form>
</div>
+
+ <h2>whatever</h2>
+ <div id="Recently">
+{assign var=blogOwner value=$blog->getOwnerInfo()}
+{if $blogOwner->hasPicture()}
+ {assign var=picture value=$blogOwner->getPicture()}
+ <img src="{$url->resourceDownloadLink($picture)}" alt="My picture!" />
+{/if}
+</div>
<h2>{$locale->tr("calendar")}</h2>
<div id="Calendar">
Modified: plog/trunk/templates/standard-with-plugins/commentform.template
===================================================================
--- plog/trunk/templates/standard-with-plugins/commentform.template 2005-04-22 13:54:44 UTC (rev 1897)
+++ plog/trunk/templates/standard-with-plugins/commentform.template 2005-04-22 14:01:44 UTC (rev 1898)
@@ -3,7 +3,7 @@
<form id="NewComment" name="NewComment" action="{$url->getBaseUrl()}/index.php" method="post">
<fieldset>
<legend>{$locale->tr("add_comment")}</legend>
- <div><label for="commentTopic">{$locale->pr("comment_topic")}</label><input type="text" name="commentTopic" id="commentTopic" value="" /></div>
+ <div><label for="commentTopic">{$locale->pr("comment_topic")}</label><input type="text" name="commentTopic" id="commentTopic" value="{$topic}" /></div>
<div>
<label for="commentText">{$locale->pr("comment_text")}</label><textarea rows="10" cols="30" name="commentText" id="commentText"></textarea>
More information about the pLog-svn
mailing list