Пример #1
0
Файл: main.php Проект: anqh/anqh
 /**
  * Render content.
  *
  * @return  string
  */
 public function content()
 {
     ob_start();
     if ($this->event->info) {
         echo BB::factory($this->event->info)->render();
     }
     return ob_get_clean();
 }
Пример #2
0
 public function addNode($name, $parent_id, $description = FALSE, $suspend = FALSE, $locked = FALSE, $position = FALSE, $is_link = FALSE, $link_href = FALSE, $private = FALSE, $password = FALSE)
 {
     $stack = $this->getForums();
     $name = BB::Open($name, FALSE, TRUE, FALSE)->Execute();
     $description = isset($description) ? BB::Open($description)->Execute() : NULL;
     $suspend = isset($suspend) ? intval($suspend) : 0;
     $lock = isset($locked) ? intval($locked) : 0;
     $link_href = isset($link_href) ? $link_href : '';
     $password = isset($password) ? $password : '';
     $parent = $this->dba->GetRow("SELECT * FROM " . FORUMS . " WHERE id = {$parent_id}");
     if ($parent_id != 1) {
         if (($parent['row_right'] - $parent['row_left'] - 1) / 2 > 0) {
             $left = $parent['row_right'];
         } else {
             if ($this->getNumOnLevel($parent_id) > 0) {
                 $left = $parent['row_right'];
             } else {
                 $left = $parent['row_left'] + 1;
             }
         }
         $depth = $parent['row_level'] + 1;
         $right = $left + 1;
         /* Auto set the order for this node */
         if ($depth > 1) {
             $top = $this->dba->GetRow("SELECT * FROM " . FORUMS . " WHERE row_right <= {$left} ORDER BY row_left ASC LIMIT 1");
             $temp_order = $this->dba->GetValue("SELECT MAX(f_order) FROM " . FORUMS . " WHERE row_left >= " . $top['row_left'] . " AND row_right <= " . $top['row_right']);
         }
         $order = $temp_order == 0 ? 1 : $temp_order + 1;
         $position = $position != FALSE ? intval($position) : $order;
         try {
             @$this->dba->Query("UPDATE " . FORUMS . " SET row_right = row_right+2, subforums = subforums+1 WHERE row_left < {$left} AND row_right >= {$left}");
             // Good
             @$this->dba->Query("UPDATE " . FORUMS . " SET row_left = row_left+2, row_right=row_right+2 WHERE row_left >= {$left}");
             // Good
             @$this->dba->Query("INSERT INTO " . FORUMS . " (row_left, row_right, name, description, parent_id, row_level, f_order, suspend, row_lock, is_link, link_href, private, pass) VALUES ({$left}, {$right}, '{$name}', '{$description}', {$parent_id}, {$depth}, {$position}, {$suspend}, {$lock}, {$is_link}, '{$link_href}', {$private}, '{$password}')");
         } catch (DBA_Exception $e) {
             exit('<pre>' . $e->getMessage() . '</pre>');
         }
     } else {
         $right = $this->dba->GetValue("SELECT row_right FROM " . FORUMS . " WHERE row_left = 1") - 1;
         $last_child = $this->dba->GetRow("SELECT * FROM " . FORUMS . " WHERE row_right = {$right}");
         if (is_array($last_child) && !empty($last_child)) {
             $left = $last_child['row_right'] + 1;
             $right = $left + 1;
         } else {
             $left = 2;
             $right = 3;
         }
         $depth = 1;
         $temp_order = $this->dba->GetValue("SELECT MAX(f_order) FROM " . FORUMS . " WHERE row_level = 1");
         $order = !$temp_order ? 1 : $temp_order + 1;
         $this->dba->Query("UPDATE " . FORUMS . " SET row_right = row_right+2 WHERE row_left = 1");
         $this->dba->Query("INSERT INTO " . FORUMS . " (name, row_left, row_right, parent_id, row_level, f_order) VALUES ('{$name}', {$left}, {$right}, {$parent_id}, {$depth}, {$order})");
     }
     return TRUE;
 }
