/** * Render content. * * @return string */ public function content() { ob_start(); if ($this->event->info) { echo BB::factory($this->event->info)->render(); } return ob_get_clean(); }
/** * 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(); }
/** * 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>'; }
/** * 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(); }
/** * Render view. * * @return string */ public function content() { return BB::factory($this->blog_entry->content)->render(); }
<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>
<?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>
/** * 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'))); ?> • <?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')) . ' • '; } ?> <?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')) . ' • '; } ?> <?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')) . ' • '; } ?> <?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>“' . HTML::chars($this->author->title) . '”</small>'; } } else { echo $this->forum_post->author_name; echo ' <small>“' . __('Guest') . '”</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(); }
} ?> </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>
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>
<?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();
/** * 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'))); ?> • <?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')); } ?> • <?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) { ?> • <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(); }