Author: mathijshenquet
Date: 2010-02-22 18:48:19 +0100 (Mon, 22 Feb 2010)
New Revision: 28191
Added:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_post_replies.php
plugins/sfDoctrineSimpleForumPlugin/trunk/web/images/alert-overlay.png
plugins/sfDoctrineSimpleForumPlugin/trunk/web/images/gradient-bottom.png
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/actions/actions.class.php
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/lib/BasesfDoctrineSimpleForumActions.class.php
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_forum.php
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/createTopicSuccess.php
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/indexSuccess.php
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/viewBoardSuccess.php
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/viewTopicSuccess.php
plugins/sfDoctrineSimpleForumPlugin/trunk/web/css/default.css
Log:
Fixed some annoyances and improved some things that where allready there
* Importerd external images
* Almost fully I18N
* Recursive replies for idefinite depth
* Works with symfony 1.2
* xhtml valid
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/actions/actions.class.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/actions/actions.class.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/actions/actions.class.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -14,4 +14,4 @@
class sfDoctrineSimpleForumActions extends BasesfDoctrineSimpleForumActions
{
-}
\ No newline at end of file
+}
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/lib/BasesfDoctrineSimpleForumActions.class.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/lib/BasesfDoctrineSimpleForumActions.class.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/lib/BasesfDoctrineSimpleForumActions.class.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -21,10 +21,8 @@
{
public function executeIndex(sfWebRequest $request)
{
- $forums = Doctrine::getTable("sfDoctrineSimpleForumForum")->findAll();
- $this->forums = $forums;
+ $this->forums =
Doctrine::getTable("sfDoctrineSimpleForumForum")->findAll();
}
-
public function executeViewBoard(sfWebRequest $request)
{
// get un-stickied
@@ -74,7 +72,7 @@
$post->save();
// set flash
- $this->getUser()->setFlash("success", "Thank you for
submitting your post!");
+ $this->getUser()->setFlash("success",
$this->getContext()->getI18N()->__("Thank you for submitting your post!", null,
'sfDoctrineSimpleForum'));
// redirect to clear post
$this->redirect(sprintf("@sf_doctrine_simple_forum_view_topic?id=%s&slug=%s",
$this->topic->getId(), $this->topic->getSlug()));
}
@@ -85,7 +83,9 @@
public function executeCreateTopic(sfWebRequest $request)
{
$this->forward404Unless($this->getUser()->isAuthenticated());
+
$this->forum =
Doctrine::getTable("sfDoctrineSimpleForumForum")->findOneById($request->getParameter("id"));
+
$this->forward404Unless($this->forum);
$this->form = new sfDoctrineSimpleForumCreateTopicForm;
@@ -120,8 +120,7 @@
public function executeViewLatestFeed()
{
- $this->latest_posts =
Doctrine_Query::create()->from("sfDoctrineSimpleForumPost
p")->orderBy("p.created_at DESC")->execute();
-
+ $this->latest_posts =
Doctrine_Query::create()->from("sfDoctrineSimpleForumPost
p")->orderBy("p.created_at DESC")->execute();
}
}
\ No newline at end of file
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_forum.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/templates/_forum.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_forum.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -1,7 +1,6 @@
<tr>
<td class="forum_name">
-
- <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/forum_new.gif",
array("style"=>"vertical-align: 50px; float: left; padding-bottom: 20px;
margin-right: 10px;"))?>
+ <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/forum_new.gif",
array("style"=>"vertical-align: 50px; float: left; padding-bottom: 20px;
margin-right: 10px;", "alt"=>'New'))?>
<?php echo link_to($forum->getName(),
'sf_doctrine_simple_forum_view_board', array("id"=>$forum->getId(),
"slug"=>$forum->getSlug())) ?><br />
<?php echo $forum->getDescription() ?>
</td>
@@ -9,10 +8,10 @@
<td class="forum_posts"><?php echo $forum->getPostCount() ?></td>
<td class="forum_recent">
<?php if ($forum->getLastPost()): ?>
- <?php echo image_tag("/sfDoctrineSimpleForumPlugin/images/convo.gif",
array("style"=>"vertical-align: -5px; margin-right: 5px;"))?>
+ <?php echo image_tag("/sfDoctrineSimpleForumPlugin/images/convo.gif",
array("style"=>"vertical-align: -5px; margin-right: 5px;", 'alt'=>'Forum'))?>
<?php echo link_to($forum->getLastPost()->getTopic()->getTitle(),
"sf_doctrine_simple_forum_view_topic",
array("id"=>$forum->getLastPost()->getTopicId(),
"slug"=>$forum->getLastPost()->getTopic()->getSlug() ))?><br />
- by <b><? echo $forum->getLastPost()->getUser()->getUsername()?></b>
+ <?php echo __("by %user%",
array('%user%'=>'<b>'.$forum->getLastPost()->getUser()->getUsername().'</b>'),
'sfDoctrineSimpleForum')?>
<br /><?php echo
timetools::dateTimeDiff($forum->getLastPost()->getCreatedAt('m-d-Y'))?>
- <?php endif;?>
+ <?php endif;?>
</td>
</tr>
\ No newline at end of file
Added:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_post_replies.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_post_replies.php
(rev 0)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/_post_replies.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -0,0 +1,40 @@
+<?php if(count($replies)>0):?>
+<?php foreach($replies as $reply):?>
+<ul class='children'>
+ <li class="comment byuser comment-author-<?php echo
$reply->getUserId()?> odd alt depth-2" id="li-comment-<?php echo
$reply->getId()?>">
+ <div id="comment-<?php echo $reply->getId()?>">
+ <div class="comment-author vcard">
+ <div class="avatar avatar-32">
+ <img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
+ </div>
+ <br />
+ <cite class="fn"><? echo
$reply->getUser()->getUsername() ?></cite> <span class="says"><?php echo
__("says", null, 'sfDoctrineSimpleForum'); ?>:</span><br />
+ </div><img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
+ <div class="comment-meta commentmetadata">
+ <a
href="http://nspeaks.com/32/get-threaded-comments-on-your-blog/#comment-10770"><?php
echo $reply->getCreatedAt('U')?></a>
+ </div>
+ <p><?php echo $reply->getContent()?></p>
+
+ <?php if(!$topic->getIsLocked()):?>
+ <div class="reply">
+ <a rel='nofollow' class='comment-reply-link'
id="reply-link-<?php echo $reply->getId()?>"><?php echo __("Reply", null,
'sfDoctrineSimpleForum'); ?></a>
+ </div>
+ <div id="reply-form-comment-reply-link-<? echo
$reply->getId()?>" style="height: 250px; display:none">
+ <form action="" method="post" class="reply_form">
+ <h4><?php echo __("Leave a Reply", null,
'sfDoctrineSimpleForum'); ?></h4>
+ <p>
+ <?php echo __("Logged in as
%user%", array('%user%'=>'<b>'.$sf_user->getGuardUser()->getUsername().'</b>'),
'sfDoctrineSimpleForum'); ?><br />
+ <textarea name="comment"
class="comment af" cols="50%" rows="8" tabindex="6" ></textarea><br />
+ <input name="submit"
type="submit" value="submit" class="st submit" alt="submit" />
+ <input type='hidden'
name='comment_post_id' value='<?php echo $reply->getId()?>'
class='comment_post_id' />
+ <input type='hidden'
name='comment_parent' class='comment_parent' value='0' />
+ </p>
+ </form>
+ </div>
+ <?php endif;?>
+ <?php include_partial('post_replies',
array('replies'=>$reply->getReplies(), 'topic'=>$topic ))?>
+ </div>
+ </li>
+</ul>
+<?php endforeach;?>
+<?php endif;?>
\ No newline at end of file
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/createTopicSuccess.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/templates/createTopicSuccess.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/createTopicSuccess.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -1,30 +1,31 @@
+<?php use_helper('I18N'); ?>
<ul id="crumbs">
- <li><?php echo link_to("Forum Index",
"sf_doctrine_simple_forum_index")?></li>
+ <li><?php echo link_to(__("Forum Index", null,
'sfDoctrineSimpleForum'), "sf_doctrine_simple_forum_index")?></li>
<li><?php echo link_to($forum->getName(),
"sf_doctrine_simple_forum_view_board", array("id"=>$forum->getId(),
"slug"=>$forum->getSlug()))?></li>
- <li>Create Topic</li>
+ <li><?php echo __("Create Topic", null,
'sfDoctrineSimpleForum'); ?></li>
</ul>
<form method="POST" action=""
name="sf_doctrine_simple_forum_create_topicc"
id="sf_doctrine_simple_forum_create_topicc">
- <br />
- <h3 class="toolbar"
style="clear:both">Create a thread</h3>
- <div class="info">Please make
sure all the fields are filled in. <br />The fields marked with an asterisk(*)
are required. </div>
- <dl class="list_form">
- <dt>
- <label>Topic
Title:*:</label>
- </dt>
- <dd>
- <?php echo
$form['title']->renderError()?>
- <?php echo
$form['title']->render()?>
- <span
class="hint">Please choose a topic name. Please try and keep it as short and
concise as possible.<span class="hint-pointer"> </span></span>
- </dd>
- <dt>
-
<label>Content:</label>
- </dt>
- <dd>
- <?php echo
$form['content']->renderError()?>
- <?php echo
$form['content']->render()?>
- <span
class="hint">Please enter in some content for the thread. Please make sure it's
more than 50 characters in length..<span
class="hint-pointer"> </span></span>
- </dd>
- </dl>
- <a href="#" class="awesome"
onClick="document.sf_doctrine_simple_forum_create_topicc.submit()">Create
Topic</a>
+ <br />
+ <h3 class="toolbar" style="clear:both"><?php echo __("Create a
thread", null, 'sfDoctrineSimpleForum'); ?></h3>
+ <div class="info"><?php echo __("Please make sure all the
fields are filled in.", null, 'sfDoctrineSimpleForum'); ?></div>
+ <dl class="list_form">
+ <dt>
+ <label><?php echo __("Topic Title", null,
'sfDoctrineSimpleForum'); ?>:</label>
+ </dt>
+ <dd>
+ <?php echo $form['title']->renderError()?>
+ <?php echo $form['title']->render()?>
+ <span class="hint"><?php echo __("Please choose
a topic name. Please try and keep it as short and concise as possible.", null,
'sfDoctrineSimpleForum'); ?><span class="hint-pointer"> </span></span>
+ </dd>
+ <dt>
+ <label><?php echo __("Content", null,
'sfDoctrineSimpleForum'); ?>:</label>
+ </dt>
+ <dd>
+ <?php echo $form['content']->renderError()?>
+ <?php echo $form['content']->render()?>
+ <span class="hint"><?php echo __("Please enter
in some content for the thread. Please make sure it's more than 50 characters
in length..", null, 'sfDoctrineSimpleForum'); ?><span
class="hint-pointer"> </span></span>
+ </dd>
+ </dl>
+ <a href="#" class="awesome"
onClick="document.sf_doctrine_simple_forum_create_topicc.submit()"><?php echo
__("Create Topic", null, 'sfDoctrineSimpleForum'); ?></a>
</form>
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/indexSuccess.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/templates/indexSuccess.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/indexSuccess.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -1,21 +1,21 @@
- <?php use_helper("Date")?>
- <h3 class="toolbar">Welcome to the forum!</h3>
- <div style="float: right"><?php echo link_to("View Latest Feed " .
image_tag("/sfDoctrineSimpleForumPlugin/images/feed-icon.png",
array("style"=>"border: 0;")), "sf_doctrine_simple_forum_view_latest_feed",
array("class"=>"feed"))?></div><br /><br />
+ <?php use_helper("Date", "I18N")?>
+ <h3 class="toolbar"><?php echo __("Welcome to the forum!", null,
'sfDoctrineSimpleForum'); ?></h3>
+ <div style="float: right"><?php echo link_to(__("View Latest Feed ", null,
'sfDoctrineSimpleForum') .
image_tag("/sfDoctrineSimpleForumPlugin/images/feed-icon.png",
array("style"=>"border: 0;", 'alt'=>'Feed')),
"sf_doctrine_simple_forum_view_latest_feed", array("class"=>"feed"))?></div><br
/><br />
<table id="thread_table">
<thead>
- <tr>
- <th class="forum_name"><?php echo __('Forum', null,
'sfDoctrineSimpleForum') ?></th>
- <th class="forum_threads"><?php echo __('Topics', null,
'sfDoctrineSimpleForum') ?></th>
- <th class="forum_posts"><?php echo __('Messages', null,
'sfDoctrineSimpleForum') ?></th>
- <th class="forum_recent"><?php echo __('Last Post', null,
'sfDoctrineSimpleForum') ?></th>
- </tr>
+ <tr>
+ <th class="forum_name"><?php echo __('Forum', null,
'sfDoctrineSimpleForum') ?></th>
+ <th class="forum_threads"><?php echo __('Topics', null,
'sfDoctrineSimpleForum') ?></th>
+ <th class="forum_posts"><?php echo __('Messages', null,
'sfDoctrineSimpleForum') ?></th>
+ <th class="forum_recent"><?php echo __('Last Post', null,
'sfDoctrineSimpleForum') ?></th>
+ </tr>
</thead>
<tbody>
<?php foreach ($forums as $forum): ?>
<tr class="category">
<td class="category_header"
colspan="4"><?=$forum->getCategories()->getName() ?></td>
</tr>
- <?php include_partial('sfDoctrineSimpleForum/forum', array('forum' =>
$forum)) ?>
+ <?php include_partial('forum', array('forum' => $forum)) ?>
<?php endforeach; ?>
</tbody>
</table>
\ No newline at end of file
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/viewBoardSuccess.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/templates/viewBoardSuccess.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/viewBoardSuccess.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -1,63 +1,65 @@
- <h3 class="toolbar"><?php echo $forum->getName()?></h3>
- <p><?php echo $forum->getDescription() ?></p>
- <ul id="crumbs">
- <li><?php echo link_to("Forum Index",
"sf_doctrine_simple_forum_index")?></li>
- <li><?php echo $forum->getName(); ?></li>
- </ul>
+<?php use_helper('I18N'); ?>
+
+<h3 class="toolbar"><?php echo $forum->getName()?></h3>
+<p><?php echo $forum->getDescription() ?></p>
+<ul id="crumbs">
+ <li><?php echo link_to("Forum Index",
"sf_doctrine_simple_forum_index")?></li>
+ <li><?php echo $forum->getName(); ?></li>
+</ul>
<br />
+
<?php if(count($board)==0 && $sf_user->isAuthenticated()):?>
- <div class="info">Oooops! There are no topics for this board. <br />Why
not create one?</div>
+ <div class="info"><?php echo __("Oooops! There are no topics for this
board. ", null, 'sfDoctrineSimpleForum')?><br /><?php echo __("Why not create
one?", null, 'sfDoctrineSimpleForum')?></div>
<?php endif?>
+
<table id="thread_table">
- <thead>
- <tr>
- <th>Thread</th>
- <th>Posts</th>
- <th>Views</th>
- <th>Last Post</th>
- </tr>
- </thead>
- <tbody>
- <?php if(count($stickies)>0):?>
- <?php foreach($stickies as $topic):?>
- <tr>
- <td style="width: 70%">
- <?php if($topic->getIsLocked()):?>
- <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/thread_lock.gif",
array("style"=>"vertical-align: -8px; margin-right: 5px;"))?>
- <?php endif;?>
- <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/sticky.gif",
array("style"=>"vertical-align: -3px; margin-right: 5px;"))?>
- <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/new.gif",
array("style"=>"vertical-align: -3px; margin-right: 5px;"))?>
- <b>Sticky: <?php echo
link_to($topic->getTitle(), "sf_doctrine_simple_forum_view_topic",
array("id"=>$topic->getId(), "slug"=>$topic->getSlug()))?></td></b>
- <td><?php echo $topic->getPostCount()?></td>
- <td><?php echo $topic->getNbViews()?>
- <td>by <b><?php echo
$topic->getLastPost()->getUser()->getUsername()?></b><br />
- <?php echo
timetools::dateTimeDiff($topic->getLastPost()->getCreatedAt());?>
- </td>
- </tr>
- <?php endforeach;?>
- <?php endif?>
-
- <?php if(count($board)>0):?>
- <?php foreach($board as $topic):?>
- <tr>
- <td style="width:450px">
- <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/new.gif",
array("style"=>"vertical-align: -2px; margin-right: 5px;"))?>
- <b><?php echo
link_to($topic->getTitle(), "sf_doctrine_simple_forum_view_topic",
array("id"=>$topic->getId(), "slug"=>$topic->getSlug()))?></b>
- <br><?php echo
$topic->getUser()->getUsername()?>
-
- </td>
- <td><?php echo $topic->getPostCount()?></td>
- <td><?php echo $topic->getNbViews()?></td>
- <td>by <b><?php echo
$topic->getLastPost()->getUser()->getUsername()?></b><br />
- <?php echo
timetools::dateTimeDiff($topic->getLastPost()->getCreatedAt());?>
- </td>
- </tr>
- <?php endforeach;?>
- <?php endif?>
- </tbody>
-
+ <thead>
+ <tr>
+ <th><?php echo __("Thread", null,
'sfDoctrineSimpleForum')?></th>
+ <th><?php echo __("Posts", null,
'sfDoctrineSimpleForum')?></th>
+ <th><?php echo __("Views", null,
'sfDoctrineSimpleForum')?></th>
+ <th><?php echo __("Last Post", null,
'sfDoctrineSimpleForum')?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php if(count($stickies)>0):?>
+ <?php foreach($stickies as $topic):?>
+ <tr>
+ <td style="width: 70%">
+ <?php if($topic->getIsLocked()):?>
+ <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/thread_lock.gif",
array("style"=>"vertical-align: -8px; margin-right: 5px;", "alt"=>"Lock"))?>
+ <?php endif;?>
+ <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/sticky.gif",
array("style"=>"vertical-align: -3px; margin-right: 5px;", "alt"=>"Sticky"))?>
+ <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/new.gif",
array("style"=>"vertical-align: -3px; margin-right: 5px;", "alt"=>"New"))?>
+ <b><?php echo __("Sticky", null,
'sfDoctrineSimpleForum')?>: <?php echo link_to($topic->getTitle(),
"sf_doctrine_simple_forum_view_topic", array("id"=>$topic->getId(),
"slug"=>$topic->getSlug()))?></b>
+ </td>
+ <td><?php echo $topic->getPostCount()?></td>
+ <td><?php echo $topic->getNbViews()?></td>
+ <td>by <b><?php echo
$topic->getLastPost()->getUser()->getUsername()?></b><br />
+ <?php echo
timetools::dateTimeDiff($topic->getLastPost()->getCreatedAt());?>
+ </td>
+ </tr>
+ <?php endforeach;?>
+ <?php endif?>
+ <?php if(count($board)>0):?>
+ <?php foreach($board as $topic):?>
+ <tr>
+ <td style="width:450px">
+ <?php echo
image_tag("/sfDoctrineSimpleForumPlugin/images/new.gif",
array("style"=>"vertical-align: -2px; margin-right: 5px;", "alt"=>"New"))?>
+ <b><?php echo link_to($topic->getTitle(),
"sf_doctrine_simple_forum_view_topic", array("id"=>$topic->getId(),
"slug"=>$topic->getSlug()))?></b>
+ <br /><?php echo
$topic->getUser()->getUsername()?>
+ </td>
+ <td><?php echo $topic->getPostCount()?></td>
+ <td><?php echo $topic->getNbViews()?></td>
+ <td><?php echo __("door %user%",
array('%user%'=>'<b>'.$topic->getLastPost()->getUser()->getUsername().'</b>'),
'sfDoctrineSimpleForum')?><br />
+ <?php echo
timetools::dateTimeDiff($topic->getLastPost()->getCreatedAt());?>
+ </td>
+ </tr>
+ <?php endforeach;?>
+ <?php endif?>
+ </tbody>
</table>
<?php if($sf_user->isAuthenticated()):?>
-<? echo link_to("Create Topic", "sf_doctrine_simple_forum_create_topic",
array("id"=>$forum->getId()), array("class"=>"medium awesome"))?>
+<? echo link_to(__("Create Topic", null, 'sfDoctrineSimpleForum'),
"sf_doctrine_simple_forum_create_topic", array("id"=>$forum->getId()),
array("class"=>"medium awesome"))?>
<?php endif;?>
\ No newline at end of file
Modified:
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/viewTopicSuccess.php
===================================================================
---
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForum/templates/viewTopicSuccess.php
2010-02-22 03:44:54 UTC (rev 28174)
+++
plugins/sfDoctrineSimpleForumPlugin/trunk/modules/sfDoctrineSimpleForumTesting/templates/viewTopicSuccess.php
2010-02-22 17:48:19 UTC (rev 28191)
@@ -1,10 +1,8 @@
-<?php use_helper("Date")?>
+<?php use_helper("Date", "I18N", "Javascript")?>
+<?php echo javascript_tag('
+$(function(){
-<script type="text/javascript">
-
-$(document).ready(function(){
-
$(".comment-reply-link").click(function(){
$(".comment-reply.link").html();
var reply_el = "#reply-form-comment-" + this.id;
@@ -13,11 +11,10 @@
});
});
- </script>
+'); ?>
- <div id="respond" style="display:none">
+<div id="respond" style="display:none">
-
</div>
<h3 class="toolbar"><?php echo $topic->getTitle()?></h3>
<ul id="crumbs">
@@ -29,7 +26,7 @@
<?php if($topic->getIsLocked()):?>
<p class="notice">
<?php echo image_tag("/sfDoctrineSimpleForumPlugin/images/lock.png",
array("style"=>"vertical-align: -3px; margin-right: 5px;"))?>
- This thread is closed for posting.
+ <?php echo __("This thread is closed for posting.", null,
'sfDoctrineSimpleForum'); ?>
</p>
<?php endif;?>
<?php if($sf_user->hasFlash('success')): ?>
@@ -38,139 +35,56 @@
</p>
<?php endif; ?>
- <ol class="commentlist">
+<ol class="commentlist">
<?php $count = 0 ?>
<?php foreach($topic->getUnrepliedPosts() as $post):?>
<?php $count ++ ?>
<li class="comment even thread-even depth-1 <?php echo (!($count % 2))?
"odd" : ""?>" id="li-comment-<?php echo $post->getId()?>">
<div id="comment-<?php echo $post->getId()?>">
<div class="comment-author vcard">
- <img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
- <cite class="fn"><? echo
$post->getUser()->getUsername() ?></cite> <span class="says">says:</span>
<br />
- </div>
+ <div class="avatar avatar-32">
+ <img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
+ </div>
+ <br />
+ <cite class="fn"><? echo
$post->getUser()->getUsername() ?></cite> <span class="says"><?php echo
__("says", null, 'sfDoctrineSimpleForum'); ?>:</span><br />
+ </div><img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
<div class="comment-meta commentmetadata">
- <a
href="http://nspeaks.com/32/get-threaded-comments-on-your-blog/#comment-9471"><?php
echo $post->getCreatedAt('U')?></a>
+ <a
href="http://nspeaks.com/32/get-threaded-comments-on-your-blog/#comment-10770"><?php
echo $post->getCreatedAt('U')?></a>
</div>
- <p><?php echo $post->getContent() ?></p>
+ <p><?php echo $post->getContent()?></p>
+
<?php if(!$topic->getIsLocked()):?>
<div class="reply">
- <a rel='nofollow' class='comment-reply-link'
id="reply-link-<?php echo $post->getId()?>">Reply</a> </div>
- <div id="reply-form-comment-reply-link-<? echo
$post->getId()?>" style="height: 250px; display:none">
- <form action="" method="post" id="reply_form">
- <br />
- <h4>Leave a Reply</h4>
- <p>Logged in as
<b><?php echo $sf_user->getGuardUser()->getUsername()?></b></p>
- <p>
- <textarea
name="comment" id="comment" cols="50%" rows="8" class="af" tabindex="6"
></textarea>
- </p>
- <input name="submit"
type="submit" class="st" value="submit" id="submit" alt="submit" />
- <input type='hidden'
name='comment_post_id' value='<?php echo $post->getId()?>' id='comment_post_id'
/>
- <input type='hidden'
name='comment_parent' id='comment_parent' value='0' />
- </form>
- </div>
+ <a rel='nofollow' class='comment-reply-link'
id="reply-link-<?php echo $post->getId()?>"><?php echo __("Reply", null,
'sfDoctrineSimpleForum'); ?></a>
+ </div>
+ <div id="reply-form-comment-reply-link-<? echo
$post->getId()?>" style="height: 250px; display:none">
+ <form action="" method="post" class="reply_form">
+ <h4><?php echo __("Leave a Reply",
null, 'sfDoctrineSimpleForum'); ?></h4>
+ <p>
+ <?php echo __("Logged in as
%user%", array('%user%'=>'<b>'.$sf_user->getGuardUser()->getUsername().'</b>'),
'sfDoctrineSimpleForum'); ?><br />
+ <textarea name="comment"
class="comment af" cols="50%" rows="8" tabindex="6" ></textarea><br />
+ <input name="submit"
type="submit" value="submit" class="st submit" alt="submit" />
+ <input type='hidden'
name='comment_post_id' value='<?php echo $post->getId()?>'
class='comment_post_id' />
+ <input type='hidden'
name='comment_parent' class='comment_parent' value='0' />
+ </p>
+ </form>
+ </div>
<?php endif;?>
- </div>
- <?php if(count($post->getReplies())>0):?>
- <?php foreach($post->getReplies() as $reply):?>
- <ul class='children'>
- <li class="comment byuser
comment-author-<?php echo $reply->getUserId()?> odd alt depth-2"
id="li-comment-<?php echo $reply->getId()?>">
- <div id="comment-<?php echo
$reply->getId()?>">
- <div class="comment-author
vcard">
- <div class="avatar avatar-32">
- <img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
- </div>
- <cite class="fn"><?php
echo $reply->getUser()->getUsername()?></cite> <span class="says">says:</span>
<br />
- </div>
- <br />
- <div class="comment-meta
commentmetadata"><a
href="http://nspeaks.com/32/get-threaded-comments-on-your-blog/#comment-10770"><?php
echo $reply->getCreatedAt()?></a></div>
- <p><?php echo
$reply->getContent()?></p>
- <?php
if(!$topic->getIsLocked()):?>
- <div class="reply">
- <a rel='nofollow'
class='comment-reply-link' id="reply-link-<?php echo
$reply->getId()?>">Reply</a> </div>
- <div
id="reply-form-comment-reply-link-<? echo $reply->getId()?>" style="height:
250px; display:none">
- <form action=""
method="post" id="reply_form">
-
<br />
-
<h4>Leave a Reply</h4>
-
<p>Logged in as <b><?php echo
$sf_user->getGuardUser()->getUsername()?></b></p>
-
<p>
-
<textarea name="comment" id="comment" cols="50%" rows="8"
class="af" tabindex="6" ></textarea>
-
</p>
-
<input name="submit" type="submit" class="st" value="submit" id="submit"
alt="submit" />
-
<input type='hidden' name='comment_post_id' value='<?php echo
$reply->getId()?>' id='comment_post_id' />
-
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />
-
</form>
- </div>
- <?php endif;?>
- <?php
if(count($reply->getReplies())>0):?>
- <?php
foreach($reply->getReplies() as $reply):?>
- <ul class='children'>
- <li
class="comment byuser comment-author-<?php echo $reply->getUserId()?> odd alt
depth-3" id="li-comment-<?php echo $reply->getId()?>">
- <div
id="comment-<?php echo $reply->getId()?>">
- <div
class="comment-author vcard">
- <div
class="avatar avatar-32">
-
<img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
- </div>
- <cite
class="fn"><?php echo $reply->getUser()->getUsername()?></cite> <span
class="says">says:</span> <br />
- </div>
- <br />
- <div
class="comment-meta commentmetadata"><a
href="http://nspeaks.com/32/get-threaded-comments-on-your-blog/#comment-10770"><?php
echo $reply->getCreatedAt()?></a></div>
- <p><?php echo
$reply->getContent()?></p>
- <?php
if(!$topic->getIsLocked()):?>
- <div
class="reply">
- <a
rel='nofollow' class='comment-reply-link' id="reply-link-<?php echo
$reply->getId()?>">Reply</a> </div>
- <div
id="reply-form-comment-reply-link-<? echo $reply->getId()?>" style="height:
250px; display:none">
-
<form action="" method="post" id="reply_form">
-
<br />
-
<h4>Leave a Reply</h4>
-
<p>Logged in as <b><?php echo
$sf_user->getGuardUser()->getUsername()?></b></p>
-
<p>
-
<textarea name="comment" id="comment"
cols="50%" rows="8" class="af" tabindex="6" ></textarea>
-
</p>
-
<input name="submit" type="submit" class="st" value="submit"
id="submit" alt="submit" />
-
<input type='hidden' name='comment_post_id' value='<?php echo
$reply->getId()?>' id='comment_post_id' />
-
<input type='hidden' name='comment_parent' id='comment_parent'
value='0' />
-
</form>
- </div>
- <?php
endif;?>
- <?php
if(count($reply->getReplies())>0):?>
- <?php
foreach($reply->getReplies() as $reply):?>
- <ul
class='children'>
-
<li class="comment byuser comment-author-<?php echo $reply->getUserId()?> odd
alt depth-4" id="li-comment-<?php echo $reply->getId()?>">
-
<div id="comment-<?php echo $reply->getId()?>">
-
<div class="comment-author vcard">
-
<div class="avatar avatar-32">
-
<img alt=''
src='http://www.gravatar.com/avatar/86d4d7ab1f67a450b74b7ec8a85cb759?s=32&d=%3Cpath_to_url%3E&r=G'
class='avatar avatar-32 photo' height='32' width='32' />
-
</div>
-
<cite class="fn"><?php echo $reply->getUser()->getUsername()?></cite>
<span class="says">says:</span> <br />
-
</div>
-
<br />
- <div
class="comment-meta commentmetadata"><a
href="http://nspeaks.com/32/get-threaded-comments-on-your-blog/#comment-10770"><?php
echo $reply->getCreatedAt()?></a></div>
-
<p><?php echo $reply->getContent()?></p>
-
</div>
- </ul>
- <?php
endforeach;?>
- <?php endif;?>
- </ul>
- <?php endforeach;?>
- <?php endif?>
- </ul>
- <?php endforeach;?>
- <?php endif;?>
- </li>
+ </div>
+ <?php include_partial('post_replies',
array('replies'=>$post->getReplies(), 'topic'=>$topic)); ?>
+ </li>
<?endforeach; ?>
- </ol>
-<?php if($sf_user->isAuthenticated()):?>
- <?php if(!$topic->getIsLocked()):?>
- <form method="POST" action="">
- <h3>Reply</h3>
+</ol>
+<?php if($sf_user->isAuthenticated() && !$topic->getIsLocked()):?>
+ <form method="post" action="">
+ <h3><?php echo __("Reply", null, 'sfDoctrineSimpleForum');
?></h3>
<ul style="list-style-type: none">
- <li><?=textarea_tag("thread_reply", '', array("style"=>"height:
75px;")) ?></li>
- <li><button type="submit">Do Reply</button></li>
+ <li><textarea rows="10" cols="10" name="thread_reply"
style="height: 75px"></textarea></li>
+ <li><button type="submit"><?php echo __("Do Reply", null,
'sfDoctrineSimpleForum'); ?></button></li>
</ul>
</form>
- <?php endif;?>
<?php endif?>
Modified: plugins/sfDoctrineSimpleForumPlugin/trunk/web/css/default.css
===================================================================
--- plugins/sfDoctrineSimpleForumPlugin/trunk/web/css/default.css
2010-02-22 16:59:51 UTC (rev 28190)
+++ plugins/sfDoctrineSimpleForumPlugin/trunk/web/css/default.css
2010-02-22 17:48:19 UTC (rev 28191)
@@ -4,7 +4,7 @@
/* Awesome Buttons */
.awesome, .awesome:visited {
- background: #222 url(http://zurb.com/images/alert-overlay.png)
repeat-x;
+ background: #222 url(../images/alert-overlay.png) repeat-x;
display: inline-block;
padding: 5px 10px 6px;
color: #fff;
@@ -40,7 +40,7 @@
#thread_table th {
- background:#EEEEEE
url(http://mootools.net/assets/images/gradient-bottom.png) repeat-x scroll left
bottom;
+ background:#EEEEEE url(../images/gradient-bottom.png) repeat-x
scroll left bottom;
border-bottom:1px solid #D4D4D4;
color:#686C70;
padding-top:0.6em;
Added: plugins/sfDoctrineSimpleForumPlugin/trunk/web/images/alert-overlay.png
===================================================================
(Binary files differ)
Property changes on:
plugins/sfDoctrineSimpleForumPlugin/trunk/web/images/alert-overlay.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: plugins/sfDoctrineSimpleForumPlugin/trunk/web/images/gradient-bottom.png
===================================================================
(Binary files differ)
Property changes on:
plugins/sfDoctrineSimpleForumPlugin/trunk/web/images/gradient-bottom.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
--
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.