예제 #1
0
?>
: <i><?php 
echo $articlesCats->getName();
?>
</i></legend>
<?php 
if ($articles != '') {
    ?>
    <?php 
    foreach ($articles as $article) {
        ?>
        <?php 
        $date = new \Ilch\Date($article->getDateCreated());
        ?>
        <?php 
        $commentsCount = $commentMapper->getCountComments('article/index/show/id/' . $article->getId());
        ?>
        <?php 
        $image = $article->getArticleImage();
        ?>
        <?php 
        $imageSource = $article->getArticleImageSource();
        ?>

        <div class="col-lg-12 hidden-xs" style="padding-left: 0px;">
            <div class="col-lg-8" style="padding-left: 0px;">
                <h4><a href="<?php 
        echo $this->getUrl(array('controller' => 'cats', 'action' => 'show', 'id' => $article->getCatId()));
        ?>
"><?php 
        echo $articlesCats->getName();
예제 #2
0
파일: show.php 프로젝트: sCar-w4y/Ilch-2.0
}
</style>

<legend><?php 
echo $this->getTrans('menuGallery');
?>
</legend>
<?php 
if ($this->get('image') != '') {
    ?>
    <div id="gallery">
        <?php 
    foreach ($this->get('image') as $image) {
        ?>
            <?php 
        $commentsCount = $commentMapper->getCountComments('user/gallery/showimage/user/' . $this->getRequest()->getParam('user') . '/gallery/' . $this->getRequest()->getParam('id') . '/id/' . $image->getId());
        ?>
            <div class="col-xs-6 col-md-4 col-lg-3 col-sm-4">
                <div class="panel panel-default">
                    <div class="panel-image thumbnail">
                        <a href="<?php 
        echo $this->getUrl(array('action' => 'showimage', 'user' => $this->getRequest()->getParam('user'), 'gallery' => $this->getRequest()->getParam('id'), 'id' => $image->getId()));
        ?>
">
                            <img src="<?php 
        echo $this->getUrl() . '/' . $image->getImageThumb();
        ?>
" class="panel-image-preview" alt="<?php 
        echo $image->getImageTitle();
        ?>
" />
예제 #3
0
<?php

$userMapper = new \Modules\User\Mappers\User();
$commentMapper = new \Modules\Comment\Mappers\Comment();
$image = $this->get('image');
$comments = $this->get('comments');
$commentsCount = $commentMapper->getCountComments('gallery/index/showimage/gallery/' . $this->getRequest()->getParam('gallery') . '/id/' . $this->getRequest()->getParam('id'));
$nowDate = new \Ilch\Date();
$config = \Ilch\Registry::get('config');
$col = 10;
function rec($id, $uid, $req, $obj)
{
    $CommentMappers = new \Modules\Comment\Mappers\Comment();
    $userMapper = new \Modules\User\Mappers\User();
    $fk_comments = $CommentMappers->getCommentsByFKId($id);
    $user_rep = $userMapper->getUserById($uid);
    $config = \Ilch\Registry::get('config');
    $nowDate = new \Ilch\Date();
    foreach ($fk_comments as $fk_comment) {
        $commentDate = new \Ilch\Date($fk_comment->getDateCreated());
        $user = $userMapper->getUserById($fk_comment->getUserId());
        if ($req > $config->get('comment_interleaving')) {
            $req = $config->get('comment_interleaving');
        }
        $col = 10 - $req;
        echo '  <article class="row" id="comment_' . $fk_comment->getId() . '">';
        if ($config->get('comment_avatar') == 1) {
            echo '  <div class="col-md-2 col-sm-2 col-md-offset-' . $req . ' col-sm-offset-' . $req . ' hidden-xs">';
            echo '      <figure class="thumbnail" title="' . $user->getName() . '">';
            echo '          <a href="' . $obj->getUrl(array('module' => 'user', 'controller' => 'profil', 'action' => 'index', 'user' => $user->getId())) . '"><img class="img-responsive" src="' . $obj->getBaseUrl($user->getAvatar()) . '" alt="' . $user->getName() . '"></a>';
            echo '      </figure>';