OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / webstyles_flowers / html / com_content / category / blog.php
1 <?php // no direct access
2 defined('_JEXEC') or die('Restricted access');
3 $cparams =& JComponentHelper::getParams('com_media');
4 ?>
5 <div class="Post">
6     <div class="Post-tl"></div>
7     <div class="Post-tr"><div></div></div>
8     <div class="Post-bl"><div></div></div>
9     <div class="Post-br"><div></div></div>
10     <div class="Post-tc"><div></div></div>
11     <div class="Post-bc"><div></div></div>
12     <div class="Post-cl"><div></div></div>
13     <div class="Post-cr"><div></div></div>
14     <div class="Post-cc"></div>
15     <div class="Post-body">
16 <div class="Post-inner">
17
18 <?php if ($this->params->def('show_page_title', 1)): ?>
19 <h2 class="PostHeaderIcon-wrapper"> <span class="PostHeader">
20 <span class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></span>
21 </span>
22 </h2>
23
24 <?php endif; ?>
25 <div class="PostContent">
26
27 <?php if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) :?>
28 <table class="blog<?php echo $this->params->get('pageclass_sfx');?>" cellpadding="0" cellspacing="0">
29 <tr>
30         <td valign="top">
31         <?php if ($this->params->get('show_description_image') && $this->category->image) : ?>
32                 <img src="<?php echo $this->baseurl . '/' . $cparams->get('image_path') . '/'. $this->category->image;?>" align="<?php echo $this->category->image_position;?>" hspace="6" alt="" />
33         <?php endif; ?>
34         <?php if ($this->params->get('show_description') && $this->category->description) : ?>
35                 <?php echo $this->category->description; ?>
36         <?php endif; ?>
37         </td>
38 </tr>
39 </table>
40 <?php endif; ?>
41
42 </div>
43 <div class="cleared"></div>
44
45
46 </div>
47
48     </div>
49 </div>
50
51 <table class="blog<?php echo $this->params->get('pageclass_sfx');?>" cellpadding="0" cellspacing="0">
52 <?php if ($this->params->get('num_leading_articles')) : ?>
53 <tr>
54         <td valign="top">
55         <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
56                 <?php if ($i >= $this->total) : break; endif; ?>
57                 <div>
58                 <?php
59                         $this->item =& $this->getItem($i, $this->params);
60                         echo $this->loadTemplate('item');
61                 ?>
62                 </div>
63         <?php endfor; ?>
64         </td>
65 </tr>
66 <?php else : $i = $this->pagination->limitstart; endif; ?>
67
68 <?php
69 $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
70 $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles');
71 if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
72 <tr>
73         <td valign="top">
74                 <table width="100%"  cellpadding="0" cellspacing="0">
75                 <tr>
76                 <?php
77                         $divider = '';
78                         if ($this->params->get('multi_column_order')) : // order across, like front page
79                                 for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
80                                         if ($z > 0) : $divider = " column_separator"; endif; ?>
81                                         <?php
82                                         $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
83                                         $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
84                                         ?>
85                                         <td valign="top"
86                                                 width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%"
87                                                 class="article_column<?php echo $divider ?>">
88                                                 <?php
89                                                 $loop = (($z < $cols)?1:0) + $rows;
90
91                                                 for ($y = 0; $y < $loop; $y ++) :
92                                                         $target = $i + ($y * $this->params->get('num_columns')) + $z;
93                                                         if ($target < $this->total && $target < ($numIntroArticles)) :
94                                                                 $this->item =& $this->getItem($target, $this->params);
95                                                                 echo $this->loadTemplate('item');
96                                                         endif;
97                                                 endfor;
98                                                 ?></td>
99                                 <?php endfor; 
100                                                 $i = $i + $this->params->get('num_intro_articles') ; 
101                         else : // otherwise, order down, same as before (default behaviour)
102                                 for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
103                                         if ($z > 0) : $divider = " column_separator"; endif; ?>
104                                         <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
105                                         <?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
106                                         if ($i < $this->total && $i < ($numIntroArticles)) :
107                                                 $this->item =& $this->getItem($i, $this->params);
108                                                 echo $this->loadTemplate('item');
109                                                 $i ++;
110                                         endif;
111                                 endfor; ?>
112                                 </td>
113                 <?php endfor; 
114                 endif; ?> 
115                 </tr>
116                 </table>
117         </td>
118 </tr>
119 <?php endif; ?>
120 </table>
121
122 <?php if (($this->params->get('num_links') && ($i < $this->total))
123         || $this->params->get('show_pagination')
124         || $this->params->get('show_pagination_results')) : ?>
125 <div class="Post">
126     <div class="Post-tl"></div>
127     <div class="Post-tr"><div></div></div>
128     <div class="Post-bl"><div></div></div>
129     <div class="Post-br"><div></div></div>
130     <div class="Post-tc"><div></div></div>
131     <div class="Post-bc"><div></div></div>
132     <div class="Post-cl"><div></div></div>
133     <div class="Post-cr"><div></div></div>
134     <div class="Post-cc"></div>
135     <div class="Post-body">
136 <div class="Post-inner">
137
138 <div class="PostContent">
139
140 <table class="blog<?php echo $this->params->get('pageclass_sfx');?>" cellpadding="0" cellspacing="0">
141 <?php if ($this->params->get('num_links') && ($i < $this->total)) : ?>
142 <tr>
143         <td valign="top">
144                 <div class="blog_more<?php echo $this->params->get('pageclass_sfx') ?>">
145                         <?php
146                                 $this->links = array_splice($this->items, $i - $this->pagination->limitstart);
147                                 echo $this->loadTemplate('links');
148                         ?>
149                 </div>
150         </td>
151 </tr>
152 <?php endif; ?>
153 <?php if ($this->params->get('show_pagination')) : ?>
154 <tr>
155         <td valign="top" align="center">
156                 <?php echo $this->pagination->getPagesLinks(); ?>
157                 <br /><br />
158         </td>
159 </tr>
160 <?php endif; ?>
161 <?php if ($this->params->get('show_pagination_results')) : ?>
162 <tr>
163         <td valign="top" align="center">
164                 <?php echo $this->pagination->getPagesCounter(); ?>
165         </td>
166 </tr>
167 <?php endif; ?>
168 </table>
169
170 </div>
171 <div class="cleared"></div>
172
173
174 </div>
175
176     </div>
177 </div>
178
179 <?php endif; ?>