OSDN Git Service

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