1 | {combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} |
---|
2 | {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} |
---|
3 | {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"} |
---|
4 | {footer_script} |
---|
5 | jQuery(function($) { |
---|
6 | |
---|
7 | {* <!-- CATEGORIES --> *} |
---|
8 | var categoriesCache = new CategoriesCache({ |
---|
9 | serverKey: '{$CACHE_KEYS.categories}', |
---|
10 | serverId: '{$CACHE_KEYS._hash}', |
---|
11 | rootUrl: '{$ROOT_URL}' |
---|
12 | }); |
---|
13 | |
---|
14 | categoriesCache.selectize(jQuery('[data-selectize=categories]')); |
---|
15 | |
---|
16 | if($('#metaogimagesaveid').children("option:selected").val()=="-20"){ |
---|
17 | $('#mognp').show(); |
---|
18 | } |
---|
19 | |
---|
20 | $('#metaogimagesaveid').change(function(event){ |
---|
21 | var idphoto=$(this).children("option:selected").val(); |
---|
22 | $('#metaogimagesave2id').val(idphoto); |
---|
23 | if($('#metaogimagesaveid').children("option:selected").val()=="-10" || $('#metaogimagesaveid').children("option:selected").val()=="-20"){ |
---|
24 | $('#mognp').show(); |
---|
25 | $('#metaogimagescr').attr("src",''); |
---|
26 | $('#metaogimagescr').hide(); |
---|
27 | }else{ |
---|
28 | var urliog=$('#metaogimagesaveid').children("option:selected").data('url'); |
---|
29 | $('#metaogimagescr').attr("src",urliog); |
---|
30 | $('#metaogimagescr').show(); |
---|
31 | $('#mognp').hide(); |
---|
32 | } |
---|
33 | $('#mognpe').hide(); |
---|
34 | $('#metaogimagesaveid').css('border', 'solid 1px #999'); |
---|
35 | $('#metaogimagesave2id').css('border', 'solid 1px #999'); |
---|
36 | $('#submetaogsave').show(); |
---|
37 | }); |
---|
38 | |
---|
39 | $('#metaogimagesave2id').change(function(){ |
---|
40 | var idphoto2=$(this).val(); |
---|
41 | $('#metaogimagesaveid').val(idphoto2); |
---|
42 | |
---|
43 | if($('#metaogimagesaveid').children("option:selected").val()==idphoto2){ |
---|
44 | $('#metaogimagesaveid').css('border', 'solid 1px #999'); |
---|
45 | $('#metaogimagesave2id').css('border', 'solid 1px #999'); |
---|
46 | $('#mognpe').hide(); |
---|
47 | $('#submetaogsave').show(); |
---|
48 | if($('#metaogimagesaveid').children("option:selected").val()=="-10" || $('#metaogimagesaveid').children("option:selected").val()=="-20"){ |
---|
49 | $('#mognp').show(); |
---|
50 | $('#metaogimagescr').attr("src",''); |
---|
51 | $('#metaogimagescr').hide(); |
---|
52 | }else{ |
---|
53 | var urliog=$('#metaogimagesaveid').children("option:selected").data('url'); |
---|
54 | $('#metaogimagescr').attr("src",urliog); |
---|
55 | $('#metaogimagescr').show(); |
---|
56 | $('#mognp').hide(); |
---|
57 | } |
---|
58 | }else{ |
---|
59 | $('#metaogimagesaveid').css('border', 'solid 2px red'); |
---|
60 | $('#metaogimagesave2id').css('border', 'solid 2px red'); |
---|
61 | $('#mognpe').show(); |
---|
62 | $('#mognp').hide(); |
---|
63 | $('#metaogimagescr').attr("src",''); |
---|
64 | $('#metaogimagescr').hide(); |
---|
65 | $('#submetaogsave').hide(); |
---|
66 | } |
---|
67 | }); |
---|
68 | |
---|
69 | }); |
---|
70 | {/footer_script} |
---|
71 | |
---|
72 | <div class="titrePage"> |
---|
73 | <h2>{'Manage tags metadata Open Graph'|@translate}</h2> |
---|
74 | </div> |
---|
75 | {if isset ($metagestion)} |
---|
76 | <h3>{'Add Open Graph metadata on Piwigo page'|@translate}</h3> |
---|
77 | <div> |
---|
78 | <form method="post" > |
---|
79 | <fieldset> |
---|
80 | <legend>{'Select page'|@translate}</legend> |
---|
81 | {'Pages list'|@translate} |
---|
82 | {html_options name="metaoglist" values=$metaogpagelist output=$metaogpagelistT selected=$metaog_edit.VALUE} |
---|
83 | <br> |
---|
84 | <br> |
---|
85 | <div style="text-align:center;"> |
---|
86 | <input class="submit" name="submetaogchp" type="submit" value="{'edit Open Graph metadata'|@translate}" {$TAG_INPUT_ENABLED} /> |
---|
87 | </div> |
---|
88 | </fieldset> |
---|
89 | </form> |
---|
90 | </div> |
---|
91 | {if isset ($metaog_edit)} |
---|
92 | <div> |
---|
93 | <form method="post" > |
---|
94 | <fieldset> |
---|
95 | <legend>{'Metadata Open Graph - Plugin meta og'|@translate}</legend> |
---|
96 | {'Metadata Open Graph title'|@translate} |
---|
97 | <br> |
---|
98 | <input type="hidden" name="metaogid" value="{$metaog_edit.id}"> |
---|
99 | <input type="hidden" name="metaogpage" value="{$metaog_edit.VALUE}"> |
---|
100 | <input type="text" name="metaogtitlesave" value="{$metaog_edit.metaogtitle}" size="100" maxlenght="100"> |
---|
101 | <br> |
---|
102 | <br> |
---|
103 | {'Metadata Open Graph description'|@translate} |
---|
104 | <br> |
---|
105 | <textarea rows="2" cols="60" name="metaogdescriptionsave" id="metaogdescriptionsave" class="metaogdescriptionsave">{$metaog_edit.metaogdescription}</textarea></span> |
---|
106 | <br> |
---|
107 | <br> |
---|
108 | {'Metadata Open Graph link image'|@translate} |
---|
109 | <br> |
---|
110 | <input id="metaogimagesave2id" type="number" name="metaogimagesave2" value="{$metaog_edit.metaogimage}"> {'or'|@translate} |
---|
111 | <select id="metaogimagesaveid" name="metaogimagesave"> |
---|
112 | <option value="-20">-----</option> |
---|
113 | <option value="-10">{'no photo'|@translate}</option> |
---|
114 | {foreach from=$info_photos item=infophoto} |
---|
115 | <option data-url="{$infophoto.PHOTOURL}" value="{$infophoto.PHOTOID}" {$infophoto.PHOTOSELECT}>{$infophoto.PHOTOINFO}</option> |
---|
116 | {/foreach} |
---|
117 | </select> |
---|
118 | <br> |
---|
119 | <br> |
---|
120 | <span style="display:none;" id="mognp">{'don\'t use photo for this page'|@translate}</span> |
---|
121 | <span style="display:none;" id="mognpe">{'This ID isn\'t used in your gallery'|@translate}</span> |
---|
122 | <img id="metaogimagescr" src="{$metaog_edit.metaogpath}"<br> |
---|
123 | <br> |
---|
124 | <br> |
---|
125 | <div style="text-align:center;"> |
---|
126 | <input class="submit" id="submetaogsave" name="submetaogsave" type="submit" value="{'save Open Graph metadata in the database'|@translate}" {$TAG_INPUT_ENABLED} /> |
---|
127 | </div> |
---|
128 | </fieldset> |
---|
129 | </form> |
---|
130 | </div> |
---|
131 | {/if} |
---|
132 | {/if} |
---|
133 | |
---|
134 | {if isset ($metaogconfig)} |
---|
135 | <form method="post" > |
---|
136 | <fieldset id="mainConf"> |
---|
137 | <strong>{'Customize meta Open Graph image'|@translate}</strong> |
---|
138 | <div style="margin: 0 0 0 20px" class="mogradio">{html_radios separator="<br>" name="metaogconfishowpa" values=$mog1 output=$mog1T selected="{$metaogconfig.MOGSPA}"}</div> |
---|
139 | <br> |
---|
140 | <strong>{'albums for list choose photos for Open Graph image'|@translate}</strong> |
---|
141 | <br> |
---|
142 | <select data-selectize="categories" data-value="{$metaogconfig.choose_albums|@json_encode|escape:html}" |
---|
143 | placeholder="{'Type in a search term'|translate}" |
---|
144 | name="moglistea[]" multiple style="width:600px;"></select> |
---|
145 | <br> |
---|
146 | {'Size for Open Graph metadata'|@translate} :<br> |
---|
147 | {html_options name="metaogconfigsize" values=$metaogsizelist output=$metaogsizelistT selected=$metaogconfig.MOGsize} |
---|
148 | <br> |
---|
149 | <br> |
---|
150 | {'Default language for local Open Graph'|@translate} :<br> |
---|
151 | <select name="metaogconfiglo"> |
---|
152 | <option value="a">-----</option> |
---|
153 | <option value="b">{'no delault language'|@translate}</option> |
---|
154 | {foreach from=$info_lang item=infolang} |
---|
155 | <option value="{$infolang.OGLID}" {$infolang.LANGSELECT}>{$infolang.OGLNAME}</option> |
---|
156 | {/foreach} |
---|
157 | </select> |
---|
158 | <br> |
---|
159 | <br> |
---|
160 | {'Site name for Open Graph'|@translate} :<br> |
---|
161 | <textarea rows="2" cols="60" name="metaogconfigsname" id="metaogconfigsname" class="metaogconfigsname">{$metaogconfig.MOGSN}</textarea> |
---|
162 | <br> |
---|
163 | <br> |
---|
164 | {'Face Book:app_id'|@translate} :<br> |
---|
165 | <input type="text" name="metaogconfigfb" value="{$metaogconfig.MOGFB}" size="110" maxlenght="110"> |
---|
166 | <br> |
---|
167 | <br> |
---|
168 | twitter:card : {'The card type, which will be one of summary or summary_large_image.'|@translate}<br> |
---|
169 | {html_options name="metaogconfigtwca" values=$metaogtwcalist output=$metaogtwcalistT selected=$metaogconfig.MOGTCA} |
---|
170 | <br> |
---|
171 | <br> |
---|
172 | twitter:site : {'@username for the website used in the card footer'|@translate}<br> |
---|
173 | <input type="text" name="metaogconfitws" value="{$metaogconfig.MOGTS}" size="110" maxlenght="110"> |
---|
174 | <br> |
---|
175 | <br> |
---|
176 | twitter:creator: {'@username for the content creator / author.'|@translate}<br> |
---|
177 | <input type="text" name="metaogconfitwcr" value="{$metaogconfig.MOGTCR}" size="110" maxlenght="110"> |
---|
178 | <br> |
---|
179 | <br> |
---|
180 | <p> |
---|
181 | <input class="submit" type="submit" name="submitogconfig" value="{'Submit'|@translate}"> |
---|
182 | <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}"> |
---|
183 | </p> |
---|
184 | </form> |
---|
185 | {/if} |
---|