Пример #3
0
 function out($text)
 {
     $text = str_replace(array('$'), array('&#036;'), $text);
     if (substr_count($text, '[q]') == substr_count($text, '[/q]')) {
         $text = str_replace(array('[q]', '[/q]'), array('<span class="quote">', '</span>'), $text);
     }
     $text = preg_replace_callback('|\\[code\\]([\\s\\S]+)\\[/code\\]|mU', function ($m) {
         return BB::hightlight($m[1]);
     }, $text);
     $text = preg_replace($this->bb_search, $this->bb_replace, $text);
     return $text;
 }
Пример #4
0
Файл: main.php Проект: anqh/anqh
 /**
  * Render content.
  *
  * @return  string
  */
 public function content()
 {
     ob_start();
     if ($this->track->description) {
         echo BB::factory($this->track->description)->render();
     }
     if ($this->track->tracklist) {
         echo '<h3>Tracklist</h3>';
         echo Text::auto_p(HTML::chars($this->track->tracklist));
     }
     return ob_get_clean();
 }
Пример #5
0
Файл: day.php Проект: anqh/anqh
 /**
  * Render content.
  *
  * @return  string
  */
 public function content()
 {
     // Show limited amount of data
     $info = Text::limit_chars($this->event->info, 300);
     $show_more = $info != $this->event->info;
     // Max 3 lines
     $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $info), 3);
     $show_more = $show_more || count($lines) == 3;
     if (count($lines) > 2) {
         $lines[2] .= '…';
     }
     $info = implode("\n", $lines);
     return '<div class="djs">' . BB::factory($info)->render(null, true) . '</div>';
 }
