Flash support
This commit is contained in:
parent
35e097d0ce
commit
4737f4a184
2 changed files with 8 additions and 1 deletions
|
@ -207,6 +207,7 @@ class PostController
|
||||||
PrivilegesHelper::confirmWithException($this->context->user, Privilege::ViewPost);
|
PrivilegesHelper::confirmWithException($this->context->user, Privilege::ViewPost);
|
||||||
PrivilegesHelper::confirmWithException($this->context->user, Privilege::ViewPost, PostSafety::toString($post->safety));
|
PrivilegesHelper::confirmWithException($this->context->user, Privilege::ViewPost, PostSafety::toString($post->safety));
|
||||||
|
|
||||||
|
$this->context->stylesheets []= 'post-view.css';
|
||||||
$this->context->subTitle = 'showing @' . $post->id;
|
$this->context->subTitle = 'showing @' . $post->id;
|
||||||
$this->context->transport->post = $post;
|
$this->context->transport->post = $post;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<?php if (!empty($this->context->transport->errorMessage)): ?>
|
<?php if (!empty($this->context->transport->errorMessage)): ?>
|
||||||
<p class="alert alert-error"><?php echo $this->context->transport->errorMessage ?></p>
|
<p class="alert alert-error"><?php echo $this->context->transport->errorMessage ?></p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<img src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>" alt="<?php echo $this->context->transport->post->name ?>"/>
|
<div class="post-wrapper">
|
||||||
|
<?php if ($this->context->transport->post->type == PostType::Image): ?>
|
||||||
|
<img src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>" alt="<?php echo $this->context->transport->post->name ?>"/>
|
||||||
|
<?php elseif ($this->context->transport->post->type == PostType::Flash): ?>
|
||||||
|
<embed type="application/x-shockwave-flash" src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>"/>
|
||||||
|
<?php endif ?>
|
||||||
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
Loading…
Reference in a new issue