Author: Matti Putkonen, matti.putkonen@fi3.fi
Inheritance: extends Helper
Example #1
0
<br>
                        <?php 
$latestGroupProduct = $data->getLatestGroupProduct();
?>
                        
                        最新作品: <?php 
echo CHtml::link(CHtml::encode($latestGroupProduct->title), SeoHelper::groupProductViewSEORouteArray($latestGroupProduct));
?>
<br>
                        <?php 
$leaders = $data->getLeaders();
?>
                        主要成員: 
                        <?php 
foreach ($leaders as $uesr) {
    echo CHtml::link(CHtml::encode($uesr->nickname), SeoHelper::userViewSEORouteArray($uesr));
}
?>
                        <br>
                        公式網站: <a href="<?php 
echo CHtml::encode($data->website_url);
?>
" title="<?php 
echo CHtml::encode($data->website_url);
?>
"> <?php 
echo CHtml::encode($data->website_url);
?>
</a><br>
                        </p><!-- group info -->
Example #2
0
								<div style="height:48px;width:48px;">
									<img class="img-responsive" src="<?php 
    echo Yii::app()->request->baseUrl;
    ?>
/<?php 
    echo $user->icon_src;
    ?>
" alt="post image">
								</div>
							</a>
							<div class="media-body">
								<a class="pull-left" rel="tooltip" title="<?php 
    echo $user->nickname;
    ?>
" href="<?php 
    echo Yii::app()->createUrl('user/view', SeoHelper::userViewSEORouteArrayParam($user));
    ?>
">
									<h4 class=" textOverflow forceInline" title="<?php 
    echo $user->nickname;
    ?>
">
										<?php 
    echo $user->nickname;
    ?>
									</h4>
								</a>
							</div>

						</div>
                                                <?php 
Example #3
0
<li>
    
    <span class=" textOverflow forceInline" title="<?php 
echo CHtml::encode($data->title);
?>
">

                <a href="<?php 
echo $this->createUrl('event/view', SeoHelper::eventViewSEORouteArrayParam($data));
?>
">
                    <?php 
echo CHtml::encode($data->title);
?>
            </a>
        </span><!-- title -->
        <span class="pull-right"><?php 
echo CHtml::encode($data->event_date);
?>
</span>
        <span class="clearfix"></span>
        
</li>
<hr class="list-item-hr">
Example #4
0
 public function actionCreateIllust($mode)
 {
     /* validate all query string param */
     $model = new Illust('create');
     $model->categorize($mode);
     //this will throw new CHttpException(404,'test');
     /*define the required variable for the controller base on the query string param */
     $fileModel = new FileUploadFormModel();
     $view;
     $scen;
     if ($model->Illust_cat_title == Illust::ILLUST_CAT_TITLE) {
         $scen = FileUploadFormModel::FILE_UPLOAD_MODE_SINGLE;
         $view = 'createIllust';
     } else {
         $scen = FileUploadFormModel::FILE_UPLOAD_MODE_MULTI;
         $view = 'createManga';
     }
     if (isset($_POST['Illust'])) {
         $model->setAttributes($_POST['Illust']);
         //$fileHandler->LoadUploadedeImageToModel();
         //$model->photos = $fileHandler->photos;
         //$model->photos = CUploadedFile::getInstancesByName(BSMultiFileUploadWidget::fieldName);
         if ($model->validate()) {
             $fileModel->LoadUploadedeImage();
             $fileModel->setScenario($scen);
             if ($fileModel->validate()) {
                 if ($model->save()) {
                     $ips = new ImageProcessService($fileModel, get_class($model), Yii::app()->user->user_name, $model->id);
                     $ips->saveImage(150, 150);
                     $SavedFileRelativePaths = $ips->getOriginalImageVirtualPath();
                     $SavedThumbnailFileRelativePaths = $ips->getThumbnailImageVirtualPath();
                     //$SavedFileRelativePaths = $fileModel->processImage(get_class($model),Yii::app()->user->user_name,$model->id);
                     $model->save_img_src($SavedFileRelativePaths, $SavedThumbnailFileRelativePaths);
                     $model->addOwnerUserId(Yii::app()->user->id);
                     Yii::app()->user->setFlash(FlashMsg::SUCCESS, "投稿作品成功");
                     $this->redirect(SeoHelper::illustViewSEORouteArray($model));
                 } else {
                     Yii::app()->user->setFlash(FlashMsg::ERROR, "投稿作品失敗");
                 }
             }
         }
     }
     $this->render($view, array('model' => $model, 'fileModel' => $fileModel));
 }
Example #5
0
                            <?php 
}
?>
                        <div class="clearfix"></div>


<p class="descriptionsummary">
        <?php 
echo StringHelper::ConvertNewlineToBRwithHTMLEncode($model->product_summary);
?>
</p><!-- summary -->