Пример #6
0
    /**
     * Render content.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        if ($this->event->dj) {
            ?>

<div class="dj">
	<h3><?php 
            echo __('Line-up');
            ?>
</h3>

	<?php 
            echo Text::auto_p(HTML::chars($this->event->dj));
            ?>
</div>

<?php 
        }
        if ($this->event->info) {
            ?>

<div class="extra-info">
	<h3><?php 
            echo __('Extra info');
            ?>
</h3>

	<?php 
            echo BB::factory($this->event->info)->render();
            ?>
</div>

<?php 
        }
        return ob_get_clean();
    }
Пример #7
0
			<br />
			<?php 
    echo __('Edited :ago ago', array(':ago' => html::time(date::timespan_short($post->modified), $post->modified)));
    ?>
			<?php 
}
?>
			<?php 
if ($post->parent_id) {
    $parent_topic = $post->parent->forum_topic;
    ?>
			<br />
			<?php 
    echo __('Replying to :parent', array(':parent' => html::anchor(url::model($parent_topic) . '/' . $post->parent_id . '#post-' . $post->parent_id, text::title($parent_topic->name))));
    ?>
			<?php 
}
?>
			</span>

		</header>

		<section class="post-content">

<?php 
echo BB::factory($post->post)->render();
?>

		</section>
	</article>
Пример #8
0
                    for ($index = 1; $index < $totalImage; $index++) {
                        $headManga .= '<option value="' . ($index + 1) . '">' . $index . '</option>';
                    }
                    $headManga .= '</select> (of ' . ($totalImage - 1) . ' pages)</strong><br/><br/>';
                    echo '<a href="' . $reqPath->SetRequest(1, $reqPath->Level(1)) . '"><center><h2>' . $reqPath->Level(1) . '</h2></center></a>' . $headManga;
                    echo '<span style="font-size:11px;">(<strong>NextPage:</strong> Left-click on image. OR Press right Arrow-Key. / ';
                    echo '<strong>BackPage:</strong> Right-click on the image. OR Press left Arrow-Key.)</span><br/><br/>';
                    echo '<div id="block-selected">' . $HaKko->BoxManga('&nbsp;') . '</div>';
                } else {
                    $errorPage = '<h5>' . BB::Code(_ERROR_LINE1) . '</h5>';
                    $errorPage .= '<font size="+1"><br/><strong>' . BB::Code(_ERROR_LINE2) . '</strong>';
                    $errorPage .= '<br/><br/><br/><br/><strong>' . BB::Code(_ERROR_LINE3) . '</strong></font>';
                    $errorPage .= '<ul><strong>' . _ERROR_LINE4 . '</strong><a href="' . $reqPath->SetRequest(1, $reqPath->Level(1)) . '">' . _ERROR_LINE5 . '</a><br/><br/><br/>';
                    $errorPage .= '</ul><hr/><div align="right"><span id="last-chapter"><u>' . _HEAD_TITLE . '</u> <strong>Engine</strong>.</span></div><br/>';
                    echo $HaKko->BoxFull($errorPage, 0);
                }
            } else {
                $errorPage = '<h5>' . BB::Code(_ERROR_LINE1) . '</h5>';
                $errorPage .= '<font size="+1"><br/><strong>' . BB::Code(_ERROR_LINE2) . '</strong>';
                $errorPage .= '<br/><br/><br/><br/><strong>' . BB::Code(_ERROR_LINE3) . '</strong></font>';
                $errorPage .= '<ul><strong>' . _ERROR_LINE4 . '</strong><a href="' . $reqPath->SetRequest(0, '') . '">' . _ERROR_LINE5 . '</a><br/><br/><br/>';
                $errorPage .= '</ul><hr/><div align="right"><span id="last-chapter"><u>' . _HEAD_TITLE . '</u> <strong>Engine</strong>.</span></div><br/>';
                echo $HaKko->BoxFull($errorPage, 0);
            }
        }
    }
}
?>
</div>
<div id="hakko-credit"><div id="hakko-credit-img">&nbsp;</div></div>
</div></div></center>
Пример #9
0
    }
    foreach (parent::ViewTableWhere('blog_comment', 'blogid', $blogEngine->GetBlogID($path->Level(2)), 'commentid DESC', 20) as $comment) {
        echo '<div class="comment-list"><div class="comment-name"><strong>' . $comment['name'] . '</strong><font size="1"> on ';
        $totalcDays = LastDays($_SERVER['REQUEST_TIME']);
        $totalmDays = LastDays($comment['created']);
        if ($totalcDays - $totalmDays == 0) {
            echo 'Today';
        } else {
            if ($totalcDays - $totalmDays == 1) {
                echo 'Yesterday';
            } else {
                echo 'Last ' . ($totalcDays - $totalmDays) . ' Days';
            }
        }
        echo '</font></div><div class="comment-text">';
        echo BB::Code($comment['comment']);
        echo '</div></div>';
    }
    echo '</div></td><td valign="top"><table width="95%" align="center" border="0" cellpadding="2" cellspacing="0"><tr><td align="right">';
    echo '<strong>Name: </strong></td><td align="left">';
    echo '<input id="name-comment" type="text" maxlength="20" size="20" value="" /></td></tr><tr><td align="right" valign="top">';
    echo '<strong>Comment: </strong></td><td align="left">';
    echo '<textarea id="text-comment" cols="60" rows="8"></textarea></td></tr><tr><td align="center" valign="top" colspan="2">';
    echo '<input id="submit-comment" type="submit" value="COMMENT"/></td></tr></table>';
    echo '</td></tr></table>';
}
?>



Пример #10
0
 public function Execute(Template $template, Session $session, $request)
 {
     /* Create the ancestors bar (if we run into any trouble */
     $template = CreateAncestors($template, $template['L_POSTREPLY']);
     /* Open a connection to the database */
     $this->dba = DBA::Open();
     /* Set the a variable to this user's permissions and id */
     $user_perms = isset($session['user']['perms']) ? $session['user']['perms'] : ALL;
     $user_id = $session['user']['id'];
     /* Get our parent forum */
     try {
         @($post = $this->dba->GetRow("SELECT * FROM " . POSTS . " WHERE id = " . intval($request['post_id'])));
         @($thread = $this->dba->GetRow("SELECT * FROM " . POSTS . " WHERE row_left <= " . $post['row_left'] . " AND row_right >= " . $post['row_right']));
     } catch (DBA_Exception $e) {
         return new TplException($e, $template);
     }
     /* Parse the Message */
     $request['message'] = BB::Open($request['message'])->Execute();
     /* Quote all of the REQUEST variables */
     foreach ($request as $key => $val) {
         $request[$key] = $this->dba->Quote($val);
     }
     /* Set the post icon */
     if (isset($request['posticon']) && intval($request['posticon']) != 0 && $request['posticon'] != '-1') {
         try {
             $posticon = $this->dba->GetValue("SELECT image FROM " . POSTICONS . " WHERE id = " . intval($request['posticon']));
         } catch (DBA_Exception $e) {
             return new TplException($e, $template);
         }
     } else {
         $posticon = 'clear.gif';
     }
     if (is_array($post) && !empty($post)) {
         /* Try and get the forum */
         try {
             @($f = new Forum());
             @($forum = $f->getForum($post['forum_id']));
         } catch (DBA_Exception $e) {
             return new TplException($e, $template);
         }
         if ($user_perms >= $forum['can_edit'] && ($session['user']['id'] == $post['poster_id'] || $user_perms & ADMIN)) {
             try {
                 @$this->dba->Query("UPDATE " . POSTS . " SET name = '" . $request['title'] . "', body_text = '" . $request['message'] . "', icon = '" . $posticon . "', edited = " . time() . " WHERE id = " . $post['id']);
             } catch (DBA_Exception $e) {
                 return new TplException($e, $template);
             }
             /* If we've gotten to this point, reload the page to our recently added thread :) */
             return new Error($template['L_UPDATEDPOST'] . '<meta http-equiv="refresh" content="1; url=viewthread.php?id=' . $thread['id'] . '">', $template);
         } else {
             return new Error($template['L_PERMSEDITPOST'], $template);
         }
     } else {
         return new Error($template['L_INVALIDPOSTID'], $template);
     }
 }
