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 | <table id="standard" class="infoTable"> |
---|
207 | {if $display_info.author} |
---|
208 | <tr id="Author"> |
---|
209 | <td class="label">{'Author'|@translate}</td> |
---|
210 | <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td> |
---|
211 | </tr> |
---|
212 | {/if} |
---|
213 | {if $display_info.created_on} |
---|
214 | <tr id="datecreate"> |
---|
215 | <td class="label">{'Created on'|@translate}</td> |
---|
216 | <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td> |
---|
217 | </tr> |
---|
218 | {/if} |
---|
219 | {if $display_info.posted_on} |
---|
220 | <tr id="datepost"> |
---|
221 | <td class="label">{'Posted on'|@translate}</td> |
---|
222 | <td class="value">{$INFO_POSTED_DATE}</td> |
---|
223 | </tr> |
---|
224 | {/if} |
---|
225 | {if $display_info.dimensions} |
---|
226 | <tr id="Dimensions"> |
---|
227 | <td class="label">{'Dimensions'|@translate}</td> |
---|
228 | <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td> |
---|
229 | </tr> |
---|
230 | {/if} |
---|
231 | {if $display_info.file} |
---|
232 | <tr id="File"> |
---|
233 | <td class="label">{'File'|@translate}</td> |
---|
234 | <td class="value">{$INFO_FILE}</td> |
---|
235 | </tr> |
---|
236 | {/if} |
---|
237 | {if $display_info.filesize} |
---|
238 | <tr id="Filesize"> |
---|
239 | <td class="label">{'Filesize'|@translate}</td> |
---|
240 | <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td> |
---|
241 | </tr> |
---|
242 | {/if} |
---|
243 | {if $display_info.categories} |
---|
244 | <tr id="Categories"> |
---|
245 | <td class="label">{'Categories'|@translate}</td> |
---|
246 | <td class="value"> |
---|
247 | {if isset($related_categories)} |
---|
248 | <ul> |
---|
249 | {foreach from=$related_categories item=cat} |
---|
250 | <li>{$cat}</li> |
---|
251 | {/foreach} |
---|
252 | </ul> |
---|
253 | {/if} |
---|
254 | </td> |
---|
255 | </tr> |
---|
256 | {/if} |
---|
257 | {if $display_info.visits} |
---|
258 | <tr id="Visits"> |
---|
259 | <td class="label">{'Visits'|@translate}</td> |
---|
260 | <td class="value">{$INFO_VISITS}</td> |
---|
261 | </tr> |
---|
262 | {/if} |
---|
263 | |
---|
264 | {if $display_info.rating_score and isset($rate_summary) } |
---|
265 | <tr id="Score"> |
---|
266 | <td class="label">{'Rating score'|@translate}</td> |
---|
267 | <td class="value"> |
---|
268 | {if $rate_summary.count} |
---|
269 | {if $rate_summary.count == 1} |
---|
270 | {assign var='rate_text' value='%d rate'|@translate} |
---|
271 | {else} |
---|
272 | {assign var='rate_text' value='%d rates'|@translate} |
---|
273 | {/if} |
---|
274 | <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$pwg->sprintf($rate_text, $rate_summary.count)})</span> |
---|
275 | {else} |
---|
276 | <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> |
---|
277 | {/if} |
---|
278 | </td> |
---|
279 | </tr> |
---|
280 | {/if} |
---|
281 | |
---|
282 | {if isset($rating)} |
---|
283 | <tr id="Rating"> |
---|
284 | <td class="label"> |
---|
285 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
286 | </td> |
---|
287 | <td class="value"> |
---|
288 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
289 | <div> |
---|
290 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
291 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
292 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
293 | {else} |
---|
294 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
295 | {/if} |
---|
296 | {/foreach} |
---|
297 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
298 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
299 | {footer_script} |
---|
300 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
301 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
302 | updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"), |
---|
303 | ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary"){rdelim} ); |
---|
304 | {/footer_script} |
---|
305 | {/strip} |
---|
306 | </div> |
---|
307 | </form> |
---|
308 | </td> |
---|
309 | </tr> |
---|
310 | {/if} |
---|
311 | |
---|
312 | {if $display_info.privacy_level and isset($available_permission_levels)} |
---|
313 | <tr id="Privacy"> |
---|
314 | <td class="label">{'Who can see this photo?'|@translate}</td> |
---|
315 | <td class="value"> |
---|
316 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
317 | {footer_script} |
---|
318 | {literal}function setPrivacyLevel(selectElement, rootUrl, id, level) |
---|
319 | { |
---|
320 | selectElement.disabled = true; |
---|
321 | var y = new PwgWS(rootUrl); |
---|
322 | y.callService( |
---|
323 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
324 | { |
---|
325 | method: "POST", |
---|
326 | onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, |
---|
327 | onSuccess: function(result) { selectElement.disabled = false; } |
---|
328 | } |
---|
329 | ); |
---|
330 | }{/literal} |
---|
331 | {/footer_script} |
---|
332 | <select onchange="setPrivacyLevel(this, '{$ROOT_URL}', {$current.id}, this.options[selectedIndex].value)"> |
---|
333 | {foreach from=$available_permission_levels item=label key=level} |
---|
334 | <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option> |
---|
335 | {/foreach} |
---|
336 | </select> |
---|
337 | </td> |
---|
338 | </tr> |
---|
339 | {/if} |
---|
340 | |
---|
341 | </table> |
---|
342 | </div></div> |
---|
343 | {/if} |
---|
344 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
345 | <div id="Tcomments" class="tabBlock"><div id="theComments" class="tabBlockContent"> |
---|
346 | <div id="theCommentsBlock"> |
---|
347 | {if !empty($COMMENT_NAV_BAR)} |
---|
348 | <div class="navigationBar">{$COMMENT_NAV_BAR}</div> |
---|
349 | {/if} |
---|
350 | {if isset($comment_add)} |
---|
351 | <div id="commentAdd"> |
---|
352 | <h4>{'Add a comment'|@translate}</h4> |
---|
353 | <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment" > |
---|
354 | {if $comment_add.SHOW_AUTHOR} |
---|
355 | <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
356 | <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p> |
---|
357 | {/if} |
---|
358 | {if $comment_add.SHOW_EMAIL} |
---|
359 | <p><label for="email">{'Email'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
360 | <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p> |
---|
361 | {/if} |
---|
362 | <p><label for="website_url">{'Website'|@translate} :</label></p> |
---|
363 | <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p> |
---|
364 | <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p> |
---|
365 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
366 | <p><input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
367 | <input class="submit" type="submit" value="{'Submit'|@translate}"></p> |
---|
368 | </form> |
---|
369 | </div> |
---|
370 | {/if} |
---|
371 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
372 | {if isset($comments)} |
---|
373 | <div id="commentList"> |
---|
374 | {include file='comment_list.tpl'} |
---|
375 | </div> |
---|
376 | {/if} |
---|
377 | <div style="clear: both;"></div> |
---|
378 | </div> |
---|
379 | </div></div> |
---|
380 | {/if} |
---|
381 | </div> |
---|
382 | </div> |
---|
383 | <div style="clear: both;"></div> |
---|
384 | </div> |
---|
385 | {if isset($stripped.imagePreload)} |
---|
386 | <div id="image_urls" style="display:none;"> |
---|
387 | {foreach from=$U_IMGNEXT item=u_img key=id} |
---|
388 | {if isset($u_img)}<div class="next{$id} preload">{$u_img}</div>{/if} |
---|
389 | {/foreach} |
---|
390 | </div> |
---|
391 | {/if} |
---|
392 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|