<div>

    <p>組織:<?php 
echo CHtml::link(CHtml::encode($ownedGroup->group_name), SeoHelper::groupViewSEORouteArray($ownedGroup), array('title' => CHtml::encode($ownedGroup->group_name)));
?>
</p>

        <p>類形:<?php 
echo CHtml::encode($model->getCatName());
?>
</p>
        <p>價格:<?php 
echo CHtml::encode($model->price);
?>
</p>

        <?php 
if ($model->isCatOf(GroupProduct::BOOK)) {
    ?>
Example #6
0
 public function getViewURL()
 {
     return Yii::app()->createUrl('illust/view', SeoHelper::illustViewSEORouteArrayParam($this));
 }
Example #7
0
?>
/<?php 
echo CHtml::encode($data->getFirstImgSrc());
?>
" alt="post image">
									</div>
								</a>
							</div><!-- right thumbnail col -->
						
							<div class="col-xs-7 col-sm-6 ">
								<h4 class=" textOverflow forceInline" title="<?php 
echo CHtml::encode($data->illust_title);
?>
">
                                                                    <b><a href="<?php 
echo $this->createUrl('illust/view', SeoHelper::illustViewSEORouteArrayParam($data));
?>
">
									<?php 
echo CHtml::encode($data->illust_title);
?>
                                                                    </a>
                                                                    </b>
								</h4><!-- title -->
                                                                <h6 class=" clearfix">
                                                                        <small>
                                                                        <?php 
echo CHtml::encode($data->getCatName());
?>
                                                                        |
                                                                        <?php 
Example #8
0
 public function getNewerGroupProductLink()
 {
     $groupProduct_arr = $this->getNewerGroupProduct();
     if (count($groupProduct_arr) == 0) {
         return '';
     }
     $groupProduct = $groupProduct_arr[0];
     $link = CHtml::link(CHtml::encode('下一張作品: ' . $groupProduct->title), SeoHelper::groupProductViewSEORouteArrayParam($groupProduct));
     return $link;
 }
<div class="list-group panel panel-default userBelongGroupPanel">
            <div class="panel-heading list-group-item text-center hidden-xs">
                    <h4>
                            <span class="pull-left">最受歡迎販賣品</span> 
                            <span class="clearfix"></span>
                    </h4>
            </div><!-- header -->

            <ul class="list-group">
                <?php 
$mostPopularIllust = $mostPopularNonR18GroupProduct;
foreach ($mostPopularIllust as $illust) {
    $illustURL = Yii::app()->createUrl('groupProduct/view', SeoHelper::groupProductViewSEORouteArrayParam($illust));
    ?>
                <a href="<?php 
    echo $illustURL;
    ?>
" class="list-group-item">
                        <div class="media">
                                <div class="pull-left" rel="tooltip" title="<?php 
    echo CHtml::encode($illust->title);
    ?>
" href="<?php 
    echo $illustURL;
    ?>
" data-original-title="<?php 
    echo CHtml::encode($illust->title);
    ?>
">
                                        <div style="height:60px;width:60px;">
Example #10
0
								<div style="height:39px;width:60px;">
									<img class="img-responsive" src="<?php 
    echo Yii::app()->request->baseUrl;
    ?>
/<?php 
    echo $group->icon_src;
    ?>
" alt="post image">
								</div>
							</a>
							<div class="media-body">
								<a class="pull-left" rel="tooltip" title="<?php 
    echo $group->group_name;
    ?>
" href="<?php 
    echo Yii::app()->createUrl('group/view', SeoHelper::groupViewSEORouteArrayParam($group));
    ?>
">
									<h4 class=" textOverflow forceInline" title="<?php 
    echo $group->group_name;
    ?>
">
										<?php 
    echo $group->group_name;
    ?>
									</h4>
								</a>
							</div>

						</div>
                                                <?php 
Example #11
0
<div class="list-group panel panel-default userBelongGroupPanel">
            <div class="panel-heading list-group-item text-center hidden-xs">
                    <h4>
                            <span class="pull-left">過去活動</span> 
                            <span class="clearfix"></span>
                    </h4>
            </div><!-- header -->

            <ul class="list-group">
                <?php 
foreach ($allPastEvents as $event) {
    $illustURL = Yii::app()->createUrl('event/view', SeoHelper::eventViewSEORouteArrayParam($event));
    ?>
                <a href="<?php 
    echo $illustURL;
    ?>
" class="list-group-item">
                        <div class="media">
                                <div class="media-body">
                                        <p class="pull-left" rel="tooltip" title="<?php 
    echo CHtml::encode($event->title);
    ?>
" href="<?php 
    echo $illustURL;
    ?>
" data-original-title="<?php 
    echo CHtml::encode($event->title);
    ?>
">