Пример #11
0
 public function Current()
 {
     $temp = $this->forums->Current();
     $temp['name'] = BB::Open('')->Revert(stripslashes($temp['name']));
     $temp['description'] = BB::Open('')->Revert(stripslashes($temp['description']));
     return $temp;
 }
Пример #12
0
<?php

/**
 * Blog entry
 *
 * @package    Blog
 * @author     Antti Qvickström
 * @copyright  (c) 2010 Antti Qvickström
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
?>

<section class="mod blogentry">
	<div>
		<article>

<?php 
echo BB::factory($entry->entry)->render();
?>

		</article>
	</div>
</section>
Пример #13
0
		 <div id="blog-detail-text"><?php 
                echo _BLOG_POSTBY;
                ?>
<strong>Admin</strong> | 
         <strong><?php 
                echo parent::CountRow('blog_comment', 'blogid', $blog['blogid']);
                ?>
</strong><?php 
                echo _BLOG_COMMENT;
                ?>
</div>
		 </div>	 	 
		</td>
		<td valign="top" style="padding:15px 20px 10px 0; width:100%">
		 <div id="blog-pretext"><?php 
                echo BB::Code($blog['pretext']);
                ?>
</div>
         <div id="blog-readmore" style="margin-top:15px">
         <a href="<?php 
                echo $path->SetRequest(1, 'blog') . $path->NextRequest(array(trim($blog['title'])));
                ?>
">
         <img src="<?php 
                echo $this->domain;
                ?>
images/btnReadMore.jpg" width="80" height="22" border="0"/>
         </a></div>
		</td>
      </tr>
		<?php 
Пример #14
0
Файл: post.php Проект: anqh/anqh
    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        $bbcode = BB::factory();
        ob_start();
        if ($this->my) {
            $panel_class = 'panel-success';
        } elseif ($this->owner) {
            $panel_class = 'panel-info';
        } else {
            $panel_class = 'panel-default';
        }
        ?>

<div class="pull-left">

	<?php 
        if ($this->author) {
            ?>
		<?php 
            echo HTML::avatar($this->author->avatar_url, $this->author->username);
            ?>

		<p>
			<small><?php 
            echo __('Posts: :posts', array(':posts' => '<var>' . Num::format($this->author->post_count, 0) . '</var>'));
            ?>
</small>
		</p>
	<?php 
        } else {
            ?>
		<?php 
            echo HTML::avatar(false);
            ?>

	<?php 
        }
        ?>

</div>

<div class="media-body panel <?php 
        echo $panel_class;
        ?>
">
	<header class="panel-heading"<?php 
        echo $this->forum_post->id == $this->forum_topic->last_post_id ? ' id="last"' : '';
        ?>
>
		<small class="pull-right">
			<?php 
        echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic))) . '#post-' . $this->forum_post->id, '#' . $this->nth, array('title' => __('Permalink')));
        ?>

			&bull;

			<?php 
        if (Permission::has($this->forum_post, Model_Forum_Post::PERMISSION_UPDATE)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'edit')), __('Edit'), array('class' => 'post-edit'));
        }
        ?>

			<?php 
        if (Permission::has($this->forum_post, Model_Forum_Post::PERMISSION_DELETE)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'delete')) . '?token=' . Security::csrf(), __('Delete'), array('class' => 'post-delete'));
        }
        ?>

			<?php 
        if (Permission::has($this->forum_topic, Model_Forum_Topic::PERMISSION_POST)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'quote')), __('Reply'), array('class' => 'post-quote'));
        }
        ?>

			&bull;

			<?php 
        echo HTML::time(Date::short_span($this->forum_post->created, true, true), $this->forum_post->created);
        ?>

			<?php 
        if ($this->forum_post->modify_count > 0) {
            ?>
			&bull;
			<span title="<?php 
            echo __($this->forum_post->modify_count == 1 ? ':edits edit, :ago' : ':edits edits, last :ago', array(':edits' => $this->forum_post->modify_count, ':ago' => Date::fuzzy_span($this->forum_post->modified)));
            ?>
"><?php 
            echo __('Edited');
            ?>
</span>
			<?php 
        }
        ?>

		</small>

		<?php 
        if ($this->author) {
            echo HTML::user($this->author->light_array());
            if ($this->author->title) {
                echo ' <small>' . HTML::chars($this->author->title) . '</small>';
            }
        } else {
            echo $this->forum_post->author_name;
            echo ' <small>' . __('Guest') . '</small>';
        }
        ?>
	</header>

	<div class="panel-body">

		<?php 
        if ($this->forum_post->parent_id) {
            echo '<p class="text-muted">' . __('Replying to :parent', array(':parent' => HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => Route::model_id($this->forum_topic), 'id' => $this->forum_post->parent_id)) . '#post-' . $this->forum_post->parent_id, HTML::chars($this->forum_post->parent()->topic()->name)))) . ':</p>';
        }
        ?>

		<?php 
        echo $bbcode->render($this->forum_post->post);
        ?>

		<?php 
        if ($this->forum_post->attachment) {
            $attachment = 'images/liitteet/' . $this->forum_post->attachment;
            if (file_exists($attachment)) {
                echo HTML::image($attachment);
            }
        }
        ?>

	</div>

	<?php 
        if ($this->author && $this->author->signature) {
            ?>
	<footer class="panel-body">
		<?php 
            echo $this->author && $this->author->signature ? $bbcode->render("\n--\n" . $this->author->signature, true) : '';
            ?>
	</footer>
	<?php 
        }
        ?>
</div>

<?php 
        return ob_get_clean();
    }
Пример #15
0
</span>
    <h2><?php 
        echo _MANGA_STATUS;
        ?>
</h2><span id="details"><?php 
        echo $manga['status'];
        ?>
</span>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2"><h2><?php 
        echo _MANGA_SUMMARY;
        ?>
</h2><span id="details"><?php 
        echo BB::Code($manga['summary']);
        ?>
</span></td>
  </tr>
</table><br /><hr />
<?php 
}
?>







Пример #16
0
    echo html::specialchars($event->dj);
    ?>

		</article>
		<?php 
}
?>

		<?php 
if ($event->info) {
    ?>
		<article>
			<header>
				<h3><?php 
    echo __('Extra info');
    ?>
</h3>
			</header>

			<?php 
    echo BB::factory($event->info)->render();
    ?>

		</article>
		<?php 
}
?>

	</div>
</section>
Пример #17
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
/**
 * Blog entry
 *
 * @package    Blog
 * @author     Antti Qvickström
 * @copyright  (c) 2010 Antti Qvickström
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
?>

<?php 
echo BB::factory($entry->content)->render();
Пример #18
0
}
?>
				</nav>
			</header>

			<?php 
if ($post->parent_id) {
    echo __('Replying to :parent', array(':parent' => HTML::anchor(Route::get($private ? 'forum_private_post' : 'forum_post')->uri(array('topic_id' => Route::model_id($topic), 'id' => $post->parent_id)) . '#post-' . $post->parent_id, HTML::chars($post->parent()->topic()->name))));
}
?>

<?php 
echo BB::factory($post->post)->render();
?>

			<footer>
				<?php 
if ($post->modify_count > 0) {
    echo __('Edited :ago', array(':ago' => HTML::time(Date::fuzzy_span($post->modified), $post->modified)));
}
?>

				<?php 
echo $author['signature'] ? BB::factory("\n--\n" . $author['signature'])->render() : '';
?>

			</footer>
		</section>

	</article>
Пример #19
0
    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        ?>

<div class="pull-left">

	<?php 
        if ($this->author) {
            ?>
		<?php 
            echo HTML::avatar($this->author->avatar, $this->author->username);
            ?>

		<p>
			<small><?php 
            echo __('Posts: :posts', array(':posts' => '<var>' . Num::format($this->author->post_count, 0) . '</var>'));
            ?>
</small>
		</p>
	<?php 
        } else {
            ?>
		<?php 
            echo HTML::avatar(false);
            ?>

	<?php 
        }
        ?>

</div>

<div class="arrow"></div>

<div class="media-body">
	<header<?php 
        echo $this->forum_post->id == $this->forum_topic->last_post_id ? ' id="last"' : '';
        ?>
>
		<small class="ago">
			<?php 
        echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic))) . '#post-' . $this->forum_post->id, '#' . $this->nth, array('title' => __('Permalink')));
        ?>

			&bull;

			<?php 
        if (Permission::has($this->forum_post, Model_Forum_Post::PERMISSION_UPDATE, self::$_user)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'edit')), __('Edit'), array('class' => 'post-edit')) . ' &bull; ';
        }
        ?>

			<?php 
        if (Permission::has($this->forum_post, Model_Forum_Post::PERMISSION_DELETE, self::$_user)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'delete')) . '?token=' . Security::csrf(), __('Delete'), array('class' => 'post-delete')) . ' &bull; ';
        }
        ?>

			<?php 
        if (Permission::has($this->forum_topic, Model_Forum_Topic::PERMISSION_POST, self::$_user)) {
            echo HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('id' => Route::model_id($this->forum_post), 'topic_id' => Route::model_id($this->forum_topic), 'action' => 'quote')), __('Reply'), array('class' => 'post-quote')) . ' &bull; ';
        }
        ?>

			<?php 
        echo HTML::time(Date::short_span($this->forum_post->created, true, true), $this->forum_post->created);
        ?>
		</small>

		<?php 
        if ($this->author) {
            echo HTML::user($this->author->light_array());
            if ($this->author->title) {
                echo ' <small>&ldquo;' . HTML::chars($this->author->title) . '&rdquo;</small>';
            }
        } else {
            echo $this->forum_post->author_name;
            echo ' <small>&ldquo;' . __('Guest') . '&rdquo;</small>';
        }
        ?>
	</header>

	<?php 
        if ($this->forum_post->parent_id) {
            echo __('Replying to :parent', array(':parent' => HTML::anchor(Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => Route::model_id($this->forum_topic), 'id' => $this->forum_post->parent_id)) . '#post-' . $this->forum_post->parent_id, HTML::chars($this->forum_post->parent()->topic()->name))));
        }
        ?>

	<?php 
        echo BB::factory($this->forum_post->post)->render();
        ?>

	<footer>
		<?php 
        echo $this->author && $this->author->signature ? BB::factory("\n--\n" . $this->author->signature)->render() : '';
        ?>

		<?php 
        if ($this->forum_post->modify_count > 0) {
            echo '<br /><br />' . __('Edited :ago', array(':ago' => HTML::time(Date::fuzzy_span($this->forum_post->modified), $this->forum_post->modified)));
        }
        ?>
	</footer>
</div>

<?php 
        return ob_get_clean();
    }
Пример #20
0
 /**
  * Render view.
  *
  * @return  string
  */
 public function content()
 {
     return BB::factory($this->blog_entry->content)->render();
 }
Пример #21
0
echo B::$sprop;
B::sMethod();
echo $a::$sprop;
echo $a::sMethod();
abstract class AA
{
    public abstract function say();
}
class BB extends AA
{
    public function say()
    {
        echo "BB...";
    }
}
$a = new BB();
$a->say();
interface AAA
{
    public function say();
    const cProp = "hello";
}
class BBB implements AAA
{
    public function say()
    {
        echo " say in BBB...";
        echo self::bCProp;
    }
    const bCProp = "world";
}