1 | {assign var=derivative value=$pwg->derivative($stripped.imageSize, $current.src_image)} |
---|
2 | {assign var='size' value=$derivative->get_size()} |
---|
3 | {literal} |
---|
4 | <script type="text/javascript"> |
---|
5 | var image_w = {/literal}{$size[0]}{literal} |
---|
6 | var image_h = {/literal}{$size[1]}{literal} |
---|
7 | </script> |
---|
8 | {/literal} |
---|
9 | |
---|
10 | {include file='infos_errors.tpl'} |
---|
11 | |
---|
12 | <div class="titrePage" id="imageHeaderBar"> |
---|
13 | <div class="browsePath"> |
---|
14 | {$SECTION_TITLE} |
---|
15 | {if ($stripped.showTitleOnBrowsePath)}{$LEVEL_SEPARATOR}{$current.TITLE}{/if} |
---|
16 | </div> |
---|
17 | <ul class="randomButtons"> |
---|
18 | <li id="imageToolBar"> |
---|
19 | {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} |
---|
20 | </li> |
---|
21 | {strip}{if isset($U_SLIDESHOW_START) } |
---|
22 | <li><a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> |
---|
23 | {/if}{/strip} |
---|
24 | {strip}{if isset($U_ADMIN) } |
---|
25 | <li><a href="{$U_ADMIN}" title="{'Modify information'|@translate}">{'edit'|@translate}</a></li> |
---|
26 | {/if}{/strip} |
---|
27 | {strip}{if isset($U_CADDIE)} |
---|
28 | <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'add to caddie'|@translate}" rel="nofollow">{'caddie'|@translate}</a></li> |
---|
29 | {/if}{/strip} |
---|
30 | {strip}{if isset($favorite) } |
---|
31 | <li><a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}">{'Favorites'|@translate}</a></li> |
---|
32 | {/if}{/strip} |
---|
33 | {strip}{if !empty($U_SET_AS_REPRESENTATIVE) } |
---|
34 | <li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}">{'representative'|@translate}</a></li> |
---|
35 | {/if}{/strip} |
---|
36 | {strip}{if isset($current.U_DOWNLOAD)} |
---|
37 | <li><a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}">{'Download'|@translate}</a></li> |
---|
38 | {/if}{/strip} |
---|
39 | {strip}{if isset($PLUGIN_PICTURE_ACTIONS)} |
---|
40 | <li class="plugin_buttons plugin_buttons_group1">{$PLUGIN_PICTURE_ACTIONS}</li> |
---|
41 | {/if}{/strip} |
---|
42 | {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} |
---|
43 | {footer_script} |
---|
44 | {literal} |
---|
45 | function addToCadie(aElement, rootUrl, id) |
---|
46 | { |
---|
47 | if (aElement.disabled) return; |
---|
48 | aElement.disabled=true; |
---|
49 | var y = new PwgWS(rootUrl); |
---|
50 | y.callService( |
---|
51 | "pwg.caddie.add", {image_id: id} , |
---|
52 | { |
---|
53 | onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, |
---|
54 | onSuccess: function(result) { aElement.disabled = false; } |
---|
55 | } |
---|
56 | ); |
---|
57 | } |
---|
58 | {/literal} |
---|
59 | {/footer_script} |
---|
60 | {/if}{/strip} |
---|
61 | <li class="plugin_buttons plugin_buttons_group2">{*caddie management END*}</li> |
---|
62 | </ul> |
---|
63 | {php} |
---|
64 | global $pwg_loaded_plugins; |
---|
65 | $this->assign('GMaps_loaded', isset($pwg_loaded_plugins[ 'GMaps' ])); |
---|
66 | {/php} |
---|
67 | {if ($GMaps_loaded)}<div id="text_gmaps" style="display:none">{'GMap'|@translate}</div>{/if} |
---|
68 | <div style="clear:both;"></div> |
---|
69 | </div> <!-- imageHeaderBar --> |
---|
70 | |
---|
71 | {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} |
---|
72 | <div id="content"> |
---|
73 | <div class="hideTabsZone hideTabs"> </div> |
---|
74 | |
---|
75 | <!-- Image HD --> |
---|
76 | <div id="theImageHigh" style="display:none;"> |
---|
77 | <div id="theImgHighBg"></div> |
---|
78 | <div id="theImgHighContainer"> |
---|
79 | <div id="theImgHighCloseButton" onclick="closeDisplayHigh();"></div> |
---|
80 | <div id="theImgHighZoomButton" class="fit" onclick="switchZoomHigh();"></div> |
---|
81 | <div id="theImgHighContainer2"> |
---|
82 | <img id="theImgHigh" src="" style="display:none;" alt="{$ALT_IMG}"> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | </div> |
---|
86 | |
---|
87 | {assign var='display_description_tab' value=false} |
---|
88 | {if (($stripped.imageCaption != 'description') && isset($COMMENT_IMG))} |
---|
89 | {assign var='display_description_tab' value=true} |
---|
90 | {/if} |
---|
91 | |
---|
92 | {assign var='showTitle' value=false} |
---|
93 | {if isset($COMMENT_IMG) and $stripped.imageCaption == 'description'} |
---|
94 | {assign var='showTitle' value=true} |
---|
95 | {/if} |
---|
96 | {if isset($current.TITLE) and $stripped.imageCaption == 'title'} |
---|
97 | {assign var='showTitle' value=true} |
---|
98 | {/if} |
---|
99 | |
---|
100 | {php} |
---|
101 | global $pwg_loaded_plugins; |
---|
102 | $this->assign('usertags', (isset($pwg_loaded_plugins[ 'user_tags' ]))); |
---|
103 | {/php} |
---|
104 | |
---|
105 | <div id="theImageAndTitle"> |
---|
106 | <div id="theImageBox" > |
---|
107 | <div class="hideTabsZone hideTabs"> </div> |
---|
108 | {if (isset($previous) && $stripped.navArrows) } |
---|
109 | <a href="{$previous.U_IMG}" id="imgprev"> </a> |
---|
110 | {/if} |
---|
111 | <div id="theImage"> |
---|
112 | {$ELEMENT_CONTENT} |
---|
113 | </div> |
---|
114 | {if (isset($next) && $stripped.navArrows)} |
---|
115 | <a href="{$next.U_IMG}" id="imgnext"> </a> |
---|
116 | {/if} |
---|
117 | </div> |
---|
118 | {if $showTitle } |
---|
119 | <div id="imageTitleContainer"><div id="imageTitle"> |
---|
120 | {if ($stripped.imageCaption == 'description' )} |
---|
121 | {$COMMENT_IMG} |
---|
122 | {/if} |
---|
123 | {if ($stripped.imageCaption == 'title' )} |
---|
124 | {$current.TITLE} |
---|
125 | {/if} |
---|
126 | </div></div> |
---|
127 | {/if} |
---|
128 | </div> <!-- theImage --> |
---|
129 | <div style="clear: both;"></div> |
---|
130 | |
---|
131 | <div id="tabZone"> |
---|
132 | |
---|
133 | {assign var='display_info_panel' value=false} |
---|
134 | {assign var='display_count' value='0'} |
---|
135 | {if $display_info.author}{assign var='display_count' value=$display_count+1}{/if} |
---|
136 | {if $display_info.created_on}{assign var='display_count' value=$display_count+1}{/if} |
---|
137 | {if $display_info.posted_on}{assign var='display_count' value=$display_count+1}{/if} |
---|
138 | {if $display_info.dimensions}{assign var='display_count' value=$display_count+1}{/if} |
---|
139 | {if $display_info.file}{assign var='display_count' value=$display_count+1}{/if} |
---|
140 | {if $display_info.filesize}{assign var='display_count' value=$display_count+1}{/if} |
---|
141 | {if $display_info.categories}{assign var='display_count' value=$display_count+1}{/if} |
---|
142 | {if $display_info.visits}{assign var='display_count' value=$display_count+1}{/if} |
---|
143 | {if $display_info.rating_score and isset($rate_summary) }{assign var='display_count' value=$display_count+1}{/if} |
---|
144 | {if isset($rating)}{assign var='display_count' value=$display_count+1}{/if} |
---|
145 | {if $display_info.privacy_level and isset($available_permission_levels) }{assign var='display_count' value=$display_count+1}{/if} |
---|
146 | {if (($display_count > 0) && ((isset($U_ADMIN)) || ($stripped.infoTabAdminOnly == false)))} |
---|
147 | {assign var='display_info_panel' value=true} |
---|
148 | {/if} |
---|
149 | <div id="tabTitleBar"> |
---|
150 | <ul id="tabTitles"> |
---|
151 | {if $display_description_tab} |
---|
152 | <li id="tabTcaption" class="tabTitle" name="caption">{'Description'|@translate}</li> |
---|
153 | {/if} |
---|
154 | {if ($display_info.tags && (isset($related_tags) || ($usertags)))} |
---|
155 | <li id="tabTtags" class="tabTitle" name="tags">{'Tags'|@translate}</li> |
---|
156 | {/if} |
---|
157 | {if isset($metadata)} |
---|
158 | {foreach from=$metadata item=meta key=id} |
---|
159 | <li id="tabTmeta{$id}" class="tabTitle" name="meta{$id}">{$meta.TITLE}</li> |
---|
160 | {/foreach} |
---|
161 | {/if} |
---|
162 | {if $display_info_panel} |
---|
163 | <li id="tabTinfo" class="tabTitle" name="info">{'Information'|@translate}</li> |
---|
164 | {/if} |
---|
165 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
166 | <li id="tabTcomments" class="tabTitle" title="{'Add a comment'|@translate}" name="comments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</li> |
---|
167 | {/if} |
---|
168 | </ul> |
---|
169 | </div> |
---|
170 | <div id="tabs"> |
---|
171 | {if $display_description_tab} |
---|
172 | <div id="Tcaption" class="tabBlock"><div class="tabBlockContent"> |
---|
173 | {$COMMENT_IMG} |
---|
174 | </div></div> |
---|
175 | {/if} |
---|
176 | {if ($display_info.tags && (isset($related_tags) || ($usertags)))} |
---|
177 | <div id="Ttags" class="tabBlock"><div class="tabBlockContent"> |
---|
178 | {if ($usertags)}<table id="TagsTable"><tr id="Tags" ><td class="label"></td><td class="value">{/if} |
---|
179 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if} |
---|
180 | <a href="{$tag.URL}">{$tag.name}</a> |
---|
181 | {/foreach} |
---|
182 | {if ($usertags)}</td></tr></table>{/if} |
---|
183 | </div></div> |
---|
184 | {/if} |
---|
185 | {if isset($metadata)} |
---|
186 | {foreach from=$metadata item=meta key=id} |
---|
187 | <div id="Tmeta{$id}" class="tabBlock"><div class="tabBlockContent"> |
---|
188 | {if count($meta.lines)>0 and !array_key_exists('<!--rawContent-->', $meta.lines)} |
---|
189 | <table id="table_meta{$id}" class="infoTable2"> |
---|
190 | {foreach from=$meta.lines item=value key=label} |
---|
191 | <tr> |
---|
192 | <td class="label">{$label|@translate}</td> |
---|
193 | <td class="value">{$value}</td> |
---|
194 | </tr> |
---|
195 | {/foreach} |
---|
196 | </table> |
---|
197 | {else} |
---|
198 | {assign var='empty' value='<!--rawContent-->'} |
---|
199 | {$meta.lines.$empty} |
---|
200 | {/if} |
---|
201 | </div></div> |
---|
202 | {/foreach} |
---|
203 | {/if} |
---|
204 | {if $display_info_panel} |
---|
205 | <div id="Tinfo" class="tabBlock"><div class="tabBlockContent"> |
---|
206 | |
---|
207 | <dl id="standard" class="imageInfoTable"> |
---|
208 | {strip} |
---|
209 | {if $display_info.author and isset($INFO_AUTHOR)} |
---|
210 | <div id="Author" class="imageInfo"> |
---|
211 | <dt>{'Author'|@translate}</dt> |
---|
212 | <dd>{$INFO_AUTHOR}</dd> |
---|
213 | </div> |
---|
214 | {/if} |
---|
215 | {if $display_info.created_on and isset($INFO_CREATION_DATE)} |
---|
216 | <div id="datecreate" class="imageInfo"> |
---|
217 | <dt>{'Created on'|@translate}</dt> |
---|
218 | <dd>{$INFO_CREATION_DATE}</dd> |
---|
219 | </div> |
---|
220 | {/if} |
---|
221 | {if $display_info.posted_on} |
---|
222 | <div id="datepost" class="imageInfo"> |
---|
223 | <dt>{'Posted on'|@translate}</dt> |
---|
224 | <dd>{$INFO_POSTED_DATE}</dd> |
---|
225 | </div> |
---|
226 | {/if} |
---|
227 | {if $display_info.dimensions and isset($INFO_DIMENSIONS)} |
---|
228 | <div id="Dimensions" class="imageInfo"> |
---|
229 | <dt>{'Dimensions'|@translate}</dt> |
---|
230 | <dd>{$INFO_DIMENSIONS}</dd> |
---|
231 | </div> |
---|
232 | {/if} |
---|
233 | {if $display_info.file} |
---|
234 | <div id="File" class="imageInfo"> |
---|
235 | <dt>{'File'|@translate}</dt> |
---|
236 | <dd>{$INFO_FILE}</dd> |
---|
237 | </div> |
---|
238 | {/if} |
---|
239 | {if $display_info.filesize and isset($INFO_FILESIZE)} |
---|
240 | <div id="Filesize" class="imageInfo"> |
---|
241 | <dt>{'Filesize'|@translate}</dt> |
---|
242 | <dd>{$INFO_FILESIZE}</dd> |
---|
243 | </div> |
---|
244 | {/if} |
---|
245 | {if $display_info.tags and isset($related_tags)} |
---|
246 | <div id="Tags" class="imageInfo"> |
---|
247 | <dt>{'Tags'|@translate}</dt> |
---|
248 | <dd> |
---|
249 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach} |
---|
250 | </dd> |
---|
251 | </div> |
---|
252 | {/if} |
---|
253 | {if $display_info.categories and isset($related_categories)} |
---|
254 | <div id="Categories" class="imageInfo"> |
---|
255 | <dt>{'Albums'|@translate}</dt> |
---|
256 | <dd> |
---|
257 | <ul> |
---|
258 | {foreach from=$related_categories item=cat} |
---|
259 | <li>{$cat}</li> |
---|
260 | {/foreach} |
---|
261 | </ul> |
---|
262 | </dd> |
---|
263 | </div> |
---|
264 | {/if} |
---|
265 | {if $display_info.visits} |
---|
266 | <div id="Visits" class="imageInfo"> |
---|
267 | <dt>{'Visits'|@translate}</dt> |
---|
268 | <dd>{$INFO_VISITS}</dd> |
---|
269 | </div> |
---|
270 | {/if} |
---|
271 | {if $display_info.rating_score and isset($rate_summary)} |
---|
272 | <div id="Average" class="imageInfo"> |
---|
273 | <dt>{'Rating score'|@translate}</dt> |
---|
274 | <dd> |
---|
275 | {if $rate_summary.count} |
---|
276 | {if $rate_summary.count == 1} |
---|
277 | {assign var='rate_text' value='%d rate'|@translate} |
---|
278 | {else} |
---|
279 | {assign var='rate_text' value='%d rates'|@translate} |
---|
280 | {/if} |
---|
281 | <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$pwg->sprintf($rate_text, $rate_summary.count)})</span> |
---|
282 | {else} |
---|
283 | <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> |
---|
284 | {/if} |
---|
285 | </dd> |
---|
286 | </div> |
---|
287 | {/if} |
---|
288 | {if isset($rating)} |
---|
289 | <div id="rating" class="imageInfo"> |
---|
290 | <dt> |
---|
291 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
292 | </dt> |
---|
293 | <dd> |
---|
294 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
295 | <div> |
---|
296 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
297 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
298 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
299 | {else} |
---|
300 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
301 | {/if} |
---|
302 | {/foreach} |
---|
303 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
304 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
305 | {footer_script} |
---|
306 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
307 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
308 | updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"), |
---|
309 | ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary"){rdelim} ); |
---|
310 | {/footer_script} |
---|
311 | {/strip} |
---|
312 | </div> |
---|
313 | </form> |
---|
314 | </dd> |
---|
315 | </div> |
---|
316 | {/if} |
---|
317 | {/strip} |
---|
318 | </dl> |
---|
319 | |
---|
320 | <table id="standard" class="infoTable"> |
---|
321 | {if $display_info.privacy_level and isset($available_permission_levels)} |
---|
322 | <tr id="Privacy"> |
---|
323 | <td class="label">{'Who can see this photo?'|@translate}</td> |
---|
324 | <td class="value"> |
---|
325 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
326 | {footer_script} |
---|
327 | {literal}function setPrivacyLevel(selectElement, rootUrl, id, level) |
---|
328 | { |
---|
329 | selectElement.disabled = true; |
---|
330 | var y = new PwgWS(rootUrl); |
---|
331 | y.callService( |
---|
332 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
333 | { |
---|
334 | method: "POST", |
---|
335 | onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, |
---|
336 | onSuccess: function(result) { selectElement.disabled = false; } |
---|
337 | } |
---|
338 | ); |
---|
339 | }{/literal} |
---|
340 | {/footer_script} |
---|
341 | <select onchange="setPrivacyLevel(this, '{$ROOT_URL}', {$current.id}, this.options[selectedIndex].value)"> |
---|
342 | {foreach from=$available_permission_levels item=label key=level} |
---|
343 | <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option> |
---|
344 | {/foreach} |
---|
345 | </select> |
---|
346 | </td> |
---|
347 | </tr> |
---|
348 | {/if} |
---|
349 | </table> |
---|
350 | </div></div> |
---|
351 | {/if} |
---|
352 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
353 | <div id="Tcomments" class="tabBlock"><div id="theComments" class="tabBlockContent"> |
---|
354 | <div id="theCommentsBlock"> |
---|
355 | {if !empty($COMMENT_NAV_BAR)} |
---|
356 | <div class="navigationBar">{$COMMENT_NAV_BAR}</div> |
---|
357 | {/if} |
---|
358 | {if isset($comment_add)} |
---|
359 | <div id="commentAdd"> |
---|
360 | <h4>{'Add a comment'|@translate}</h4> |
---|
361 | <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment" > |
---|
362 | {if $comment_add.SHOW_AUTHOR} |
---|
363 | <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
364 | <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p> |
---|
365 | {/if} |
---|
366 | {if $comment_add.SHOW_EMAIL} |
---|
367 | <p><label for="email">{'Email'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
368 | <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p> |
---|
369 | {/if} |
---|
370 | <p><label for="website_url">{'Website'|@translate} :</label></p> |
---|
371 | <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p> |
---|
372 | <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p> |
---|
373 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
374 | <p><input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
375 | <input class="submit" type="submit" value="{'Submit'|@translate}"></p> |
---|
376 | </form> |
---|
377 | </div> |
---|
378 | {/if} |
---|
379 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
380 | {if isset($comments)} |
---|
381 | <div id="commentList"> |
---|
382 | {include file='comment_list.tpl'} |
---|
383 | </div> |
---|
384 | {/if} |
---|
385 | <div style="clear: both;"></div> |
---|
386 | </div> |
---|
387 | </div></div> |
---|
388 | {/if} |
---|
389 | </div> |
---|
390 | </div> |
---|
391 | <div style="clear: both;"></div> |
---|
392 | </div> |
---|
393 | {if isset($stripped.imagePreload)} |
---|
394 | <div id="image_urls" style="display:none;"> |
---|
395 | {foreach from=$U_IMGNEXT item=u_img key=id} |
---|
396 | {if isset($u_img)}<div class="next{$id} preload">{$u_img}</div>{/if} |
---|
397 | {/foreach} |
---|
398 | </div> |
---|
399 | {/if} |
---|
400 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|