Exemplo n.º 1
0
        ?>
 | <?php 
        echo Date::of($post->created)->toLocal('M j, Y g:i:s a');
        ?>
																			</div>
																			<div>
																				<?php 
        echo $post->comment;
        ?>
																			</div>
																			<div style="color: #AAAAAA; font-size: 11px;">
																				<?php 
        $base = rtrim(Request::root(), '/');
        ?>
																				<?php 
        $sef = Route::urlForClient('site', Components\Forum\Models\Post::getInstance($post->id)->link());
        ?>
																				<?php 
        $link = $base . '/' . trim($sef, '/');
        ?>
																				<a href="<?php 
        echo $link;
        ?>
">View this post on <?php 
        echo Config::get('sitename');
        ?>
</a>
																			</div>
																		</div>
																	</td>
																</tr>
Exemplo n.º 2
0
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Forum\Helpers\Permissions::getActions('thread');
$text = ($this->row->parent ? Lang::txt('COM_FORUM_THREADS') : Lang::txt('COM_FORUM_POSTS')) . ': ';
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_FORUM') . ': ' . $text, 'forum.png');
if ($canDo->get('core.edit')) {
    Toolbar::save();
    Toolbar::spacer();
}
Toolbar::cancel();
Toolbar::spacer();
Toolbar::help('post');
$post = new \Components\Forum\Models\Post($this->row);
$create_date = NULL;
if (intval($this->row->created) != 0) {
    $create_date = Date::of($this->row->created)->toSql();
}
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
Exemplo n.º 3
0
				<?php 
if ($this->row->get('parent')) {
    ?>
					<div class="input-wrap">
						<label for="field-title"><?php 
    echo Lang::txt('COM_FORUM_FIELD_PARENT');
    ?>
:</label><br />
						<select name="fields[parent]" id="field-parent">
							<option value="0"><?php 
    echo Lang::txt('COM_FORUM_FIELD_PARENT_SELECT');
    ?>
</option>
							<?php 
    $posts = Components\Forum\Models\Post::all()->whereEquals('thread', $this->row->get('thread'))->ordered()->rows();
    foreach ($posts as $post) {
        if ($post->get('id') == $this->row->get('id')) {
            continue;
        }
        ?>
								<option value="<?php 
        echo $post->id;
        ?>
"<?php 
        if ($this->row->get('parent') == $post->get('id')) {
            echo ' selected="selected"';
        }
        ?>
><?php 
        echo $this->escape(stripslashes($post->get('title')));