NextGEN Gallery – WordPress Gallery Plugin - Version 1.0.0

Version Description

Download this release

Release Info

Developer alexrabe
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 1.0.0
Comparing to
See all releases

Code changes from version 0.99.1 to 1.0.0

Files changed (86) hide show
  1. admin/about.php +177 -118
  2. admin/addgallery.php +51 -94
  3. admin/admin.php +326 -121
  4. admin/ajax.php +55 -0
  5. admin/album.php +63 -66
  6. admin/css/jquery.tabs-ie.css +0 -15
  7. admin/css/jquery.tabs.css +0 -83
  8. admin/css/jquery.ui.tabs.css +30 -24
  9. admin/css/nggadmin.css +252 -16
  10. admin/css/nggadmin.wp23.css +0 -129
  11. admin/css/nggadmin.wp25.css +0 -312
  12. admin/css/tags-admin.css +10 -0
  13. admin/functions.php +482 -454
  14. admin/images/menu-bits.gif +0 -0
  15. admin/images/nextgen.png +0 -0
  16. ngginstall.php → admin/install.php +108 -101
  17. admin/js/interface.js +0 -12
  18. admin/js/jquery.js +0 -11
  19. admin/js/jquery.tabs.js +0 -642
  20. admin/js/jquery.tabs.pack.js +0 -14
  21. admin/js/jquery.ui.tabs.js +532 -532
  22. admin/js/jquery.ui.tabs.pack.js +9 -9
  23. admin/js/ngg.ajax.js +73 -0
  24. admin/js/ngg.progressbar.js +78 -0
  25. admin/js/swfobject.js +4 -4
  26. admin/js/swfupload.handler.js +3 -3
  27. admin/js/swfupload.js +656 -760
  28. admin/js/swfupload.swf +0 -0
  29. admin/js/swfupload_f9.swf +0 -0
  30. admin/js/uploadtab.js.php +0 -270
  31. admin/manage-galleries.php +69 -0
  32. admin/manage-images.php +496 -0
  33. admin/manage-sort.php +110 -0
  34. admin/manage.php +339 -642
  35. admin/{wp25/media-upload.php → media-upload.php} +25 -21
  36. admin/myimport.php +0 -89
  37. admin/overview.php +189 -169
  38. admin/roles.php +14 -6
  39. admin/settings.php +195 -245
  40. admin/setup.php +18 -44
  41. admin/showmeta.php +13 -12
  42. admin/sort.php +0 -86
  43. admin/style.php +106 -91
  44. admin/tags.php +284 -0
  45. {tinymce3 → admin/tinymce}/editor_plugin.js +78 -78
  46. tinymce3/langs/de_de.js → admin/tinymce/langs/de.js +0 -0
  47. admin/tinymce/langs/de_de.js +6 -0
  48. {tinymce3 → admin/tinymce}/langs/en.js +0 -0
  49. {tinymce3 → admin/tinymce}/langs/en_US.js +0 -0
  50. admin/tinymce/nextgen.gif +0 -0
  51. {tinymce3 → admin/tinymce}/tinymce.js +76 -75
  52. admin/tinymce/tinymce.php +101 -0
  53. {tinymce → admin/tinymce}/window.php +9 -14
  54. admin/upgrade.php +204 -0
  55. admin/upload.php +14 -9
  56. admin/uploadtab.php +0 -232
  57. admin/wp25/about.php +0 -225
  58. admin/wp25/addgallery.php +0 -296
  59. admin/wp25/admin.php +0 -168
  60. admin/wp25/album.php +0 -287
  61. admin/wp25/functions.php +0 -939
  62. admin/wp25/index.html +0 -0
  63. admin/wp25/manage.php +0 -785
  64. admin/wp25/overview.php +0 -413
  65. admin/wp25/roles.php +0 -108
  66. admin/wp25/settings.php +0 -633
  67. admin/wp25/setup.php +0 -83
  68. admin/wp25/showmeta.php +0 -127
  69. admin/wp25/sort.php +0 -86
  70. admin/wp25/style.php +0 -220
  71. admin/wp25/upload.php +0 -59
  72. admin/wp25/wpmu.php +0 -106
  73. admin/wpmu.php +1 -3
  74. changelog.txt +39 -6
  75. css/Black_Minimalism.css +22 -13
  76. css/hovereffect.css +21 -11
  77. css/ngg_dkret3.css +294 -284
  78. css/ngg_k2.css +20 -10
  79. css/ngg_shadow.css +20 -10
  80. css/ngg_shadow2.css +20 -10
  81. css/nggallery.css +21 -11
  82. images/mrss-icon.gif +0 -0
  83. images/piclens.gif +0 -0
  84. lang/nggallery-de_DE.mo +0 -0
  85. lang/nggallery-de_DE.po +1606 -1063
  86. lang/nggallery.po +699 -509
admin/about.php CHANGED
@@ -7,11 +7,10 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
7
 
8
  <div class="wrap">
9
  <h2><?php _e('Copyright notes / Credits', 'nggallery') ;?></h2>
10
- <fieldset class="options">
11
- <legend><?php _e("NextGEN DEV Team", 'nggallery'); ?></legend>
12
  <p><?php _e('This plugin is primarily developed, maintained, supported, documented by', 'nggallery'); ?> <a href="http://alexrabe.boelinger.com" target="_blank">Alex Rabe</a>. <?php _e('There are many other folks who have made contributions to this project :', 'nggallery') ;?></p>
13
  <p><?php ngg_list_contributors(); ?></p>
14
- <legend><?php _e("Contributors / Tribute to", 'nggallery'); ?></legend>
15
  <p><?php _e('If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together.', 'nggallery') ;?>
16
  <?php _e('So, we would like to thank the following people for their pioneer work (without this work it\'s impossible to create such a plugin so fast)', 'nggallery') ;?></p>
17
  <ul>
@@ -20,20 +19,21 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
20
  <li><a href="http://www.gen-x-design.com" target="_blank">Ian Selby</a> <?php _e('for the fantastic PHP Thumbnail Class', 'nggallery') ;?></li>
21
  <li><a href="http://www.phpconcept.net" target="_blank">Vincent Blavet</a> <?php _e('for PclZip , a PHP library that manage ZIP archives', 'nggallery') ;?></li>
22
  <li><a href="http://www.lesterchan.net/" target="_blank">GaMerZ</a> <?php _e('for a lot of very useful plugins and ideas', 'nggallery') ;?></li>
23
- <li><a href="http://www.stuff.yellowswordfish.com/" target="_blank">Andy Staines</a> <?php _e('for Simple:Press Forum, it saved me a lot of time', 'nggallery') ;?></li>
24
  <li><a href="http://www.jeroenwijering.com/" target="_blank">Jeroen Wijering</a> <?php _e('for the best Media Flash Scripts on earth', 'nggallery') ;?></li>
 
25
  <li><a href="http://watermark.malcherek.com/" target="_blank">Marek Malcherek</a> <?php _e('for the Watermark plugin', 'nggallery') ;?></li>
26
  </ul>
27
  <p><?php _e('If you didn\'t find your name on this list and there is some code which I integrate in my plugin, don\'t hesitate to send me a mail.', 'nggallery') ;?></p>
28
- <legend><?php _e("How to support ?", 'nggallery'); ?></legend>
29
  <p><?php _e('There exist several ways to contribute, help or support us in this work. Non of them are mandatory.', 'nggallery') ;?></p>
30
  <ul>
31
  <li><strong><?php _e('Send us bugfixes / code changes', 'nggallery') ;?></strong><br /><?php _e('The most motivated support for this plugin are your ideas and brain work', 'nggallery') ;?></li>
32
- <li><strong><?php _e('Translate the plugin', 'nggallery') ;?></strong><br /><?php _e('To help people to work with this plugin, I would like to have it in all avaivable languages', 'nggallery') ;?></li>
33
  <li><strong><?php _e('Donate the work via paypal', 'nggallery') ;?></strong><br />
34
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" >
35
  <input type="hidden" name="cmd" value="_xclick"/><input type="hidden" name="business" value="alterego@boelinger.com"/>
36
- <input type="hidden" name="item_name" value="WordPress Plugins www.alexrabe.boelinger.com"/>
37
  <input type="hidden" name="no_shipping" value="1"/><input type="hidden" name="return" value="http://alexrabe.boelinger.com/" />
38
  <input type="hidden" name="cancel_return" value="http://alexrabe.boelinger.com/"/>
39
  <input type="hidden" name="lc" value="US" />
@@ -41,14 +41,13 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
41
  <input type="hidden" name="tax" value="0"/>
42
  <input type="hidden" name="bn" value="PP-DonationsBF"/>
43
  <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="border: none;"/>
44
- </form><?php _e('No doubt a very usefull and easy motivation :-)', 'nggallery') ;?>
45
  </li>
46
  <li><strong><?php _e('Place a link to the plugin in your blog/webpage', 'nggallery') ;?></strong><br /><?php _e('Yes, share and trackback is also a good support for this work ', 'nggallery') ;?></li>
47
  </ul>
48
- <legend><?php _e("Thanks!", 'nggallery'); ?></legend>
49
  <p><?php _e('We would like to thank this people which support us in the work :', 'nggallery') ;?></p>
50
  <p><a href="http://www.boelinger.com/heike/" target="_blank">HEIKE</a>, <?php ngg_list_support(); ?></p>
51
- </fieldset>
52
  </div>
53
 
54
  <?php
@@ -58,46 +57,61 @@ function ngg_list_contributors() {
58
  /* The list of my contributors. Thanks to all of them !*/
59
 
60
  $contributors = array(
61
- "Frederic De Ranter (AJAX code contributor)" => "http://li.deranter.com/",
62
- "Christian Arnold (Code contributor)" => "http://blog.arctic-media.de/",
63
- "Thomas Matzke (Album code contributor)" => "http://mufuschnu.mu.funpic.de/",
64
- "KeViN (Sidebar Widget developer)" => "http://www.kev.hu/",
65
- "Lazy (German Translation)" => "http://www.lazychris.de/",
66
- "Lise (French Translation)" => "http://liseweb.fr/",
67
- "Anja (Dutch Translation)" => "http://www.werkgroepen.net/wordpress",
68
- "Adrian (Indonesian Translation)" => "http://adrian.web.id/",
69
- "Gaspard Tseng / SillyCCSmile (Chinese Translation)" => "",
70
- "Mika Pennanen (Finnish Translation)" => "http://kapsi.fi/~penni",
71
- "Wojciech Owczarek (Polish Translation)" => "http://www.owczi.net",
72
- "Dilip Ramirez (Spanish Translation)" => "http://jmtd.110mb.com/blog",
73
- "Oleinikov Vedmak Evgeny (Russian Translation)" => "http://ka-2-03.mirea.org/",
74
- "Sebastien MALHERBE (Logo design)" => "http://www.7vision.com/",
75
- "Claudia (German documentation)" => "http://www.blog-werkstatt.de/",
76
- "Robert (German documentation)" => "http://www.curlyrob.de/",
77
- "Pierpaolo Mannone (Italian Translation)" => "http://www.interscambiocasa.com/",
78
- "Mattias Tengblad (Swedish Translation)" => "http://wp-support.se/",
79
- "M&uuml;fit Kiper (Swedish Translation)" => "http://www.kiper.se/",
80
- "Gil Yaker (Documentation)" => "http://bamboosoup.com/",
81
- "Morten Johansen (Danish Translation)" => "http://www.fr3ak.dk/",
82
- "Vidar Seland (Norwegian Translation)" => "http://www.viidar.net/",
83
- "Emre G&uuml;ler (Turkish Translation)" => "http://www.emreguler.com/",
84
- "Emilio Lauretti (Italian Translation)" => "",
85
- "Jan Angelovic (Czech Translation)" => "http://www.angelovic.cz/",
86
- "Laki (Slovak Translation)" => "http://www.laki.sk/",
87
- "Rowan Crane (WPMU support)" => "http://blog.rowancrane.com/",
88
- "Kuba Zwolinski (Polish Translation)" => "http://kubazwolinski.com/",
89
- "Rina Jiang (Chinese Translation)" => "http://http://mysticecho.net/",
90
- "Anthony (Chinese Translation)" => "http://www.angryouth.com/",
91
- "Milan Vasicek (Czech Translation)" => "http://www.NoWorkTeam.cz/",
92
- "Joo Gi-young (Korean Translation)" => "http://lombric.linuxstudy.pe.kr/wp/",
93
- "Oleg A. Safonov (Russian Translation)" => "http://blog.olart.ru",
94
- "AleXander Kirichev (Bulgarian Translation)" => "http://xsakex.art-bg.org/",
95
- "Richer Yang (Chinese Translation)" => "http://fantasyworld.idv.tw/",
96
- "Bill Jones (Forums contributor)" => "http://jonesphoto.bluehorizoninternet.com/",
97
- "TheDonSansone (Forums contributor)" => "http://abseiling.200blogs.co.uk/",
98
- "Komyshov (Russian Translation)" => "http://kf-web.ru/",
99
- "aleX Zhang (Chinese Translation)" => "http://zhangfei.info/",
100
- "TheSoloist (Chinese Translation)" => "http://www.soloist-ic.cn/"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  );
102
 
103
  ksort($contributors);
@@ -120,75 +134,120 @@ function ngg_list_support() {
120
  /* The list of my supporters. Thanks to all of them !*/
121
 
122
  $supporter = array(
123
-
124
- "Mike DAmbrose" => "http://www.videovisions.com/",
125
- "Ideablogger" => "http://www.ablogofideas.net/",
126
- "Chuck Coury" => "",
127
- "Kelter" => "http://www.badcat.com",
128
- "Martin Bahr" => "http://www.law-vodcast.de/",
129
- "Marcel Kneuer" => "",
130
- "Martin Bahr" => "http://www.law-vodcast.de/",
131
- "Alakhnor" => "http://www.alakhnor.info",
132
- "Rod" => "http://www.le-hiboo.com",
133
- "Ttancm" => "http://www.ttancm.com/",
134
- "Francoise Pescatore" => "" ,
135
- "Andreas (die-andis)" => "http://www.rummel-platz.de/",
136
- "Andreas" => "http://blog.friedlandreas.de/",
137
- "Joern Kretzschmar" => "http://diekretzschmars.de/",
138
- "Mike" => "http://www.mikemuscroft.com/",
139
- "Sabine (Haselina)" => "http://www.haselina.de/",
140
- "Milemann" => "",
141
- "Kees de Bruin" => "http://www.kdbruin.net/fotoalbum/",
142
- "Helene D." => "http://supernatural.hellioness.com/imagegallery/",
143
- "Ghettomaster" => "http://www.ghettoworld.de/",
144
- "Joe Pharis" => "http://www.southernstylecruisers.com/",
145
- "Charlie (Jump Media)" => "",
146
- "Simon Paarlberg" => "http://www.paarlberg.dk/",
147
- "Clive Loseby" => "http://www.access-bydesign.com/",
148
- "Tonny Kluften" => "http://www.tinnitus-behandling.info/",
149
- "Andreas Oeye" => "http://www.andreasoye.com/",
150
- "Laurent Momy" => "",
151
- "Patrick Hennessey" => "http://www.digitalvagabonding.com/",
152
- "Hans Kiesouw" => "http://www.digitalvagabonding.com/",
153
- "Thomas Bradley" => "http://www.tobeon.co.uk/wordpress/",
154
- "Frederic Deghetto" => "",
155
- "Christopher Weddell" => "",
156
- "Martin Scholz" => "",
157
- "Non Eric" => "http://www.lunatec.de/",
158
- "Ronen Hirsch" => "http://www.stillcreation.com/",
159
- "Michael Erhart" => "",
160
- "Luc Saint-Elie" => "http://luc.saint-elie.com/",
161
- "Matthew Barker" => "",
162
- "Emanuel Kluge" => "",
163
- "Alba Bentos Pereira" => "",
164
- "Bill Babcock" => "http://www.bnj.com",
165
- "Jesper Haug Karsrud" => "http://www.beyond-sanity.com",
166
- "Marco van de Ven" => "http://www.mvdven.nl",
167
- "Peter Krabshuis" => "http://www.dragoneye.nl",
168
- "Teresa Lo" => "http://www.invivoanalytics.com",
169
- "Jes Carlskov" => "",
170
- "John Statler" => "http://www.systemsolver.com",
171
- "Joshua Katinger" => "http://www.accessionmedia.com",
172
- "iSight Technologies" => "http://www.isighttech.com",
173
- "Kay Germer" => "http://highkay.de/",
174
- "Ramon Cutanda Lopez" => "",
175
- "Luc Dubois" => "http://www.oriste.com/",
176
- "Dixie Reid" => "http://www.thereids.co.nz/",
177
- "Gareth Bridger" => "",
178
- "McGillveray Studios" => "http://www.mcgillveraystudios.ca/",
179
- "Paul Rogers" => "http://www.swarfworks.com",
180
- "Steve Lieber" => "http://www.stevelieber.com",
181
- "Modo Web Design" => "http://www.modowebdesign.com",
182
- "Matthew Feldman" => "",
183
- "Gideon Kiers" => "http://www.gideonkiers.com",
184
- "Susan Bates" => "http://www.fineartsmith.com",
185
- "ILISA International USA" => "http://www.ilisa.com",
186
- "Mark Campbell" => "http://www.layersofcolor.com",
187
- "Aaron Snyder" => "http://www.aaronsnyder.net",
188
- "Patrick Pirker" => "",
189
- "Christoph Wander" => ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  );
191
-
192
 
193
  ksort($supporter);
194
  $i = count($supporter);
7
 
8
  <div class="wrap">
9
  <h2><?php _e('Copyright notes / Credits', 'nggallery') ;?></h2>
10
+ <h3 class="tablenav"><?php _e("NextGEN DEV Team", 'nggallery'); ?></h3>
 
11
  <p><?php _e('This plugin is primarily developed, maintained, supported, documented by', 'nggallery'); ?> <a href="http://alexrabe.boelinger.com" target="_blank">Alex Rabe</a>. <?php _e('There are many other folks who have made contributions to this project :', 'nggallery') ;?></p>
12
  <p><?php ngg_list_contributors(); ?></p>
13
+ <h3 class="tablenav"><?php _e("Contributors / Tribute to", 'nggallery'); ?></h3>
14
  <p><?php _e('If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together.', 'nggallery') ;?>
15
  <?php _e('So, we would like to thank the following people for their pioneer work (without this work it\'s impossible to create such a plugin so fast)', 'nggallery') ;?></p>
16
  <ul>
19
  <li><a href="http://www.gen-x-design.com" target="_blank">Ian Selby</a> <?php _e('for the fantastic PHP Thumbnail Class', 'nggallery') ;?></li>
20
  <li><a href="http://www.phpconcept.net" target="_blank">Vincent Blavet</a> <?php _e('for PclZip , a PHP library that manage ZIP archives', 'nggallery') ;?></li>
21
  <li><a href="http://www.lesterchan.net/" target="_blank">GaMerZ</a> <?php _e('for a lot of very useful plugins and ideas', 'nggallery') ;?></li>
22
+ <li><a href="http://www.laptoptips.ca/" target="_blank">Andrew Ozz</a> <?php _e('for Shutter Reloaded, a real lightweight image effect', 'nggallery') ;?></li>
23
  <li><a href="http://www.jeroenwijering.com/" target="_blank">Jeroen Wijering</a> <?php _e('for the best Media Flash Scripts on earth', 'nggallery') ;?></li>
24
+ <li><a href="http://www.pinvoke.com/" target="_blank">Yusuke Kamiyamane</a> <?php _e('for the Fugue Iconset', 'nggallery') ;?></li>
25
  <li><a href="http://watermark.malcherek.com/" target="_blank">Marek Malcherek</a> <?php _e('for the Watermark plugin', 'nggallery') ;?></li>
26
  </ul>
27
  <p><?php _e('If you didn\'t find your name on this list and there is some code which I integrate in my plugin, don\'t hesitate to send me a mail.', 'nggallery') ;?></p>
28
+ <h3 class="tablenav"><?php _e("How to support ?", 'nggallery'); ?></h3>
29
  <p><?php _e('There exist several ways to contribute, help or support us in this work. Non of them are mandatory.', 'nggallery') ;?></p>
30
  <ul>
31
  <li><strong><?php _e('Send us bugfixes / code changes', 'nggallery') ;?></strong><br /><?php _e('The most motivated support for this plugin are your ideas and brain work', 'nggallery') ;?></li>
32
+ <li><strong><?php _e('Translate the plugin', 'nggallery') ;?></strong><br /><?php _e('To help people to work with this plugin, I would like to have it in all available languages', 'nggallery') ;?></li>
33
  <li><strong><?php _e('Donate the work via paypal', 'nggallery') ;?></strong><br />
34
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" >
35
  <input type="hidden" name="cmd" value="_xclick"/><input type="hidden" name="business" value="alterego@boelinger.com"/>
36
+ <input type="hidden" name="item_name" value="NextGEN Gallery plugin www.alexrabe.boelinger.com"/>
37
  <input type="hidden" name="no_shipping" value="1"/><input type="hidden" name="return" value="http://alexrabe.boelinger.com/" />
38
  <input type="hidden" name="cancel_return" value="http://alexrabe.boelinger.com/"/>
39
  <input type="hidden" name="lc" value="US" />
41
  <input type="hidden" name="tax" value="0"/>
42
  <input type="hidden" name="bn" value="PP-DonationsBF"/>
43
  <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="border: none;"/>
44
+ </form><?php _e('No doubt a very useful and easy motivation :-)', 'nggallery') ;?>
45
  </li>
46
  <li><strong><?php _e('Place a link to the plugin in your blog/webpage', 'nggallery') ;?></strong><br /><?php _e('Yes, share and trackback is also a good support for this work ', 'nggallery') ;?></li>
47
  </ul>
48
+ <h3 class="tablenav"><?php _e("Thanks!", 'nggallery'); ?></h3>
49
  <p><?php _e('We would like to thank this people which support us in the work :', 'nggallery') ;?></p>
50
  <p><a href="http://www.boelinger.com/heike/" target="_blank">HEIKE</a>, <?php ngg_list_support(); ?></p>
 
51
  </div>
52
 
53
  <?php
57
  /* The list of my contributors. Thanks to all of them !*/
58
 
59
  $contributors = array(
60
+ 'Vincent Prat (Code contributor)' => 'http://www.vincentprat.info',
61
+ 'Frederic De Ranter (AJAX code contributor)' => 'http://li.deranter.com/',
62
+ 'Christian Arnold (Code contributor)' => 'http://blog.arctic-media.de/',
63
+ 'Thomas Matzke (Album code contributor)' => 'http://mufuschnu.mu.funpic.de/',
64
+ 'KeViN (Sidebar Widget developer)' => 'http://www.kev.hu/',
65
+ 'Lazy (German Translation)' => 'http://www.lazychris.de/',
66
+ 'Lise (French Translation)' => 'http://liseweb.fr/',
67
+ 'Anja (Dutch Translation)' => 'http://www.werkgroepen.net/wordpress',
68
+ 'Adrian (Indonesian Translation)' => 'http://adrian.web.id/',
69
+ 'Gaspard Tseng / SillyCCSmile (Chinese Translation)' => '',
70
+ 'Mika Pennanen (Finnish Translation)' => 'http://kapsi.fi/~penni',
71
+ 'Wojciech Owczarek (Polish Translation)' => 'http://www.owczi.net',
72
+ 'Dilip Ramirez (Spanish Translation)' => 'http://jmtd.110mb.com/blog',
73
+ 'Oleinikov Vedmak Evgeny (Russian Translation)' => 'http://ka-2-03.mirea.org/',
74
+ 'Sebastien MALHERBE (Logo design)' => 'http://www.7vision.com/',
75
+ 'Claudia (German documentation)' => 'http://www.blog-werkstatt.de/',
76
+ 'Robert (German documentation)' => 'http://www.curlyrob.de/',
77
+ 'Pierpaolo Mannone (Italian Translation)' => 'http://www.interscambiocasa.com/',
78
+ 'Mattias Tengblad (Swedish Translation)' => 'http://wp-support.se/',
79
+ 'M&uuml;fit Kiper (Swedish Translation)' => 'http://www.kiper.se/',
80
+ 'Gil Yaker (Documentation)' => 'http://bamboosoup.com/',
81
+ 'Morten Johansen (Danish Translation)' => 'http://www.fr3ak.dk/',
82
+ 'Vidar Seland (Norwegian Translation)' => 'http://www.viidar.net/',
83
+ 'Emre G&uuml;ler (Turkish Translation)' => 'http://www.emreguler.com/',
84
+ 'Emilio Lauretti (Italian Translation)' => '',
85
+ 'Jan Angelovic (Czech Translation)' => 'http://www.angelovic.cz/',
86
+ 'Laki (Slovak Translation)' => 'http://www.laki.sk/',
87
+ 'Rowan Crane (WPMU support)' => 'http://blog.rowancrane.com/',
88
+ 'Kuba Zwolinski (Polish Translation)' => 'http://kubazwolinski.com/',
89
+ 'Rina Jiang (Chinese Translation)' => 'http://http://mysticecho.net/',
90
+ 'Anthony (Chinese Translation)' => 'http://www.angryouth.com/',
91
+ 'Milan Vasicek (Czech Translation)' => 'http://www.NoWorkTeam.cz/',
92
+ 'Joo Gi-young (Korean Translation)' => 'http://lombric.linuxstudy.pe.kr/wp/',
93
+ 'Oleg A. Safonov (Russian Translation)' => 'http://blog.olart.ru',
94
+ 'AleXander Kirichev (Bulgarian Translation)' => 'http://xsakex.art-bg.org/',
95
+ 'Richer Yang (Chinese Translation)' => 'http://fantasyworld.idv.tw/',
96
+ 'Bill Jones (Forums contributor)' => 'http://jonesphoto.bluehorizoninternet.com/',
97
+ 'TheDonSansone (Forums contributor)' => 'http://abseiling.200blogs.co.uk/',
98
+ 'Komyshov (Russian Translation)' => 'http://kf-web.ru/',
99
+ 'aleX Zhang (Chinese Translation)' => 'http://zhangfei.info/',
100
+ 'TheSoloist (Chinese Translation)' => 'http://www.soloist-ic.cn/',
101
+ 'Nica Luigi Cristian (Romanian Translation)' => 'http://www.cristiannica.com/',
102
+ 'Zdenek Hatas (Czech Translation)' => '',
103
+ 'David Potter (Documentation and Help)' => 'http://dpotter.net/',
104
+ 'Carlale Chen (Chinese Translation)' => 'http://0-o-0.cc/',
105
+ 'Nica Luigi Cristian (Romanian Translation)' => 'http://www.cristiannica.com/',
106
+ 'Igor Shevkoplyas (Russian Translation)' => 'http://www.russian-translation-matters.com',
107
+ 'Alexandr Kindras (Code contributor)' => 'http://www.fixdev.com',
108
+ 'Manabu Togawa (Japanese Translation)' => 'http://www.churadesign.com/',
109
+ 'Serhiy Tretyak (Ukrainian Translation)' => 'http://designpoint.com.ua/',
110
+ 'Janis Grinvalds (Latvian Translation)' => 'http://riga.bmxrace.lv/',
111
+ 'Kristoffer Th&oslash;ring (Norwegian Translation)' => '',
112
+ 'Flactarus (Italian Translation)' => 'http://www.giroevago.it',
113
+ 'Felip Alfred Galit&oacute; i Trilla (Catalan Translation)' => 'http://www.bratac.cat',
114
+ 'Luka Komac (Slovenian Translation)' => 'http://www.komac.biz'
115
  );
116
 
117
  ksort($contributors);
134
  /* The list of my supporters. Thanks to all of them !*/
135
 
136
  $supporter = array(
137
+ 'Mike DAmbrose' => 'http://www.videovisions.com/',
138
+ 'Ideablogger' => 'http://www.ablogofideas.net/',
139
+ 'Chuck Coury' => '',
140
+ 'Kelter' => 'http://www.badcat.com',
141
+ 'Martin Bahr' => 'http://www.law-vodcast.de/',
142
+ 'Marcel Kneuer' => '',
143
+ 'Alakhnor' => 'http://www.alakhnor.info',
144
+ 'Rod' => 'http://www.le-hiboo.com',
145
+ 'Ttancm' => 'http://www.ttancm.com/',
146
+ 'Francoise Pescatore' => '' ,
147
+ 'Andreas (die-andis)' => 'http://www.rummel-platz.de/',
148
+ 'Andreas' => 'http://blog.friedlandreas.de/',
149
+ 'Joern Kretzschmar' => 'http://diekretzschmars.de/',
150
+ 'Mike' => 'http://www.mikemuscroft.com/',
151
+ 'Sabine (Haselina)' => 'http://www.haselina.de/',
152
+ 'Milemann' => '',
153
+ 'Kees de Bruin' => 'http://www.kdbruin.net/fotoalbum/',
154
+ 'Helene D.' => 'http://supernatural.hellioness.com/imagegallery/',
155
+ 'Ghettomaster' => 'http://www.ghettoworld.de/',
156
+ 'Joe Pharis' => 'http://www.southernstylecruisers.com/',
157
+ 'Charlie (Jump Media)' => '',
158
+ 'Simon Paarlberg' => 'http://www.paarlberg.dk/',
159
+ 'Clive Loseby' => 'http://www.access-bydesign.com/',
160
+ 'Tonny Kluften' => 'http://www.tinnitus-behandling.info/',
161
+ 'Andreas Oeye' => 'http://www.andreasoye.com/',
162
+ 'Laurent Momy' => '',
163
+ 'Patrick Hennessey' => 'http://www.digitalvagabonding.com/',
164
+ 'Hans Kiesouw' => 'http://www.digitalvagabonding.com/',
165
+ 'Thomas Bradley' => 'http://www.tobeon.co.uk/wordpress/',
166
+ 'Frederic Deghetto' => '',
167
+ 'Christopher Weddell' => '',
168
+ 'Martin Scholz' => '',
169
+ 'Non Eric' => 'http://www.lunatec.de/',
170
+ 'Ronen Hirsch' => 'http://www.stillcreation.com/',
171
+ 'Michael Erhart' => '',
172
+ 'Luc Saint-Elie' => 'http://luc.saint-elie.com/',
173
+ 'Matthew Barker' => '',
174
+ 'Emanuel Kluge' => '',
175
+ 'Alba Bentos Pereira' => '',
176
+ 'Bill Babcock' => 'http://www.bnj.com',
177
+ 'Jesper Haug Karsrud' => 'http://www.beyond-sanity.com',
178
+ 'Marco van de Ven' => 'http://www.mvdven.nl',
179
+ 'Peter Krabshuis' => 'http://www.dragoneye.nl',
180
+ 'Teresa Lo' => 'http://www.invivoanalytics.com',
181
+ 'Jes Carlskov' => '',
182
+ 'John Statler' => 'http://www.systemsolver.com',
183
+ 'Joshua Katinger' => 'http://www.accessionmedia.com',
184
+ 'iSight Technologies' => 'http://www.isighttech.com',
185
+ 'Kay Germer' => 'http://highkay.de/',
186
+ 'Ramon Cutanda Lopez' => '',
187
+ 'Luc Dubois' => 'http://www.oriste.com/',
188
+ 'Dixie Reid' => 'http://www.thereids.co.nz/',
189
+ 'Gareth Bridger' => '',
190
+ 'McGillveray Studios' => 'http://www.mcgillveraystudios.ca/',
191
+ 'Paul Rogers' => 'http://www.swarfworks.com',
192
+ 'Steve Lieber' => 'http://www.stevelieber.com',
193
+ 'Modo Web Design' => 'http://www.modowebdesign.com',
194
+ 'Matthew Feldman' => '',
195
+ 'Gideon Kiers' => 'http://www.gideonkiers.com',
196
+ 'Susan Bates' => 'http://www.fineartsmith.com',
197
+ 'ILISA International USA' => 'http://www.ilisa.com',
198
+ 'Mark Campbell' => 'http://www.layersofcolor.com',
199
+ 'Aaron Snyder' => 'http://www.aaronsnyder.net',
200
+ 'Patrick Pirker' => '',
201
+ 'Christoph Wander' => '',
202
+ 'Monterey Bay Singles LLC' => '',
203
+ 'Elvina Flower' => '',
204
+ 'Colossal Pups' => '',
205
+ 'Florian Seuret' => '',
206
+ 'Petri Teittinen' => '',
207
+ 'Deval Shah' => 'http://www.LuvPix.net',
208
+ 'Simply Charlotte Mason, LLC' => '',
209
+ 'John Williams' => '',
210
+ 'George Branchflower' => '',
211
+ 'Douglas J Barnum' => '',
212
+ 'Bradford Weir' => 'http://www.bweir.com',
213
+ 'Almost Anything Desktop Publishing' => 'http://www.almost-anything.com.au/',
214
+ 'Aengus Moran' => '',
215
+ 'Fias Co Farm' => 'http://www.fiascofarm.com',
216
+ 'Overdrive Design Labs' => 'http://www.overdrivedesign.biz',
217
+ 'Lincoln Hardwood and Tool Company, Inc.' => 'http://www.lhtcinc.com',
218
+ 'Kurt Perschke' => 'http://www.redballproject.com',
219
+ 'Christian Hoegl' => 'http://www.creativbox.at',
220
+ 'John Swartz' => 'http://www.jswartz.net',
221
+ 'Michael Kubala' => '',
222
+ 'Kyle Meyers' => '',
223
+ 'DF Design' => '',
224
+ 'Olivia Loh' => '',
225
+ 'Henner Guenter' => 'http://www.rvweser.de',
226
+ 'Fadli Fadli' => '',
227
+ 'Philippe Vanhoolandt' => 'http://www.ramdam.com',
228
+ 'Gary Verhoff' => '',
229
+ 'Detlev Danner' => 'http://www.mcdd.ch',
230
+ 'Laa&szlig; / Brembs GbR' => 'http://www.camoart.com',
231
+ 'Dean Cowan' => 'http://www.deanandlinda.com',
232
+ 'Ross Calloway' => '',
233
+ 'Scott Kyle' => '',
234
+ 'Allan Corfix Lykke' => '',
235
+ 'Marieke van de Pol' => '',
236
+ 'Tobias Kern' => 'http://www.tobikern.de',
237
+ 'Sander van Loon' => '',
238
+ 'Daniel Oliver Habenicht' => 'http://www.audioschmiede.de',
239
+ 'Michael Sinclair' => '',
240
+ 'Serira Designs' => 'http://www.seriradesigns.com',
241
+ 'Wang Qingsheng' => '',
242
+ 'Maurice van der Linden' => 'http://www.vd-linden.nl',
243
+ 'Sandra Longmore' => '',
244
+ 'Grupo Probeta' => 'http://www.grupoprobeta.com',
245
+ 'Aaron Simpson' => '',
246
+ 'Dana Burns' => '',
247
+ 'Craig Thompson' => 'http://www.globalwebhq.com/',
248
+ 'Cynthia Spangler' => 'http://www.parkcityweb.com/',
249
+ 'Guy Raif' => ''
250
  );
 
251
 
252
  ksort($supporter);
253
  $i = count($supporter);
admin/addgallery.php CHANGED
@@ -6,11 +6,10 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
6
 
7
  function nggallery_admin_add_gallery() {
8
 
9
- global $wpdb;
10
- $ngg_options = get_option('ngg_options');
11
 
12
  // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
13
- $filepath = get_option('siteurl') . '/wp-admin/admin.php?page='.$_GET['page'];
14
 
15
  // link for the flash file
16
  $swf_upload_link = NGGALLERY_URLPATH . 'admin/upload.php';
@@ -18,28 +17,28 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
18
  //flash doesn't seem to like encoded ampersands, so convert them back here
19
  $swf_upload_link = str_replace('&#038;', '&', $swf_upload_link);
20
 
21
- $defaultpath = $ngg_options['gallerypath'];
22
-
23
  if ($_POST['addgallery']){
24
  check_admin_referer('ngg_addgallery');
25
- $newgallery = attribute_escape($_POST['galleryname']);
26
- if (!empty($newgallery))
27
  nggAdmin::create_gallery($newgallery, $defaultpath);
28
  }
29
 
30
  if ($_POST['zipupload']){
31
  check_admin_referer('ngg_addgallery');
32
  if ($_FILES['zipfile']['error'] == 0)
33
- $messagetext = nggAdmin::import_zipfile($defaultpath);
34
  else
35
- nggallery::show_error(__('Upload failed!','nggallery'));
36
  }
37
 
38
  if ($_POST['importfolder']){
39
  check_admin_referer('ngg_addgallery');
40
  $galleryfolder = $_POST['galleryfolder'];
41
- if ((!empty($galleryfolder)) AND ($defaultpath != $galleryfolder))
42
- $messagetext = nggAdmin::import_gallery($galleryfolder);
43
  }
44
 
45
  if ($_POST['uploadimage']){
@@ -48,53 +47,38 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
48
  $messagetext = nggAdmin::upload_images();
49
  }
50
  else
51
- nggallery::show_error(__('Upload failed!','nggallery'));
52
  }
53
 
54
  if (isset($_POST['swf_callback'])){
55
  if ($_POST['galleryselect'] == "0" )
56
- nggallery::show_error(__('No gallery selected !','nggallery'));
57
  else {
58
  // get the path to the gallery
59
  $galleryID = (int) $_POST['galleryselect'];
60
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
61
- $messagetext = nggAdmin::import_gallery($gallerypath);
62
  }
63
  }
64
 
65
  if ( isset($_POST['disable_flash']) ){
66
  check_admin_referer('ngg_addgallery');
67
- $ngg_options['swfUpload'] = false;
68
- update_option('ngg_options', $ngg_options);
69
  }
70
 
71
  if ( isset($_POST['enable_flash']) ){
72
  check_admin_referer('ngg_addgallery');
73
- $ngg_options['swfUpload'] = true;
74
- update_option('ngg_options', $ngg_options);
75
  }
76
-
77
- //get maximum allowable size from php.ini
78
- //thx to Whoismanu PhotoQ / M.Flury
79
- $max_upl_size = strtolower( ini_get( 'upload_max_filesize' ) );
80
- $max_upl_kbytes = 0;
81
- if (strpos($max_upl_size, 'k') !== false)
82
- $max_upl_kbytes = $max_upl_size;
83
- if (strpos($max_upl_size, 'm') !== false)
84
- $max_upl_kbytes = $max_upl_size * 1024;
85
- if (strpos($max_upl_size, 'g') !== false)
86
- $max_upl_kbytes = $max_upl_size * 1024 * 1024;
87
-
88
- // message windows
89
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
90
  ?>
91
-
92
- <!-- Additional IE/Win specific style sheet (Conditional Comments) -->
93
- <!--[if lte IE 7]>
94
- <link rel="stylesheet" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.tabs-ie.css" type="text/css" media="projection, screen"/>
95
- <![endif]-->
96
 
97
- <?php if($ngg_options['swfUpload']) { ?>
98
  <!-- SWFUpload script -->
99
  <script type="text/javascript">
100
  var ngg_swf_upload;
@@ -103,10 +87,17 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
103
  ngg_swf_upload = new SWFUpload({
104
  // Backend settings
105
  upload_url : "<?php echo $swf_upload_link; ?>",
106
- flash_url : "<?php echo NGGALLERY_URLPATH; ?>admin/js/swfupload_f9.swf",
 
 
 
 
 
 
 
107
 
108
  // File Upload Settings
109
- file_size_limit : "<?php echo $max_upl_kbytes;?> kb", // can use in WP2.5 wp_max_upload_size()
110
  file_types : "*.jpg;*.gif;*.png",
111
  file_types_description : "<?php _e('Image Files', 'nggallery') ;?>",
112
 
@@ -121,8 +112,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
121
  upload_complete_handler : uploadComplete,
122
 
123
  post_params : {
124
- "user_cookie" : "<?php echo $_COOKIE[USER_COOKIE]; ?>",
125
- "pass_cookie" : "<?php echo $_COOKIE[PASS_COOKIE]; ?>",
126
  "galleryselect" : "0"
127
  },
128
 
@@ -167,7 +157,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
167
  <!-- jQuery Tabs script -->
168
  <script type="text/javascript">
169
  jQuery(function() {
170
- jQuery('#slider').tabs({ fxFade: true, fxSpeed: 'fast' });
171
  });
172
  </script>
173
 
@@ -189,8 +179,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
189
  <h2><?php _e('Add new gallery', 'nggallery') ;?></h2>
190
  <form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8" >
191
  <?php wp_nonce_field('ngg_addgallery') ?>
192
- <fieldset class="options">
193
- <table class="optiontable">
194
  <tr valign="top">
195
  <th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
196
  <td><input type="text" size="35" name="galleryname" value="" /><br />
@@ -200,8 +189,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
200
  <i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
201
  </tr>
202
  </table>
203
- <div class="submit"><input type="submit" name= "addgallery" value="<?php _e('Add gallery', 'nggallery') ;?>"/></div>
204
- </fieldset>
205
  </form>
206
  </div>
207
  <?php if ( wpmu_enable_function('wpmuZipUpload')) { ?>
@@ -210,8 +198,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
210
  <h2><?php _e('Upload a Zip-File', 'nggallery') ;?></h2>
211
  <form name="zipupload" id="zipupload_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#zipupload'; ?>" accept-charset="utf-8" >
212
  <?php wp_nonce_field('ngg_addgallery') ?>
213
- <fieldset class="options">
214
- <table class="optiontable">
215
  <tr valign="top">
216
  <th scope="row"><?php _e('Select Zip-File', 'nggallery') ;?>:</th>
217
  <td><input type="file" name="zipfile" id="zipfile" size="35" class="uploadform"/><br />
@@ -222,25 +209,15 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
222
  <td><select name="zipgalselect">
223
  <option value="0" ><?php _e('a new gallery', 'nggallery') ?></option>
224
  <?php
225
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
226
- if(is_array($gallerylist)) {
227
- foreach($gallerylist as $gallery) {
228
- echo '<option value="'.$gallery->name.'" >'.$gallery->name.' | '.$gallery->title.'</option>'."\n";
229
- }
230
- }
231
  ?>
232
  </select>
233
  <br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
234
  <br /><?php if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck') ) display_space_usage(); ?></td>
235
  </tr>
236
- <tr>
237
- <th><?php _e('Add Metadata :', 'nggallery') ;?></th>
238
- <td><input type="checkbox" name="addmetadata" value="1" checked="checked" />
239
- <?php _e('Import EXIF, IPTC or XMP data (if available)', 'nggallery') ;?></td>
240
- </tr>
241
  </table>
242
- <div class="submit"> <input type="submit" name= "zipupload" value="<?php _e('Start upload', 'nggallery') ;?>"/></div>
243
- </fieldset>
244
  </form>
245
  </div>
246
  <?php }
@@ -250,22 +227,15 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
250
  <h2><?php _e('Import image folder', 'nggallery') ;?></h2>
251
  <form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $filepath.'#importfolder'; ?>" accept-charset="utf-8" >
252
  <?php wp_nonce_field('ngg_addgallery') ?>
253
- <fieldset class="options">
254
- <table class="optiontable">
255
  <tr valign="top">
256
- <th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?><br /><code><?php echo WINABSPATH; ?></code></th>
257
- <td><br /><input type="text" size="35" name="galleryfolder" value="<?php echo$defaultpath; ?>" /><br />
258
- <?php _e('Import a folder with images. Please note :', 'nggallery') ;?><br />
259
- <?php _e('For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?></td>
260
- </tr>
261
- <tr>
262
- <th><?php _e('Add Metadata :', 'nggallery') ;?></th>
263
- <td><input type="checkbox" name="addmetadata" value="1" checked="checked" />
264
- <?php _e('Import EXIF, IPTC or XMP data (if available)', 'nggallery') ;?></td>
265
  </tr>
266
  </table>
267
- <div class="submit"> <input type="submit" name= "importfolder" value="<?php _e('Import folder', 'nggallery') ;?>"/></div>
268
- </fieldset>
269
  </form>
270
  </div>
271
  <?php } ?>
@@ -274,48 +244,35 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
274
  <h2><?php _e('Upload Images', 'nggallery') ;?></h2>
275
  <form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#uploadimage'; ?>" accept-charset="utf-8" >
276
  <?php wp_nonce_field('ngg_addgallery') ?>
277
- <fieldset class="options">
278
- <table class="optiontable">
279
  <tr valign="top">
280
  <th scope="row"><?php _e('Upload image', 'nggallery') ;?></th>
281
- <td><input type="file" name="imagefiles" id="imagefiles" size="35" class="imagefiles"/></td>
282
  </tr>
283
  <tr valign="top">
284
  <th scope="row"><?php _e('in to', 'nggallery') ;?></th>
285
  <td><select name="galleryselect" id="galleryselect">
286
  <option value="0" ><?php _e('Choose gallery', 'nggallery') ?></option>
287
  <?php
288
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
289
- if(is_array($gallerylist)) {
290
- foreach($gallerylist as $gallery) {
291
- echo '<option value="'.$gallery->gid.'" >'.$gallery->name.' | '.$gallery->title.'</option>'."\n";
292
- }
293
- }
294
  ?>
295
  </select>
296
  <br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
297
  <br /><?php if ((IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck')) display_space_usage(); ?></td>
298
  </tr>
299
- <tr>
300
- <th><?php _e('Add Metadata :', 'nggallery') ;?></th>
301
- <td><input type="checkbox" name="addmetadata" value="1" checked="checked" />
302
- <?php _e('Import EXIF, IPTC or XMP data (if available)', 'nggallery') ;?></td>
303
- </tr>
304
  </table>
305
  <div class="submit">
306
- <?php if ($ngg_options['swfUpload']) { ?>
307
  <input type="submit" name="disable_flash" id="disable_flash" title="<?php _e('The batch upload requires Adobe Flash 9, disable it if you have problems','nggallery') ?>" value="<?php _e('Disable flash upload', 'nggallery') ;?>" />
308
  <?php } else { ?>
309
  <input type="submit" name="enable_flash" id="enable_flash" title="<?php _e('Upload multiple files at once by ctrl/shift-selecting in dialog','nggallery') ?>" value="<?php _e('Enable flash based upload', 'nggallery') ;?>" />
310
  <?php } ?>
311
- <input type="submit" name="uploadimage" id="uploadimage_btn" value="<?php _e('Upload images', 'nggallery') ;?>" />
312
  </div>
313
- </fieldset>
314
  </form>
315
  </div>
316
  </div>
317
-
318
  <?php
319
  }
320
-
321
  ?>
6
 
7
  function nggallery_admin_add_gallery() {
8
 
9
+ global $wpdb, $ngg;
 
10
 
11
  // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
12
+ $filepath = admin_url() . 'admin.php?page=' . $_GET['page'];
13
 
14
  // link for the flash file
15
  $swf_upload_link = NGGALLERY_URLPATH . 'admin/upload.php';
17
  //flash doesn't seem to like encoded ampersands, so convert them back here
18
  $swf_upload_link = str_replace('&#038;', '&', $swf_upload_link);
19
 
20
+ $defaultpath = $ngg->options['gallerypath'];
21
+
22
  if ($_POST['addgallery']){
23
  check_admin_referer('ngg_addgallery');
24
+ $newgallery = attribute_escape( $_POST['galleryname']);
25
+ if ( !empty($newgallery) )
26
  nggAdmin::create_gallery($newgallery, $defaultpath);
27
  }
28
 
29
  if ($_POST['zipupload']){
30
  check_admin_referer('ngg_addgallery');
31
  if ($_FILES['zipfile']['error'] == 0)
32
+ $messagetext = nggAdmin::import_zipfile( intval( $_POST['zipgalselect'] ) );
33
  else
34
+ nggGallery::show_error( __('Upload failed!','nggallery') );
35
  }
36
 
37
  if ($_POST['importfolder']){
38
  check_admin_referer('ngg_addgallery');
39
  $galleryfolder = $_POST['galleryfolder'];
40
+ if ( ( !empty($galleryfolder) ) AND ($defaultpath != $galleryfolder) )
41
+ nggAdmin::import_gallery($galleryfolder);
42
  }
43
 
44
  if ($_POST['uploadimage']){
47
  $messagetext = nggAdmin::upload_images();
48
  }
49
  else
50
+ nggGallery::show_error( __('Upload failed!','nggallery') );
51
  }
52
 
53
  if (isset($_POST['swf_callback'])){
54
  if ($_POST['galleryselect'] == "0" )
55
+ nggGallery::show_error(__('No gallery selected !','nggallery'));
56
  else {
57
  // get the path to the gallery
58
  $galleryID = (int) $_POST['galleryselect'];
59
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
60
+ nggAdmin::import_gallery($gallerypath);
61
  }
62
  }
63
 
64
  if ( isset($_POST['disable_flash']) ){
65
  check_admin_referer('ngg_addgallery');
66
+ $ngg->options['swfUpload'] = false;
67
+ update_option('ngg_options', $ngg->options);
68
  }
69
 
70
  if ( isset($_POST['enable_flash']) ){
71
  check_admin_referer('ngg_addgallery');
72
+ $ngg->options['swfUpload'] = true;
73
+ update_option('ngg_options', $ngg->options);
74
  }
75
+
76
+ //get all galleries (after we added new ones)
77
+ $gallerylist = nggdb::find_all_galleries();
78
+
 
 
 
 
 
 
 
 
 
 
79
  ?>
 
 
 
 
 
80
 
81
+ <?php if($ngg->options['swfUpload']) { ?>
82
  <!-- SWFUpload script -->
83
  <script type="text/javascript">
84
  var ngg_swf_upload;
87
  ngg_swf_upload = new SWFUpload({
88
  // Backend settings
89
  upload_url : "<?php echo $swf_upload_link; ?>",
90
+ flash_url : "<?php echo NGGALLERY_URLPATH; ?>admin/js/swfupload.swf",
91
+
92
+ // Button Settings
93
+ button_placeholder_id : "spanButtonPlaceholder",
94
+ button_width: 272,
95
+ button_height: 27,
96
+ button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
97
+ button_cursor: SWFUpload.CURSOR.HAND,
98
 
99
  // File Upload Settings
100
+ file_size_limit : "<?php echo wp_max_upload_size(); ?>b",
101
  file_types : "*.jpg;*.gif;*.png",
102
  file_types_description : "<?php _e('Image Files', 'nggallery') ;?>",
103
 
112
  upload_complete_handler : uploadComplete,
113
 
114
  post_params : {
115
+ "auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",
 
116
  "galleryselect" : "0"
117
  },
118
 
157
  <!-- jQuery Tabs script -->
158
  <script type="text/javascript">
159
  jQuery(function() {
160
+ jQuery('#slider > ul').tabs({ fxFade: true, fxSpeed: 'fast' });
161
  });
162
  </script>
163
 
179
  <h2><?php _e('Add new gallery', 'nggallery') ;?></h2>
180
  <form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8" >
181
  <?php wp_nonce_field('ngg_addgallery') ?>
182
+ <table class="form-table">
 
183
  <tr valign="top">
184
  <th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
185
  <td><input type="text" size="35" name="galleryname" value="" /><br />
189
  <i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
190
  </tr>
191
  </table>
192
+ <div class="submit"><input class="button-primary" type="submit" name= "addgallery" value="<?php _e('Add gallery', 'nggallery') ;?>"/></div>
 
193
  </form>
194
  </div>
195
  <?php if ( wpmu_enable_function('wpmuZipUpload')) { ?>
198
  <h2><?php _e('Upload a Zip-File', 'nggallery') ;?></h2>
199
  <form name="zipupload" id="zipupload_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#zipupload'; ?>" accept-charset="utf-8" >
200
  <?php wp_nonce_field('ngg_addgallery') ?>
201
+ <table class="form-table">
 
202
  <tr valign="top">
203
  <th scope="row"><?php _e('Select Zip-File', 'nggallery') ;?>:</th>
204
  <td><input type="file" name="zipfile" id="zipfile" size="35" class="uploadform"/><br />
209
  <td><select name="zipgalselect">
210
  <option value="0" ><?php _e('a new gallery', 'nggallery') ?></option>
211
  <?php
212
+ foreach($gallerylist as $gallery)
213
+ echo '<option value="' . $gallery->gid . '" >' . $gallery->title . '</option>' . "\n";
 
 
 
 
214
  ?>
215
  </select>
216
  <br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
217
  <br /><?php if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck') ) display_space_usage(); ?></td>
218
  </tr>
 
 
 
 
 
219
  </table>
220
+ <div class="submit"><input class="button-primary" type="submit" name= "zipupload" value="<?php _e('Start upload', 'nggallery') ;?>"/></div>
 
221
  </form>
222
  </div>
223
  <?php }
227
  <h2><?php _e('Import image folder', 'nggallery') ;?></h2>
228
  <form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $filepath.'#importfolder'; ?>" accept-charset="utf-8" >
229
  <?php wp_nonce_field('ngg_addgallery') ?>
230
+ <table class="form-table">
 
231
  <tr valign="top">
232
+ <th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?></th>
233
+ <td><input type="text" size="35" name="galleryfolder" value="<?php echo $defaultpath; ?>" /><br />
234
+ <?php _e('Import a folder with all images.', 'nggallery') ;?>
235
+ <?php if (SAFE_MODE) {?><br /><?php _e(' Please note : For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?><?php }; ?></td>
 
 
 
 
 
236
  </tr>
237
  </table>
238
+ <div class="submit"><input class="button-primary" type="submit" name= "importfolder" value="<?php _e('Import folder', 'nggallery') ;?>"/></div>
 
239
  </form>
240
  </div>
241
  <?php } ?>
244
  <h2><?php _e('Upload Images', 'nggallery') ;?></h2>
245
  <form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#uploadimage'; ?>" accept-charset="utf-8" >
246
  <?php wp_nonce_field('ngg_addgallery') ?>
247
+ <table class="form-table">
 
248
  <tr valign="top">
249
  <th scope="row"><?php _e('Upload image', 'nggallery') ;?></th>
250
+ <td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles" id="imagefiles" size="35" class="imagefiles"/></td>
251
  </tr>
252
  <tr valign="top">
253
  <th scope="row"><?php _e('in to', 'nggallery') ;?></th>
254
  <td><select name="galleryselect" id="galleryselect">
255
  <option value="0" ><?php _e('Choose gallery', 'nggallery') ?></option>
256
  <?php
257
+ foreach($gallerylist as $gallery)
258
+ echo '<option value="' . $gallery->gid . '" >' . $gallery->title . '</option>' ."\n";
 
 
 
 
259
  ?>
260
  </select>
261
  <br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
262
  <br /><?php if ((IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck')) display_space_usage(); ?></td>
263
  </tr>
 
 
 
 
 
264
  </table>
265
  <div class="submit">
266
+ <?php if ($ngg->options['swfUpload']) { ?>
267
  <input type="submit" name="disable_flash" id="disable_flash" title="<?php _e('The batch upload requires Adobe Flash 9, disable it if you have problems','nggallery') ?>" value="<?php _e('Disable flash upload', 'nggallery') ;?>" />
268
  <?php } else { ?>
269
  <input type="submit" name="enable_flash" id="enable_flash" title="<?php _e('Upload multiple files at once by ctrl/shift-selecting in dialog','nggallery') ?>" value="<?php _e('Enable flash based upload', 'nggallery') ;?>" />
270
  <?php } ?>
271
+ <input class="button-primary" type="submit" name="uploadimage" id="uploadimage_btn" value="<?php _e('Upload images', 'nggallery') ;?>" />
272
  </div>
 
273
  </form>
274
  </div>
275
  </div>
 
276
  <?php
277
  }
 
278
  ?>
admin/admin.php CHANGED
@@ -1,169 +1,374 @@
1
  <?php
2
- // ************************************
3
- // ** Admin Section for NextGEN Gallery
4
- // ** by Alex Rabe
5
- // ************************************
6
-
7
- // add to header in admin area
8
- add_action('admin_head', 'ngg_header');
9
- function ngg_header() {
10
- global $wp_version;
11
- echo "\n".'<meta name="NextGEN" content="'.NGGVERSION.'" />';
12
- echo "\n".'<meta http-equiv="pragma" content="no-cache" />'."\n";
13
-
14
- // add CSS for NextGEN pages
15
- switch ($_GET['page']) {
16
- case NGGFOLDER :
17
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/nggadmin.wp23.css" type="text/css" media="screen" />'."\n";
18
- break;
19
- case "nggallery-add-gallery" :
20
- case "nggallery-options" :
21
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/nggadmin.wp23.css" type="text/css" media="screen" />'."\n";
22
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/jquery.tabs.css" type="text/css" media="print, projection, screen" />'."\n";
23
- break;
24
- case "nggallery-manage-gallery" :
25
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'thickbox/thickbox.css" type="text/css" media="print, projection, screen" />'."\n";
26
- case "nggallery-roles" :
27
- case "nggallery-manage-album" :
28
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/nggadmin.wp23.css" type="text/css" media="screen" />'."\n";
29
- break;
30
  }
31
- }
32
 
33
- include_once (dirname (__FILE__)."/uploadtab.php");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- // load script files depend on page
36
- add_action('init', 'ngg_add_admin_js',1);
37
- function ngg_add_admin_js() {
38
- global $wp_version;
39
-
40
- if ($wp_version < "2.5") {
41
- wp_deregister_script('jquery');
42
- wp_register_script('jquery', NGGALLERY_URLPATH .'admin/js/jquery.js', FALSE, '1.2.2');
43
- }
44
- switch ($_GET['page']) {
45
- case "nggallery-manage-gallery" :
46
- if ($wp_version < "2.5") wp_deregister_script('interface');
47
- wp_enqueue_script('interface', NGGALLERY_URLPATH .'admin/js/interface.js', array('jquery'), '1.2.1');
48
- wp_enqueue_script('thickbox', NGGALLERY_URLPATH .'thickbox/thickbox-pack.js', array('jquery'), '3.1.1');
49
- break;
50
- case "nggallery-manage-album" :
51
- if ($wp_version < "2.5") wp_deregister_script('interface');
52
- wp_enqueue_script('interface', NGGALLERY_URLPATH .'admin/js/interface.js', array('jquery'), '1.2.1');
53
- break;
54
- case "nggallery-options" :
55
- wp_enqueue_script('tabs', NGGALLERY_URLPATH .'admin/js/jquery.tabs.pack.js', array('jquery'), '2.7.4');
56
- break;
57
- case "nggallery-add-gallery" :
58
- wp_enqueue_script('tabs', NGGALLERY_URLPATH .'admin/js/jquery.tabs.pack.js', array('jquery'), '2.7.4');
59
- wp_enqueue_script('mutlifile', NGGALLERY_URLPATH .'admin/js/jquery.MultiFile.js', array('jquery'), '1.1.1');
60
- wp_enqueue_script('swfupload', NGGALLERY_URLPATH .'admin/js/swfupload.js', array('jquery'), '2.0.1');
61
- wp_enqueue_script('swfupload-handler', NGGALLERY_URLPATH .'admin/js/swfupload.handler.js', array('swfupload'), '1.0.0');
62
- break;
63
  }
64
- // required for upload tab
65
- if ( ($_GET['tab'] == 'ngg_gallery') && ($_GET['style'] != 'inline') )
66
- wp_enqueue_script('thickbox', NGGALLERY_URLPATH .'thickbox/thickbox-pack.js', array('jquery'), '3.1.2');
67
- }
68
 
69
-
70
- // add to menu
71
- add_action('admin_menu', 'add_nextgen_gallery_menu');
72
-
73
- function add_nextgen_gallery_menu()
74
- {
75
- add_menu_page(__('Gallery', 'nggallery'), __('Gallery', 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, 'show_menu');
76
- add_submenu_page( NGGFOLDER , __('Add Gallery', 'nggallery'), __('Add Gallery', 'nggallery'), 'NextGEN Upload images', 'nggallery-add-gallery', 'show_menu');
77
- add_submenu_page( NGGFOLDER , __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', 'show_menu');
78
- add_submenu_page( NGGFOLDER , __('Album', 'nggallery'), __('Album', 'nggallery'), 'NextGEN Edit album', 'nggallery-manage-album', 'show_menu');
79
- add_submenu_page( NGGFOLDER , __('Options', 'nggallery'), __('Options', 'nggallery'), 'NextGEN Change options', 'nggallery-options', 'show_menu');
80
- if (wpmu_enable_function('wpmuStyle'))
81
- add_submenu_page( NGGFOLDER , __('Style', 'nggallery'), __('Style', 'nggallery'), 'NextGEN Change style', 'nggallery-style', 'show_menu');
82
- add_submenu_page( NGGFOLDER , __('Setup Gallery', 'nggallery'), __('Setup', 'nggallery'), 'activate_plugins', 'nggallery-setup', 'show_menu');
83
- if (wpmu_enable_function('wpmuRoles'))
84
- add_submenu_page( NGGFOLDER , __('Roles', 'nggallery'), __('Roles', 'nggallery'), 'activate_plugins', 'nggallery-roles', 'show_menu');
85
- add_submenu_page( NGGFOLDER , __('About this Gallery', 'nggallery'), __('About', 'nggallery'), 'NextGEN Gallery overview', 'nggallery-about', 'show_menu');
86
- if (wpmu_site_admin())
87
- add_submenu_page( 'wpmu-admin.php' , __('NextGEN Gallery', 'nggallery'), __('NextGEN Gallery', 'nggallery'), 'activate_plugins', 'nggallery-wpmu', 'show_menu');
88
 
89
- }
90
-
91
- /************************************************************************/
92
-
93
- // reduce footprint
94
- // Thx to http://weblogtoolscollection.com/archives/2007/07/09/reduce-the-size-of-your-wordpress-plugin-footprint/
95
-
96
- function show_menu() {
97
- global $wp_version;
98
- switch ($_GET["page"]){
 
 
 
 
99
  case "nggallery-add-gallery" :
100
- include_once (dirname (__FILE__). '/functions.php'); // admin functions
101
- include_once (dirname (__FILE__). '/addgallery.php'); // nggallery_admin_add_gallery
102
  nggallery_admin_add_gallery();
103
  break;
104
  case "nggallery-manage-gallery" :
105
- include_once (dirname (__FILE__). '/functions.php'); // admin functions
106
- include_once (dirname (__FILE__). '/manage.php'); // nggallery_admin_manage_gallery
107
- nggallery_admin_manage_gallery();
 
 
 
 
108
  break;
109
  case "nggallery-manage-album" :
110
- include_once (dirname (__FILE__). '/album.php'); // nggallery_admin_manage_album
111
  nggallery_admin_manage_album();
112
  break;
113
  case "nggallery-options" :
114
- include_once (dirname (__FILE__). '/settings.php'); // nggallery_admin_options
115
  nggallery_admin_options();
116
  break;
 
 
 
117
  case "nggallery-style" :
118
- include_once (dirname (__FILE__). '/style.php'); // nggallery_admin_style
119
  nggallery_admin_style();
120
  break;
121
  case "nggallery-setup" :
122
- include_once (dirname (__FILE__). '/setup.php'); // nggallery_admin_setup
123
  nggallery_admin_setup();
124
  break;
125
  case "nggallery-roles" :
126
- include_once (dirname (__FILE__). '/roles.php'); // nggallery_admin_roles
127
  nggallery_admin_roles();
128
  break;
129
  case "nggallery-import" :
130
- include_once (dirname (__FILE__). '/myimport.php'); // nggallery_admin_import
131
  nggallery_admin_import();
132
  break;
133
  case "nggallery-about" :
134
- include_once (dirname (__FILE__). '/about.php'); // nggallery_admin_about
135
  nggallery_admin_about();
136
  break;
137
  case "nggallery-wpmu" :
138
- include_once (dirname (__FILE__). '/style.php');
139
- include_once (dirname (__FILE__). '/wpmu.php'); // nggallery_wpmu_admin
140
  nggallery_wpmu_setup();
141
  break;
142
  case "nggallery" :
143
  default :
144
- include_once (dirname (__FILE__). '/overview.php'); // nggallery_admin_overview
145
  nggallery_admin_overview();
146
  break;
147
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
 
149
- }
150
 
151
- /**************************************************************************/
152
- function wpmu_site_admin() {
153
- // Check for site admin
154
- if (function_exists(is_site_admin))
155
- if (is_site_admin())
156
- return true;
157
-
158
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
 
161
- function wpmu_enable_function($value) {
162
- if (IS_WPMU) {
163
- $ngg_options = get_site_option('ngg_options');
164
- return $ngg_options[$value];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  }
166
- // if this is not WPMU, enable it !
167
- return true;
168
  }
 
 
169
  ?>
1
  <?php
2
+ /**
3
+ * nggAdminPanel - Admin Section for NextGEN Gallery
4
+ *
5
+ * @package NextGEN Gallery
6
+ * @author Alex Rabe
7
+ * @copyright 2008
8
+ * @since 1.0.0
9
+ */
10
+ class nggAdminPanel{
11
+
12
+ // constructor
13
+ function nggAdminPanel() {
14
+
15
+ // Add the admin menu
16
+ add_action( 'admin_menu', array (&$this, 'add_menu') );
17
+
18
+ // Add the script and style files
19
+ add_action('admin_print_scripts', array(&$this, 'load_scripts') );
20
+ add_action('admin_print_styles', array(&$this, 'load_styles') );
21
+
22
+ add_filter('contextual_help', array(&$this, 'show_help'), 10, 2);
23
+
 
 
 
 
 
 
24
  }
 
25
 
26
+ // integrate the menu
27
+ function add_menu() {
28
+
29
+ add_menu_page( __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ), __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ), 'NextGEN Gallery overview', NGGFOLDER, array (&$this, 'show_menu'), NGGALLERY_URLPATH .'admin/images/nextgen.png' );
30
+ add_submenu_page( NGGFOLDER , __('Overview', 'nggallery'), __('Overview', 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array (&$this, 'show_menu'));
31
+ add_submenu_page( NGGFOLDER , __('Add Gallery / Images', 'nggallery'), __('Add Gallery / Images', 'nggallery'), 'NextGEN Upload images', 'nggallery-add-gallery', array (&$this, 'show_menu'));
32
+ add_submenu_page( NGGFOLDER , __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', array (&$this, 'show_menu'));
33
+ add_submenu_page( NGGFOLDER , __ngettext( 'Album', 'Albums', 1, 'nggallery' ), __ngettext( 'Album', 'Albums', 1, 'nggallery' ), 'NextGEN Edit album', 'nggallery-manage-album', array (&$this, 'show_menu'));
34
+ add_submenu_page( NGGFOLDER , __('Tags', 'nggallery'), __('Tags', 'nggallery'), 'NextGEN Manage tags', 'nggallery-tags', array (&$this, 'show_menu'));
35
+ add_submenu_page( NGGFOLDER , __('Options', 'nggallery'), __('Options', 'nggallery'), 'NextGEN Change options', 'nggallery-options', array (&$this, 'show_menu'));
36
+ if (wpmu_enable_function('wpmuStyle'))
37
+ add_submenu_page( NGGFOLDER , __('Style', 'nggallery'), __('Style', 'nggallery'), 'NextGEN Change style', 'nggallery-style', array (&$this, 'show_menu'));
38
+ add_submenu_page( NGGFOLDER , __('Setup Gallery', 'nggallery'), __('Setup', 'nggallery'), 'activate_plugins', 'nggallery-setup', array (&$this, 'show_menu'));
39
+ if (wpmu_enable_function('wpmuRoles'))
40
+ add_submenu_page( NGGFOLDER , __('Roles', 'nggallery'), __('Roles', 'nggallery'), 'activate_plugins', 'nggallery-roles', array (&$this, 'show_menu'));
41
+ add_submenu_page( NGGFOLDER , __('About this Gallery', 'nggallery'), __('About', 'nggallery'), 'NextGEN Gallery overview', 'nggallery-about', array (&$this, 'show_menu'));
42
+ if ( wpmu_site_admin() )
43
+ add_submenu_page( 'wpmu-admin.php' , __('NextGEN Gallery', 'nggallery'), __('NextGEN Gallery', 'nggallery'), 'activate_plugins', 'nggallery-wpmu', array (&$this, 'show_menu'));
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
 
 
 
 
46
 
47
+ // load the script for the defined page and load only this code
48
+ function show_menu() {
49
+
50
+ global $ngg;
51
+
52
+ // init PluginChecker
53
+ $nggCheck = new CheckPlugin();
54
+ $nggCheck->URL = NGGURL;
55
+ $nggCheck->version = NGGVERSION;
56
+ $nggCheck->name = "ngg";
 
 
 
 
 
 
 
 
 
57
 
58
+ // check for upgrade and show upgrade screen
59
+ if( get_option( 'ngg_db_version' ) != NGG_DBVERSION ) {
60
+ include_once ( dirname (__FILE__) . '/functions.php' );
61
+ include_once ( dirname (__FILE__) . '/upgrade.php' );
62
+ nggallery_upgrade_page();
63
+ return;
64
+ }
65
+
66
+ // Show update message
67
+ if ( $nggCheck->startCheck() && (!IS_WPMU) ) {
68
+ echo '<div class="plugin-update">' . __('A new version of NextGEN Gallery is available !', 'nggallery') . ' <a href="http://wordpress.org/extend/plugins/nextgen-gallery/download/" target="_blank">' . __('Download here', 'nggallery') . '</a></div>' ."\n";
69
+ }
70
+
71
+ switch ($_GET['page']){
72
  case "nggallery-add-gallery" :
73
+ include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
74
+ include_once ( dirname (__FILE__) . '/addgallery.php' ); // nggallery_admin_add_gallery
75
  nggallery_admin_add_gallery();
76
  break;
77
  case "nggallery-manage-gallery" :
78
+ include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
79
+ include_once ( dirname (__FILE__) . '/manage.php' ); // nggallery_admin_manage_gallery
80
+ // Initate the Manage Gallery page
81
+ $ngg->manage_page = new nggManageGallery ();
82
+ // Render the output now, because you cannot access a object during the constructor is not finished
83
+ $ngg->manage_page->controller();
84
+
85
  break;
86
  case "nggallery-manage-album" :
87
+ include_once ( dirname (__FILE__) . '/album.php' ); // nggallery_admin_manage_album
88
  nggallery_admin_manage_album();
89
  break;
90
  case "nggallery-options" :
91
+ include_once ( dirname (__FILE__) . '/settings.php' ); // nggallery_admin_options
92
  nggallery_admin_options();
93
  break;
94
+ case "nggallery-tags" :
95
+ include_once ( dirname (__FILE__) . '/tags.php' ); // nggallery_admin_tags
96
+ break;
97
  case "nggallery-style" :
98
+ include_once ( dirname (__FILE__) . '/style.php' ); // nggallery_admin_style
99
  nggallery_admin_style();
100
  break;
101
  case "nggallery-setup" :
102
+ include_once ( dirname (__FILE__) . '/setup.php' ); // nggallery_admin_setup
103
  nggallery_admin_setup();
104
  break;
105
  case "nggallery-roles" :
106
+ include_once ( dirname (__FILE__) . '/roles.php' ); // nggallery_admin_roles
107
  nggallery_admin_roles();
108
  break;
109
  case "nggallery-import" :
110
+ include_once ( dirname (__FILE__) . '/myimport.php' ); // nggallery_admin_import
111
  nggallery_admin_import();
112
  break;
113
  case "nggallery-about" :
114
+ include_once ( dirname (__FILE__) . '/about.php' ); // nggallery_admin_about
115
  nggallery_admin_about();
116
  break;
117
  case "nggallery-wpmu" :
118
+ include_once ( dirname (__FILE__) . '/style.php' );
119
+ include_once ( dirname (__FILE__) . '/wpmu.php' ); // nggallery_wpmu_admin
120
  nggallery_wpmu_setup();
121
  break;
122
  case "nggallery" :
123
  default :
124
+ include_once ( dirname (__FILE__) . '/overview.php' ); // nggallery_admin_overview
125
  nggallery_admin_overview();
126
  break;
127
  }
128
+ }
129
+
130
+ function load_scripts() {
131
+
132
+ wp_register_script('ngg-ajax', NGGALLERY_URLPATH .'admin/js/ngg.ajax.js', array('jquery'), '1.0.0');
133
+ wp_localize_script('ngg-ajax', 'nggAjaxSetup', array(
134
+ 'url' => admin_url('admin-ajax.php'),
135
+ 'action' => 'ngg_ajax_operation',
136
+ 'operation' => '',
137
+ 'nonce' => wp_create_nonce( 'ngg-ajax' ),
138
+ 'ids' => '',
139
+ 'permission' => __('You do not have the correct permission', 'nggallery'),
140
+ 'error' => __('Unexpected Error', 'nggallery'),
141
+ 'failure' => __('A failure occurred', 'nggallery')
142
+ ) );
143
+ wp_register_script('ngg-progressbar', NGGALLERY_URLPATH .'admin/js/ngg.progressbar.js', array('jquery'), '1.0.0');
144
+ wp_register_script('swfupload_f10', NGGALLERY_URLPATH .'admin/js/swfupload.js', array('jquery'), '2.2.0');
145
+
146
+ switch ($_GET['page']) {
147
+ case NGGFOLDER :
148
+ wp_enqueue_script( 'postbox' );
149
+ case "nggallery-manage-gallery" :
150
+ wp_enqueue_script( 'postbox' );
151
+ wp_enqueue_script( 'ngg-ajax' );
152
+ wp_enqueue_script( 'ngg-progressbar' );
153
+ add_thickbox();
154
+ break;
155
+ case "nggallery-manage-album" :
156
+ wp_enqueue_script( 'jquery-ui-sortable' );
157
+ break;
158
+ case "nggallery-options" :
159
+ wp_enqueue_script( 'jquery-ui-tabs' );
160
+ break;
161
+ case "nggallery-add-gallery" :
162
+ wp_enqueue_script( 'jquery-ui-tabs' );
163
+ wp_enqueue_script( 'mutlifile', NGGALLERY_URLPATH .'admin/js/jquery.MultiFile.js', array('jquery'), '1.1.1' );
164
+ wp_enqueue_script( 'ngg-swfupload-handler', NGGALLERY_URLPATH .'admin/js/swfupload.handler.js', array('swfupload_f10'), '1.0.0' );
165
+ wp_enqueue_script( 'ngg-ajax' );
166
+ wp_enqueue_script( 'ngg-progressbar' );
167
+ break;
168
+ }
169
+ }
170
+
171
+ function load_styles() {
172
+
173
+ switch ($_GET['page']) {
174
+ case NGGFOLDER :
175
+ wp_enqueue_style( 'nggadmin', NGGALLERY_URLPATH .'admin/css/nggadmin.css', false, '2.7.0', 'screen' );
176
+ wp_admin_css( 'css/dashboard' );
177
+ break;
178
+ case "nggallery-add-gallery" :
179
+ case "nggallery-options" :
180
+ wp_enqueue_style( 'nggtabs', NGGALLERY_URLPATH .'admin/css/jquery.ui.tabs.css', false, '2.5.0', 'screen' );
181
+ case "nggallery-manage-gallery" :
182
+ case "nggallery-roles" :
183
+ case "nggallery-manage-album" :
184
+ wp_enqueue_style( 'nggadmin', NGGALLERY_URLPATH .'admin/css/nggadmin.css', false, '2.7.0', 'screen' );
185
+ wp_enqueue_style( 'thickbox');
186
+ break;
187
+ case "nggallery-tags" :
188
+ wp_enqueue_style( 'nggtags', NGGALLERY_URLPATH .'admin/css/tags-admin.css', false, '2.6.0', 'screen' );
189
+ break;
190
+ case "nggallery-style" :
191
+ wp_admin_css( 'css/theme-editor' );
192
+ break;
193
+ }
194
+ }
195
+
196
+ function show_help($help, $screen) {
197
+
198
+ $link = '';
199
+ // menu title is localized...
200
+ $i18n = strtolower ( __('Gallery', 'nggallery') );
201
+
202
+ switch ($screen) {
203
+ case 'toplevel_page_' . NGGFOLDER :
204
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Introduction</a>', 'nggallery');
205
+ break;
206
+ case "{$i18n}_page_nggallery-setup" :
207
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Setup</a>', 'nggallery');
208
+ break;
209
+ case "{$i18n}_page_nggallery-about" :
210
+ $link = __('<a href="http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/languages/" target="_blank">Translation by alex rabe</a>', 'nggallery');
211
+ break;
212
+ case "{$i18n}_page_nggallery-roles" :
213
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Roles / Capabilities</a>', 'nggallery');
214
+ break;
215
+ case "{$i18n}_page_nggallery-style" :
216
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Styles</a>', 'nggallery');
217
+ $link .= ' | <a href="http://nextgen.boelinger.com/templates/" target="_blank">' . __('Templates', 'nggallery') . '</a>';
218
+ break;
219
+ case "{$i18n}_page_nggallery-gallery" :
220
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Gallery management</a>', 'nggallery');
221
+ $link .= ' | <a href="http://nextgen.boelinger.com/gallery-page/" target="_blank">' . __('Gallery example', 'nggallery') . '</a>';
222
+ break;
223
+ case "{$i18n}_page_nggallery-manage-gallery" :
224
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Gallery management</a>', 'nggallery');
225
+ $link .= ' | <a href="http://nextgen.boelinger.com/gallery-tags/" target="_blank">' . __('Gallery tags', 'nggallery') . '</a>';
226
+ break;
227
+ case "{$i18n}_page_nggallery-manage-album" :
228
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Album management</a>', 'nggallery');
229
+ $link .= ' | <a href="http://nextgen.boelinger.com/album/" target="_blank">' . __('Album example', 'nggallery') . '</a>';
230
+ $link .= ' | <a href="http://nextgen.boelinger.com/albumtags/" target="_blank">' . __('Album tags', 'nggallery') . '</a>';
231
+ break;
232
+ case "{$i18n}_page_nggallery-tags" :
233
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/" target="_blank">Gallery tags</a>', 'nggallery');
234
+ $link .= ' | <a href="http://nextgen.boelinger.com/related-images/" target="_blank">' . __('Related images', 'nggallery') . '</a>';
235
+ $link .= ' | <a href="http://nextgen.boelinger.com/gallery-tags/" target="_blank">' . __('Gallery tags', 'nggallery') . '</a>';
236
+ $link .= ' | <a href="http://nextgen.boelinger.com/albumtags/" target="_blank">' . __('Album tags', 'nggallery') . '</a>';
237
+ break;
238
+ case "{$i18n}_page_nggallery-options" :
239
+ $link = __('<a href="http://dpotter.net/Technical/2008/03/nextgen-gallery-review-image-management/" target="_blank">Image management</a>', 'nggallery');
240
+ $link .= ' | <a href="http://nextgen.boelinger.com/custom-fields/" target="_blank">' . __('Custom fields', 'nggallery') . '</a>';
241
+ break;
242
+ }
243
+
244
+ if ( !empty($link) ) {
245
+ $help = '<h5>' . __('Get help with NextGEN Gallery', 'nggallery') . '</h5>';
246
+ $help .= '<div class="metabox-prefs">';
247
+ $help .= $link;
248
+ $help .= "</div>\n";
249
+ $help .= '<h5>' . __('More Help & Info', 'nggallery') . '</h5>';
250
+ $help .= '<div class="metabox-prefs">';
251
+ $help .= __('<a href="http://wordpress.org/tags/nextgen-gallery" target="_blank">Support Forums</a>', 'nggallery');
252
+ $help .= ' | <a href="http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/faq/" target="_blank">' . __('FAQ', 'nggallery') . '</a>';
253
+ $help .= ' | <a href="http://code.google.com/p/nextgen-gallery/issues/list" target="_blank">' . __('Feature request', 'nggallery') . '</a>';
254
+ $help .= ' | <a href="http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/languages/" target="_blank">' . __('Get your language pack', 'nggallery') . '</a>';
255
+ $help .= ' | <a href="http://code.google.com/p/nextgen-gallery/" target="_blank">' . __('Contribute development', 'nggallery') . '</a>';
256
+ $help .= ' | <a href="http://wordpress.org/extend/plugins/nextgen-gallery" target="_blank">' . __('Download latest version', 'nggallery') . '</a>';
257
+ $help .= "</div>\n";
258
+ }
259
+
260
+ return $help;
261
+ }
262
 
263
+ }
264
 
265
+ function wpmu_site_admin() {
266
+ // Check for site admin
267
+ if ( function_exists('is_site_admin') )
268
+ if ( is_site_admin() )
269
+ return true;
270
+
271
+ return false;
272
+ }
273
+
274
+ function wpmu_enable_function($value) {
275
+ if (IS_WPMU) {
276
+ $ngg_options = get_site_option('ngg_options');
277
+ return $ngg_options[$value];
278
+ }
279
+ // if this is not WPMU, enable it !
280
+ return true;
281
+ }
282
+
283
+ /**
284
+ * WordPress PHP class to check for a new version.
285
+ * @author Alex Rabe
286
+ * @version 1.50
287
+ *
288
+ // Dashboard update notification example
289
+ function myPlugin_update_dashboard() {
290
+ $Check = new CheckPlugin();
291
+ $Check->URL = "YOUR URL";
292
+ $Check->version = "1.00";
293
+ $Check->name = "myPlugin";
294
+ if ($Check->startCheck()) {
295
+ echo '<h3>Update Information</h3>';
296
+ echo '<p>A new version is available</p>';
297
+ }
298
  }
299
 
300
+ add_action('activity_box_end', 'myPlugin_update_dashboard', '0');
301
+ *
302
+ */
303
+ if ( !class_exists( "CheckPlugin" ) ) {
304
+ class CheckPlugin {
305
+ /**
306
+ * URL with the version of the plugin
307
+ * @var string
308
+ */
309
+ var $URL = 'myURL';
310
+ /**
311
+ * Version of thsi programm or plugin
312
+ * @var string
313
+ */
314
+ var $version = '1.00';
315
+ /**
316
+ * Name of the plugin (will be used in the options table)
317
+ * @var string
318
+ */
319
+ var $name = 'myPlugin';
320
+ /**
321
+ * Waiting period until the next check in seconds
322
+ * @var int
323
+ */
324
+ var $period = 86400;
325
+
326
+ /**
327
+ * check for a new version, returns true if a version is avaiable
328
+ */
329
+ function startCheck() {
330
+
331
+ // If we know that a update exists, don't check it again
332
+ if (get_option( $this->name . '_update_exists' ) == 'true' )
333
+ return true;
334
+
335
+ $check_intervall = get_option( $this->name . '_next_update' );
336
+
337
+ if ( ($check_intervall < time() ) or (empty($check_intervall)) ) {
338
+
339
+ // Do not bother the server to often
340
+ $check_intervall = time() + $this->period;
341
+ update_option( $this->name . '_next_update', $check_intervall );
342
+
343
+ if ( function_exists(wp_remote_request) ) {
344
+
345
+ $options = array();
346
+ $options['headers'] = array(
347
+ 'User-Agent' => 'NextGEN Gallery Version Checker V' . NGGVERSION . '; (' . get_bloginfo('url') .')'
348
+ );
349
+ $response = wp_remote_request($this->URL, $options);
350
+
351
+ if ( is_wp_error( $response ) )
352
+ return false;
353
+
354
+ if ( 200 != $response['response']['code'] )
355
+ return false;
356
+
357
+ $server_version = unserialize($response['body']);
358
+
359
+ if (is_array($server_version)) {
360
+ if ( version_compare($server_version[$this->name], $this->version, '>') ) {
361
+ update_option( $this->name . '_update_exists', 'true' );
362
+ return true;
363
+ }
364
+ }
365
+
366
+ delete_option( $this->name . '_update_exists' );
367
+ return false;
368
+ }
369
+ }
370
  }
 
 
371
  }
372
+ }
373
+
374
  ?>
admin/ajax.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @author Alex Rabe
5
+ * @copyright 2008
6
+ */
7
+
8
+ add_action('wp_ajax_ngg_ajax_operation', 'ngg_ajax_operation' );
9
+
10
+ function ngg_ajax_operation() {
11
+
12
+ global $wpdb;
13
+
14
+ // if nonce is not correct it returns -1
15
+ check_ajax_referer( "ngg-ajax" );
16
+
17
+ // check for correct capability
18
+ if ( !is_user_logged_in() )
19
+ die('-1');
20
+
21
+ // check for correct NextGEN capability
22
+ if ( !current_user_can('NextGEN Upload images') || !current_user_can('NextGEN Manage gallery') )
23
+ die('-1');
24
+
25
+ // include the ngg function
26
+ include_once (dirname (__FILE__). '/functions.php');
27
+
28
+ // Get the image id
29
+ if ( isset($_POST['image'])) {
30
+ $id = (int) $_POST['image'];
31
+ // let's get the image data
32
+ $picture = nggdb::find_image($id);
33
+ // what do you want to do ?
34
+ switch ( $_POST['operation'] ) {
35
+ case 'create_thumbnail' :
36
+ $result = nggAdmin::create_thumbnail($picture);
37
+ break;
38
+ case 'resize_image' :
39
+ $result = nggAdmin::resize_image($picture);
40
+ break;
41
+ case 'set_watermark' :
42
+ $result = nggAdmin::set_watermark($picture);
43
+ break;
44
+ default :
45
+ die('-1');
46
+ break;
47
+ }
48
+ // A success should retun a '1'
49
+ die ($result);
50
+ }
51
+
52
+ // The script should never stop here
53
+ die('0');
54
+ }
55
+ ?>
admin/album.php CHANGED
@@ -8,61 +8,63 @@ function nggallery_admin_manage_album() {
8
  global $wpdb;
9
 
10
  $albumID = (int) $_POST['act_album'];
11
-
12
  if ($_POST['update']){
13
 
14
  check_admin_referer('ngg_album');
15
 
16
  if ($_POST['newalbum']){
17
  $newalbum = attribute_escape($_POST['newalbum']);
18
- $result = $wpdb->query(" INSERT INTO $wpdb->nggalbum (name, sortorder) VALUES ('$newalbum','0')");
19
- if ($result) $messagetext = '<font color="green">'.__('Update Successfully','nggallery').'</font>';
20
  }
21
 
22
  if ($albumID > 0){
23
-
24
  // get variable galleryContainer
25
  parse_str($_POST['sortorder']);
26
- if (is_array($galleryContainer)){
27
- $sortorder = array();
28
- foreach($galleryContainer as $gallery) {
29
- $gid = substr($gallery, 4); // get id from "gid-x"
30
- $sortorder[] = $gid;
31
- }
32
- $serial_sort = serialize($sortorder);
33
  $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '$serial_sort' WHERE id = $albumID ");
34
  } else {
35
  $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '0' WHERE id = $albumID ");
36
  }
37
- $messagetext = '<font color="green">'.__('Update Successfully','nggallery').'</font>';
38
  }
39
  }
40
 
41
  if ($_POST['delete']){
42
  check_admin_referer('ngg_album');
43
-
44
- $result = $wpdb->query("DELETE FROM $wpdb->nggalbum WHERE id = '$albumID' ");
45
- if ($result) $messagetext = '<font color="green">'.__('Album deleted','nggallery').'</font>';
 
46
  }
47
 
48
- // message windows
49
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
50
  ?>
51
- <script type="text/javascript">
52
 
 
53
 
54
  jQuery(document).ready(
55
  function()
56
  {
57
 
58
- jQuery('div.groupWrapper').Sortable(
59
- {
60
- accept: 'groupItem',
61
- helperclass: 'sort_placeholder',
62
- opacity: 0.7,
63
- tolerance: 'intersect'
64
- }
65
- );
 
 
 
 
 
 
 
 
 
66
 
67
  jQuery('a.min').bind('click', toggleContent);
68
 
@@ -114,45 +116,43 @@ var toggleContent = function(e)
114
 
115
  function ngg_serialize(s)
116
  {
117
- serial = jQuery.SortSerialize(s);
118
- jQuery('input[@name=sortorder]').val(serial.hash);
 
119
  }
120
  </script>
121
  <div class="wrap album" id="wrap" >
122
  <h2><?php _e('Manage Albums', 'nggallery') ?></h2>
123
- <form id="selectalbum" method="POST" onsubmit="ngg_serialize('galleryContainer')" accept-charset="utf-8">
124
  <?php wp_nonce_field('ngg_album') ?>
125
  <input name="sortorder" type="hidden" />
126
- <table width="100%" border="0" cellspacing="3" cellpadding="3" >
127
- <tr>
128
- <th align="right"><?php _e('Select album', 'nggallery') ?></th>
129
- <td>
130
- <select id="act_album" name="act_album" onchange="this.form.submit();">
131
- <option value="0" ><?php _e('No album selected', 'nggallery') ?></option>
132
- <?php
133
- $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id ASC");
134
- if(is_array($albumlist)) {
135
- foreach($albumlist as $album) {
136
- if ($_POST['act_album'] == $album->id) $selected = 'selected="selected" ';
137
- else $selected = '';
138
- echo '<option value="'.$album->id.'" '.$selected.'>'.$album->name.'</option>'."\n";
139
- }
140
  }
141
- ?>
142
- </select>
143
- </td>
144
- <th align="right"><?php _e('Add new album', 'nggallery') ?></th>
145
- <td><input id="newalbum" name="newalbum" value="" /></td>
146
- <td><p class="submit">
147
- <?php if ($_POST['act_album'] > 0){ ?>
148
- <input type="submit" name="delete" class="button delete" value="<?php _e('Delete') ?> &raquo;" onclick="javascript:check=confirm('<?php _e('Delete album ?','nggallery'); ?>');if(check==false) return false;"/>
149
- <?php } ?>
150
- <input type="submit" name="update" value="<?php _e('Update') ?> &raquo;" />
151
- <p></td>
152
- </tr>
153
- </table>
154
-
155
  </form>
 
156
  <p>
157
  <div style="float:right;">
158
  <a href="#" id="toggle_used"><?php _e('[Show all]', 'nggallery') ?></a>
@@ -170,7 +170,7 @@ function ngg_serialize(s)
170
  <?php
171
  $gallerylist = $wpdb->get_results("SELECT gid FROM $wpdb->nggallery");
172
 
173
- //TODO:Code MUST be optimized, how to flag a used galley better ?
174
  $used_list = getallusedgalleries();
175
 
176
  if(is_array($gallerylist)) {
@@ -210,7 +210,7 @@ function ngg_serialize(s)
210
  $sort_array = unserialize($album->sortorder);
211
  if (is_array($sort_array)) {
212
  foreach($sort_array as $galleryid) {
213
- getgallerycontainer($galleryid,false);
214
  }
215
  }
216
  }
@@ -231,20 +231,18 @@ function getgallerycontainer($galleryid = 0, $used = false) {
231
  global $wpdb;
232
 
233
  $gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryid'");
234
-
235
  if ($gallery) {
236
 
237
  // set image url
238
- $act_thumbnail_url = get_option ('siteurl')."/".$gallery->path.nggallery::get_thumbnail_folder($gallery->path, FALSE);
239
- $act_thumb_prefix = nggallery::get_thumbnail_prefix($gallery->path, FALSE);
240
 
241
  $post= get_post($gallery->pageid);
242
  $pagename = $post->post_title;
243
  $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$gallery->previewpic'");
244
- if ($filename) $img = '<img src="'.$act_thumbnail_url.$act_thumb_prefix.$filename.'" />';
245
- else $img = '';
246
  // add class if it's in use in other albums
247
- $used = $used ? " inUse" : "";
248
  echo '<div id="gid-'.$gallery->gid.'" class="groupItem'. $used .'">
249
  <div class="innerhandle">
250
  <div class="item_top">
@@ -284,5 +282,4 @@ function getallusedgalleries() {
284
  }
285
  return $used;
286
  }
287
-
288
  ?>
8
  global $wpdb;
9
 
10
  $albumID = (int) $_POST['act_album'];
11
+
12
  if ($_POST['update']){
13
 
14
  check_admin_referer('ngg_album');
15
 
16
  if ($_POST['newalbum']){
17
  $newalbum = attribute_escape($_POST['newalbum']);
18
+ $result = $wpdb->query("INSERT INTO $wpdb->nggalbum (name, sortorder) VALUES ('$newalbum','0')");
19
+ if ($result) nggGallery::show_message(__('Update Successfully','nggallery'));
20
  }
21
 
22
  if ($albumID > 0){
 
23
  // get variable galleryContainer
24
  parse_str($_POST['sortorder']);
25
+ if (is_array($gid)){
26
+ $serial_sort = serialize($gid);
 
 
 
 
 
27
  $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '$serial_sort' WHERE id = $albumID ");
28
  } else {
29
  $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '0' WHERE id = $albumID ");
30
  }
31
+ nggGallery::show_message(__('Update Successfully','nggallery'));
32
  }
33
  }
34
 
35
  if ($_POST['delete']){
36
  check_admin_referer('ngg_album');
37
+
38
+ $result = nggdb::delete_album($albumID);
39
+ if ($result)
40
+ nggGallery::show_message(__('Album deleted','nggallery'));
41
  }
42
 
 
 
43
  ?>
 
44
 
45
+ <script type="text/javascript">
46
 
47
  jQuery(document).ready(
48
  function()
49
  {
50
 
51
+ jQuery('#selectContainer').sortable( {
52
+ items: '.groupItem',
53
+ placeholder: 'sort_placeholder',
54
+ opacity: 0.7,
55
+ tolerance: 'intersect',
56
+ distance: 2,
57
+ connectWith: ["#galleryContainer"]
58
+ } );
59
+
60
+ jQuery('#galleryContainer').sortable( {
61
+ items: '.groupItem',
62
+ placeholder: 'sort_placeholder',
63
+ opacity: 0.7,
64
+ tolerance: 'intersect',
65
+ distance: 2,
66
+ connectWith: ["#selectContainer"]
67
+ } );
68
 
69
  jQuery('a.min').bind('click', toggleContent);
70
 
116
 
117
  function ngg_serialize(s)
118
  {
119
+ //serial = jQuery.SortSerialize(s);
120
+ serial = jQuery('#galleryContainer').sortable('serialize');
121
+ jQuery('input[@name=sortorder]').val(serial);
122
  }
123
  </script>
124
  <div class="wrap album" id="wrap" >
125
  <h2><?php _e('Manage Albums', 'nggallery') ?></h2>
126
+ <form id="selectalbum" method="POST" onsubmit="ngg_serialize()" accept-charset="utf-8">
127
  <?php wp_nonce_field('ngg_album') ?>
128
  <input name="sortorder" type="hidden" />
129
+ <div class="tablenav">
130
+ <div class="alignleft actions">
131
+ <?php _e('Select album', 'nggallery') ?>
132
+ <select id="act_album" name="act_album" onchange="this.form.submit();">
133
+ <option value="0" ><?php _e('No album selected', 'nggallery') ?></option>
134
+ <?php
135
+ $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id ASC");
136
+ if(is_array($albumlist)) {
137
+ foreach($albumlist as $album) {
138
+ if ($_POST['act_album'] == $album->id) $selected = 'selected="selected" ';
139
+ else $selected = '';
140
+ echo '<option value="'.$album->id.'" '.$selected.'>'.$album->name.'</option>'."\n";
 
 
141
  }
142
+ }
143
+ ?>
144
+ </select>
145
+ <?php if ($_POST['act_album'] > 0){ ?>
146
+ <input class="button-primary action" type="submit" name="update" value="<?php _e('Update', 'nggallery') ?>"/>
147
+ <input type="submit" name="delete" class="button-secondary action" value="<?php _e('Delete', 'nggallery') ?>" onclick="javascript:check=confirm('<?php _e('Delete album ?','nggallery'); ?>');if(check==false) return false;"/>
148
+ <?php } else { ?>
149
+ <span><?php _e('Add new album', 'nggallery') ?>&nbsp;</span><input class="search-input" id="newalbum" name="newalbum" type="text" value="" />
150
+ <input class="button-secondary action" type="submit" name="update" value="<?php _e('Add', 'nggallery') ?>"/>
151
+ <?php } ?>
152
+ </div>
153
+ </div>
 
 
154
  </form>
155
+ <br style="clear: both;"/>
156
  <p>
157
  <div style="float:right;">
158
  <a href="#" id="toggle_used"><?php _e('[Show all]', 'nggallery') ?></a>
170
  <?php
171
  $gallerylist = $wpdb->get_results("SELECT gid FROM $wpdb->nggallery");
172
 
173
+ //TODO:Code MUST be optimized, how to flag a used gallery better ?
174
  $used_list = getallusedgalleries();
175
 
176
  if(is_array($gallerylist)) {
210
  $sort_array = unserialize($album->sortorder);
211
  if (is_array($sort_array)) {
212
  foreach($sort_array as $galleryid) {
213
+ getgallerycontainer($galleryid, false);
214
  }
215
  }
216
  }
231
  global $wpdb;
232
 
233
  $gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryid'");
234
+
235
  if ($gallery) {
236
 
237
  // set image url
238
+ $act_thumbnail_url = get_option ('siteurl') . '/' .$gallery->path . nggGallery::get_thumbnail_folder($gallery->path, FALSE);
 
239
 
240
  $post= get_post($gallery->pageid);
241
  $pagename = $post->post_title;
242
  $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$gallery->previewpic'");
243
+ $img = ($filename) ? '<img src="'.$act_thumbnail_url. 'thumbs_' .$filename.'" />' : '';
 
244
  // add class if it's in use in other albums
245
+ $used = $used ? ' inUse' : '';
246
  echo '<div id="gid-'.$gallery->gid.'" class="groupItem'. $used .'">
247
  <div class="innerhandle">
248
  <div class="item_top">
282
  }
283
  return $used;
284
  }
 
285
  ?>
admin/css/jquery.tabs-ie.css DELETED
@@ -1,15 +0,0 @@
1
- /*
2
- Tabs - additional IE specific bug fixes
3
-
4
- Recommended usage (Conditional Comments):
5
- <!--[if lte IE 7]>
6
- <link rel="stylesheet" href="tabs_ie.css" type="text/css" media="projection, screen" />
7
- <![endif]-->
8
-
9
- */
10
- .tabs-nav { /* auto clear */
11
- display: inline-block;
12
- }
13
- .tabs-nav .tabs-disabled a {
14
- filter: alpha(opacity=40);
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/jquery.tabs.css DELETED
@@ -1,83 +0,0 @@
1
- /* Caution! Ensure accessibility in print and other media types... */
2
- @media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */
3
- .tabs-hide {
4
- display: none;
5
- }
6
- }
7
-
8
- /* Hide useless elements in print layouts... */
9
- @media print {
10
- .tabs-nav {
11
- display: none;
12
- }
13
- }
14
-
15
- /* Skin */
16
- .tabs-nav {
17
- list-style: none;
18
- margin: 0;
19
- padding: 0 0 0 4px;
20
- }
21
- .tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
22
- display: block;
23
- clear: both;
24
- content: " ";
25
- }
26
-
27
- .tabs-nav li {
28
- float: left;
29
- margin: 0px 2px 0px 1px !important;
30
- background: #EEEEEE none repeat scroll 0%;
31
- border-color: #CCCCCC;
32
- border-style: solid solid none;
33
- border-width: 1px 1px medium;
34
- padding: 0px 1px;
35
- text-decoration: none;
36
- }
37
-
38
- .tabs-nav a {
39
- border: none;
40
- display: block;
41
- position: relative;
42
- top: 1px;
43
- z-index: 2;
44
- padding: 6px 10px 0;
45
- height: 18px;
46
- color: #27537a;
47
- font-weight: bold;
48
- line-height: 1.2;
49
- text-align: center;
50
- text-decoration: none;
51
- }
52
-
53
- .tabs-nav .tabs-selected a {
54
- background: #FFFFFF none repeat scroll 0%;
55
- /* padding-top: 7px; */
56
- color: #000;
57
- }
58
- .tabs-nav .tabs-selected a, .tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active {
59
- background-position: 0 -50px;
60
- outline: 0; /* @ Firefox, switch off dotted border */
61
- }
62
- .tabs-nav .tabs-disabled a:hover, .tabs-nav .tabs-disabled a:focus, .tabs-nav .tabs-disabled a:active {
63
- background-position: 0 0;
64
- }
65
- .tabs-nav .tabs-selected a:link, .tabs-nav .tabs-selected a:visited,
66
- .tabs-nav .tabs-disabled a:link, .tabs-nav .tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
67
- cursor: text;
68
- }
69
- .tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active { /* @ Opera, we need to be explicit again here now... */
70
- cursor: pointer !important;
71
- }
72
- .tabs-nav .tabs-disabled {
73
- opacity: .4;
74
- }
75
- .tabs-container {
76
- border-top: 1px solid #CCCCCC;
77
- padding: 0px 8px;
78
- background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
79
- }
80
-
81
- .tabs-container h2{
82
- padding-top: 15px;
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/jquery.ui.tabs.css CHANGED
@@ -17,21 +17,20 @@
17
  border-color:#EBEBEB rgb(204, 204, 204) rgb(204, 204, 204) rgb(235, 235, 235);
18
  border-style:solid;
19
  border-width:1px;
20
- margin:0pt 15% 0pt 15px;
21
  padding:2px;
22
  }
23
  #tabs{
24
  display: block;
25
- background:#EAF3FA none repeat scroll 0%;
26
  font-size:14px;
27
- margin:0pt 0pt 10px;
28
  overflow:hidden;
29
  }
30
 
31
  .ui-tabs-nav {
32
  list-style: none;
33
  margin: 0;
34
- padding: 0 0 0 4px;
35
  }
36
  .ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
37
  display: block;
@@ -40,7 +39,7 @@
40
  }
41
  .ui-tabs-nav li {
42
  float: left;
43
- padding:8px 5px;
44
  min-width: 84px; /* be nice to Opera */
45
  margin: 2px 2px 0px 1px !important;
46
  text-decoration: none;
@@ -48,13 +47,13 @@
48
  }
49
  .ui-tabs-nav a, .ui-tabs-nav a span {
50
  display: block;
51
- padding: 0 10px;
52
  }
53
 
54
  .ui-tabs-nav a {
55
  margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */
56
  padding-left: 0;
57
- color: #27537a;
58
  line-height: 1.2;
59
  text-align: center;
60
  text-decoration: none;
@@ -62,27 +61,38 @@
62
  outline: 0; /* prevent dotted border in Firefox */
63
  }
64
  .ui-tabs-nav .ui-tabs-selected{
65
- background:#CEE1EF none repeat scroll 0% 50%;
66
- font-weight:bold;
67
- -moz-border-radius-topright: 4px;
68
- -khtml-border-top-right-radius: 4px;
69
- -webkit-border-top-right-radius: 4px;
70
- border-top-right-radius: 4px;
71
- -moz-border-radius-topleft: 4px;
72
- -khtml-border-top-left-radius: 4px;
73
- -webkit-border-top-left-radius: 4px;
74
- border-top-left-radius: 4px;
75
- }
76
- .ui-tabs-nav .ui-tabs-selected a {
 
 
 
 
 
 
 
 
 
 
77
  position: relative;
78
  top: 1px;
79
  z-index: 2;
80
  margin-top: 0;
81
- color:#333333;
82
  }
 
83
  .ui-tabs-nav li a:hover {
84
  color:#D54E21;
85
  }
 
86
  .ui-tabs-nav a span {
87
  width: 64px; /* IE 6 treats width as min-width */
88
  min-width: 64px;
@@ -137,10 +147,6 @@
137
  display:inline;
138
  }
139
 
140
- .ui-tabs-loading em {
141
- padding: 0 0 0 20px;
142
- background: url(loading.gif) no-repeat 0 50%;
143
- }
144
 
145
  /* Additional IE specific bug fixes... */
146
  * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */
17
  border-color:#EBEBEB rgb(204, 204, 204) rgb(204, 204, 204) rgb(235, 235, 235);
18
  border-style:solid;
19
  border-width:1px;
20
+ margin:15px 15% 0pt 15px;
21
  padding:2px;
22
  }
23
  #tabs{
24
  display: block;
25
+ background:#F1F1F1 none repeat scroll 0%;
26
  font-size:14px;
 
27
  overflow:hidden;
28
  }
29
 
30
  .ui-tabs-nav {
31
  list-style: none;
32
  margin: 0;
33
+ padding: 0 0 0 10px;
34
  }
35
  .ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
36
  display: block;
39
  }
40
  .ui-tabs-nav li {
41
  float: left;
42
+ padding: 6px 5px;
43
  min-width: 84px; /* be nice to Opera */
44
  margin: 2px 2px 0px 1px !important;
45
  text-decoration: none;
47
  }
48
  .ui-tabs-nav a, .ui-tabs-nav a span {
49
  display: block;
50
+ padding: 0 1px;
51
  }
52
 
53
  .ui-tabs-nav a {
54
  margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */
55
  padding-left: 0;
56
+ color: #2583AD;
57
  line-height: 1.2;
58
  text-align: center;
59
  text-decoration: none;
61
  outline: 0; /* prevent dotted border in Firefox */
62
  }
63
  .ui-tabs-nav .ui-tabs-selected{
64
+ background: #6D6D6D url(../images/menu-bits.gif) repeat-x scroll left top;
65
+ border-color: #6D6D6D;
66
+ color: #FFFFFF;
67
+ text-shadow:0 -1px 0 #666666;
68
+
69
+ -moz-border-radius-topright: 6px;
70
+ -khtml-border-top-right-radius: 6px;
71
+ -webkit-border-top-right-radius: 6px;
72
+ border-top-right-radius: 6px;
73
+ -moz-border-radius-topleft: 6px;
74
+ -khtml-border-top-left-radius: 6px;
75
+ -webkit-border-top-left-radius: 6px;
76
+ border-top-left-radius: 6px;
77
+ }
78
+
79
+ .ui-tabs-selected a,
80
+ .ui-tabs-selected a:hover {
81
+ color:#FFFFFF !important;
82
+ }
83
+
84
+ .ui-tabs-nav .ui-tabs-selected a,
85
+ .ui-tabs-nav .ui-tabs-selected a:hover {
86
  position: relative;
87
  top: 1px;
88
  z-index: 2;
89
  margin-top: 0;
 
90
  }
91
+
92
  .ui-tabs-nav li a:hover {
93
  color:#D54E21;
94
  }
95
+
96
  .ui-tabs-nav a span {
97
  width: 64px; /* IE 6 treats width as min-width */
98
  min-width: 64px;
147
  display:inline;
148
  }
149
 
 
 
 
 
150
 
151
  /* Additional IE specific bug fixes... */
152
  * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */
admin/css/nggadmin.css CHANGED
@@ -1,19 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* SETTINGS FOR PROGRESS BAR */
2
 
3
  div .progressborder {
4
  border: 1px inset ;
5
  display: block;
6
  height: 20px;
7
- background-color: rgb(160, 160, 160);
8
  width: 100%;
9
- margin-top:5px;
 
10
  }
11
 
12
  div .progressbar {
13
  border: medium none ;
14
  display: block;
15
  height: 20px;
16
- background-color: rgb(13, 50, 79);
17
  width: 0%;
18
  }
19
 
@@ -22,14 +131,40 @@ div .progressbar span {
22
  position: relative;
23
  color: white;
24
  font-weight: bold;
25
- padding-bottom: 2px;
26
  padding-left: 5px;
27
  }
28
 
29
- /* SETTINGS FOR ALBUM PAGE */
30
-
31
- .album {
 
 
32
  overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  .groupItem
@@ -45,12 +180,11 @@ div .progressbar span {
45
 
46
  .groupItem .item_top
47
  {
48
- background-color:#669999;
49
- color: white;
50
  font-weight:bold;
51
  line-height: 28px;
52
  height: 28px;
53
- border-bottom: 2px solid #003333;
54
  cursor: move;
55
  padding: 0 5px;
56
  position: static;
@@ -60,8 +194,12 @@ div .progressbar span {
60
  {
61
  float:right;
62
  text-decoration: none;
63
- color: white;
64
- border-bottom: 2px solid #003333;
 
 
 
 
65
  }
66
 
67
  .innerhandle {
@@ -72,7 +210,7 @@ div .progressbar span {
72
  }
73
 
74
  .itemContent {
75
- padding: 5px;
76
  }
77
 
78
  .itemContent p {
@@ -101,7 +239,7 @@ div .progressbar span {
101
  }
102
 
103
  #galleryContainer {
104
- background-color:#F0F8FF;
105
  border:1px solid #BBBBBB;
106
  margin:10px 440px 10px 10px;
107
  padding:0px 10px 10px 10px;
@@ -109,7 +247,7 @@ div .progressbar span {
109
 
110
  #selectContainer {
111
  float:right;
112
- background:#F0F8FF none repeat scroll 0%;
113
  border:1px solid #BBBBBB;
114
  margin:0pt 10px 10px;
115
  padding:0px 5px 5px 10px;
@@ -120,4 +258,102 @@ div .progressbar span {
120
  color:#333333;
121
  text-align:center;
122
  line-height:25px;
123
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ** NextGEN Gallery Style for Wordpress 2.7
3
+ */
4
+
5
+ /* SETTINGS FOR Overview Gallery */
6
+
7
+ #newversion {
8
+ border-color:#CCCCCC;
9
+ border-style:solid;
10
+ border-width:1px;
11
+ margin-right:7px;
12
+ margin-top:10px;
13
+ padding:2px;
14
+ }
15
+
16
+ #dashboard_server_settings ul.settings span {
17
+ padding-left : 10px;
18
+ color:#2583AD;
19
+ font-weight:bold;
20
+ }
21
+
22
+ .ngg-overview .postbox .handlediv {
23
+ float:right;
24
+ height:24px;
25
+ width:24px;
26
+ }
27
+
28
+
29
+ /* SETTING FOR FLASH UPLOAD BUTTON */
30
+ .swfupload {
31
+ position:absolute;
32
+ z-index:1;
33
+ vertical-align:top;
34
+ }
35
+
36
+ /* SETTINGS FOR THE OPTIONS TABLE */
37
+ .ngg-options th {
38
+ width:22%;
39
+ }
40
+
41
+ /* WATERMARK */
42
+ #wm-preview {
43
+ float:right;
44
+ font-size:90%;
45
+ width:35%;
46
+ border-color:#EBEBEB rgb(204, 204, 204) rgb(204, 204, 204) rgb(235, 235, 235);
47
+ border-style:solid;
48
+ border-width:1px;
49
+ margin-bottom:10px;
50
+ margin-left:10px;
51
+ margin-right:8px;
52
+ padding:2px;
53
+ }
54
+ #wm-preview h3{
55
+ background:#F9F9F9 none repeat scroll 0%;
56
+ font-size:14px;
57
+ font-weight:bold;
58
+ margin:0pt 0pt 10px;
59
+ padding:8px 5px;
60
+ }
61
+
62
+ #wm-position {
63
+ width:100%;
64
+ margin-left:40px;
65
+ }
66
+
67
+ .wm-table {
68
+ border-collapse:collapse;
69
+ margin-top:1em;
70
+ width: 60%;
71
+ clear:none;
72
+ }
73
+ .wm-table td {
74
+ border-bottom:8px solid #FFFFFF;
75
+ line-height:20px;
76
+ margin-bottom:9px;
77
+ padding:10px;
78
+ }
79
+ .wm-table th {
80
+ border-bottom:8px solid #FFFFFF;
81
+ padding:10px;
82
+ text-align:left;
83
+ }
84
+ .wm-table tr {
85
+ background:#F9F9F9 none repeat scroll 0%;
86
+ }
87
+
88
+ /* SETTINGS FOR MANAGE TABLE */
89
+
90
+ div#poststuff #gallerydiv {
91
+ cursor:pointer;
92
+ }
93
+
94
+ p#ngg-inlinebutton {
95
+ float:right;
96
+ margin:0pt;
97
+ position:relative;
98
+ top:-25pt;
99
+ }
100
+
101
+ div .ngg-tablenav {
102
+ overflow:hidden;
103
+ }
104
+
105
+ #ngg-listimages td, #ngg-listimages th {
106
+ vertical-align: middle;
107
+ }
108
+
109
  /* SETTINGS FOR PROGRESS BAR */
110
 
111
  div .progressborder {
112
  border: 1px inset ;
113
  display: block;
114
  height: 20px;
115
+ background-color: #464646;
116
  width: 100%;
117
+ margin-top: 15px;
118
+ margin-bottom: 15px;
119
  }
120
 
121
  div .progressbar {
122
  border: medium none ;
123
  display: block;
124
  height: 20px;
125
+ background-color: #D54E21;
126
  width: 0%;
127
  }
128
 
131
  position: relative;
132
  color: white;
133
  font-weight: bold;
 
134
  padding-left: 5px;
135
  }
136
 
137
+
138
+ .show_details
139
+ {
140
+ height: 16px;
141
+ line-height: 20px;
142
  overflow: hidden;
143
+ min-width: 8em;
144
+ padding: 3px;
145
+ cursor:pointer;
146
+ }
147
+
148
+ .show_details span
149
+ {
150
+ border-bottom:1px solid #999;
151
+ white-space:pre;
152
+ }
153
+ .show_details:hover
154
+ {
155
+ height: auto;
156
+ overflow: visible;
157
+ border: 1px solid #999;
158
+ }
159
+
160
+ /* SETTINGS FOR ALBUM PAGE */
161
+
162
+ .tablenav select[name="act_album"] {
163
+ width:150px;
164
+ }
165
+
166
+ .tablenav span {
167
+ padding-left: 50px;
168
  }
169
 
170
  .groupItem
180
 
181
  .groupItem .item_top
182
  {
183
+ background-color:#CEE1EF;
184
+ color: #333333;
185
  font-weight:bold;
186
  line-height: 28px;
187
  height: 28px;
 
188
  cursor: move;
189
  padding: 0 5px;
190
  position: static;
194
  {
195
  float:right;
196
  text-decoration: none;
197
+ color: #333333;
198
+ }
199
+
200
+ .groupItem .item_top a:hover
201
+ {
202
+ color: #D54E21;
203
  }
204
 
205
  .innerhandle {
210
  }
211
 
212
  .itemContent {
213
+ padding: 5px 0 10px 5px;
214
  }
215
 
216
  .itemContent p {
239
  }
240
 
241
  #galleryContainer {
242
+ background-color:#FBFBFB;
243
  border:1px solid #BBBBBB;
244
  margin:10px 440px 10px 10px;
245
  padding:0px 10px 10px 10px;
247
 
248
  #selectContainer {
249
  float:right;
250
+ background:#FBFBFB none repeat scroll 0%;
251
  border:1px solid #BBBBBB;
252
  margin:0pt 10px 10px;
253
  padding:0px 5px 5px 10px;
258
  color:#333333;
259
  text-align:center;
260
  line-height:25px;
261
+ }
262
+
263
+ /* SETTINGS FOR SORT GALLERY */
264
+
265
+ #sortGallery {
266
+ position:relative;
267
+ }
268
+
269
+ p#sortButton{
270
+ margin:0;
271
+ position:absolute;
272
+ right:0;
273
+ top:0;
274
+ }
275
+
276
+ .imageBox,.imageBoxHighlighted{
277
+ width:130px; /* Total width of each image box */
278
+ height:160px; /* Total height of each image box */
279
+ float:left;
280
+ }
281
+ .imageBox_theImage{
282
+ width:110px; /* Width of image */
283
+ height:125px; /* Height of image */
284
+
285
+ background-position: center;
286
+ background-repeat: no-repeat;
287
+ margin: 0 auto;
288
+ margin-bottom:2px;
289
+ }
290
+
291
+ .imageBox .imageBox_theImage{
292
+ border:1px solid #DDD; /* Border color for not selected images */
293
+ padding:2px;
294
+ }
295
+ .imageBoxHighlighted .imageBox_theImage{
296
+ border:3px solid #316AC5; /* Border color for selected image */
297
+ padding:0px;
298
+
299
+ }
300
+ .imageBoxHighlighted span{ /* Title of selected image */
301
+ background-color: #316AC5;
302
+ color:#FFFFFF;
303
+ padding:2px;
304
+ }
305
+
306
+ .imageBox_label{ /* Title of images - both selected and not selected */
307
+ text-align:center;
308
+ font-family: arial;
309
+ font-size:11px;
310
+ padding-top:2px;
311
+ margin: 0 auto;
312
+ }
313
+
314
+ /*
315
+ DIV that indicates where the dragged image will be placed
316
+ */
317
+
318
+ #insertionMarker{
319
+ height:150px;
320
+ width:6px;
321
+ position:absolute;
322
+ }
323
+
324
+ #insertionMarkerLine{
325
+ width:6px; /* No need to change this value */
326
+ height:145px; /* To adjust the height of the div that indicates where the dragged image will be dropped */
327
+
328
+ }
329
+
330
+ #insertionMarker img{
331
+ float:left;
332
+ }
333
+
334
+ /*
335
+ DIV that shows the image as you drag it
336
+ */
337
+
338
+ #dragDropContent{
339
+
340
+ opacity:0.4; /* 40 % opacity */
341
+ filter:alpha(opacity=40); /* 40 % opacity */
342
+
343
+ /*
344
+ No need to change these three values
345
+ */
346
+ position:absolute;
347
+ z-index:10;
348
+ display:none;
349
+
350
+ }
351
+
352
+ /* UPGRADE PAGE */
353
+
354
+ .error_inline {
355
+ background:#FFEBE8 none repeat scroll 0%;
356
+ border:1px solid #CC0000;
357
+ margin:5px auto;
358
+ padding:10px;
359
+ }
admin/css/nggadmin.wp23.css DELETED
@@ -1,129 +0,0 @@
1
- /* SETTINGS FOR Overview Gallery */
2
-
3
- div .ngg-wrap {
4
- overflow:hidden;
5
- }
6
-
7
- /* SETTINGS FOR PROGRESS BAR */
8
-
9
- div .progressborder {
10
- border: 1px inset ;
11
- display: block;
12
- height: 20px;
13
- background-color: rgb(160, 160, 160);
14
- width: 100%;
15
- margin-top:5px;
16
- }
17
-
18
- div .progressbar {
19
- border: medium none ;
20
- display: block;
21
- height: 20px;
22
- background-color: rgb(13, 50, 79);
23
- width: 0%;
24
- }
25
-
26
- div .progressbar span {
27
- display: inline;
28
- position: relative;
29
- color: white;
30
- font-weight: bold;
31
- padding-bottom: 2px;
32
- padding-left: 5px;
33
- }
34
-
35
- /* SETTINGS FOR ALBUM PAGE */
36
-
37
- .album {
38
- overflow: hidden;
39
- }
40
-
41
- .groupItem
42
- {
43
- background-color:#FBFBFB;
44
- border:1px solid #CCCCCC;
45
- display:block;
46
- line-height:75px;
47
- cursor: move;
48
- margin: 0 0 10px;
49
- width: 390px;
50
- }
51
-
52
- .groupItem .item_top
53
- {
54
- background-color:#669999;
55
- color: white;
56
- font-weight:bold;
57
- line-height: 28px;
58
- height: 28px;
59
- border-bottom: 2px solid #003333;
60
- cursor: move;
61
- padding: 0 5px;
62
- position: static;
63
- }
64
-
65
- .groupItem .item_top a
66
- {
67
- float:right;
68
- text-decoration: none;
69
- color: white;
70
- border-bottom: 2px solid #003333;
71
- }
72
-
73
- .innerhandle {
74
- border-color:#F2F2F2 rgb(232, 232, 232) rgb(232, 232, 232) rgb(242, 242, 242);
75
- border-style:solid;
76
- border-width:1px;
77
- display:block;
78
- }
79
-
80
- .itemContent {
81
- padding: 5px;
82
- }
83
-
84
- .itemContent p {
85
- border: 0;
86
- margin: 0;
87
- padding: 0;
88
- }
89
-
90
- .inlinepicture
91
- {
92
- float:left;
93
- display:inline;
94
- margin:0pt;
95
- padding:0pt 3px 1px;
96
- }
97
-
98
- .inlinepicture img
99
- {
100
- max-height:75px;
101
- }
102
-
103
- .sort_placeholder
104
- {
105
- border:1px dashed #bba !important;
106
- background: #F9F9F9;
107
- }
108
-
109
- #galleryContainer {
110
- background-color:#F0F8FF;
111
- border:1px solid #BBBBBB;
112
- margin:10px 440px 10px 10px;
113
- padding:0px 10px 10px 10px;
114
- }
115
-
116
- #selectContainer {
117
- float:right;
118
- background:#F0F8FF none repeat scroll 0%;
119
- border:1px solid #BBBBBB;
120
- margin:0pt 10px 10px;
121
- padding:0px 5px 5px 10px;
122
- width:395px;
123
- }
124
-
125
- #galleryContainer h3, #selectContainer h3 {
126
- color:#333333;
127
- text-align:center;
128
- line-height:25px;
129
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/nggadmin.wp25.css DELETED
@@ -1,312 +0,0 @@
1
- /* SETTINGS FOR Overview Gallery */
2
-
3
- div.ngg-dashboard-widget {
4
- border:1px solid #CCCCCC;
5
- height:58em;
6
- overflow:auto;
7
- margin-right:20px;
8
- padding:2px;
9
- position:relative;
10
- }
11
-
12
- div.dashboard-widget-content .settings li {
13
- margin:0.3em 0pt 0em;
14
- }
15
-
16
- #newversion {
17
- border-color:#CCCCCC;
18
- border-style:solid;
19
- border-width:1px;
20
- margin-right:7px;
21
- margin-top:10px;
22
- padding:2px;
23
- }
24
-
25
- /* SETTINGS FOR THE OPTIONS TABLE */
26
- .form-table th {
27
- width:33%;
28
- }
29
-
30
- /* WATERMARK */
31
- #wm-preview {
32
- float:right;
33
- font-size:90%;
34
- width:40%;
35
- border-color:#EBEBEB rgb(204, 204, 204) rgb(204, 204, 204) rgb(235, 235, 235);
36
- border-style:solid;
37
- border-width:1px;
38
- margin-bottom:10px;
39
- margin-left:20px;
40
- margin-right:8px;
41
- padding:2px;
42
- }
43
- #wm-preview h3{
44
- background:#EAF3FA none repeat scroll 0%;
45
- font-size:14px;
46
- font-weight:bold;
47
- margin:0pt 0pt 10px;
48
- padding:8px 5px;
49
- }
50
-
51
- #wm-position {
52
- width:100%;
53
- margin-left:40px;
54
- }
55
-
56
- .wm-table {
57
- border-collapse:collapse;
58
- margin-top:1em;
59
- }
60
- .wm-table td {
61
- border-bottom:8px solid #FFFFFF;
62
- line-height:20px;
63
- margin-bottom:9px;
64
- padding:10px;
65
- }
66
- .wm-table th {
67
- border-bottom:8px solid #FFFFFF;
68
- padding:10px;
69
- text-align:left;
70
- }
71
- .wm-table tr {
72
- background:#EAF3FA none repeat scroll 0%;
73
- }
74
-
75
- /* SETTINGS FOR MANAGE TABLE */
76
-
77
- p#ngg-inlinebutton {
78
- float:right;
79
- margin:0pt;
80
- position:relative;
81
- top:-25pt;
82
- }
83
-
84
- div .ngg-tablenav {
85
- overflow:hidden;
86
- }
87
-
88
- #ngg-listimages td, #ngg-listimages th {
89
- vertical-align: middle;
90
- padding: 10px 5px 10px;
91
- }
92
-
93
- #poststuff .postbox {
94
- margin-left: 10px;
95
- margin-right: 0px;
96
- }
97
-
98
- /* SETTINGS FOR PROGRESS BAR */
99
-
100
- div .progressborder {
101
- border: 1px inset ;
102
- display: block;
103
- height: 20px;
104
- background-color: #464646;
105
- width: 100%;
106
- margin-top: 15px;
107
- margin-bottom: 15px;
108
- }
109
-
110
- div .progressbar {
111
- border: medium none ;
112
- display: block;
113
- height: 20px;
114
- background-color: #D54E21;
115
- width: 0%;
116
- }
117
-
118
- div .progressbar span {
119
- display: inline;
120
- position: relative;
121
- color: white;
122
- font-weight: bold;
123
- padding-left: 5px;
124
- }
125
-
126
- /* SETTINGS FOR ALBUM PAGE */
127
-
128
- .ngg-albumnav {
129
- width : 100%;
130
- background-color:#EAF3FA;
131
- clear:both;
132
- margin-bottom:-10px;
133
- margin-top:8px;
134
- }
135
-
136
- .groupItem
137
- {
138
- background-color:#FBFBFB;
139
- border:1px solid #CCCCCC;
140
- display:block;
141
- line-height:75px;
142
- cursor: move;
143
- margin: 0 0 10px;
144
- width: 390px;
145
- }
146
-
147
- .groupItem .item_top
148
- {
149
- background-color:#CEE1EF;
150
- color: #333333;
151
- font-weight:bold;
152
- line-height: 28px;
153
- height: 28px;
154
- cursor: move;
155
- padding: 0 5px;
156
- position: static;
157
- }
158
-
159
- .groupItem .item_top a
160
- {
161
- float:right;
162
- text-decoration: none;
163
- color: #333333;
164
- }
165
-
166
- .groupItem .item_top a:hover
167
- {
168
- color: #D54E21;
169
- }
170
-
171
- .innerhandle {
172
- border-color:#F2F2F2 rgb(232, 232, 232) rgb(232, 232, 232) rgb(242, 242, 242);
173
- border-style:solid;
174
- border-width:1px;
175
- display:block;
176
- }
177
-
178
- .itemContent {
179
- padding: 5px;
180
- }
181
-
182
- .itemContent p {
183
- border: 0;
184
- margin: 0;
185
- padding: 0;
186
- }
187
-
188
- .inlinepicture
189
- {
190
- float:left;
191
- display:inline;
192
- margin:0pt;
193
- padding:0pt 3px 1px;
194
- }
195
-
196
- .inlinepicture img
197
- {
198
- max-height:75px;
199
- }
200
-
201
- .sort_placeholder
202
- {
203
- border:1px dashed #bba !important;
204
- background: #F9F9F9;
205
- }
206
-
207
- #galleryContainer {
208
- background-color:#FBFBFB;
209
- border:1px solid #BBBBBB;
210
- margin:10px 440px 10px 10px;
211
- padding:0px 10px 10px 10px;
212
- }
213
-
214
- #selectContainer {
215
- float:right;
216
- background:#FBFBFB none repeat scroll 0%;
217
- border:1px solid #BBBBBB;
218
- margin:0pt 10px 10px;
219
- padding:0px 5px 5px 10px;
220
- width:395px;
221
- }
222
-
223
- #galleryContainer h3, #selectContainer h3 {
224
- color:#333333;
225
- text-align:center;
226
- line-height:25px;
227
- }
228
-
229
- /* SETTINGS FOR SORT GALLERY */
230
-
231
- #sortGallery {
232
- bottom:25px;
233
- float:right;
234
- padding-right:5px;
235
- position:relative;
236
- }
237
-
238
- .imageBox,.imageBoxHighlighted{
239
- width:130px; /* Total width of each image box */
240
- height:160px; /* Total height of each image box */
241
- float:left;
242
- }
243
- .imageBox_theImage{
244
- width:110px; /* Width of image */
245
- height:125px; /* Height of image */
246
-
247
- background-position: center;
248
- background-repeat: no-repeat;
249
- margin: 0 auto;
250
- margin-bottom:2px;
251
- }
252
-
253
- .imageBox .imageBox_theImage{
254
- border:1px solid #DDD; /* Border color for not selected images */
255
- padding:2px;
256
- }
257
- .imageBoxHighlighted .imageBox_theImage{
258
- border:3px solid #316AC5; /* Border color for selected image */
259
- padding:0px;
260
-
261
- }
262
- .imageBoxHighlighted span{ /* Title of selected image */
263
- background-color: #316AC5;
264
- color:#FFFFFF;
265
- padding:2px;
266
- }
267
-
268
- .imageBox_label{ /* Title of images - both selected and not selected */
269
- text-align:center;
270
- font-family: arial;
271
- font-size:11px;
272
- padding-top:2px;
273
- margin: 0 auto;
274
- }
275
-
276
- /*
277
- DIV that indicates where the dragged image will be placed
278
- */
279
-
280
- #insertionMarker{
281
- height:150px;
282
- width:6px;
283
- position:absolute;
284
- }
285
-
286
- #insertionMarkerLine{
287
- width:6px; /* No need to change this value */
288
- height:145px; /* To adjust the height of the div that indicates where the dragged image will be dropped */
289
-
290
- }
291
-
292
- #insertionMarker img{
293
- float:left;
294
- }
295
-
296
- /*
297
- DIV that shows the image as you drag it
298
- */
299
-
300
- #dragDropContent{
301
-
302
- opacity:0.4; /* 40 % opacity */
303
- filter:alpha(opacity=40); /* 40 % opacity */
304
-
305
- /*
306
- No need to change these three values
307
- */
308
- position:absolute;
309
- z-index:10;
310
- display:none;
311
-
312
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/tags-admin.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ .ngg_wrap .auto_list{width:98%;margin:3px 0;padding:3px 5px;}
2
+ .ngg_wrap .list_tags {width:240px;vertical-align:top;}
3
+ .ngg_wrap .forms_manage {vertical-align:top;}
4
+ .ngg_wrap .forms_manage h3 {margin-bottom:5px;}
5
+ .ngg_wrap .forms_manage .form-table {margin-top:0;}
6
+ .ngg_wrap .sort_order h3 {margin:0;}
7
+ .ngg_wrap #ajax_area_tagslist {}
8
+ .ngg_wrap #ajax_area_tagslist ul{list-style:square;margin:10px 0 10px 20px;padding:0;}
9
+ .ngg_wrap #ajax_area_tagslist ul li{margin:0;padding:0;line-height:1.4;}
10
+ .ngg_wrap #ajax_area_tagslist ul li span{cursor:pointer;}
admin/functions.php CHANGED
@@ -7,17 +7,20 @@ class nggAdmin{
7
  // **************************************************************
8
  function create_gallery($gallerytitle, $defaultpath) {
9
  // create a new gallery & folder
10
- global $wpdb;
 
 
 
11
 
12
  //cleanup pathname
13
  $galleryname = apply_filters('ngg_gallery_name', $gallerytitle);
14
  $nggpath = $defaultpath.$galleryname;
15
  $nggRoot = WINABSPATH.$defaultpath;
16
- $txt = "";
17
 
18
  // No gallery name ?
19
  if (empty($galleryname)) {
20
- nggallery::show_error( __('No valid gallery name!', 'nggallery') );
21
  return false;
22
  }
23
 
@@ -26,7 +29,7 @@ class nggAdmin{
26
  if ( !wp_mkdir_p($nggRoot) ) {
27
  $txt = __('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('didn\'t exist. Please create first the main gallery folder ', 'nggallery').'!<br />';
28
  $txt .= __('Check this link, if you didn\'t know how to set the permission :', 'nggallery').' <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a> ';
29
- nggallery::show_error($txt);
30
  return false;
31
  }
32
  }
@@ -35,7 +38,7 @@ class nggAdmin{
35
  if ( !is_writeable($nggRoot ) ) {
36
  $txt = __('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('is not writeable !', 'nggallery').'<br />';
37
  $txt .= __('Check this link, if you didn\'t know how to set the permission :', 'nggallery').' <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a> ';
38
- nggallery::show_error($txt);
39
  return false;
40
  }
41
 
@@ -59,7 +62,7 @@ class nggAdmin{
59
  $help = __('The server setting Safe-Mode is on !', 'nggallery');
60
  $help .= '<br />'.__('If you have problems, please create directory', 'nggallery').' <strong>'.$nggpath.'</strong> ';
61
  $help .= __('and the thumbnails directory', 'nggallery').' <strong>'.$nggpath.'/thumbs</strong> '.__('with permission 777 manually !', 'nggallery');
62
- nggallery::show_message($help);
63
  }
64
 
65
  // show a error message
@@ -69,18 +72,26 @@ class nggAdmin{
69
  @rmdir(WINABSPATH.$nggpath.'/thumbs');
70
  @rmdir(WINABSPATH.$nggpath);
71
  }
72
- nggallery::show_error($txt);
73
  return false;
74
  }
75
 
76
  $result=$wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE name = '$galleryname' ");
77
  if ($result) {
78
- nggallery::show_error(__('Gallery', 'nggallery').' <strong>'.$galleryname.'</strong> '.__('already exists', 'nggallery'));
79
  return false;
80
  } else {
81
- $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path, title) VALUES ('$galleryname', '$nggpath', '$gallerytitle') ");
82
- if ($result) nggallery::show_message(__('Gallery', 'nggallery').' <strong>'.$wpdb->insert_id." : ".$galleryname.'</strong> '.__('successfully created!','nggallery')."<br />".__('You can show this gallery with the tag','nggallery').'<strong> [gallery='.$wpdb->insert_id.']</strong>');
83
- return true;;
 
 
 
 
 
 
 
 
84
  }
85
  }
86
 
@@ -90,70 +101,80 @@ class nggAdmin{
90
 
91
  //TODO: Check permission of existing thumb folder & images
92
 
93
- global $wpdb;
 
 
 
94
 
95
- $created_msg = "";
96
 
97
  // remove trailing slash at the end, if somebody use it
98
  if (substr($galleryfolder, -1) == '/') $galleryfolder = substr($galleryfolder, 0, -1);
99
  $gallerypath = WINABSPATH.$galleryfolder;
100
 
101
  if (!is_dir($gallerypath)) {
102
- nggallery::show_error(__('Directory', 'nggallery').' <strong>'.$gallerypath.'</strong> '.__('doesn&#96;t exist!', 'nggallery'));
103
  return ;
104
  }
105
 
106
  // read list of images
107
  $new_imageslist = nggAdmin::scandir($gallerypath);
108
  if (empty($new_imageslist)) {
109
- nggallery::show_message(__('Directory', 'nggallery').' <strong>'.$gallerypath.'</strong> '.__('contains no pictures', 'nggallery'));
110
  return;
111
  }
112
  // check & create thumbnail folder
113
- if ( !nggallery::get_thumbnail_folder($gallerypath) )
114
  return;
115
 
116
  // take folder name as gallery name
117
  $galleryname = basename($galleryfolder);
118
 
119
- // check for existing galleryfolder
120
  $gallery_id = $wpdb->get_var("SELECT gid FROM $wpdb->nggallery WHERE path = '$galleryfolder' ");
121
 
122
  if (!$gallery_id) {
123
- $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path) VALUES ('$galleryname', '$galleryfolder') ");
124
  if (!$result) {
125
- nggallery::show_error(__('Database error. Could not add gallery!','nggallery'));
126
  return;
127
  }
128
- $created_msg =__('Gallery','nggallery').' <strong>'.$galleryname.'</strong> '.__('successfully created!','nggallery').'<br />';
129
- $gallery_id = $wpdb->insert_id; // get index_id
130
  }
131
 
132
  // Look for existing image list
133
  $old_imageslist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$gallery_id' ");
134
  // if no images are there, create empty array
135
- if ($old_imageslist == NULL) $old_imageslist = array();
 
136
  // check difference
137
  $new_images = array_diff($new_imageslist, $old_imageslist);
138
- // now create thumbnails
139
- nggAdmin::generateThumbnail($gallerypath,$new_images);
140
 
141
  // add images to database
142
- $count_pic = nggAdmin::add_Images($gallery_id, $gallerypath, $new_images);
143
-
144
- nggallery::show_message($created_msg.$count_pic.__(' picture(s) successfully added','nggallery'));
 
 
 
 
 
 
 
 
145
  return;
146
 
147
  }
148
  // **************************************************************
149
- function scandir($dirname = ".") {
150
  // thx to php.net :-)
151
  $ext = array("jpeg", "jpg", "png", "gif");
152
  $files = array();
153
  if($handle = opendir($dirname)) {
154
  while(false !== ($file = readdir($handle)))
155
  for($i=0;$i<sizeof($ext);$i++)
156
- if(stristr($file, ".".$ext[$i]))
157
  $files[] = utf8_encode($file);
158
  closedir($handle);
159
  }
@@ -161,227 +182,194 @@ class nggAdmin{
161
  return ($files);
162
  }
163
 
164
- // **************************************************************
165
- function resizeImages($gallery_absfolder, $pictures) {
166
- // ** $gallery_absfolder must contain abspath !!
167
-
 
 
 
 
 
 
 
168
  if(! class_exists('ngg_Thumbnail'))
169
- require_once(NGGALLERY_ABSPATH.'/lib/thumbnail.inc.php');
170
 
171
- $ngg_options = get_option('ngg_options');
 
 
 
 
172
 
173
- if (is_array($pictures)) {
174
-
175
- $bar = new wpProgressBar(__('Running... Please wait','nggallery'));
176
- $bar->setHeader(__('Resize images','nggallery'));
177
- //total number of elements to process
178
- $elements = count($pictures);
179
- // wait a little bit after finished
180
- if ($elements > 5) $bar->setSleepOnFinish(2);
181
- //print the empty bar
182
- $bar->initialize($elements);
183
-
184
- foreach($pictures as $picture) {
185
-
186
- if (!is_writable($gallery_absfolder."/".$picture)) {
187
- $messagetext .= $gallery_absfolder."/".$picture."<br />";
188
- $bar->increase();
189
- continue;
190
- }
191
 
192
- $thumb = new ngg_Thumbnail($gallery_absfolder."/".$picture, TRUE);
193
- // echo $thumb->errmsg;
194
- // skip if file is not there
195
- if (!$thumb->error) {
196
- $thumb->resize($ngg_options['imgWidth'],$ngg_options['imgHeight'],$ngg_options['imgResampleMode']);
197
- if ( $thumb->save($gallery_absfolder."/".$picture,$ngg_options['imgQuality']) ) {
198
- // do not flush the buffer with useless messages
199
- if ($elements < 100)
200
- $bar->addNote($picture. __(' : Image resized...','nggallery'));
201
- } else
202
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg."</strong>");
203
- $bar->increase();
204
  }
205
- $thumb->destruct();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  }
207
- }
 
 
 
 
 
 
208
 
209
- if(!empty($messagetext)) nggallery::show_error('<strong>'.__('Some pictures are not writeable :','nggallery').'</strong><br /><ul>'.$messagetext.'</ul>');
210
- return;
 
 
 
211
  }
212
 
213
- // **************************************************************
214
- function generateWatermark($gallery_absfolder, $pictures) {
215
- // ** $gallery_absfolder must contain abspath !!
216
-
 
 
 
 
 
 
 
 
217
  if(! class_exists('ngg_Thumbnail'))
218
- require_once(NGGALLERY_ABSPATH.'/lib/thumbnail.inc.php');
 
 
 
219
 
220
- $ngg_options = get_option('ngg_options');
 
 
 
 
 
221
 
222
- if (is_array($pictures)) {
223
-
224
- $bar = new wpProgressBar(__('Running... Please wait','nggallery'));
225
- $bar->setHeader(__('Set watermark','nggallery'));
226
- //total number of elements to process
227
- $elements = count($pictures);
228
- // wait a little bit after finished
229
- if ($elements > 5) $bar->setSleepOnFinish(2);
230
- //print the empty bar
231
- $bar->initialize($elements);
232
-
233
- foreach($pictures as $picture) {
234
-
235
- if (!is_writable($gallery_absfolder."/".$picture)) {
236
- $messagetext .= $gallery_absfolder."/".$picture."<br />";
237
- $bar->increase();
238
- continue;
239
- }
240
-
241
- $thumb = new ngg_Thumbnail($gallery_absfolder."/".$picture, TRUE);
242
- // echo $thumb->errmsg;
243
- // skip if file is not there
244
- if (!$thumb->error) {
245
- if ($ngg_options['wmType'] == 'image') {
246
- $thumb->watermarkImgPath = $ngg_options['wmPath'];
247
- $thumb->watermarkImage($ngg_options['wmPos'], $ngg_options['wmXpos'], $ngg_options['wmYpos']);
248
- }
249
- if ($ngg_options['wmType'] == 'text') {
250
- $thumb->watermarkText = $ngg_options['wmText'];
251
- $thumb->watermarkCreateText($ngg_options['wmColor'], $ngg_options['wmFont'], $ngg_options['wmSize'], $ngg_options['wmOpaque']);
252
- $thumb->watermarkImage($ngg_options['wmPos'], $ngg_options['wmXpos'], $ngg_options['wmYpos']);
253
- }
254
- if ( $thumb->save($gallery_absfolder."/".$picture,$ngg_options['imgQuality']) ) {
255
- // do not flush the buffer with useless messages
256
- if ($elements < 100)
257
- $bar->addNote($picture. __(' : Watermark created...','nggallery'));
258
- } else
259
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg."</strong>");
260
- $bar->increase();
261
- }
262
- $thumb->destruct();
263
- }
264
- }
265
 
266
- if(!empty($messagetext)) nggallery::show_error('<strong>'.__('Some pictures are not writeable :','nggallery').'</strong><br /><ul>'.$messagetext.'</ul>');
267
- return;
 
 
 
 
 
 
 
 
 
 
 
268
  }
269
 
270
- // **************************************************************
271
- function generateThumbnail($gallery_absfolder, $pictures) {
272
- // ** $gallery_absfolder must contain abspath !!
 
 
 
 
273
 
 
 
274
  if(! class_exists('ngg_Thumbnail'))
275
- require_once(NGGALLERY_ABSPATH.'/lib/thumbnail.inc.php');
276
-
277
- $ngg_options = get_option('ngg_options');
278
-
279
- $thumbfolder = nggallery::get_thumbnail_folder($gallery_absfolder);
280
- $prefix = nggallery::get_thumbnail_prefix($gallery_absfolder);
281
 
282
- if (!$thumbfolder)
283
- return;
284
 
285
- if (is_array($pictures)) {
286
-
287
- $bar = new wpProgressBar(__('Running... Please wait','nggallery'));
288
- $bar->setHeader(__('Create new thumbnails','nggallery'));
289
- //total number of elements to process
290
- $elements = count($pictures);
291
- // wait a little bit after finished
292
- if ($elements > 10) $bar->setSleepOnFinish(2);
293
- //print the empty bar
294
- $bar->initialize($elements);
295
-
296
- foreach($pictures as $picture) {
297
- // check for existing thumbnail
298
- if (file_exists($gallery_absfolder.$thumbfolder.$prefix.$picture)) {
299
- if (!is_writable($gallery_absfolder.$thumbfolder.$prefix.$picture)) {
300
- $messagetext .= $gallery_absfolder."/".$picture."<br />";
301
- $bar->increase();
302
- continue;
303
- }
304
- }
305
 
306
- $thumb = new ngg_Thumbnail($gallery_absfolder."/".utf8_decode($picture), TRUE);
307
-
308
- // skip if file is not there
309
- if (!$thumb->error) {
310
- if ($ngg_options['thumbcrop']) {
311
-
312
- // THX to Kees de Bruin, better thumbnails if portrait format
313
- $width = $ngg_options['thumbwidth'];
314
- $height = $ngg_options['thumbheight'];
315
- $curwidth = $thumb->currentDimensions['width'];
316
- $curheight = $thumb->currentDimensions['height'];
317
- if ($curwidth > $curheight) {
318
- $aspect = (100 * $curwidth) / $curheight;
319
- } else {
320
- $aspect = (100 * $curheight) / $curwidth;
321
- }
322
- $width = round(($width * $aspect) / 100);
323
- $height = round(($height * $aspect) / 100);
324
- $thumb->resize($width,$height,$ngg_options['thumbResampleMode']);
325
- $thumb->cropFromCenter($width,$ngg_options['thumbResampleMode']);
326
- }
327
- elseif ($ngg_options['thumbfix']) {
328
- // check for portrait format
329
- if ($thumb->currentDimensions['height'] > $thumb->currentDimensions['width']) {
330
- $thumb->resize($ngg_options['thumbwidth'], 0,$ngg_options['thumbResampleMode']);
331
- // get optimal y startpos
332
- $ypos = ($thumb->currentDimensions['height'] - $ngg_options['thumbheight']) / 2;
333
- $thumb->crop(0, $ypos, $ngg_options['thumbwidth'],$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
334
- } else {
335
- $thumb->resize(0,$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
336
- // get optimal x startpos
337
- $xpos = ($thumb->currentDimensions['width'] - $ngg_options['thumbwidth']) / 2;
338
- $thumb->crop($xpos, 0, $ngg_options['thumbwidth'],$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
339
- }
340
- } else {
341
- $thumb->resize($ngg_options['thumbwidth'],$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
342
- }
343
- if ( !$thumb->save($gallery_absfolder.$thumbfolder.$prefix.$picture,$ngg_options['thumbquality'])) {
344
- $errortext .= $picture . " <strong>(Error : ".$thumb->errmsg .")</strong><br />";
345
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg)."</strong>";
346
- }
347
- nggAdmin::chmod ($gallery_absfolder.$thumbfolder.$prefix.$picture);
348
- } else {
349
- $errortext .= $picture . " <strong>(Error : ".$thumb->errmsg .")</strong><br />";
350
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg."</strong>");
351
- }
352
- $thumb->destruct();
353
- // do not flush the buffer with useless messages
354
- if ($elements < 100)
355
- $bar->addNote($picture. __(' : Thumbnail created...','nggallery'));
356
- $bar->increase();
357
  }
 
358
  }
359
-
360
- if(!empty($errortext)) nggallery::show_error('<strong>'.__('Follow thumbnails could not created.','nggallery').'</strong><br /><ul>'.$errortext.'</ul>');
361
- if(!empty($messagetext)) nggallery::show_error('<strong>'.__('Some thumbnails are not writeable :','nggallery').'</strong><br /><ul>'.$messagetext.'</ul>');
362
 
363
- return;
 
 
 
 
 
364
  }
365
 
366
  // **************************************************************
367
- function add_Images($galleryID, $gallerypath, $imageslist) {
368
  // add images to database
369
  global $wpdb;
370
- $count_pic = 0;
371
- if (is_array($imageslist)) {
 
 
372
  foreach($imageslist as $picture) {
373
  $result = $wpdb->query("INSERT INTO $wpdb->nggpictures (galleryid, filename, alttext, exclude) VALUES ('$galleryID', '$picture', '$picture', 0) ");
374
  $pic_id = (int) $wpdb->insert_id;
375
- if ($result) $count_pic++;
 
376
 
377
  // add the metadata
378
- if ($_POST['addmetadata'])
379
- nggAdmin::import_MetaData($pic_id);
380
 
381
  }
382
  } // is_array
383
 
384
- return $count_pic;
385
 
386
  }
387
 
@@ -390,15 +378,16 @@ class nggAdmin{
390
  // add images to database
391
  global $wpdb;
392
 
 
 
393
  if (!is_array($imagesIds))
394
  $imagesIds = array($imagesIds);
395
 
396
  foreach($imagesIds as $pic_id) {
397
-
398
- $picture = new nggImage($pic_id );
399
  if (!$picture->error) {
400
 
401
- $meta = nggAdmin::get_MetaData($picture->absPath);
402
 
403
  // get the title
404
  if (!$alttext = $meta['title'])
@@ -406,20 +395,14 @@ class nggAdmin{
406
  // get the caption / description field
407
  if (!$description = $meta['caption'])
408
  $description = $picture->description;
 
 
409
  // update database
410
- $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET alttext = '$alttext', description = '$description' WHERE pid = $pic_id");
411
  // add the tags
412
  if ($meta['keywords']) {
413
  $taglist = explode(",", $meta['keywords']);
414
- $taglist = array_map('trim', $taglist);
415
- // load tag list
416
- $nggTags = new ngg_Tags();
417
- foreach($taglist as $tag) {
418
- // get the tag id
419
- $tagid = $nggTags->add_tag($tag);
420
- if ( $tagid )
421
- $nggTags->add_relationship($pic_id, $tagid);
422
- }
423
  } // add tags
424
  }// error check
425
  } // foreach
@@ -432,14 +415,15 @@ class nggAdmin{
432
  function get_MetaData($picPath) {
433
  // must be Gallery absPath + filename
434
 
435
- require_once(NGGALLERY_ABSPATH.'/lib/nggmeta.lib.php');
436
 
437
  $meta = array();
438
 
439
  $pdata = new nggMeta($picPath);
440
  $meta['title'] = $pdata->get_META('title');
441
  $meta['caption'] = $pdata->get_META('caption');
442
- $meta['keywords'] = $pdata->get_META('keywords');
 
443
 
444
  return $meta;
445
 
@@ -447,19 +431,15 @@ class nggAdmin{
447
 
448
  // **************************************************************
449
  function unzip($dir, $file) {
450
- // thx to Gregor at http://blog.scoutpress.de/forum/topic/45
451
 
452
  if(! class_exists('PclZip'))
453
- require_once(NGGALLERY_ABSPATH.'/lib/pclzip.lib.php');
454
 
455
  $archive = new PclZip($file);
456
 
457
  // extract all files in one folder
458
  if ($archive->extract(PCLZIP_OPT_PATH, $dir, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_CB_PRE_EXTRACT, 'ngg_getOnlyImages') == 0) {
459
- if ($archive->error_code == -22)
460
- nggallery::show_error(__('The Zip-file is too large. Exceed Memory limit !','nggallery'));
461
- else
462
- nggallery::show_error("Error : ".$archive->errorInfo(true));
463
  return false;
464
  }
465
 
@@ -470,10 +450,10 @@ class nggAdmin{
470
  function getOnlyImages($p_event, $p_header) {
471
  $info = pathinfo($p_header['filename']);
472
  // check for extension
473
- $ext = array("jpeg", "jpg", "png", "gif");
474
  if (in_array( strtolower($info['extension']), $ext)) {
475
  // For MAC skip the ".image" files
476
- if ($info['basename']{0} == "." )
477
  return 0;
478
  else
479
  return 1;
@@ -485,42 +465,50 @@ class nggAdmin{
485
  }
486
 
487
  // **************************************************************
488
- function import_zipfile($defaultpath) {
 
 
489
 
490
  if (nggAdmin::check_quota())
491
- return;
492
-
 
493
  $temp_zipfile = $_FILES['zipfile']['tmp_name'];
494
  $filename = $_FILES['zipfile']['name'];
495
 
496
  // check if file is a zip file
497
  if (!eregi('zip|download|octet-stream', $_FILES['zipfile']['type'])) {
498
  @unlink($temp_zipfile); // del temp file
499
- nggallery::show_error(__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type']);
500
- return;
501
  }
502
-
503
- // get foldername if selected
504
- $foldername = $_POST['zipgalselect'];
505
- if ($foldername == "0") {
506
  //cleanup and take the zipfile name as folder name
507
- $foldername = sanitize_title(strtok ($filename,'.'));
508
- //$foldername = preg_replace ("/(\s+)/", '-', strtolower(strtok ($filename,'.')));
 
 
 
 
 
 
 
509
  }
510
 
511
- //TODO:FORM must get the path from the tables not from defaultpath !!!
512
- // set complete folder path
513
- $newfolder = WINABSPATH.$defaultpath.$foldername;
514
 
515
  if (!is_dir($newfolder)) {
516
  // create new directories
517
  if (!wp_mkdir_p ($newfolder)) {
518
  $message = sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?', 'nggallery'), $newfolder);
519
- nggallery::show_error($message);
520
  return false;
521
  }
522
  if (!wp_mkdir_p ($newfolder.'/thumbs')) {
523
- nggallery::show_error(__('Unable to create directory ', 'nggallery').$newfolder.'/thumbs !');
524
  return false;
525
  }
526
  }
@@ -533,12 +521,11 @@ class nggAdmin{
533
  $message = __('Zip-File successfully unpacked','nggallery').'<br />';
534
 
535
  // parse now the folder and add to database
536
- $message .= nggAdmin::import_gallery($defaultpath.$foldername);
537
-
538
- nggallery::show_message($message);
539
  }
540
 
541
- return;
542
  }
543
 
544
  // **************************************************************
@@ -558,7 +545,7 @@ class nggAdmin{
558
  $galleryID = (int) $_POST['galleryselect'];
559
 
560
  if ($galleryID == 0) {
561
- nggallery::show_error(__('No gallery selected !','nggallery'));
562
  return;
563
  }
564
 
@@ -566,7 +553,7 @@ class nggAdmin{
566
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
567
 
568
  if (!$gallerypath){
569
- nggallery::show_error(__('Failure in database, no gallery path set !','nggallery'));
570
  return;
571
  }
572
 
@@ -582,38 +569,38 @@ class nggAdmin{
582
  // required until PHP 5.2.0
583
  $filepart['filename'] = substr($filepart["basename"],0 ,strlen($filepart["basename"]) - (strlen($filepart["extension"]) + 1) );
584
 
585
- $filename = sanitize_title($filepart['filename']) . "." . $filepart['extension'];
586
 
587
  // check for allowed extension
588
- $ext = array("jpeg", "jpg", "png", "gif");
589
  if (!in_array($filepart['extension'],$ext)){
590
- nggallery::show_error('<strong>'.$_FILES[$key]['name'].' </strong>'.__('is no valid image file!','nggallery'));
591
  continue;
592
  }
593
 
594
  // check if this filename already exist in the folder
595
  $i = 0;
596
  while (in_array($filename,$dirlist)) {
597
- $filename = sanitize_title($filepart['filename']) . "_" . $i++ . "." .$filepart['extension'];
598
  }
599
 
600
- $dest_file = WINABSPATH.$gallerypath."/".$filename;
601
 
602
  //check for folder permission
603
  if (!is_writeable(WINABSPATH.$gallerypath)) {
604
  $message = sprintf(__('Unable to write to directory %s. Is this directory writable by the server?', 'nggallery'), WINABSPATH.$gallerypath);
605
- nggallery::show_error($message);
606
  return;
607
  }
608
 
609
  // save temp file to gallery
610
  if (!@move_uploaded_file($_FILES[$key]['tmp_name'], $dest_file)){
611
- nggallery::show_error(__('Error, the file could not moved to : ','nggallery').$dest_file);
612
  nggAdmin::check_safemode(WINABSPATH.$gallerypath);
613
  continue;
614
  }
615
  if (!nggAdmin::chmod ($dest_file)) {
616
- nggallery::show_error(__('Error, the file permissions could not set','nggallery'));
617
  continue;
618
  }
619
 
@@ -626,13 +613,15 @@ class nggAdmin{
626
 
627
  if (count($imageslist) > 0) {
628
 
629
- //create thumbnails
630
- nggAdmin::generatethumbnail(WINABSPATH.$gallerypath,$imageslist);
631
-
632
  // add images to database
633
- $count_pic = nggAdmin::add_Images($galleryID, $gallerypath, $imageslist);
634
-
635
- nggallery::show_message($count_pic.__(' Image(s) successfully added','nggallery'));
 
 
 
 
 
636
  }
637
 
638
  return;
@@ -643,34 +632,31 @@ class nggAdmin{
643
  function swfupload_image($galleryID = 0) {
644
  // This function is called by the swfupload
645
  global $wpdb;
646
- $ngg_options = get_option('ngg_options');
647
 
648
  if ($galleryID == 0) {
649
  @unlink($temp_file);
650
  return __('No gallery selected !','nggallery');;
651
  }
652
 
653
- // WPMU check for quota
654
  if (nggAdmin::check_quota())
655
- return;
656
 
657
  // Check the upload
658
- if (!isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) {
659
- return __('Invalid upload. Error Code : ','nggallery').$_FILES["Filedata"]["error"];
660
- }
661
 
662
  // get the filename and extension
663
  $temp_file = $_FILES["Filedata"]['tmp_name'];
664
- $filepart = pathinfo ( strtolower($_FILES["Filedata"]['name']) );
665
  // required until PHP 5.2.0
666
- $filepart['filename'] = substr($filepart["basename"],0 ,strlen($filepart["basename"]) - (strlen($filepart["extension"]) + 1) );
667
  $filename = sanitize_title($filepart['filename']).".".$filepart['extension'];
668
 
669
  // check for allowed extension
670
- $ext = array("jpeg", "jpg", "png", "gif");
671
- if (!in_array($filepart['extension'],$ext)){
672
- return $_FILES[$key]['name'].__('is no valid image file!','nggallery');
673
- }
674
 
675
  // get the path to the gallery
676
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
@@ -680,15 +666,15 @@ class nggAdmin{
680
  }
681
 
682
  // read list of images
683
- $imageslist = nggAdmin::scandir(WINABSPATH.$gallerypath);
684
 
685
  // check if this filename already exist
686
  $i = 0;
687
  while (in_array($filename,$imageslist)) {
688
- $filename = sanitize_title($filepart['filename']) . "_" . $i++ . "." .$filepart['extension'];
689
  }
690
 
691
- $dest_file = WINABSPATH.$gallerypath."/".$filename;
692
 
693
  // save temp file to gallery
694
  if ( !@move_uploaded_file($_FILES["Filedata"]['tmp_name'], $dest_file) ){
@@ -696,9 +682,8 @@ class nggAdmin{
696
  return __('Error, the file could not moved to : ','nggallery').$dest_file;
697
  }
698
 
699
- if ( !nggAdmin::chmod($dest_file) ) {
700
  return __('Error, the file permissions could not set','nggallery');
701
- }
702
 
703
  return "0";
704
  }
@@ -708,14 +693,14 @@ class nggAdmin{
708
  // Only for WPMU
709
  if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck'))
710
  if( $error = upload_is_user_over_quota( false ) ) {
711
- nggallery::show_error( __( 'Sorry, you have used your space allocation. Please delete some files to upload more files.','nggallery' ) );
712
  return true;
713
  }
714
  return false;
715
  }
716
 
717
  // **************************************************************
718
- function chmod($filename = "") {
719
  // Set correct file permissions (taken from wp core)
720
  $stat = @ stat(dirname($filename));
721
  $perms = $stat['mode'] & 0007777;
@@ -737,197 +722,241 @@ class nggAdmin{
737
  if ($script_uid != $folder_uid) {
738
  $message = sprintf(__('SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually','nggallery'), $foldername);
739
  $message .= '<br />' . sprintf(__('When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory','nggallery'), $script_uid, $folder_uid );
740
- nggallery::show_error($message);
741
  return false;
742
  }
743
  }
744
 
745
  return true;
746
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
747
 
748
- } // END class nggAdmin
 
749
 
750
- /**
751
- * Class wpProgressBar for WordPress & NextGEN Gallery
752
- * Easy to use progress bar in html and css.
753
- *
754
- * @author Based on ProgressBar from David Bongard (mail@bongard.net | www.bongard.net)
755
- * and Phillip Berndt (standards.webmasterpro.de)
756
- * @mixed by Alex Rabe
757
- * @version 1.0 - 20071201
758
- * @license http://www.opensource.org/licenses/mit-license.php MIT License
759
- * @copyright Copyright &copy; 2007, David Bongard , Phillip Berndt
760
- *
761
- */
762
- class wpProgressBar {
 
 
 
 
 
 
 
 
763
 
764
- /**
765
- * Constructor
766
- *
767
- * @param str $message Message shown above the bar eg. "Please wait...". Default: ''
768
- * @param bool $hide Hide the bar after completion (with JavaScript). Default: true
769
- * @param int $sleepOnFinish Seconds to sleep after bar completion. Default: 0
770
- * @param int $barLength Length in percent. Default: 100
771
- * @param str $domID Html-Attribute "id" for the bar
772
- * @param str $header the header title
773
- */
774
- function wpProgressBar($message='', $hide=true, $sleepOnFinish=0, $barLength=100, $domID='progressbar', $header='')
775
- {
776
- global $pb_instance;
777
- $this->instance = $pb_instance++;
778
- $this->setAutohide($hide);
779
- $this->setSleepOnFinish($sleepOnFinish);
780
- $this->setDomIDs($domID);
781
- $this->setMessage($message);
782
- $this->setheader($header);
783
- $this->barLength = (int) $barLength;
784
- }
 
 
 
 
 
 
 
785
 
 
786
 
787
- /**
788
- * Print the empty progress bar
789
- * @param int $numElements Number of Elements to be processed and number of times $bar->initialize() will be called while processing
790
- */
791
- function initialize($numElements)
792
- {
793
- $this->StepCount = 0;
794
- $this->ListCount = 0;
795
-
796
- $numElements = (int) $numElements ;
797
-
798
- if($numElements == 0)
799
- return;
800
-
801
- $this->numSteps = $numElements;
802
-
803
- //calculate the % per Step
804
- $this->percentPerStep = round (100 / $numElements, 2);
805
-
806
- //stop buffering
807
- ob_end_flush();
808
- //start buffering
809
- ob_start();
810
-
811
- echo '<div id="'.$this->domID.'_container" class="wrap">
812
- <h2>'.$this->header.'</h2>
813
- <div id="'.$this->domID.'" class="progressbar" style="border: 1px inset ; display: block; height: 20px; background-color: rgb(160, 160, 160); width: '.$this->barLength.'%;"><div style="border: medium none ; display: block; height: 20px; background-color: rgb(13, 50, 79); width: 2%;"><span style="display: inline; position: relative; color: white; font-weight: bold; padding-bottom: 2px; padding-left: 5px;">0%</span></div></div>
814
- <div class="progressbar_message"><span style="display:block" id="'.$this->domIDMessage.'">'.$this->message.'</span></div>
815
- <ul id="'.$this->domIDProgressNote.'">&nbsp;</ul>
816
- </div>
817
-
818
- <script type="text/javascript">
819
- <!--
820
- oProgressbar = document.getElementById("'.$this->domID.'").firstChild;
821
- function progress(value)
822
- {
823
- oProgressbar.firstChild.firstChild.nodeValue = oProgressbar.style.width = value + "%";
824
- }
825
- // -->
826
- </script>';
827
 
828
- ob_flush();
829
- flush();
 
830
 
831
- $this->initialized = true;
832
  }
833
-
834
  /**
835
- * Count steps and increase bar length
836
- *
837
  */
838
- function increase()
839
- {
840
- if($this->StepCount < $this->numSteps) {
841
- //add a step
842
- $this->StepCount++;
843
-
844
- $value = $this->StepCount * $this->percentPerStep;
845
- echo('<script type="text/javascript">progress('.intval($value).');</script>');
846
-
847
- ob_flush();
848
- flush();
 
 
 
 
 
 
 
 
849
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
850
 
851
- if(!$this->finished && $this->StepCount == $this->numSteps){
852
- // to be sure that based on round we reached 100%
853
- if ($value != 100){
854
- echo('<script type="text/javascript">progress('.intval(100).');</script>');
855
- ob_flush();
856
- flush();
 
 
 
 
 
 
 
 
857
  }
858
- $this->stop();
859
  }
860
- }
 
 
 
 
 
861
 
862
- function stop($error=false)
863
- {
864
 
865
- //sleep x seconds before ending the script
866
- if(!$error){
867
- if($this->sleepOnFinish > 0){
868
- sleep($this->sleepOnFinish);
869
- }
870
 
871
- //hide the bar
872
- if($this->hide){
873
- echo '<script type="text/javascript">document.getElementById("'.$this->domID.'_container").style.display = "none";</script>';
874
- ob_flush();
875
- flush();
876
- }
877
- }
878
- $this->finished = true;
879
  }
 
 
 
 
 
880
 
881
- function setMessage($text)
882
- {
883
- if($this->initialized){
884
- echo '<script type="text/javascript">document.getElementById("'.$this->domIDMessage.'").innerHTML = "'.$text.'";</script>';
885
- ob_flush();flush();
886
- }else{
887
- $this->message = $text;
888
- }
889
- }
890
 
891
- function addNote($text)
892
- {
893
- if($this->initialized){
894
- echo '<script type="text/javascript">
895
- var newLI = document.createElement("li");
896
- var note = document.createTextNode("'.$text.'");
897
- document.getElementById("'.$this->domIDProgressNote.'").appendChild(newLI);
898
- document.getElementById("'.$this->domIDProgressNote.'").getElementsByTagName("li")['.$this->ListCount.'].appendChild(note);
899
- </script>';
900
- $this->ListCount++;
901
- if ($this->numSteps < 150) {
902
- ob_flush();
903
- flush();
904
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
905
  }
 
 
906
  }
907
 
908
- function setAutohide($hide)
909
- {
910
- $this->hide = (bool) $hide;
911
- }
912
-
913
- function setHeader($header)
914
- {
915
- $this->header = $header;
916
- }
917
-
918
- function setSleepOnFinish($sleepOnFinish)
919
- {
920
- $this->sleepOnFinish = (int) $sleepOnFinish;
921
- }
922
-
923
- function setDomIDs($domID)
924
- {
925
- $this->domID = strip_tags($domID).$this->instance;
926
- $this->domIDMessage = $this->domID.'_message';
927
- $this->domIDProgressNote = $this->domID.'_note';
928
- }
929
-
930
- }
931
 
932
  // **************************************************************
933
  //TODO: Cannot be member of a class ? Check PCLZIP later...
@@ -936,5 +965,4 @@ function ngg_getOnlyImages($p_event, $p_header) {
936
  return nggAdmin::getOnlyImages($p_event, $p_header);
937
 
938
  }
939
-
940
  ?>
7
  // **************************************************************
8
  function create_gallery($gallerytitle, $defaultpath) {
9
  // create a new gallery & folder
10
+ global $wpdb, $user_ID;
11
+
12
+ // get the current user ID
13
+ get_currentuserinfo();
14
 
15
  //cleanup pathname
16
  $galleryname = apply_filters('ngg_gallery_name', $gallerytitle);
17
  $nggpath = $defaultpath.$galleryname;
18
  $nggRoot = WINABSPATH.$defaultpath;
19
+ $txt = '';
20
 
21
  // No gallery name ?
22
  if (empty($galleryname)) {
23
+ nggGallery::show_error( __('No valid gallery name!', 'nggallery') );
24
  return false;
25
  }
26
 
29
  if ( !wp_mkdir_p($nggRoot) ) {
30
  $txt = __('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('didn\'t exist. Please create first the main gallery folder ', 'nggallery').'!<br />';
31
  $txt .= __('Check this link, if you didn\'t know how to set the permission :', 'nggallery').' <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a> ';
32
+ nggGallery::show_error($txt);
33
  return false;
34
  }
35
  }
38
  if ( !is_writeable($nggRoot ) ) {
39
  $txt = __('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('is not writeable !', 'nggallery').'<br />';
40
  $txt .= __('Check this link, if you didn\'t know how to set the permission :', 'nggallery').' <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a> ';
41
+ nggGallery::show_error($txt);
42
  return false;
43
  }
44
 
62
  $help = __('The server setting Safe-Mode is on !', 'nggallery');
63
  $help .= '<br />'.__('If you have problems, please create directory', 'nggallery').' <strong>'.$nggpath.'</strong> ';
64
  $help .= __('and the thumbnails directory', 'nggallery').' <strong>'.$nggpath.'/thumbs</strong> '.__('with permission 777 manually !', 'nggallery');
65
+ nggGallery::show_message($help);
66
  }
67
 
68
  // show a error message
72
  @rmdir(WINABSPATH.$nggpath.'/thumbs');
73
  @rmdir(WINABSPATH.$nggpath);
74
  }
75
+ nggGallery::show_error($txt);
76
  return false;
77
  }
78
 
79
  $result=$wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE name = '$galleryname' ");
80
  if ($result) {
81
+ nggGallery::show_error( __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ) .' <strong>'.$galleryname.'</strong> '.__('already exists', 'nggallery'));
82
  return false;
83
  } else {
84
+ $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path, title, author) VALUES ('$galleryname', '$nggpath', '$gallerytitle' , '$user_ID') ");
85
+ if ($result) {
86
+ $message = __('Gallery %1$s successfully created.<br/>You can show this gallery with the tag %2$s.<br/>','nggallery');
87
+ $message = sprintf($message, $galleryname, '[gallery=' . $wpdb->insert_id . ']');
88
+ $message .= '<a href="' . admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid=' . $wpdb->insert_id . '" >';
89
+ $message .= __('Edit gallery','nggallery');
90
+ $message .= '</a>';
91
+
92
+ nggGallery::show_message($message);
93
+ }
94
+ return true;
95
  }
96
  }
97
 
101
 
102
  //TODO: Check permission of existing thumb folder & images
103
 
104
+ global $wpdb, $user_ID;
105
+
106
+ // get the current user ID
107
+ get_currentuserinfo();
108
 
109
+ $created_msg = '';
110
 
111
  // remove trailing slash at the end, if somebody use it
112
  if (substr($galleryfolder, -1) == '/') $galleryfolder = substr($galleryfolder, 0, -1);
113
  $gallerypath = WINABSPATH.$galleryfolder;
114
 
115
  if (!is_dir($gallerypath)) {
116
+ nggGallery::show_error(__('Directory', 'nggallery').' <strong>'.$gallerypath.'</strong> '.__('doesn&#96;t exist!', 'nggallery'));
117
  return ;
118
  }
119
 
120
  // read list of images
121
  $new_imageslist = nggAdmin::scandir($gallerypath);
122
  if (empty($new_imageslist)) {
123
+ nggGallery::show_message(__('Directory', 'nggallery').' <strong>'.$gallerypath.'</strong> '.__('contains no pictures', 'nggallery'));
124
  return;
125
  }
126
  // check & create thumbnail folder
127
+ if ( !nggGallery::get_thumbnail_folder($gallerypath) )
128
  return;
129
 
130
  // take folder name as gallery name
131
  $galleryname = basename($galleryfolder);
132
 
133
+ // check for existing gallery folder
134
  $gallery_id = $wpdb->get_var("SELECT gid FROM $wpdb->nggallery WHERE path = '$galleryfolder' ");
135
 
136
  if (!$gallery_id) {
137
+ $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path, title, author) VALUES ('$galleryname', '$galleryfolder', '$galleryname', '$user_ID') ");
138
  if (!$result) {
139
+ nggGallery::show_error(__('Database error. Could not add gallery!','nggallery'));
140
  return;
141
  }
142
+ $created_msg = __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ) . ' <strong>'.$galleryname.'</strong> '.__('successfully created!','nggallery').'<br />';
143
+ $gallery_id = $wpdb->insert_id; // get index_id
144
  }
145
 
146
  // Look for existing image list
147
  $old_imageslist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$gallery_id' ");
148
  // if no images are there, create empty array
149
+ if ($old_imageslist == NULL)
150
+ $old_imageslist = array();
151
  // check difference
152
  $new_images = array_diff($new_imageslist, $old_imageslist);
 
 
153
 
154
  // add images to database
155
+ $image_ids = nggAdmin::add_Images($gallery_id, $new_images);
156
+
157
+ //add the preview image if needed
158
+ nggAdmin::set_gallery_preview ( $gallery_id );
159
+
160
+ // now create thumbnails
161
+ nggAdmin::do_ajax_operation( 'create_thumbnail' , $image_ids, __('Create new thumbnails','nggallery') );
162
+
163
+ //TODO:Message will not shown, because AJAX routine require more time, message should be passed to AJAX
164
+ nggGallery::show_message( $created_msg . count($image_ids) .__(' picture(s) successfully added','nggallery') );
165
+
166
  return;
167
 
168
  }
169
  // **************************************************************
170
+ function scandir($dirname = '.') {
171
  // thx to php.net :-)
172
  $ext = array("jpeg", "jpg", "png", "gif");
173
  $files = array();
174
  if($handle = opendir($dirname)) {
175
  while(false !== ($file = readdir($handle)))
176
  for($i=0;$i<sizeof($ext);$i++)
177
+ if(stristr($file, '.' . $ext[$i]))
178
  $files[] = utf8_encode($file);
179
  closedir($handle);
180
  }
182
  return ($files);
183
  }
184
 
185
+ /**
186
+ * nggAdmin::createThumbnail() - function to create or recreate a thumbnail
187
+ *
188
+ * @param object | int $image contain all information about the image or the id
189
+ * @return string result code
190
+ * @since v1.0.0
191
+ */
192
+ function create_thumbnail($image) {
193
+
194
+ global $ngg;
195
+
196
  if(! class_exists('ngg_Thumbnail'))
197
+ require_once( nggGallery::graphic_library() );
198
 
199
+ if ( is_numeric($image) )
200
+ $image = nggdb::find_image( $image );
201
+
202
+ if ( !is_object($image) )
203
+ return __('Object didn\'t contain correct data','nggallery');
204
 
205
+ // check for existing thumbnail
206
+ if (file_exists($image->thumbPath))
207
+ if (!is_writable($image->thumbPath))
208
+ return $image->filename . __(' is not writeable ','nggallery');
209
+
210
+ $thumb = new ngg_Thumbnail($image->imagePath, TRUE);
211
+
212
+ // skip if file is not there
213
+ if (!$thumb->error) {
214
+ if ($ngg->options['thumbcrop']) {
 
 
 
 
 
 
 
 
215
 
216
+ // THX to Kees de Bruin, better thumbnails if portrait format
217
+ $width = $ngg->options['thumbwidth'];
218
+ $height = $ngg->options['thumbheight'];
219
+ $curwidth = $thumb->currentDimensions['width'];
220
+ $curheight = $thumb->currentDimensions['height'];
221
+ if ($curwidth > $curheight) {
222
+ $aspect = (100 * $curwidth) / $curheight;
223
+ } else {
224
+ $aspect = (100 * $curheight) / $curwidth;
 
 
 
225
  }
226
+ $width = round(($width * $aspect) / 100);
227
+ $height = round(($height * $aspect) / 100);
228
+
229
+ $thumb->resize($width,$height);
230
+ $thumb->cropFromCenter($width);
231
+ }
232
+ elseif ($ngg->options['thumbfix']) {
233
+ // check for portrait format
234
+ if ($thumb->currentDimensions['height'] > $thumb->currentDimensions['width']) {
235
+ $thumb->resize($ngg->options['thumbwidth'], 0);
236
+ // get optimal y startpos
237
+ $ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
238
+ $thumb->crop(0, $ypos, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
239
+ } else {
240
+ $thumb->resize(0,$ngg->options['thumbheight']);
241
+ // get optimal x startpos
242
+ $xpos = ($thumb->currentDimensions['width'] - $ngg->options['thumbwidth']) / 2;
243
+ $thumb->crop($xpos, 0, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
244
+ }
245
+ } else {
246
+ $thumb->resize($ngg->options['thumbwidth'],$ngg->options['thumbheight']);
247
  }
248
+
249
+ // save the new thumbnail
250
+ $thumb->save($image->thumbPath, $ngg->options['thumbquality']);
251
+ nggAdmin::chmod ($image->thumbPath);
252
+ }
253
+
254
+ $thumb->destruct();
255
 
256
+ if ( !empty($thumb->errmsg) )
257
+ return ' <strong>' . $image->filename . ' (Error : '.$thumb->errmsg .')</strong>';
258
+
259
+ // success
260
+ return '1';
261
  }
262
 
263
+ /**
264
+ * nggAdmin::resize_image() - create a new image, based on the height /width
265
+ *
266
+ * @param object | int $image contain all information about the image or the id
267
+ * @param integer $width optional
268
+ * @param integer $height optional
269
+ * @return string result code
270
+ */
271
+ function resize_image($image, $width = 0, $height = 0) {
272
+
273
+ global $ngg;
274
+
275
  if(! class_exists('ngg_Thumbnail'))
276
+ require_once( nggGallery::graphic_library() );
277
+
278
+ if ( is_numeric($image) )
279
+ $image = nggdb::find_image( $image );
280
 
281
+ if ( !is_object($image) )
282
+ return __('Object didn\'t contain correct data','nggallery');
283
+
284
+ // if no parameter is set, take global settings
285
+ $width = ($width == 0) ? $ngg->options['imgWidth'] : $width;
286
+ $height = ($height == 0) ? $ngg->options['imgHeight'] : $height;
287
 
288
+ if (!is_writable($image->imagePath))
289
+ return ' <strong>' . $image->filename . __(' is not writeable','nggallery') . '</strong>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
 
291
+ $file = new ngg_Thumbnail($image->imagePath, TRUE);
292
+
293
+ // skip if file is not there
294
+ if (!$file->error) {
295
+ $file->resize($width, $height, 4);
296
+ $file->save($image->imagePath, $ngg->options['imgQuality']);
297
+ $file->destruct();
298
+ } else {
299
+ $file->destruct();
300
+ return ' <strong>' . $image->filename . ' (Error : ' . $file->errmsg . ')</strong>';
301
+ }
302
+
303
+ return '1';
304
  }
305
 
306
+ /**
307
+ * nggAdmin::set_watermark() - set the watermarl for the image
308
+ *
309
+ * @param object | int $image contain all information about the image or the id
310
+ * @return string result code
311
+ */
312
+ function set_watermark($image) {
313
 
314
+ global $ngg;
315
+
316
  if(! class_exists('ngg_Thumbnail'))
317
+ require_once( nggGallery::graphic_library() );
 
 
 
 
 
318
 
319
+ if ( is_numeric($image) )
320
+ $image = nggdb::find_image( $image );
321
 
322
+ if ( !is_object($image) )
323
+ return __('Object didn\'t contain correct data','nggallery');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
 
325
+ if (!is_writable($image->imagePath))
326
+ return ' <strong>' . $image->filename . __(' is not writeable','nggallery') . '</strong>';
327
+
328
+ $file = new ngg_Thumbnail( $image->imagePath, TRUE );
329
+
330
+ // skip if file is not there
331
+ if (!$file->error) {
332
+ if ($ngg->options['wmType'] == 'image') {
333
+ $file->watermarkImgPath = $ngg->options['wmPath'];
334
+ $file->watermarkImage($ngg->options['wmPos'], $ngg->options['wmXpos'], $ngg->options['wmYpos']);
335
+ }
336
+ if ($ngg->options['wmType'] == 'text') {
337
+ $file->watermarkText = $ngg->options['wmText'];
338
+ $file->watermarkCreateText($ngg->options['wmColor'], $ngg->options['wmFont'], $ngg->options['wmSize'], $ngg->options['wmOpaque']);
339
+ $file->watermarkImage($ngg->options['wmPos'], $ngg->options['wmXpos'], $ngg->options['wmYpos']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  }
341
+ $file->save($image->imagePath, $ngg->options['imgQuality']);
342
  }
 
 
 
343
 
344
+ $file->destruct();
345
+
346
+ if ( !empty($file->errmsg) )
347
+ return ' <strong>' . $image->filename . ' (Error : '.$file->errmsg .')</strong>';
348
+
349
+ return '1';
350
  }
351
 
352
  // **************************************************************
353
+ function add_Images($galleryID, $imageslist) {
354
  // add images to database
355
  global $wpdb;
356
+
357
+ $image_ids = array();
358
+
359
+ if ( is_array($imageslist) ) {
360
  foreach($imageslist as $picture) {
361
  $result = $wpdb->query("INSERT INTO $wpdb->nggpictures (galleryid, filename, alttext, exclude) VALUES ('$galleryID', '$picture', '$picture', 0) ");
362
  $pic_id = (int) $wpdb->insert_id;
363
+ if ($result)
364
+ $image_ids[] = $pic_id;
365
 
366
  // add the metadata
367
+ nggAdmin::import_MetaData($pic_id);
 
368
 
369
  }
370
  } // is_array
371
 
372
+ return $image_ids;
373
 
374
  }
375
 
378
  // add images to database
379
  global $wpdb;
380
 
381
+ require_once(NGGALLERY_ABSPATH.'/lib/image.php');
382
+
383
  if (!is_array($imagesIds))
384
  $imagesIds = array($imagesIds);
385
 
386
  foreach($imagesIds as $pic_id) {
387
+ $picture = nggdb::find_image($pic_id);
 
388
  if (!$picture->error) {
389
 
390
+ $meta = nggAdmin::get_MetaData($picture->imagePath);
391
 
392
  // get the title
393
  if (!$alttext = $meta['title'])
395
  // get the caption / description field
396
  if (!$description = $meta['caption'])
397
  $description = $picture->description;
398
+ // get the file date/time from exif
399
+ $timestamp = $meta['timestamp'];
400
  // update database
401
+ $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET alttext = '$alttext', description = '$description', imagedate = '$timestamp' WHERE pid = $pic_id");
402
  // add the tags
403
  if ($meta['keywords']) {
404
  $taglist = explode(",", $meta['keywords']);
405
+ wp_set_object_terms($pic_id, $taglist, 'ngg_tag');
 
 
 
 
 
 
 
 
406
  } // add tags
407
  }// error check
408
  } // foreach
415
  function get_MetaData($picPath) {
416
  // must be Gallery absPath + filename
417
 
418
+ require_once(NGGALLERY_ABSPATH.'/lib/meta.php');
419
 
420
  $meta = array();
421
 
422
  $pdata = new nggMeta($picPath);
423
  $meta['title'] = $pdata->get_META('title');
424
  $meta['caption'] = $pdata->get_META('caption');
425
+ $meta['keywords'] = $pdata->get_META('keywords');
426
+ $meta['timestamp'] = $pdata->get_date_time();
427
 
428
  return $meta;
429
 
431
 
432
  // **************************************************************
433
  function unzip($dir, $file) {
 
434
 
435
  if(! class_exists('PclZip'))
436
+ require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
437
 
438
  $archive = new PclZip($file);
439
 
440
  // extract all files in one folder
441
  if ($archive->extract(PCLZIP_OPT_PATH, $dir, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_CB_PRE_EXTRACT, 'ngg_getOnlyImages') == 0) {
442
+ nggGallery::show_error( 'Error : ' . $archive->errorInfo(true) );
 
 
 
443
  return false;
444
  }
445
 
450
  function getOnlyImages($p_event, $p_header) {
451
  $info = pathinfo($p_header['filename']);
452
  // check for extension
453
+ $ext = array('jpeg', 'jpg', 'png', 'gif');
454
  if (in_array( strtolower($info['extension']), $ext)) {
455
  // For MAC skip the ".image" files
456
+ if ($info['basename']{0} == '.' )
457
  return 0;
458
  else
459
  return 1;
465
  }
466
 
467
  // **************************************************************
468
+ function import_zipfile($galleryID) {
469
+
470
+ global $ngg, $wpdb;
471
 
472
  if (nggAdmin::check_quota())
473
+ return false;
474
+
475
+ $defaultpath = $ngg->options['gallerypath'];
476
  $temp_zipfile = $_FILES['zipfile']['tmp_name'];
477
  $filename = $_FILES['zipfile']['name'];
478
 
479
  // check if file is a zip file
480
  if (!eregi('zip|download|octet-stream', $_FILES['zipfile']['type'])) {
481
  @unlink($temp_zipfile); // del temp file
482
+ nggGallery::show_error(__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type']);
483
+ return false;
484
  }
485
+
486
+ // should this unpacked into a new folder ?
487
+ if ( $galleryID == '0' ) {
 
488
  //cleanup and take the zipfile name as folder name
489
+ $foldername = sanitize_title(strtok ($filename, '.'));
490
+ } else {
491
+ // get foldername if selected
492
+ $foldername = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
493
+ }
494
+
495
+ if ( empty($foldername) ) {
496
+ nggGallery::show_error( __('Could not get a vaild foldername', 'nggallery') );
497
+ return false;
498
  }
499
 
500
+ // set complete folder path
501
+ $newfolder = WINABSPATH . $defaultpath . $foldername;
 
502
 
503
  if (!is_dir($newfolder)) {
504
  // create new directories
505
  if (!wp_mkdir_p ($newfolder)) {
506
  $message = sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?', 'nggallery'), $newfolder);
507
+ nggGallery::show_error($message);
508
  return false;
509
  }
510
  if (!wp_mkdir_p ($newfolder.'/thumbs')) {
511
+ nggGallery::show_error(__('Unable to create directory ', 'nggallery') . $newfolder . '/thumbs !');
512
  return false;
513
  }
514
  }
521
  $message = __('Zip-File successfully unpacked','nggallery').'<br />';
522
 
523
  // parse now the folder and add to database
524
+ $message .= nggAdmin::import_gallery( $defaultpath . $foldername);
525
+ nggGallery::show_message($message);
 
526
  }
527
 
528
+ return true;
529
  }
530
 
531
  // **************************************************************
545
  $galleryID = (int) $_POST['galleryselect'];
546
 
547
  if ($galleryID == 0) {
548
+ nggGallery::show_error(__('No gallery selected !','nggallery'));
549
  return;
550
  }
551
 
553
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
554
 
555
  if (!$gallerypath){
556
+ nggGallery::show_error(__('Failure in database, no gallery path set !','nggallery'));
557
  return;
558
  }
559
 
569
  // required until PHP 5.2.0
570
  $filepart['filename'] = substr($filepart["basename"],0 ,strlen($filepart["basename"]) - (strlen($filepart["extension"]) + 1) );
571
 
572
+ $filename = sanitize_title($filepart['filename']) . '.' . $filepart['extension'];
573
 
574
  // check for allowed extension
575
+ $ext = array('jpeg', 'jpg', 'png', 'gif');
576
  if (!in_array($filepart['extension'],$ext)){
577
+ nggGallery::show_error('<strong>'.$_FILES[$key]['name'].' </strong>'.__('is no valid image file!','nggallery'));
578
  continue;
579
  }
580
 
581
  // check if this filename already exist in the folder
582
  $i = 0;
583
  while (in_array($filename,$dirlist)) {
584
+ $filename = sanitize_title($filepart['filename']) . '_' . $i++ . '.' .$filepart['extension'];
585
  }
586
 
587
+ $dest_file = WINABSPATH . $gallerypath . '/' . $filename;
588
 
589
  //check for folder permission
590
  if (!is_writeable(WINABSPATH.$gallerypath)) {
591
  $message = sprintf(__('Unable to write to directory %s. Is this directory writable by the server?', 'nggallery'), WINABSPATH.$gallerypath);
592
+ nggGallery::show_error($message);
593
  return;
594
  }
595
 
596
  // save temp file to gallery
597
  if (!@move_uploaded_file($_FILES[$key]['tmp_name'], $dest_file)){
598
+ nggGallery::show_error(__('Error, the file could not moved to : ','nggallery').$dest_file);
599
  nggAdmin::check_safemode(WINABSPATH.$gallerypath);
600
  continue;
601
  }
602
  if (!nggAdmin::chmod ($dest_file)) {
603
+ nggGallery::show_error(__('Error, the file permissions could not set','nggallery'));
604
  continue;
605
  }
606
 
613
 
614
  if (count($imageslist) > 0) {
615
 
 
 
 
616
  // add images to database
617
+ $image_ids = nggAdmin::add_Images($galleryID, $imageslist);
618
+
619
+ //create thumbnails
620
+ nggAdmin::do_ajax_operation( 'create_thumbnail' , $image_ids, __('Create new thumbnails','nggallery') );
621
+ //add the preview image if needed
622
+ nggAdmin::set_gallery_preview ( $galleryID );
623
+
624
+ nggGallery::show_message( count($image_ids) . __(' Image(s) successfully added','nggallery'));
625
  }
626
 
627
  return;
632
  function swfupload_image($galleryID = 0) {
633
  // This function is called by the swfupload
634
  global $wpdb;
 
635
 
636
  if ($galleryID == 0) {
637
  @unlink($temp_file);
638
  return __('No gallery selected !','nggallery');;
639
  }
640
 
641
+ // WPMU action
642
  if (nggAdmin::check_quota())
643
+ return '0';
644
 
645
  // Check the upload
646
+ if (!isset($_FILES['Filedata']) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0)
647
+ return __('Invalid upload. Error Code : ','nggallery') . $_FILES["Filedata"]["error"];
 
648
 
649
  // get the filename and extension
650
  $temp_file = $_FILES["Filedata"]['tmp_name'];
651
+ $filepart = pathinfo ( strtolower($_FILES['Filedata']['name']) );
652
  // required until PHP 5.2.0
653
+ $filepart['filename'] = substr($filepart['basename'],0 ,strlen($filepart['basename']) - (strlen($filepart["extension"]) + 1) );
654
  $filename = sanitize_title($filepart['filename']).".".$filepart['extension'];
655
 
656
  // check for allowed extension
657
+ $ext = array('jpeg', 'jpg', 'png', 'gif');
658
+ if (!in_array($filepart['extension'], $ext))
659
+ return $_FILES[$key]['name'] . __('is no valid image file!','nggallery');
 
660
 
661
  // get the path to the gallery
662
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
666
  }
667
 
668
  // read list of images
669
+ $imageslist = nggAdmin::scandir( WINABSPATH.$gallerypath );
670
 
671
  // check if this filename already exist
672
  $i = 0;
673
  while (in_array($filename,$imageslist)) {
674
+ $filename = sanitize_title($filepart['filename']) . '_' . $i++ . '.' .$filepart['extension'];
675
  }
676
 
677
+ $dest_file = WINABSPATH . $gallerypath . '/' . $filename;
678
 
679
  // save temp file to gallery
680
  if ( !@move_uploaded_file($_FILES["Filedata"]['tmp_name'], $dest_file) ){
682
  return __('Error, the file could not moved to : ','nggallery').$dest_file;
683
  }
684
 
685
+ if ( !nggAdmin::chmod($dest_file) )
686
  return __('Error, the file permissions could not set','nggallery');
 
687
 
688
  return "0";
689
  }
693
  // Only for WPMU
694
  if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck'))
695
  if( $error = upload_is_user_over_quota( false ) ) {
696
+ nggGallery::show_error( __( 'Sorry, you have used your space allocation. Please delete some files to upload more files.','nggallery' ) );
697
  return true;
698
  }
699
  return false;
700
  }
701
 
702
  // **************************************************************
703
+ function chmod($filename = '') {
704
  // Set correct file permissions (taken from wp core)
705
  $stat = @ stat(dirname($filename));
706
  $perms = $stat['mode'] & 0007777;
722
  if ($script_uid != $folder_uid) {
723
  $message = sprintf(__('SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually','nggallery'), $foldername);
724
  $message .= '<br />' . sprintf(__('When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory','nggallery'), $script_uid, $folder_uid );
725
+ nggGallery::show_error($message);
726
  return false;
727
  }
728
  }
729
 
730
  return true;
731
  }
732
+
733
+ function can_manage_this_gallery($check_ID) {
734
+ // check is the ID fit's to the user_ID'
735
+ global $user_ID, $wp_roles;
736
+
737
+ // get the current user ID
738
+ get_currentuserinfo();
739
+
740
+ if ( !current_user_can('NextGEN Manage others gallery') )
741
+ if ( $user_ID != $check_ID)
742
+ return false;
743
+
744
+ return true;
745
+
746
+ }
747
+
748
+ function move_images($pic_ids, $dest_gid) {
749
 
750
+ $errors = '';
751
+ $count = 0;
752
 
753
+ if (!is_array($pic_ids))
754
+ $pic_ids = array($pic_ids);
755
+
756
+ // Get destination gallery
757
+ $destination = nggdb::find_gallery( $dest_gid );
758
+ $dest_abspath = WINABSPATH . $destination->path;
759
+
760
+ if ( $destination == null ) {
761
+ nggGallery::show_error(__('The destination gallery does not exist','nggallery'));
762
+ return;
763
+ }
764
+
765
+ // Check for folder permission
766
+ if ( !is_writeable( $dest_abspath ) ) {
767
+ $message = sprintf(__('Unable to write to directory %s. Is this directory writable by the server?', 'nggallery'), $dest_abspath );
768
+ nggGallery::show_error($message);
769
+ return;
770
+ }
771
+
772
+ // Get pictures
773
+ $images = nggdb::find_images_in_list($pic_ids);
774
 
775
+ foreach ($images as $image) {
776
+
777
+ $i = 0;
778
+ $tmp_prefix = '';
779
+
780
+ $destination_file_name = $image->filename;
781
+ // check if the filename already exist, then we add a copy_ prefix
782
+ while (file_exists( $dest_abspath . '/' . $destination_file_name)) {
783
+ $tmp_prefix = 'copy_' . ($i++) . '_';
784
+ $destination_file_name = $tmp_prefix . $image->filename;
785
+ }
786
+
787
+ $destination_path = $dest_abspath . '/' . $destination_file_name;
788
+ $destination_thumbnail = $dest_abspath . '/thumbs/thumbs_' . $destination_file_name;
789
+
790
+ // Move files
791
+ if ( !@rename($image->imagePath, $destination_path) ) {
792
+ $errors .= sprintf(__('Failed to move image %1$s to %2$s','nggallery'),
793
+ '<strong>' . $image->filename . '</strong>', $destination_path) . '<br />';
794
+ continue;
795
+ }
796
+
797
+ // Move the thumbnail, if possible
798
+ !@rename($image->thumbPath, $destination_thumbnail);
799
+
800
+ // Change the gallery id in the database , maybe the filename
801
+ if ( nggdb::update_image($image->pid, $dest_gid, $destination_file_name) )
802
+ $count++;
803
 
804
+ }
805
 
806
+ if ( $errors != '' )
807
+ nggGallery::show_error($errors);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
 
809
+ $link = '<a href="' . admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid=' . $destination->gid . '" >' . $destination->title . '</a>';
810
+ $messages = sprintf(__('Moved %1$s picture(s) to gallery : %2$s .','nggallery'), $count, $link);
811
+ nggGallery::show_message($messages);
812
 
813
+ return;
814
  }
815
+
816
  /**
817
+ * Copy images to another gallery
 
818
  */
819
+ function copy_images($pic_ids, $dest_gid) {
820
+
821
+ $errors = $messages = '';
822
+
823
+ if (!is_array($pic_ids))
824
+ $pic_ids = array($pic_ids);
825
+
826
+ // Get destination gallery
827
+ $destination = nggdb::find_gallery( $dest_gid );
828
+ if ( $destination == null ) {
829
+ nggGallery::show_error(__('The destination gallery does not exist','nggallery'));
830
+ return;
831
+ }
832
+
833
+ // Check for folder permission
834
+ if (!is_writeable(WINABSPATH.$destination->path)) {
835
+ $message = sprintf(__('Unable to write to directory %s. Is this directory writable by the server?', 'nggallery'), WINABSPATH.$destination->path);
836
+ nggGallery::show_error($message);
837
+ return;
838
  }
839
+
840
+ // Get pictures
841
+ $images = nggdb::find_images_in_list($pic_ids);
842
+ $destination_path = WINABSPATH . $destination->path;
843
+
844
+ foreach ($images as $image) {
845
+ // WPMU action
846
+ if (nggAdmin::check_quota())
847
+ return;
848
+
849
+ $i = 0;
850
+ $tmp_prefix = '';
851
+ $destination_file_name = $image->filename;
852
+ while (file_exists($destination_path . '/' . $destination_file_name)) {
853
+ $tmp_prefix = 'copy_' . ($i++) . '_';
854
+ $destination_file_name = $tmp_prefix . $image->filename;
855
+ }
856
+
857
+ $destination_file_path = $destination_path . '/' . $destination_file_name;
858
+ $destination_thumb_file_path = $destination_path . '/' . $image->thumbFolder . $image->thumbPrefix . $destination_file_name;
859
+
860
+ // Copy files
861
+ if ( !@copy($image->imagePath, $destination_file_path) ) {
862
+ $errors .= sprintf(__('Failed to copy image %1$s to %2$s','nggallery'),
863
+ $image->filename, $destination_file_path) . '<br />';
864
+ continue;
865
+ }
866
+
867
+ // Copy the thumbnail if possible
868
+ !@copy($image->thumbPath, $destination_thumb_file_path);
869
+
870
+ // Create new database entry for the image
871
+ $new_pid = nggdb::insert_image( $destination->gid, $destination_file_name, $image->alttext, $image->description, $image->exclude);
872
 
873
+ if (!isset($new_pid)) {
874
+ $errors .= sprintf(__('Failed to copy database row for picture %s','nggallery'), $image->pid) . '<br />';
875
+ continue;
876
+ }
877
+
878
+ // Copy tags
879
+ nggTags::copy_tags($image->pid, $new_pid);
880
+
881
+ if ( $tmp_prefix != '' ) {
882
+ $messages .= sprintf(__('Image %1$s (%2$s) copied as image %3$s (%4$s) &raquo; The file already existed in the destination gallery.','nggallery'),
883
+ $image->pid, $image->filename, $new_pid, $destination_file_name) . '<br />';
884
+ } else {
885
+ $messages .= sprintf(__('Image %1$s (%2$s) copied as image %3$s (%4$s)','nggallery'),
886
+ $image->pid, $image->filename, $new_pid, $destination_file_name) . '<br />';
887
  }
888
+
889
  }
890
+
891
+ // Finish by showing errors or success
892
+ if ( $errors == '' ) {
893
+ $link = '<a href="' . admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid=' . $destination->gid . '" >' . $destination->title . '</a>';
894
+ $messages .= '<hr />' . sprintf(__('Copied %1$s picture(s) to gallery: %2$s .','nggallery'), count($images), $link);
895
+ }
896
 
897
+ if ( $messages != '' )
898
+ nggGallery::show_message($messages);
899
 
900
+ if ( $errors != '' )
901
+ nggGallery::show_error($errors);
 
 
 
902
 
903
+ return;
 
 
 
 
 
 
 
904
  }
905
+
906
+ function do_ajax_operation( $operation, $image_array, $title = '' ) {
907
+
908
+ if ( !is_array($image_array) || empty($image_array) )
909
+ return;
910
 
911
+ $js_array = implode('","', $image_array);
912
+
913
+ // send out some JavaScript, which initate the ajax operation
914
+ ?>
915
+ <script type="text/javascript">
 
 
 
 
916
 
917
+ Images = new Array("<?php echo $js_array; ?>");
918
+
919
+ nggAjaxOptions = {
920
+ operation: "<?php echo $operation; ?>",
921
+ ids: Images,
922
+ header: "<?php echo $title; ?>",
923
+ maxStep: Images.length
924
+ };
925
+
926
+ jQuery(document).ready( function(){
927
+ nggProgressBar.init( nggAjaxOptions );
928
+ nggAjax.init( nggAjaxOptions );
929
+ } );
930
+ </script>
931
+
932
+ <div id="progressbar_container" class="wrap"></div>
933
+
934
+ <?php
935
+ }
936
+
937
+ /**
938
+ * nggAdmin::set_gallery_preview() - define a preview pic after the first upload, can be changed in the gallery settings
939
+ *
940
+ * @param int $galleryID
941
+ * @return
942
+ */
943
+ function set_gallery_preview( $galleryID ) {
944
+
945
+ global $wpdb;
946
+
947
+ $imageID = $wpdb->get_var("SELECT previewpic FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
948
+
949
+ // in the case no preview image is setup, we do this now
950
+ if ($imageID == 0) {
951
+ $firstImage = $wpdb->get_var("SELECT pid FROM $wpdb->nggpictures WHERE exclude != 1 AND galleryid = '$galleryID' ORDER by pid DESC limit 0,1");
952
+ if ($firstImage)
953
+ $wpdb->query("UPDATE $wpdb->nggallery SET previewpic = '$firstImage' WHERE gid = '$galleryID'");
954
  }
955
+
956
+ return;
957
  }
958
 
959
+ } // END class nggAdmin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
960
 
961
  // **************************************************************
962
  //TODO: Cannot be member of a class ? Check PCLZIP later...
965
  return nggAdmin::getOnlyImages($p_event, $p_header);
966
 
967
  }
 
968
  ?>
admin/images/menu-bits.gif ADDED
Binary file
admin/images/nextgen.png ADDED
Binary file
ngginstall.php → admin/install.php RENAMED
@@ -1,6 +1,13 @@
1
  <?php
2
  if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
 
 
 
 
 
 
 
 
4
  function nggallery_install () {
5
 
6
  global $wpdb , $wp_roles, $wp_version;
@@ -16,19 +23,19 @@ function nggallery_install () {
16
  update_option( "ngg_init_check", __('Sorry, NextGEN Gallery works only with a role called administrator',"nggallery") );
17
  return;
18
  }
 
19
  $role->add_cap('NextGEN Gallery overview');
20
  $role->add_cap('NextGEN Use TinyMCE');
21
  $role->add_cap('NextGEN Upload images');
22
  $role->add_cap('NextGEN Manage gallery');
 
 
23
  $role->add_cap('NextGEN Edit album');
24
  $role->add_cap('NextGEN Change style');
25
  $role->add_cap('NextGEN Change options');
26
 
27
  // upgrade function changed in WordPress 2.3
28
- if (version_compare($wp_version, '2.3', '>='))
29
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
30
- else
31
- require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
32
 
33
  // add charset & collate like wp core
34
  $charset_collate = '';
@@ -43,8 +50,6 @@ function nggallery_install () {
43
  $nggpictures = $wpdb->prefix . 'ngg_pictures';
44
  $nggallery = $wpdb->prefix . 'ngg_gallery';
45
  $nggalbum = $wpdb->prefix . 'ngg_album';
46
- $nggtags = $wpdb->prefix . 'ngg_tags';
47
- $nggpic2tags = $wpdb->prefix . 'ngg_pic2tags';
48
 
49
  if($wpdb->get_var("show tables like '$nggpictures'") != $nggpictures) {
50
 
@@ -54,16 +59,14 @@ function nggallery_install () {
54
  filename VARCHAR(255) NOT NULL ,
55
  description MEDIUMTEXT NULL ,
56
  alttext MEDIUMTEXT NULL ,
 
57
  exclude TINYINT NULL DEFAULT '0' ,
58
  sortorder BIGINT(20) DEFAULT '0' NOT NULL ,
59
  PRIMARY KEY pid (pid)
60
  ) $charset_collate;";
61
 
62
  dbDelta($sql);
63
-
64
- ngg_default_options();
65
- add_option("ngg_db_version", NGG_DBVERSION);
66
- }
67
 
68
  if($wpdb->get_var("show tables like '$nggallery'") != $nggallery) {
69
 
@@ -75,6 +78,7 @@ function nggallery_install () {
75
  galdesc MEDIUMTEXT NULL ,
76
  pageid BIGINT(20) NULL DEFAULT '0' ,
77
  previewpic BIGINT(20) NULL DEFAULT '0' ,
 
78
  PRIMARY KEY gid (gid)
79
  ) $charset_collate;";
80
 
@@ -92,86 +96,44 @@ function nggallery_install () {
92
 
93
  dbDelta($sql);
94
  }
95
-
96
- // new since version 0.70
97
- if($wpdb->get_var("show tables like '$nggtags'") != $nggtags) {
98
-
99
- $sql = "CREATE TABLE " . $nggtags . " (
100
- id BIGINT(20) NOT NULL AUTO_INCREMENT ,
101
- name VARCHAR(55) NOT NULL ,
102
- slug VARCHAR(200) NOT NULL,
103
- PRIMARY KEY id (id),
104
- UNIQUE KEY slug (slug)
105
- ) $charset_collate;";
106
-
107
- dbDelta($sql);
108
- }
109
-
110
- if($wpdb->get_var("show tables like '$nggpic2tags'") != $nggpic2tags) {
111
-
112
- $sql = "CREATE TABLE " . $nggpic2tags . " (
113
- picid BIGINT(20) NOT NULL DEFAULT 0,
114
- tagid BIGINT(20) NOT NULL DEFAULT 0,
115
- PRIMARY KEY (picid, tagid),
116
- KEY tagid (tagid)
117
- ) $charset_collate;";
118
-
119
- dbDelta($sql);
120
- }
121
 
122
  // check one table again, to be sure
123
  if($wpdb->get_var("show tables like '$nggpictures'")!= $nggpictures) {
124
  update_option( "ngg_init_check", __('NextGEN Gallery : Tables could not created, please check your database settings',"nggallery") );
125
  return;
126
  }
127
-
128
- }
129
-
130
- // update routine
131
- function ngg_upgrade() {
132
-
133
- global $wpdb;
134
 
135
- $nggpictures = $wpdb->prefix . 'ngg_pictures';
136
- $nggallery = $wpdb->prefix . 'ngg_gallery';
137
-
138
- // Be sure that the tables exist
139
- if($wpdb->get_var("show tables like '$nggpictures'") == $nggpictures) {
140
-
141
- $installed_ver = get_option( "ngg_db_version" );
142
-
143
- // v0.33 -> v.071
144
- if (version_compare($installed_ver, '0.71', '<')) {
145
- $wpdb->query("ALTER TABLE ".$nggpictures." CHANGE pid pid BIGINT(20) NOT NULL AUTO_INCREMENT ");
146
- $wpdb->query("ALTER TABLE ".$nggpictures." CHANGE galleryid galleryid BIGINT(20) NOT NULL ");
147
- $wpdb->query("ALTER TABLE ".$nggallery." CHANGE gid gid BIGINT(20) NOT NULL AUTO_INCREMENT ");
148
- $wpdb->query("ALTER TABLE ".$nggallery." CHANGE pageid pageid BIGINT(20) NULL DEFAULT '0'");
149
- $wpdb->query("ALTER TABLE ".$nggallery." CHANGE previewpic previewpic BIGINT(20) NULL DEFAULT '0'");
150
- $wpdb->query("ALTER TABLE ".$nggallery." CHANGE gid gid BIGINT(20) NOT NULL AUTO_INCREMENT ");
151
- $wpdb->query("ALTER TABLE ".$nggallery." CHANGE description galdesc MEDIUMTEXT NULL");
152
- }
153
- // v0.71 -> v0.84
154
- if (version_compare($installed_ver, '0.84', '<')) {
155
- $wpdb->query("ALTER TABLE ".$nggpictures." ADD sortorder BIGINT(20) DEFAULT '0' NOT NULL AFTER exclude");
156
- }
157
 
158
- update_option( "ngg_db_version", NGG_DBVERSION );
159
- }
160
  }
161
 
 
 
 
 
 
 
 
162
  function ngg_default_options() {
163
 
164
- global $blog_id;
165
 
166
- $ngg_options['gallerypath'] = "wp-content/gallery/"; // set default path to the gallery
167
- $ngg_options['scanfolder'] = false; // search for new images (not used)
168
  $ngg_options['deleteImg'] = true; // delete Images
169
- $ngg_options['swfUpload'] = false; // activate the batch upload
170
  $ngg_options['usePermalinks'] = false; // use permalinks for parameters
 
 
171
 
172
  // Tags / categories
173
  $ngg_options['activateTags'] = false; // append related images
174
- $ngg_options['appendType'] = "category"; // look for category or tags
175
  $ngg_options['maxImages'] = 7; // number of images toshow
176
 
177
  // Thumbnail Settings
@@ -180,49 +142,44 @@ function ngg_default_options() {
180
  $ngg_options['thumbfix'] = true; // Fix the dimension
181
  $ngg_options['thumbcrop'] = false; // Crop square thumbnail
182
  $ngg_options['thumbquality'] = 100; // Thumb Quality
183
- $ngg_options['thumbResampleMode'] = 3; // Resample speed value 1 - 5
184
 
185
  // Image Settings
186
  $ngg_options['imgResize'] = false; // Activate resize (not used)
187
  $ngg_options['imgWidth'] = 800; // Image Width
188
  $ngg_options['imgHeight'] = 600; // Image height
189
  $ngg_options['imgQuality'] = 85; // Image Quality
190
- $ngg_options['imgResampleMode'] = 3; // Resample speed value 1 - 5
191
- $ngg_options['imgCacheSinglePic'] = false; // cached the singlepic
192
 
193
  // Gallery Settings
194
- $ngg_options['galImages'] = "20"; // Number Of images per page
195
  $ngg_options['galShowSlide'] = true; // Show slideshow
196
  $ngg_options['galTextSlide'] = __('[Show as slideshow]','nggallery'); // Text for slideshow
197
  $ngg_options['galTextGallery'] = __('[Show picture list]','nggallery'); // Text for gallery
198
- $ngg_options['galShowOrder'] = "gallery"; // Show order
199
- $ngg_options['galSort'] = "sortorder"; // Sort order
200
- $ngg_options['galSortDir'] = "ASC"; // Sort direction
201
- $ngg_options['galUsejQuery'] = false; // use the jQuery plugin
202
  $ngg_options['galNoPages'] = true; // use no subpages for gallery
203
- $ngg_options['galShowDesc'] = "none"; // Show a text below the thumbnail
204
  $ngg_options['galImgBrowser'] = false; // Show ImageBrowser, instead effect
205
 
206
  // Thumbnail Effect
207
- $ngg_options['thumbEffect'] = "thickbox"; // select effect
208
- $ngg_options['thumbCode'] = "class=\"thickbox\" rel=\"%GALLERY_NAME%\"";
209
- $ngg_options['thickboxImage'] = "loadingAnimationv3.gif"; // thickbox Loading Image
210
 
211
  // Watermark settings
212
- $ngg_options['wmPos'] = "botRight"; // Postion
213
  $ngg_options['wmXpos'] = 5; // X Pos
214
  $ngg_options['wmYpos'] = 5; // Y Pos
215
- $ngg_options['wmType'] = "text"; // Type : 'image' / 'text'
216
- $ngg_options['wmPath'] = ""; // Path to image
217
- $ngg_options['wmFont'] = "arial.ttf"; // Font type
218
  $ngg_options['wmSize'] = 10; // Font Size
219
  $ngg_options['wmText'] = get_option('blogname'); // Text
220
- $ngg_options['wmColor'] = "000000"; // Font Color
221
- $ngg_options['wmOpaque'] = "100"; // Font Opaque
222
 
223
  // Image Rotator settings
224
  $ngg_options['irXHTMLvalid'] = false;
225
- $ngg_options['irAudio'] = "";
226
  $ngg_options['irWidth'] = 320;
227
  $ngg_options['irHeight'] = 240;
228
  $ngg_options['irShuffle'] = true;
@@ -230,28 +187,28 @@ function ngg_default_options() {
230
  $ngg_options['irShownavigation'] = false;
231
  $ngg_options['irShowicons'] = false;
232
  $ngg_options['irWatermark'] = false;
233
- $ngg_options['irOverstretch'] = "true";
234
  $ngg_options['irRotatetime'] = 10;
235
- $ngg_options['irTransition'] = "random";
236
  $ngg_options['irKenburns'] = false;
237
- $ngg_options['irBackcolor'] = "000000";
238
- $ngg_options['irFrontcolor'] = "FFFFFF";
239
- $ngg_options['irLightcolor'] = "CC0000";
240
- $ngg_options['irScreencolor'] = "000000";
241
 
242
  // CSS Style
243
  $ngg_options['activateCSS'] = true; // activate the CSS file
244
- $ngg_options['CSSfile'] = "nggallery.css"; // set default css filename
245
 
246
  // special overrides for WPMU
247
  if (IS_WPMU) {
248
  // get the site options
249
- $ngg_wpmu_options=get_site_option('ngg_options');
250
 
251
  // get the default value during installation
252
  if (!is_array($ngg_wpmu_options)) {
253
- $ngg_wpmu_options['gallerypath'] = "wp-content/blogs.dir/%BLOG_ID%/files/";
254
- $ngg_wpmu_options['wpmuCSSfile'] = "nggallery.css";
255
  update_site_option('ngg_options', $ngg_wpmu_options);
256
  }
257
 
@@ -264,4 +221,54 @@ function ngg_default_options() {
264
 
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  ?>
1
  <?php
2
  if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
 
4
+ /**
5
+ * creates all tables for the gallery
6
+ * called during register_activation hook
7
+ *
8
+ * @access internal
9
+ * @return void
10
+ */
11
  function nggallery_install () {
12
 
13
  global $wpdb , $wp_roles, $wp_version;
23
  update_option( "ngg_init_check", __('Sorry, NextGEN Gallery works only with a role called administrator',"nggallery") );
24
  return;
25
  }
26
+
27
  $role->add_cap('NextGEN Gallery overview');
28
  $role->add_cap('NextGEN Use TinyMCE');
29
  $role->add_cap('NextGEN Upload images');
30
  $role->add_cap('NextGEN Manage gallery');
31
+ $role->add_cap('NextGEN Manage tags');
32
+ $role->add_cap('NextGEN Manage others gallery');
33
  $role->add_cap('NextGEN Edit album');
34
  $role->add_cap('NextGEN Change style');
35
  $role->add_cap('NextGEN Change options');
36
 
37
  // upgrade function changed in WordPress 2.3
38
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
 
 
 
39
 
40
  // add charset & collate like wp core
41
  $charset_collate = '';
50
  $nggpictures = $wpdb->prefix . 'ngg_pictures';
51
  $nggallery = $wpdb->prefix . 'ngg_gallery';
52
  $nggalbum = $wpdb->prefix . 'ngg_album';
 
 
53
 
54
  if($wpdb->get_var("show tables like '$nggpictures'") != $nggpictures) {
55
 
59
  filename VARCHAR(255) NOT NULL ,
60
  description MEDIUMTEXT NULL ,
61
  alttext MEDIUMTEXT NULL ,
62
+ imagedate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
63
  exclude TINYINT NULL DEFAULT '0' ,
64
  sortorder BIGINT(20) DEFAULT '0' NOT NULL ,
65
  PRIMARY KEY pid (pid)
66
  ) $charset_collate;";
67
 
68
  dbDelta($sql);
69
+ }
 
 
 
70
 
71
  if($wpdb->get_var("show tables like '$nggallery'") != $nggallery) {
72
 
78
  galdesc MEDIUMTEXT NULL ,
79
  pageid BIGINT(20) NULL DEFAULT '0' ,
80
  previewpic BIGINT(20) NULL DEFAULT '0' ,
81
+ author BIGINT(20) NOT NULL DEFAULT '0' ,
82
  PRIMARY KEY gid (gid)
83
  ) $charset_collate;";
84
 
96
 
97
  dbDelta($sql);
98
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
  // check one table again, to be sure
101
  if($wpdb->get_var("show tables like '$nggpictures'")!= $nggpictures) {
102
  update_option( "ngg_init_check", __('NextGEN Gallery : Tables could not created, please check your database settings',"nggallery") );
103
  return;
104
  }
 
 
 
 
 
 
 
105
 
106
+ $options = get_option('ngg_options');
107
+ // set the default settings, if we didn't upgrade
108
+ if ( empty( $options ) )
109
+ ngg_default_options();
110
+
111
+ // if all is passed , save the DBVERSION
112
+ add_option("ngg_db_version", NGG_DBVERSION);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
 
 
114
  }
115
 
116
+ /**
117
+ * Setup the default option array for the gallery
118
+ *
119
+ * @access internal
120
+ * @since version 0.33
121
+ * @return void
122
+ */
123
  function ngg_default_options() {
124
 
125
+ global $blog_id, $ngg;
126
 
127
+ $ngg_options['gallerypath'] = 'wp-content/gallery/'; // set default path to the gallery
 
128
  $ngg_options['deleteImg'] = true; // delete Images
129
+ $ngg_options['swfUpload'] = true; // activate the batch upload
130
  $ngg_options['usePermalinks'] = false; // use permalinks for parameters
131
+ $ngg_options['graphicLibrary'] = 'gd'; // default graphic library
132
+ $ngg_options['imageMagickDir'] = '/usr/local/bin/'; // default path to ImageMagick
133
 
134
  // Tags / categories
135
  $ngg_options['activateTags'] = false; // append related images
136
+ $ngg_options['appendType'] = 'tags'; // look for category or tags
137
  $ngg_options['maxImages'] = 7; // number of images toshow
138
 
139
  // Thumbnail Settings
142
  $ngg_options['thumbfix'] = true; // Fix the dimension
143
  $ngg_options['thumbcrop'] = false; // Crop square thumbnail
144
  $ngg_options['thumbquality'] = 100; // Thumb Quality
 
145
 
146
  // Image Settings
147
  $ngg_options['imgResize'] = false; // Activate resize (not used)
148
  $ngg_options['imgWidth'] = 800; // Image Width
149
  $ngg_options['imgHeight'] = 600; // Image height
150
  $ngg_options['imgQuality'] = 85; // Image Quality
151
+ $ngg_options['imgCacheSinglePic'] = true; // cached the singlepic
 
152
 
153
  // Gallery Settings
154
+ $ngg_options['galImages'] = '20'; // Number Of images per page
155
  $ngg_options['galShowSlide'] = true; // Show slideshow
156
  $ngg_options['galTextSlide'] = __('[Show as slideshow]','nggallery'); // Text for slideshow
157
  $ngg_options['galTextGallery'] = __('[Show picture list]','nggallery'); // Text for gallery
158
+ $ngg_options['galShowOrder'] = 'gallery'; // Show order
159
+ $ngg_options['galSort'] = 'sortorder'; // Sort order
160
+ $ngg_options['galSortDir'] = 'ASC'; // Sort direction
 
161
  $ngg_options['galNoPages'] = true; // use no subpages for gallery
 
162
  $ngg_options['galImgBrowser'] = false; // Show ImageBrowser, instead effect
163
 
164
  // Thumbnail Effect
165
+ $ngg_options['thumbEffect'] = 'shutter'; // select effect
166
+ $ngg_options['thumbCode'] = 'class="shutterset_%GALLERY_NAME%"';
 
167
 
168
  // Watermark settings
169
+ $ngg_options['wmPos'] = 'botRight'; // Postion
170
  $ngg_options['wmXpos'] = 5; // X Pos
171
  $ngg_options['wmYpos'] = 5; // Y Pos
172
+ $ngg_options['wmType'] = 'text'; // Type : 'image' / 'text'
173
+ $ngg_options['wmPath'] = ''; // Path to image
174
+ $ngg_options['wmFont'] = 'arial.ttf'; // Font type
175
  $ngg_options['wmSize'] = 10; // Font Size
176
  $ngg_options['wmText'] = get_option('blogname'); // Text
177
+ $ngg_options['wmColor'] = '000000'; // Font Color
178
+ $ngg_options['wmOpaque'] = '100'; // Font Opaque
179
 
180
  // Image Rotator settings
181
  $ngg_options['irXHTMLvalid'] = false;
182
+ $ngg_options['irAudio'] = '';
183
  $ngg_options['irWidth'] = 320;
184
  $ngg_options['irHeight'] = 240;
185
  $ngg_options['irShuffle'] = true;
187
  $ngg_options['irShownavigation'] = false;
188
  $ngg_options['irShowicons'] = false;
189
  $ngg_options['irWatermark'] = false;
190
+ $ngg_options['irOverstretch'] = 'true';
191
  $ngg_options['irRotatetime'] = 10;
192
+ $ngg_options['irTransition'] = 'random';
193
  $ngg_options['irKenburns'] = false;
194
+ $ngg_options['irBackcolor'] = '000000';
195
+ $ngg_options['irFrontcolor'] = 'FFFFFF';
196
+ $ngg_options['irLightcolor'] = 'CC0000';
197
+ $ngg_options['irScreencolor'] = '000000';
198
 
199
  // CSS Style
200
  $ngg_options['activateCSS'] = true; // activate the CSS file
201
+ $ngg_options['CSSfile'] = 'nggallery.css'; // set default css filename
202
 
203
  // special overrides for WPMU
204
  if (IS_WPMU) {
205
  // get the site options
206
+ $ngg_wpmu_options = get_site_option('ngg_options');
207
 
208
  // get the default value during installation
209
  if (!is_array($ngg_wpmu_options)) {
210
+ $ngg_wpmu_options['gallerypath'] = 'wp-content/blogs.dir/%BLOG_ID%/files/';
211
+ $ngg_wpmu_options['wpmuCSSfile'] = 'nggallery.css';
212
  update_site_option('ngg_options', $ngg_wpmu_options);
213
  }
214
 
221
 
222
  }
223
 
224
+ /**
225
+ * Deregister a capability from all classic roles
226
+ *
227
+ * @access internal
228
+ * @param string $capability name of the capability which should be deregister
229
+ * @return void
230
+ */
231
+ function ngg_remove_capability($capability){
232
+ // this function remove the $capability only from the classic roles
233
+ $check_order = array("subscriber", "contributor", "author", "editor", "administrator");
234
+
235
+ foreach ($check_order as $role) {
236
+
237
+ $role = get_role($role);
238
+ $role->remove_cap($capability) ;
239
+ }
240
+
241
+ }
242
+
243
+ /**
244
+ * Uninstall all settings and tables
245
+ * Called via Setup and register_unstall hook
246
+ *
247
+ * @access internal
248
+ * @return void
249
+ */
250
+ function nggallery_uninstall() {
251
+ global $wpdb;
252
+
253
+ // first remove all tables
254
+ $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ngg_pictures");
255
+ $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ngg_gallery");
256
+ $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ngg_album");
257
+
258
+ // then remove all options
259
+ delete_option( 'ngg_options' );
260
+ delete_option( 'ngg_db_version' );
261
+ delete_option( 'ngg_update_exists' );
262
+ delete_option( 'ngg_next_update' );
263
+
264
+ // now remove the capability
265
+ ngg_remove_capability("NextGEN Gallery overview");
266
+ ngg_remove_capability("NextGEN Use TinyMCE");
267
+ ngg_remove_capability("NextGEN Upload images");
268
+ ngg_remove_capability("NextGEN Manage gallery");
269
+ ngg_remove_capability("NextGEN Edit album");
270
+ ngg_remove_capability("NextGEN Change style");
271
+ ngg_remove_capability("NextGEN Change options");
272
+ }
273
+
274
  ?>
admin/js/interface.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * Interface Elements for jQuery
3
- *
4
- * http://interface.eyecon.ro
5
- *
6
- * Copyright (c) 2006 Stefan Petre
7
- * Dual licensed under the MIT (MIT-LICENSE.txt)
8
- * and GPL (GPL-LICENSE.txt) licenses.
9
- *
10
- *
11
- */
12
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('A.cP={2l:C(c){G B.1y(C(){if(!c.8Y||!c.8P)G;F b=B;b.2a={9M:c.9M||bz,8Y:c.8Y,8P:c.8P,7R:c.7R||\'du\',9c:c.9c||\'du\',2K:c.2K&&28 c.2K==\'C\'?c.2K:H,2V:c.2K&&28 c.2V==\'C\'?c.2V:H,6D:c.6D&&28 c.6D==\'C\'?c.6D:H,8A:A(c.8Y,B),8a:A(c.8P,B),1l:c.1l||7n,5w:c.5w||0};b.2a.8a.2x().E(\'S\',\'9e\').eq(0).E({S:b.2a.9M+\'Q\',11:\'2v\'}).3m();b.2a.8A.1y(C(a){B.6L=a}).ht(C(){A(B).2H(b.2a.9c)},C(){A(B).3S(b.2a.9c)}).1C(\'4U\',C(e){if(b.2a.5w==B.6L)G;b.2a.8A.eq(b.2a.5w).3S(b.2a.7R).3m().eq(B.6L).2H(b.2a.7R).3m();b.2a.8a.eq(b.2a.5w).4S({S:0},b.2a.1l,C(){B.Y.11=\'1k\';if(b.2a.2V){b.2a.2V.1x(b,[B])}}).3m().eq(B.6L).1S().4S({S:b.2a.9M},b.2a.1l,C(){B.Y.11=\'2v\';if(b.2a.2K){b.2a.2K.1x(b,[B])}}).3m();if(b.2a.6D){b.2a.6D.1x(b,[B,b.2a.8a.I(B.6L),b.2a.8A.I(b.2a.5w),b.2a.8a.I(b.2a.5w)])}b.2a.5w=B.6L}).eq(0).2H(b.2a.7R).3m();A(B).E(\'S\',A(B).E(\'S\')).E(\'2N\',\'2B\')})}};A.fn.fe=A.cP.2l;A.8p={2l:C(h){G B.1y(C(){F c=B;F d=2*Z.2F/eD;F f=2*Z.2F;if(A(c).E(\'T\')!=\'2i\'&&A(c).E(\'T\')!=\'1J\'){A(c).E(\'T\',\'2i\')}c.1i={1M:A(h.1M,B),2y:h.2y,61:h.61,9l:h.9l,iu:f,1N:A.12.2f(B),T:A.12.3a(B),2b:Z.2F/2,b4:h.b4,7K:h.5U,5U:[],93:H,7G:2*Z.2F/eD};c.1i.d8=(c.1i.1N.w-c.1i.2y)/2;c.1i.6Y=(c.1i.1N.h-c.1i.61-c.1i.61*c.1i.7K)/2;c.1i.3f=2*Z.2F/c.1i.1M.1N();c.1i.aS=c.1i.1N.w/2;c.1i.aR=c.1i.1N.h/2-c.1i.61*c.1i.7K;F g=1c.3x(\'1W\');A(g).E({T:\'1J\',3j:1,O:0,M:0});A(c).1L(g);c.1i.1M.1y(C(a){8G=A(\'3O\',B).I(0);S=R(c.1i.61*c.1i.7K);if(A.2R.46){3u=1c.3x(\'3O\');A(3u).E(\'T\',\'1J\');3u.2E=8G.2E;3u.Y.4X=\'fu 9x:9C.9E.a6(1E=60, Y=1, fc=0, f9=0, f5=0, f3=0)\'}L{3u=1c.3x(\'3u\');if(3u.bZ){4j=3u.bZ("2d");3u.Y.T=\'1J\';3u.Y.S=S+\'Q\';3u.Y.V=c.1i.2y+\'Q\';3u.S=S;3u.V=c.1i.2y;4j.eR();4j.eM(0,S);4j.eJ(1,-1);4j.jm(8G,0,0,c.1i.2y,S);4j.bL();4j.jl="jh-3U";F b=4j.jf(0,0,0,S);b.es(1,"eg(1O, 1O, 1O, 1)");b.es(0,"eg(1O, 1O, 1O, 0.6)");4j.j9=b;if(j7.j5.3o(\'iX\')!=-1){4j.iV()}L{4j.iS(0,0,c.1i.2y,S)}}}c.1i.5U[a]=3u;A(g).1L(3u)}).1C(\'9r\',C(e){c.1i.93=14;c.1i.1l=c.1i.7G*0.1*c.1i.1l/Z.3B(c.1i.1l);G H}).1C(\'86\',C(e){c.1i.93=H;G H});A.8p.6z(c);c.1i.1l=c.1i.7G*0.2;c.1i.it=1P.5Y(C(){c.1i.2b+=c.1i.1l;if(c.1i.2b>f)c.1i.2b=0;A.8p.6z(c)},20);A(c).1C(\'86\',C(){c.1i.1l=c.1i.7G*0.2*c.1i.1l/Z.3B(c.1i.1l)}).1C(\'3t\',C(e){if(c.1i.93==H){1A=A.12.3W(e);dr=c.1i.1N.w-1A.x+c.1i.T.x;c.1i.1l=c.1i.b4*c.1i.7G*(c.1i.1N.w/2-dr)/(c.1i.1N.w/2)}})})},6z:C(b){b.1i.1M.1y(C(a){b8=b.1i.2b+a*b.1i.3f;x=b.1i.d8*Z.51(b8);y=b.1i.6Y*Z.7L(b8);do=R(1Y*(b.1i.6Y+y)/(2*b.1i.6Y));dm=(b.1i.6Y+y)/(2*b.1i.6Y);V=R((b.1i.2y-b.1i.9l)*dm+b.1i.9l);S=R(V*b.1i.61/b.1i.2y);B.Y.O=b.1i.aR+y-S/2+"Q";B.Y.M=b.1i.aS+x-V/2+"Q";B.Y.V=V+"Q";B.Y.S=S+"Q";B.Y.3j=do;b.1i.5U[a].Y.O=R(b.1i.aR+y+S-1-S/2)+"Q";b.1i.5U[a].Y.M=R(b.1i.aS+x-V/2)+"Q";b.1i.5U[a].Y.V=V+"Q";b.1i.5U[a].Y.S=R(S*b.1i.7K)+"Q"})}};A.fn.hL=A.8p.2l;A.1U({1e:{b1:C(p,n,a,b,c){G((-Z.51(p*Z.2F)/2)+0.5)*b+a},ho:C(p,n,a,b,c){G b*(n/=c)*n*n+a},d2:C(p,n,a,b,c){G-b*((n=n/c-1)*n*n*n-1)+a},hh:C(p,n,a,b,c){if((n/=c/2)<1)G b/2*n*n*n*n+a;G-b/2*((n-=2)*n*n*n-2)+a},7D:C(p,n,a,b,c){if((n/=c)<(1/2.75)){G b*(7.8W*n*n)+a}L if(n<(2/2.75)){G b*(7.8W*(n-=(1.5/2.75))*n+.75)+a}L if(n<(2.5/2.75)){G b*(7.8W*(n-=(2.25/2.75))*n+.gV)+a}L{G b*(7.8W*(n-=(2.gR/2.75))*n+.gN)+a}},aQ:C(p,n,a,b,c){if(A.1e.7D)G b-A.1e.7D(p,c-n,0,b,c)+a;G a+b},gE:C(p,n,a,b,c){if(A.1e.aQ&&A.1e.7D)if(n<c/2)G A.1e.aQ(p,n*2,0,b,c)*.5+a;G A.1e.7D(p,n*2-c,0,b,c)*.5+b*.5+a;G a+b},gz:C(p,n,b,c,d){F a,s;if(n==0)G b;if((n/=d)==1)G b+c;a=c*0.3;p=d*.3;if(a<Z.3B(c)){a=c;s=p/4}L{s=p/(2*Z.2F)*Z.aP(c/a)}G-(a*Z.5j(2,10*(n-=1))*Z.7L((n*d-s)*(2*Z.2F)/p))+b},gg:C(p,n,b,c,d){F a,s;if(n==0)G b;if((n/=d/2)==2)G b+c;a=c*0.3;p=d*.3;if(a<Z.3B(c)){a=c;s=p/4}L{s=p/(2*Z.2F)*Z.aP(c/a)}G a*Z.5j(2,-10*n)*Z.7L((n*d-s)*(2*Z.2F)/p)+c+b},gd:C(p,n,b,c,d){F a,s;if(n==0)G b;if((n/=d/2)==2)G b+c;a=c*0.3;p=d*.3;if(a<Z.3B(c)){a=c;s=p/4}L{s=p/(2*Z.2F)*Z.aP(c/a)}if(n<1){G-.5*(a*Z.5j(2,10*(n-=1))*Z.7L((n*d-s)*(2*Z.2F)/p))+b}G a*Z.5j(2,-10*(n-=1))*Z.7L((n*d-s)*(2*Z.2F)/p)*.5+c+b}}});A.5K={2l:C(h){G B.1y(C(){F g=B;g.1z={1M:A(h.1M,B),2q:A(h.2q,B),1I:A.12.3a(B),2y:h.2y,8K:h.8K,6q:h.6q,cG:h.cG,4I:h.4I,5R:h.5R};A.5K.8F(g,0);A(1P).1C(\'fR\',C(){g.1z.1I=A.12.3a(g);A.5K.8F(g,0);A.5K.6z(g)});A.5K.6z(g);g.1z.1M.1C(\'9r\',C(){A(g.1z.8K,B).I(0).Y.11=\'2v\'}).1C(\'86\',C(){A(g.1z.8K,B).I(0).Y.11=\'1k\'});A(1c).1C(\'3t\',C(e){F b=A.12.3W(e);F c=0;if(g.1z.4I&&g.1z.4I==\'az\')F d=b.x-g.1z.1I.x-(g.3P-g.1z.2y*g.1z.1M.1N())/2-g.1z.2y/2;L if(g.1z.4I&&g.1z.4I==\'2D\')F d=b.x-g.1z.1I.x-g.3P+g.1z.2y*g.1z.1M.1N();L F d=b.x-g.1z.1I.x;F f=Z.5j(b.y-g.1z.1I.y-g.5r/2,2);g.1z.1M.1y(C(a){3J=Z.cB(Z.5j(d-a*g.1z.2y,2)+f);3J-=g.1z.2y/2;3J=3J<0?0:3J;3J=3J>g.1z.6q?g.1z.6q:3J;3J=g.1z.6q-3J;bc=g.1z.5R*3J/g.1z.6q;B.Y.V=g.1z.2y+bc+\'Q\';B.Y.M=g.1z.2y*a+c+\'Q\';c+=bc});A.5K.8F(g,c)})})},8F:C(a,b){if(a.1z.4I)if(a.1z.4I==\'az\')a.1z.2q.I(0).Y.M=(a.3P-a.1z.2y*a.1z.1M.1N())/2-b/2+\'Q\';L if(a.1z.4I==\'M\')a.1z.2q.I(0).Y.M=-b/a.1z.1M.1N()+\'Q\';L if(a.1z.4I==\'2D\')a.1z.2q.I(0).Y.M=(a.3P-a.1z.2y*a.1z.1M.1N())-b/2+\'Q\';a.1z.2q.I(0).Y.V=a.1z.2y*a.1z.1M.1N()+b+\'Q\'},6z:C(b){b.1z.1M.1y(C(a){B.Y.V=b.1z.2y+\'Q\';B.Y.M=b.1z.2y*a+\'Q\'})}};A.fn.fz=A.5K.2l;A.K={18:P,7W:P,3q:P,2A:P,4b:P,af:P,2r:P,2h:P,1M:P,58:C(){A.K.7W.58();if(A.K.3q){A.K.3q.2x()}},4i:C(){A.K.1M=P;A.K.2h=P;A.K.4b=A.K.2r.2m;if(A.K.18.E(\'11\')==\'2v\'){if(A.K.2r.1a.fx){2X(A.K.2r.1a.fx.1K){19\'a4\':A.K.18.6d(A.K.2r.1a.fx.1H,A.K.58);1n;19\'1u\':A.K.18.c6(A.K.2r.1a.fx.1H,A.K.58);1n;19\'8o\':A.K.18.c3(A.K.2r.1a.fx.1H,A.K.58);1n}}L{A.K.18.2x()}if(A.K.2r.1a.2V)A.K.2r.1a.2V.1x(A.K.2r,[A.K.18,A.K.3q])}L{A.K.58()}1P.a2(A.K.2A)},c1:C(){F e=A.K.2r;F f=A.K.8C(e);if(e&&f.3w!=A.K.4b&&f.3w.1b>=e.1a.8N){A.K.4b=f.3w;A.K.af=f.3w;9V={bR:A(e).1m(\'eS\')||\'bR\',2m:f.3w};A.eQ({1K:\'eN\',9V:A.eL(9V),eK:C(b){e.1a.3X=A(\'3w\',b);1N=e.1a.3X.1N();if(1N>0){F c=\'\';e.1a.3X.1y(C(a){c+=\'<7b 4o="\'+A(\'2m\',B).3D()+\'" 8h="\'+a+\'" Y="7z: 8T;">\'+A(\'3D\',B).3D()+\'</7b>\'});if(e.1a.9K){F d=A(\'2m\',e.1a.3X.I(0)).3D();e.2m=f.30+d+e.1a.3y+f.5m;A.K.64(e,f.3w.1b!=d.1b?(f.30.1b+f.3w.1b):d.1b,f.3w.1b!=d.1b?(f.30.1b+d.1b):d.1b)}if(1N>0){A.K.aU(e,c)}L{A.K.4i()}}L{A.K.4i()}},5v:e.1a.96})}},aU:C(a,b){A.K.7W.3i(b);A.K.1M=A(\'7b\',A.K.7W.I(0));A.K.1M.9r(A.K.en).1C(\'4U\',A.K.ed);F c=A.12.3a(a);F d=A.12.2f(a);A.K.18.E(\'O\',c.y+d.hb+\'Q\').E(\'M\',c.x+\'Q\').2H(a.1a.9D);if(A.K.3q){A.K.3q.E(\'11\',\'2v\').E(\'O\',c.y+d.hb+\'Q\').E(\'M\',c.x+\'Q\').E(\'V\',A.K.18.E(\'V\')).E(\'S\',A.K.18.E(\'S\'))}A.K.2h=0;A.K.1M.I(0).2Z=a.1a.72;A.K.7I(a,a.1a.3X.I(0),\'6H\');if(A.K.18.E(\'11\')==\'1k\'){if(a.1a.bv){F e=A.12.9y(a,14);F f=A.12.6b(a,14);A.K.18.E(\'V\',a.3P-(A.e0?(e.l+e.r+f.l+f.r):0)+\'Q\')}if(a.1a.fx){2X(a.1a.fx.1K){19\'a4\':A.K.18.6U(a.1a.fx.1H);1n;19\'1u\':A.K.18.dR(a.1a.fx.1H);1n;19\'8o\':A.K.18.dP(a.1a.fx.1H);1n}}L{A.K.18.1S()}if(A.K.2r.1a.2K)A.K.2r.1a.2K.1x(A.K.2r,[A.K.18,A.K.3q])}},dM:C(){F b=B;if(b.1a.3X){A.K.4b=b.2m;A.K.af=b.2m;F c=\'\';b.1a.3X.1y(C(a){2m=A(\'2m\',B).3D().5u();dH=b.2m.5u();if(2m.3o(dH)==0){c+=\'<7b 4o="\'+A(\'2m\',B).3D()+\'" 8h="\'+a+\'" Y="7z: 8T;">\'+A(\'3D\',B).3D()+\'</7b>\'}});if(c!=\'\'){A.K.aU(b,c);B.1a.9s=14;G}}b.1a.3X=P;B.1a.9s=H},64:C(a,b,c){if(a.9q){F d=a.9q();d.iJ(14);d.dC("bh",b);d.iE("bh",-c+b);d.7Q()}L if(a.9m){a.9m(b,c)}L{if(a.88){a.88=b;a.dA=c}}a.6a()},dw:C(a){if(a.88)G a.88;L if(a.9q){F b=1c.64.dv();F c=b.il();G 0-c.dC(\'bh\',-ij)}},8C:C(a){F b={2m:a.2m,30:\'\',5m:\'\',3w:\'\'};if(a.1a.9k){F c=H;F d=A.K.dw(a)||0;F e=b.2m.6W(a.1a.3y);1V(F i=0;i<e.1b;i++){if((b.30.1b+e[i].1b>=d||d==0)&&!c){if(b.30.1b<=d)b.3w=e[i];L b.5m+=e[i]+(e[i]!=\'\'?a.1a.3y:\'\');c=14}L if(c){b.5m+=e[i]+(e[i]!=\'\'?a.1a.3y:\'\')}if(!c){b.30+=e[i]+(e.1b>1?a.1a.3y:\'\')}}}L{b.3w=b.2m}G b},b9:C(e){1P.a2(A.K.2A);F a=A.K.8C(B);F b=e.6S||e.6R||-1;if(/13|27|35|36|38|40|9/.3M(b)&&A.K.1M){if(1P.3N){1P.3N.b6=14;1P.3N.b5=H}L{e.9b();e.99()}if(A.K.2h!=P)A.K.1M.I(A.K.2h||0).2Z=\'\';L A.K.2h=-1;2X(b){19 9:19 13:if(A.K.2h==-1)A.K.2h=0;F c=A.K.1M.I(A.K.2h||0);F d=c.4Z(\'4o\');B.2m=a.30+d+B.1a.3y+a.5m;A.K.4b=a.3w;A.K.64(B,a.30.1b+d.1b+B.1a.3y.1b,a.30.1b+d.1b+B.1a.3y.1b);A.K.4i();if(B.1a.5p){4E=R(c.4Z(\'8h\'))||0;A.K.7I(B,B.1a.3X.I(4E),\'5p\')}if(B.6O)B.6O(H);G b!=13;1n;19 27:B.2m=a.30+A.K.4b+B.1a.3y+a.5m;B.1a.3X=P;A.K.4i();if(B.6O)B.6O(H);G H;1n;19 35:A.K.2h=A.K.1M.1N()-1;1n;19 36:A.K.2h=0;1n;19 38:A.K.2h--;if(A.K.2h<0)A.K.2h=A.K.1M.1N()-1;1n;19 40:A.K.2h++;if(A.K.2h==A.K.1M.1N())A.K.2h=0;1n}A.K.7I(B,B.1a.3X.I(A.K.2h||0),\'6H\');A.K.1M.I(A.K.2h||0).2Z=B.1a.72;if(A.K.1M.I(A.K.2h||0).6O)A.K.1M.I(A.K.2h||0).6O(H);if(B.1a.9K){F f=A.K.1M.I(A.K.2h||0).4Z(\'4o\');B.2m=a.30+f+B.1a.3y+a.5m;if(A.K.4b.1b!=f.1b)A.K.64(B,a.30.1b+A.K.4b.1b,a.30.1b+f.1b)}G H}A.K.dM.1x(B);if(B.1a.9s==H){if(a.3w!=A.K.4b&&a.3w.1b>=B.1a.8N)A.K.2A=1P.97(A.K.c1,B.1a.4w);if(A.K.1M){A.K.4i()}}G 14},7I:C(a,b,c){if(a.1a[c]){F d={};94=b.dj(\'*\');1V(i=0;i<94.1b;i++){d[94[i].4D]=94[i].6M.hG}a.1a[c].1x(a,[d])}},en:C(e){if(A.K.1M){if(A.K.2h!=P)A.K.1M.I(A.K.2h||0).2Z=\'\';A.K.1M.I(A.K.2h||0).2Z=\'\';A.K.2h=R(B.4Z(\'8h\'))||0;A.K.1M.I(A.K.2h||0).2Z=A.K.2r.1a.72}},ed:C(a){1P.a2(A.K.2A);a=a||A.3N.hD(1P.3N);a.9b();a.99();F b=A.K.8C(A.K.2r);F c=B.4Z(\'4o\');A.K.2r.2m=b.30+c+A.K.2r.1a.3y+b.5m;A.K.4b=B.4Z(\'4o\');A.K.64(A.K.2r,b.30.1b+c.1b+A.K.2r.1a.3y.1b,b.30.1b+c.1b+A.K.2r.1a.3y.1b);A.K.4i();if(A.K.2r.1a.5p){4E=R(B.4Z(\'8h\'))||0;A.K.7I(A.K.2r,A.K.2r.1a.3X.I(4E),\'5p\')}G H},dh:C(e){6K=e.6S||e.6R||-1;if(/13|27|35|36|38|40/.3M(6K)&&A.K.1M){if(1P.3N){1P.3N.b6=14;1P.3N.b5=H}L{e.9b();e.99()}G H}},2l:C(a){if(!a.96||!A.12){G}if(!A.K.18){if(A.2R.46){A(\'23\',1c).1L(\'<3q Y="11:1k;T:1J;4X:9x:9C.9E.a6(1E=0);" id="df" 2E="dc:H;" da="0" d7="b0"></3q>\');A.K.3q=A(\'#df\')}A(\'23\',1c).1L(\'<1W id="d4" Y="T: 1J; O: 0; M: 0; z-aY: hj; 11: 1k;"><90 Y="5X: 0;7E: 0; h9-Y: 1k; z-aY: h8;">&6G;</90></1W>\');A.K.18=A(\'#d4\');A.K.7W=A(\'90\',A.K.18)}G B.1y(C(){if(B.4D!=\'aV\'&&B.4Z(\'1K\')!=\'3D\')G;B.1a={};B.1a.96=a.96;B.1a.8N=Z.3B(R(a.8N)||1);B.1a.9D=a.9D?a.9D:\'\';B.1a.72=a.72?a.72:\'\';B.1a.5p=a.5p&&a.5p.1F==2w?a.5p:P;B.1a.2K=a.2K&&a.2K.1F==2w?a.2K:P;B.1a.2V=a.2V&&a.2V.1F==2w?a.2V:P;B.1a.6H=a.6H&&a.6H.1F==2w?a.6H:P;B.1a.bv=a.bv||H;B.1a.9k=a.9k||H;B.1a.3y=B.1a.9k?(a.3y||\', \'):\'\';B.1a.9K=a.9K?14:H;B.1a.4w=Z.3B(R(a.4w)||8V);if(a.fx&&a.fx.1F==6E){if(!a.fx.1K||!/a4|1u|8o/.3M(a.fx.1K)){a.fx.1K=\'1u\'}if(a.fx.1K==\'1u\'&&!A.fx.1u)G;if(a.fx.1K==\'8o\'&&!A.fx.5l)G;a.fx.1H=Z.3B(R(a.fx.1H)||7n);if(a.fx.1H>B.1a.4w){a.fx.1H=B.1a.4w-1Y}B.1a.fx=a.fx}B.1a.3X=P;B.1a.9s=H;A(B).1m(\'b9\',\'cW\').6a(C(){A.K.2r=B;A.K.4b=B.2m}).cV(A.K.dh).5Q(A.K.b9).4W(C(){A.K.2A=1P.97(A.K.4i,gM)})})}};A.fn.gJ=A.K.2l;A.1t={2A:P,4k:P,1X:P,3f:10,2b:C(a,b,c,d){A.1t.4k=a;A.1t.1X=b;A.1t.3f=R(c)||10;A.1t.2A=1P.5Y(A.1t.cR,R(d)||40)},cR:C(){1V(i=0;i<A.1t.1X.1b;i++){if(!A.1t.1X[i].2J){A.1t.1X[i].2J=A.1U(A.12.6x(A.1t.1X[i]),A.12.6w(A.1t.1X[i]),A.12.5O(A.1t.1X[i]))}L{A.1t.1X[i].2J.t=A.1t.1X[i].2T;A.1t.1X[i].2J.l=A.1t.1X[i].2P}if(A.1t.4k.D&&A.1t.4k.D.6g==14){5a={x:A.1t.4k.D.2n,y:A.1t.4k.D.2j,1D:A.1t.4k.D.1w.1D,hb:A.1t.4k.D.1w.hb}}L{5a=A.1U(A.12.6x(A.1t.4k),A.12.6w(A.1t.4k))}if(A.1t.1X[i].2J.t>0&&A.1t.1X[i].2J.y+A.1t.1X[i].2J.t>5a.y){A.1t.1X[i].2T-=A.1t.3f}L if(A.1t.1X[i].2J.t<=A.1t.1X[i].2J.h&&A.1t.1X[i].2J.t+A.1t.1X[i].2J.hb<5a.y+5a.hb){A.1t.1X[i].2T+=A.1t.3f}if(A.1t.1X[i].2J.l>0&&A.1t.1X[i].2J.x+A.1t.1X[i].2J.l>5a.x){A.1t.1X[i].2P-=A.1t.3f}L if(A.1t.1X[i].2J.l<=A.1t.1X[i].2J.gf&&A.1t.1X[i].2J.l+A.1t.1X[i].2J.1D<5a.x+5a.1D){A.1t.1X[i].2P+=A.1t.3f}}},7w:C(){1P.5h(A.1t.2A);A.1t.4k=P;A.1t.1X=P;1V(i in A.1t.1X){A.1t.1X[i].2J=P}}};A.X={18:P,1g:P,4v:C(){G B.1y(C(){if(B.8L){B.D.cM.3h(\'4R\',A.X.aM);B.D=P;B.8L=H;if(A.2R.46){B.aI="cW"}L{B.Y.g0=\'\';B.Y.cJ=\'\';B.Y.cH=\'\'}}})},aM:C(e){if(A.X.1g!=P){A.X.8I(e);G H}F a=B.3H;A(1c).1C(\'3t\',A.X.aE).1C(\'5n\',A.X.8I);a.D.1A=A.12.3W(e);a.D.4d=a.D.1A;a.D.6g=H;a.D.fY=B!=B.3H;A.X.1g=a;if(a.D.4P&&B!=B.3H){aC=A.12.3a(a.2S);aZ=A.12.2f(a);ay={x:R(A.E(a,\'M\'))||0,y:R(A.E(a,\'O\'))||0};dx=a.D.4d.x-aC.x-aZ.1D/2-ay.x;dy=a.D.4d.y-aC.y-aZ.hb/2-ay.y;A.2Q.4s(a,[dx,dy])}G A.6J||H},cD:C(e){F a=A.X.1g;a.D.6g=14;F b=a.Y;a.D.6o=A.E(a,\'11\');a.D.49=A.E(a,\'T\');if(!a.D.av)a.D.av=a.D.49;a.D.22={x:R(A.E(a,\'M\'))||0,y:R(A.E(a,\'O\'))||0};a.D.8z=0;a.D.8y=0;if(A.2R.46){F c=A.12.6b(a,14);a.D.8z=c.l||0;a.D.8y=c.t||0}a.D.1w=A.1U(A.12.3a(a),A.12.2f(a));if(a.D.49!=\'2i\'&&a.D.49!=\'1J\'){b.T=\'2i\'}A.X.18.58();F d=A(a).cA(14).I(0);A(d).E({11:\'2v\',M:\'2G\',O:\'2G\'});d.Y.4M=\'0\';d.Y.53=\'0\';d.Y.4L=\'0\';d.Y.4K=\'0\';A.X.18.1L(d);F f=A.X.18.I(0).Y;if(a.D.ar){f.V=\'8x\';f.S=\'8x\'}L{f.S=a.D.1w.hb+\'Q\';f.V=a.D.1w.1D+\'Q\'}f.11=\'2v\';f.4M=\'2G\';f.53=\'2G\';f.4L=\'2G\';f.4K=\'2G\';A.1U(a.D.1w,A.12.2f(d));if(a.D.2M){if(a.D.2M.M){a.D.22.x+=a.D.1A.x-a.D.1w.x-a.D.2M.M;a.D.1w.x=a.D.1A.x-a.D.2M.M}if(a.D.2M.O){a.D.22.y+=a.D.1A.y-a.D.1w.y-a.D.2M.O;a.D.1w.y=a.D.1A.y-a.D.2M.O}if(a.D.2M.2D){a.D.22.x+=a.D.1A.x-a.D.1w.x-a.D.1w.hb+a.D.2M.2D;a.D.1w.x=a.D.1A.x-a.D.1w.1D+a.D.2M.2D}if(a.D.2M.4e){a.D.22.y+=a.D.1A.y-a.D.1w.y-a.D.1w.hb+a.D.2M.4e;a.D.1w.y=a.D.1A.y-a.D.1w.hb+a.D.2M.4e}}a.D.2n=a.D.22.x;a.D.2j=a.D.22.y;if(a.D.7V||a.D.2e==\'7X\'){7Z=A.12.6b(a.2S,14);a.D.1w.x=a.7Y+(A.2R.46?0:A.2R.6l?-7Z.l:7Z.l);a.D.1w.y=a.7t+(A.2R.46?0:A.2R.6l?-7Z.t:7Z.t);A(a.2S).1L(A.X.18.I(0))}if(a.D.2e){A.X.ah(a);a.D.4V.2e=A.X.ae}if(a.D.4P){A.2Q.ad(a)}f.M=a.D.1w.x-a.D.8z+\'Q\';f.O=a.D.1w.y-a.D.8y+\'Q\';f.V=a.D.1w.1D+\'Q\';f.S=a.D.1w.hb+\'Q\';A.X.1g.D.8w=H;if(a.D.gx){a.D.4V.5y=A.X.a9}if(a.D.3j!=H){A.X.18.E(\'3j\',a.D.3j)}if(a.D.1E){A.X.18.E(\'1E\',a.D.1E);if(1P.6j){A.X.18.E(\'4X\',\'7s(1E=\'+a.D.1E*1Y+\')\')}}if(a.D.6i){A.X.18.2H(a.D.6i);A.X.18.I(0).6M.Y.11=\'1k\'}if(a.D.4c)a.D.4c.1x(a,[d,a.D.22.x,a.D.22.y]);if(A.1s&&A.1s.7p>0){A.1s.ck(a)}if(a.D.3L==H){b.11=\'1k\'}G H},ah:C(a){if(a.D.2e.1F==8t){if(a.D.2e==\'7X\'){a.D.1Z=A.1U({x:0,y:0},A.12.2f(a.2S));F b=A.12.6b(a.2S,14);a.D.1Z.w=a.D.1Z.1D-b.l-b.r;a.D.1Z.h=a.D.1Z.hb-b.t-b.b}L if(a.D.2e==\'1c\'){F c=A.12.a5();a.D.1Z={x:0,y:0,w:c.w,h:c.h}}}L if(a.D.2e.1F==6h){a.D.1Z={x:R(a.D.2e[0])||0,y:R(a.D.2e[1])||0,w:R(a.D.2e[2])||0,h:R(a.D.2e[3])||0}}a.D.1Z.dx=a.D.1Z.x-a.D.1w.x;a.D.1Z.dy=a.D.1Z.y-a.D.1w.y},8r:C(a){if(a.D.7V||a.D.2e==\'7X\'){A(\'23\',1c).1L(A.X.18.I(0))}A.X.18.58().2x().E(\'1E\',1);if(1P.6j){A.X.18.E(\'4X\',\'7s(1E=1Y)\')}},8I:C(e){A(1c).3h(\'3t\',A.X.aE).3h(\'5n\',A.X.8I);if(A.X.1g==P){G}F a=A.X.1g;A.X.1g=P;if(a.D.6g==H){G H}if(a.D.3I==14){A(a).E(\'T\',a.D.49)}F b=a.Y;if(a.4P){A.X.18.E(\'7z\',\'7g\')}if(a.D.6i){A.X.18.3S(a.D.6i)}if(a.D.5B==H){if(a.D.fx>0){if(!a.D.2g||a.D.2g==\'3Z\'){F x=W A.fx(a,{1H:a.D.fx},\'M\');x.1G(a.D.22.x,a.D.7i)}if(!a.D.2g||a.D.2g==\'3K\'){F y=W A.fx(a,{1H:a.D.fx},\'O\');y.1G(a.D.22.y,a.D.7k)}}L{if(!a.D.2g||a.D.2g==\'3Z\')a.Y.M=a.D.7i+\'Q\';if(!a.D.2g||a.D.2g==\'3K\')a.Y.O=a.D.7k+\'Q\'}A.X.8r(a);if(a.D.3L==H){A(a).E(\'11\',a.D.6o)}}L if(a.D.fx>0){a.D.8w=14;F c=H;if(A.1s&&A.1p&&a.D.3I){c=A.12.3a(A.1p.18.I(0))}A.X.18.4S({M:c?c.x:a.D.1w.x,O:c?c.y:a.D.1w.y},a.D.fx,C(){a.D.8w=H;if(a.D.3L==H){a.Y.11=a.D.6o}A.X.8r(a)})}L{A.X.8r(a);if(a.D.3L==H){A(a).E(\'11\',a.D.6o)}}if(A.1s&&A.1s.7p>0){A.1s.c8(a)}if(A.1p&&a.D.3I){A.1p.c7(a)}if(a.D.2I&&(a.D.7i!=a.D.22.x||a.D.7k!=a.D.22.y)){a.D.2I.1x(a,a.D.aa||[0,0,a.D.7i,a.D.7k])}if(a.D.3C)a.D.3C.1x(a);G H},a9:C(x,y,a,b){if(a!=0)a=R((a+(B.D.gx*a/Z.3B(a))/2)/B.D.gx)*B.D.gx;if(b!=0)b=R((b+(B.D.gy*b/Z.3B(b))/2)/B.D.gy)*B.D.gy;G{dx:a,dy:b,x:0,y:0}},ae:C(x,y,a,b){a=Z.3k(Z.3g(a,B.D.1Z.dx),B.D.1Z.w+B.D.1Z.dx-B.D.1w.1D);b=Z.3k(Z.3g(b,B.D.1Z.dy),B.D.1Z.h+B.D.1Z.dy-B.D.1w.hb);G{dx:a,dy:b,x:0,y:0}},aE:C(e){if(A.X.1g==P||A.X.1g.D.8w==14){G}F a=A.X.1g;a.D.4d=A.12.3W(e);if(a.D.6g==H){3J=Z.cB(Z.5j(a.D.1A.x-a.D.4d.x,2)+Z.5j(a.D.1A.y-a.D.4d.y,2));if(3J<a.D.5D){G}L{A.X.cD(e)}}F b=a.D.4d.x-a.D.1A.x;F c=a.D.4d.y-a.D.1A.y;1V(F i in a.D.4V){F d=a.D.4V[i].1x(a,[a.D.22.x+b,a.D.22.y+c,b,c]);if(d&&d.1F==6E){b=i!=\'6f\'?d.dx:(d.x-a.D.22.x);c=i!=\'6f\'?d.dy:(d.y-a.D.22.y)}}a.D.2n=a.D.1w.x+b-a.D.8z;a.D.2j=a.D.1w.y+c-a.D.8y;if(a.D.4P&&(a.D.3n||a.D.2I)){A.2Q.3n(a,a.D.2n,a.D.2j)}if(a.D.4h)a.D.4h.1x(a,[a.D.22.x+b,a.D.22.y+c]);if(!a.D.2g||a.D.2g==\'3Z\'){a.D.7i=a.D.22.x+b;A.X.18.I(0).Y.M=a.D.2n+\'Q\'}if(!a.D.2g||a.D.2g==\'3K\'){a.D.7k=a.D.22.y+c;A.X.18.I(0).Y.O=a.D.2j+\'Q\'}if(A.1s&&A.1s.7p>0){A.1s.8n(a)}G H},2l:C(o){if(!A.X.18){A(\'23\',1c).1L(\'<1W id="bX"></1W>\');A.X.18=A(\'#bX\');F c=A.X.18.I(0);F d=c.Y;d.T=\'1J\';d.11=\'1k\';d.7z=\'7g\';d.bV=\'1k\';d.2N=\'2B\';if(1P.6j){c.aI="bU"}L{d.eZ=\'1k\';d.cH=\'1k\';d.cJ=\'1k\'}}if(!o){o={}}G B.1y(C(){if(B.8L||!A.12)G;if(1P.6j){B.eX=C(){G H};B.eW=C(){G H}}F a=B;F b=o.3c?A(B).eV(o.3c):A(B);if(A.2R.46){b.1y(C(){B.aI="bU"})}L{b.E(\'-eU-6f-7Q\',\'1k\');b.E(\'6f-7Q\',\'1k\');b.E(\'-eT-6f-7Q\',\'1k\')}B.D={cM:b,5B:o.5B?14:H,3L:o.3L?14:H,3I:o.3I?o.3I:H,4P:o.4P?o.4P:H,7V:o.7V?o.7V:H,3j:o.3j?R(o.3j)||0:H,1E:o.1E?2c(o.1E):H,fx:R(o.fx)||P,5z:o.5z?o.5z:H,4V:{},1A:{},4c:o.4c&&o.4c.1F==2w?o.4c:H,3C:o.3C&&o.3C.1F==2w?o.3C:H,2I:o.2I&&o.2I.1F==2w?o.2I:H,2g:/3K|3Z/.3M(o.2g)?o.2g:H,5D:o.5D?R(o.5D)||0:0,2M:o.2M?o.2M:H,ar:o.ar?14:H,6i:o.6i||H};if(o.4V&&o.4V.1F==2w)B.D.4V.6f=o.4V;if(o.4h&&o.4h.1F==2w)B.D.4h=o.4h;if(o.2e&&((o.2e.1F==8t&&(o.2e==\'7X\'||o.2e==\'1c\'))||(o.2e.1F==6h&&o.2e.1b==4))){B.D.2e=o.2e}if(o.2C){B.D.2C=o.2C}if(o.5y){if(28 o.5y==\'eO\'){B.D.gx=R(o.5y)||1;B.D.gy=R(o.5y)||1}L if(o.5y.1b==2){B.D.gx=R(o.5y[0])||1;B.D.gy=R(o.5y[1])||1}}if(o.3n&&o.3n.1F==2w){B.D.3n=o.3n}B.8L=14;b.1y(C(){B.3H=a});b.1C(\'4R\',A.X.aM)})}};A.fn.1U({8j:A.X.4v,6r:A.X.2l});A.1s={bP:C(a,b,c,d){G a<=A.X.1g.D.2n&&(a+c)>=(A.X.1g.D.2n+A.X.1g.D.1w.w)&&b<=A.X.1g.D.2j&&(b+d)>=(A.X.1g.D.2j+A.X.1g.D.1w.h)?14:H},9S:C(a,b,c,d){G!(a>(A.X.1g.D.2n+A.X.1g.D.1w.w)||(a+c)<A.X.1g.D.2n||b>(A.X.1g.D.2j+A.X.1g.D.1w.h)||(b+d)<A.X.1g.D.2j)?14:H},1A:C(a,b,c,d){G a<A.X.1g.D.4d.x&&(a+c)>A.X.1g.D.4d.x&&b<A.X.1g.D.4d.y&&(b+d)>A.X.1g.D.4d.y?14:H},4T:H,3z:{},7p:0,3p:{},ck:C(a){if(A.X.1g==P){G}F i;A.1s.3z={};F b=H;1V(i in A.1s.3p){if(A.1s.3p[i]!=P){F c=A.1s.3p[i].I(0);if(A(A.X.1g).is(\'.\'+c.1f.a)){if(c.1f.m==H){c.1f.p=A.1U(A.12.6x(c),A.12.6w(c));c.1f.m=14}if(c.1f.ac){A.1s.3p[i].2H(c.1f.ac)}A.1s.3z[i]=A.1s.3p[i];if(A.1p&&c.1f.s&&A.X.1g.D.3I){c.1f.el=A(\'.\'+c.1f.a,c);a.Y.11=\'1k\';A.1p.bM(c);c.1f.9P=A.1p.8g(A.1m(c,\'id\')).6A;a.Y.11=a.D.6o;b=14}if(c.1f.9O){c.1f.9O.1x(A.1s.3p[i].I(0),[A.X.1g])}}}}if(b){A.1p.2b()}},eF:C(){A.1s.3z={};1V(i in A.1s.3p){if(A.1s.3p[i]!=P){F a=A.1s.3p[i].I(0);if(A(A.X.1g).is(\'.\'+a.1f.a)){a.1f.p=A.1U(A.12.6x(a),A.12.6w(a));if(a.1f.ac){A.1s.3p[i].2H(a.1f.ac)}A.1s.3z[i]=A.1s.3p[i];if(A.1p&&a.1f.s&&A.X.1g.D.3I){a.1f.el=A(\'.\'+a.1f.a,a);bJ.Y.11=\'1k\';A.1p.bM(a);bJ.Y.11=bJ.D.6o}}}}},8n:C(e){if(A.X.1g==P){G}A.1s.4T=H;F i;F a=H;F b=0;1V(i in A.1s.3z){F c=A.1s.3z[i].I(0);if(A.1s.4T==H&&A.1s[c.1f.t](c.1f.p.x,c.1f.p.y,c.1f.p.1D,c.1f.p.hb)){if(c.1f.hc&&c.1f.h==H){A.1s.3z[i].2H(c.1f.hc)}if(c.1f.h==H&&c.1f.76){a=14}c.1f.h=14;A.1s.4T=c;if(A.1p&&c.1f.s&&A.X.1g.D.3I){A.1p.18.I(0).2Z=c.1f.eC;A.1p.8n(c)}b++}L if(c.1f.h==14){if(c.1f.6C){c.1f.6C.1x(c,[e,A.X.18.I(0).6M,c.1f.fx])}if(c.1f.hc){A.1s.3z[i].3S(c.1f.hc)}c.1f.h=H}}if(A.1p&&!A.1s.4T&&A.X.1g.3I){A.1p.18.I(0).Y.11=\'1k\'}if(a){A.1s.4T.1f.76.1x(A.1s.4T,[e,A.X.18.I(0).6M])}},c8:C(e){F i;1V(i in A.1s.3z){F a=A.1s.3z[i].I(0);if(a.1f.ac){A.1s.3z[i].3S(a.1f.ac)}if(a.1f.hc){A.1s.3z[i].3S(a.1f.hc)}if(a.1f.s){A.1p.73[A.1p.73.1b]=i}if(a.1f.9I&&a.1f.h==14){a.1f.h=H;a.1f.9I.1x(a,[e,a.1f.fx])}a.1f.m=H;a.1f.h=H}A.1s.3z={}},4v:C(){G B.1y(C(){if(B.8S){if(B.1f.s){id=A.1m(B,\'id\');A.1p.54[id]=P;A(\'.\'+B.1f.a,B).8j()}A.1s.3p[\'d\'+B.bG]=P;B.8S=H;B.f=P}})},2l:C(o){G B.1y(C(){if(B.8S==14||!o.3r||!A.12||!A.X){G}B.1f={a:o.3r,ac:o.9F||H,hc:o.8X||H,eC:o.4G||H,9I:o.je||o.9I||H,76:o.76||o.ev||H,6C:o.6C||o.er||H,9O:o.9O||H,t:o.5T&&(o.5T==\'bP\'||o.5T==\'9S\')?o.5T:\'1A\',fx:o.fx?o.fx:H,m:H,h:H};if(o.bC==14&&A.1p){id=A.1m(B,\'id\');A.1p.54[id]=B.1f.a;B.1f.s=14;if(o.2I){B.1f.2I=o.2I;B.1f.9P=A.1p.8g(id).6A}}B.8S=14;B.bG=R(Z.63()*aW);A.1s.3p[\'d\'+B.bG]=A(B);A.1s.7p++})}};A.fn.1U({ei:A.1s.4v,ee:A.1s.2l});A.jd=A.1s.eF;A.3l={18:P,89:C(){3D=B.2m;if(!3D)G;Y={eb:A(B).E(\'eb\')||\'\',4a:A(B).E(\'4a\')||\'\',87:A(B).E(\'87\')||\'\',e9:A(B).E(\'e9\')||\'\',e8:A(B).E(\'e8\')||\'\',e7:A(B).E(\'e7\')||\'\',bx:A(B).E(\'bx\')||\'\',e6:A(B).E(\'e6\')||\'\'};A.3l.18.E(Y);3i=A.3l.e5(3D);3i=3i.48(W bw("\\\\n","g"),"<br />");A.3l.18.3i(\'j6\');b3=A.3l.18.I(0).3P;A.3l.18.3i(3i);V=A.3l.18.I(0).3P+b3;if(B.66.65&&V>B.66.65[0]){V=B.66.65[0]}B.Y.V=V+\'Q\';if(B.4D==\'bs\'){S=A.3l.18.I(0).5r+b3;if(B.66.65&&S>B.66.65[1]){S=B.66.65[1]}B.Y.S=S+\'Q\'}},e5:C(a){bq={\'&\':\'&j1;\',\'<\':\'&j0;\',\'>\':\'&gt;\',\'"\':\'&iZ;\'};1V(i in bq){a=a.48(W bw(i,\'g\'),bq[i])}G a},2l:C(a){if(A.3l.18==P){A(\'23\',1c).1L(\'<1W id="dX" Y="T: 1J; O: 0; M: 0; 2W: 2B;"></1W>\');A.3l.18=A(\'#dX\')}G B.1y(C(){if(/bs|aV/.3M(B.4D)){if(B.4D==\'aV\'){dT=B.4Z(\'1K\');if(!/3D|iW/.3M(dT)){G}}if(a&&(a.1F==bm||(a.1F==6h&&a.1b==2))){if(a.1F==bm)a=[a,a];L{a[0]=R(a[0])||7n;a[1]=R(a[1])||7n}B.66={65:a}}A(B).4W(A.3l.89).5Q(A.3l.89).cV(A.3l.89);A.3l.89.1x(B)}})}};A.fn.iU=A.3l.2l;A.fn.1U({c3:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'4l\',c)})},dP:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'41\',c)})},iQ:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'dG\',c)})},iM:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'M\',c)})},iL:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'2D\',c)})},iK:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'dF\',c)})}});A.fx.5l=C(e,a,b,c,d){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1N=A.12.2f(e);z.1e=28 b==\'4B\'?b:d||P;if(!e.4f)e.4f=z.el.E(\'11\');if(c==\'dG\'){c=z.el.E(\'11\')==\'1k\'?\'41\':\'4l\'}L if(c==\'dF\'){c=z.el.E(\'11\')==\'1k\'?\'2D\':\'M\'}z.el.1S();z.1l=a;z.29=28 b==\'C\'?b:P;z.fx=A.fx.9u(e);z.6T=c;z.1T=C(){if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}if(z.6T==\'41\'||z.6T==\'2D\'){z.el.E(\'11\',z.el.I(0).4f==\'1k\'?\'2v\':z.el.I(0).4f)}L{z.el.2x()}A.fx.9n(z.fx.2Y.I(0),z.fx.U);A.2z(z.el.I(0),\'1j\')};2X(z.6T){19\'4l\':5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'S\');5q.1G(z.fx.U.1o.hb,0);1n;19\'41\':z.fx.2Y.E(\'S\',\'9e\');z.el.1S();5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'S\');5q.1G(0,z.fx.U.1o.hb);1n;19\'M\':5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'V\');5q.1G(z.fx.U.1o.1D,0);1n;19\'2D\':z.fx.2Y.E(\'V\',\'9e\');z.el.1S();5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'V\');5q.1G(0,z.fx.U.1o.1D);1n}};A.fn.iA=C(a,b){G B.1r(\'1j\',C(){if(!A.4n(B)){A.2z(B,\'1j\');G H}F e=W A.fx.eu(B,a,b);e.bE()})};A.fx.eu=C(e,a,b){F z=B;z.el=A(e);z.el.1S();z.29=b;z.8e=R(a)||40;z.U={};z.U.T=z.el.E(\'T\');z.U.O=R(z.el.E(\'O\'))||0;z.U.M=R(z.el.E(\'M\'))||0;if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.74=5;z.52=1;z.bE=C(){z.52++;z.e=W A.fx(z.el.I(0),{1H:io,1T:C(){z.e=W A.fx(z.el.I(0),{1H:80,1T:C(){z.8e=R(z.8e/2);if(z.52<=z.74)z.bE();L{z.el.E(\'T\',z.U.T).E(\'O\',z.U.O+\'Q\').E(\'M\',z.U.M+\'Q\');A.2z(z.el.I(0),\'1j\');if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}}}},\'O\');z.e.1G(z.U.O-z.8e,z.U.O)}},\'O\');z.e.1G(z.U.O,z.U.O-z.8e)}};A.fn.1U({im:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'41\',\'3U\',c)})},ik:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'41\',\'in\',c)})},ii:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'41\',\'3E\',c)})},ig:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'4l\',\'3U\',c)})},ie:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'4l\',\'in\',c)})},ic:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'4l\',\'3E\',c)})},ib:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'M\',\'3U\',c)})},ia:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'M\',\'in\',c)})},i9:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'M\',\'3E\',c)})},i8:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'2D\',\'3U\',c)})},i7:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'2D\',\'in\',c)})},i6:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'2D\',\'3E\',c)})}});A.fx.3Y=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1e=28 b==\'4B\'?b:f||P;z.U={};z.U.T=z.el.E(\'T\');z.U.O=z.el.E(\'O\');z.U.M=z.el.E(\'M\');if(!e.4f)e.4f=z.el.E(\'11\');if(d==\'3E\'){d=z.el.E(\'11\')==\'1k\'?\'in\':\'3U\'}z.el.1S();if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.1K=d;b=28 b==\'C\'?b:P;7N=1;2X(c){19\'4l\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'O\');z.5x=2c(z.U.O)||0;z.9i=z.dt;7N=-1;1n;19\'41\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'O\');z.5x=2c(z.U.O)||0;z.9i=z.dt;1n;19\'2D\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'M\');z.5x=2c(z.U.M)||0;z.9i=z.ds;1n;19\'M\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'M\');z.5x=2c(z.U.M)||0;z.9i=z.ds;7N=-1;1n}z.e2=W A.fx(z.el.I(0),A.1l(a,z.1e,C(){z.el.E(z.U);if(z.1K==\'3U\'){z.el.E(\'11\',\'1k\')}L z.el.E(\'11\',z.el.I(0).4f==\'1k\'?\'2v\':z.el.I(0).4f);A.2z(z.el.I(0),\'1j\')}),\'1E\');if(d==\'in\'){z.e.1G(z.5x+1Y*7N,z.5x);z.e2.1G(0,1)}L{z.e.1G(z.5x,z.5x+1Y*7N);z.e2.1G(1,0)}};A.fn.1U({i5:C(a,b,c,d){G B.1r(\'1j\',C(){W A.fx.9h(B,a,b,c,\'dq\',d)})},i4:C(a,b,c,d){G B.1r(\'1j\',C(){W A.fx.9h(B,a,b,c,\'9g\',d)})},i3:C(a,b,c,d){G B.1r(\'1j\',C(){W A.fx.9h(B,a,b,c,\'3E\',d)})}});A.fx.9h=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1e=28 c==\'4B\'?c:f||P;z.29=28 c==\'C\'?c:P;if(d==\'3E\'){d=z.el.E(\'11\')==\'1k\'?\'9g\':\'dq\'}z.1l=a;z.S=b&&b.1F==bm?b:20;z.fx=A.fx.9u(e);z.1K=d;z.1T=C(){if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}if(z.1K==\'9g\'){z.el.1S()}L{z.el.2x()}A.fx.9n(z.fx.2Y.I(0),z.fx.U);A.2z(z.el.I(0),\'1j\')};if(z.1K==\'9g\'){z.el.1S();z.fx.2Y.E(\'S\',z.S+\'Q\').E(\'V\',\'9e\');z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,C(){z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'S\');z.ef.1G(z.S,z.fx.U.1o.hb)}),\'V\');z.ef.1G(0,z.fx.U.1o.1D)}L{z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,C(){z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'V\');z.ef.1G(z.fx.U.1o.1D,0)}),\'S\');z.ef.1G(z.fx.U.1o.hb,z.S)}};A.fn.i2=C(c,d,e,f){G B.1r(\'dp\',C(){B.6Q=A(B).1m("Y")||\'\';f=28 e==\'4B\'?e:f||P;e=28 e==\'C\'?e:P;F a=A(B).E(\'6P\');F b=B.2S;6k(a==\'b7\'&&b){a=A(b).E(\'6P\');b=b.2S}A(B).E(\'6P\',d);if(28 B.6Q==\'7M\')B.6Q=B.6Q["9d"];A(B).4S({\'6P\':a},c,f,C(){A.2z(B,\'dp\');if(28 A(B).1m("Y")==\'7M\'){A(B).1m("Y")["9d"]="";A(B).1m("Y")["9d"]=B.6Q}L{A(B).1m("Y",B.6Q)}if(e)e.1x(B)})})};A.4n=C(e){if(/^i1$|^i0$|^hZ$|^5W$|^hY$|^hX$|^hW$|^hV$|^hU$|^23$|^hT$|^hS$|^hR$|^hQ$|^hP$|^hO$|^hN$/i.3M(e.98))G H;L G 14};A.fx.9n=C(e,a){F c=e.6M;F b=c.Y;b.T=a.T;b.4M=a.3s.t;b.4K=a.3s.l;b.4L=a.3s.b;b.53=a.3s.r;b.O=a.O+\'Q\';b.M=a.M+\'Q\';e.2S.dn(c,e);e.2S.hM(e)};A.fx.9u=C(e){if(!A.4n(e))G H;F t=A(e);F a=e.Y;F b=H;if(t.E(\'11\')==\'1k\'){95=t.E(\'2W\');t.E(\'2W\',\'2B\').1S();b=14}F c={};c.T=t.E(\'T\');c.1o=A.12.2f(e);c.3s=A.12.b2(e);F d=e.4u?e.4u.dk:t.E(\'hK\');c.O=R(t.E(\'O\'))||0;c.M=R(t.E(\'M\'))||0;F f=\'hJ\'+R(Z.63()*aW);F g=1c.3x(/^3O$|^br$|^hI$|^hr$|^7Q$|^hH$|^7M$|^3q$|^hF$|^hE$|^hC$|^90$|^dl$|^hB$/i.3M(e.98)?\'1W\':e.98);A.1m(g,\'id\',f);F h=A(g).2H(\'hA\');F i=g.Y;F j=0;F k=0;if(c.T==\'2i\'||c.T==\'1J\'){j=c.O;k=c.M}i.O=j+\'Q\';i.M=k+\'Q\';i.T=c.T!=\'2i\'&&c.T!=\'1J\'?\'2i\':c.T;i.S=c.1o.hb+\'Q\';i.V=c.1o.1D+\'Q\';i.4M=c.3s.t;i.53=c.3s.r;i.4L=c.3s.b;i.4K=c.3s.l;i.2N=\'2B\';if(A.2R.46){i.dk=d}L{i.hz=d}if(A.2R=="46"){a.4X="7s(1E="+0.dg*1Y+")"}a.1E=0.dg;e.2S.dn(g,e);g.hy(e);a.4M=\'2G\';a.53=\'2G\';a.4L=\'2G\';a.4K=\'2G\';a.T=\'1J\';a.bV=\'1k\';a.O=\'2G\';a.M=\'2G\';if(b){t.2x();a.2W=95}G{U:c,2Y:A(g)}};A.fx.7H={hx:[0,1O,1O],hw:[dd,1O,1O],hv:[db,db,hu],hs:[0,0,0],hq:[0,0,1O],hp:[d6,42,42],hn:[0,1O,1O],hm:[0,0,6N],hl:[0,6N,6N],hk:[aX,aX,aX],hi:[0,1Y,0],hg:[hf,he,cZ],hd:[6N,0,6N],ha:[85,cZ,47],h7:[1O,cY,0],h6:[h5,50,h4],h3:[6N,0,0],h2:[h1,cX,h0],gZ:[gY,0,8U],gX:[1O,0,1O],gW:[1O,gU,0],gT:[0,67,0],gS:[75,0,gQ],gP:[dd,cU,cY],gO:[gL,gK,cU],gI:[cT,1O,1O],gH:[cS,gG,cS],gF:[8U,8U,8U],gD:[1O,gC,gB],gA:[1O,1O,cT],gw:[0,1O,0],gv:[1O,0,1O],gu:[67,0,0],gs:[0,0,67],gr:[67,67,0],gq:[1O,d6,0],gp:[1O,8R,gn],gm:[67,0,67],gl:[1O,0,0],gk:[8R,8R,8R],gj:[1O,1O,1O],gi:[1O,1O,0]};A.fx.5L=C(a,b){if(A.fx.7H[a])G{r:A.fx.7H[a][0],g:A.fx.7H[a][1],b:A.fx.7H[a][2]};L if(2L=/^6v\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)$/.8Q(a))G{r:R(2L[1]),g:R(2L[2]),b:R(2L[3])};L if(2L=/6v\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)$/.8Q(a))G{r:2c(2L[1])*2.55,g:2c(2L[2])*2.55,b:2c(2L[3])*2.55};L if(2L=/^#([a-fA-6t-9])([a-fA-6t-9])([a-fA-6t-9])$/.8Q(a))G{r:R("6s"+2L[1]+2L[1]),g:R("6s"+2L[2]+2L[2]),b:R("6s"+2L[3]+2L[3])};L if(2L=/^#([a-fA-6t-9]{2})([a-fA-6t-9]{2})([a-fA-6t-9]{2})$/.8Q(a))G{r:R("6s"+2L[1]),g:R("6s"+2L[2]),b:R("6s"+2L[3])};L G b==14?H:{r:1O,g:1O,b:1O}};A.fx.cQ={5d:1,4y:1,5i:1,4x:1,4e:1,4a:1,S:1,M:1,bx:1,gh:1,4L:1,4K:1,53:1,4M:1,7y:1,5R:1,7x:1,8O:1,1E:1,ge:1,gc:1,4Q:1,4F:1,5g:1,5b:1,2D:1,gb:1,O:1,V:1,3j:1};A.fx.cN={6P:1,ga:1,g9:1,g8:1,g7:1,g6:1,g5:1};A.fx.7v=[\'g4\',\'g3\',\'g2\',\'g1\'];A.fx.aL={\'aK\':[\'2u\',\'cK\'],\'8E\':[\'2u\',\'aH\'],\'5X\':[\'5X\',\'\'],\'7E\':[\'7E\',\'\']};A.fn.1U({4S:C(b,c,d,f){G B.1r(C(){F a=A.1l(c,d,f);F e=W A.cI(B,a,b)})},aG:C(b,c){G B.1r(C(){F a=A.1l(b,c);F e=W A.aG(B,a)})},7w:C(a){G B.1y(C(){if(B.5e)A.aF(B,a)})},fZ:C(a){G B.1y(C(){if(B.5e)A.aF(B,a);if(B.1r&&B.1r[\'fx\'])B.1r.fx=[]})}});A.1U({aG:C(a,b){F z=B,5f;z.3f=C(){if(A.cF(b.1T))b.1T.1x(a)};z.2A=5Y(C(){z.3f()},b.1H);a.5e=z},1e:{b1:C(p,n,a,b,c){G((-Z.51(p*Z.2F)/2)+0.5)*b+a}},cI:C(f,g,h){F z=B,5f;F y=f.Y;F k=A.E(f,"2N");F l=A.E(f,"11");F o={};z.9a=(W 6p()).6y();g.1e=g.1e&&A.1e[g.1e]?g.1e:\'b1\';z.8H=C(a,b){if(A.fx.cQ[a]){if(b==\'1S\'||b==\'2x\'||b==\'3E\'){if(!f.5I)f.5I={};F r=2c(A.5S(f,a));f.5I[a]=r&&r>-aW?r:(2c(A.E(f,a))||0);b=b==\'3E\'?(l==\'1k\'?\'1S\':\'2x\'):b;g[b]=14;o[a]=b==\'1S\'?[0,f.5I[a]]:[f.5I[a],0];if(a!=\'1E\')y[a]=o[a][0]+(a!=\'3j\'&&a!=\'87\'?\'Q\':\'\');L A.1m(y,"1E",o[a][0])}L{o[a]=[2c(A.5S(f,a)),2c(b)||0]}}L if(A.fx.cN[a])o[a]=[A.fx.5L(A.5S(f,a)),A.fx.5L(b)];L if(/^5X$|7E$|2u$|8E$|aK$/i.3M(a)){F m=b.48(/\\s+/g,\' \').48(/6v\\s*\\(\\s*/g,\'6v(\').48(/\\s*,\\s*/g,\',\').48(/\\s*\\)/g,\')\').aD(/([^\\s]+)/g);2X(a){19\'5X\':19\'7E\':19\'aK\':19\'8E\':m[3]=m[3]||m[1]||m[0];m[2]=m[2]||m[0];m[1]=m[1]||m[0];1V(F i=0;i<A.fx.7v.1b;i++){F c=A.fx.aL[a][0]+A.fx.7v[i]+A.fx.aL[a][1];o[c]=a==\'8E\'?[A.fx.5L(A.5S(f,c)),A.fx.5L(m[i])]:[2c(A.5S(f,c)),2c(m[i])]}1n;19\'2u\':1V(F i=0;i<m.1b;i++){F d=2c(m[i]);F e=!fX(d)?\'cK\':(!/b7|1k|2B|fW|fV|fU|fT|fS|fQ|fP|fO/i.3M(m[i])?\'aH\':H);if(e){1V(F j=0;j<A.fx.7v.1b;j++){c=\'2u\'+A.fx.7v[j]+e;o[c]=e==\'aH\'?[A.fx.5L(A.5S(f,c)),A.fx.5L(m[i])]:[2c(A.5S(f,c)),d]}}L{y[\'fN\']=m[i]}}1n}}L{y[a]=b}G H};1V(p in h){if(p==\'Y\'){F q=A.ax(h[p]);1V(6I in q){B.8H(6I,q[6I])}}L if(p==\'2Z\'){if(1c.8D)1V(F i=0;i<1c.8D.1b;i++){F s=1c.8D[i].fM||1c.8D[i].fL||P;if(s){1V(F j=0;j<s.1b;j++){if(s[j].fK==\'.\'+h[p]){F u=W bw(\'\\.\'+h[p]+\' {\');F v=s[j].Y.9d;F q=A.ax(v.48(u,\'\').48(/}/g,\'\'));1V(6I in q){B.8H(6I,q[6I])}}}}}}L{B.8H(p,h[p])}}y.11=l==\'1k\'?\'2v\':l;y.2N=\'2B\';z.3f=C(){F t=(W 6p()).6y();if(t>g.1H+z.9a){5h(z.2A);z.2A=P;1V(p in o){if(p=="1E")A.1m(y,"1E",o[p][1]);L if(28 o[p][1]==\'7M\')y[p]=\'6v(\'+o[p][1].r+\',\'+o[p][1].g+\',\'+o[p][1].b+\')\';L y[p]=o[p][1]+(p!=\'3j\'&&p!=\'87\'?\'Q\':\'\')}if(g.2x||g.1S)1V(F p in f.5I)if(p=="1E")A.1m(y,p,f.5I[p]);L y[p]="";y.11=g.2x?\'1k\':(l!=\'1k\'?l:\'2v\');y.2N=k;f.5e=P;if(A.cF(g.1T))g.1T.1x(f)}L{F n=t-B.9a;F a=n/g.1H;1V(p in o){if(28 o[p][1]==\'7M\'){y[p]=\'6v(\'+R(A.1e[g.1e](a,n,o[p][0].r,(o[p][1].r-o[p][0].r),g.1H))+\',\'+R(A.1e[g.1e](a,n,o[p][0].g,(o[p][1].g-o[p][0].g),g.1H))+\',\'+R(A.1e[g.1e](a,n,o[p][0].b,(o[p][1].b-o[p][0].b),g.1H))+\')\'}L{F b=A.1e[g.1e](a,n,o[p][0],(o[p][1]-o[p][0]),g.1H);if(p=="1E")A.1m(y,"1E",b);L y[p]=b+(p!=\'3j\'&&p!=\'87\'?\'Q\':\'\')}}}};z.2A=5Y(C(){z.3f()},13);f.5e=z},aF:C(a,b){if(b)a.5e.9a-=fJ;L{1P.5h(a.5e.2A);a.5e=P;A.2z(a,"fx")}}});A.ax=C(a){F b={};if(28 a==\'4B\'){a=a.5u().6W(\';\');1V(F i=0;i<a.1b;i++){8B=a[i].6W(\':\');if(8B.1b==2){b[A.cE(8B[0].48(/\\-(\\w)/g,C(m,c){G c.fI()}))]=A.cE(8B[1])}}}G b};A.fn.1U({fH:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.4N(B,a,b,\'3K\',\'5o\',c)})},fG:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.4N(B,a,b,\'3Z\',\'5o\',c)})},fF:C(a,b,c){G B.1r(\'1j\',C(){if(A.E(B,\'11\')==\'1k\'){W A.fx.4N(B,a,b,\'3Z\',\'6n\',c)}L{W A.fx.4N(B,a,b,\'3Z\',\'5o\',c)}})},fE:C(a,b,c){G B.1r(\'1j\',C(){if(A.E(B,\'11\')==\'1k\'){W A.fx.4N(B,a,b,\'3K\',\'6n\',c)}L{W A.fx.4N(B,a,b,\'3K\',\'5o\',c)}})},fD:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.4N(B,a,b,\'3K\',\'6n\',c)})},fC:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.4N(B,a,b,\'3Z\',\'6n\',c)})}});A.fx.4N=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;F g=H;z.el=A(e);z.1e=28 b==\'4B\'?b:f||P;z.29=28 b==\'C\'?b:P;z.1K=d;z.1l=a;z.26=A.12.2f(e);z.U={};z.U.T=z.el.E(\'T\');z.U.11=z.el.E(\'11\');if(z.U.11==\'1k\'){95=z.el.E(\'2W\');z.el.1S();g=14}z.U.O=z.el.E(\'O\');z.U.M=z.el.E(\'M\');if(g){z.el.2x();z.el.E(\'2W\',95)}z.U.V=z.26.w+\'Q\';z.U.S=z.26.h+\'Q\';z.U.2N=z.el.E(\'2N\');z.26.O=R(z.U.O)||0;z.26.M=R(z.U.M)||0;if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.el.E(\'2N\',\'2B\').E(\'S\',d==\'6n\'&&c==\'3K\'?1:z.26.h+\'Q\').E(\'V\',d==\'6n\'&&c==\'3Z\'?1:z.26.w+\'Q\');z.1T=C(){z.el.E(z.U);if(z.1K==\'5o\')z.el.2x();L z.el.1S();A.2z(z.el.I(0),\'1j\')};2X(c){19\'3K\':z.eh=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'S\');z.et=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'O\');if(z.1K==\'5o\'){z.eh.1G(z.26.h,0);z.et.1G(z.26.O,z.26.O+z.26.h/2)}L{z.eh.1G(0,z.26.h);z.et.1G(z.26.O+z.26.h/2,z.26.O)}1n;19\'3Z\':z.eh=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'V\');z.et=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'M\');if(z.1K==\'5o\'){z.eh.1G(z.26.w,0);z.et.1G(z.26.M,z.26.M+z.26.w/2)}L{z.eh.1G(0,z.26.w);z.et.1G(z.26.M+z.26.w/2,z.26.M)}1n}};A.fn.au=C(b,c,d){G B.1r(\'1j\',C(){if(!A.4n(B)){A.2z(B,\'1j\');G H}F a=W A.fx.au(B,b,c,d);a.at()})};A.fx.au=C(a,b,c,d){F z=B;z.74=c;z.52=1;z.el=a;z.1l=b;z.29=d;A(z.el).1S();z.at=C(){z.52++;z.e=W A.fx(z.el,A.1l(z.1l,C(){z.ef=W A.fx(z.el,A.1l(z.1l,C(){if(z.52<=z.74)z.at();L{A.2z(z.el,\'1j\');if(z.29&&z.29.1F==2w){z.29.1x(z.el)}}}),\'1E\');z.ef.1G(0,1)}),\'1E\');z.e.1G(1,0)}};A.fn.1U({fB:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5E(B,a,1,1Y,14,b,\'cz\',c)})},fy:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5E(B,a,1Y,1,14,b,\'as\',c)})},fw:C(b,c,d){G B.1r(\'1j\',C(){F a=a||\'d2\';W A.fx.5E(B,b,1Y,cX,14,c,\'5c\',a)})},5E:C(a,b,c,d,e,f){G B.1r(\'1j\',C(){W A.fx.5E(B,a,b,c,d,e,\'5E\',f)})}});A.fx.5E=C(e,f,g,h,j,k,m,q){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.6m=R(g)||1Y;z.3v=R(h)||1Y;z.1e=28 k==\'4B\'?k:q||P;z.29=28 k==\'C\'?k:P;z.1H=A.1l(f).1H;z.bL=j||P;z.26=A.12.2f(e);z.U={V:z.el.E(\'V\'),S:z.el.E(\'S\'),4a:z.el.E(\'4a\')||\'1Y%\',T:z.el.E(\'T\'),11:z.el.E(\'11\'),O:z.el.E(\'O\'),M:z.el.E(\'M\'),2N:z.el.E(\'2N\'),4x:z.el.E(\'4x\'),5i:z.el.E(\'5i\'),5d:z.el.E(\'5d\'),4y:z.el.E(\'4y\'),5b:z.el.E(\'5b\'),5g:z.el.E(\'5g\'),4Q:z.el.E(\'4Q\'),4F:z.el.E(\'4F\')};z.V=R(z.U.V)||e.3P||0;z.S=R(z.U.S)||e.5r||0;z.O=R(z.U.O)||0;z.M=R(z.U.M)||0;1o=[\'em\',\'Q\',\'fv\',\'%\'];1V(i in 1o){if(z.U.4a.3o(1o[i])>0){z.cy=1o[i];z.4a=2c(z.U.4a)}if(z.U.4x.3o(1o[i])>0){z.cx=1o[i];z.aq=2c(z.U.4x)||0}if(z.U.5i.3o(1o[i])>0){z.cw=1o[i];z.ap=2c(z.U.5i)||0}if(z.U.5d.3o(1o[i])>0){z.cv=1o[i];z.ao=2c(z.U.5d)||0}if(z.U.4y.3o(1o[i])>0){z.cu=1o[i];z.an=2c(z.U.4y)||0}if(z.U.5b.3o(1o[i])>0){z.ct=1o[i];z.am=2c(z.U.5b)||0}if(z.U.5g.3o(1o[i])>0){z.cr=1o[i];z.al=2c(z.U.5g)||0}if(z.U.4Q.3o(1o[i])>0){z.cq=1o[i];z.ak=2c(z.U.4Q)||0}if(z.U.4F.3o(1o[i])>0){z.cp=1o[i];z.aj=2c(z.U.4F)||0}}if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.el.E(\'2N\',\'2B\');z.1K=m;2X(z.1K){19\'cz\':z.3V=z.O+z.26.h/2;z.4H=z.O;z.3Q=z.M+z.26.w/2;z.4r=z.M;1n;19\'as\':z.4H=z.O+z.26.h/2;z.3V=z.O;z.4r=z.M+z.26.w/2;z.3Q=z.M;1n;19\'5c\':z.4H=z.O-z.26.h/4;z.3V=z.O;z.4r=z.M-z.26.w/4;z.3Q=z.M;1n}z.ai=H;z.t=(W 6p).6y();z.4i=C(){5h(z.2A);z.2A=P};z.3f=C(){if(z.ai==H){z.el.1S();z.ai=14}F t=(W 6p).6y();F n=t-z.t;F p=n/z.1H;if(t>=z.1H+z.t){97(C(){o=1;if(z.1K){t=z.4H;l=z.4r;if(z.1K==\'5c\')o=0}z.ag(z.3v,l,t,14,o)},13);z.4i()}L{o=1;if(!A.1e||!A.1e[z.1e]){s=((-Z.51(p*Z.2F)/2)+0.5)*(z.3v-z.6m)+z.6m}L{s=A.1e[z.1e](p,n,z.6m,(z.3v-z.6m),z.1H)}if(z.1K){if(!A.1e||!A.1e[z.1e]){t=((-Z.51(p*Z.2F)/2)+0.5)*(z.4H-z.3V)+z.3V;l=((-Z.51(p*Z.2F)/2)+0.5)*(z.4r-z.3Q)+z.3Q;if(z.1K==\'5c\')o=((-Z.51(p*Z.2F)/2)+0.5)*(-0.9B)+0.9B}L{t=A.1e[z.1e](p,n,z.3V,(z.4H-z.3V),z.1H);l=A.1e[z.1e](p,n,z.3Q,(z.4r-z.3Q),z.1H);if(z.1K==\'5c\')o=A.1e[z.1e](p,n,0.9B,-0.9B,z.1H)}}z.ag(s,l,t,H,o)}};z.2A=5Y(C(){z.3f()},13);z.ag=C(a,b,c,d,e){z.el.E(\'S\',z.S*a/1Y+\'Q\').E(\'V\',z.V*a/1Y+\'Q\').E(\'M\',b+\'Q\').E(\'O\',c+\'Q\').E(\'4a\',z.4a*a/1Y+z.cy);if(z.aq)z.el.E(\'4x\',z.aq*a/1Y+z.cx);if(z.ap)z.el.E(\'5i\',z.ap*a/1Y+z.cw);if(z.ao)z.el.E(\'5d\',z.ao*a/1Y+z.cv);if(z.an)z.el.E(\'4y\',z.an*a/1Y+z.cu);if(z.am)z.el.E(\'5b\',z.am*a/1Y+z.ct);if(z.al)z.el.E(\'5g\',z.al*a/1Y+z.cr);if(z.ak)z.el.E(\'4Q\',z.ak*a/1Y+z.cq);if(z.aj)z.el.E(\'4F\',z.aj*a/1Y+z.cp);if(z.1K==\'5c\'){if(1P.6j)z.el.I(0).Y.4X="7s(1E="+e*1Y+")";z.el.I(0).Y.1E=e}if(d){if(z.bL){z.el.E(z.U)}if(z.1K==\'as\'||z.1K==\'5c\'){z.el.E(\'11\',\'1k\');if(z.1K==\'5c\'){if(1P.6j)z.el.I(0).Y.4X="7s(1E="+1Y+")";z.el.I(0).Y.1E=1}}L z.el.E(\'11\',\'2v\');if(z.29)z.29.1x(z.el.I(0));A.2z(z.el.I(0),\'1j\')}}};A.fn.1U({9A:C(a,b,c){o=A.1l(a);G B.1r(\'1j\',C(){W A.fx.9A(B,o,b,c)})},ft:C(a,b,c){G B.1y(C(){A(\'a[@2U*="#"]\',B).4U(C(e){co=B.2U.6W(\'#\');A(\'#\'+co[1]).9A(a,b,c);G H})})}});A.fx.9A=C(e,o,a,b){F z=B;z.o=o;z.e=e;z.2g=/cn|cm/.3M(a)?a:H;z.1e=b;p=A.12.3a(e);s=A.12.5O();z.4i=C(){5h(z.2A);z.2A=P;A.2z(z.e,\'1j\')};z.t=(W 6p).6y();s.h=s.h>s.ih?(s.h-s.ih):s.h;s.w=s.w>s.iw?(s.w-s.iw):s.w;z.4H=p.y>s.h?s.h:p.y;z.4r=p.x>s.w?s.w:p.x;z.3V=s.t;z.3Q=s.l;z.3f=C(){F t=(W 6p).6y();F n=t-z.t;F p=n/z.o.1H;if(t>=z.o.1H+z.t){z.4i();97(C(){z.ab(z.4H,z.4r)},13)}L{if(!z.2g||z.2g==\'cn\'){if(!A.1e||!A.1e[z.1e]){8v=((-Z.51(p*Z.2F)/2)+0.5)*(z.4H-z.3V)+z.3V}L{8v=A.1e[z.1e](p,n,z.3V,(z.4H-z.3V),z.o.1H)}}L{8v=z.3V}if(!z.2g||z.2g==\'cm\'){if(!A.1e||!A.1e[z.1e]){8u=((-Z.51(p*Z.2F)/2)+0.5)*(z.4r-z.3Q)+z.3Q}L{8u=A.1e[z.1e](p,n,z.3Q,(z.4r-z.3Q),z.o.1H)}}L{8u=z.3Q}z.ab(8v,8u)}};z.ab=C(t,l){1P.fs(l,t)};z.2A=5Y(C(){z.3f()},13)};A.fn.a8=C(a,b){G B.1r(\'1j\',C(){if(!A.4n(B)){A.2z(B,\'1j\');G H}F e=W A.fx.a8(B,a,b);e.a7()})};A.fx.a8=C(e,a,b){F z=B;z.el=A(e);z.el.1S();z.74=R(a)||3;z.29=b;z.52=1;z.U={};z.U.T=z.el.E(\'T\');z.U.O=R(z.el.E(\'O\'))||0;z.U.M=R(z.el.E(\'M\'))||0;if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.a7=C(){z.52++;z.e=W A.fx(z.el.I(0),{1H:60,1T:C(){z.e=W A.fx(z.el.I(0),{1H:60,1T:C(){z.e=W A.fx(e,{1H:60,1T:C(){if(z.52<=z.74)z.a7();L{z.el.E(\'T\',z.U.T).E(\'O\',z.U.O+\'Q\').E(\'M\',z.U.M+\'Q\');A.2z(z.el.I(0),\'1j\');if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}}}},\'M\');z.e.1G(z.U.M-20,z.U.M)}},\'M\');z.e.1G(z.U.M+20,z.U.M-20)}},\'M\');z.e.1G(z.U.M,z.U.M+20)}};A.fn.1U({dR:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'4l\',\'in\',c)})},c6:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'4l\',\'3U\',c)})},fr:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'4l\',\'3E\',c)})},fq:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'41\',\'in\',c)})},fp:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'41\',\'3U\',c)})},fo:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'41\',\'3E\',c)})},fm:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'M\',\'in\',c)})},fl:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'M\',\'3U\',c)})},fk:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'M\',\'3E\',c)})},fj:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'2D\',\'in\',c)})},fi:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'2D\',\'3U\',c)})},fh:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'2D\',\'3E\',c)})}});A.fx.1u=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1e=28 b==\'4B\'?b:f||P;z.29=28 b==\'C\'?b:P;if(d==\'3E\'){d=z.el.E(\'11\')==\'1k\'?\'in\':\'3U\'}if(!e.4f)e.4f=z.el.E(\'11\');z.el.1S();z.1l=a;z.fx=A.fx.9u(e);z.1K=d;z.6T=c;z.1T=C(){if(z.1K==\'3U\')z.el.E(\'2W\',\'2B\');A.fx.9n(z.fx.2Y.I(0),z.fx.U);if(z.1K==\'in\'){z.el.E(\'11\',z.el.I(0).4f==\'1k\'?\'2v\':z.el.I(0).4f)}L{z.el.E(\'11\',\'1k\');z.el.E(\'2W\',\'cl\')}if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}A.2z(z.el.I(0),\'1j\')};2X(z.6T){19\'4l\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'O\');z.79=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e),\'S\');if(z.1K==\'in\'){z.ef.1G(-z.fx.U.1o.hb,0);z.79.1G(0,z.fx.U.1o.hb)}L{z.ef.1G(0,-z.fx.U.1o.hb);z.79.1G(z.fx.U.1o.hb,0)}1n;19\'41\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'O\');if(z.1K==\'in\'){z.ef.1G(z.fx.U.1o.hb,0)}L{z.ef.1G(0,z.fx.U.1o.hb)}1n;19\'M\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'M\');z.79=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e),\'V\');if(z.1K==\'in\'){z.ef.1G(-z.fx.U.1o.1D,0);z.79.1G(0,z.fx.U.1o.1D)}L{z.ef.1G(0,-z.fx.U.1o.1D);z.79.1G(z.fx.U.1o.1D,0)}1n;19\'2D\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'M\');if(z.1K==\'in\'){z.ef.1G(z.fx.U.1o.1D,0)}L{z.ef.1G(0,z.fx.U.1o.1D)}1n}};A.2O=P;A.fn.fg=C(o){G B.1r(\'1j\',C(){W A.fx.cj(B,o)})};A.fx.cj=C(e,o){if(A.2O==P){A(\'23\',1c).1L(\'<1W id="2O"></1W>\');A.2O=A(\'#2O\')}A.2O.E(\'11\',\'2v\').E(\'T\',\'1J\');F z=B;z.el=A(e);if(!o||!o.3v){G}if(o.3v.1F==8t&&1c.7o(o.3v)){o.3v=1c.7o(o.3v)}L if(!o.3v.ci){G}if(!o.1H){o.1H=ch}z.1H=o.1H;z.3v=o.3v;z.7e=o.2Z;z.1T=o.1T;if(z.7e){A.2O.2H(z.7e)}z.8s=0;z.8i=0;if(A.e0){z.8s=(R(A.2O.E(\'4y\'))||0)+(R(A.2O.E(\'5i\'))||0)+(R(A.2O.E(\'4F\'))||0)+(R(A.2O.E(\'5g\'))||0);z.8i=(R(A.2O.E(\'4x\'))||0)+(R(A.2O.E(\'5d\'))||0)+(R(A.2O.E(\'5b\'))||0)+(R(A.2O.E(\'4Q\'))||0)}z.2b=A.1U(A.12.3a(z.el.I(0)),A.12.2f(z.el.I(0)));z.3m=A.1U(A.12.3a(z.3v),A.12.2f(z.3v));z.2b.1D-=z.8s;z.2b.hb-=z.8i;z.3m.1D-=z.8s;z.3m.hb-=z.8i;z.29=o.1T;A.2O.E(\'V\',z.2b.1D+\'Q\').E(\'S\',z.2b.hb+\'Q\').E(\'O\',z.2b.y+\'Q\').E(\'M\',z.2b.x+\'Q\').4S({O:z.3m.y,M:z.3m.x,V:z.3m.1D,S:z.3m.hb},z.1H,C(){if(z.7e)A.2O.3S(z.7e);A.2O.E(\'11\',\'1k\');if(z.1T&&z.1T.1F==2w){z.1T.1x(z.el.I(0),[z.3v])}A.2z(z.el.I(0),\'1j\')})};A.1q={24:{2u:10,cf:\'1R/ff.ce\',cd:\'<3O 2E="1R/5o.cc" />\',cb:0.8,ca:\'fb 8G\',c9:\'6m\',3F:7n},fa:H,f8:H,5A:P,7m:H,7l:H,a3:C(a){if(!A.1q.7l||A.1q.7m)G;F b=a.6S||a.6R||-1;2X(b){19 35:if(A.1q.5A)A.1q.2b(P,A(\'a[@4o=\'+A.1q.5A+\']:f7\').I(0));1n;19 36:if(A.1q.5A)A.1q.2b(P,A(\'a[@4o=\'+A.1q.5A+\']:f6\').I(0));1n;19 37:19 8:19 33:19 80:19 f4:F c=A(\'#7j\');if(c.I(0).4q!=P){c.I(0).4q.1x(c.I(0))}1n;19 38:1n;19 39:19 34:19 32:19 fd:19 78:F d=A(\'#7h\');if(d.I(0).4q!=P){d.I(0).4q.1x(d.I(0))}1n;19 40:1n;19 27:A.1q.8q();1n}},6g:C(a){if(a)A.1U(A.1q.24,a);if(1P.3N){A(\'23\',1c).1C(\'5Q\',A.1q.a3)}L{A(1c).1C(\'5Q\',A.1q.a3)}A(\'a\').1y(C(){el=A(B);c5=el.1m(\'4o\')||\'\';c4=el.1m(\'2U\')||\'\';cg=/\\.cc|\\.f2|\\.7q|\\.ce|\\.f1/g;if(c4.5u().aD(cg)!=P&&c5.5u().3o(\'c2\')==0){el.1C(\'4U\',A.1q.2b)}});if(A.2R.46){3q=1c.3x(\'3q\');A(3q).1m({id:\'a1\',2E:\'dc:H;\',da:\'b0\',d7:\'b0\'}).E({11:\'1k\',T:\'1J\',O:\'0\',M:\'0\',4X:\'9x:9C.9E.a6(1E=0)\'});A(\'23\').1L(3q)}7r=1c.3x(\'1W\');A(7r).1m(\'id\',\'a0\').E({T:\'1J\',11:\'1k\',O:\'0\',M:\'0\',1E:0}).1L(1c.8b(\' \')).1C(\'4U\',A.1q.8q);5C=1c.3x(\'1W\');A(5C).1m(\'id\',\'c0\').E({4F:A.1q.24.2u+\'Q\'}).1L(1c.8b(\' \'));9Z=1c.3x(\'1W\');A(9Z).1m(\'id\',\'bY\').E({4F:A.1q.24.2u+\'Q\',4Q:A.1q.24.2u+\'Q\'}).1L(1c.8b(\' \'));9Y=1c.3x(\'a\');A(9Y).1m({id:\'f0\',2U:\'#\'}).E({T:\'1J\',2D:A.1q.24.2u+\'Q\',O:\'0\'}).1L(A.1q.24.cd).1C(\'4U\',A.1q.8q);6Z=1c.3x(\'1W\');A(6Z).1m(\'id\',\'9X\').E({T:\'2i\',9W:\'M\',5X:\'0 8x\',3j:1}).1L(5C).1L(9Z).1L(9Y);21=1c.3x(\'3O\');21.2E=A.1q.24.cf;A(21).1m(\'id\',\'bW\').E({T:\'1J\'});5G=1c.3x(\'a\');A(5G).1m({id:\'7j\',2U:\'#\'}).E({T:\'1J\',11:\'1k\',2N:\'2B\',cC:\'1k\'}).1L(1c.8b(\' \'));5F=1c.3x(\'a\');A(5F).1m({id:\'7h\',2U:\'#\'}).E({T:\'1J\',2N:\'2B\',cC:\'1k\'}).1L(1c.8b(\' \'));2q=1c.3x(\'1W\');A(2q).1m(\'id\',\'bT\').E({11:\'1k\',T:\'2i\',2N:\'2B\',9W:\'M\',5X:\'0 8x\',O:\'0\',M:\'0\',3j:2}).1L([21,5G,5F]);5Z=1c.3x(\'1W\');A(5Z).1m(\'id\',\'8m\').E({11:\'1k\',T:\'1J\',2N:\'2B\',O:\'0\',M:\'0\',9W:\'az\',6P:\'b7\',eY:\'0\'}).1L([2q,6Z]);A(\'23\').1L(7r).1L(5Z)},2b:C(e,a){el=a?A(a):A(B);8J=el.1m(\'4o\');F b,4E,5G,5F;if(8J!=\'c2\'){A.1q.5A=8J;7F=A(\'a[@4o=\'+8J+\']\');b=7F.1N();4E=7F.aY(a?a:B);5G=7F.I(4E-1);5F=7F.I(4E+1)}aw=el.1m(\'2U\');5C=el.1m(\'3T\');3R=A.12.5O();7r=A(\'#a0\');if(!A.1q.7l){A.1q.7l=14;if(A.2R.46){A(\'#a1\').E(\'S\',Z.3g(3R.ih,3R.h)+\'Q\').E(\'V\',Z.3g(3R.iw,3R.w)+\'Q\').1S()}7r.E(\'S\',Z.3g(3R.ih,3R.h)+\'Q\').E(\'V\',Z.3g(3R.iw,3R.w)+\'Q\').1S().bS(bz,A.1q.24.cb,C(){A.1q.aB(aw,5C,3R,b,4E,5G,5F)});A(\'#8m\').E(\'V\',Z.3g(3R.iw,3R.w)+\'Q\')}L{A(\'#7j\').I(0).4q=P;A(\'#7h\').I(0).4q=P;A.1q.aB(aw,5C,3R,b,4E,5G,5F)}G H},aB:C(a,b,c,d,e,f,g){A(\'#aA\').9U();8l=A(\'#7j\');8l.2x();8k=A(\'#7h\');8k.2x();21=A(\'#bW\');2q=A(\'#bT\');5Z=A(\'#8m\');6Z=A(\'#9X\').E(\'2W\',\'2B\');A(\'#c0\').3i(5C);A.1q.7m=14;if(d)A(\'#bY\').3i(A.1q.24.ca+\' \'+(e+1)+\' \'+A.1q.24.c9+\' \'+d);if(f){8l.I(0).4q=C(){B.4W();A.1q.2b(P,f);G H}}if(g){8k.I(0).4q=C(){B.4W();A.1q.2b(P,g);G H}}21.1S();7u=A.12.2f(2q.I(0));4C=Z.3g(7u.1D,21.I(0).V+A.1q.24.2u*2);59=Z.3g(7u.hb,21.I(0).S+A.1q.24.2u*2);21.E({M:(4C-21.I(0).V)/2+\'Q\',O:(59-21.I(0).S)/2+\'Q\'});2q.E({V:4C+\'Q\',S:59+\'Q\'}).1S();bQ=A.12.a5();5Z.E(\'O\',c.t+(bQ.h/15)+\'Q\');if(5Z.E(\'11\')==\'1k\'){5Z.1S().6U(A.1q.24.3F)}5H=W 8M;A(5H).1m(\'id\',\'aA\').1C(\'eP\',C(){4C=5H.V+A.1q.24.2u*2;59=5H.S+A.1q.24.2u*2;21.2x();2q.4S({S:59},7u.hb!=59?A.1q.24.3F:1,C(){2q.4S({V:4C},7u.1D!=4C?A.1q.24.3F:1,C(){2q.aJ(5H);A(5H).E({T:\'1J\',M:A.1q.24.2u+\'Q\',O:A.1q.24.2u+\'Q\'}).6U(A.1q.24.3F,C(){cL=A.12.2f(6Z.I(0));if(f){8l.E({M:A.1q.24.2u+\'Q\',O:A.1q.24.2u+\'Q\',V:4C/2-A.1q.24.2u*3+\'Q\',S:59-A.1q.24.2u*2+\'Q\'}).1S()}if(g){8k.E({M:4C/2+A.1q.24.2u*2+\'Q\',O:A.1q.24.2u+\'Q\',V:4C/2-A.1q.24.2u*3+\'Q\',S:59-A.1q.24.2u*2+\'Q\'}).1S()}6Z.E({V:4C+\'Q\',O:-cL.hb+\'Q\',2W:\'cl\'}).4S({O:-1},A.1q.24.3F,C(){A.1q.7m=H})})})})});5H.2E=a},8q:C(){A(\'#aA\').9U();A(\'#8m\').2x();A(\'#9X\').E(\'2W\',\'2B\');A(\'#a0\').bS(bz,0,C(){A(B).2x();if(A.2R.46){A(\'#a1\').2x()}});A(\'#7j\').I(0).4q=P;A(\'#7h\').I(0).4q=P;A.1q.5A=P;A.1q.7l=H;A.1q.7m=H;G H}};A.N={1v:P,3A:P,1g:P,1A:P,1o:P,T:P,7f:C(e){A.N.1g=(B.9T)?B.9T:B;A.N.1A=A.12.3W(e);A.N.1o={V:R(A(A.N.1g).E(\'V\'))||0,S:R(A(A.N.1g).E(\'S\'))||0};A.N.T={O:R(A(A.N.1g).E(\'O\'))||0,M:R(A(A.N.1g).E(\'M\'))||0};A(1c).1C(\'3t\',A.N.aO).1C(\'5n\',A.N.aN);if(28 A.N.1g.1h.bO===\'C\'){A.N.1g.1h.bO.1x(A.N.1g)}G H},aN:C(e){A(1c).3h(\'3t\',A.N.aO).3h(\'5n\',A.N.aN);if(28 A.N.1g.1h.cO===\'C\'){A.N.1g.1h.cO.1x(A.N.1g)}A.N.1g=P},aO:C(e){if(!A.N.1g){G}1A=A.12.3W(e);6c=A.N.T.O-A.N.1A.y+1A.y;77=A.N.T.M-A.N.1A.x+1A.x;6c=Z.3g(Z.3k(6c,A.N.1g.1h.7d-A.N.1o.S),A.N.1g.1h.6F);77=Z.3g(Z.3k(77,A.N.1g.1h.7c-A.N.1o.V),A.N.1g.1h.6u);if(28 A.N.1g.1h.4h===\'C\'){F a=A.N.1g.1h.4h.1x(A.N.1g,[77,6c]);if(28 a==\'eI\'&&a.1b==2){77=a[0];6c=a[1]}}A.N.1g.Y.O=6c+\'Q\';A.N.1g.Y.M=77+\'Q\';G H},2b:C(e){A(1c).1C(\'3t\',A.N.7g).1C(\'5n\',A.N.7w);A.N.1v=B.1v;A.N.3A=B.3A;A.N.1A=A.12.3W(e);A.N.1o={V:R(A(B.1v).E(\'V\'))||0,S:R(A(B.1v).E(\'S\'))||0};A.N.T={O:R(A(B.1v).E(\'O\'))||0,M:R(A(B.1v).E(\'M\'))||0};if(A.N.1v.1h.4c){A.N.1v.1h.4c.1x(A.N.1v,[B])}G H},7w:C(){A(1c).3h(\'3t\',A.N.7g).3h(\'5n\',A.N.7w);if(A.N.1v.1h.3C){A.N.1v.1h.3C.1x(A.N.1v,[A.N.3A])}A.N.1v=P;A.N.3A=P},5N:C(a,b){G Z.3k(Z.3g(A.N.1o.V+a*b,A.N.1v.1h.8O),A.N.1v.1h.5R)},5M:C(a,b){G Z.3k(Z.3g(A.N.1o.S+a*b,A.N.1v.1h.7x),A.N.1v.1h.7y)},bN:C(a){G Z.3k(Z.3g(a,A.N.1v.1h.7x),A.N.1v.1h.7y)},7g:C(e){if(A.N.1v==P){G}1A=A.12.3W(e);dx=1A.x-A.N.1A.x;dy=1A.y-A.N.1A.y;1B={V:A.N.1o.V,S:A.N.1o.S};2s={O:A.N.T.O,M:A.N.T.M};2X(A.N.3A){19\'e\':1B.V=A.N.5N(dx,1);1n;19\'eH\':1B.V=A.N.5N(dx,1);1B.S=A.N.5M(dy,1);1n;19\'w\':1B.V=A.N.5N(dx,-1);2s.M=A.N.T.M-1B.V+A.N.1o.V;1n;19\'9R\':1B.V=A.N.5N(dx,-1);2s.M=A.N.T.M-1B.V+A.N.1o.V;1B.S=A.N.5M(dy,1);1n;19\'7a\':1B.S=A.N.5M(dy,-1);2s.O=A.N.T.O-1B.S+A.N.1o.S;1B.V=A.N.5N(dx,-1);2s.M=A.N.T.M-1B.V+A.N.1o.V;1n;19\'n\':1B.S=A.N.5M(dy,-1);2s.O=A.N.T.O-1B.S+A.N.1o.S;1n;19\'9Q\':1B.S=A.N.5M(dy,-1);2s.O=A.N.T.O-1B.S+A.N.1o.S;1B.V=A.N.5N(dx,1);1n;19\'s\':1B.S=A.N.5M(dy,1);1n}if(A.N.1v.1h.44){if(A.N.3A==\'n\'||A.N.3A==\'s\')43=1B.S*A.N.1v.1h.44;L 43=1B.V;4z=A.N.bN(43*A.N.1v.1h.44);43=4z/A.N.1v.1h.44;2X(A.N.3A){19\'n\':19\'7a\':19\'9Q\':2s.O+=1B.S-4z;1n}2X(A.N.3A){19\'7a\':19\'w\':19\'9R\':2s.M+=1B.V-43;1n}1B.S=4z;1B.V=43}if(2s.O<A.N.1v.1h.6F){4z=1B.S+2s.O-A.N.1v.1h.6F;2s.O=A.N.1v.1h.6F;if(A.N.1v.1h.44){43=4z/A.N.1v.1h.44;2X(A.N.3A){19\'7a\':19\'w\':19\'9R\':2s.M+=1B.V-43;1n}1B.V=43}1B.S=4z}if(2s.M<A.N.1v.1h.6u){43=1B.V+2s.M-A.N.1v.1h.6u;2s.M=A.N.1v.1h.6u;if(A.N.1v.1h.44){4z=43*A.N.1v.1h.44;2X(A.N.3A){19\'n\':19\'7a\':19\'9Q\':2s.O+=1B.S-4z;1n}1B.S=4z}1B.V=43}if(2s.O+1B.S>A.N.1v.1h.7d){1B.S=A.N.1v.1h.7d-2s.O;if(A.N.1v.1h.44){1B.V=1B.S/A.N.1v.1h.44}}if(2s.M+1B.V>A.N.1v.1h.7c){1B.V=A.N.1v.1h.7c-2s.M;if(A.N.1v.1h.44){1B.S=1B.V*A.N.1v.1h.44}}F a=H;if(A.N.1v.1h.eG){a=A.N.1v.1h.eG.1x(A.N.1v,[1B,2s]);if(a){if(a.1o){A.1U(1B,a.1o)}if(a.T){A.1U(2s,a.T)}}}8f=A.N.1v.Y;8f.M=2s.M+\'Q\';8f.O=2s.O+\'Q\';8f.V=1B.V+\'Q\';8f.S=1B.S+\'Q\';G H},2l:C(b){if(!b||!b.3G||b.3G.1F!=6E){G}G B.1y(C(){F a=B;a.1h=b;a.1h.8O=b.8O||10;a.1h.7x=b.7x||10;a.1h.5R=b.5R||5P;a.1h.7y=b.7y||5P;a.1h.6F=b.6F||-8V;a.1h.6u=b.6u||-8V;a.1h.7c=b.7c||5P;a.1h.7d=b.7d||5P;bK=A(a).E(\'T\');if(!(bK==\'2i\'||bK==\'1J\')){a.Y.T=\'2i\'}eE=/n|9Q|e|eH|s|9R|w|7a/g;1V(i in a.1h.3G){if(i.5u().aD(eE)!=P){if(a.1h.3G[i].1F==8t){3c=A(a.1h.3G[i]);if(3c.1N()>0){a.1h.3G[i]=3c.I(0)}}if(a.1h.3G[i].4D){a.1h.3G[i].1v=a;a.1h.3G[i].3A=i;A(a.1h.3G[i]).1C(\'4R\',A.N.2b)}}}if(a.1h.5k){if(28 a.1h.5k===\'4B\'){9N=A(a.1h.5k);if(9N.1N()>0){9N.1y(C(){B.9T=a});9N.1C(\'4R\',A.N.7f)}}L if(a.1h.5k==14){A(B).1C(\'4R\',A.N.7f)}}})},4v:C(){G B.1y(C(){F a=B;1V(i in a.1h.3G){a.1h.3G[i].1v=P;a.1h.3G[i].3A=P;A(a.1h.3G[i]).3h(\'4R\',A.N.2b)}if(a.1h.5k){if(28 a.1h.5k===\'4B\'){3c=A(a.1h.5k);if(3c.1N()>0){3c.3h(\'4R\',A.N.7f)}}L if(a.1h.5k==14){A(B).3h(\'4R\',A.N.7f)}}a.1h=P})}};A.fn.1U({jk:A.N.2l,jj:A.N.4v});A.2t=P;A.6J=H;A.31=P;A.6B=[];A.9L=C(e){F a=e.6S||e.6R||-1;if(a==17||a==16){A.6J=14}};A.9J=C(e){A.6J=H};A.eB=C(e){B.f.1A=A.12.3W(e);B.f.1I=A.1U(A.12.3a(B),A.12.2f(B));B.f.4p=A.12.5O(B);B.f.1A.x-=B.f.1I.x;B.f.1A.y-=B.f.1I.y;A(B).1L(A.2t.I(0));if(B.f.hc)A.2t.2H(B.f.hc).E(\'11\',\'2v\');A.2t.E({11:\'2v\',V:\'2G\',S:\'2G\'});if(B.f.o){A.2t.E(\'1E\',B.f.o)}A.31=B;A.7A=H;A.6B=[];B.f.el.1y(C(){B.1I={x:B.7Y+(B.4u&&!A.2R.6l?R(B.4u.4y)||0:0)+(A.31.2P||0),y:B.7t+(B.4u&&!A.2R.6l?R(B.4u.4x)||0:0)+(A.31.2T||0),1D:B.3P,hb:B.5r};if(B.s==14){if(A.6J==H){B.s=H;A(B).3S(A.31.f.71)}L{A.7A=14;A.6B[A.6B.1b]=A.1m(B,\'id\')}}});A.9H.1x(B,[e]);A(1c).1C(\'3t\',A.9H).1C(\'5n\',A.bI);G H};A.9H=C(e){if(!A.31)G;A.eA.1x(A.31,[e])};A.eA=C(e){if(!A.31)G;F a=A.12.3W(e);F b=A.12.5O(A.31);a.x+=b.l-B.f.4p.l-B.f.1I.x;a.y+=b.t-B.f.4p.t-B.f.1I.y;F c=Z.3k(a.x,B.f.1A.x);F d=Z.3k(Z.3B(a.x-B.f.1A.x),Z.3B(B.f.4p.w-c));F f=Z.3k(a.y,B.f.1A.y);F g=Z.3k(Z.3B(a.y-B.f.1A.y),Z.3B(B.f.4p.h-f));if(B.2T>0&&a.y-20<B.2T){F h=Z.3k(b.t,10);f-=h;g+=h;B.2T-=h}L if(B.2T+B.f.1I.h<B.f.4p.h&&a.y+20>B.2T+B.f.1I.h){F h=Z.3k(B.f.4p.h-B.2T,10);B.2T+=h;if(B.2T!=b.t)g+=h}if(B.2P>0&&a.x-20<B.2P){F h=Z.3k(b.l,10);c-=h;d+=h;B.2P-=h}L if(B.2P+B.f.1I.w<B.f.4p.w&&a.x+20>B.2P+B.f.1I.w){F h=Z.3k(B.f.4p.w-B.2P,10);B.2P+=h;if(B.2P!=b.l)d+=h}A.2t.E({M:c+\'Q\',O:f+\'Q\',V:d+\'Q\',S:g+\'Q\'});A.2t.l=c+B.f.4p.l;A.2t.t=f+B.f.4p.t;A.2t.r=A.2t.l+d;A.2t.b=A.2t.t+g;A.7A=H;B.f.el.1y(C(){9G=A.6B.3o(A.1m(B,\'id\'));if(!(B.1I.x>A.2t.r||(B.1I.x+B.1I.1D)<A.2t.l||B.1I.y>A.2t.b||(B.1I.y+B.1I.hb)<A.2t.t)){A.7A=14;if(B.s!=14){B.s=14;A(B).2H(A.31.f.71)}if(9G!=-1){B.s=H;A(B).3S(A.31.f.71)}}L if((B.s==14)&&(9G==-1)){B.s=H;A(B).3S(A.31.f.71)}L if((!B.s)&&(A.6J==14)&&(9G!=-1)){B.s=14;A(B).2H(A.31.f.71)}});G H};A.bI=C(e){if(!A.31)G;A.ez.1x(A.31,[e])};A.ez=C(e){A(1c).3h(\'3t\',A.9H).3h(\'5n\',A.bI);if(!A.31)G;A.2t.E(\'11\',\'1k\');if(B.f.hc)A.2t.3S(B.f.hc);A.31=H;A(\'23\').1L(A.2t.I(0));if(A.7A==14){if(B.f.8d)B.f.8d(A.bF(A.1m(B,\'id\')))}L{if(B.f.8c)B.f.8c(A.bF(A.1m(B,\'id\')))}A.6B=[]};A.bF=C(s){F h=\'\';F o=[];if(a=A(\'#\'+s)){a.I(0).f.el.1y(C(){if(B.s==14){if(h.1b>0){h+=\'&\'}h+=s+\'[]=\'+A.1m(B,\'id\');o[o.1b]=A.1m(B,\'id\')}})}G{6A:h,o:o}};A.fn.jg=C(o){if(!A.2t){A(\'23\',1c).1L(\'<1W id="2t"></1W>\').1C(\'70\',A.9L).1C(\'5Q\',A.9J);A.2t=A(\'#2t\');A.2t.E({T:\'1J\',11:\'1k\'});if(1P.3N){A(\'23\',1c).1C(\'70\',A.9L).1C(\'5Q\',A.9J)}L{A(1c).1C(\'70\',A.9L).1C(\'5Q\',A.9J)}}if(!o){o={}}G B.1y(C(){if(B.ey)G;B.ey=14;B.f={a:o.3r,o:o.1E?2c(o.1E):H,71:o.ex?o.ex:H,hc:o.4G?o.4G:H,8d:o.8d?o.8d:H,8c:o.8c?o.8c:H};B.f.el=A(\'.\'+o.3r);A(B).1C(\'4R\',A.eB).E(\'T\',\'2i\')})};A.2Q={aT:1,ew:C(b){F b=b;G B.1y(C(){B.4g.69.1y(C(a){A.2Q.4s(B,b[a])})})},I:C(){F e=[];B.1y(C(b){if(B.bD){e[b]=[];F c=B;F d=A.12.2f(B);B.4g.69.1y(C(a){F x=B.7Y;F y=B.7t;7B=R(x*1Y/(d.w-B.3P));7C=R(y*1Y/(d.h-B.5r));e[b][a]=[7B||0,7C||0,x||0,y||0]})}});G e},ad:C(a){a.D.ep=a.D.1Z.w-a.D.1w.1D;a.D.eo=a.D.1Z.h-a.D.1w.hb;if(a.92.4g.bB){8Z=a.92.4g.69.I(a.bA+1);if(8Z){a.D.1Z.w=(R(A(8Z).E(\'M\'))||0)+a.D.1w.1D;a.D.1Z.h=(R(A(8Z).E(\'O\'))||0)+a.D.1w.hb}9f=a.92.4g.69.I(a.bA-1);if(9f){F b=R(A(9f).E(\'M\'))||0;F c=R(A(9f).E(\'M\'))||0;a.D.1Z.x+=b;a.D.1Z.y+=c;a.D.1Z.w-=b;a.D.1Z.h-=c}}a.D.ek=a.D.1Z.w-a.D.1w.1D;a.D.ej=a.D.1Z.h-a.D.1w.hb;if(a.D.2C){a.D.gx=((a.D.1Z.w-a.D.1w.1D)/a.D.2C)||1;a.D.gy=((a.D.1Z.h-a.D.1w.hb)/a.D.2C)||1;a.D.d1=a.D.ek/a.D.2C;a.D.d0=a.D.ej/a.D.2C}a.D.1Z.dx=a.D.1Z.x-a.D.22.x;a.D.1Z.dy=a.D.1Z.y-a.D.22.y;A.X.18.E(\'7z\',\'8T\')},3n:C(a,x,y){if(a.D.2C){d9=R(x/a.D.d1);7B=d9*1Y/a.D.2C;d5=R(y/a.D.d0);7C=d5*1Y/a.D.2C}L{7B=R(x*1Y/a.D.ep);7C=R(y*1Y/a.D.eo)}a.D.aa=[7B||0,7C||0,x||0,y||0];if(a.D.3n)a.D.3n.1x(a,a.D.aa)},d3:C(a){6K=a.6S||a.6R||-1;2X(6K){19 35:A.2Q.4s(B.3H,[91,91]);1n;19 36:A.2Q.4s(B.3H,[-91,-91]);1n;19 37:A.2Q.4s(B.3H,[-B.3H.D.gx||-1,0]);1n;19 38:A.2Q.4s(B.3H,[0,-B.3H.D.gy||-1]);1n;19 39:A.2Q.4s(B.3H,[B.3H.D.gx||1,0]);1n;19 40:A.X.4s(B.3H,[0,B.3H.D.gy||1]);1n}},4s:C(a,b){if(!a.D){G}a.D.1w=A.1U(A.12.3a(a),A.12.2f(a));a.D.22={x:R(A.E(a,\'M\'))||0,y:R(A.E(a,\'O\'))||0};a.D.49=A.E(a,\'T\');if(a.D.49!=\'2i\'&&a.D.49!=\'1J\'){a.Y.T=\'2i\'}A.X.ah(a);A.2Q.ad(a);dx=R(b[0])||0;dy=R(b[1])||0;2n=a.D.22.x+dx;2j=a.D.22.y+dy;if(a.D.2C){57=A.X.a9.1x(a,[2n,2j,dx,dy]);if(57.1F==6E){dx=57.dx;dy=57.dy}2n=a.D.22.x+dx;2j=a.D.22.y+dy}57=A.X.ae.1x(a,[2n,2j,dx,dy]);if(57&&57.1F==6E){dx=57.dx;dy=57.dy}2n=a.D.22.x+dx;2j=a.D.22.y+dy;if(a.D.4P&&(a.D.3n||a.D.2I)){A.2Q.3n(a,2n,2j)}2n=!a.D.2g||a.D.2g==\'3Z\'?2n:a.D.22.x||0;2j=!a.D.2g||a.D.2g==\'3K\'?2j:a.D.22.y||0;a.Y.M=2n+\'Q\';a.Y.O=2j+\'Q\'},2l:C(o){G B.1y(C(){if(B.bD==14||!o.3r||!A.12||!A.X||!A.1s){G}4Y=A(o.3r,B);if(4Y.1N()==0){G}F b={2e:\'7X\',4P:14,3n:o.3n&&o.3n.1F==2w?o.3n:P,2I:o.2I&&o.2I.1F==2w?o.2I:P,3c:B,1E:o.1E||H};if(o.2C&&R(o.2C)){b.2C=R(o.2C)||1;b.2C=b.2C>0?b.2C:1}if(4Y.1N()==1)4Y.6r(b);L{A(4Y.I(0)).6r(b);b.3c=P;4Y.6r(b)}4Y.70(A.2Q.d3);4Y.1m(\'aT\',A.2Q.aT++);B.bD=14;B.4g={};B.4g.ec=b.ec;B.4g.2C=b.2C;B.4g.69=4Y;B.4g.bB=o.bB?14:H;by=B;by.4g.69.1y(C(a){B.bA=a;B.92=by});if(o.5f&&o.5f.1F==6h){1V(i=o.5f.1b-1;i>=0;i--){if(o.5f[i].1F==6h&&o.5f[i].1b==2){el=B.4g.69.I(i);if(el.4D){A.2Q.4s(el,o.5f[i])}}}}})}};A.fn.1U({jc:A.2Q.2l,jb:A.2Q.ew,ja:A.2Q.I});A.2p={56:[],ea:C(){B.4W();1d=B.2S;id=A.1m(1d,\'id\');if(A.2p.56[id]!=P){1P.5h(A.2p.56[id])}1u=1d.J.3d+1;if(1d.J.1R.1b<1u){1u=1}1R=A(\'3O\',1d.J.4O);1d.J.3d=1u;if(1R.1N()>0){1R.6d(1d.J.3F,A.2p.7J)}},di:C(){B.4W();1d=B.2S;id=A.1m(1d,\'id\');if(A.2p.56[id]!=P){1P.5h(A.2p.56[id])}1u=1d.J.3d-1;1R=A(\'3O\',1d.J.4O);if(1u<1){1u=1d.J.1R.1b}1d.J.3d=1u;if(1R.1N()>0){1R.6d(1d.J.3F,A.2p.7J)}},2A:C(c){1d=1c.7o(c);if(1d.J.63){1u=1d.J.3d;6k(1u==1d.J.3d){1u=1+R(Z.63()*1d.J.1R.1b)}}L{1u=1d.J.3d+1;if(1d.J.1R.1b<1u){1u=1}}1R=A(\'3O\',1d.J.4O);1d.J.3d=1u;if(1R.1N()>0){1R.6d(1d.J.3F,A.2p.7J)}},go:C(o){F a;if(o&&o.1F==6E){if(o.21){a=1c.7o(o.21.1d);5v=1P.j8.2U.6W("#");o.21.5J=P;if(5v.1b==2){1u=R(5v[1]);1S=5v[1].48(1u,\'\');if(A.1m(a,\'id\')!=1S){1u=1}}L{1u=1}}if(o.84){o.84.4W();a=o.84.2S.2S;id=A.1m(a,\'id\');if(A.2p.56[id]!=P){1P.5h(A.2p.56[id])}5v=o.84.2U.6W("#");1u=R(5v[1]);1S=5v[1].48(1u,\'\');if(A.1m(a,\'id\')!=1S){1u=1}}if(a.J.1R.1b<1u||1u<1){1u=1}a.J.3d=1u;4t=A.12.2f(a);e4=A.12.9y(a);e3=A.12.6b(a);if(a.J.3e){a.J.3e.o.E(\'11\',\'1k\')}if(a.J.3b){a.J.3b.o.E(\'11\',\'1k\')}if(a.J.21){y=R(e4.t)+R(e3.t);if(a.J.1Q){if(a.J.1Q.4J==\'O\'){y+=a.J.1Q.45.hb}L{4t.h-=a.J.1Q.45.hb}}if(a.J.2o){if(a.J.2o&&a.J.2o.5V==\'O\'){y+=a.J.2o.45.hb}L{4t.h-=a.J.2o.45.hb}}if(!a.J.bu){a.J.e1=o.21?o.21.S:(R(a.J.21.E(\'S\'))||0);a.J.bu=o.21?o.21.V:(R(a.J.21.E(\'V\'))||0)}a.J.21.E(\'O\',y+(4t.h-a.J.e1)/2+\'Q\');a.J.21.E(\'M\',(4t.1D-a.J.bu)/2+\'Q\');a.J.21.E(\'11\',\'2v\')}1R=A(\'3O\',a.J.4O);if(1R.1N()>0){1R.6d(a.J.3F,A.2p.7J)}L{9w=A(\'a\',a.J.1Q.o).I(1u-1);A(9w).2H(a.J.1Q.5s);F b=W 8M();b.1d=A.1m(a,\'id\');b.1u=1u-1;b.2E=a.J.1R[a.J.3d-1].2E;if(b.1T){b.5J=P;A.2p.11.1x(b)}L{b.5J=A.2p.11}if(a.J.2o){a.J.2o.o.3i(a.J.1R[1u-1].5W)}}}},7J:C(){1d=B.2S.2S;1d.J.4O.E(\'11\',\'1k\');if(1d.J.1Q.5s){9w=A(\'a\',1d.J.1Q.o).3S(1d.J.1Q.5s).I(1d.J.3d-1);A(9w).2H(1d.J.1Q.5s)}F a=W 8M();a.1d=A.1m(1d,\'id\');a.1u=1d.J.3d-1;a.2E=1d.J.1R[1d.J.3d-1].2E;if(a.1T){a.5J=P;A.2p.11.1x(a)}L{a.5J=A.2p.11}if(1d.J.2o){1d.J.2o.o.3i(1d.J.1R[1d.J.3d-1].5W)}},11:C(){1d=1c.7o(B.1d);if(1d.J.3e){1d.J.3e.o.E(\'11\',\'1k\')}if(1d.J.3b){1d.J.3b.o.E(\'11\',\'1k\')}4t=A.12.2f(1d);y=0;if(1d.J.1Q){if(1d.J.1Q.4J==\'O\'){y+=1d.J.1Q.45.hb}L{4t.h-=1d.J.1Q.45.hb}}if(1d.J.2o){if(1d.J.2o&&1d.J.2o.5V==\'O\'){y+=1d.J.2o.45.hb}L{4t.h-=1d.J.2o.45.hb}}j4=A(\'.bt\',1d);y=y+(4t.h-B.S)/2;x=(4t.1D-B.V)/2;1d.J.4O.E(\'O\',y+\'Q\').E(\'M\',x+\'Q\').3i(\'<3O 2E="\'+B.2E+\'" />\');1d.J.4O.6U(1d.J.3F);3b=1d.J.3d+1;if(3b>1d.J.1R.1b){3b=1}3e=1d.J.3d-1;if(3e<1){3e=1d.J.1R.1b}1d.J.3b.o.E(\'11\',\'2v\').E(\'O\',y+\'Q\').E(\'M\',x+2*B.V/3+\'Q\').E(\'V\',B.V/3+\'Q\').E(\'S\',B.S+\'Q\').1m(\'3T\',1d.J.1R[3b-1].5W);1d.J.3b.o.I(0).2U=\'#\'+3b+A.1m(1d,\'id\');1d.J.3e.o.E(\'11\',\'2v\').E(\'O\',y+\'Q\').E(\'M\',x+\'Q\').E(\'V\',B.V/3+\'Q\').E(\'S\',B.S+\'Q\').1m(\'3T\',1d.J.1R[3e-1].5W);1d.J.3e.o.I(0).2U=\'#\'+3e+A.1m(1d,\'id\')},2l:C(o){if(!o||!o.2q||A.2p.56[o.2q])G;F a=A(\'#\'+o.2q);F c=a.I(0);if(c.Y.T!=\'1J\'&&c.Y.T!=\'2i\'){c.Y.T=\'2i\'}c.Y.2N=\'2B\';if(a.1N()==0)G;c.J={};c.J.1R=o.1R?o.1R:[];c.J.63=o.63&&o.63==14||H;7T=c.dj(\'j3\');1V(i=0;i<7T.1b;i++){6e=c.J.1R.1b;c.J.1R[6e]={2E:7T[i].2E,5W:7T[i].3T||7T[i].j2||\'\'}}if(c.J.1R.1b==0){G}c.J.49=A.1U(A.12.3a(c),A.12.2f(c));c.J.bp=A.12.9y(c);c.J.bo=A.12.6b(c);t=R(c.J.bp.t)+R(c.J.bo.t);b=R(c.J.bp.b)+R(c.J.bo.b);A(\'3O\',c).9U();c.J.3F=o.3F?o.3F:ch;if(o.4J||o.82||o.5s){c.J.1Q={};a.1L(\'<1W 68="dZ"></1W>\');c.J.1Q.o=A(\'.dZ\',c);if(o.82){c.J.1Q.82=o.82;c.J.1Q.o.2H(o.82)}if(o.5s){c.J.1Q.5s=o.5s}c.J.1Q.o.E(\'T\',\'1J\').E(\'V\',c.J.49.w+\'Q\');if(o.4J&&o.4J==\'O\'){c.J.1Q.4J=\'O\';c.J.1Q.o.E(\'O\',t+\'Q\')}L{c.J.1Q.4J=\'4e\';c.J.1Q.o.E(\'4e\',b+\'Q\')}c.J.1Q.9v=o.9v?o.9v:\' \';1V(F i=0;i<c.J.1R.1b;i++){6e=R(i)+1;c.J.1Q.o.1L(\'<a 2U="#\'+6e+o.2q+\'" 68="iY" 3T="\'+c.J.1R[i].5W+\'">\'+6e+\'</a>\'+(6e!=c.J.1R.1b?c.J.1Q.9v:\'\'))}A(\'a\',c.J.1Q.o).1C(\'4U\',C(){A.2p.go({84:B})});c.J.1Q.45=A.12.2f(c.J.1Q.o.I(0))}if(o.5V||o.81){c.J.2o={};a.1L(\'<1W 68="dW">&6G;</1W>\');c.J.2o.o=A(\'.dW\',c);if(o.81){c.J.2o.81=o.81;c.J.2o.o.2H(o.81)}c.J.2o.o.E(\'T\',\'1J\').E(\'V\',c.J.49.w+\'Q\');if(o.5V&&o.5V==\'O\'){c.J.2o.5V=\'O\';c.J.2o.o.E(\'O\',(c.J.1Q&&c.J.1Q.4J==\'O\'?c.J.1Q.45.hb+t:t)+\'Q\')}L{c.J.2o.5V=\'4e\';c.J.2o.o.E(\'4e\',(c.J.1Q&&c.J.1Q.4J==\'4e\'?c.J.1Q.45.hb+b:b)+\'Q\')}c.J.2o.45=A.12.2f(c.J.2o.o.I(0))}if(o.9j){c.J.3b={9j:o.9j};a.1L(\'<a 2U="#2\'+o.2q+\'" 68="dV">&6G;</a>\');c.J.3b.o=A(\'.dV\',c);c.J.3b.o.E(\'T\',\'1J\').E(\'11\',\'1k\').E(\'2N\',\'2B\').E(\'4a\',\'dU\').2H(c.J.3b.9j);c.J.3b.o.1C(\'4U\',A.2p.ea)}if(o.9t){c.J.3e={9t:o.9t};a.1L(\'<a 2U="#0\'+o.2q+\'" 68="dS">&6G;</a>\');c.J.3e.o=A(\'.dS\',c);c.J.3e.o.E(\'T\',\'1J\').E(\'11\',\'1k\').E(\'2N\',\'2B\').E(\'4a\',\'dU\').2H(c.J.3e.9t);c.J.3e.o.1C(\'4U\',A.2p.di)}a.aJ(\'<1W 68="bt"></1W>\');c.J.4O=A(\'.bt\',c);c.J.4O.E(\'T\',\'1J\').E(\'O\',\'2G\').E(\'M\',\'2G\').E(\'11\',\'1k\');if(o.21){a.aJ(\'<1W 68="dz" Y="11: 1k;"><3O 2E="\'+o.21+\'" /></1W>\');c.J.21=A(\'.dz\',c);c.J.21.E(\'T\',\'1J\');F d=W 8M();d.1d=o.2q;d.2E=o.21;if(d.1T){d.5J=P;A.2p.go({21:d})}L{d.5J=C(){A.2p.go({21:B})}}}L{A.2p.go({2q:c})}if(o.ba){dQ=R(o.ba)*8V}A.2p.56[o.2q]=o.ba?1P.5Y(\'A.2p.2A(\\\'\'+o.2q+\'\\\')\',dQ):P}};A.1d=A.2p.2l;A.1p={73:[],54:{},18:H,6X:P,2b:C(){if(A.X.1g==P){G}F a,3s,c,cs;A.1p.18.I(0).2Z=A.X.1g.D.5z;a=A.1p.18.I(0).Y;a.11=\'2v\';A.1p.18.1w=A.1U(A.12.3a(A.1p.18.I(0)),A.12.2f(A.1p.18.I(0)));a.V=A.X.1g.D.1w.1D+\'Q\';a.S=A.X.1g.D.1w.hb+\'Q\';3s=A.12.b2(A.X.1g);a.4M=3s.t;a.53=3s.r;a.4L=3s.b;a.4K=3s.l;if(A.X.1g.D.3L==14){c=A(A.X.1g).cA(14).I(0);cs=c.Y;cs.4M=\'2G\';cs.53=\'2G\';cs.4L=\'2G\';cs.4K=\'2G\';cs.11=\'2v\';A.1p.18.58().1L(c)}A(A.X.1g).dO(A.1p.18.I(0));A.X.1g.Y.11=\'1k\'},c7:C(e){if(!e.D.3I&&A.1s.4T.bC){if(e.D.3C)e.D.3C.1x(1g);A(e).E(\'T\',e.D.av||e.D.49);A(e).8j();A(A.1s.4T).dN(e)}A.1p.18.3S(e.D.5z).3i(\'&6G;\');A.1p.6X=P;F a=A.1p.18.I(0).Y;a.11=\'1k\';A.1p.18.dO(e);if(e.D.fx>0){A(e).6U(e.D.fx)}A(\'23\').1L(A.1p.18.I(0));F b=[];F c=H;1V(F i=0;i<A.1p.73.1b;i++){F d=A.1s.3p[A.1p.73[i]].I(0);F f=A.1m(d,\'id\');F g=A.1p.8g(f);if(d.1f.9P!=g.6A){d.1f.9P=g.6A;if(c==H&&d.1f.2I){c=d.1f.2I}g.id=f;b[b.1b]=g}}A.1p.73=[];if(c!=H&&b.1b>0){c(b)}},8n:C(e,o){if(!A.X.1g)G;F a=H;F i=0;if(e.1f.el.1N()>0){1V(i=e.1f.el.1N();i>0;i--){if(e.1f.el.I(i-1)!=A.X.1g){if(!e.5t.bb){if((e.1f.el.I(i-1).1I.y+e.1f.el.I(i-1).1I.hb/2)>A.X.1g.D.2j){a=e.1f.el.I(i-1)}L{1n}}L{if((e.1f.el.I(i-1).1I.x+e.1f.el.I(i-1).1I.1D/2)>A.X.1g.D.2n&&(e.1f.el.I(i-1).1I.y+e.1f.el.I(i-1).1I.hb/2)>A.X.1g.D.2j){a=e.1f.el.I(i-1)}}}}}if(a&&A.1p.6X!=a){A.1p.6X=a;A(a).iT(A.1p.18.I(0))}L if(!a&&(A.1p.6X!=P||A.1p.18.I(0).2S!=e)){A.1p.6X=P;A(e).1L(A.1p.18.I(0))}A.1p.18.I(0).Y.11=\'2v\'},bM:C(e){if(A.X.1g==P){G}e.1f.el.1y(C(){B.1I=A.1U(A.12.6w(B),A.12.6x(B))})},8g:C(s){F i;F h=\'\';F o={};if(s){if(A.1p.54[s]){o[s]=[];A(\'#\'+s+\' .\'+A.1p.54[s]).1y(C(){if(h.1b>0){h+=\'&\'}h+=s+\'[]=\'+A.1m(B,\'id\');o[s][o[s].1b]=A.1m(B,\'id\')})}L{1V(a in s){if(A.1p.54[s[a]]){o[s[a]]=[];A(\'#\'+s[a]+\' .\'+A.1p.54[s[a]]).1y(C(){if(h.1b>0){h+=\'&\'}h+=s[a]+\'[]=\'+A.1m(B,\'id\');o[s[a]][o[s[a]].1b]=A.1m(B,\'id\')})}}}}L{1V(i in A.1p.54){o[i]=[];A(\'#\'+i+\' .\'+A.1p.54[i]).1y(C(){if(h.1b>0){h+=\'&\'}h+=i+\'[]=\'+A.1m(B,\'id\');o[i][o[i].1b]=A.1m(B,\'id\')})}}G{6A:h,o:o}},dL:C(e){if(!e.ci){G}G B.1y(C(){if(!B.5t||!A(e).is(\'.\'+B.5t.3r))A(e).2H(B.5t.3r);A(e).6r(B.5t.D)})},4v:C(){G B.1y(C(){A(\'.\'+B.5t.3r).8j();A(B).ei();B.5t=P;B.dK=P})},2l:C(o){if(o.3r&&A.12&&A.X&&A.1s){if(!A.1p.18){A(\'23\',1c).1L(\'<1W id="dJ">&6G;</1W>\');A.1p.18=A(\'#dJ\');A.1p.18.I(0).Y.11=\'1k\'}B.ee({3r:o.3r,9F:o.9F?o.9F:H,8X:o.8X?o.8X:H,4G:o.4G?o.4G:H,76:o.76||o.ev,6C:o.6C||o.er,bC:14,2I:o.2I||o.iR,fx:o.fx?o.fx:H,3L:o.3L?14:H,5T:o.5T?o.5T:\'9S\'});G B.1y(C(){F a={5B:o.5B?14:H,dI:5P,1E:o.1E?2c(o.1E):H,5z:o.4G?o.4G:H,fx:o.fx?o.fx:H,3I:14,3L:o.3L?14:H,3c:o.3c?o.3c:P,2e:o.2e?o.2e:P,4c:o.4c&&o.4c.1F==2w?o.4c:H,4h:o.4h&&o.4h.1F==2w?o.4h:H,3C:o.3C&&o.3C.1F==2w?o.3C:H,2g:/3K|3Z/.3M(o.2g)?o.2g:H,5D:o.5D?R(o.5D)||0:H,2M:o.2M?o.2M:H};A(\'.\'+o.3r,B).6r(a);B.dK=14;B.5t={3r:o.3r,5B:o.5B?14:H,dI:5P,1E:o.1E?2c(o.1E):H,5z:o.4G?o.4G:H,fx:o.fx?o.fx:H,3I:14,3L:o.3L?14:H,3c:o.3c?o.3c:P,2e:o.2e?o.2e:P,bb:o.bb?14:H,D:a}})}}};A.fn.1U({iP:A.1p.2l,dN:A.1p.dL,iO:A.1p.4v});A.iN=A.1p.8g;A.2k={62:P,9o:H,9p:P,6a:C(e){A.2k.9o=14;A.2k.1S(e,B,14)},bk:C(e){if(A.2k.62!=B)G;A.2k.9o=H;A.2k.2x(e,B)},1S:C(e,a,b){if(A.2k.62!=P)G;if(!a){a=B}A.2k.62=a;1I=A.1U(A.12.3a(a),A.12.2f(a));7U=A(a);3T=7U.1m(\'3T\');2U=7U.1m(\'2U\');if(3T){A.2k.9p=3T;7U.1m(\'3T\',\'\');A(\'#dE\').3i(3T);if(2U)A(\'#bj\').3i(2U.48(\'iI://\',\'\'));L A(\'#bj\').3i(\'\');18=A(\'#7S\');if(a.4m.2Z){18.I(0).2Z=a.4m.2Z}L{18.I(0).2Z=\'\'}bi=A.12.2f(18.I(0));dD=b&&a.4m.T==\'bn\'?\'4e\':a.4m.T;2X(dD){19\'O\':2j=1I.y-bi.hb;2n=1I.x;1n;19\'M\':2j=1I.y;2n=1I.x-bi.1D;1n;19\'2D\':2j=1I.y;2n=1I.x+1I.1D;1n;19\'bn\':A(\'23\').1C(\'3t\',A.2k.3t);1A=A.12.3W(e);2j=1A.y+15;2n=1A.x+15;1n;8T:2j=1I.y+1I.hb;2n=1I.x;1n}18.E({O:2j+\'Q\',M:2n+\'Q\'});if(a.4m.4w==H){18.1S()}L{18.6U(a.4m.4w)}if(a.4m.2K)a.4m.2K.1x(a);7U.1C(\'86\',A.2k.2x).1C(\'4W\',A.2k.bk)}},3t:C(e){if(A.2k.62==P){A(\'23\').3h(\'3t\',A.2k.3t);G}1A=A.12.3W(e);A(\'#7S\').E({O:1A.y+15+\'Q\',M:1A.x+15+\'Q\'})},2x:C(e,a){if(!a){a=B}if(A.2k.9o!=14&&A.2k.62==a){A.2k.62=P;A(\'#7S\').6d(1);A(a).1m(\'3T\',A.2k.9p).3h(\'86\',A.2k.2x).3h(\'4W\',A.2k.bk);if(a.4m.2V)a.4m.2V.1x(a);A.2k.9p=P}},2l:C(b){if(!A.2k.18){A(\'23\').1L(\'<1W id="7S"><1W id="dE"></1W><1W id="bj"></1W></1W>\');A(\'#7S\').E({T:\'1J\',3j:5P,11:\'1k\'});A.2k.18=14}G B.1y(C(){if(A.1m(B,\'3T\')){B.4m={T:/O|4e|M|2D|bn/.3M(b.T)?b.T:\'4e\',2Z:b.2Z?b.2Z:H,4w:b.4w?b.4w:H,2K:b.2K&&b.2K.1F==2w?b.2K:H,2V:b.2V&&b.2V.1F==2w?b.2V:H};F a=A(B);a.1C(\'9r\',A.2k.1S);a.1C(\'6a\',A.2k.6a)}})}};A.fn.iH=A.2k.2l;A.7O={bl:C(e){6K=e.6S||e.6R||-1;if(6K==9){if(1P.3N){1P.3N.b6=14;1P.3N.b5=H}L{e.9b();e.99()}if(B.9q){1c.64.dv().3D="\\t";B.dB=C(){B.6a();B.dB=P}}L if(B.9m){2b=B.88;3m=B.dA;B.2m=B.2m.iG(0,2b)+"\\t"+B.2m.iF(3m);B.9m(2b+1,2b+1);B.6a()}G H}},4v:C(){G B.1y(C(){if(B.6V&&B.6V==14){A(B).3h(\'70\',A.7O.bl);B.6V=H}})},2l:C(){G B.1y(C(){if(B.4D==\'bs\'&&(!B.6V||B.6V==H)){A(B).1C(\'70\',A.7O.bl);B.6V=14}})}};A.fn.1U({iD:A.7O.2l,iC:A.7O.4v});A.12={3a:C(e){F x=0;F y=0;F a=e.Y;F b=H;if(A(e).E(\'11\')==\'1k\'){F c=a.2W;F d=a.T;b=14;a.2W=\'2B\';a.11=\'2v\';a.T=\'1J\'}F f=e;6k(f){x+=f.7Y+(f.4u&&!A.2R.6l?R(f.4u.4y)||0:0);y+=f.7t+(f.4u&&!A.2R.6l?R(f.4u.4x)||0:0);f=f.dY}f=e;6k(f&&f.4D&&f.4D.5u()!=\'23\'){x-=f.2P||0;y-=f.2T||0;f=f.2S}if(b==14){a.11=\'1k\';a.T=d;a.2W=c}G{x:x,y:y}},6x:C(a){F x=0,y=0;6k(a){x+=a.7Y||0;y+=a.7t||0;a=a.dY}G{x:x,y:y}},2f:C(e){F w=A.E(e,\'V\');F h=A.E(e,\'S\');F a=0;F b=0;F c=e.Y;if(A(e).E(\'11\')!=\'1k\'){a=e.3P;b=e.5r}L{F d=c.2W;F f=c.T;c.2W=\'2B\';c.11=\'2v\';c.T=\'1J\';a=e.3P;b=e.5r;c.11=\'1k\';c.T=f;c.2W=d}G{w:w,h:h,1D:a,hb:b}},6w:C(a){G{1D:a.3P||0,hb:a.5r||0}},a5:C(e){F h,w,de;if(e){w=e.83;h=e.7P}L{de=1c.4A;w=1P.bg||9z.bg||(de&&de.83)||1c.23.83;h=1P.bf||9z.bf||(de&&de.7P)||1c.23.7P}G{w:w,h:h}},5O:C(e){F t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.98.5u()!=\'23\'){t=e.2T;l=e.2P;w=e.be;h=e.bd;iw=0;ih=0}L{if(1c.4A){t=1c.4A.2T;l=1c.4A.2P;w=1c.4A.be;h=1c.4A.bd}L if(1c.23){t=1c.23.2T;l=1c.23.2P;w=1c.23.be;h=1c.23.bd}iw=9z.bg||1c.4A.83||1c.23.83||0;ih=9z.bf||1c.4A.7P||1c.23.7P||0}G{t:t,l:l,w:w,h:h,iw:iw,ih:ih}},b2:C(e,a){F c=A(e);F t=c.E(\'4M\')||\'\';F r=c.E(\'53\')||\'\';F b=c.E(\'4L\')||\'\';F l=c.E(\'4K\')||\'\';if(a)G{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)};L G{t:t,r:r,b:b,l:l}},9y:C(e,a){F c=A(e);F t=c.E(\'5b\')||\'\';F r=c.E(\'5g\')||\'\';F b=c.E(\'4Q\')||\'\';F l=c.E(\'4F\')||\'\';if(a)G{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)};L G{t:t,r:r,b:b,l:l}},6b:C(e,a){F c=A(e);F t=c.E(\'4x\')||\'\';F r=c.E(\'5i\')||\'\';F b=c.E(\'5d\')||\'\';F l=c.E(\'4y\')||\'\';if(a)G{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)||0};L G{t:t,r:r,b:b,l:l}},3W:C(a){F x=a.iB||(a.iz+(1c.4A.2P||1c.23.2P))||0;F y=a.iy||(a.ix+(1c.4A.2T||1c.23.2T))||0;G{x:x,y:y}},bH:C(a,b){b(a);a=a.6M;6k(a){A.12.bH(a,b);a=a.iv}},ji:C(c){A.12.bH(c,C(a){1V(F b in a){if(28 a[b]===\'C\'){a[b]=P}}})},ir:C(a,b){F c=A.12.5O();F d=A.12.2f(a);if(!b||b==\'3K\')A(a).E({O:c.t+((Z.3g(c.h,c.ih)-c.t-d.hb)/2)+\'Q\'});if(!b||b==\'3Z\')A(a).E({M:c.l+((Z.3g(c.w,c.iw)-c.l-d.1D)/2)+\'Q\'})},iq:C(a,b){F c=A(\'3O[@2E*="7q"]\',a||1c),7q;c.1y(C(){7q=B.2E;B.2E=b;B.Y.4X="9x:9C.9E.ip(2E=\'"+7q+"\')"})}};[].3o||(6h.jn.3o=C(v,n){n=(n==P)?0:n;F m=B.1b;1V(F i=n;i<m;i++)if(B[i]==v)G i;G-1});',62,1202,'||||||||||||||||||||||||||||||||||||jQuery|this|function|dragCfg|css|var|return|false|get|ss|iAuto|else|left|iResize|top|null|px|parseInt|height|position|oldStyle|width|new|iDrag|style|Math||display|iUtil||true||||helper|case|autoCFG|length|document|slideshow|easing|dropCfg|dragged|resizeOptions|carouselCfg|interfaceFX|none|speed|attr|break|sizes|iSort|ImageBox|queue|iDrop|iAutoscroller|slide|resizeElement|oC|apply|each|fisheyeCfg|pointer|newSizes|bind|wb|opacity|constructor|custom|duration|pos|absolute|type|append|items|size|255|window|slideslinks|images|show|complete|extend|for|div|elsToScroll|100|cont||loader|oR|body|options||oldP||typeof|callback|accordionCfg|start|parseFloat||containment|getSize|axis|selectedItem|relative|ny|iTooltip|build|value|nx|slideCaption|islideshow|container|subject|newPosition|selectHelper|border|block|Function|hide|itemWidth|dequeue|timer|hidden|fractions|right|src|PI|0px|addClass|onChange|parentData|onShow|result|cursorAt|overflow|transferHelper|scrollLeft|iSlider|browser|parentNode|scrollTop|href|onHide|visibility|switch|wrapper|className|pre|selectdrug|||||||||getPosition|nextslide|handle|currentslide|prevslide|step|max|unbind|html|zIndex|min|iExpander|end|onSlide|indexOf|zones|iframe|accept|margins|mousemove|canvas|to|item|createElement|multipleSeparator|highlighted|resizeDirection|abs|onStop|text|toggle|fadeDuration|handlers|dragElem|so|distance|vertically|ghosting|test|event|img|offsetWidth|startLeft|pageSize|removeClass|title|out|startTop|getPointer|lastSuggestion|DropOutDirectiont|horizontally||down||nWidth|ratio|dimm|msie||replace|oP|fontSize|lastValue|onStart|currentPointer|bottom|ifxFirstDisplay|slideCfg|onDrag|clear|context|elToScroll|up|tooltipCFG|fxCheckTag|rel|scr|onclick|endLeft|dragmoveBy|slidePos|currentStyle|destroy|delay|borderTopWidth|borderLeftWidth|nHeight|documentElement|string|containerW|tagName|iteration|paddingLeft|helperclass|endTop|halign|linksPosition|marginLeft|marginBottom|marginTop|OpenClose|holder|si|paddingBottom|mousedown|animate|overzone|click|onDragModifier|blur|filter|toDrag|getAttribute||cos|cnt|marginRight|collected||slideshows|newCoords|empty|containerH|elementData|paddingTop|puff|borderBottomWidth|animationHandler|values|paddingRight|clearInterval|borderRightWidth|pow|dragHandle|BlindDirection|post|mouseup|close|onSelect|fxh|offsetHeight|activeLinkClass|sortCfg|toLowerCase|url|currentPanel|point|grid|hpc|currentRel|revert|captionText|snapDistance|Scale|nextImage|prevImage|imageEl|orig|onload|iFisheye|parseColor|getHeight|getWidth|getScroll|3000|keyup|maxWidth|curCSS|tolerance|reflections|captionPosition|caption|margin|setInterval|outerContainer||itemHeight|current|random|selection|limit|Expander|128|class|sliders|focus|getBorder|newTop|fadeOut|indic|user|init|Array|frameClass|ActiveXObject|while|opera|from|open|oD|Date|proximity|Draggable|0x|F0|minLeft|rgb|getSizeLite|getPositionLite|getTime|positionItems|hash|selectCurrent|onOut|onClick|Object|minTop|nbsp|onHighlight|np|selectKeyHelper|pressedKey|accordionPos|firstChild|139|scrollIntoView|backgroundColor|oldStyleAttr|keyCode|charCode|direction|fadeIn|hasTabsEnabled|split|inFrontOf|radiusY|captionEl|keydown|sc|selectClass|changed|times||onHover|newLeft||efx|nw|li|maxRight|maxBottom|classname|startDrag|move|ImageBoxNextImage|nRx|ImageBoxPrevImage|nRy|opened|animationInProgress|400|getElementById|count|png|overlay|alpha|offsetTop|containerSize|cssSides|stop|minHeight|maxHeight|cursor|selectedone|xproc|yproc|bounceout|padding|gallery|increment|namedColors|applyOn|showImage|reflectionSize|sin|object|directionIncrement|iTTabs|clientHeight|select|activeClass|tooltipHelper|imgs|jEl|insideParent|content|parent|offsetLeft|parentBorders||captionClass|linksClass|clientWidth|link||mouseout|fontWeight|selectionStart|expand|panels|createTextNode|onselectstop|onselect|hight|elS|serialize|dir|diffHeight|DraggableDestroy|nextImageEl|prevImageEl|ImageBoxOuterContainer|checkhover|blind|iCarousel|hideImage|hidehelper|diffWidth|String|sl|st|prot|auto|diffY|diffX|headers|rule|getFieldValues|styleSheets|borderColor|positionContainer|image|getValues|dragstop|linkRel|itemsText|isDraggable|Image|minchars|minWidth|panelSelector|exec|192|isDroppable|default|211|1000|5625|hoverclass|headerSelector|next|ul|2000|SliderContainer|protectRotation|childs|oldVisibility|source|setTimeout|nodeName|stopPropagation|startTime|preventDefault|hoverClass|cssText|1px|prev|unfold|DoFold|unit|nextslideClass|multiple|itemMinWidth|setSelectionRange|destroyWrapper|focused|oldTitle|createTextRange|mouseover|inCache|prevslideClass|buildWrapper|linksSeparator|lnk|progid|getPadding|self|ScrollTo|9999|DXImageTransform|helperClass|Microsoft|activeclass|iIndex|selectcheck|onDrop|selectKeyUp|autofill|selectKeyDown|panelHeight|handleEl|onActivate|os|ne|sw|intersect|dragEl|remove|data|textAlign|ImageBoxCaption|closeEl|captionImages|ImageBoxOverlay|ImageBoxIframe|clearTimeout|keyPressed|fade|getClient|Alpha|shake|Shake|snapToGrid|lastSi|scroll||modifyContainer|fitToContainer|currentValue|zoom|getContainment|firstStep|paddingLeftSize|paddingBottomSize|paddingRightSize|paddingTopSize|borderLeftSize|borderBottomSize|borderRightSize|borderTopSize|autoSize|shrink|pulse|Pulsate|initialPosition|imageSrc|parseStyle|sliderPos|center|ImageBoxCurrentImage|loadImage|parentPos|match|dragmove|stopAnim|pause|Color|unselectable|prepend|borderWidth|cssSidesEnd|draginit|stopDrag|moveDrag|asin|bouncein|paddingY|paddingX|tabindex|writeItems|INPUT|10000|169|index|sliderSize|no|linear|getMargins|spacer|rotationSpeed|returnValue|cancelBubble|transparent|angle|autocomplete|autoplay|floats|extraWidth|scrollHeight|scrollWidth|innerHeight|innerWidth|character|helperSize|tooltipURL|hidefocused|doTab|Number|mouse|oBor|oPad|entities||TEXTAREA|slideshowHolder|loaderWidth|inputWidth|RegExp|letterSpacing|sliderEl|300|SliderIteration|restricted|sortable|isSlider|bounce|Selectserialize|idsa|traverseDOM|selectstop|elm|elPosition|restore|measure|getHeightMinMax|onDragStart|fit|clientSize|field|fadeTo|ImageBoxContainer|on|listStyle|ImageBoxLoader|dragHelper|ImageBoxCaptionImages|getContext|ImageBoxCaptionText|update|imagebox|BlindUp|hrefAttr|relAttr|SlideOutUp|check|checkdrop|textImageFrom|textImage|overlayOpacity|jpg|closeHTML|gif|loaderSRC|imageTypes|500|childNodes|itransferTo|highlight|visible|horizontal|vertical|parts|paddingLeftUnit|paddingBottomUnit|paddingRightUnit||paddingTopUnit|borderLeftUnit|borderBottomUnit|borderRightUnit|borderTopUnit|fontUnit|grow|clone|sqrt|textDecoration|dragstart|trim|isFunction|valign|userSelect|fxe|KhtmlUserSelect|Width|captionSize|dhe|colorCssProps|onDragStop|iAccordion|cssProps|doScroll|144|224|230|keypress|off|150|140|107|fracH|fracW|easeout|dragmoveByKey|autocompleteHelper|yfrac|165|scrolling|radiusX|xfrac|frameborder|245|javascript|240||autocompleteIframe|999|protect|goprev|getElementsByTagName|styleFloat||parte|insertBefore|itemZIndex|interfaceColorFX|fold|mousex|leftUnit|topUnit|fakeAccordionClass|createRange|getSelectionStart|||slideshowLoader|selectionEnd|onblur|moveStart|filteredPosition|tooltipTitle|togglehor|togglever|inputValue|zindex|sortHelper|isSortable|addItem|checkCache|SortableAddItem|after|BlindDown|time|SlideInUp|slideshowPrevslide|elType|30px|slideshowNextSlide|slideshowCaption|expanderHelper|offsetParent|slideshowLinks|boxModel|loaderHeight||slideBor|slidePad|htmlEntities|wordSpacing|fontVariant|fontStretch|fontStyle|gonext|fontFamily|onslide|clickItem|Droppable||rgba||DroppableDestroy|maxy|maxx|||hoverItem|containerMaxy|containerMaxx||onout|addColorStop||iBounce|onhover|set|selectedclass|isSelectable|selectstopApply|selectcheckApply|selectstart|shc|360|directions|remeasure|onResize|se|array|scale|success|param|translate|POST|number|load|ajax|save|name|khtml|moz|find|ondragstart|onselectstart|lineHeigt|mozUserSelect|ImageBoxClose|bmp|jpeg|finishx|112|starty|first|last|firstResize|startx|imageLoaded|Showing|finishOpacity|110|Accordion|loading|TransferTo|SlideToggleRight|SlideOutRight|SlideInRight|SlideToggleLeft|SlideOutLeft|SlideInLeft||SlideToggleDown|SlideOutDown|SlideInDown|SlideToggleUp|scrollTo|ScrollToAnchors|flipv|pt|Puff||Shrink|Fisheye||Grow|OpenHorizontally|OpenVertically|SwitchVertically|SwitchHorizontally|CloseHorizontally|CloseVertically|toUpperCase|100000000|selectorText|rules|cssRules|borderStyle|outset|inset|ridge|resize|groove|double|solid|dashed|dotted|isNaN|fromHandler|stopAll|MozUserSelect|Left|Bottom|Right|Top|outlineColor|color|borderTopColor|borderRightColor|borderLeftColor|borderBottomColor|textIndent|outlineWidth|elasticboth|outlineOffset|wh|elasticout|lineHeight|yellow|white|silver|red|purple|203||pink|orange|olive|navy||maroon|magenta|lime|||elasticin|lightyellow|193|182|lightpink|bounceboth|lightgrey|238|lightgreen|lightcyan|Autocomplete|216|173|200|984375|lightblue|khaki|130|625|indigo|green|215|9375|gold|fuchsia|148|darkviolet|122|233|darksalmon|darkred|204|153|darkorchid|darkorange|30002|list|darkolivegreen|||darkmagenta|183|189|darkkhaki|easeboth|darkgreen|30001|darkgrey|darkcyan|darkblue|cyan|easein|brown|blue||black|hover|220|beige|azure|aqua|appendChild|cssFloat|fxWrapper|ol|table|fix|form|button|nodeValue|textarea|input|w_|float|Carousel|removeChild|meta|optgroup|option|frameset|frame|script|header|th|colgroup|col|tfoot|thead|tbody|td|tr|Highlight|FoldToggle|UnFold|Fold|DropToggleRight|DropInRight|DropOutRight|DropToggleLeft|DropInLeft|DropOutLeft|DropToggleUp||DropInUp||DropOutUp||DropToggleDown|100000|DropInDown|duplicate|DropOutDown||120|AlphaImageLoader|fixPNG|centerEl||rotationTimer|maxRotation|nextSibling||clientY|pageY|clientX|Bounce|pageX|DisableTabs|EnableTabs|moveEnd|substr|substring|ToolTip|http|collapse|BlindToggleHorizontally|BlindRight|BlindLeft|SortSerialize|SortableDestroy|Sortable|BlindToggleVertically|onchange|fillRect|before|Autoexpand|fill|password|WebKit|slideshowLink|quot|lt|amp|alt|IMG|par|appVersion|pW|navigator|location|fillStyle|SliderGetValues|SliderSetValues|Slider|recallDroppables|ondrop|createLinearGradient|Selectable|destination|purgeEvents|ResizableDestroy|Resizable|globalCompositeOperation|drawImage|prototype'.split('|'),0,{}))
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/jquery.js DELETED
@@ -1,11 +0,0 @@
1
- /*
2
- * jQuery 1.2.2 - New Wave Javascript
3
- *
4
- * Copyright (c) 2007 John Resig (jquery.com)
5
- * Dual licensed under the MIT (MIT-LICENSE.txt)
6
- * and GPL (GPL-LICENSE.txt) licenses.
7
- *
8
- * $Date: 2008-01-14 17:56:07 -0500 (Mon, 14 Jan 2008) $
9
- * $Rev: 4454 $
10
- */
11
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.19)L w=1e.19;L E=1e.19=J(a,b){K 1D E.2m.4Y(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1i=E.2m={4Y:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1v d=="25"){L c=u.39(d);7(c&&(c[1]||!b)){7(c[1])d=E.5c([c[1]],b);N{L a=T.5N(c[3]);7(a)7(a.2s!=c[3])K E().2r(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1D E(b).2r(d)}N 7(E.1q(d))K 1D E(T)[E.1i.21?"21":"43"](d);K 6.6G(d.1n==1N&&d||(d.5j||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2H(d)||[d])},5j:"1.2.2",82:J(){K 6.M},M:0,22:J(a){K a==10?E.2H(6):6[a]},2E:J(b){L a=E(b);a.56=6;K a},6G:J(a){6.M=0;1N.2m.1h.1j(6,a);K 6},V:J(a,b){K E.V(6,a,b)},5E:J(b){L a=-1;6.V(J(i){7(6==b)a=i});K a},1K:J(c,a,b){L d=c;7(c.1n==4d)7(a==10)K 6.M&&E[b||"1K"](6[0],c)||10;N{d={};d[c]=a}K 6.V(J(i){P(c 1r d)E.1K(b?6.Y:6,c,E.1l(6,d[c],b,i,c))})},1m:J(b,a){7((b==\'29\'||b==\'1P\')&&2M(a)<0)a=10;K 6.1K(b,a,"2q")},1t:J(b){7(1v b!="4D"&&b!=W)K 6.4B().3t((6[0]&&6[0].2u||T).5v(b));L a="";E.V(b||6,J(){E.V(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6M:E.1i.1t([6])})});K a},5r:J(b){7(6[0])E(b,6[0].2u).5J().3n(6[0]).2a(J(){L a=6;2e(a.1B)a=a.1B;K a}).3t(6);K 6},8t:J(a){K 6.V(J(){E(6).6C().5r(a)})},8m:J(a){K 6.V(J(){E(6).5r(a)})},3t:J(){K 6.3P(1a,R,S,J(a){7(6.15==1)6.3k(a)})},6s:J(){K 6.3P(1a,R,R,J(a){7(6.15==1)6.3n(a,6.1B)})},6o:J(){K 6.3P(1a,S,S,J(a){6.1b.3n(a,6)})},5a:J(){K 6.3P(1a,S,R,J(a){6.1b.3n(a,6.2J)})},3h:J(){K 6.56||E([])},2r:J(b){L c=E.2a(6,J(a){K E.2r(b,a)});K 6.2E(/[^+>] [^+>]/.17(b)||b.1g("..")>-1?E.57(c):c)},5J:J(e){L f=6.2a(J(){7(E.14.1d&&!E.3W(6)){L a=6.6c(R),5u=T.2R("1u"),4T=T.2R("1u");5u.3k(a);4T.38=5u.38;K 4T.1B}N K 6.6c(R)});L d=f.2r("*").4R().V(J(){7(6[F]!=10)6[F]=W});7(e===R)6.2r("*").4R().V(J(i){7(6.15==3)K;L c=E.Q(6,"2N");P(L a 1r c)P(L b 1r c[a])E.16.1c(d[i],a,c[a][b],c[a][b].Q)});K f},1F:J(b){K 6.2E(E.1q(b)&&E.3x(6,J(a,i){K b.1O(a,i)})||E.3d(b,6))},4I:J(b){7(b.1n==4d)7(G.17(b))K 6.2E(E.3d(b,6,R));N b=E.3d(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1F(J(){K a?E.35(6,b)<0:6!=b})},1c:J(a){K!a?6:6.2E(E.34(6.22(),a.1n==4d?E(a).22():a.M!=10&&(!a.12||E.12(a,"3i"))?a:[a]))},3K:J(a){K a?E.3d(a,6).M>0:S},7g:J(a){K 6.3K("."+a)},5P:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2y")){L e=c.44,5L=[],11=c.11,30=c.U=="2y-30";7(e<0)K W;P(L i=30?e:0,2b=30?e+1:11.M;i<2b;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9s.1C.9o?d.1t:d.1C;7(30)K b;5L.1h(b)}}K 5L}N K(6[0].1C||"").1p(/\\r/g,"")}K 10}K 6.V(J(){7(6.15!=1)K;7(b.1n==1N&&/5w|5y/.17(6.U))6.3o=(E.35(6.1C,b)>=0||E.35(6.37,b)>=0);N 7(E.12(6,"2y")){L a=b.1n==1N?b:[b];E("90",6).V(J(){6.2p=(E.35(6.1C,a)>=0||E.35(6.1t,a)>=0)});7(!a.M)6.44=-1}N 6.1C=b})},3q:J(a){K a==10?(6.M?6[0].38:W):6.4B().3t(a)},6P:J(a){K 6.5a(a).1Y()},6N:J(i){K 6.2V(i,i+1)},2V:J(){K 6.2E(1N.2m.2V.1j(6,1a))},2a:J(b){K 6.2E(E.2a(6,J(a,i){K b.1O(a,i,a)}))},4R:J(){K 6.1c(6.56)},3P:J(g,f,h,d){L e=6.M>1,3m;K 6.V(J(){7(!3m){3m=E.5c(g,6.2u);7(h)3m.8I()}L b=6;7(f&&E.12(6,"1V")&&E.12(3m[0],"4x"))b=6.3V("1S")[0]||6.3k(6.2u.2R("1S"));L c=E([]);E.V(3m,J(){L a=e?E(6).5J(R)[0]:6;7(E.12(a,"1o")){c=c.1c(a)}N{7(a.15==1)c=c.1c(E("1o",a).1Y());d.1O(b,a)}});c.V(6D)})}};E.2m.4Y.2m=E.2m;J 6D(i,a){7(a.3R)E.3Q({1f:a.3R,3l:S,1G:"1o"});N E.5l(a.1t||a.6A||a.38||"");7(a.1b)a.1b.2X(a)}E.1s=E.1i.1s=J(){L b=1a[0]||{},i=1,M=1a.M,5i=S,11;7(b.1n==8f){5i=b;b=1a[1]||{};i=2}7(1v b!="4D"&&1v b!="J")b={};7(M==1){b=6;i=0}P(;i<M;i++)7((11=1a[i])!=W)P(L a 1r 11){7(b===11[a])6z;7(5i&&11[a]&&1v 11[a]=="4D"&&b[a]&&!11[a].15)b[a]=E.1s(b[a],11[a]);N 7(11[a]!=10)b[a]=11[a]}K b};L F="19"+(1D 3O()).3N(),6y=0,5e={};L H=/z-?5E|89-?87|1y|6q|85-?1P/i;E.1s({81:J(a){1e.$=D;7(a)1e.19=w;K E},1q:J(a){K!!a&&1v a!="25"&&!a.12&&a.1n!=1N&&/J/i.17(a+"")},3W:J(a){K a.1I&&!a.1k||a.28&&a.2u&&!a.2u.1k},5l:J(a){a=E.3f(a);7(a){L b=T.3V("6k")[0]||T.1I,1o=T.2R("1o");1o.U="1t/4l";7(E.14.1d)1o.1t=a;N 1o.3k(T.5v(a));b.3k(1o);b.2X(1o)}},12:J(b,a){K b.12&&b.12.2F()==a.2F()},1Q:{},Q:J(c,d,b){c=c==1e?5e:c;L a=c[F];7(!a)a=c[F]=++6y;7(d&&!E.1Q[a])E.1Q[a]={};7(b!=10)E.1Q[a][d]=b;K d?E.1Q[a][d]:a},3H:J(c,b){c=c==1e?5e:c;L a=c[F];7(b){7(E.1Q[a]){2T E.1Q[a][b];b="";P(b 1r E.1Q[a])1T;7(!b)E.3H(c)}}N{1R{2T c[F]}1W(e){7(c.55)c.55(F)}2T E.1Q[a]}},V:J(c,a,b){7(b){7(c.M==10){P(L d 1r c)7(a.1j(c[d],b)===S)1T}N P(L i=0,M=c.M;i<M;i++)7(a.1j(c[i],b)===S)1T}N{7(c.M==10){P(L d 1r c)7(a.1O(c[d],d,c[d])===S)1T}N P(L i=0,M=c.M,1C=c[0];i<M&&a.1O(1C,i,1C)!==S;1C=c[++i]){}}K c},1l:J(b,a,c,i,d){7(E.1q(a))a=a.1O(b,i);K a&&a.1n==53&&c=="2q"&&!H.17(d)?a+"2P":a},1w:{1c:J(c,b){E.V((b||"").2d(/\\s+/),J(i,a){7(c.15==1&&!E.1w.3E(c.1w,a))c.1w+=(c.1w?" ":"")+a})},1Y:J(c,b){7(c.15==1)c.1w=b!=10?E.3x(c.1w.2d(/\\s+/),J(a){K!E.1w.3E(b,a)}).6g(" "):""},3E:J(b,a){K E.35(a,(b.1w||b).3D().2d(/\\s+/))>-1}},6e:J(b,c,a){L e={};P(L d 1r c){e[d]=b.Y[d];b.Y[d]=c[d]}a.1O(b);P(L d 1r c)b.Y[d]=e[d]},1m:J(d,e,c){7(e=="29"||e=="1P"){L b,3S={3C:"4Z",4X:"23",18:"3u"},3r=e=="29"?["7P","7M"]:["7L","7K"];J 4S(){b=e=="29"?d.7J:d.7I;L a=0,3a=0;E.V(3r,J(){a+=2M(E.2q(d,"7H"+6,R))||0;3a+=2M(E.2q(d,"3a"+6+"62",R))||0});b-=1Z.7E(a+3a)}7(E(d).3K(":4b"))4S();N E.6e(d,3S,4S);K 1Z.2b(0,b)}K E.2q(d,e,c)},2q:J(e,k,j){L d;J 3y(b){7(!E.14.26)K S;L a=T.4a.4L(b,W);K!a||a.4K("3y")==""}7(k=="1y"&&E.14.1d){d=E.1K(e.Y,"1y");K d==""?"1":d}7(E.14.2B&&k=="18"){L c=e.Y.18;e.Y.18="3u";e.Y.18=c}7(k.1E(/4c/i))k=y;7(!j&&e.Y&&e.Y[k])d=e.Y[k];N 7(T.4a&&T.4a.4L){7(k.1E(/4c/i))k="4c";k=k.1p(/([A-Z])/g,"-$1").2w();L h=T.4a.4L(e,W);7(h&&!3y(e))d=h.4K(k);N{L f=[],2L=[];P(L a=e;a&&3y(a);a=a.1b)2L.4U(a);P(L i=0;i<2L.M;i++)7(3y(2L[i])){f[i]=2L[i].Y.18;2L[i].Y.18="3u"}d=k=="18"&&f[2L.M-1]!=W?"2D":(h&&h.4K(k))||"";P(L i=0;i<f.M;i++)7(f[i]!=W)2L[i].Y.18=f[i]}7(k=="1y"&&d=="")d="1"}N 7(e.4j){L g=k.1p(/\\-(\\w)/g,J(a,b){K b.2F()});d=e.4j[k]||e.4j[g];7(!/^\\d+(2P)?$/i.17(d)&&/^\\d/.17(d)){L l=e.Y.2c,3A=e.3A.2c;e.3A.2c=e.4j.2c;e.Y.2c=d||0;d=e.Y.7l+"2P";e.Y.2c=l;e.3A.2c=3A}}K d},5c:J(l,h){L k=[];h=h||T;7(1v h.2R==\'10\')h=h.2u||h[0]&&h[0].2u||T;E.V(l,J(i,d){7(!d)K;7(d.1n==53)d=d.3D();7(1v d=="25"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,J(b,a,c){K c.1E(/^(7k|7h|5Q|7f|48|5O|a3|3v|9Y|9W|9T)$/i)?b:a+"></"+c+">"});L f=E.3f(d).2w(),1u=h.2R("1u");L e=!f.1g("<9R")&&[1,"<2y 78=\'78\'>","</2y>"]||!f.1g("<9O")&&[1,"<77>","</77>"]||f.1E(/^<(9K|1S|9I|9F|9A)/)&&[1,"<1V>","</1V>"]||!f.1g("<4x")&&[2,"<1V><1S>","</1S></1V>"]||(!f.1g("<9y")||!f.1g("<9v"))&&[3,"<1V><1S><4x>","</4x></1S></1V>"]||!f.1g("<5Q")&&[2,"<1V><1S></1S><76>","</76></1V>"]||E.14.1d&&[1,"1u<1u>","</1u>"]||[0,"",""];1u.38=e[1]+d+e[2];2e(e[0]--)1u=1u.5D;7(E.14.1d){L g=!f.1g("<1V")&&f.1g("<1S")<0?1u.1B&&1u.1B.3p:e[1]=="<1V>"&&f.1g("<1S")<0?1u.3p:[];P(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1S")&&!g[j].3p.M)g[j].1b.2X(g[j]);7(/^\\s/.17(d))1u.3n(h.5v(d.1E(/^\\s*/)[0]),1u.1B)}d=E.2H(1u.3p)}7(d.M===0&&(!E.12(d,"3i")&&!E.12(d,"2y")))K;7(d[0]==10||E.12(d,"3i")||d.11)k.1h(d);N k=E.34(k,d)});K k},1K:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3W(d)?{}:E.3S;7(e=="2p"&&E.14.26)d.1b.44;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="Y")K E.1K(d.Y,"9r",c);N 7(c==10&&E.14.1d&&E.12(d,"3i")&&(e=="9q"||e=="9p"))K d.9n(e).6M;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"48")&&d.1b)6Z"U 9i 9g\'t 9b 9a";d.99(e,""+c)}7(E.14.1d&&/6T|3R/.17(e)&&!E.3W(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1y"&&E.14.1d){7(c!=10){d.6q=1;d.1F=(d.1F||"").1p(/6W\\([^)]*\\)/,"")+(2M(c).3D()=="93"?"":"6W(1y="+c*6S+")")}K d.1F&&d.1F.1g("1y=")>=0?(2M(d.1F.1E(/1y=([^)]*)/)[1])/6S).3D():""}e=e.1p(/-([a-z])/92,J(a,b){K b.2F()});7(c!=10)d[e]=c;K d[e]}},3f:J(a){K(a||"").1p(/^\\s+|\\s+$/g,"")},2H:J(b){L a=[];7(1v b!="91")P(L i=0,M=b.M;i<M;i++)a.1h(b[i]);N a=b.2V(0);K a},35:J(b,a){P(L i=0,M=a.M;i<M;i++)7(a[i]==b)K i;K-1},34:J(a,b){7(E.14.1d){P(L i=0;b[i];i++)7(b[i].15!=8)a.1h(b[i])}N P(L i=0;b[i];i++)a.1h(b[i]);K a},57:J(a){L c=[],2j={};1R{P(L i=0,M=a.M;i<M;i++){L b=E.Q(a[i]);7(!2j[b]){2j[b]=R;c.1h(a[i])}}}1W(e){c=a}K c},3x:J(c,a,d){7(1v a=="25")a=4A("S||J(a,i){K "+a+"}");L b=[];P(L i=0,M=c.M;i<M;i++)7(!d&&a(c[i],i)||d&&!a(c[i],i))b.1h(c[i]);K b},2a:J(d,a){L c=[];P(L i=0,M=d.M;i<M;i++){L b=a(d[i],i);7(b!==W&&b!=10){7(b.1n!=1N)b=[b];c=c.6Q(b)}}K c}});L v=8X.8V.2w();E.14={5n:(v.1E(/.+(?:8R|8Q|8P|8O)[\\/: ]([\\d.]+)/)||[])[1],26:/6L/.17(v),2B:/2B/.17(v),1d:/1d/.17(v)&&!/2B/.17(v),3X:/3X/.17(v)&&!/(8M|6L)/.17(v)};L y=E.14.1d?"6K":"6J";E.1s({8J:!E.14.1d||T.6I=="6H",3S:{"P":"8G","8E":"1w","4c":y,6J:y,6K:y,38:"38",1w:"1w",1C:"1C",2W:"2W",3o:"3o",8C:"8B",2p:"2p",8A:"8z",44:"44",6F:"6F",28:"28",12:"12"}});E.V({6E:"O.1b",8y:"19.4w(O,\'1b\')",8x:"19.31(O,2,\'2J\')",8w:"19.31(O,2,\'4v\')",8v:"19.4w(O,\'2J\')",8u:"19.4w(O,\'4v\')",8s:"19.5m(O.1b.1B,O)",8r:"19.5m(O.1B)",6C:"19.12(O,\'8q\')?O.8p||O.8o.T:19.2H(O.3p)"},J(c,d){d=4A("S||J(O){K "+d+"}");E.1i[c]=J(b){L a=E.2a(6,d);7(b&&1v b=="25")a=E.3d(b,a);K 6.2E(E.57(a))}});E.V({6B:"3t",8n:"6s",3n:"6o",8l:"5a",8k:"6P"},J(c,b){E.1i[c]=J(){L a=1a;K 6.V(J(){P(L i=0,M=a.M;i<M;i++)E(a[i])[b](6)})}});E.V({8j:J(a){E.1K(6,a,"");7(6.15==1)6.55(a)},8i:J(a){E.1w.1c(6,a)},8h:J(a){E.1w.1Y(6,a)},8g:J(a){E.1w[E.1w.3E(6,a)?"1Y":"1c"](6,a)},1Y:J(a){7(!a||E.1F(a,[6]).r.M){E("*",6).1c(6).V(J(){E.16.1Y(6);E.3H(6)});7(6.1b)6.1b.2X(6)}},4B:J(){E(">*",6).1Y();2e(6.1B)6.2X(6.1B)}},J(a,b){E.1i[a]=J(){K 6.V(b,1a)}});E.V(["8e","62"],J(i,c){L b=c.2w();E.1i[b]=J(a){K 6[0]==1e?E.14.2B&&T.1k["5h"+c]||E.14.26&&1e["8d"+c]||T.6I=="6H"&&T.1I["5h"+c]||T.1k["5h"+c]:6[0]==T?1Z.2b(1Z.2b(T.1k["5g"+c],T.1I["5g"+c]),1Z.2b(T.1k["5f"+c],T.1I["5f"+c])):a==10?(6.M?E.1m(6[0],b):W):6.1m(b,a.1n==4d?a:a+"2P")}});L C=E.14.26&&4t(E.14.5n)<8c?"(?:[\\\\w*4s-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4s-]|\\\\\\\\.)",6w=1D 4r("^>\\\\s*("+C+"+)"),6v=1D 4r("^("+C+"+)(#)("+C+"+)"),6u=1D 4r("^([#.]?)("+C+"*)");E.1s({5d:{"":"m[2]==\'*\'||19.12(a,m[2])","#":"a.4z(\'2s\')==m[2]",":":{88:"i<m[3]-0",86:"i>m[3]-0",31:"m[3]-0==i",6N:"m[3]-0==i",3j:"i==0",3M:"i==r.M-1",6r:"i%2==0",6p:"i%2","3j-4m":"a.1b.3V(\'*\')[0]==a","3M-4m":"19.31(a.1b.5D,1,\'4v\')==a","84-4m":"!19.31(a.1b.5D,2,\'4v\')",6E:"a.1B",4B:"!a.1B",83:"(a.6A||a.80||19(a).1t()||\'\').1g(m[3])>=0",4b:\'"23"!=a.U&&19.1m(a,"18")!="2D"&&19.1m(a,"4X")!="23"\',23:\'"23"==a.U||19.1m(a,"18")=="2D"||19.1m(a,"4X")=="23"\',7Y:"!a.2W",2W:"a.2W",3o:"a.3o",2p:"a.2p||19.1K(a,\'2p\')",1t:"\'1t\'==a.U",5w:"\'5w\'==a.U",5y:"\'5y\'==a.U",5b:"\'5b\'==a.U",3J:"\'3J\'==a.U",59:"\'59\'==a.U",6n:"\'6n\'==a.U",6m:"\'6m\'==a.U",2G:\'"2G"==a.U||19.12(a,"2G")\',48:"/48|2y|6l|2G/i.17(a.12)",3E:"19.2r(m[3],a).M",7X:"/h\\\\d/i.17(a.12)",7W:"19.3x(19.3I,J(1i){K a==1i.O;}).M"}},6j:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1D 4r("^([:.#]*)("+C+"+)")],3d:J(a,c,b){L d,2o=[];2e(a&&a!=d){d=a;L f=E.1F(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2o=b?c=f.r:E.34(2o,f.r)}K 2o},2r:J(t,p){7(1v t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2j=[],3M,12;2e(t&&3M!=t){L r=[];3M=t;t=E.3f(t);L o=S;L g=6w;L m=g.39(t);7(m){12=m[1].2F();P(L i=0;d[i];i++)P(L c=d[i].1B;c;c=c.2J)7(c.15==1&&(12=="*"||c.12.2F()==12))r.1h(c);d=r;t=t.1p(g,"");7(t.1g(" ")==0)6z;o=R}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.39(t))!=W){r=[];L l={};12=m[2].2F();m=m[1];P(L j=0,3g=d.M;j<3g;j++){L n=m=="~"||m=="+"?d[j].2J:d[j].1B;P(;n;n=n.2J)7(n.15==1){L h=E.Q(n);7(m=="~"&&l[h])1T;7(!12||n.12.2F()==12){7(m=="~")l[h]=R;r.1h(n)}7(m=="+")1T}}d=r;t=E.3f(t.1p(g,""));o=R}}7(t&&!o){7(!t.1g(",")){7(p==d[0])d.4k();2j=E.34(2j,d);r=d=[p];t=" "+t.6i(1,t.M)}N{L k=6v;L m=k.39(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6u;m=k.39(t)}m[2]=m[2].1p(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5N&&!E.3W(f)){L q=f.5N(m[2]);7((E.14.1d||E.14.2B)&&q&&1v q.2s=="25"&&q.2s!=m[2])q=E(\'[@2s="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{P(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2w()=="4D")a="3v";r=E.34(r,d[i].3V(a))}7(m[1]==".")r=E.58(r,m[2]);7(m[1]=="#"){L e=[];P(L i=0;r[i];i++)7(r[i].4z("2s")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}7(t){L b=E.1F(t,r);d=r=b.r;t=E.3f(b.t)}}7(t)d=[];7(d&&p==d[0])d.4k();2j=E.34(2j,d);K 2j},58:J(r,m,a){m=" "+m+" ";L c=[];P(L i=0;r[i];i++){L b=(" "+r[i].1w+" ").1g(m)>=0;7(!a&&b||a&&!b)c.1h(r[i])}K c},1F:J(t,r,h){L d;2e(t&&t!=d){d=t;L p=E.6j,m;P(L i=0;p[i];i++){m=p[i].39(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1p(/\\\\/g,"");1T}}7(!m)1T;7(m[1]==":"&&m[2]=="4I")r=G.17(m[3])?E.1F(m[3],r,R).r:E(r).4I(m[3]);N 7(m[1]==".")r=E.58(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];P(L i=0,3g=r.M;i<3g;i++){L a=r[i],z=a[E.3S[m[2]]||m[2]];7(z==W||/6T|3R|2p/.17(m[2]))z=E.1K(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1g(m[5])||U=="$="&&z.6i(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1g(m[5])>=0)^h)g.1h(a)}r=g}N 7(m[1]==":"&&m[2]=="31-4m"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.39(m[3]=="6r"&&"2n"||m[3]=="6p"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;P(L i=0,3g=r.M;i<3g;i++){L j=r[i],1b=j.1b,2s=E.Q(1b);7(!e[2s]){L c=1;P(L n=1b.1B;n;n=n.2J)7(n.15==1)n.4p=c++;e[2s]=R}L b=S;7(3j==0){7(j.4p==d)b=R}N 7((j.4p-d)%3j==0&&(j.4p-d)/3j>=0)b=R;7(b^h)g.1h(j)}r=g}N{L f=E.5d[m[1]];7(1v f!="25")f=E.5d[m[1]][m[2]];f=4A("S||J(a,i){K "+f+"}");r=E.3x(r,f,h)}}K{r:r,t:t}},4w:J(b,c){L d=[];L a=b[c];2e(a&&a!=T){7(a.15==1)d.1h(a);a=a[c]}K d},31:J(a,e,c,b){e=e||1;L d=0;P(;a;a=a[c])7(a.15==1&&++d==e)1T;K a},5m:J(n,a){L r=[];P(;n;n=n.2J){7(n.15==1&&(!a||n!=a))r.1h(n)}K r}});E.16={1c:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.54!=10)f=1e;7(!g.2A)g.2A=6.2A++;7(e!=10){L h=g;g=J(){K h.1j(6,1a)};g.Q=e;g.2A=h.2A}L j=E.Q(f,"2N")||E.Q(f,"2N",{}),1x=E.Q(f,"1x")||E.Q(f,"1x",J(){L a;7(1v E=="10"||E.16.52)K a;a=E.16.1x.1j(1a.3G.O,1a);K a});1x.O=f;E.V(i.2d(/\\s+/),J(c,b){L a=b.2d(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2l[b]||E.16.2l[b].4i.1O(f)===S){7(f.3F)f.3F(b,1x,S);N 7(f.6h)f.6h("4h"+b,1x)}}d[g.2A]=g;E.16.2g[b]=R});f=W},2A:1,2g:{},1Y:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.Q(e,"2N"),2f,5E;7(i){7(h==10)P(L g 1r i)6.1Y(e,g);N{7(h.U){f=h.2k;h=h.U}E.V(h.2d(/\\s+/),J(b,a){L c=a.2d(".");a=c[0];7(i[a]){7(f)2T i[a][f.2A];N P(f 1r i[a])7(!c[1]||i[a][f].U==c[1])2T i[a][f];P(2f 1r i[a])1T;7(!2f){7(!E.16.2l[a]||E.16.2l[a].4g.1O(e)===S){7(e.6f)e.6f(a,E.Q(e,"1x"),S);N 7(e.6d)e.6d("4h"+a,E.Q(e,"1x"))}2f=W;2T i[a]}}})}P(2f 1r i)1T;7(!2f){L d=E.Q(e,"1x");7(d)d.O=W;E.3H(e,"2N");E.3H(e,"1x")}}},1U:J(f,b,c,d,g){b=E.2H(b||[]);7(!c){7(6.2g[f])E("*").1c([1e,T]).1U(f,b)}N{7(c.15==3||c.15==8)K 10;L a,2f,1i=E.1q(c[f]||W),16=!b[0]||!b[0].32;7(16)b.4U(6.51({U:f,2K:c}));b[0].U=f;7(E.1q(E.Q(c,"1x")))a=E.Q(c,"1x").1j(c,b);7(!1i&&c["4h"+f]&&c["4h"+f].1j(c,b)===S)a=S;7(16)b.4k();7(g&&E.1q(g)){2f=g.1j(c,a==W?b:b.6Q(a));7(2f!==10)a=2f}7(1i&&d!==S&&a!==S&&!(E.12(c,\'a\')&&f=="50")){6.52=R;1R{c[f]()}1W(e){}}6.52=S}K a},1x:J(c){L a;c=E.16.51(c||1e.16||{});L b=c.U.2d(".");c.U=b[0];L f=E.Q(6,"2N")&&E.Q(6,"2N")[c.U],3B=1N.2m.2V.1O(1a,1);3B.4U(c);P(L j 1r f){L d=f[j];3B[0].2k=d;3B[0].Q=d.Q;7(!b[1]||d.U==b[1]){L e=d.1j(6,3B);7(a!==S)a=e;7(e===S){c.32();c.41()}}}7(E.14.1d)c.2K=c.32=c.41=c.2k=c.Q=W;K a},51:J(c){L a=c;c=E.1s({},a);c.32=J(){7(a.32)a.32();a.7T=S};c.41=J(){7(a.41)a.41();a.7S=R};7(!c.2K)c.2K=c.7R||T;7(c.2K.15==3)c.2K=a.2K.1b;7(!c.4W&&c.4V)c.4W=c.4V==c.2K?c.7Q:c.4V;7(c.6b==W&&c.6a!=W){L b=T.1I,1k=T.1k;c.6b=c.6a+(b&&b.2i||1k&&1k.2i||0)-(b.68||0);c.7O=c.7N+(b&&b.2x||1k&&1k.2x||0)-(b.67||0)}7(!c.3r&&((c.4f||c.4f===0)?c.4f:c.66))c.3r=c.4f||c.66;7(!c.65&&c.64)c.65=c.64;7(!c.3r&&c.2G)c.3r=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2l:{21:{4i:J(){5A();K},4g:J(){K}},47:{4i:J(){7(E.14.1d)K S;E(6).2z("4Q",E.16.2l.47.2k);K R},4g:J(){7(E.14.1d)K S;E(6).42("4Q",E.16.2l.47.2k);K R},2k:J(a){7(I(a,6))K R;1a[0].U="47";K E.16.1x.1j(6,1a)}},46:{4i:J(){7(E.14.1d)K S;E(6).2z("4P",E.16.2l.46.2k);K R},4g:J(){7(E.14.1d)K S;E(6).42("4P",E.16.2l.46.2k);K R},2k:J(a){7(I(a,6))K R;1a[0].U="46";K E.16.1x.1j(6,1a)}}}};E.1i.1s({2z:J(c,a,b){K c=="4O"?6.30(c,a,b):6.V(J(){E.16.1c(6,c,b||a,b&&a)})},30:J(d,b,c){K 6.V(J(){E.16.1c(6,d,J(a){E(6).42(a);K(c||b).1j(6,1a)},c&&b)})},42:J(a,b){K 6.V(J(){E.16.1Y(6,a,b)})},1U:J(c,a,b){K 6.V(J(){E.16.1U(c,a,6,R,b)})},63:J(c,a,b){7(6[0])K E.16.1U(c,a,6[0],S,b);K 10},2h:J(){L b=1a;K 6.50(J(a){6.4N=0==6.4N?1:0;a.32();K b[6.4N].1j(6,1a)||S})},7F:J(a,b){K 6.2z(\'47\',a).2z(\'46\',b)},21:J(a){5A();7(E.2Q)a.1O(T,E);N E.3w.1h(J(){K a.1O(6,E)});K 6}});E.1s({2Q:S,3w:[],21:J(){7(!E.2Q){E.2Q=R;7(E.3w){E.V(E.3w,J(){6.1j(T)});E.3w=W}E(T).63("21")}}});L x=S;J 5A(){7(x)K;x=R;7(T.3F&&!E.14.2B)T.3F("61",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1R{T.1I.7D("2c")}1W(3e){3z(1a.3G,0);K}E.21()})();7(E.14.2B)T.3F("61",J(){7(E.2Q)K;P(L i=0;i<T.4M.M;i++)7(T.4M[i].2W){3z(1a.3G,0);K}E.21()},S);7(E.14.26){L a;(J(){7(E.2Q)K;7(T.3c!="60"&&T.3c!="1z"){3z(1a.3G,0);K}7(a===10)a=E("Y, 5O[7B=7A]").M;7(T.4M.M!=a){3z(1a.3G,0);K}E.21()})()}E.16.1c(1e,"43",E.21)}E.V(("7z,7y,43,7x,5g,4O,50,7w,"+"7v,7u,7C,4Q,4P,7t,2y,"+"59,7s,7r,7G,3e").2d(","),J(i,b){E.1i[b]=J(a){K a?6.2z(b,a):6.1U(b)}});L I=J(a,c){L b=a.4W;2e(b&&b!=c)1R{b=b.1b}1W(3e){b=c}K b==c};E(1e).2z("4O",J(){E("*").1c(T).42()});E.1i.1s({43:J(g,d,c){7(E.1q(g))K 6.2z("43",g);L e=g.1g(" ");7(e>=0){L i=g.2V(e,g.M);g=g.2V(0,e)}c=c||J(){};L f="4J";7(d)7(E.1q(d)){c=d;d=W}N{d=E.3v(d);f="5Z"}L h=6;E.3Q({1f:g,U:f,1G:"3q",Q:d,1z:J(a,b){7(b=="1X"||b=="5Y")h.3q(i?E("<1u/>").3t(a.4e.1p(/<1o(.|\\s)*?\\/1o>/g,"")).2r(i):a.4e);h.V(c,[a.4e,b,a])}});K 6},7q:J(){K E.3v(6.5X())},5X:J(){K 6.2a(J(){K E.12(6,"3i")?E.2H(6.7p):6}).1F(J(){K 6.37&&!6.2W&&(6.3o||/2y|6l/i.17(6.12)||/1t|23|3J/i.17(6.U))}).2a(J(i,c){L b=E(6).5P();K b==W?W:b.1n==1N?E.2a(b,J(a,i){K{37:c.37,1C:a}}):{37:c.37,1C:b}}).22()}});E.V("5W,5V,5U,69,5T,5S".2d(","),J(i,o){E.1i[o]=J(f){K 6.2z(o,f)}});L B=(1D 3O).3N();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=W}K E.3Q({U:"4J",1f:d,Q:b,1X:a,1G:c})},7o:J(b,a){K E.22(b,W,a,"1o")},7n:J(c,b,a){K E.22(c,b,a,"2O")},7m:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3Q({U:"5Z",1f:d,Q:b,1X:a,1G:c})},7Z:J(a){E.1s(E.4H,a)},4H:{2g:R,U:"4J",2U:0,5R:"49/x-7j-3i-7i",6x:R,3l:R,Q:W,6t:W,3J:W,4n:{3L:"49/3L, 1t/3L",3q:"1t/3q",1o:"1t/4l, 49/4l",2O:"49/2O, 1t/4l",1t:"1t/7e",4o:"*/*"}},4q:{},3Q:J(s){L f,2Y=/=\\?(&|$)/g,1A,Q;s=E.1s(R,s,E.1s(R,{},E.4H,s));7(s.Q&&s.6x&&1v s.Q!="25")s.Q=E.3v(s.Q);7(s.1G=="4u"){7(s.U.2w()=="22"){7(!s.1f.1E(2Y))s.1f+=(s.1f.1E(/\\?/)?"&":"?")+(s.4u||"7d")+"=?"}N 7(!s.Q||!s.Q.1E(2Y))s.Q=(s.Q?s.Q+"&":"")+(s.4u||"7d")+"=?";s.1G="2O"}7(s.1G=="2O"&&(s.Q&&s.Q.1E(2Y)||s.1f.1E(2Y))){f="4u"+B++;7(s.Q)s.Q=(s.Q+"").1p(2Y,"="+f+"$1");s.1f=s.1f.1p(2Y,"="+f+"$1");s.1G="1o";1e[f]=J(a){Q=a;1X();1z();1e[f]=10;1R{2T 1e[f]}1W(e){}7(h)h.2X(g)}}7(s.1G=="1o"&&s.1Q==W)s.1Q=S;7(s.1Q===S&&s.U.2w()=="22"){L i=(1D 3O()).3N();L j=s.1f.1p(/(\\?|&)4s=.*?(&|$)/,"$a2="+i+"$2");s.1f=j+((j==s.1f)?(s.1f.1E(/\\?/)?"&":"?")+"4s="+i:"")}7(s.Q&&s.U.2w()=="22"){s.1f+=(s.1f.1E(/\\?/)?"&":"?")+s.Q;s.Q=W}7(s.2g&&!E.5M++)E.16.1U("5W");7((!s.1f.1g("9Z")||!s.1f.1g("//"))&&(s.1G=="1o"||s.1G=="2O")&&s.U.2w()=="22"){L h=T.3V("6k")[0];L g=T.2R("1o");g.3R=s.1f;7(s.7c)g.9X=s.7c;7(!f){L l=S;g.9V=g.9U=J(){7(!l&&(!6.3c||6.3c=="60"||6.3c=="1z")){l=R;1X();1z();h.2X(g)}}}h.3k(g);K 10}L m=S;L k=1e.7a?1D 7a("9S.9Q"):1D 79();k.9P(s.U,s.1f,s.3l,s.6t,s.3J);1R{7(s.Q)k.4G("9N-9M",s.5R);7(s.5I)k.4G("9L-5H-9J",E.4q[s.1f]||"9H, 9G 9E 9B 5G:5G:5G 9z");k.4G("X-9x-9u","79");k.4G("9t",s.1G&&s.4n[s.1G]?s.4n[s.1G]+", */*":s.4n.4o)}1W(e){}7(s.75)s.75(k);7(s.2g)E.16.1U("5S",[k,s]);L c=J(a){7(!m&&k&&(k.3c==4||a=="2U")){m=R;7(d){74(d);d=W}1A=a=="2U"&&"2U"||!E.73(k)&&"3e"||s.5I&&E.72(k,s.1f)&&"5Y"||"1X";7(1A=="1X"){1R{Q=E.71(k,s.1G)}1W(e){1A="5C"}}7(1A=="1X"){L b;1R{b=k.5B("70-5H")}1W(e){}7(s.5I&&b)E.4q[s.1f]=b;7(!f)1X()}N E.5t(s,k,1A);1z();7(s.3l)k=W}};7(s.3l){L d=54(c,13);7(s.2U>0)3z(J(){7(k){k.9m();7(!m)c("2U")}},s.2U)}1R{k.9l(s.Q)}1W(e){E.5t(s,k,W,e)}7(!s.3l)c();J 1X(){7(s.1X)s.1X(Q,1A);7(s.2g)E.16.1U("5T",[k,s])}J 1z(){7(s.1z)s.1z(k,1A);7(s.2g)E.16.1U("5U",[k,s]);7(s.2g&&!--E.5M)E.16.1U("5V")}K k},5t:J(s,a,b,e){7(s.3e)s.3e(a,b,e);7(s.2g)E.16.1U("69",[a,s,e])},5M:0,73:J(r){1R{K!r.1A&&9k.9j=="5b:"||(r.1A>=6Y&&r.1A<9h)||r.1A==6X||r.1A==9e||E.14.26&&r.1A==10}1W(e){}K S},72:J(a,c){1R{L b=a.5B("70-5H");K a.1A==6X||b==E.4q[c]||E.14.26&&a.1A==10}1W(e){}K S},71:J(r,b){L c=r.5B("9d-U");L d=b=="3L"||!b&&c&&c.1g("3L")>=0;L a=d?r.9c:r.4e;7(d&&a.1I.28=="5C")6Z"5C";7(b=="1o")E.5l(a);7(b=="2O")a=4A("("+a+")");K a},3v:J(a){L s=[];7(a.1n==1N||a.5j)E.V(a,J(){s.1h(3s(6.37)+"="+3s(6.1C))});N P(L j 1r a)7(a[j]&&a[j].1n==1N)E.V(a[j],J(){s.1h(3s(j)+"="+3s(6))});N s.1h(3s(j)+"="+3s(a[j]));K s.6g("&").1p(/%20/g,"+")}});E.1i.1s({1J:J(c,b){K c?6.27({1P:"1J",29:"1J",1y:"1J"},c,b):6.1F(":23").V(J(){6.Y.18=6.5x||"";7(E.1m(6,"18")=="2D"){L a=E("<"+6.28+" />").6B("1k");6.Y.18=a.1m("18");7(6.Y.18=="2D")6.Y.18="3u";a.1Y()}}).3h()},1H:J(b,a){K b?6.27({1P:"1H",29:"1H",1y:"1H"},b,a):6.1F(":4b").V(J(){6.5x=6.5x||E.1m(6,"18");6.Y.18="2D"}).3h()},6U:E.1i.2h,2h:J(a,b){K E.1q(a)&&E.1q(b)?6.6U(a,b):a?6.27({1P:"2h",29:"2h",1y:"2h"},a,b):6.V(J(){E(6)[E(6).3K(":23")?"1J":"1H"]()})},98:J(b,a){K 6.27({1P:"1J"},b,a)},97:J(b,a){K 6.27({1P:"1H"},b,a)},96:J(b,a){K 6.27({1P:"2h"},b,a)},95:J(b,a){K 6.27({1y:"1J"},b,a)},94:J(b,a){K 6.27({1y:"1H"},b,a)},9f:J(c,a,b){K 6.27({1y:a},c,b)},27:J(l,k,j,h){L i=E.6V(k,j,h);K 6[i.2S===S?"V":"2S"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3K(":23"),4y=6;P(L p 1r l){7(l[p]=="1H"&&f||l[p]=="1J"&&!f)K E.1q(g.1z)&&g.1z.1j(6);7(p=="1P"||p=="29"){g.18=E.1m(6,"18");g.36=6.Y.36}}7(g.36!=W)6.Y.36="23";g.40=E.1s({},l);E.V(l,J(c,a){L e=1D E.2v(4y,g,c);7(/2h|1J|1H/.17(a))e[a=="2h"?f?"1J":"1H":a](l);N{L b=a.3D().1E(/^([+-]=)?([\\d+-.]+)(.*)$/),24=e.2o(R)||0;7(b){L d=2M(b[2]),2C=b[3]||"2P";7(2C!="2P"){4y.Y[c]=(d||1)+2C;24=((d||1)/e.2o(R))*24;4y.Y[c]=24+2C}7(b[1])d=((b[1]=="-="?-1:1)*d)+24;e.3Z(24,d,2C)}N e.3Z(24,a,"")}});K R})},2S:J(a,b){7(E.1q(a)||(a&&a.1n==1N)){b=a;a="2v"}7(!a||(1v a=="25"&&!b))K A(6[0],a);K 6.V(J(){7(b.1n==1N)A(6,a,b);N{A(6,a).1h(b);7(A(6,a).M==1)b.1j(6)}})},8Z:J(b,c){L a=E.3I;7(b)6.2S([]);6.V(J(){P(L i=a.M-1;i>=0;i--)7(a[i].O==6){7(c)a[i](R);a.6R(i,1)}});7(!c)6.5z();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2v";L q=E.Q(b,c+"2S");7(!q||a)q=E.Q(b,c+"2S",a?E.2H(a):[]);K q};E.1i.5z=J(a){a=a||"2v";K 6.V(J(){L q=A(6,a);q.4k();7(q.M)q[0].1j(6)})};E.1s({6V:J(b,a,c){L d=b&&b.1n==8Y?b:{1z:c||!c&&a||E.1q(b)&&b,2t:b,3Y:c&&a||a&&a.1n!=8W&&a};d.2t=(d.2t&&d.2t.1n==53?d.2t:{9w:8U,8T:6Y}[d.2t])||8S;d.5o=d.1z;d.1z=J(){7(d.2S!==S)E(6).5z();7(E.1q(d.5o))d.5o.1j(6)};K d},3Y:{6O:J(p,n,b,a){K b+a*p},5F:J(p,n,b,a){K((-1Z.9C(p*1Z.9D)/2)+0.5)*a+b}},3I:[],3T:W,2v:J(b,c,a){6.11=c;6.O=b;6.1l=a;7(!c.3U)c.3U={}}});E.2v.2m={4C:J(){7(6.11.33)6.11.33.1j(6.O,[6.2I,6]);(E.2v.33[6.1l]||E.2v.33.4o)(6);7(6.1l=="1P"||6.1l=="29")6.O.Y.18="3u"},2o:J(a){7(6.O[6.1l]!=W&&6.O.Y[6.1l]==W)K 6.O[6.1l];L r=2M(E.1m(6.O,6.1l,a));K r&&r>-8N?r:2M(E.2q(6.O,6.1l))||0},3Z:J(c,b,d){6.5s=(1D 3O()).3N();6.24=c;6.3h=b;6.2C=d||6.2C||"2P";6.2I=6.24;6.4E=6.4F=0;6.4C();L e=6;J t(a){K e.33(a)}t.O=6.O;E.3I.1h(t);7(E.3T==W){E.3T=54(J(){L a=E.3I;P(L i=0;i<a.M;i++)7(!a[i]())a.6R(i--,1);7(!a.M){74(E.3T);E.3T=W}},13)}},1J:J(){6.11.3U[6.1l]=E.1K(6.O.Y,6.1l);6.11.1J=R;6.3Z(0,6.2o());7(6.1l=="29"||6.1l=="1P")6.O.Y[6.1l]="8L";E(6.O).1J()},1H:J(){6.11.3U[6.1l]=E.1K(6.O.Y,6.1l);6.11.1H=R;6.3Z(6.2o(),0)},33:J(a){L t=(1D 3O()).3N();7(a||t>6.11.2t+6.5s){6.2I=6.3h;6.4E=6.4F=1;6.4C();6.11.40[6.1l]=R;L b=R;P(L i 1r 6.11.40)7(6.11.40[i]!==R)b=S;7(b){7(6.11.18!=W){6.O.Y.36=6.11.36;6.O.Y.18=6.11.18;7(E.1m(6.O,"18")=="2D")6.O.Y.18="3u"}7(6.11.1H)6.O.Y.18="2D";7(6.11.1H||6.11.1J)P(L p 1r 6.11.40)E.1K(6.O.Y,p,6.11.3U[p])}7(b&&E.1q(6.11.1z))6.11.1z.1j(6.O);K S}N{L n=t-6.5s;6.4F=n/6.11.2t;6.4E=E.3Y[6.11.3Y||(E.3Y.5F?"5F":"6O")](6.4F,n,0,1,6.11.2t);6.2I=6.24+((6.3h-6.24)*6.4E);6.4C()}K R}};E.2v.33={2i:J(a){a.O.2i=a.2I},2x:J(a){a.O.2x=a.2I},1y:J(a){E.1K(a.O.Y,"1y",a.2I)},4o:J(a){a.O.Y[a.1l]=a.2I+a.2C}};E.1i.5f=J(){L b=0,3b=0,O=6[0],5q;7(O)8K(E.14){L d=O.1b,45=O,1M=O.1M,1L=O.2u,5p=26&&4t(5n)<8H,2Z=E.1m(O,"3C")=="2Z";7(O.7b){L c=O.7b();1c(c.2c+1Z.2b(1L.1I.2i,1L.1k.2i),c.3b+1Z.2b(1L.1I.2x,1L.1k.2x));1c(-1L.1I.68,-1L.1I.67)}N{1c(O.5k,O.5K);2e(1M){1c(1M.5k,1M.5K);7(3X&&!/^t(8F|d|h)$/i.17(1M.28)||26&&!5p)3a(1M);7(!2Z&&E.1m(1M,"3C")=="2Z")2Z=R;45=/^1k$/i.17(1M.28)?45:1M;1M=1M.1M}2e(d&&d.28&&!/^1k|3q$/i.17(d.28)){7(!/^a0|1V.*$/i.17(E.1m(d,"18")))1c(-d.2i,-d.2x);7(3X&&E.1m(d,"36")!="4b")3a(d);d=d.1b}7((5p&&(2Z||E.1m(45,"3C")=="4Z"))||(3X&&E.1m(45,"3C")!="4Z"))1c(-1L.1k.5k,-1L.1k.5K);7(2Z)1c(1Z.2b(1L.1I.2i,1L.1k.2i),1Z.2b(1L.1I.2x,1L.1k.2x))}5q={3b:3b,2c:b}}J 3a(a){1c(E.2q(a,"a1",R),E.2q(a,"8D",R))}J 1c(l,t){b+=4t(l)||0;3b+=4t(t)||0}K 5q}})();',62,624,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|elem|for|data|true|false|document|type|each|null||style||undefined|options|nodeName||browser|nodeType|event|test|display|jQuery|arguments|parentNode|add|msie|window|url|indexOf|push|fn|apply|body|prop|css|constructor|script|replace|isFunction|in|extend|text|div|typeof|className|handle|opacity|complete|status|firstChild|value|new|match|filter|dataType|hide|documentElement|show|attr|doc|offsetParent|Array|call|height|cache|try|tbody|break|trigger|table|catch|success|remove|Math||ready|get|hidden|start|string|safari|animate|tagName|width|map|max|left|split|while|ret|global|toggle|scrollLeft|done|handler|special|prototype||cur|selected|curCSS|find|id|duration|ownerDocument|fx|toLowerCase|scrollTop|select|bind|guid|opera|unit|none|pushStack|toUpperCase|button|makeArray|now|nextSibling|target|stack|parseFloat|events|json|px|isReady|createElement|queue|delete|timeout|slice|disabled|removeChild|jsre|fixed|one|nth|preventDefault|step|merge|inArray|overflow|name|innerHTML|exec|border|top|readyState|multiFilter|error|trim|rl|end|form|first|appendChild|async|elems|insertBefore|checked|childNodes|html|which|encodeURIComponent|append|block|param|readyList|grep|color|setTimeout|runtimeStyle|args|position|toString|has|addEventListener|callee|removeData|timers|password|is|xml|last|getTime|Date|domManip|ajax|src|props|timerId|orig|getElementsByTagName|isXMLDoc|mozilla|easing|custom|curAnim|stopPropagation|unbind|load|selectedIndex|offsetChild|mouseleave|mouseenter|input|application|defaultView|visible|float|String|responseText|charCode|teardown|on|setup|currentStyle|shift|javascript|child|accepts|_default|nodeIndex|lastModified|RegExp|_|parseInt|jsonp|previousSibling|dir|tr|self|getAttribute|eval|empty|update|object|pos|state|setRequestHeader|ajaxSettings|not|GET|getPropertyValue|getComputedStyle|styleSheets|lastToggle|unload|mouseout|mouseover|andSelf|getWH|container2|unshift|fromElement|relatedTarget|visibility|init|absolute|click|fix|triggered|Number|setInterval|removeAttribute|prevObject|unique|classFilter|submit|after|file|clean|expr|windowData|offset|scroll|client|deep|jquery|offsetLeft|globalEval|sibling|version|old|safari2|results|wrapAll|startTime|handleError|container|createTextNode|radio|oldblock|checkbox|dequeue|bindReady|getResponseHeader|parsererror|lastChild|index|swing|00|Modified|ifModified|clone|offsetTop|values|active|getElementById|link|val|col|contentType|ajaxSend|ajaxSuccess|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|POST|loaded|DOMContentLoaded|Width|triggerHandler|ctrlKey|metaKey|keyCode|clientTop|clientLeft|ajaxError|clientX|pageX|cloneNode|detachEvent|swap|removeEventListener|join|attachEvent|substr|parse|head|textarea|reset|image|before|odd|zoom|even|prepend|username|quickClass|quickID|quickChild|processData|uuid|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|setArray|CSS1Compat|compatMode|cssFloat|styleFloat|webkit|nodeValue|eq|linear|replaceWith|concat|splice|100|href|_toggle|speed|alpha|304|200|throw|Last|httpData|httpNotModified|httpSuccess|clearInterval|beforeSend|colgroup|fieldset|multiple|XMLHttpRequest|ActiveXObject|getBoundingClientRect|scriptCharset|callback|plain|img|hasClass|br|urlencoded|www|abbr|pixelLeft|post|getJSON|getScript|elements|serialize|keypress|keydown|change|mouseup|mousedown|dblclick|resize|focus|blur|stylesheet|rel|mousemove|doScroll|round|hover|keyup|padding|offsetHeight|offsetWidth|Bottom|Top|Right|clientY|pageY|Left|toElement|srcElement|cancelBubble|returnValue|0n|substring|animated|header|enabled|ajaxSetup|innerText|noConflict|size|contains|only|line|gt|weight|lt|font|uFFFF|u0128|417|inner|Height|Boolean|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|wrap|prependTo|contentWindow|contentDocument|iframe|children|siblings|wrapInner|prevAll|nextAll|prev|next|parents|maxLength|maxlength|readOnly|readonly|borderTopWidth|class|able|htmlFor|522|reverse|boxModel|with|1px|compatible|10000|ie|ra|it|rv|400|fast|600|userAgent|Function|navigator|Object|stop|option|array|ig|NaN|fadeOut|fadeIn|slideToggle|slideUp|slideDown|setAttribute|changed|be|responseXML|content|1223|fadeTo|can|300|property|protocol|location|send|abort|getAttributeNode|specified|method|action|cssText|attributes|Accept|With|th|slow|Requested|td|GMT|cap|1970|cos|PI|Jan|colg|01|Thu|tfoot|Since|thead|If|Type|Content|leg|open|XMLHTTP|opt|Microsoft|embed|onreadystatechange|onload|area|charset|hr|http|inline|borderLeftWidth|1_|meta'.split('|'),0,{}));jQuery.noConflict();
 
 
 
 
 
 
 
 
 
 
 
admin/js/jquery.tabs.js DELETED
@@ -1,642 +0,0 @@
1
- /**
2
- * Tabs - jQuery plugin for accessible, unobtrusive tabs
3
- * @requires jQuery v1.1.1
4
- *
5
- * http://stilbuero.de/tabs/
6
- *
7
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
8
- * Dual licensed under the MIT and GPL licenses:
9
- * http://www.opensource.org/licenses/mit-license.php
10
- * http://www.gnu.org/licenses/gpl.html
11
- *
12
- * Version: 2.7.4
13
- */
14
-
15
- (function($) { // block scope
16
-
17
- $.extend({
18
- tabs: {
19
- remoteCount: 0 // TODO in Tabs 3 this is going to be more cleanly in one single namespace
20
- }
21
- });
22
-
23
- /**
24
- * Create an accessible, unobtrusive tab interface based on a particular HTML structure.
25
- *
26
- * The underlying HTML has to look like this:
27
- *
28
- * <div id="container">
29
- * <ul>
30
- * <li><a href="#fragment-1">Section 1</a></li>
31
- * <li><a href="#fragment-2">Section 2</a></li>
32
- * <li><a href="#fragment-3">Section 3</a></li>
33
- * </ul>
34
- * <div id="fragment-1">
35
- *
36
- * </div>
37
- * <div id="fragment-2">
38
- *
39
- * </div>
40
- * <div id="fragment-3">
41
- *
42
- * </div>
43
- * </div>
44
- *
45
- * Each anchor in the unordered list points directly to a section below represented by one of the
46
- * divs (the URI in the anchor's href attribute refers to the fragment with the corresponding id).
47
- * Because such HTML structure is fully functional on its own, e.g. without JavaScript, the tab
48
- * interface is accessible and unobtrusive.
49
- *
50
- * A tab is also bookmarkable via hash in the URL. Use the History/Remote plugin (Tabs will
51
- * auto-detect its presence) to fix the back (and forward) button.
52
- *
53
- * @example $('#container').tabs();
54
- * @desc Create a basic tab interface.
55
- * @example $('#container').tabs(2);
56
- * @desc Create a basic tab interface with the second tab initially activated.
57
- * @example $('#container').tabs({disabled: [3, 4]});
58
- * @desc Create a tab interface with the third and fourth tab being disabled.
59
- * @example $('#container').tabs({fxSlide: true});
60
- * @desc Create a tab interface that uses slide down/up animations for showing/hiding tab
61
- * content upon tab switching.
62
- *
63
- * @param Number initial An integer specifying the position of the tab (no zero-based index) that
64
- * gets activated at first (on page load). Two alternative ways to specify
65
- * the active tab will overrule this argument. First a li element
66
- * (representing one single tab) belonging to the selected tab class, e.g.
67
- * set the selected tab class (default: "tabs-selected", see option
68
- * selectedClass) for one of the unordered li elements in the HTML source.
69
- * In addition if a fragment identifier/hash in the URL of the page refers
70
- * to the id of a tab container of a tab interface the corresponding tab will
71
- * be activated and both the initial argument as well as an eventually
72
- * declared class attribute will be overruled. Defaults to 1 if omitted.
73
- * @param Object settings An object literal containing key/value pairs to provide optional settings.
74
- * @option Array<Number> disabled An array containing the position of the tabs (no zero-based index)
75
- * that should be disabled on initialization. Default value: null.
76
- * A tab can also be disabled by simply adding the disabling class
77
- * (default: "tabs-disabled", see option disabledClass) to the li
78
- * element representing that particular tab.
79
- * @option Boolean bookmarkable Boolean flag indicating if support for bookmarking and history (via
80
- * changing hash in the URL of the browser) is enabled. Default value:
81
- * false, unless the History/Remote plugin is included. In that case the
82
- * default value becomes true. @see $.ajaxHistory.initialize
83
- * @option Boolean remote Boolean flag indicating that tab content has to be loaded remotely from
84
- * the url given in the href attribute of the tab menu anchor elements.
85
- * @option String spinner The content of this string is shown in a tab while remote content is loading.
86
- * Insert plain text as well as an img here. To turn off this notification
87
- * pass an empty string or null. Default: "Loading&#8230;".
88
- * @option String hashPrefix A String that is used for constructing the hash the link's href attribute
89
- * of a remote tab gets altered to, such as "#remote-1".
90
- * Default value: "remote-tab-".
91
- * @option Boolean fxFade Boolean flag indicating whether fade in/out animations are used for tab
92
- * switching. Can be combined with fxSlide. Will overrule fxShow/fxHide.
93
- * Default value: false.
94
- * @option Boolean fxSlide Boolean flag indicating whether slide down/up animations are used for tab
95
- * switching. Can be combined with fxFade. Will overrule fxShow/fxHide.
96
- * Default value: false.
97
- * @option String|Number fxSpeed A string representing one of the three predefined speeds ("slow",
98
- * "normal", or "fast") or the number of milliseconds (e.g. 1000) to
99
- * run an animation. Default value: "normal".
100
- * @option Object fxShow An object literal of the form jQuery's animate function expects for making
101
- * your own, custom animation to reveal a tab upon tab switch. Unlike fxFade
102
- * or fxSlide this animation is independent from an optional hide animation.
103
- * Default value: null. @see animate
104
- * @option Object fxHide An object literal of the form jQuery's animate function expects for making
105
- * your own, custom animation to hide a tab upon tab switch. Unlike fxFade
106
- * or fxSlide this animation is independent from an optional show animation.
107
- * Default value: null. @see animate
108
- * @option String|Number fxShowSpeed A string representing one of the three predefined speeds
109
- * ("slow", "normal", or "fast") or the number of milliseconds
110
- * (e.g. 1000) to run the animation specified in fxShow.
111
- * Default value: fxSpeed.
112
- * @option String|Number fxHideSpeed A string representing one of the three predefined speeds
113
- * ("slow", "normal", or "fast") or the number of milliseconds
114
- * (e.g. 1000) to run the animation specified in fxHide.
115
- * Default value: fxSpeed.
116
- * @option Boolean fxAutoHeight Boolean flag that if set to true causes all tab heights
117
- * to be constant (being the height of the tallest tab).
118
- * Default value: false.
119
- * @option Function onClick A function to be invoked upon tab switch, immediatly after a tab has
120
- * been clicked, e.g. before the other's tab content gets hidden. The
121
- * function gets passed three arguments: the first one is the clicked
122
- * tab (e.g. an anchor element), the second one is the DOM element
123
- * containing the content of the clicked tab (e.g. the div), the third
124
- * argument is the one of the tab that gets hidden. If this callback
125
- * returns false, the tab switch is canceled (use to disallow tab
126
- * switching for the reason of a failed form validation for example).
127
- * Default value: null.
128
- * @option Function onHide A function to be invoked upon tab switch, immediatly after one tab's
129
- * content got hidden (with or without an animation) and right before the
130
- * next tab is revealed. The function gets passed three arguments: the
131
- * first one is the clicked tab (e.g. an anchor element), the second one
132
- * is the DOM element containing the content of the clicked tab, (e.g. the
133
- * div), the third argument is the one of the tab that gets hidden.
134
- * Default value: null.
135
- * @option Function onShow A function to be invoked upon tab switch. This function is invoked
136
- * after the new tab has been revealed, e.g. after the switch is completed.
137
- * The function gets passed three arguments: the first one is the clicked
138
- * tab (e.g. an anchor element), the second one is the DOM element
139
- * containing the content of the clicked tab, (e.g. the div), the third
140
- * argument is the one of the tab that gets hidden. Default value: null.
141
- * @option String navClass A CSS class that is used to identify the tabs unordered list by class if
142
- * the required HTML structure differs from the default one.
143
- * Default value: "tabs-nav".
144
- * @option String selectedClass The CSS class attached to the li element representing the
145
- * currently selected (active) tab. Default value: "tabs-selected".
146
- * @option String disabledClass The CSS class attached to the li element representing a disabled
147
- * tab. Default value: "tabs-disabled".
148
- * @option String containerClass A CSS class that is used to identify tab containers by class if
149
- * the required HTML structure differs from the default one.
150
- * Default value: "tabs-container".
151
- * @option String hideClass The CSS class used for hiding inactive tabs. A class is used instead
152
- * of "display: none" in the style attribute to maintain control over
153
- * visibility in other media types than screen, most notably print.
154
- * Default value: "tabs-hide".
155
- * @option String loadingClass The CSS class used for indicating that an Ajax tab is currently
156
- * loading, for example by showing a spinner.
157
- * Default value: "tabs-loading".
158
- * @option String tabStruct @deprecated A CSS selector or basic XPath expression reflecting a
159
- * nested HTML structure that is different from the default single div
160
- * structure (one div with an id inside the overall container holds one
161
- * tab's content). If for instance an additional div is required to wrap
162
- * up the several tab containers such a structure is expressed by "div>div".
163
- * Default value: "div".
164
- * @type jQuery
165
- *
166
- * @name tabs
167
- * @cat Plugins/Tabs
168
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
169
- */
170
- $.fn.tabs = function(initial, settings) {
171
-
172
- // settings
173
- if (typeof initial == 'object') settings = initial; // no initial tab given but a settings object
174
- settings = $.extend({
175
- initial: (initial && typeof initial == 'number' && initial > 0) ? --initial : 0,
176
- disabled: null,
177
- bookmarkable: $.ajaxHistory ? true : false,
178
- remote: false,
179
- spinner: 'Loading&#8230;',
180
- hashPrefix: 'remote-tab-',
181
- fxFade: null,
182
- fxSlide: null,
183
- fxShow: null,
184
- fxHide: null,
185
- fxSpeed: 'normal',
186
- fxShowSpeed: null,
187
- fxHideSpeed: null,
188
- fxAutoHeight: false,
189
- onClick: null,
190
- onHide: null,
191
- onShow: null,
192
- navClass: 'tabs-nav',
193
- selectedClass: 'tabs-selected',
194
- disabledClass: 'tabs-disabled',
195
- containerClass: 'tabs-container',
196
- hideClass: 'tabs-hide',
197
- loadingClass: 'tabs-loading',
198
- tabStruct: 'div'
199
- }, settings || {});
200
-
201
- $.browser.msie6 = $.browser.msie && ($.browser.version && $.browser.version < 7 || /MSIE 6.0/.test(navigator.userAgent)); // do not check for 6.0 alone, userAgent in Windows Vista has "Windows NT 6.0"
202
-
203
- // helper to prevent scroll to fragment
204
- function unFocus() {
205
- scrollTo(0, 0);
206
- }
207
-
208
- // initialize tabs
209
- return this.each(function() {
210
-
211
- // remember wrapper for later
212
- var container = this;
213
-
214
- // setup nav
215
- var nav = $('ul.' + settings.navClass, container);
216
- nav = nav.size() && nav || $('>ul:eq(0)', container); // fallback to default structure
217
- var tabs = $('a', nav);
218
-
219
- // prepare remote tabs
220
- if (settings.remote) {
221
- tabs.each(function() {
222
- var id = settings.hashPrefix + (++$.tabs.remoteCount), hash = '#' + id, url = this.href;
223
- this.href = hash;
224
- $('<div id="' + id + '" class="' + settings.containerClass + '"></div>').appendTo(container);
225
-
226
- $(this).bind('loadRemoteTab', function(e, callback) {
227
- var $$ = $(this).addClass(settings.loadingClass), span = $('span', this)[0], tabTitle = span.innerHTML;
228
- if (settings.spinner) {
229
- // TODO if spinner is image
230
- span.innerHTML = '<em>' + settings.spinner + '</em>'; // WARNING: html(...) crashes Safari with jQuery 1.1.2
231
- }
232
- setTimeout(function() { // Timeout is again required in IE, "wait" for id being restored
233
- $(hash).load(url, function() {
234
- if (settings.spinner) {
235
- span.innerHTML = tabTitle; // WARNING: html(...) crashes Safari with jQuery 1.1.2
236
- }
237
- $$.removeClass(settings.loadingClass);
238
- callback && callback();
239
- });
240
- }, 0);
241
- });
242
-
243
- });
244
- }
245
-
246
- // set up containers
247
- var containers = $('div.' + settings.containerClass, container);
248
- containers = containers.size() && containers || $('>' + settings.tabStruct, container); // fallback to default structure
249
-
250
- // attach classes for styling if not present
251
- nav.is('.' + settings.navClass) || nav.addClass(settings.navClass);
252
- containers.each(function() {
253
- var $$ = $(this);
254
- $$.is('.' + settings.containerClass) || $$.addClass(settings.containerClass);
255
- });
256
-
257
- // try to retrieve active tab from class in HTML
258
- var hasSelectedClass = $('li', nav).index( $('li.' + settings.selectedClass, nav)[0] );
259
- if (hasSelectedClass >= 0) {
260
- settings.initial = hasSelectedClass;
261
- }
262
-
263
- // try to retrieve active tab from hash in url, will override class in HTML
264
- if (location.hash) {
265
- tabs.each(function(i) {
266
- if (this.hash == location.hash) {
267
- settings.initial = i;
268
- // prevent page scroll to fragment
269
- if (($.browser.msie || $.browser.opera) && !settings.remote) {
270
- var toShow = $(location.hash);
271
- var toShowId = toShow.attr('id');
272
- toShow.attr('id', '');
273
- setTimeout(function() {
274
- toShow.attr('id', toShowId); // restore id
275
- }, 500);
276
- }
277
- unFocus();
278
- return false; // break
279
- }
280
- });
281
- }
282
- if ($.browser.msie) {
283
- unFocus(); // fix IE focussing bottom of the page for some unknown reason
284
- }
285
-
286
- // highlight tab accordingly
287
- containers.filter(':eq(' + settings.initial + ')').show().end().not(':eq(' + settings.initial + ')').addClass(settings.hideClass);
288
- $('li', nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass); // we need to remove classes eventually if hash takes precedence over class
289
- // trigger load of initial tab
290
- tabs.eq(settings.initial).trigger('loadRemoteTab').end();
291
-
292
- // setup auto height
293
- if (settings.fxAutoHeight) {
294
- // helper
295
- var _setAutoHeight = function(reset) {
296
- // get tab heights in top to bottom ordered array
297
- var heights = $.map(containers.get(), function(el) {
298
- var h, jq = $(el);
299
- if (reset) {
300
- if ($.browser.msie6) {
301
- el.style.removeExpression('behaviour');
302
- el.style.height = '';
303
- el.minHeight = null;
304
- }
305
- h = jq.css({'min-height': ''}).height(); // use jQuery's height() to get hidden element values
306
- } else {
307
- h = jq.height(); // use jQuery's height() to get hidden element values
308
- }
309
- return h;
310
- }).sort(function(a, b) {
311
- return b - a;
312
- });
313
- if ($.browser.msie6) {
314
- containers.each(function() {
315
- this.minHeight = heights[0] + 'px';
316
- this.style.setExpression('behaviour', 'this.style.height = this.minHeight ? this.minHeight : "1px"'); // using an expression to not make print styles useless
317
- });
318
- } else {
319
- containers.css({'min-height': heights[0] + 'px'});
320
- }
321
- };
322
- // call once for initialization
323
- _setAutoHeight();
324
- // trigger auto height adjustment if needed
325
- var cachedWidth = container.offsetWidth;
326
- var cachedHeight = container.offsetHeight;
327
- var watchFontSize = $('#tabs-watch-font-size').get(0) || $('<span id="tabs-watch-font-size">M</span>').css({display: 'block', position: 'absolute', visibility: 'hidden'}).appendTo(document.body).get(0);
328
- var cachedFontSize = watchFontSize.offsetHeight;
329
- setInterval(function() {
330
- var currentWidth = container.offsetWidth;
331
- var currentHeight = container.offsetHeight;
332
- var currentFontSize = watchFontSize.offsetHeight;
333
- if (currentHeight > cachedHeight || currentWidth != cachedWidth || currentFontSize != cachedFontSize) {
334
- _setAutoHeight((currentWidth > cachedWidth || currentFontSize < cachedFontSize)); // if heights gets smaller reset min-height
335
- cachedWidth = currentWidth;
336
- cachedHeight = currentHeight;
337
- cachedFontSize = currentFontSize;
338
- }
339
- }, 50);
340
- }
341
-
342
- // setup animations
343
- var showAnim = {}, hideAnim = {}, showSpeed = settings.fxShowSpeed || settings.fxSpeed, hideSpeed = settings.fxHideSpeed || settings.fxSpeed;
344
- if (settings.fxSlide || settings.fxFade) {
345
- if (settings.fxSlide) {
346
- showAnim['height'] = 'show';
347
- hideAnim['height'] = 'hide';
348
- }
349
- if (settings.fxFade) {
350
- showAnim['opacity'] = 'show';
351
- hideAnim['opacity'] = 'hide';
352
- }
353
- } else {
354
- if (settings.fxShow) {
355
- showAnim = settings.fxShow;
356
- } else { // use some kind of animation to prevent browser scrolling to the tab
357
- showAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox
358
- showSpeed = 1; // as little as 1 is sufficient
359
- }
360
- if (settings.fxHide) {
361
- hideAnim = settings.fxHide;
362
- } else { // use some kind of animation to prevent browser scrolling to the tab
363
- hideAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox
364
- hideSpeed = 1; // as little as 1 is sufficient
365
- }
366
- }
367
-
368
- // callbacks
369
- var onClick = settings.onClick, onHide = settings.onHide, onShow = settings.onShow;
370
-
371
- // attach activateTab event, required for activating a tab programmatically
372
- tabs.bind('triggerTab', function() {
373
-
374
- // if the tab is already selected or disabled or animation is still running stop here
375
- var li = $(this).parents('li:eq(0)');
376
- if (container.locked || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass)) {
377
- return false;
378
- }
379
-
380
- var hash = this.hash;
381
-
382
- if ($.browser.msie) {
383
-
384
- $(this).trigger('click');
385
- if (settings.bookmarkable) {
386
- $.ajaxHistory.update(hash);
387
- location.hash = hash.replace('#', '');
388
- }
389
-
390
- } else if ($.browser.safari) {
391
-
392
- // Simply setting location.hash puts Safari into the eternal load state... ugh! Submit a form instead.
393
- var tempForm = $('<form action="' + hash + '"><div><input type="submit" value="h" /></div></form>').get(0); // no need to append it to the body
394
- tempForm.submit(); // does not trigger the form's submit event...
395
- $(this).trigger('click'); // ...thus do stuff here
396
- if (settings.bookmarkable) {
397
- $.ajaxHistory.update(hash);
398
- }
399
-
400
- } else {
401
-
402
- if (settings.bookmarkable) {
403
- location.hash = hash.replace('#', '');
404
- } else {
405
- $(this).trigger('click');
406
- }
407
-
408
- }
409
-
410
- });
411
-
412
- // attach disable event, required for disabling a tab
413
- tabs.bind('disableTab', function() {
414
- var li = $(this).parents('li:eq(0)');
415
- if ($.browser.safari) { /* fix opacity of tab after disabling in Safari... */
416
- li.animate({ opacity: 0 }, 1, function() {
417
- li.css({opacity: ''});
418
- });
419
- }
420
- li.addClass(settings.disabledClass);
421
-
422
- });
423
-
424
- // disabled from settings
425
- if (settings.disabled && settings.disabled.length) {
426
- for (var i = 0, k = settings.disabled.length; i < k; i++) {
427
- tabs.eq(--settings.disabled[i]).trigger('disableTab').end();
428
- }
429
- };
430
-
431
- // attach enable event, required for reenabling a tab
432
- tabs.bind('enableTab', function() {
433
- var li = $(this).parents('li:eq(0)');
434
- li.removeClass(settings.disabledClass);
435
- if ($.browser.safari) { /* fix disappearing tab after enabling in Safari... */
436
- li.animate({ opacity: 1 }, 1, function() {
437
- li.css({opacity: ''});
438
- });
439
- }
440
- });
441
-
442
- // attach click event
443
- tabs.bind('click', function(e) {
444
-
445
- var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
446
- var clicked = this, li = $(this).parents('li:eq(0)'), toShow = $(this.hash), toHide = containers.filter(':visible');
447
-
448
- // if animation is still running, tab is selected or disabled or onClick callback returns false stop here
449
- // check if onClick returns false last so that it is not executed for a disabled tab
450
- if (container['locked'] || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass) || typeof onClick == 'function' && onClick(this, toShow[0], toHide[0]) === false) {
451
- this.blur();
452
- return false;
453
- }
454
-
455
- container['locked'] = true;
456
-
457
- // show new tab
458
- if (toShow.size()) {
459
-
460
- // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
461
- if ($.browser.msie && settings.bookmarkable) {
462
- var toShowId = this.hash.replace('#', '');
463
- toShow.attr('id', '');
464
- setTimeout(function() {
465
- toShow.attr('id', toShowId); // restore id
466
- }, 0);
467
- }
468
-
469
- var resetCSS = { display: '', overflow: '', height: '' };
470
- if (!$.browser.msie) { // not in IE to prevent ClearType font issue
471
- resetCSS['opacity'] = '';
472
- }
473
-
474
- // switch tab, animation prevents browser scrolling to the fragment
475
- function switchTab() {
476
- if (settings.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
477
- $.ajaxHistory.update(clicked.hash);
478
- }
479
- toHide.animate(hideAnim, hideSpeed, function() { //
480
- $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass);
481
- toHide.addClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
482
- if (typeof onHide == 'function') {
483
- onHide(clicked, toShow[0], toHide[0]);
484
- }
485
- if (!(settings.fxSlide || settings.fxFade || settings.fxShow)) {
486
- toShow.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab containers
487
- }
488
- toShow.animate(showAnim, showSpeed, function() {
489
- toShow.removeClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
490
- if ($.browser.msie) {
491
- toHide[0].style.filter = '';
492
- toShow[0].style.filter = '';
493
- }
494
- if (typeof onShow == 'function') {
495
- onShow(clicked, toShow[0], toHide[0]);
496
- }
497
- container['locked'] = null;
498
- });
499
- });
500
- }
501
-
502
- if (!settings.remote) {
503
- switchTab();
504
- } else {
505
- $(clicked).trigger('loadRemoteTab', [switchTab]);
506
- }
507
-
508
- } else {
509
- alert('There is no such container.');
510
- }
511
-
512
- // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
513
- var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
514
- var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
515
- setTimeout(function() {
516
- window.scrollTo(scrollX, scrollY);
517
- }, 0);
518
-
519
- this.blur(); // prevent IE from keeping other link focussed when using the back button
520
-
521
- return settings.bookmarkable && !!trueClick; // convert undefined to Boolean for IE
522
-
523
- });
524
-
525
- // enable history support if bookmarking and history is turned on
526
- if (settings.bookmarkable) {
527
- $.ajaxHistory.initialize(function() {
528
- tabs.eq(settings.initial).trigger('click').end();
529
- });
530
- }
531
-
532
- });
533
-
534
- };
535
-
536
- /**
537
- * Activate a tab programmatically with the given position (no zero-based index)
538
- * or its id, e.g. the URL's fragment identifier/hash representing a tab, as if the tab
539
- * itself were clicked.
540
- *
541
- * @example $('#container').triggerTab(2);
542
- * @desc Activate the second tab of the tab interface contained in <div id="container">.
543
- * @example $('#container').triggerTab(1);
544
- * @desc Activate the first tab of the tab interface contained in <div id="container">.
545
- * @example $('#container').triggerTab();
546
- * @desc Activate the first tab of the tab interface contained in <div id="container">.
547
- * @example $('#container').triggerTab('fragment-2');
548
- * @desc Activate a tab via its URL fragment identifier representation.
549
- *
550
- * @param String|Number tab Either a string that matches the id of the tab (the URL's
551
- * fragment identifier/hash representing a tab) or an integer
552
- * specifying the position of the tab (no zero-based index) to
553
- * be activated. If this parameter is omitted, the first tab
554
- * will be activated.
555
- * @type jQuery
556
- *
557
- * @name triggerTab
558
- * @cat Plugins/Tabs
559
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
560
- */
561
-
562
- /**
563
- * Disable a tab, so that clicking it has no effect.
564
- *
565
- * @example $('#container').disableTab(2);
566
- * @desc Disable the second tab of the tab interface contained in <div id="container">.
567
- *
568
- * @param String|Number tab Either a string that matches the id of the tab (the URL's
569
- * fragment identifier/hash representing a tab) or an integer
570
- * specifying the position of the tab (no zero-based index) to
571
- * be disabled. If this parameter is omitted, the first tab
572
- * will be disabled.
573
- * @type jQuery
574
- *
575
- * @name disableTab
576
- * @cat Plugins/Tabs
577
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
578
- */
579
-
580
- /**
581
- * Enable a tab that has been disabled.
582
- *
583
- * @example $('#container').enableTab(2);
584
- * @desc Enable the second tab of the tab interface contained in <div id="container">.
585
- *
586
- * @param String|Number tab Either a string that matches the id of the tab (the URL's
587
- * fragment identifier/hash representing a tab) or an integer
588
- * specifying the position of the tab (no zero-based index) to
589
- * be enabled. If this parameter is omitted, the first tab
590
- * will be enabled.
591
- * @type jQuery
592
- *
593
- * @name enableTab
594
- * @cat Plugins/Tabs
595
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
596
- */
597
-
598
- var tabEvents = ['triggerTab', 'disableTab', 'enableTab'];
599
- for (var i = 0; i < tabEvents.length; i++) {
600
- $.fn[tabEvents[i]] = (function(tabEvent) {
601
- return function(tab) {
602
- return this.each(function() {
603
- var nav = $('ul.tabs-nav' , this);
604
- nav = nav.size() && nav || $('>ul:eq(0)', this); // fallback to default structure
605
- var a;
606
- if (!tab || typeof tab == 'number') {
607
- a = $('li a', nav).eq((tab && tab > 0 && tab - 1 || 0)); // fall back to 0
608
- } else if (typeof tab == 'string') {
609
- a = $('li a[@href$="#' + tab + '"]', nav);
610
- }
611
- a.trigger(tabEvent);
612
- });
613
- };
614
- })(tabEvents[i]);
615
- }
616
-
617
- /**
618
- * Get the position of the currently selected tab (no zero-based index).
619
- *
620
- * @example $('#container').activeTab();
621
- * @desc Get the position of the currently selected tab of an interface
622
- * contained in <div id="container">.
623
- *
624
- * @type Number
625
- *
626
- * @name activeTab
627
- * @cat Plugins/Tabs
628
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
629
- */
630
-
631
- $.fn.activeTab = function() {
632
- var selectedTabs = [];
633
- this.each(function() {
634
- var nav = $('ul.tabs-nav' , this);
635
- nav = nav.size() && nav || $('>ul:eq(0)', this); //fallback to default structure
636
- var lis = $('li', nav);
637
- selectedTabs.push(lis.index( lis.filter('.tabs-selected')[0] ) + 1);
638
- });
639
- return selectedTabs[0];
640
- };
641
-
642
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/jquery.tabs.pack.js DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * Tabs - jQuery plugin for accessible, unobtrusive tabs
3
- * @requires jQuery v1.1.1
4
- *
5
- * http://stilbuero.de/tabs/
6
- *
7
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
8
- * Dual licensed under the MIT and GPL licenses:
9
- * http://www.opensource.org/licenses/mit-license.php
10
- * http://www.gnu.org/licenses/gpl.html
11
- *
12
- * Version: 2.7.4
13
- */
14
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){$.2l({z:{2k:0}});$.1P.z=4(x,w){3(O x==\'2Y\')w=x;w=$.2l({K:(x&&O x==\'1Z\'&&x>0)?--x:0,12:C,J:$.1f?2h:T,18:T,1r:\'2X&#2Q;\',21:\'18-2F-\',1m:C,1u:C,1l:C,1F:C,1x:\'2u\',2r:C,2p:C,2m:T,2i:C,1d:C,1c:C,1j:\'z-1M\',H:\'z-2b\',14:\'z-12\',16:\'z-26\',1q:\'z-1H\',1L:\'z-2L\',2j:\'10\'},w||{});$.8.1D=$.8.U&&($.8.1Y&&$.8.1Y<7||/2A 6.0/.2y(2x.2w));4 1w(){1V(0,0)}F 5.Y(4(){2 p=5;2 r=$(\'13.\'+w.1j,p);r=r.V()&&r||$(\'>13:9(0)\',p);2 j=$(\'a\',r);3(w.18){j.Y(4(){2 c=w.21+(++$.z.2k),B=\'#\'+c,2f=5.1O;5.1O=B;$(\'<10 S="\'+c+\'" 34="\'+w.16+\'"></10>\').2c(p);$(5).19(\'1B\',4(e,a){2 b=$(5).I(w.1L),X=$(\'X\',5)[0],27=X.1J;3(w.1r){X.1J=\'<24>\'+w.1r+\'</24>\'}1p(4(){$(B).2T(2f,4(){3(w.1r){X.1J=27}b.17(w.1L);a&&a()})},0)})})}2 n=$(\'10.\'+w.16,p);n=n.V()&&n||$(\'>\'+w.2j,p);r.P(\'.\'+w.1j)||r.I(w.1j);n.Y(4(){2 a=$(5);a.P(\'.\'+w.16)||a.I(w.16)});2 s=$(\'A\',r).20($(\'A.\'+w.H,r)[0]);3(s>=0){w.K=s}3(1e.B){j.Y(4(i){3(5.B==1e.B){w.K=i;3(($.8.U||$.8.2E)&&!w.18){2 a=$(1e.B);2 b=a.15(\'S\');a.15(\'S\',\'\');1p(4(){a.15(\'S\',b)},2D)}1w();F T}})}3($.8.U){1w()}n.1a(\':9(\'+w.K+\')\').1C().1n().2C(\':9(\'+w.K+\')\').I(w.1q);$(\'A\',r).17(w.H).9(w.K).I(w.H);j.9(w.K).N(\'1B\').1n();3(w.2m){2 l=4(d){2 c=$.2B(n.1t(),4(a){2 h,1A=$(a);3(d){3($.8.1D){a.Z.2z(\'1X\');a.Z.G=\'\';a.1k=C}h=1A.L({\'1h-G\':\'\'}).G()}E{h=1A.G()}F h}).2v(4(a,b){F b-a});3($.8.1D){n.Y(4(){5.1k=c[0]+\'1W\';5.Z.2t(\'1X\',\'5.Z.G = 5.1k ? 5.1k : "2s"\')})}E{n.L({\'1h-G\':c[0]+\'1W\'})}};l();2 q=p.1U;2 m=p.1v;2 v=$(\'#z-2q-2o-V\').1t(0)||$(\'<X S="z-2q-2o-V">M</X>\').L({1T:\'2n\',3a:\'39\',38:\'37\'}).2c(Q.1S).1t(0);2 o=v.1v;36(4(){2 b=p.1U;2 a=p.1v;2 c=v.1v;3(a>m||b!=q||c!=o){l((b>q||c<o));q=b;m=a;o=c}},35)}2 u={},11={},1R=w.2r||w.1x,1Q=w.2p||w.1x;3(w.1u||w.1m){3(w.1u){u[\'G\']=\'1C\';11[\'G\']=\'1H\'}3(w.1m){u[\'W\']=\'1C\';11[\'W\']=\'1H\'}}E{3(w.1l){u=w.1l}E{u[\'1h-2g\']=0;1R=1}3(w.1F){11=w.1F}E{11[\'1h-2g\']=0;1Q=1}}2 t=w.2i,1d=w.1d,1c=w.1c;j.19(\'2e\',4(){2 c=$(5).1g(\'A:9(0)\');3(p.1i||c.P(\'.\'+w.H)||c.P(\'.\'+w.14)){F T}2 a=5.B;3($.8.U){$(5).N(\'1b\');3(w.J){$.1f.1N(a);1e.B=a.1z(\'#\',\'\')}}E 3($.8.1y){2 b=$(\'<2d 33="\'+a+\'"><10><32 31="2a" 30="h" /></10></2d>\').1t(0);b.2a();$(5).N(\'1b\');3(w.J){$.1f.1N(a)}}E{3(w.J){1e.B=a.1z(\'#\',\'\')}E{$(5).N(\'1b\')}}});j.19(\'1E\',4(){2 a=$(5).1g(\'A:9(0)\');3($.8.1y){a.1o({W:0},1,4(){a.L({W:\'\'})})}a.I(w.14)});3(w.12&&w.12.1K){29(2 i=0,k=w.12.1K;i<k;i++){j.9(--w.12[i]).N(\'1E\').1n()}};j.19(\'28\',4(){2 a=$(5).1g(\'A:9(0)\');a.17(w.14);3($.8.1y){a.1o({W:1},1,4(){a.L({W:\'\'})})}});j.19(\'1b\',4(e){2 g=e.2Z;2 d=5,A=$(5).1g(\'A:9(0)\'),D=$(5.B),R=n.1a(\':2W\');3(p[\'1i\']||A.P(\'.\'+w.H)||A.P(\'.\'+w.14)||O t==\'4\'&&t(5,D[0],R[0])===T){5.25();F T}p[\'1i\']=2h;3(D.V()){3($.8.U&&w.J){2 c=5.B.1z(\'#\',\'\');D.15(\'S\',\'\');1p(4(){D.15(\'S\',c)},0)}2 f={1T:\'\',2V:\'\',G:\'\'};3(!$.8.U){f[\'W\']=\'\'}4 1I(){3(w.J&&g){$.1f.1N(d.B)}R.1o(11,1Q,4(){$(d).1g(\'A:9(0)\').I(w.H).2U().17(w.H);R.I(w.1q).L(f);3(O 1d==\'4\'){1d(d,D[0],R[0])}3(!(w.1u||w.1m||w.1l)){D.L(\'1T\',\'2n\')}D.1o(u,1R,4(){D.17(w.1q).L(f);3($.8.U){R[0].Z.1a=\'\';D[0].Z.1a=\'\'}3(O 1c==\'4\'){1c(d,D[0],R[0])}p[\'1i\']=C})})}3(!w.18){1I()}E{$(d).N(\'1B\',[1I])}}E{2S(\'2R P 2P 2O 26.\')}2 a=1G.2N||Q.1s&&Q.1s.23||Q.1S.23||0;2 b=1G.2M||Q.1s&&Q.1s.22||Q.1S.22||0;1p(4(){1G.1V(a,b)},0);5.25();F w.J&&!!g});3(w.J){$.1f.2K(4(){j.9(w.K).N(\'1b\').1n()})}})};2 y=[\'2e\',\'1E\',\'28\'];29(2 i=0;i<y.1K;i++){$.1P[y[i]]=(4(d){F 4(c){F 5.Y(4(){2 b=$(\'13.z-1M\',5);b=b.V()&&b||$(\'>13:9(0)\',5);2 a;3(!c||O c==\'1Z\'){a=$(\'A a\',b).9((c&&c>0&&c-1||0))}E 3(O c==\'2J\'){a=$(\'A a[@1O$="#\'+c+\'"]\',b)}a.N(d)})}})(y[i])}$.1P.2I=4(){2 c=[];5.Y(4(){2 a=$(\'13.z-1M\',5);a=a.V()&&a||$(\'>13:9(0)\',5);2 b=$(\'A\',a);c.2H(b.20(b.1a(\'.z-2b\')[0])+1)});F c[0]}})(2G);',62,197,'||var|if|function|this|||browser|eq||||||||||||||||||||||||||tabs|li|hash|null|toShow|else|return|height|selectedClass|addClass|bookmarkable|initial|css||trigger|typeof|is|document|toHide|id|false|msie|size|opacity|span|each|style|div|hideAnim|disabled|ul|disabledClass|attr|containerClass|removeClass|remote|bind|filter|click|onShow|onHide|location|ajaxHistory|parents|min|locked|navClass|minHeight|fxShow|fxFade|end|animate|setTimeout|hideClass|spinner|documentElement|get|fxSlide|offsetHeight|unFocus|fxSpeed|safari|replace|jq|loadRemoteTab|show|msie6|disableTab|fxHide|window|hide|switchTab|innerHTML|length|loadingClass|nav|update|href|fn|hideSpeed|showSpeed|body|display|offsetWidth|scrollTo|px|behaviour|version|number|index|hashPrefix|scrollTop|scrollLeft|em|blur|container|tabTitle|enableTab|for|submit|selected|appendTo|form|triggerTab|url|width|true|onClick|tabStruct|remoteCount|extend|fxAutoHeight|block|font|fxHideSpeed|watch|fxShowSpeed|1px|setExpression|normal|sort|userAgent|navigator|test|removeExpression|MSIE|map|not|500|opera|tab|jQuery|push|activeTab|string|initialize|loading|pageYOffset|pageXOffset|such|no|8230|There|alert|load|siblings|overflow|visible|Loading|object|clientX|value|type|input|action|class|50|setInterval|hidden|visibility|absolute|position'.split('|'),0,{}))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/jquery.ui.tabs.js CHANGED
@@ -1,532 +1,532 @@
1
- /*
2
- * Tabs 3 - New Wave Tabs
3
- *
4
- * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
5
- * Dual licensed under the MIT (MIT-LICENSE.txt)
6
- * and GPL (GPL-LICENSE.txt) licenses.
7
- *
8
- * http://docs.jquery.com/UI/Tabs
9
- */
10
-
11
- (function($) {
12
-
13
- // if the UI scope is not availalable, add it
14
- $.ui = $.ui || {};
15
-
16
- // tabs API methods
17
- $.fn.tabs = function() {
18
- var method = typeof arguments[0] == 'string' && arguments[0];
19
- var args = method && Array.prototype.slice.call(arguments, 1) || arguments;
20
-
21
- return method == 'length' ?
22
- $.data(this[0], 'ui-tabs').$tabs.length :
23
- this.each(function() {
24
- if (method) {
25
- var tabs = $.data(this, 'ui-tabs');
26
- tabs[method].apply(tabs, args);
27
- } else
28
- new $.ui.tabs(this, args[0] || {});
29
- });
30
- };
31
-
32
- // tabs class
33
- $.ui.tabs = function(el, options) {
34
- var self = this;
35
-
36
- this.element = el;
37
-
38
- this.options = $.extend({
39
-
40
- // basic setup
41
- selected: 0,
42
- unselect: options.selected === null,
43
- event: 'click',
44
- disabled: [],
45
- cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
46
- // TODO bookmarkable: $.ajaxHistory ? true : false,
47
-
48
- // Ajax
49
- spinner: 'Loading&#8230;',
50
- cache: false,
51
- idPrefix: 'ui-tabs-',
52
- ajaxOptions: {},
53
-
54
- // animations
55
- fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
56
-
57
- // templates
58
- tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
59
- panelTemplate: '<div></div>',
60
-
61
- // CSS classes
62
- navClass: 'ui-tabs-nav',
63
- selectedClass: 'ui-tabs-selected',
64
- unselectClass: 'ui-tabs-unselect',
65
- disabledClass: 'ui-tabs-disabled',
66
- panelClass: 'ui-tabs-panel',
67
- hideClass: 'ui-tabs-hide',
68
- loadingClass: 'ui-tabs-loading'
69
-
70
- }, options);
71
-
72
- // doesn't extend with null
73
- if (options.selected === null)
74
- this.options.selected = null;
75
-
76
- this.options.event += '.ui-tabs'; // namespace event
77
- this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie;
78
-
79
- $(el).bind('setData.ui-tabs', function(event, key, value) {
80
- if ((/^selected/).test(key))
81
- self.select(value);
82
- else {
83
- self.options[key] = value;
84
- self.tabify();
85
- }
86
- }).bind('getData.ui-tabs', function(event, key) {
87
- return self.options[key];
88
- });
89
-
90
- // save instance for later
91
- $.data(el, 'ui-tabs', this);
92
-
93
- // create tabs
94
- this.tabify(true);
95
- };
96
-
97
- // instance methods
98
- $.extend($.ui.tabs.prototype, {
99
- tabId: function(a) {
100
- return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
101
- || this.options.idPrefix + $.data(a);
102
- },
103
- ui: function(tab, panel) {
104
- return {
105
- instance: this,
106
- options: this.options,
107
- tab: tab,
108
- panel: panel
109
- };
110
- },
111
- tabify: function(init) {
112
-
113
- this.$lis = $('li:has(a[href])', this.element);
114
- this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
115
- this.$panels = $([]);
116
-
117
- var self = this, o = this.options;
118
-
119
- this.$tabs.each(function(i, a) {
120
- // inline tab
121
- if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
122
- self.$panels = self.$panels.add(a.hash);
123
- // remote tab
124
- else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
125
- $.data(a, 'href.ui-tabs', a.href); // required for restore on destroy
126
- $.data(a, 'load.ui-tabs', a.href); // mutable
127
- var id = self.tabId(a);
128
- a.href = '#' + id;
129
- var $panel = $('#' + id);
130
- if (!$panel.length) {
131
- $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
132
- .insertAfter( self.$panels[i - 1] || self.element );
133
- $panel.data('destroy.ui-tabs', true);
134
- }
135
- self.$panels = self.$panels.add( $panel );
136
- }
137
- // invalid tab href
138
- else
139
- o.disabled.push(i + 1);
140
- });
141
-
142
- if (init) {
143
-
144
- // attach necessary classes for styling if not present
145
- $(this.element).hasClass(o.navClass) || $(this.element).addClass(o.navClass);
146
- this.$panels.each(function() {
147
- var $this = $(this);
148
- $this.hasClass(o.panelClass) || $this.addClass(o.panelClass);
149
- });
150
-
151
- // Try to retrieve selected tab:
152
- // 1. from fragment identifier in url if present
153
- // 2. from cookie
154
- // 3. from selected class attribute on <li>
155
- // 4. otherwise use given "selected" option
156
- // 5. check if tab is disabled
157
- this.$tabs.each(function(i, a) {
158
- if (location.hash) {
159
- if (a.hash == location.hash) {
160
- o.selected = i;
161
- // prevent page scroll to fragment
162
- //if (($.browser.msie || $.browser.opera) && !o.remote) {
163
- if ($.browser.msie || $.browser.opera) {
164
- var $toShow = $(location.hash), toShowId = $toShow.attr('id');
165
- $toShow.attr('id', '');
166
- setTimeout(function() {
167
- $toShow.attr('id', toShowId); // restore id
168
- }, 500);
169
- }
170
- scrollTo(0, 0);
171
- return false; // break
172
- }
173
- } else if (o.cookie) {
174
- var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
175
- if (index && self.$tabs[index]) {
176
- o.selected = index;
177
- return false; // break
178
- }
179
- } else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) {
180
- o.selected = i;
181
- return false; // break
182
- }
183
- });
184
-
185
- // highlight selected tab
186
- this.$panels.addClass(o.hideClass);
187
- this.$lis.removeClass(o.selectedClass);
188
- if (!o.unselect) {
189
- this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
190
- this.$lis.eq(o.selected).addClass(o.selectedClass);
191
- }
192
-
193
- // load if remote tab
194
- var href = !o.unselect && $.data(this.$tabs[o.selected], 'load.ui-tabs');
195
- if (href)
196
- this.load(o.selected, href);
197
-
198
- // Take disabling tabs via class attribute from HTML
199
- // into account and update option properly...
200
- o.disabled = $.unique(o.disabled.concat(
201
- $.map(this.$lis.filter('.' + o.disabledClass),
202
- function(n, i) { return self.$lis.index(n); } )
203
- )).sort();
204
-
205
- }
206
-
207
- // disable tabs
208
- for (var i = 0, li; li = this.$lis[i]; i++)
209
- $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
210
-
211
- // set up animations
212
- var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
213
- if (o.fx && o.fx.constructor == Array)
214
- hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
215
- else
216
- hideFx = showFx = o.fx || baseFx;
217
-
218
- // reset some styles to maintain print style sheets etc.
219
- var resetCSS = { display: '', overflow: '', height: '' };
220
- if (!$.browser.msie) // not in IE to prevent ClearType font issue
221
- resetCSS.opacity = '';
222
-
223
- // Hide a tab, animation prevents browser scrolling to fragment,
224
- // $show is optional.
225
- function hideTab(clicked, $hide, $show) {
226
- $hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
227
- $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
228
- if ($.browser.msie && hideFx.opacity)
229
- $hide[0].style.filter = '';
230
- if ($show)
231
- showTab(clicked, $show, $hide);
232
- });
233
- }
234
-
235
- // Show a tab, animation prevents browser scrolling to fragment,
236
- // $hide is optional.
237
- function showTab(clicked, $show, $hide) {
238
- if (showFx === baseFx)
239
- $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
240
- $show.animate(showFx, showFx.duration || baseDuration, function() {
241
- $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
242
- if ($.browser.msie && showFx.opacity)
243
- $show[0].style.filter = '';
244
-
245
- // callback
246
- $(self.element).triggerHandler("show.ui-tabs", [self.ui(clicked, $show[0])]);
247
-
248
- });
249
- }
250
-
251
- // switch a tab
252
- function switchTab(clicked, $li, $hide, $show) {
253
- /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
254
- $.ajaxHistory.update(clicked.hash);
255
- }*/
256
- $li.addClass(o.selectedClass)
257
- .siblings().removeClass(o.selectedClass);
258
- hideTab(clicked, $hide, $show);
259
- }
260
-
261
- // attach tab event handler, unbind to avoid duplicates from former tabifying...
262
- this.$tabs.unbind('.ui-tabs').bind(o.event, function() {
263
-
264
- //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
265
- var $li = $(this).parents('li:eq(0)'),
266
- $hide = self.$panels.filter(':visible'),
267
- $show = $(this.hash);
268
-
269
- // If tab is already selected and not unselectable or tab disabled or click callback returns false stop here.
270
- // Check if click handler returns false last so that it is not executed for a disabled tab!
271
- if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass)
272
- || $(self.element).triggerHandler("select.ui-tabs", [self.ui(this, $show[0])]) === false) {
273
- this.blur();
274
- return false;
275
- }
276
-
277
- self.options.selected = self.$tabs.index(this);
278
-
279
- // if tab may be closed
280
- if (o.unselect) {
281
- if ($li.hasClass(o.selectedClass)) {
282
- self.options.selected = null;
283
- $li.removeClass(o.selectedClass);
284
- self.$panels.stop();
285
- hideTab(this, $hide);
286
- this.blur();
287
- return false;
288
- } else if (!$hide.length) {
289
- self.$panels.stop();
290
- var a = this;
291
- self.load(self.$tabs.index(this), function() {
292
- $li.addClass(o.selectedClass).addClass(o.unselectClass);
293
- showTab(a, $show);
294
- });
295
- this.blur();
296
- return false;
297
- }
298
- }
299
-
300
- if (o.cookie)
301
- $.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
302
-
303
- // stop possibly running animations
304
- self.$panels.stop();
305
-
306
- // show new tab
307
- if ($show.length) {
308
-
309
- // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
310
- /*if ($.browser.msie && o.bookmarkable) {
311
- var showId = this.hash.replace('#', '');
312
- $show.attr('id', '');
313
- setTimeout(function() {
314
- $show.attr('id', showId); // restore id
315
- }, 0);
316
- }*/
317
-
318
- var a = this;
319
- self.load(self.$tabs.index(this), function() {
320
- switchTab(a, $li, $hide, $show);
321
- });
322
-
323
- // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
324
- /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
325
- var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
326
- setTimeout(function() {
327
- scrollTo(scrollX, scrollY);
328
- }, 0);*/
329
-
330
- } else
331
- throw 'jQuery UI Tabs: Mismatching fragment identifier.';
332
-
333
- // Prevent IE from keeping other link focussed when using the back button
334
- // and remove dotted border from clicked link. This is controlled in modern
335
- // browsers via CSS, also blur removes focus from address bar in Firefox
336
- // which can become a usability and annoying problem with tabsRotate.
337
- if ($.browser.msie)
338
- this.blur();
339
-
340
- //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
341
- return false;
342
-
343
- });
344
-
345
- // disable click if event is configured to something else
346
- if (!(/^click/).test(o.event))
347
- this.$tabs.bind('click.ui-tabs', function() { return false; });
348
-
349
- },
350
- add: function(url, label, index) {
351
- if (index == undefined)
352
- index = this.$tabs.length; // append by default
353
-
354
- var o = this.options;
355
- var $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{label\}/, label));
356
- $li.data('destroy.ui-tabs', true);
357
-
358
- var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
359
-
360
- // try to find an existing element before creating a new one
361
- var $panel = $('#' + id);
362
- if (!$panel.length) {
363
- $panel = $(o.panelTemplate).attr('id', id)
364
- .addClass(o.panelClass).addClass(o.hideClass);
365
- $panel.data('destroy.ui-tabs', true);
366
- }
367
- if (index >= this.$lis.length) {
368
- $li.appendTo(this.element);
369
- $panel.appendTo(this.element.parentNode);
370
- } else {
371
- $li.insertBefore(this.$lis[index]);
372
- $panel.insertBefore(this.$panels[index]);
373
- }
374
-
375
- o.disabled = $.map(o.disabled,
376
- function(n, i) { return n >= index ? ++n : n });
377
-
378
- this.tabify();
379
-
380
- if (this.$tabs.length == 1) {
381
- $li.addClass(o.selectedClass);
382
- $panel.removeClass(o.hideClass);
383
- var href = $.data(this.$tabs[0], 'load.ui-tabs');
384
- if (href)
385
- this.load(index, href);
386
- }
387
-
388
- // callback
389
- $(this.element).triggerHandler("add.ui-tabs",
390
- [this.ui(this.$tabs[index], this.$panels[index])]
391
- );
392
- },
393
- remove: function(index) {
394
- var o = this.options, $li = this.$lis.eq(index).remove(),
395
- $panel = this.$panels.eq(index).remove();
396
-
397
- // If selected tab was removed focus tab to the right or
398
- // in case the last tab was removed the tab to the left.
399
- if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
400
- this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
401
-
402
- o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
403
- function(n, i) { return n >= index ? --n : n });
404
-
405
- this.tabify();
406
-
407
- // callback
408
- $(this.element).triggerHandler("remove.ui-tabs",
409
- [this.ui($li.find('a')[0], $panel[0])]
410
- );
411
- },
412
- enable: function(index) {
413
- var o = this.options;
414
- if ($.inArray(index, o.disabled) == -1)
415
- return;
416
-
417
- var $li = this.$lis.eq(index).removeClass(o.disabledClass);
418
- if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
419
- $li.css('display', 'inline-block');
420
- setTimeout(function() {
421
- $li.css('display', 'block');
422
- }, 0);
423
- }
424
-
425
- o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
426
-
427
- // callback
428
- $(this.element).triggerHandler("enable.ui-tabs",
429
- [this.ui(this.$tabs[index], this.$panels[index])]
430
- );
431
-
432
- },
433
- disable: function(index) {
434
- var self = this, o = this.options;
435
- if (index != o.selected) { // cannot disable already selected tab
436
- this.$lis.eq(index).addClass(o.disabledClass);
437
-
438
- o.disabled.push(index);
439
- o.disabled.sort();
440
-
441
- // callback
442
- $(this.element).triggerHandler("disable.ui-tabs",
443
- [this.ui(this.$tabs[index], this.$panels[index])]
444
- );
445
- }
446
- },
447
- select: function(index) {
448
- if (typeof index == 'string')
449
- index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
450
- this.$tabs.eq(index).trigger(this.options.event);
451
- },
452
- load: function(index, callback) { // callback is for internal usage only
453
- var self = this, o = this.options,
454
- $a = this.$tabs.eq(index), a = $a[0];
455
-
456
- var url = $a.data('load.ui-tabs');
457
-
458
- // no remote - just finish with callback
459
- if (!url) {
460
- typeof callback == 'function' && callback();
461
- return;
462
- }
463
-
464
- // load remote from here on
465
- if (o.spinner) {
466
- var $span = $('span', a), label = $span.html();
467
- $span.html('<em>' + o.spinner + '</em>');
468
- }
469
- var finish = function() {
470
- self.$tabs.filter('.' + o.loadingClass).each(function() {
471
- $(this).removeClass(o.loadingClass);
472
- if (o.spinner)
473
- $('span', this).html(label);
474
- });
475
- self.xhr = null;
476
- };
477
- var ajaxOptions = $.extend({}, o.ajaxOptions, {
478
- url: url,
479
- success: function(r, s) {
480
- $(a.hash).html(r);
481
- finish();
482
- // This callback is required because the switch has to take
483
- // place after loading has completed.
484
- typeof callback == 'function' && callback();
485
-
486
- if (o.cache)
487
- $.removeData(a, 'load.ui-tabs'); // if loaded once do not load them again
488
-
489
- // callback
490
- $(self.element).triggerHandler("load.ui-tabs",
491
- [self.ui(self.$tabs[index], self.$panels[index])]
492
- );
493
-
494
- o.ajaxOptions.success && o.ajaxOptions.success(r, s);
495
- }
496
- });
497
- if (this.xhr) {
498
- // terminate pending requests from other tabs and restore tab label
499
- this.xhr.abort();
500
- finish();
501
- }
502
- $a.addClass(o.loadingClass);
503
- setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
504
- self.xhr = $.ajax(ajaxOptions);
505
- }, 0);
506
-
507
- },
508
- url: function(index, url) {
509
- this.$tabs.eq(index).data('load.ui-tabs', url);
510
- },
511
- destroy: function() {
512
- var o = this.options;
513
- $(this.element).unbind('.ui-tabs')
514
- .removeClass(o.navClass).removeData('ui-tabs');
515
- this.$tabs.each(function() {
516
- var href = $.data(this, 'href.ui-tabs');
517
- if (href)
518
- this.href = href;
519
- $(this).unbind('.ui-tabs')
520
- .removeData('href.ui-tabs').removeData('load.ui-tabs');
521
- });
522
- this.$lis.add(this.$panels).each(function() {
523
- if ($.data(this, 'destroy.ui-tabs'))
524
- $(this).remove();
525
- else
526
- $(this).removeClass([o.selectedClass, o.unselectClass,
527
- o.disabledClass, o.panelClass, o.hideClass].join(' '));
528
- });
529
- }
530
- });
531
-
532
- })(jQuery);
1
+ /*
2
+ * Tabs 3 - New Wave Tabs
3
+ *
4
+ * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI/Tabs
9
+ */
10
+
11
+ (function($) {
12
+
13
+ // if the UI scope is not availalable, add it
14
+ $.ui = $.ui || {};
15
+
16
+ // tabs API methods
17
+ $.fn.tabs = function() {
18
+ var method = typeof arguments[0] == 'string' && arguments[0];
19
+ var args = method && Array.prototype.slice.call(arguments, 1) || arguments;
20
+
21
+ return method == 'length' ?
22
+ $.data(this[0], 'ui-tabs').$tabs.length :
23
+ this.each(function() {
24
+ if (method) {
25
+ var tabs = $.data(this, 'ui-tabs');
26
+ tabs[method].apply(tabs, args);
27
+ } else
28
+ new $.ui.tabs(this, args[0] || {});
29
+ });
30
+ };
31
+
32
+ // tabs class
33
+ $.ui.tabs = function(el, options) {
34
+ var self = this;
35
+
36
+ this.element = el;
37
+
38
+ this.options = $.extend({
39
+
40
+ // basic setup
41
+ selected: 0,
42
+ unselect: options.selected === null,
43
+ event: 'click',
44
+ disabled: [],
45
+ cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
46
+ // TODO bookmarkable: $.ajaxHistory ? true : false,
47
+
48
+ // Ajax
49
+ spinner: 'Loading&#8230;',
50
+ cache: false,
51
+ idPrefix: 'ui-tabs-',
52
+ ajaxOptions: {},
53
+
54
+ // animations
55
+ fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
56
+
57
+ // templates
58
+ tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
59
+ panelTemplate: '<div></div>',
60
+
61
+ // CSS classes
62
+ navClass: 'ui-tabs-nav',
63
+ selectedClass: 'ui-tabs-selected',
64
+ unselectClass: 'ui-tabs-unselect',
65
+ disabledClass: 'ui-tabs-disabled',
66
+ panelClass: 'ui-tabs-panel',
67
+ hideClass: 'ui-tabs-hide',
68
+ loadingClass: 'ui-tabs-loading'
69
+
70
+ }, options);
71
+
72
+ // doesn't extend with null
73
+ if (options.selected === null)
74
+ this.options.selected = null;
75
+
76
+ this.options.event += '.ui-tabs'; // namespace event
77
+ this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie;
78
+
79
+ $(el).bind('setData.ui-tabs', function(event, key, value) {
80
+ if ((/^selected/).test(key))
81
+ self.select(value);
82
+ else {
83
+ self.options[key] = value;
84
+ self.tabify();
85
+ }
86
+ }).bind('getData.ui-tabs', function(event, key) {
87
+ return self.options[key];
88
+ });
89
+
90
+ // save instance for later
91
+ $.data(el, 'ui-tabs', this);
92
+
93
+ // create tabs
94
+ this.tabify(true);
95
+ };
96
+
97
+ // instance methods
98
+ $.extend($.ui.tabs.prototype, {
99
+ tabId: function(a) {
100
+ return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
101
+ || this.options.idPrefix + $.data(a);
102
+ },
103
+ ui: function(tab, panel) {
104
+ return {
105
+ instance: this,
106
+ options: this.options,
107
+ tab: tab,
108
+ panel: panel
109
+ };
110
+ },
111
+ tabify: function(init) {
112
+
113
+ this.$lis = $('li:has(a[href])', this.element);
114
+ this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
115
+ this.$panels = $([]);
116
+
117
+ var self = this, o = this.options;
118
+
119
+ this.$tabs.each(function(i, a) {
120
+ // inline tab
121
+ if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
122
+ self.$panels = self.$panels.add(a.hash);
123
+ // remote tab
124
+ else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
125
+ $.data(a, 'href.ui-tabs', a.href); // required for restore on destroy
126
+ $.data(a, 'load.ui-tabs', a.href); // mutable
127
+ var id = self.tabId(a);
128
+ a.href = '#' + id;
129
+ var $panel = $('#' + id);
130
+ if (!$panel.length) {
131
+ $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
132
+ .insertAfter( self.$panels[i - 1] || self.element );
133
+ $panel.data('destroy.ui-tabs', true);
134
+ }
135
+ self.$panels = self.$panels.add( $panel );
136
+ }
137
+ // invalid tab href
138
+ else
139
+ o.disabled.push(i + 1);
140
+ });
141
+
142
+ if (init) {
143
+
144
+ // attach necessary classes for styling if not present
145
+ $(this.element).hasClass(o.navClass) || $(this.element).addClass(o.navClass);
146
+ this.$panels.each(function() {
147
+ var $this = $(this);
148
+ $this.hasClass(o.panelClass) || $this.addClass(o.panelClass);
149
+ });
150
+
151
+ // Try to retrieve selected tab:
152
+ // 1. from fragment identifier in url if present
153
+ // 2. from cookie
154
+ // 3. from selected class attribute on <li>
155
+ // 4. otherwise use given "selected" option
156
+ // 5. check if tab is disabled
157
+ this.$tabs.each(function(i, a) {
158
+ if (location.hash) {
159
+ if (a.hash == location.hash) {
160
+ o.selected = i;
161
+ // prevent page scroll to fragment
162
+ //if (($.browser.msie || $.browser.opera) && !o.remote) {
163
+ if ($.browser.msie || $.browser.opera) {
164
+ var $toShow = $(location.hash), toShowId = $toShow.attr('id');
165
+ $toShow.attr('id', '');
166
+ setTimeout(function() {
167
+ $toShow.attr('id', toShowId); // restore id
168
+ }, 500);
169
+ }
170
+ scrollTo(0, 0);
171
+ return false; // break
172
+ }
173
+ } else if (o.cookie) {
174
+ var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
175
+ if (index && self.$tabs[index]) {
176
+ o.selected = index;
177
+ return false; // break
178
+ }
179
+ } else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) {
180
+ o.selected = i;
181
+ return false; // break
182
+ }
183
+ });
184
+
185
+ // highlight selected tab
186
+ this.$panels.addClass(o.hideClass);
187
+ this.$lis.removeClass(o.selectedClass);
188
+ if (!o.unselect) {
189
+ this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
190
+ this.$lis.eq(o.selected).addClass(o.selectedClass);
191
+ }
192
+
193
+ // load if remote tab
194
+ var href = !o.unselect && $.data(this.$tabs[o.selected], 'load.ui-tabs');
195
+ if (href)
196
+ this.load(o.selected, href);
197
+
198
+ // Take disabling tabs via class attribute from HTML
199
+ // into account and update option properly...
200
+ o.disabled = $.unique(o.disabled.concat(
201
+ $.map(this.$lis.filter('.' + o.disabledClass),
202
+ function(n, i) { return self.$lis.index(n); } )
203
+ )).sort();
204
+
205
+ }
206
+
207
+ // disable tabs
208
+ for (var i = 0, li; li = this.$lis[i]; i++)
209
+ $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
210
+
211
+ // set up animations
212
+ var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
213
+ if (o.fx && o.fx.constructor == Array)
214
+ hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
215
+ else
216
+ hideFx = showFx = o.fx || baseFx;
217
+
218
+ // reset some styles to maintain print style sheets etc.
219
+ var resetCSS = { display: '', overflow: '', height: '' };
220
+ if (!$.browser.msie) // not in IE to prevent ClearType font issue
221
+ resetCSS.opacity = '';
222
+
223
+ // Hide a tab, animation prevents browser scrolling to fragment,
224
+ // $show is optional.
225
+ function hideTab(clicked, $hide, $show) {
226
+ $hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
227
+ $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
228
+ if ($.browser.msie && hideFx.opacity)
229
+ $hide[0].style.filter = '';
230
+ if ($show)
231
+ showTab(clicked, $show, $hide);
232
+ });
233
+ }
234
+
235
+ // Show a tab, animation prevents browser scrolling to fragment,
236
+ // $hide is optional.
237
+ function showTab(clicked, $show, $hide) {
238
+ if (showFx === baseFx)
239
+ $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
240
+ $show.animate(showFx, showFx.duration || baseDuration, function() {
241
+ $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
242
+ if ($.browser.msie && showFx.opacity)
243
+ $show[0].style.filter = '';
244
+
245
+ // callback
246
+ $(self.element).triggerHandler("show.ui-tabs", [self.ui(clicked, $show[0])]);
247
+
248
+ });
249
+ }
250
+
251
+ // switch a tab
252
+ function switchTab(clicked, $li, $hide, $show) {
253
+ /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
254
+ $.ajaxHistory.update(clicked.hash);
255
+ }*/
256
+ $li.addClass(o.selectedClass)
257
+ .siblings().removeClass(o.selectedClass);
258
+ hideTab(clicked, $hide, $show);
259
+ }
260
+
261
+ // attach tab event handler, unbind to avoid duplicates from former tabifying...
262
+ this.$tabs.unbind('.ui-tabs').bind(o.event, function() {
263
+
264
+ //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
265
+ var $li = $(this).parents('li:eq(0)'),
266
+ $hide = self.$panels.filter(':visible'),
267
+ $show = $(this.hash);
268
+
269
+ // If tab is already selected and not unselectable or tab disabled or click callback returns false stop here.
270
+ // Check if click handler returns false last so that it is not executed for a disabled tab!
271
+ if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass)
272
+ || $(self.element).triggerHandler("select.ui-tabs", [self.ui(this, $show[0])]) === false) {
273
+ this.blur();
274
+ return false;
275
+ }
276
+
277
+ self.options.selected = self.$tabs.index(this);
278
+
279
+ // if tab may be closed
280
+ if (o.unselect) {
281
+ if ($li.hasClass(o.selectedClass)) {
282
+ self.options.selected = null;
283
+ $li.removeClass(o.selectedClass);
284
+ self.$panels.stop();
285
+ hideTab(this, $hide);
286
+ this.blur();
287
+ return false;
288
+ } else if (!$hide.length) {
289
+ self.$panels.stop();
290
+ var a = this;
291
+ self.load(self.$tabs.index(this), function() {
292
+ $li.addClass(o.selectedClass).addClass(o.unselectClass);
293
+ showTab(a, $show);
294
+ });
295
+ this.blur();
296
+ return false;
297
+ }
298
+ }
299
+
300
+ if (o.cookie)
301
+ $.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
302
+
303
+ // stop possibly running animations
304
+ self.$panels.stop();
305
+
306
+ // show new tab
307
+ if ($show.length) {
308
+
309
+ // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
310
+ /*if ($.browser.msie && o.bookmarkable) {
311
+ var showId = this.hash.replace('#', '');
312
+ $show.attr('id', '');
313
+ setTimeout(function() {
314
+ $show.attr('id', showId); // restore id
315
+ }, 0);
316
+ }*/
317
+
318
+ var a = this;
319
+ self.load(self.$tabs.index(this), function() {
320
+ switchTab(a, $li, $hide, $show);
321
+ });
322
+
323
+ // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
324
+ /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
325
+ var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
326
+ setTimeout(function() {
327
+ scrollTo(scrollX, scrollY);
328
+ }, 0);*/
329
+
330
+ } else
331
+ throw 'jQuery UI Tabs: Mismatching fragment identifier.';
332
+
333
+ // Prevent IE from keeping other link focussed when using the back button
334
+ // and remove dotted border from clicked link. This is controlled in modern
335
+ // browsers via CSS, also blur removes focus from address bar in Firefox
336
+ // which can become a usability and annoying problem with tabsRotate.
337
+ if ($.browser.msie)
338
+ this.blur();
339
+
340
+ //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
341
+ return false;
342
+
343
+ });
344
+
345
+ // disable click if event is configured to something else
346
+ if (!(/^click/).test(o.event))
347
+ this.$tabs.bind('click.ui-tabs', function() { return false; });
348
+
349
+ },
350
+ add: function(url, label, index) {
351
+ if (index == undefined)
352
+ index = this.$tabs.length; // append by default
353
+
354
+ var o = this.options;
355
+ var $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{label\}/, label));
356
+ $li.data('destroy.ui-tabs', true);
357
+
358
+ var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
359
+
360
+ // try to find an existing element before creating a new one
361
+ var $panel = $('#' + id);
362
+ if (!$panel.length) {
363
+ $panel = $(o.panelTemplate).attr('id', id)
364
+ .addClass(o.panelClass).addClass(o.hideClass);
365
+ $panel.data('destroy.ui-tabs', true);
366
+ }
367
+ if (index >= this.$lis.length) {
368
+ $li.appendTo(this.element);
369
+ $panel.appendTo(this.element.parentNode);
370
+ } else {
371
+ $li.insertBefore(this.$lis[index]);
372
+ $panel.insertBefore(this.$panels[index]);
373
+ }
374
+
375
+ o.disabled = $.map(o.disabled,
376
+ function(n, i) { return n >= index ? ++n : n });
377
+
378
+ this.tabify();
379
+
380
+ if (this.$tabs.length == 1) {
381
+ $li.addClass(o.selectedClass);
382
+ $panel.removeClass(o.hideClass);
383
+ var href = $.data(this.$tabs[0], 'load.ui-tabs');
384
+ if (href)
385
+ this.load(index, href);
386
+ }
387
+
388
+ // callback
389
+ $(this.element).triggerHandler("add.ui-tabs",
390
+ [this.ui(this.$tabs[index], this.$panels[index])]
391
+ );
392
+ },
393
+ remove: function(index) {
394
+ var o = this.options, $li = this.$lis.eq(index).remove(),
395
+ $panel = this.$panels.eq(index).remove();
396
+
397
+ // If selected tab was removed focus tab to the right or
398
+ // in case the last tab was removed the tab to the left.
399
+ if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
400
+ this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
401
+
402
+ o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
403
+ function(n, i) { return n >= index ? --n : n });
404
+
405
+ this.tabify();
406
+
407
+ // callback
408
+ $(this.element).triggerHandler("remove.ui-tabs",
409
+ [this.ui($li.find('a')[0], $panel[0])]
410
+ );
411
+ },
412
+ enable: function(index) {
413
+ var o = this.options;
414
+ if ($.inArray(index, o.disabled) == -1)
415
+ return;
416
+
417
+ var $li = this.$lis.eq(index).removeClass(o.disabledClass);
418
+ if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
419
+ $li.css('display', 'inline-block');
420
+ setTimeout(function() {
421
+ $li.css('display', 'block');
422
+ }, 0);
423
+ }
424
+
425
+ o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
426
+
427
+ // callback
428
+ $(this.element).triggerHandler("enable.ui-tabs",
429
+ [this.ui(this.$tabs[index], this.$panels[index])]
430
+ );
431
+
432
+ },
433
+ disable: function(index) {
434
+ var self = this, o = this.options;
435
+ if (index != o.selected) { // cannot disable already selected tab
436
+ this.$lis.eq(index).addClass(o.disabledClass);
437
+
438
+ o.disabled.push(index);
439
+ o.disabled.sort();
440
+
441
+ // callback
442
+ $(this.element).triggerHandler("disable.ui-tabs",
443
+ [this.ui(this.$tabs[index], this.$panels[index])]
444
+ );
445
+ }
446
+ },
447
+ select: function(index) {
448
+ if (typeof index == 'string')
449
+ index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
450
+ this.$tabs.eq(index).trigger(this.options.event);
451
+ },
452
+ load: function(index, callback) { // callback is for internal usage only
453
+ var self = this, o = this.options,
454
+ $a = this.$tabs.eq(index), a = $a[0];
455
+
456
+ var url = $a.data('load.ui-tabs');
457
+
458
+ // no remote - just finish with callback
459
+ if (!url) {
460
+ typeof callback == 'function' && callback();
461
+ return;
462
+ }
463
+
464
+ // load remote from here on
465
+ if (o.spinner) {
466
+ var $span = $('span', a), label = $span.html();
467
+ $span.html('<em>' + o.spinner + '</em>');
468
+ }
469
+ var finish = function() {
470
+ self.$tabs.filter('.' + o.loadingClass).each(function() {
471
+ $(this).removeClass(o.loadingClass);
472
+ if (o.spinner)
473
+ $('span', this).html(label);
474
+ });
475
+ self.xhr = null;
476
+ };
477
+ var ajaxOptions = $.extend({}, o.ajaxOptions, {
478
+ url: url,
479
+ success: function(r, s) {
480
+ $(a.hash).html(r);
481
+ finish();
482
+ // This callback is required because the switch has to take
483
+ // place after loading has completed.
484
+ typeof callback == 'function' && callback();
485
+
486
+ if (o.cache)
487
+ $.removeData(a, 'load.ui-tabs'); // if loaded once do not load them again
488
+
489
+ // callback
490
+ $(self.element).triggerHandler("load.ui-tabs",
491
+ [self.ui(self.$tabs[index], self.$panels[index])]
492
+ );
493
+
494
+ o.ajaxOptions.success && o.ajaxOptions.success(r, s);
495
+ }
496
+ });
497
+ if (this.xhr) {
498
+ // terminate pending requests from other tabs and restore tab label
499
+ this.xhr.abort();
500
+ finish();
501
+ }
502
+ $a.addClass(o.loadingClass);
503
+ setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
504
+ self.xhr = $.ajax(ajaxOptions);
505
+ }, 0);
506
+
507
+ },
508
+ url: function(index, url) {
509
+ this.$tabs.eq(index).data('load.ui-tabs', url);
510
+ },
511
+ destroy: function() {
512
+ var o = this.options;
513
+ $(this.element).unbind('.ui-tabs')
514
+ .removeClass(o.navClass).removeData('ui-tabs');
515
+ this.$tabs.each(function() {
516
+ var href = $.data(this, 'href.ui-tabs');
517
+ if (href)
518
+ this.href = href;
519
+ $(this).unbind('.ui-tabs')
520
+ .removeData('href.ui-tabs').removeData('load.ui-tabs');
521
+ });
522
+ this.$lis.add(this.$panels).each(function() {
523
+ if ($.data(this, 'destroy.ui-tabs'))
524
+ $(this).remove();
525
+ else
526
+ $(this).removeClass([o.selectedClass, o.unselectClass,
527
+ o.disabledClass, o.panelClass, o.hideClass].join(' '));
528
+ });
529
+ }
530
+ });
531
+
532
+ })(jQuery);
admin/js/jquery.ui.tabs.pack.js CHANGED
@@ -1,10 +1,10 @@
1
- /*
2
- * Tabs 3 - New Wave Tabs
3
- *
4
- * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
5
- * Dual licensed under the MIT (MIT-LICENSE.txt)
6
- * and GPL (GPL-LICENSE.txt) licenses.
7
- *
8
- * http://docs.jquery.com/UI/Tabs
9
- */
10
  eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.4=$.4||{};$.2k.3=6(){7 b=1c 1h[0]==\'26\'&&1h[0];7 c=b&&1N.1L.2c.28(1h,1)||1h;k b==\'D\'?$.p(2[0],\'4-3\').$3.D:2.N(6(){5(b){7 a=$.p(2,\'4-3\');a[b].2j(a,c)}E 2h $.4.3(2,c[0]||{})})};$.4.3=6(e,f){7 d=2;2.m=e;2.8=$.1G({q:0,S:f.q===M,16:\'1y\',t:[],G:M,1m:\'2w&#2t;\',1Z:F,1P:\'4-3-\',1j:{},U:M,1O:\'<z><a y="#{y}"><1g>#{1f}</1g></a></z>\',1t:\'<1J></1J>\',1e:\'4-3-2b\',v:\'4-3-q\',1r:\'4-3-S\',Q:\'4-3-t\',V:\'4-3-1a\',I:\'4-3-X\',1q:\'4-3-2T\'},f);5(f.q===M)2.8.q=M;2.8.16+=\'.4-3\';2.8.G=$.G&&$.G.25==2R&&2.8.G;$(e).1b(\'2O.4-3\',6(b,c,a){5((/^q/).23(c))d.1i(a);E{d.8[c]=a;d.Z()}}).1b(\'2M.4-3\',6(a,b){k d.8[b]});$.p(e,\'4-3\',2);2.Z(1l)};$.1G($.4.3.1L,{1w:6(a){k a.1X&&a.1X.T(/\\s/g,\'1T\').T(/[^A-2v-2u-9\\-1T:\\.]/g,\'\')||2.8.1P+$.p(a)},4:6(a,b){k{2r:2,8:2.8,2q:a,1a:b}},Z:6(f){2.$w=$(\'z:2o(a[y])\',2.m);2.$3=2.$w.19(6(){k $(\'a\',2)[0]});2.$l=$([]);7 e=2,o=2.8;2.$3.N(6(i,a){5(a.H&&a.H.T(\'#\',\'\'))e.$l=e.$l.14(a.H);E 5($(a).W(\'y\')!=\'#\'){$.p(a,\'y.4-3\',a.y);$.p(a,\'x.4-3\',a.y);7 b=e.1w(a);a.y=\'#\'+b;7 c=$(\'#\'+b);5(!c.D){c=$(o.1t).W(\'13\',b).u(o.V).2i(e.$l[i-1]||e.m);c.p(\'12.4-3\',1l)}e.$l=e.$l.14(c)}E o.t.1M(i+1)});5(f){$(2.m).J(o.1e)||$(2.m).u(o.1e);2.$l.N(6(){7 a=$(2);a.J(o.V)||a.u(o.V)});2.$3.N(6(i,a){5(1u.H){5(a.H==1u.H){o.q=i;5($.L.11||$.L.2g){7 b=$(1u.H),1K=b.W(\'13\');b.W(\'13\',\'\');1s(6(){b.W(\'13\',1K)},2f)}2e(0,0);k F}}E 5(o.G){7 c=2d($.G(\'4-3\'+$.p(e.m)),10);5(c&&e.$3[c]){o.q=c;k F}}E 5(e.$w.C(i).J(o.v)){o.q=i;k F}});2.$l.u(o.I);2.$w.B(o.v);5(!o.S){2.$l.C(o.q).K().B(o.I);2.$w.C(o.q).u(o.v)}7 h=!o.S&&$.p(2.$3[o.q],\'x.4-3\');5(h)2.x(o.q,h);o.t=$.2a(o.t.29($.19(2.$w.R(\'.\'+o.Q),6(n,i){k e.$w.Y(n)}))).1I()}27(7 i=0,z;z=2.$w[i];i++)$(z)[$.1H(i,o.t)!=-1&&!$(z).J(o.v)?\'u\':\'B\'](o.Q);7 j,O,18={\'2V-2U\':0,1F:1},1E=\'2S\';5(o.U&&o.U.25==1N)j=o.U[0]||18,O=o.U[1]||18;E j=O=o.U||18;7 g={1p:\'\',2Q:\'\',2P:\'\'};5(!$.L.11)g.1D=\'\';6 1C(b,c,a){c.24(j,j.1F||1E,6(){c.u(o.I).17(g);5($.L.11&&j.1D)c[0].22.R=\'\';5(a)1B(b,a,c)})}6 1B(b,a,c){5(O===18)a.17(\'1p\',\'1A\');a.24(O,O.1F||1E,6(){a.B(o.I).17(g);5($.L.11&&O.1D)a[0].22.R=\'\';$(e.m).P("K.4-3",[e.4(b,a[0])])})}6 20(c,a,d,b){a.u(o.v).2N().B(o.v);1C(c,d,b)}2.$3.1z(\'.4-3\').1b(o.16,6(){7 b=$(2).2L(\'z:C(0)\'),$X=e.$l.R(\':2K\'),$K=$(2.H);5((b.J(o.v)&&!o.S)||b.J(o.Q)||$(e.m).P("1i.4-3",[e.4(2,$K[0])])===F){2.1k();k F}e.8.q=e.$3.Y(2);5(o.S){5(b.J(o.v)){e.8.q=M;b.B(o.v);e.$l.1x();1C(2,$X);2.1k();k F}E 5(!$X.D){e.$l.1x();7 a=2;e.x(e.$3.Y(2),6(){b.u(o.v).u(o.1r);1B(a,$K)});2.1k();k F}}5(o.G)$.G(\'4-3\'+$.p(e.m),e.8.q,o.G);e.$l.1x();5($K.D){7 a=2;e.x(e.$3.Y(2),6(){20(a,b,$X,$K)})}E 2J\'1Y 2H 2G: 2E 2D 2C.\';5($.L.11)2.1k();k F});5(!(/^1y/).23(o.16))2.$3.1b(\'1y.4-3\',6(){k F})},14:6(d,e,f){5(f==2B)f=2.$3.D;7 o=2.8;7 a=$(o.1O.T(/#\\{y\\}/,d).T(/#\\{1f\\}/,e));a.p(\'12.4-3\',1l);7 b=d.2A(\'#\')==0?d.T(\'#\',\'\'):2.1w($(\'a:2z-2y\',a)[0]);7 c=$(\'#\'+b);5(!c.D){c=$(o.1t).W(\'13\',b).u(o.V).u(o.I);c.p(\'12.4-3\',1l)}5(f>=2.$w.D){a.1S(2.m);c.1S(2.m.2x)}E{a.21(2.$w[f]);c.21(2.$l[f])}o.t=$.19(o.t,6(n,i){k n>=f?++n:n});2.Z();5(2.$3.D==1){a.u(o.v);c.B(o.I);7 g=$.p(2.$3[0],\'x.4-3\');5(g)2.x(f,g)}$(2.m).P("14.4-3",[2.4(2.$3[f],2.$l[f])])},15:6(a){7 o=2.8,$z=2.$w.C(a).15(),$1a=2.$l.C(a).15();5($z.J(o.v)&&2.$3.D>1)2.1i(a+(a+1<2.$3.D?1:-1));o.t=$.19($.1W(o.t,6(n,i){k n!=a}),6(n,i){k n>=a?--n:n});2.Z();$(2.m).P("15.4-3",[2.4($z.2F(\'a\')[0],$1a[0])])},1U:6(a){7 o=2.8;5($.1H(a,o.t)==-1)k;7 b=2.$w.C(a).B(o.Q);5($.L.2s){b.17(\'1p\',\'2I-1A\');1s(6(){b.17(\'1p\',\'1A\')},0)}o.t=$.1W(o.t,6(n,i){k n!=a});$(2.m).P("1U.4-3",[2.4(2.$3[a],2.$l[a])])},1V:6(a){7 b=2,o=2.8;5(a!=o.q){2.$w.C(a).u(o.Q);o.t.1M(a);o.t.1I();$(2.m).P("1V.4-3",[2.4(2.$3[a],2.$l[a])])}},1i:6(a){5(1c a==\'26\')a=2.$3.Y(2.$3.R(\'[y$=\'+a+\']\')[0]);2.$3.C(a).2p(2.8.16)},x:6(d,b){7 f=2,o=2.8,$a=2.$3.C(d),a=$a[0];7 e=$a.p(\'x.4-3\');5(!e){1c b==\'6\'&&b();k}5(o.1m){7 h=$(\'1g\',a),1f=h.1n();h.1n(\'<1R>\'+o.1m+\'</1R>\')}7 c=6(){f.$3.R(\'.\'+o.1q).N(6(){$(2).B(o.1q);5(o.1m)$(\'1g\',2).1n(1f)});f.1o=M};7 g=$.1G({},o.1j,{1Q:e,1v:6(r,s){$(a.H).1n(r);c();1c b==\'6\'&&b();5(o.1Z)$.1d(a,\'x.4-3\');$(f.m).P("x.4-3",[f.4(f.$3[d],f.$l[d])]);o.1j.1v&&o.1j.1v(r,s)}});5(2.1o){2.1o.2n();c()}$a.u(o.1q);1s(6(){f.1o=$.2m(g)},0)},1Q:6(a,b){2.$3.C(a).p(\'x.4-3\',b)},12:6(){7 o=2.8;$(2.m).1z(\'.4-3\').B(o.1e).1d(\'4-3\');2.$3.N(6(){7 a=$.p(2,\'y.4-3\');5(a)2.y=a;$(2).1z(\'.4-3\').1d(\'y.4-3\').1d(\'x.4-3\')});2.$w.14(2.$l).N(6(){5($.p(2,\'12.4-3\'))$(2).15();E $(2).B([o.v,o.1r,o.Q,o.V,o.I].2l(\' \'))})}})})(1Y);',62,182,'||this|tabs|ui|if|function|var|options||||||||||||return|panels|element|||data|selected|||disabled|addClass|selectedClass|lis|load|href|li||removeClass|eq|length|else|false|cookie|hash|hideClass|hasClass|show|browser|null|each|showFx|triggerHandler|disabledClass|filter|unselect|replace|fx|panelClass|attr|hide|index|tabify||msie|destroy|id|add|remove|event|css|baseFx|map|panel|bind|typeof|removeData|navClass|label|span|arguments|select|ajaxOptions|blur|true|spinner|html|xhr|display|loadingClass|unselectClass|setTimeout|panelTemplate|location|success|tabId|stop|click|unbind|block|showTab|hideTab|opacity|baseDuration|duration|extend|inArray|sort|div|toShowId|prototype|push|Array|tabTemplate|idPrefix|url|em|appendTo|_|enable|disable|grep|title|jQuery|cache|switchTab|insertBefore|style|test|animate|constructor|string|for|call|concat|unique|nav|slice|parseInt|scrollTo|500|opera|new|insertAfter|apply|fn|join|ajax|abort|has|trigger|tab|instance|safari|8230|z0|Za|Loading|parentNode|child|first|indexOf|undefined|identifier|fragment|Mismatching|find|Tabs|UI|inline|throw|visible|parents|getData|siblings|setData|height|overflow|Function|normal|loading|width|min'.split('|'),0,{}))
1
+ /*
2
+ * Tabs 3 - New Wave Tabs
3
+ *
4
+ * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI/Tabs
9
+ */
10
  eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.4=$.4||{};$.2k.3=6(){7 b=1c 1h[0]==\'26\'&&1h[0];7 c=b&&1N.1L.2c.28(1h,1)||1h;k b==\'D\'?$.p(2[0],\'4-3\').$3.D:2.N(6(){5(b){7 a=$.p(2,\'4-3\');a[b].2j(a,c)}E 2h $.4.3(2,c[0]||{})})};$.4.3=6(e,f){7 d=2;2.m=e;2.8=$.1G({q:0,S:f.q===M,16:\'1y\',t:[],G:M,1m:\'2w&#2t;\',1Z:F,1P:\'4-3-\',1j:{},U:M,1O:\'<z><a y="#{y}"><1g>#{1f}</1g></a></z>\',1t:\'<1J></1J>\',1e:\'4-3-2b\',v:\'4-3-q\',1r:\'4-3-S\',Q:\'4-3-t\',V:\'4-3-1a\',I:\'4-3-X\',1q:\'4-3-2T\'},f);5(f.q===M)2.8.q=M;2.8.16+=\'.4-3\';2.8.G=$.G&&$.G.25==2R&&2.8.G;$(e).1b(\'2O.4-3\',6(b,c,a){5((/^q/).23(c))d.1i(a);E{d.8[c]=a;d.Z()}}).1b(\'2M.4-3\',6(a,b){k d.8[b]});$.p(e,\'4-3\',2);2.Z(1l)};$.1G($.4.3.1L,{1w:6(a){k a.1X&&a.1X.T(/\\s/g,\'1T\').T(/[^A-2v-2u-9\\-1T:\\.]/g,\'\')||2.8.1P+$.p(a)},4:6(a,b){k{2r:2,8:2.8,2q:a,1a:b}},Z:6(f){2.$w=$(\'z:2o(a[y])\',2.m);2.$3=2.$w.19(6(){k $(\'a\',2)[0]});2.$l=$([]);7 e=2,o=2.8;2.$3.N(6(i,a){5(a.H&&a.H.T(\'#\',\'\'))e.$l=e.$l.14(a.H);E 5($(a).W(\'y\')!=\'#\'){$.p(a,\'y.4-3\',a.y);$.p(a,\'x.4-3\',a.y);7 b=e.1w(a);a.y=\'#\'+b;7 c=$(\'#\'+b);5(!c.D){c=$(o.1t).W(\'13\',b).u(o.V).2i(e.$l[i-1]||e.m);c.p(\'12.4-3\',1l)}e.$l=e.$l.14(c)}E o.t.1M(i+1)});5(f){$(2.m).J(o.1e)||$(2.m).u(o.1e);2.$l.N(6(){7 a=$(2);a.J(o.V)||a.u(o.V)});2.$3.N(6(i,a){5(1u.H){5(a.H==1u.H){o.q=i;5($.L.11||$.L.2g){7 b=$(1u.H),1K=b.W(\'13\');b.W(\'13\',\'\');1s(6(){b.W(\'13\',1K)},2f)}2e(0,0);k F}}E 5(o.G){7 c=2d($.G(\'4-3\'+$.p(e.m)),10);5(c&&e.$3[c]){o.q=c;k F}}E 5(e.$w.C(i).J(o.v)){o.q=i;k F}});2.$l.u(o.I);2.$w.B(o.v);5(!o.S){2.$l.C(o.q).K().B(o.I);2.$w.C(o.q).u(o.v)}7 h=!o.S&&$.p(2.$3[o.q],\'x.4-3\');5(h)2.x(o.q,h);o.t=$.2a(o.t.29($.19(2.$w.R(\'.\'+o.Q),6(n,i){k e.$w.Y(n)}))).1I()}27(7 i=0,z;z=2.$w[i];i++)$(z)[$.1H(i,o.t)!=-1&&!$(z).J(o.v)?\'u\':\'B\'](o.Q);7 j,O,18={\'2V-2U\':0,1F:1},1E=\'2S\';5(o.U&&o.U.25==1N)j=o.U[0]||18,O=o.U[1]||18;E j=O=o.U||18;7 g={1p:\'\',2Q:\'\',2P:\'\'};5(!$.L.11)g.1D=\'\';6 1C(b,c,a){c.24(j,j.1F||1E,6(){c.u(o.I).17(g);5($.L.11&&j.1D)c[0].22.R=\'\';5(a)1B(b,a,c)})}6 1B(b,a,c){5(O===18)a.17(\'1p\',\'1A\');a.24(O,O.1F||1E,6(){a.B(o.I).17(g);5($.L.11&&O.1D)a[0].22.R=\'\';$(e.m).P("K.4-3",[e.4(b,a[0])])})}6 20(c,a,d,b){a.u(o.v).2N().B(o.v);1C(c,d,b)}2.$3.1z(\'.4-3\').1b(o.16,6(){7 b=$(2).2L(\'z:C(0)\'),$X=e.$l.R(\':2K\'),$K=$(2.H);5((b.J(o.v)&&!o.S)||b.J(o.Q)||$(e.m).P("1i.4-3",[e.4(2,$K[0])])===F){2.1k();k F}e.8.q=e.$3.Y(2);5(o.S){5(b.J(o.v)){e.8.q=M;b.B(o.v);e.$l.1x();1C(2,$X);2.1k();k F}E 5(!$X.D){e.$l.1x();7 a=2;e.x(e.$3.Y(2),6(){b.u(o.v).u(o.1r);1B(a,$K)});2.1k();k F}}5(o.G)$.G(\'4-3\'+$.p(e.m),e.8.q,o.G);e.$l.1x();5($K.D){7 a=2;e.x(e.$3.Y(2),6(){20(a,b,$X,$K)})}E 2J\'1Y 2H 2G: 2E 2D 2C.\';5($.L.11)2.1k();k F});5(!(/^1y/).23(o.16))2.$3.1b(\'1y.4-3\',6(){k F})},14:6(d,e,f){5(f==2B)f=2.$3.D;7 o=2.8;7 a=$(o.1O.T(/#\\{y\\}/,d).T(/#\\{1f\\}/,e));a.p(\'12.4-3\',1l);7 b=d.2A(\'#\')==0?d.T(\'#\',\'\'):2.1w($(\'a:2z-2y\',a)[0]);7 c=$(\'#\'+b);5(!c.D){c=$(o.1t).W(\'13\',b).u(o.V).u(o.I);c.p(\'12.4-3\',1l)}5(f>=2.$w.D){a.1S(2.m);c.1S(2.m.2x)}E{a.21(2.$w[f]);c.21(2.$l[f])}o.t=$.19(o.t,6(n,i){k n>=f?++n:n});2.Z();5(2.$3.D==1){a.u(o.v);c.B(o.I);7 g=$.p(2.$3[0],\'x.4-3\');5(g)2.x(f,g)}$(2.m).P("14.4-3",[2.4(2.$3[f],2.$l[f])])},15:6(a){7 o=2.8,$z=2.$w.C(a).15(),$1a=2.$l.C(a).15();5($z.J(o.v)&&2.$3.D>1)2.1i(a+(a+1<2.$3.D?1:-1));o.t=$.19($.1W(o.t,6(n,i){k n!=a}),6(n,i){k n>=a?--n:n});2.Z();$(2.m).P("15.4-3",[2.4($z.2F(\'a\')[0],$1a[0])])},1U:6(a){7 o=2.8;5($.1H(a,o.t)==-1)k;7 b=2.$w.C(a).B(o.Q);5($.L.2s){b.17(\'1p\',\'2I-1A\');1s(6(){b.17(\'1p\',\'1A\')},0)}o.t=$.1W(o.t,6(n,i){k n!=a});$(2.m).P("1U.4-3",[2.4(2.$3[a],2.$l[a])])},1V:6(a){7 b=2,o=2.8;5(a!=o.q){2.$w.C(a).u(o.Q);o.t.1M(a);o.t.1I();$(2.m).P("1V.4-3",[2.4(2.$3[a],2.$l[a])])}},1i:6(a){5(1c a==\'26\')a=2.$3.Y(2.$3.R(\'[y$=\'+a+\']\')[0]);2.$3.C(a).2p(2.8.16)},x:6(d,b){7 f=2,o=2.8,$a=2.$3.C(d),a=$a[0];7 e=$a.p(\'x.4-3\');5(!e){1c b==\'6\'&&b();k}5(o.1m){7 h=$(\'1g\',a),1f=h.1n();h.1n(\'<1R>\'+o.1m+\'</1R>\')}7 c=6(){f.$3.R(\'.\'+o.1q).N(6(){$(2).B(o.1q);5(o.1m)$(\'1g\',2).1n(1f)});f.1o=M};7 g=$.1G({},o.1j,{1Q:e,1v:6(r,s){$(a.H).1n(r);c();1c b==\'6\'&&b();5(o.1Z)$.1d(a,\'x.4-3\');$(f.m).P("x.4-3",[f.4(f.$3[d],f.$l[d])]);o.1j.1v&&o.1j.1v(r,s)}});5(2.1o){2.1o.2n();c()}$a.u(o.1q);1s(6(){f.1o=$.2m(g)},0)},1Q:6(a,b){2.$3.C(a).p(\'x.4-3\',b)},12:6(){7 o=2.8;$(2.m).1z(\'.4-3\').B(o.1e).1d(\'4-3\');2.$3.N(6(){7 a=$.p(2,\'y.4-3\');5(a)2.y=a;$(2).1z(\'.4-3\').1d(\'y.4-3\').1d(\'x.4-3\')});2.$w.14(2.$l).N(6(){5($.p(2,\'12.4-3\'))$(2).15();E $(2).B([o.v,o.1r,o.Q,o.V,o.I].2l(\' \'))})}})})(1Y);',62,182,'||this|tabs|ui|if|function|var|options||||||||||||return|panels|element|||data|selected|||disabled|addClass|selectedClass|lis|load|href|li||removeClass|eq|length|else|false|cookie|hash|hideClass|hasClass|show|browser|null|each|showFx|triggerHandler|disabledClass|filter|unselect|replace|fx|panelClass|attr|hide|index|tabify||msie|destroy|id|add|remove|event|css|baseFx|map|panel|bind|typeof|removeData|navClass|label|span|arguments|select|ajaxOptions|blur|true|spinner|html|xhr|display|loadingClass|unselectClass|setTimeout|panelTemplate|location|success|tabId|stop|click|unbind|block|showTab|hideTab|opacity|baseDuration|duration|extend|inArray|sort|div|toShowId|prototype|push|Array|tabTemplate|idPrefix|url|em|appendTo|_|enable|disable|grep|title|jQuery|cache|switchTab|insertBefore|style|test|animate|constructor|string|for|call|concat|unique|nav|slice|parseInt|scrollTo|500|opera|new|insertAfter|apply|fn|join|ajax|abort|has|trigger|tab|instance|safari|8230|z0|Za|Loading|parentNode|child|first|indexOf|undefined|identifier|fragment|Mismatching|find|Tabs|UI|inline|throw|visible|parents|getData|siblings|setData|height|overflow|Function|normal|loading|width|min'.split('|'),0,{}))
admin/js/ngg.ajax.js ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Ajax Plugin for NextGEN gallery
3
+ * Version: 1.0.0
4
+ * Author : Alex Rabe
5
+ */
6
+ (function($) {
7
+ nggAjax = {
8
+ settings: {
9
+ url: nggAjaxSetup.url,
10
+ type: "POST",
11
+ action: nggAjaxSetup.action,
12
+ operation : nggAjaxSetup.operation,
13
+ nonce: nggAjaxSetup.nonce,
14
+ ids: nggAjaxSetup.ids,
15
+ permission: nggAjaxSetup.permission,
16
+ error: nggAjaxSetup.error,
17
+ failure: nggAjaxSetup.failure,
18
+ timeout: 10000
19
+ },
20
+
21
+ run: function( index ) {
22
+ s = this.settings;
23
+ var req = $.ajax({
24
+ type: "POST",
25
+ url: s.url,
26
+ data:"action=" + s.action + "&operation=" + s.operation + "&_wpnonce=" + s.nonce + "&image=" + s.ids[index],
27
+ cache: false,
28
+ timeout: 10000,
29
+ success: function(msg){
30
+ switch (msg) {
31
+ case "-1":
32
+ nggProgressBar.addNote( nggAjax.settings.permission );
33
+ break;
34
+ case "0":
35
+ nggProgressBar.addNote( nggAjax.settings.error );
36
+ break;
37
+ case "1":
38
+ // show nothing, its better
39
+ break;
40
+ default:
41
+ // Return the message
42
+ nggProgressBar.addNote( "<strong>ID " + nggAjax.settings.ids[index] + ":</strong> " + nggAjax.settings.failure, msg );
43
+ break;
44
+ }
45
+
46
+ },
47
+ error: function (msg) {
48
+ nggProgressBar.addNote( "<strong>ID " + nggAjax.settings.ids[index] + ":</strong> " + nggAjax.settings.failure, msg );
49
+ },
50
+ complete: function () {
51
+ index++;
52
+ nggProgressBar.increase( index );
53
+ // parse the whole array
54
+ if (index < nggAjax.settings.ids.length)
55
+ nggAjax.run( index );
56
+ else
57
+ nggProgressBar.finished();
58
+ }
59
+ });
60
+ },
61
+
62
+ init: function( s ) {
63
+
64
+ var index = 0;
65
+
66
+ // get the settings
67
+ this.settings = $.extend( {}, this.settings, {}, s || {} );
68
+
69
+ // start the ajax process
70
+ this.run( index );
71
+ }
72
+ }
73
+ }(jQuery));
admin/js/ngg.progressbar.js ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Progress bar Plugin for NextGEN gallery
3
+ * Version: 1.0.0
4
+ * Author : Alex Rabe
5
+ */
6
+ (function($) {
7
+ nggProgressBar = {
8
+
9
+ settings: {
10
+ id: 'progressbar',
11
+ maxStep: 100,
12
+ wait: false,
13
+ header: ''
14
+ },
15
+
16
+ init: function( s ) {
17
+
18
+ s = this.settings = $.extend( {}, this.settings, {}, s || {} );
19
+
20
+ div = $('#' + s.id + '_container');
21
+ width = Math.round( ( 100 / s.maxStep ) * 100 ) /100;
22
+
23
+ if ( div.find("#" + s.id).length == 0) {
24
+ if (s.header.length > 0)
25
+ div.append('<h2>'+ s.header +'</h2>');
26
+ div.append('<div id="' + s.id + '" class="progressborder"><div class="' + s.id + '"><span>0%</span></div></div>');
27
+ }
28
+ },
29
+
30
+ addMessage: function( message ) {
31
+ s = this.settings;
32
+ if ( div.find("#" + s.id + "_message").length == 0)
33
+ div.append('<div class="' + s.id + '_message"><span style="display:block" id="' + s.id + '_message">' + message + '</span></div>');
34
+ else
35
+ $("#" + s.id + "_message").html( message );
36
+ },
37
+
38
+ addNote: function( note, detail ) {
39
+ s = this.settings;
40
+ s.wait = true;
41
+ if ( div.find("#" + s.id + "_note").length == 0)
42
+ div.append('<ul id="' + s.id + '_note">&nbsp;</ul>');
43
+
44
+ if (detail)
45
+ $("#" + s.id + "_note").append("<li>" + note + "<div class='show_details'><span>[more]</span><br />" + detail + "</div></li>");
46
+ else
47
+ $("#" + s.id + "_note").append("<li>" + note + "</li>");
48
+ },
49
+
50
+ increase: function( step ) {
51
+ s = this.settings;
52
+ var value = step * width + "%";
53
+ var rvalue = Math.round (step * width) + "%" ;
54
+ $("#" + s.id + " div").width( value );
55
+ $("#" + s.id + " span").html( rvalue );
56
+ },
57
+
58
+ finished: function() {
59
+ s = this.settings;
60
+ $("#" + s.id + " div").width( '100%' );
61
+ $("#" + s.id + " span").html( '100%' );
62
+ // in the case we add a note , we should wait for a click
63
+ if (s.wait) {
64
+ setTimeout(function() {
65
+ $("#" + s.id).hide("slow");
66
+ }, 2000);
67
+ div.click(function () {
68
+ jQuery('.nggform').prepend("<input type=\"hidden\" name=\"ajax_callback\" value=\"0\">");
69
+ jQuery('.nggform').submit();
70
+ });
71
+ } else {
72
+ div.hide("slow");
73
+ jQuery('.nggform').prepend("<input type=\"hidden\" name=\"ajax_callback\" value=\"1\">");
74
+ jQuery('.nggform').submit();
75
+ }
76
+ }
77
+ };
78
+ })(jQuery);
admin/js/swfobject.js CHANGED
@@ -1,5 +1,5 @@
1
- /* SWFObject v2.1 <http://code.google.com/p/swfobject/>
2
- Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
3
- This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
4
- */
5
  var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
1
+ /* SWFObject v2.1 <http://code.google.com/p/swfobject/>
2
+ Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
3
+ This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
4
+ */
5
  var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
admin/js/swfupload.handler.js CHANGED
@@ -3,15 +3,15 @@
3
  * http://alexrabe.boelinger.com/
4
  *
5
  * Built on top of the swfupload library
6
- * http://swfupload.org
7
  *
8
- * version 1.0.0
9
  */
10
 
11
  // on load change the upload to swfupload
12
  function initSWFUpload() {
13
  jQuery(function() {
14
- jQuery("#uploadimage_btn").after("<input type='button' name='uploadimage' id='swfupload_btn' value='" + ngg_swf_upload.customSettings.upload + "' />")
15
  .remove();
16
  jQuery("#swfupload_btn").click( function() { submitFiles(); } );
17
  jQuery("#imagefiles")
3
  * http://alexrabe.boelinger.com/
4
  *
5
  * Built on top of the swfupload library
6
+ * http://swfupload.org version 2.2.0
7
  *
8
+ * version 1.0.2
9
  */
10
 
11
  // on load change the upload to swfupload
12
  function initSWFUpload() {
13
  jQuery(function() {
14
+ jQuery("#uploadimage_btn").after("<input class='button-primary' type='button' name='uploadimage' id='swfupload_btn' value='" + ngg_swf_upload.customSettings.upload + "' />")
15
  .remove();
16
  jQuery("#swfupload_btn").click( function() { submitFiles(); } );
17
  jQuery("#imagefiles")
admin/js/swfupload.js CHANGED
@@ -1,64 +1,56 @@
1
  /**
2
- * SWFUpload v2.0 by Jacob Roberts, Nov 2007, http://www.swfupload.org, http://linebyline.blogspot.com
3
- * -------- -------- -------- -------- -------- -------- -------- --------
4
- * SWFUpload is (c) 2006 Lars Huring and Mammon Media and is released under the MIT License:
 
 
5
  * http://www.opensource.org/licenses/mit-license.php
6
  *
7
- * See Changelog.txt for version history
 
8
  *
9
- * Development Notes:
10
- * * This version of SWFUpload requires Flash Player 9.0.28 and should autodetect the correct flash version.
11
- * * In Linux Flash Player 9 setting the post file variable name does not work. It is always set to "Filedata".
12
- * * There is a lot of repeated code that could be refactored to single functions. Feel free.
13
- * * It's dangerous to do "circular calls" between Flash and JavaScript. I've taken steps to try to work around issues
14
- * by having the event calls pipe through setTimeout. However you should still avoid calling in to Flash from
15
- * within the event handler methods. Especially the "startUpload" event since it cannot use the setTimeout hack.
16
  */
17
 
18
 
19
- /* *********** */
20
- /* Constructor */
21
- /* *********** */
22
-
23
- var SWFUpload = function (init_settings) {
24
- this.initSWFUpload(init_settings);
25
- };
26
-
27
- SWFUpload.prototype.initSWFUpload = function (init_settings) {
28
- // Remove background flicker in IE (read this: http://misterpixel.blogspot.com/2006/09/forensic-analysis-of-ie6.html)
29
- // This doesn't have anything to do with SWFUpload but can help your UI behave better in IE.
30
- try {
31
- document.execCommand('BackgroundImageCache', false, true);
32
- } catch (ex1) {
33
- }
34
 
 
 
 
 
 
35
 
 
36
  try {
37
  this.customSettings = {}; // A container where developers can place their own settings associated with this instance.
38
- this.settings = {};
39
  this.eventQueue = [];
40
  this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
41
  this.movieElement = null;
42
 
 
43
  // Setup global control tracking
44
  SWFUpload.instances[this.movieName] = this;
45
 
46
  // Load the settings. Load the Flash movie.
47
- this.initSettings(init_settings);
48
  this.loadFlash();
49
-
50
  this.displayDebugInfo();
51
-
52
- } catch (ex2) {
53
- this.debug(ex2);
54
  }
55
- }
56
 
57
  /* *************** */
58
- /* Static thingies */
59
  /* *************** */
60
  SWFUpload.instances = {};
61
  SWFUpload.movieCount = 0;
 
62
  SWFUpload.QUEUE_ERROR = {
63
  QUEUE_LIMIT_EXCEEDED : -100,
64
  FILE_EXCEEDS_SIZE_LIMIT : -110,
@@ -84,908 +76,804 @@ SWFUpload.FILE_STATUS = {
84
  COMPLETE : -4,
85
  CANCELLED : -5
86
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
 
 
 
 
88
 
89
- /* ***************** */
90
- /* Instance Thingies */
91
- /* ***************** */
92
- // init is a private method that ensures that all the object settings are set, getting a default value if one was not assigned.
93
-
94
- SWFUpload.prototype.initSettings = function (init_settings) {
 
95
  // Upload backend settings
96
- this.addSetting("upload_url", init_settings.upload_url, "");
97
- this.addSetting("file_post_name", init_settings.file_post_name, "Filedata");
98
- this.addSetting("post_params", init_settings.post_params, {});
99
-
 
 
 
100
  // File Settings
101
- this.addSetting("file_types", init_settings.file_types, "*.*");
102
- this.addSetting("file_types_description", init_settings.file_types_description, "All Files");
103
- this.addSetting("file_size_limit", init_settings.file_size_limit, "1024");
104
- this.addSetting("file_upload_limit", init_settings.file_upload_limit, "0");
105
- this.addSetting("file_queue_limit", init_settings.file_queue_limit, "0");
106
 
107
  // Flash Settings
108
- this.addSetting("flash_url", init_settings.flash_url, "swfupload.swf");
109
- this.addSetting("flash_width", init_settings.flash_width, "1px");
110
- this.addSetting("flash_height", init_settings.flash_height, "1px");
111
- this.addSetting("flash_color", init_settings.flash_color, "#FFFFFF");
112
-
 
 
 
 
 
 
 
 
 
 
 
 
113
  // Debug Settings
114
- this.addSetting("debug_enabled", init_settings.debug, false);
115
-
 
116
  // Event Handlers
117
- this.flashReady_handler = SWFUpload.flashReady; // This is a non-overrideable event handler
118
- this.swfUploadLoaded_handler = this.retrieveSetting(init_settings.swfupload_loaded_handler, SWFUpload.swfUploadLoaded);
 
 
 
 
119
 
120
- this.fileDialogStart_handler = this.retrieveSetting(init_settings.file_dialog_start_handler, SWFUpload.fileDialogStart);
121
- this.fileQueued_handler = this.retrieveSetting(init_settings.file_queued_handler, SWFUpload.fileQueued);
122
- this.fileQueueError_handler = this.retrieveSetting(init_settings.file_queue_error_handler, SWFUpload.fileQueueError);
123
- this.fileDialogComplete_handler = this.retrieveSetting(init_settings.file_dialog_complete_handler, SWFUpload.fileDialogComplete);
 
124
 
125
- this.uploadStart_handler = this.retrieveSetting(init_settings.upload_start_handler, SWFUpload.uploadStart);
126
- this.uploadProgress_handler = this.retrieveSetting(init_settings.upload_progress_handler, SWFUpload.uploadProgress);
127
- this.uploadError_handler = this.retrieveSetting(init_settings.upload_error_handler, SWFUpload.uploadError);
128
- this.uploadSuccess_handler = this.retrieveSetting(init_settings.upload_success_handler, SWFUpload.uploadSuccess);
129
- this.uploadComplete_handler = this.retrieveSetting(init_settings.upload_complete_handler, SWFUpload.uploadComplete);
130
 
131
- this.debug_handler = this.retrieveSetting(init_settings.debug_handler, SWFUpload.debug);
132
 
133
  // Other settings
134
- this.customSettings = this.retrieveSetting(init_settings.custom_settings, {});
 
 
 
 
 
 
 
135
  };
136
 
137
- // loadFlash is a private method that generates the HTML tag for the Flash
138
- // It then adds the flash to the "target" or to the body and stores a
139
- // reference to the flash element in "movieElement".
140
  SWFUpload.prototype.loadFlash = function () {
141
- var html, target_element, container;
 
 
 
 
 
 
 
 
 
 
142
 
143
  // Make sure an element with the ID we are going to use doesn't already exist
144
  if (document.getElementById(this.movieName) !== null) {
145
- return false;
146
  }
147
 
148
  // Get the body tag where we will be adding the flash movie
149
- try {
150
- target_element = document.getElementsByTagName("body")[0];
151
- if (typeof(target_element) === "undefined" || target_element === null) {
152
- this.debug('Could not find the BODY element. SWFUpload failed to load.');
153
- return false;
154
- }
155
- } catch (ex) {
156
- return false;
157
  }
158
 
159
  // Append the container and load the flash
160
  container = document.createElement("div");
161
- container.style.width = this.getSetting("flash_width");
162
- container.style.height = this.getSetting("flash_height");
 
163
 
164
- target_element.appendChild(container);
165
  container.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
166
- };
167
 
168
- // Generates the embed/object tags needed to embed the flash in to the document
169
- SWFUpload.prototype.getFlashHTML = function () {
170
- var html = "";
171
-
172
- // Create Mozilla Embed HTML
173
- if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
174
- // Build the basic embed html
175
- html = '<embed type="application/x-shockwave-flash" src="' + this.getSetting("flash_url") + '" width="' + this.getSetting("flash_width") + '" height="' + this.getSetting("flash_height") + '"';
176
- html += ' id="' + this.movieName + '" name="' + this.movieName + '" ';
177
- html += 'bgcolor="' + this.getSetting("flash_color") + '" quality="high" menu="false" flashvars="';
178
 
179
- html += this.getFlashVars();
 
 
180
 
181
- html += '" />';
 
 
 
182
 
183
- // Create IE Object HTML
184
- } else {
185
 
186
- // Build the basic Object tag
187
- html = '<object id="' + this.movieName + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.getSetting("flash_width") + '" height="' + this.getSetting("flash_height") + '">';
188
- html += '<param name="movie" value="' + this.getSetting("flash_url") + '">';
189
 
190
- html += '<param name="bgcolor" value="' + this.getSetting("flash_color") + '" />';
191
- html += '<param name="quality" value="high" />';
192
- html += '<param name="menu" value="false" />';
 
193
 
194
- html += '<param name="flashvars" value="' + this.getFlashVars() + '" />';
195
- html += '</object>';
 
196
  }
197
-
198
- return html;
199
  };
200
 
201
- // This private method builds the parameter string that will be passed
202
- // to flash.
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  SWFUpload.prototype.getFlashVars = function () {
204
  // Build a string from the post param object
205
- var param_string = this.buildParamString();
206
-
 
207
  // Build the parameter string
208
- var html = "";
209
- html += "movieName=" + encodeURIComponent(this.movieName);
210
- html += "&uploadURL=" + encodeURIComponent(this.getSetting("upload_url"));
211
- html += "&params=" + encodeURIComponent(param_string);
212
- html += "&filePostName=" + encodeURIComponent(this.getSetting("file_post_name"));
213
- html += "&fileTypes=" + encodeURIComponent(this.getSetting("file_types"));
214
- html += "&fileTypesDescription=" + encodeURIComponent(this.getSetting("file_types_description"));
215
- html += "&fileSizeLimit=" + encodeURIComponent(this.getSetting("file_size_limit"));
216
- html += "&fileUploadLimit=" + encodeURIComponent(this.getSetting("file_upload_limit"));
217
- html += "&fileQueueLimit=" + encodeURIComponent(this.getSetting("file_queue_limit"));
218
- html += "&debugEnabled=" + encodeURIComponent(this.getSetting("debug_enabled"));
219
-
220
- return html;
221
- };
222
-
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  SWFUpload.prototype.getMovieElement = function () {
224
- if (typeof(this.movieElement) === "undefined" || this.movieElement === null) {
225
  this.movieElement = document.getElementById(this.movieName);
226
-
227
- // Fix IEs "Flash can't callback when in a form" issue (http://www.extremefx.com.ar/blog/fixing-flash-external-interface-inside-form-on-internet-explorer)
228
- // Removed because Revision 6 always adds the flash to the body (inside a containing div)
229
- // If you insist on adding the Flash file inside a Form then in IE you have to make you wait until the DOM is ready
230
- // and run this code to make the form's ID available from the window object so Flash and JavaScript can communicate.
231
- //if (typeof(window[this.movieName]) === "undefined" || window[this.moveName] !== this.movieElement) {
232
- // window[this.movieName] = this.movieElement;
233
- //}
234
  }
235
 
 
 
 
 
236
  return this.movieElement;
237
  };
238
 
 
 
239
  SWFUpload.prototype.buildParamString = function () {
240
- var post_params = this.getSetting("post_params");
241
- var param_string_pairs = [];
242
- var i, value, name;
243
-
244
- // Retrieve the user defined parameters
245
- if (typeof(post_params) === "object") {
246
- for (name in post_params) {
247
- if (post_params.hasOwnProperty(name)) {
248
- if (typeof(post_params[name]) === "string") {
249
- param_string_pairs.push(encodeURIComponent(name) + "=" + encodeURIComponent(post_params[name]));
250
- }
251
  }
252
  }
253
  }
254
 
255
- return param_string_pairs.join("&");
256
  };
257
 
258
- // Saves a setting. If the value given is undefined or null then the default_value is used.
259
- SWFUpload.prototype.addSetting = function (name, value, default_value) {
260
- if (typeof(value) === "undefined" || value === null) {
261
- this.settings[name] = default_value;
262
- } else {
263
- this.settings[name] = value;
264
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
 
266
- return this.settings[name];
267
- };
 
 
 
 
 
 
 
268
 
269
- // Gets a setting. Returns empty string if not found.
270
- SWFUpload.prototype.getSetting = function (name) {
271
- if (typeof(this.settings[name]) === "undefined") {
272
- return "";
273
- } else {
274
- return this.settings[name];
 
 
 
 
 
 
 
 
275
  }
276
  };
277
 
278
- // Gets a setting, if the setting is undefined then return the default value
279
- // This does not affect or use the interal setting object.
280
- SWFUpload.prototype.retrieveSetting = function (value, default_value) {
281
- if (typeof(value) === "undefined" || value === null) {
282
- return default_value;
283
- } else {
284
- return value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  }
286
  };
287
 
 
 
 
 
 
288
 
289
- // It loops through all the settings and displays
290
- // them in the debug Console.
291
- SWFUpload.prototype.displayDebugInfo = function () {
292
- var key, debug_message = "";
293
-
294
- debug_message += "----- SWFUPLOAD SETTINGS ----\nID: " + this.moveName + "\n";
295
 
296
- debug_message += this.outputObject(this.settings);
297
 
298
- debug_message += "----- SWFUPLOAD SETTINGS END ----\n";
299
- debug_message += "\n";
300
 
301
- this.debug(debug_message);
302
- };
303
- SWFUpload.prototype.outputObject = function (object, prefix) {
304
- var output = "", key;
 
 
 
 
305
 
306
- if (typeof(prefix) !== "string") {
307
- prefix = "";
308
- }
309
- if (typeof(object) !== "object") {
310
- return "";
 
311
  }
312
-
313
- for (key in object) {
314
- if (object.hasOwnProperty(key)) {
315
- if (typeof(object[key]) === "object") {
316
- output += (prefix + key + ": { \n" + this.outputObject(object[key], "\t" + prefix) + prefix + "}" + "\n");
317
- } else {
318
- output += (prefix + key + ": " + object[key] + "\n");
319
- }
320
- }
321
  }
322
 
323
- return output;
324
  };
325
 
 
326
  /* *****************************
327
  -- Flash control methods --
328
  Your UI should use these
329
  to operate SWFUpload
330
  ***************************** */
331
 
 
 
 
332
  SWFUpload.prototype.selectFile = function () {
333
- var movie_element = this.getMovieElement();
334
- if (movie_element !== null && typeof(movie_element.SelectFile) === "function") {
335
- try {
336
- movie_element.SelectFile();
337
- }
338
- catch (ex) {
339
- this.debug("Could not call SelectFile: " + ex);
340
- }
341
- } else {
342
- this.debug("Could not find Flash element");
343
- }
344
-
345
  };
346
 
 
 
 
 
 
 
347
  SWFUpload.prototype.selectFiles = function () {
348
- var movie_element = this.getMovieElement();
349
- if (movie_element !== null && typeof(movie_element.SelectFiles) === "function") {
350
- try {
351
- movie_element.SelectFiles();
352
- }
353
- catch (ex) {
354
- this.debug("Could not call SelectFiles: " + ex);
355
- }
356
- } else {
357
- this.debug("Could not find Flash element");
358
- }
359
-
360
  };
361
 
362
 
363
- /* Start the upload. If a file_id is specified that file is uploaded. Otherwise the first
364
- * file in the queue is uploaded. If no files are in the queue then nothing happens.
365
- * This call uses setTimeout since Flash will be calling back in to JavaScript
366
- */
367
- SWFUpload.prototype.startUpload = function (file_id) {
368
- var self = this;
369
- var movie_element = this.getMovieElement();
370
- if (movie_element !== null && typeof(movie_element.StartUpload) === "function") {
371
- setTimeout(
372
- function () {
373
- try {
374
- movie_element.StartUpload(file_id);
375
- }
376
- catch (ex) {
377
- self.debug("Could not call StartUpload: " + ex);
378
- }
379
- }, 0
380
- );
381
- } else {
382
- this.debug("Could not find Flash element");
383
- }
384
-
385
  };
386
 
387
- /* Cancels a the file upload. You must specify a file_id */
388
- SWFUpload.prototype.cancelUpload = function (file_id) {
389
- var movie_element = this.getMovieElement();
390
- if (movie_element !== null && typeof(movie_element.CancelUpload) === "function") {
391
- try {
392
- movie_element.CancelUpload(file_id);
393
- }
394
- catch (ex) {
395
- this.debug("Could not call CancelUpload: " + ex);
396
- }
397
- } else {
398
- this.debug("Could not find Flash element");
399
  }
400
-
401
  };
402
 
403
- // Stops the current upload. The file is re-queued. If nothing is currently uploading then nothing happens.
 
404
  SWFUpload.prototype.stopUpload = function () {
405
- var movie_element = this.getMovieElement();
406
- if (movie_element !== null && typeof(movie_element.StopUpload) === "function") {
407
- try {
408
- movie_element.StopUpload();
409
- }
410
- catch (ex) {
411
- this.debug("Could not call StopUpload: " + ex);
412
- }
413
- } else {
414
- this.debug("Could not find Flash element");
415
- }
416
-
417
  };
418
 
419
  /* ************************
420
  * Settings methods
421
- * These methods change the settings inside SWFUpload
422
- * They shouldn't need to be called in a setTimeout since they
423
- * should not call back from Flash to JavaScript (except perhaps in a Debug call)
424
- * and some need to return data so setTimeout won't work.
425
- */
426
 
427
- /* Gets the file statistics object. It looks like this (where n = number):
428
- {
429
- files_queued: n,
430
- complete_uploads: n,
431
- upload_errors: n,
432
- uploads_cancelled: n,
433
- queue_errors: n
434
- }
435
- */
436
  SWFUpload.prototype.getStats = function () {
437
- var movie_element = this.getMovieElement();
438
- if (movie_element !== null && typeof(movie_element.GetStats) === "function") {
439
- try {
440
- return movie_element.GetStats();
441
- }
442
- catch (ex) {
443
- this.debug("Could not call GetStats");
444
- }
445
- } else {
446
- this.debug("Could not find Flash element");
447
- }
448
  };
449
- SWFUpload.prototype.setStats = function (stats_object) {
450
- var movie_element = this.getMovieElement();
451
- if (movie_element !== null && typeof(movie_element.SetStats) === "function") {
452
- try {
453
- movie_element.SetStats(stats_object);
454
- }
455
- catch (ex) {
456
- this.debug("Could not call SetStats");
457
- }
458
- } else {
459
- this.debug("Could not find Flash element");
460
- }
461
  };
462
 
463
- SWFUpload.prototype.setCredentials = function(name, password) {
464
- var movie_element = this.getMovieElement();
465
- if (movie_element !== null && typeof(movie_element.SetCredentials) === "function") {
466
- try {
467
- return movie_element.SetCredentials(name, password);
468
- }
469
- catch (ex) {
470
- this.debug("Could not call SetCredentials");
471
- }
472
  } else {
473
- this.debug("Could not find Flash element");
474
  }
475
  };
476
 
477
- SWFUpload.prototype.getFile = function (file_id) {
478
- var movie_element = this.getMovieElement();
479
- if (typeof(file_id) === "number") {
480
- if (movie_element !== null && typeof(movie_element.GetFileByIndex) === "function") {
481
- try {
482
- return movie_element.GetFileByIndex(file_id);
483
- }
484
- catch (ex) {
485
- this.debug("Could not call GetFileByIndex");
486
- }
487
- } else {
488
- this.debug("Could not find Flash element");
489
- }
490
- } else {
491
- if (movie_element !== null && typeof(movie_element.GetFile) === "function") {
492
- try {
493
- return movie_element.GetFile(file_id);
494
- }
495
- catch (ex) {
496
- this.debug("Could not call GetFile");
497
- }
498
- } else {
499
- this.debug("Could not find Flash element");
500
- }
501
- }
502
  };
503
 
504
- SWFUpload.prototype.addFileParam = function (file_id, name, value) {
505
- var movie_element = this.getMovieElement();
506
- if (movie_element !== null && typeof(movie_element.AddFileParam) === "function") {
507
- try {
508
- return movie_element.AddFileParam(file_id, name, value);
509
- }
510
- catch (ex) {
511
- this.debug("Could not call AddFileParam");
512
- }
513
- } else {
514
- this.debug("Could not find Flash element");
515
- }
516
  };
517
 
518
- SWFUpload.prototype.removeFileParam = function (file_id, name) {
519
- var movie_element = this.getMovieElement();
520
- if (movie_element !== null && typeof(movie_element.RemoveFileParam) === "function") {
521
- try {
522
- return movie_element.RemoveFileParam(file_id, name);
523
- }
524
- catch (ex) {
525
- this.debug("Could not call AddFileParam");
526
- }
527
- } else {
528
- this.debug("Could not find Flash element");
529
- }
530
 
 
 
 
 
531
  };
532
 
533
- SWFUpload.prototype.setUploadURL = function (url) {
534
- var movie_element = this.getMovieElement();
535
- if (movie_element !== null && typeof(movie_element.SetUploadURL) === "function") {
536
- try {
537
- this.addSetting("upload_url", url);
538
- movie_element.SetUploadURL(this.getSetting("upload_url"));
539
- }
540
- catch (ex) {
541
- this.debug("Could not call SetUploadURL");
542
- }
543
- } else {
544
- this.debug("Could not find Flash element in setUploadURL");
545
- }
546
  };
547
 
548
- SWFUpload.prototype.setPostParams = function (param_object) {
549
- var movie_element = this.getMovieElement();
550
- if (movie_element !== null && typeof(movie_element.SetPostParams) === "function") {
551
- try {
552
- this.addSetting("post_params", param_object);
553
- movie_element.SetPostParams(this.getSetting("post_params"));
554
- }
555
- catch (ex) {
556
- this.debug("Could not call SetPostParams");
557
- }
558
- } else {
559
- this.debug("Could not find Flash element in SetPostParams");
560
- }
561
  };
562
 
 
563
  SWFUpload.prototype.setFileTypes = function (types, description) {
564
- var movie_element = this.getMovieElement();
565
- if (movie_element !== null && typeof(movie_element.SetFileTypes) === "function") {
566
- try {
567
- this.addSetting("file_types", types);
568
- this.addSetting("file_types_description", description);
569
- movie_element.SetFileTypes(this.getSetting("file_types"), this.getSetting("file_types_description"));
570
- }
571
- catch (ex) {
572
- this.debug("Could not call SetFileTypes");
573
- }
574
- } else {
575
- this.debug("Could not find Flash element in SetFileTypes");
576
- }
577
  };
578
 
579
- SWFUpload.prototype.setFileSizeLimit = function (file_size_limit) {
580
- var movie_element = this.getMovieElement();
581
- if (movie_element !== null && typeof(movie_element.SetFileSizeLimit) === "function") {
582
- try {
583
- this.addSetting("file_size_limit", file_size_limit);
584
- movie_element.SetFileSizeLimit(this.getSetting("file_size_limit"));
585
- }
586
- catch (ex) {
587
- this.debug("Could not call SetFileSizeLimit");
588
- }
589
- } else {
590
- this.debug("Could not find Flash element in SetFileSizeLimit");
591
- }
592
  };
593
 
594
- SWFUpload.prototype.setFileUploadLimit = function (file_upload_limit) {
595
- var movie_element = this.getMovieElement();
596
- if (movie_element !== null && typeof(movie_element.SetFileUploadLimit) === "function") {
597
- try {
598
- this.addSetting("file_upload_limit", file_upload_limit);
599
- movie_element.SetFileUploadLimit(this.getSetting("file_upload_limit"));
600
- }
601
- catch (ex) {
602
- this.debug("Could not call SetFileUploadLimit");
603
- }
604
- } else {
605
- this.debug("Could not find Flash element in SetFileUploadLimit");
606
- }
607
  };
608
 
609
- SWFUpload.prototype.setFileQueueLimit = function (file_queue_limit) {
610
- var movie_element = this.getMovieElement();
611
- if (movie_element !== null && typeof(movie_element.SetFileQueueLimit) === "function") {
612
- try {
613
- this.addSetting("file_queue_limit", file_queue_limit);
614
- movie_element.SetFileQueueLimit(this.getSetting("file_queue_limit"));
615
- }
616
- catch (ex) {
617
- this.debug("Could not call SetFileQueueLimit");
618
- }
619
- } else {
620
- this.debug("Could not find Flash element in SetFileQueueLimit");
621
- }
622
  };
623
 
624
- SWFUpload.prototype.setFilePostName = function (file_post_name) {
625
- var movie_element = this.getMovieElement();
626
- if (movie_element !== null && typeof(movie_element.SetFilePostName) === "function") {
627
- try {
628
- this.addSetting("file_post_name", file_post_name);
629
- movie_element.SetFilePostName(this.getSetting("file_post_name"));
630
- }
631
- catch (ex) {
632
- this.debug("Could not call SetFilePostName");
633
- }
634
- } else {
635
- this.debug("Could not find Flash element in SetFilePostName");
636
- }
637
  };
638
 
639
- SWFUpload.prototype.setDebugEnabled = function (debug_enabled) {
640
- var movie_element = this.getMovieElement();
641
- if (movie_element !== null && typeof(movie_element.SetDebugEnabled) === "function") {
642
- try {
643
- this.addSetting("debug_enabled", debug_enabled);
644
- movie_element.SetDebugEnabled(this.getSetting("debug_enabled"));
645
- }
646
- catch (ex) {
647
- this.debug("Could not call SetDebugEnabled");
648
- }
649
- } else {
650
- this.debug("Could not find Flash element in SetDebugEnabled");
651
- }
652
  };
653
 
654
- /* *******************************
655
- Internal Event Callers
656
- Don't override these! These event callers ensure that your custom event handlers
657
- are called safely and in order.
658
- ******************************* */
659
 
660
- /* This is the callback method that the Flash movie will call when it has been loaded and is ready to go.
661
- Calling this or showUI() "manually" will bypass the Flash Detection built in to SWFUpload.
662
- Use a ui_function setting if you want to control the UI loading after the flash has loaded.
663
- */
664
- SWFUpload.prototype.flashReady = function () {
665
- // Check that the movie element is loaded correctly with its ExternalInterface methods defined
666
- var movie_element = this.getMovieElement();
667
- if (movie_element === null || typeof(movie_element.StartUpload) !== "function") {
668
- this.debug("ExternalInterface methods failed to initialize.");
669
- return;
670
  }
671
 
672
- var self = this;
673
- if (typeof(self.flashReady_handler) === "function") {
674
- this.eventQueue[this.eventQueue.length] = function() { self.flashReady_handler(); };
675
- setTimeout(function () { self.executeNextEvent();}, 0);
676
- } else {
677
- this.debug("flashReady_handler event not defined");
678
- }
679
  };
680
 
681
- /*
682
- Event Queue. Rather can call events directly from Flash they events are
683
- are placed in a queue and then executed. This ensures that each event is
684
- executed in the order it was called which is not guarenteed when calling
685
- setTimeout. Out of order events was especially problematic in Safari.
686
- */
687
- SWFUpload.prototype.executeNextEvent = function () {
688
- var f = this.eventQueue.shift();
689
- if (typeof(f) === "function") {
690
- f();
691
- }
692
- }
693
 
694
- /* This is a chance to do something before the browse window opens */
695
- SWFUpload.prototype.fileDialogStart = function () {
696
- var self = this;
697
- if (typeof(self.fileDialogStart_handler) === "function") {
698
- this.eventQueue[this.eventQueue.length] = function() { self.fileDialogStart_handler(); };
699
- setTimeout(function () { self.executeNextEvent();}, 0);
700
- } else {
701
- this.debug("fileDialogStart event not defined");
702
- }
703
  };
704
 
705
-
706
- /* Called when a file is successfully added to the queue. */
707
- SWFUpload.prototype.fileQueued = function (file) {
708
- var self = this;
709
- if (typeof(self.fileQueued_handler) === "function") {
710
- this.eventQueue[this.eventQueue.length] = function() { self.fileQueued_handler(file); };
711
- setTimeout(function () { self.executeNextEvent();}, 0);
712
- } else {
713
- this.debug("fileQueued event not defined");
714
  }
 
 
 
715
  };
716
 
717
-
718
- /* Handle errors that occur when an attempt to queue a file fails. */
719
- SWFUpload.prototype.fileQueueError = function (file, error_code, message) {
720
- var self = this;
721
- if (typeof(self.fileQueueError_handler) === "function") {
722
- this.eventQueue[this.eventQueue.length] = function() { self.fileQueueError_handler(file, error_code, message); };
723
- setTimeout(function () { self.executeNextEvent();}, 0);
724
- } else {
725
- this.debug("fileQueueError event not defined");
726
  }
 
 
727
  };
728
-
729
- /* Called after the file dialog has closed and the selected files have been queued.
730
- You could call startUpload here if you want the queued files to begin uploading immediately. */
731
- SWFUpload.prototype.fileDialogComplete = function (num_files_selected) {
732
- var self = this;
733
- if (typeof(self.fileDialogComplete_handler) === "function") {
734
- this.eventQueue[this.eventQueue.length] = function() { self.fileDialogComplete_handler(num_files_selected); };
735
- setTimeout(function () { self.executeNextEvent();}, 0);
736
- } else {
737
- this.debug("fileDialogComplete event not defined");
738
- }
739
  };
740
-
741
- /* Gets called when a file upload is about to be started. Return true to continue the upload. Return false to stop the upload.
742
- If you return false then uploadError and uploadComplete are called (like normal).
743
-
744
- This is a good place to do any file validation you need.
745
- */
746
- SWFUpload.prototype.uploadStart = function (file) {
747
- var self = this;
748
- if (typeof(self.fileDialogComplete_handler) === "function") {
749
- this.eventQueue[this.eventQueue.length] = function() { self.returnUploadStart(self.uploadStart_handler(file)); };
750
- setTimeout(function () { self.executeNextEvent();}, 0);
751
- } else {
752
- this.debug("uploadStart event not defined");
753
- }
754
  };
755
 
756
- /* Note: Internal use only. This function returns the result of uploadStart to
757
- flash. Since returning values in the normal way can result in Flash/JS circular
758
- call issues we split up the call in a Timeout. This is transparent from the API
759
- point of view.
760
- */
761
- SWFUpload.prototype.returnUploadStart = function (return_value) {
762
- var movie_element = this.getMovieElement();
763
- if (movie_element !== null && typeof(movie_element.ReturnUploadStart) === "function") {
764
- try {
765
- movie_element.ReturnUploadStart(return_value);
766
- }
767
- catch (ex) {
768
- this.debug("Could not call ReturnUploadStart");
769
- }
770
- } else {
771
- this.debug("Could not find Flash element in returnUploadStart");
772
- }
773
  };
774
-
775
-
776
-
777
- /* Called during upload as the file progresses. Use this event to update your UI. */
778
- SWFUpload.prototype.uploadProgress = function (file, bytes_complete, bytes_total) {
779
- var self = this;
780
- if (typeof(self.uploadProgress_handler) === "function") {
781
- this.eventQueue[this.eventQueue.length] = function() { self.uploadProgress_handler(file, bytes_complete, bytes_total); };
782
- setTimeout(function () { self.executeNextEvent();}, 0);
783
- } else {
784
- this.debug("uploadProgress event not defined");
785
- }
786
  };
787
-
788
- /* Called when an error occurs during an upload. Use error_code and the SWFUpload.UPLOAD_ERROR constants to determine
789
- which error occurred. The uploadComplete event is called after an error code indicating that the next file is
790
- ready for upload. For files cancelled out of order the uploadComplete event will not be called. */
791
- SWFUpload.prototype.uploadError = function (file, error_code, message) {
792
- var self = this;
793
- if (typeof(this.uploadError_handler) === "function") {
794
- this.eventQueue[this.eventQueue.length] = function() { self.uploadError_handler(file, error_code, message); };
795
- setTimeout(function () { self.executeNextEvent();}, 0);
796
- } else {
797
- this.debug("uploadError event not defined");
798
- }
799
  };
800
 
801
- /* This gets called when a file finishes uploading and the server-side upload script has completed and returned a 200
802
- status code. Any text returned by the server is available in server_data.
803
- **NOTE: The upload script MUST return some text or the uploadSuccess and uploadComplete events will not fire and the
804
- upload will become 'stuck'. */
805
- SWFUpload.prototype.uploadSuccess = function (file, server_data) {
806
- var self = this;
807
- if (typeof(self.uploadSuccess_handler) === "function") {
808
- this.eventQueue[this.eventQueue.length] = function() { self.uploadSuccess_handler(file, server_data); };
809
- setTimeout(function () { self.executeNextEvent();}, 0);
810
- } else {
811
- this.debug("uploadSuccess event not defined");
812
- }
813
  };
814
 
815
- /* uploadComplete is called when the file is uploaded or an error occurred and SWFUpload is ready to make the next upload.
816
- If you want the next upload to start to automatically you can call startUpload() from this event. */
817
- SWFUpload.prototype.uploadComplete = function (file) {
818
- var self = this;
819
- if (typeof(self.uploadComplete_handler) === "function") {
820
- this.eventQueue[this.eventQueue.length] = function() { self.uploadComplete_handler(file); };
821
- setTimeout(function () { self.executeNextEvent();}, 0);
822
- } else {
823
- this.debug("uploadComplete event not defined");
824
- }
825
- };
 
826
 
827
- /* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
828
- internal debug console. You can override this event and have messages written where you want. */
829
- SWFUpload.prototype.debug = function (message) {
 
 
 
 
 
 
830
  var self = this;
831
- if (typeof(self.debug_handler) === "function") {
832
- this.eventQueue[this.eventQueue.length] = function() { self.debug_handler(message); };
833
- setTimeout(function () { self.executeNextEvent();}, 0);
834
- } else {
835
- this.eventQueue[this.eventQueue.length] = function() { self.debugMessage(message); };
836
- setTimeout(function () { self.executeNextEvent();}, 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
837
  }
838
  };
839
 
 
 
 
 
 
 
 
840
 
841
- /* **********************************
842
- Default Event Handlers.
843
- These event handlers are used by default if an overriding handler is
844
- not defined in the SWFUpload settings object.
845
-
846
- JS Note: even though these are defined on the SWFUpload object (rather than the prototype) they
847
- are attached (read: copied) to a SWFUpload instance and 'this' is given the proper context.
848
- ********************************** */
 
 
 
849
 
850
- /* This is a special event handler that has no override in the settings. Flash calls this when it has
851
- been loaded by the browser and is ready for interaction. You should not override it. If you need
852
- to do something with SWFUpload has loaded then use the swfupload_loaded_handler setting.
853
- */
854
- SWFUpload.flashReady = function () {
855
- try {
856
- this.debug("Flash called back and is ready.");
857
 
858
- if (typeof(this.swfUploadLoaded_handler) === "function") {
859
- this.swfUploadLoaded_handler();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
860
  }
861
- } catch (ex) {
862
- this.debug(ex);
863
  }
 
 
864
  };
865
 
866
- /* This is a chance to something immediately after SWFUpload has loaded.
867
- Like, hide the default/degraded upload form and display the SWFUpload form. */
868
- SWFUpload.swfUploadLoaded = function () {
869
- };
870
 
871
  /* This is a chance to do something before the browse window opens */
872
- SWFUpload.fileDialogStart = function () {
 
873
  };
874
 
875
 
876
  /* Called when a file is successfully added to the queue. */
877
- SWFUpload.fileQueued = function (file) {
 
 
878
  };
879
 
880
 
881
  /* Handle errors that occur when an attempt to queue a file fails. */
882
- SWFUpload.fileQueueError = function (file, error_code, message) {
883
- try {
884
- switch (error_code) {
885
- case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
886
- this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
887
- break;
888
- case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
889
- this.debug("Error Code: Zero Byte File, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
890
- break;
891
- case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:
892
- this.debug("Error Code: Upload limit reached, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
893
- break;
894
- case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
895
- this.debug("Error Code: File extension is not allowed, Message: " + message);
896
- break;
897
- default:
898
- this.debug("Error Code: Unhandled error occured. Errorcode: " + error_code);
899
- }
900
- } catch (ex) {
901
- this.debug(ex);
902
- }
903
  };
904
 
905
  /* Called after the file dialog has closed and the selected files have been queued.
906
  You could call startUpload here if you want the queued files to begin uploading immediately. */
907
- SWFUpload.fileDialogComplete = function (num_files_selected) {
 
908
  };
909
 
910
- /* Gets called when a file upload is about to be started. Return true to continue the upload. Return false to stop the upload.
911
- If you return false then the uploadError callback is called and then uploadComplete (like normal).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912
 
913
- This is a good place to do any file validation you need.
914
 
915
- This is the only function that cannot be called on a setTimeout because it must return a value to Flash.
916
- You SHOULD NOT make any calls in to Flash (e.i, changing settings, getting stats, etc). Flash Player bugs prevent
917
- calls in to Flash from working reliably.
918
- */
919
- SWFUpload.uploadStart = function (file) {
920
- return true;
921
  };
922
 
923
- // Called during upload as the file progresses
924
- SWFUpload.uploadProgress = function (file, bytes_complete, bytes_total) {
925
- this.debug("File Progress: " + file.id + ", Bytes: " + bytes_complete + ". Total: " + bytes_total);
926
- };
927
 
928
- /* This gets called when a file finishes uploading and the upload script has completed and returned a 200 status code. Any text returned by the
929
- server is available in server_data. The upload script must return some text or uploadSuccess will not fire (neither will uploadComplete). */
930
- SWFUpload.uploadSuccess = function (file, server_data) {
 
931
  };
932
 
933
- /* This is called last. The file is uploaded or an error occurred and SWFUpload is ready to make the next upload.
934
- If you want to automatically start the next file just call startUpload from here.
935
- */
936
- SWFUpload.uploadComplete = function (file) {
937
  };
938
 
939
- // Called by SWFUpload JavaScript and Flash functions when debug is enabled.
940
- // Override this method in your settings to call your own debug message handler
941
- SWFUpload.debug = function (message) {
942
- if (this.getSetting("debug_enabled")) {
943
- this.debugMessage(message);
944
- }
945
  };
946
 
947
- /* Called when an upload occurs during upload. For HTTP errors 'message' will contain the HTTP STATUS CODE */
948
- SWFUpload.uploadError = function (file, error_code, msg) {
949
- try {
950
- switch (error_code) {
951
- case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:
952
- this.debug("Error Code: File ID specified for upload was not found, Message: " + msg);
953
- break;
954
- case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
955
- this.debug("Error Code: HTTP Error, File name: " + file.name + ", Message: " + msg);
956
- break;
957
- case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
958
- this.debug("Error Code: No backend file, File name: " + file.name + ", Message: " + msg);
959
- break;
960
- case SWFUpload.UPLOAD_ERROR.IO_ERROR:
961
- this.debug("Error Code: IO Error, File name: " + file.name + ", Message: " + msg);
962
- break;
963
- case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
964
- this.debug("Error Code: Security Error, File name: " + file.name + ", Message: " + msg);
965
- break;
966
- case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
967
- this.debug("Error Code: Upload limit reached, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg);
968
- break;
969
- case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
970
- this.debug("Error Code: Upload Initialization exception, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg);
971
- break;
972
- case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
973
- this.debug("Error Code: uploadStart callback returned false, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg);
974
- break;
975
- case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
976
- this.debug("Error Code: The file upload was cancelled, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg);
977
- break;
978
- case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
979
- this.debug("Error Code: The file upload was stopped, File name: " + file.name + ", File size: " + file.size + ", Message: " + msg);
980
- break;
981
- default:
982
- this.debug("Error Code: Unhandled error occured. Errorcode: " + errcode);
983
- }
984
- } catch (ex) {
985
- this.debug(ex);
986
- }
987
  };
988
 
 
 
 
 
 
989
 
990
 
991
  /* **********************************
@@ -996,24 +884,32 @@ SWFUpload.uploadError = function (file, error_code, msg) {
996
 
997
  The console is automatically scrolled as messages appear.
998
 
999
- You can override this console (to use FireBug's console for instance) by setting the debug event method to your own function
1000
- that handles the debug message
1001
- ********************************** */
 
 
 
 
 
1002
  SWFUpload.prototype.debugMessage = function (message) {
1003
- var exception_message, exception_values;
1004
-
1005
- if (typeof(message) === "object" && typeof(message.name) === "string" && typeof(message.message) === "string") {
1006
- exception_message = "";
1007
- exception_values = [];
1008
- for (var key in message) {
1009
- exception_values.push(key + ": " + message[key]);
 
 
 
 
 
 
 
 
 
1010
  }
1011
- exception_message = exception_values.join("\n");
1012
- exception_values = exception_message.split("\n");
1013
- exception_message = "EXCEPTION: " + exception_values.join("\nEXCEPTION: ");
1014
- SWFUpload.Console.writeLine(exception_message);
1015
- } else {
1016
- SWFUpload.Console.writeLine(message);
1017
  }
1018
  };
1019
 
1
  /**
2
+ * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
3
+ *
4
+ * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
5
+ *
6
+ * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz�n and Mammon Media and is released under the MIT License:
7
  * http://www.opensource.org/licenses/mit-license.php
8
  *
9
+ * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
10
+ * http://www.opensource.org/licenses/mit-license.php
11
  *
 
 
 
 
 
 
 
12
  */
13
 
14
 
15
+ /* ******************* */
16
+ /* Constructor & Init */
17
+ /* ******************* */
18
+ var SWFUpload;
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ if (SWFUpload == undefined) {
21
+ SWFUpload = function (settings) {
22
+ this.initSWFUpload(settings);
23
+ };
24
+ }
25
 
26
+ SWFUpload.prototype.initSWFUpload = function (settings) {
27
  try {
28
  this.customSettings = {}; // A container where developers can place their own settings associated with this instance.
29
+ this.settings = settings;
30
  this.eventQueue = [];
31
  this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
32
  this.movieElement = null;
33
 
34
+
35
  // Setup global control tracking
36
  SWFUpload.instances[this.movieName] = this;
37
 
38
  // Load the settings. Load the Flash movie.
39
+ this.initSettings();
40
  this.loadFlash();
 
41
  this.displayDebugInfo();
42
+ } catch (ex) {
43
+ delete SWFUpload.instances[this.movieName];
44
+ throw ex;
45
  }
46
+ };
47
 
48
  /* *************** */
49
+ /* Static Members */
50
  /* *************** */
51
  SWFUpload.instances = {};
52
  SWFUpload.movieCount = 0;
53
+ SWFUpload.version = "2.2.0 Beta 3";
54
  SWFUpload.QUEUE_ERROR = {
55
  QUEUE_LIMIT_EXCEEDED : -100,
56
  FILE_EXCEEDS_SIZE_LIMIT : -110,
76
  COMPLETE : -4,
77
  CANCELLED : -5
78
  };
79
+ SWFUpload.BUTTON_ACTION = {
80
+ SELECT_FILE : -100,
81
+ SELECT_FILES : -110,
82
+ START_UPLOAD : -120
83
+ };
84
+ SWFUpload.CURSOR = {
85
+ ARROW : -1,
86
+ HAND : -2
87
+ };
88
+ SWFUpload.WINDOW_MODE = {
89
+ WINDOW : "window",
90
+ TRANSPARENT : "transparent",
91
+ OPAQUE : "opaque"
92
+ };
93
 
94
+ /* ******************** */
95
+ /* Instance Members */
96
+ /* ******************** */
97
 
98
+ // Private: initSettings ensures that all the
99
+ // settings are set, getting a default value if one was not assigned.
100
+ SWFUpload.prototype.initSettings = function () {
101
+ this.ensureDefault = function (settingName, defaultValue) {
102
+ this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
103
+ };
104
+
105
  // Upload backend settings
106
+ this.ensureDefault("upload_url", "");
107
+ this.ensureDefault("file_post_name", "Filedata");
108
+ this.ensureDefault("post_params", {});
109
+ this.ensureDefault("use_query_string", false);
110
+ this.ensureDefault("requeue_on_error", false);
111
+ this.ensureDefault("http_success", []);
112
+
113
  // File Settings
114
+ this.ensureDefault("file_types", "*.*");
115
+ this.ensureDefault("file_types_description", "All Files");
116
+ this.ensureDefault("file_size_limit", 0); // Default zero means "unlimited"
117
+ this.ensureDefault("file_upload_limit", 0);
118
+ this.ensureDefault("file_queue_limit", 0);
119
 
120
  // Flash Settings
121
+ this.ensureDefault("flash_url", "swfupload.swf");
122
+ this.ensureDefault("prevent_swf_caching", true);
123
+
124
+ // Button Settings
125
+ this.ensureDefault("button_image_url", "");
126
+ this.ensureDefault("button_width", 1);
127
+ this.ensureDefault("button_height", 1);
128
+ this.ensureDefault("button_text", "");
129
+ this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
130
+ this.ensureDefault("button_text_top_padding", 0);
131
+ this.ensureDefault("button_text_left_padding", 0);
132
+ this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
133
+ this.ensureDefault("button_disabled", false);
134
+ this.ensureDefault("button_placeholder_id", null);
135
+ this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
136
+ this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
137
+
138
  // Debug Settings
139
+ this.ensureDefault("debug", false);
140
+ this.settings.debug_enabled = this.settings.debug; // Here to maintain v2 API
141
+
142
  // Event Handlers
143
+ this.settings.return_upload_start_handler = this.returnUploadStart;
144
+ this.ensureDefault("swfupload_loaded_handler", null);
145
+ this.ensureDefault("file_dialog_start_handler", null);
146
+ this.ensureDefault("file_queued_handler", null);
147
+ this.ensureDefault("file_queue_error_handler", null);
148
+ this.ensureDefault("file_dialog_complete_handler", null);
149
 
150
+ this.ensureDefault("upload_start_handler", null);
151
+ this.ensureDefault("upload_progress_handler", null);
152
+ this.ensureDefault("upload_error_handler", null);
153
+ this.ensureDefault("upload_success_handler", null);
154
+ this.ensureDefault("upload_complete_handler", null);
155
 
156
+ this.ensureDefault("debug_handler", this.debugMessage);
 
 
 
 
157
 
158
+ this.ensureDefault("custom_settings", {});
159
 
160
  // Other settings
161
+ this.customSettings = this.settings.custom_settings;
162
+
163
+ // Update the flash url if needed
164
+ if (this.settings.prevent_swf_caching) {
165
+ this.settings.flash_url = this.settings.flash_url + "?swfuploadrnd=" + Math.floor(Math.random() * 999999999);
166
+ }
167
+
168
+ delete this.ensureDefault;
169
  };
170
 
 
 
 
171
  SWFUpload.prototype.loadFlash = function () {
172
+ if (this.settings.button_placeholder_id !== "") {
173
+ this.replaceWithFlash();
174
+ } else {
175
+ this.appendFlash();
176
+ }
177
+ };
178
+
179
+ // Private: appendFlash gets the HTML tag for the Flash
180
+ // It then appends the flash to the body
181
+ SWFUpload.prototype.appendFlash = function () {
182
+ var targetElement, container;
183
 
184
  // Make sure an element with the ID we are going to use doesn't already exist
185
  if (document.getElementById(this.movieName) !== null) {
186
+ throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
187
  }
188
 
189
  // Get the body tag where we will be adding the flash movie
190
+ targetElement = document.getElementsByTagName("body")[0];
191
+
192
+ if (targetElement == undefined) {
193
+ throw "Could not find the 'body' element.";
 
 
 
 
194
  }
195
 
196
  // Append the container and load the flash
197
  container = document.createElement("div");
198
+ container.style.width = "1px";
199
+ container.style.height = "1px";
200
+ container.style.overflow = "hidden";
201
 
202
+ targetElement.appendChild(container);
203
  container.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
 
204
 
205
+ // Fix IE Flash/Form bug
206
+ if (window[this.movieName] == undefined) {
207
+ window[this.movieName] = this.getMovieElement();
208
+ }
209
+
210
+
211
+ };
 
 
 
212
 
213
+ // Private: replaceWithFlash replaces the button_placeholder element with the flash movie.
214
+ SWFUpload.prototype.replaceWithFlash = function () {
215
+ var targetElement, tempParent;
216
 
217
+ // Make sure an element with the ID we are going to use doesn't already exist
218
+ if (document.getElementById(this.movieName) !== null) {
219
+ throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
220
+ }
221
 
222
+ // Get the element where we will be placing the flash movie
223
+ targetElement = document.getElementById(this.settings.button_placeholder_id);
224
 
225
+ if (targetElement == undefined) {
226
+ throw "Could not find the placeholder element.";
227
+ }
228
 
229
+ // Append the container and load the flash
230
+ tempParent = document.createElement("div");
231
+ tempParent.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
232
+ targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);
233
 
234
+ // Fix IE Flash/Form bug
235
+ if (window[this.movieName] == undefined) {
236
+ window[this.movieName] = this.getMovieElement();
237
  }
238
+
 
239
  };
240
 
241
+ // Private: getFlashHTML generates the object tag needed to embed the flash in to the document
242
+ SWFUpload.prototype.getFlashHTML = function () {
243
+ // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
244
+ return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
245
+ '<param name="wmode" value="', this.settings.button_window_mode , '" />',
246
+ '<param name="movie" value="', this.settings.flash_url, '" />',
247
+ '<param name="quality" value="high" />',
248
+ '<param name="menu" value="false" />',
249
+ '<param name="allowScriptAccess" value="always" />',
250
+ '<param name="flashvars" value="' + this.getFlashVars() + '" />',
251
+ '</object>'].join("");
252
+ };
253
+
254
+ // Private: getFlashVars builds the parameter string that will be passed
255
+ // to flash in the flashvars param.
256
  SWFUpload.prototype.getFlashVars = function () {
257
  // Build a string from the post param object
258
+ var paramString = this.buildParamString();
259
+ var httpSuccessString = this.settings.http_success.join(",");
260
+
261
  // Build the parameter string
262
+ return ["movieName=", encodeURIComponent(this.movieName),
263
+ "&amp;uploadURL=", encodeURIComponent(this.settings.upload_url),
264
+ "&amp;useQueryString=", encodeURIComponent(this.settings.use_query_string),
265
+ "&amp;requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
266
+ "&amp;httpSuccess=", encodeURIComponent(httpSuccessString),
267
+ "&amp;params=", encodeURIComponent(paramString),
268
+ "&amp;filePostName=", encodeURIComponent(this.settings.file_post_name),
269
+ "&amp;fileTypes=", encodeURIComponent(this.settings.file_types),
270
+ "&amp;fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
271
+ "&amp;fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
272
+ "&amp;fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
273
+ "&amp;fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
274
+ "&amp;debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
275
+ "&amp;buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
276
+ "&amp;buttonWidth=", encodeURIComponent(this.settings.button_width),
277
+ "&amp;buttonHeight=", encodeURIComponent(this.settings.button_height),
278
+ "&amp;buttonText=", encodeURIComponent(this.settings.button_text),
279
+ "&amp;buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
280
+ "&amp;buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
281
+ "&amp;buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
282
+ "&amp;buttonAction=", encodeURIComponent(this.settings.button_action),
283
+ "&amp;buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
284
+ "&amp;buttonCursor=", encodeURIComponent(this.settings.button_cursor)
285
+ ].join("");
286
+ };
287
+
288
+ // Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload
289
+ // The element is cached after the first lookup
290
  SWFUpload.prototype.getMovieElement = function () {
291
+ if (this.movieElement == undefined) {
292
  this.movieElement = document.getElementById(this.movieName);
 
 
 
 
 
 
 
 
293
  }
294
 
295
+ if (this.movieElement === null) {
296
+ throw "Could not find Flash element";
297
+ }
298
+
299
  return this.movieElement;
300
  };
301
 
302
+ // Private: buildParamString takes the name/value pairs in the post_params setting object
303
+ // and joins them up in to a string formatted "name=value&amp;name=value"
304
  SWFUpload.prototype.buildParamString = function () {
305
+ var postParams = this.settings.post_params;
306
+ var paramStringPairs = [];
307
+
308
+ if (typeof(postParams) === "object") {
309
+ for (var name in postParams) {
310
+ if (postParams.hasOwnProperty(name)) {
311
+ paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString()));
 
 
 
 
312
  }
313
  }
314
  }
315
 
316
+ return paramStringPairs.join("&amp;");
317
  };
318
 
319
+ // Public: Used to remove a SWFUpload instance from the page. This method strives to remove
320
+ // all references to the SWF, and other objects so memory is properly freed.
321
+ // Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state.
322
+ // Credits: Major improvements provided by steffen
323
+ SWFUpload.prototype.destroy = function () {
324
+ try {
325
+ // Make sure Flash is done before we try to remove it
326
+ this.cancelUpload(null, false);
327
+
328
+ // Remove the SWFUpload DOM nodes
329
+ var movieElement = null;
330
+ movieElement = this.getMovieElement();
331
+
332
+ if (movieElement) {
333
+ // Loop through all the movie's properties and remove all function references (DOM/JS IE 6/7 memory leak workaround)
334
+ for (var i in movieElement) {
335
+ try {
336
+ if (typeof(movieElement[i]) === "function") {
337
+ movieElement[i] = null;
338
+ }
339
+ } catch (ex1) {}
340
+ }
341
 
342
+ // Remove the Movie Element from the page
343
+ try {
344
+ movieElement.parentNode.removeChild(movieElement);
345
+ } catch (ex) {}
346
+ }
347
+
348
+
349
+ // Remove IE form fix reference
350
+ window[this.movieName] = null;
351
 
352
+ // Destroy other references
353
+ SWFUpload.instances[this.movieName] = null;
354
+ delete SWFUpload.instances[this.movieName];
355
+
356
+ this.movieElement = null;
357
+ this.settings = null;
358
+ this.customSettings = null;
359
+ this.eventQueue = null;
360
+ this.movieName = null;
361
+
362
+
363
+ return true;
364
+ } catch (ex1) {
365
+ return false;
366
  }
367
  };
368
 
369
+ // Public: displayDebugInfo prints out settings and configuration
370
+ // information about this SWFUpload instance.
371
+ // This function (and any references to it) can be deleted when placing
372
+ // SWFUpload in production.
373
+ SWFUpload.prototype.displayDebugInfo = function () {
374
+ this.debug(
375
+ [
376
+ "---SWFUpload Instance Info---\n",
377
+ "Version: ", SWFUpload.version, "\n",
378
+ "Movie Name: ", this.movieName, "\n",
379
+ "Settings:\n",
380
+ "\t", "upload_url: ", this.settings.upload_url, "\n",
381
+ "\t", "flash_url: ", this.settings.flash_url, "\n",
382
+ "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n",
383
+ "\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n",
384
+ "\t", "http_success: ", this.settings.http_success.join(", "), "\n",
385
+ "\t", "file_post_name: ", this.settings.file_post_name, "\n",
386
+ "\t", "post_params: ", this.settings.post_params.toString(), "\n",
387
+ "\t", "file_types: ", this.settings.file_types, "\n",
388
+ "\t", "file_types_description: ", this.settings.file_types_description, "\n",
389
+ "\t", "file_size_limit: ", this.settings.file_size_limit, "\n",
390
+ "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n",
391
+ "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n",
392
+ "\t", "debug: ", this.settings.debug.toString(), "\n",
393
+
394
+ "\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n",
395
+
396
+ "\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n",
397
+ "\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n",
398
+ "\t", "button_width: ", this.settings.button_width.toString(), "\n",
399
+ "\t", "button_height: ", this.settings.button_height.toString(), "\n",
400
+ "\t", "button_text: ", this.settings.button_text.toString(), "\n",
401
+ "\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n",
402
+ "\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n",
403
+ "\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
404
+ "\t", "button_action: ", this.settings.button_action.toString(), "\n",
405
+ "\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n",
406
+
407
+ "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n",
408
+ "Event Handlers:\n",
409
+ "\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
410
+ "\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
411
+ "\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
412
+ "\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
413
+ "\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
414
+ "\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
415
+ "\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
416
+ "\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
417
+ "\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
418
+ "\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n"
419
+ ].join("")
420
+ );
421
+ };
422
+
423
+ /* Note: addSetting and getSetting are no longer used by SWFUpload but are included
424
+ the maintain v2 API compatibility
425
+ */
426
+ // Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
427
+ SWFUpload.prototype.addSetting = function (name, value, default_value) {
428
+ if (value == undefined) {
429
+ return (this.settings[name] = default_value);
430
+ } else {
431
+ return (this.settings[name] = value);
432
  }
433
  };
434
 
435
+ // Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found.
436
+ SWFUpload.prototype.getSetting = function (name) {
437
+ if (this.settings[name] != undefined) {
438
+ return this.settings[name];
439
+ }
440
 
441
+ return "";
442
+ };
 
 
 
 
443
 
 
444
 
 
 
445
 
446
+ // Private: callFlash handles function calls made to the Flash element.
447
+ // Calls are made with a setTimeout for some functions to work around
448
+ // bugs in the ExternalInterface library.
449
+ SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
450
+ argumentArray = argumentArray || [];
451
+
452
+ var movieElement = this.getMovieElement();
453
+ var returnValue, returnString;
454
 
455
+ // Flash's method if calling ExternalInterface methods (code adapted from MooTools).
456
+ try {
457
+ returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
458
+ returnValue = eval(returnString);
459
+ } catch (ex) {
460
+ throw "Call to " + functionName + " failed";
461
  }
462
+
463
+ // Unescape file post param values
464
+ if (returnValue != undefined && typeof returnValue.post === "object") {
465
+ returnValue = this.unescapeFilePostParams(returnValue);
 
 
 
 
 
466
  }
467
 
468
+ return returnValue;
469
  };
470
 
471
+
472
  /* *****************************
473
  -- Flash control methods --
474
  Your UI should use these
475
  to operate SWFUpload
476
  ***************************** */
477
 
478
+ // WARNING: this function does not work in Flash Player 10
479
+ // Public: selectFile causes a File Selection Dialog window to appear. This
480
+ // dialog only allows 1 file to be selected.
481
  SWFUpload.prototype.selectFile = function () {
482
+ this.callFlash("SelectFile");
 
 
 
 
 
 
 
 
 
 
 
483
  };
484
 
485
+ // WARNING: this function does not work in Flash Player 10
486
+ // Public: selectFiles causes a File Selection Dialog window to appear/ This
487
+ // dialog allows the user to select any number of files
488
+ // Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
489
+ // If the selection name length is too long the dialog will fail in an unpredictable manner. There is no work-around
490
+ // for this bug.
491
  SWFUpload.prototype.selectFiles = function () {
492
+ this.callFlash("SelectFiles");
 
 
 
 
 
 
 
 
 
 
 
493
  };
494
 
495
 
496
+ // Public: startUpload starts uploading the first file in the queue unless
497
+ // the optional parameter 'fileID' specifies the ID
498
+ SWFUpload.prototype.startUpload = function (fileID) {
499
+ this.callFlash("StartUpload", [fileID]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  };
501
 
502
+ // Public: cancelUpload cancels any queued file. The fileID parameter may be the file ID or index.
503
+ // If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
504
+ // If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
505
+ SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
506
+ if (triggerErrorEvent !== false) {
507
+ triggerErrorEvent = true;
 
 
 
 
 
 
508
  }
509
+ this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
510
  };
511
 
512
+ // Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
513
+ // If nothing is currently uploading then nothing happens.
514
  SWFUpload.prototype.stopUpload = function () {
515
+ this.callFlash("StopUpload");
 
 
 
 
 
 
 
 
 
 
 
516
  };
517
 
518
  /* ************************
519
  * Settings methods
520
+ * These methods change the SWFUpload settings.
521
+ * SWFUpload settings should not be changed directly on the settings object
522
+ * since many of the settings need to be passed to Flash in order to take
523
+ * effect.
524
+ * *********************** */
525
 
526
+ // Public: getStats gets the file statistics object.
 
 
 
 
 
 
 
 
527
  SWFUpload.prototype.getStats = function () {
528
+ return this.callFlash("GetStats");
 
 
 
 
 
 
 
 
 
 
529
  };
530
+
531
+ // Public: setStats changes the SWFUpload statistics. You shouldn't need to
532
+ // change the statistics but you can. Changing the statistics does not
533
+ // affect SWFUpload accept for the successful_uploads count which is used
534
+ // by the upload_limit setting to determine how many files the user may upload.
535
+ SWFUpload.prototype.setStats = function (statsObject) {
536
+ this.callFlash("SetStats", [statsObject]);
 
 
 
 
 
537
  };
538
 
539
+ // Public: getFile retrieves a File object by ID or Index. If the file is
540
+ // not found then 'null' is returned.
541
+ SWFUpload.prototype.getFile = function (fileID) {
542
+ if (typeof(fileID) === "number") {
543
+ return this.callFlash("GetFileByIndex", [fileID]);
 
 
 
 
544
  } else {
545
+ return this.callFlash("GetFile", [fileID]);
546
  }
547
  };
548
 
549
+ // Public: addFileParam sets a name/value pair that will be posted with the
550
+ // file specified by the Files ID. If the name already exists then the
551
+ // exiting value will be overwritten.
552
+ SWFUpload.prototype.addFileParam = function (fileID, name, value) {
553
+ return this.callFlash("AddFileParam", [fileID, name, value]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
554
  };
555
 
556
+ // Public: removeFileParam removes a previously set (by addFileParam) name/value
557
+ // pair from the specified file.
558
+ SWFUpload.prototype.removeFileParam = function (fileID, name) {
559
+ this.callFlash("RemoveFileParam", [fileID, name]);
 
 
 
 
 
 
 
 
560
  };
561
 
562
+ // Public: setUploadUrl changes the upload_url setting.
563
+ SWFUpload.prototype.setUploadURL = function (url) {
564
+ this.settings.upload_url = url.toString();
565
+ this.callFlash("SetUploadURL", [url]);
566
+ };
 
 
 
 
 
 
 
567
 
568
+ // Public: setPostParams changes the post_params setting
569
+ SWFUpload.prototype.setPostParams = function (paramsObject) {
570
+ this.settings.post_params = paramsObject;
571
+ this.callFlash("SetPostParams", [paramsObject]);
572
  };
573
 
574
+ // Public: addPostParam adds post name/value pair. Each name can have only one value.
575
+ SWFUpload.prototype.addPostParam = function (name, value) {
576
+ this.settings.post_params[name] = value;
577
+ this.callFlash("SetPostParams", [this.settings.post_params]);
 
 
 
 
 
 
 
 
 
578
  };
579
 
580
+ // Public: removePostParam deletes post name/value pair.
581
+ SWFUpload.prototype.removePostParam = function (name) {
582
+ delete this.settings.post_params[name];
583
+ this.callFlash("SetPostParams", [this.settings.post_params]);
 
 
 
 
 
 
 
 
 
584
  };
585
 
586
+ // Public: setFileTypes changes the file_types setting and the file_types_description setting
587
  SWFUpload.prototype.setFileTypes = function (types, description) {
588
+ this.settings.file_types = types;
589
+ this.settings.file_types_description = description;
590
+ this.callFlash("SetFileTypes", [types, description]);
 
 
 
 
 
 
 
 
 
 
591
  };
592
 
593
+ // Public: setFileSizeLimit changes the file_size_limit setting
594
+ SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
595
+ this.settings.file_size_limit = fileSizeLimit;
596
+ this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
 
 
 
 
 
 
 
 
 
597
  };
598
 
599
+ // Public: setFileUploadLimit changes the file_upload_limit setting
600
+ SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
601
+ this.settings.file_upload_limit = fileUploadLimit;
602
+ this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
 
 
 
 
 
 
 
 
 
603
  };
604
 
605
+ // Public: setFileQueueLimit changes the file_queue_limit setting
606
+ SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
607
+ this.settings.file_queue_limit = fileQueueLimit;
608
+ this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
 
 
 
 
 
 
 
 
 
609
  };
610
 
611
+ // Public: setFilePostName changes the file_post_name setting
612
+ SWFUpload.prototype.setFilePostName = function (filePostName) {
613
+ this.settings.file_post_name = filePostName;
614
+ this.callFlash("SetFilePostName", [filePostName]);
 
 
 
 
 
 
 
 
 
615
  };
616
 
617
+ // Public: setUseQueryString changes the use_query_string setting
618
+ SWFUpload.prototype.setUseQueryString = function (useQueryString) {
619
+ this.settings.use_query_string = useQueryString;
620
+ this.callFlash("SetUseQueryString", [useQueryString]);
 
 
 
 
 
 
 
 
 
621
  };
622
 
623
+ // Public: setRequeueOnError changes the requeue_on_error setting
624
+ SWFUpload.prototype.setRequeueOnError = function (requeueOnError) {
625
+ this.settings.requeue_on_error = requeueOnError;
626
+ this.callFlash("SetRequeueOnError", [requeueOnError]);
627
+ };
628
 
629
+ // Public: setHTTPSuccess changes the http_success setting
630
+ SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) {
631
+ if (typeof http_status_codes === "string") {
632
+ http_status_codes = http_status_codes.replace(" ", "").split(",");
 
 
 
 
 
 
633
  }
634
 
635
+ this.settings.http_success = http_status_codes;
636
+ this.callFlash("SetHTTPSuccess", [http_status_codes]);
 
 
 
 
 
637
  };
638
 
 
 
 
 
 
 
 
 
 
 
 
 
639
 
640
+ // Public: setDebugEnabled changes the debug_enabled setting
641
+ SWFUpload.prototype.setDebugEnabled = function (debugEnabled) {
642
+ this.settings.debug_enabled = debugEnabled;
643
+ this.callFlash("SetDebugEnabled", [debugEnabled]);
 
 
 
 
 
644
  };
645
 
646
+ // Public: setButtonImageURL loads a button image sprite
647
+ SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) {
648
+ if (buttonImageURL == undefined) {
649
+ buttonImageURL = "";
 
 
 
 
 
650
  }
651
+
652
+ this.settings.button_image_url = buttonImageURL;
653
+ this.callFlash("SetButtonImageURL", [buttonImageURL]);
654
  };
655
 
656
+ // Public: setButtonDimensions resizes the Flash Movie and button
657
+ SWFUpload.prototype.setButtonDimensions = function (width, height) {
658
+ this.settings.button_width = width;
659
+ this.settings.button_height = height;
660
+
661
+ var movie = this.getMovieElement();
662
+ if (movie != undefined) {
663
+ movie.style.width = width + "px";
664
+ movie.style.height = height + "px";
665
  }
666
+
667
+ this.callFlash("SetButtonDimensions", [width, height]);
668
  };
669
+ // Public: setButtonText Changes the text overlaid on the button
670
+ SWFUpload.prototype.setButtonText = function (html) {
671
+ this.settings.button_text = html;
672
+ this.callFlash("SetButtonText", [html]);
 
 
 
 
 
 
 
673
  };
674
+ // Public: setButtonTextPadding changes the top and left padding of the text overlay
675
+ SWFUpload.prototype.setButtonTextPadding = function (left, top) {
676
+ this.settings.button_text_top_padding = top;
677
+ this.settings.button_text_left_padding = left;
678
+ this.callFlash("SetButtonTextPadding", [left, top]);
 
 
 
 
 
 
 
 
 
679
  };
680
 
681
+ // Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button
682
+ SWFUpload.prototype.setButtonTextStyle = function (css) {
683
+ this.settings.button_text_style = css;
684
+ this.callFlash("SetButtonTextStyle", [css]);
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  };
686
+ // Public: setButtonDisabled disables/enables the button
687
+ SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
688
+ this.settings.button_disabled = isDisabled;
689
+ this.callFlash("SetButtonDisabled", [isDisabled]);
 
 
 
 
 
 
 
 
690
  };
691
+ // Public: setButtonAction sets the action that occurs when the button is clicked
692
+ SWFUpload.prototype.setButtonAction = function (buttonAction) {
693
+ this.settings.button_action = buttonAction;
694
+ this.callFlash("SetButtonAction", [buttonAction]);
 
 
 
 
 
 
 
 
695
  };
696
 
697
+ // Public: setButtonCursor changes the mouse cursor displayed when hovering over the button
698
+ SWFUpload.prototype.setButtonCursor = function (cursor) {
699
+ this.settings.button_cursor = cursor;
700
+ this.callFlash("SetButtonCursor", [cursor]);
 
 
 
 
 
 
 
 
701
  };
702
 
703
+ /* *******************************
704
+ Flash Event Interfaces
705
+ These functions are used by Flash to trigger the various
706
+ events.
707
+
708
+ All these functions a Private.
709
+
710
+ Because the ExternalInterface library is buggy the event calls
711
+ are added to a queue and the queue then executed by a setTimeout.
712
+ This ensures that events are executed in a determinate order and that
713
+ the ExternalInterface bugs are avoided.
714
+ ******************************* */
715
 
716
+ SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) {
717
+ // Warning: Don't call this.debug inside here or you'll create an infinite loop
718
+
719
+ if (argumentArray == undefined) {
720
+ argumentArray = [];
721
+ } else if (!(argumentArray instanceof Array)) {
722
+ argumentArray = [argumentArray];
723
+ }
724
+
725
  var self = this;
726
+ if (typeof this.settings[handlerName] === "function") {
727
+ // Queue the event
728
+ this.eventQueue.push(function () {
729
+ this.settings[handlerName].apply(this, argumentArray);
730
+ });
731
+
732
+ // Execute the next queued event
733
+ setTimeout(function () {
734
+ self.executeNextEvent();
735
+ }, 0);
736
+
737
+ } else if (this.settings[handlerName] !== null) {
738
+ throw "Event handler " + handlerName + " is unknown or is not a function";
739
+ }
740
+ };
741
+
742
+ // Private: Causes the next event in the queue to be executed. Since events are queued using a setTimeout
743
+ // we must queue them in order to garentee that they are executed in order.
744
+ SWFUpload.prototype.executeNextEvent = function () {
745
+ // Warning: Don't call this.debug inside here or you'll create an infinite loop
746
+
747
+ var f = this.eventQueue ? this.eventQueue.shift() : null;
748
+ if (typeof(f) === "function") {
749
+ f.apply(this);
750
  }
751
  };
752
 
753
+ // Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
754
+ // properties that contain characters that are not valid for JavaScript identifiers. To work around this
755
+ // the Flash Component escapes the parameter names and we must unescape again before passing them along.
756
+ SWFUpload.prototype.unescapeFilePostParams = function (file) {
757
+ var reg = /[$]([0-9a-f]{4})/i;
758
+ var unescapedPost = {};
759
+ var uk;
760
 
761
+ if (file != undefined) {
762
+ for (var k in file.post) {
763
+ if (file.post.hasOwnProperty(k)) {
764
+ uk = k;
765
+ var match;
766
+ while ((match = reg.exec(uk)) !== null) {
767
+ uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
768
+ }
769
+ unescapedPost[uk] = file.post[k];
770
+ }
771
+ }
772
 
773
+ file.post = unescapedPost;
774
+ }
 
 
 
 
 
775
 
776
+ return file;
777
+ };
778
+
779
+ SWFUpload.prototype.flashReady = function () {
780
+ // Check that the movie element is loaded correctly with its ExternalInterface methods defined
781
+ var movieElement = this.getMovieElement();
782
+
783
+ // Pro-actively unhook all the Flash functions
784
+ if (typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
785
+ this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
786
+ for (var key in movieElement) {
787
+ try {
788
+ if (typeof(movieElement[key]) === "function") {
789
+ movieElement[key] = null;
790
+ }
791
+ } catch (ex) {
792
+ }
793
  }
 
 
794
  }
795
+
796
+ this.queueEvent("swfupload_loaded_handler");
797
  };
798
 
 
 
 
 
799
 
800
  /* This is a chance to do something before the browse window opens */
801
+ SWFUpload.prototype.fileDialogStart = function () {
802
+ this.queueEvent("file_dialog_start_handler");
803
  };
804
 
805
 
806
  /* Called when a file is successfully added to the queue. */
807
+ SWFUpload.prototype.fileQueued = function (file) {
808
+ file = this.unescapeFilePostParams(file);
809
+ this.queueEvent("file_queued_handler", file);
810
  };
811
 
812
 
813
  /* Handle errors that occur when an attempt to queue a file fails. */
814
+ SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
815
+ file = this.unescapeFilePostParams(file);
816
+ this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817
  };
818
 
819
  /* Called after the file dialog has closed and the selected files have been queued.
820
  You could call startUpload here if you want the queued files to begin uploading immediately. */
821
+ SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued) {
822
+ this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued]);
823
  };
824
 
825
+ SWFUpload.prototype.uploadStart = function (file) {
826
+ file = this.unescapeFilePostParams(file);
827
+ this.queueEvent("return_upload_start_handler", file);
828
+ };
829
+
830
+ SWFUpload.prototype.returnUploadStart = function (file) {
831
+ var returnValue;
832
+ if (typeof this.settings.upload_start_handler === "function") {
833
+ file = this.unescapeFilePostParams(file);
834
+ returnValue = this.settings.upload_start_handler.call(this, file);
835
+ } else if (this.settings.upload_start_handler != undefined) {
836
+ throw "upload_start_handler must be a function";
837
+ }
838
+
839
+ // Convert undefined to true so if nothing is returned from the upload_start_handler it is
840
+ // interpretted as 'true'.
841
+ if (returnValue === undefined) {
842
+ returnValue = true;
843
+ }
844
 
845
+ returnValue = !!returnValue;
846
 
847
+ this.callFlash("ReturnUploadStart", [returnValue]);
 
 
 
 
 
848
  };
849
 
 
 
 
 
850
 
851
+
852
+ SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
853
+ file = this.unescapeFilePostParams(file);
854
+ this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
855
  };
856
 
857
+ SWFUpload.prototype.uploadError = function (file, errorCode, message) {
858
+ file = this.unescapeFilePostParams(file);
859
+ this.queueEvent("upload_error_handler", [file, errorCode, message]);
 
860
  };
861
 
862
+ SWFUpload.prototype.uploadSuccess = function (file, serverData) {
863
+ file = this.unescapeFilePostParams(file);
864
+ this.queueEvent("upload_success_handler", [file, serverData]);
 
 
 
865
  };
866
 
867
+ SWFUpload.prototype.uploadComplete = function (file) {
868
+ file = this.unescapeFilePostParams(file);
869
+ this.queueEvent("upload_complete_handler", file);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
870
  };
871
 
872
+ /* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
873
+ internal debug console. You can override this event and have messages written where you want. */
874
+ SWFUpload.prototype.debug = function (message) {
875
+ this.queueEvent("debug_handler", message);
876
+ };
877
 
878
 
879
  /* **********************************
884
 
885
  The console is automatically scrolled as messages appear.
886
 
887
+ If you are using your own debug handler or when you deploy to production and
888
+ have debug disabled you can remove these functions to reduce the file size
889
+ and complexity.
890
+ ********************************** */
891
+
892
+ // Private: debugMessage is the default debug_handler. If you want to print debug messages
893
+ // call the debug() function. When overriding the function your own function should
894
+ // check to see if the debug setting is true before outputting debug information.
895
  SWFUpload.prototype.debugMessage = function (message) {
896
+ if (this.settings.debug) {
897
+ var exceptionMessage, exceptionValues = [];
898
+
899
+ // Check for an exception object and print it nicely
900
+ if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") {
901
+ for (var key in message) {
902
+ if (message.hasOwnProperty(key)) {
903
+ exceptionValues.push(key + ": " + message[key]);
904
+ }
905
+ }
906
+ exceptionMessage = exceptionValues.join("\n") || "";
907
+ exceptionValues = exceptionMessage.split("\n");
908
+ exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: ");
909
+ SWFUpload.Console.writeLine(exceptionMessage);
910
+ } else {
911
+ SWFUpload.Console.writeLine(message);
912
  }
 
 
 
 
 
 
913
  }
914
  };
915
 
admin/js/swfupload.swf ADDED
Binary file
admin/js/swfupload_f9.swf DELETED
Binary file
admin/js/uploadtab.js.php DELETED
@@ -1,270 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * @title Uplaod-tab, required for Rich text editor
5
- * @author Alex Rabe
6
- * @copyright 2008
7
- */
8
-
9
- require_once('../../../../../wp-config.php');
10
- require_once('../../../../../wp-admin/admin.php');
11
- cache_javascript_headers();
12
- $ngg_options = get_option('ngg_options');
13
-
14
- // get the effect code
15
- if ($ngg_options['thumbEffect'] != "none") $thumbcode = stripslashes($ngg_options['thumbCode']);
16
- if ($ngg_options['thumbEffect'] == "highslide") $thumbcode = 'class="highslide" onclick="return hs.expand(this)"';
17
- else $thumbcode = str_replace("%GALLERY_NAME%", "", $thumbcode);
18
-
19
- ?>
20
- addLoadEvent( function() {
21
- theFileList = {
22
- currentImage: {ID: 0},
23
- nonce: '',
24
- tab: '',
25
- gal: '',
26
- postID: 0,
27
-
28
- initializeVars: function() {
29
- this.urlData = document.location.href.split('?');
30
- this.params = this.urlData[1].toQueryParams();
31
- this.postID = this.params['post_id'];
32
- this.tab = this.params['tab'];
33
- this.gal = this.params['select_gal'];
34
- this.style = this.params['style'];
35
- this.ID = this.params['ID'];
36
- if ( !this.style )
37
- this.style = 'default';
38
- var nonceEl = $('nonce-value');
39
- if ( nonceEl )
40
- this.nonce = nonceEl.value;
41
- if ( this.ID ) {
42
- this.grabImageData( this.ID );
43
- this.imageView( this.ID );
44
- }
45
- },
46
-
47
- initializeLinks: function() {
48
- if ( this.ID )
49
- return;
50
- $$('a.file-link').each( function(i) {
51
- var id = i.id.split('-').pop();
52
- i.onclick = function(e) { theFileList[ 'inline' == theFileList.style ? 'imageView' : 'editView' ](id, e); }
53
- } );
54
- },
55
-
56
- grabImageData: function(id) {
57
- if ( id == this.currentImage.ID )
58
- return;
59
-
60
- this.currentImage.src = ( 0 == id ? '' : $('nggimage-url-' + id).value );
61
- this.currentImage.thumb = ( 0 == id ? '' : $('nggimage-thumb-url-' + id).value );
62
- this.currentImage.title = ( 0 == id ? '' : $('nggimage-title-' + id).value );
63
- this.currentImage.alttext = ( 0 == id ? '' : $('nggimage-alttext-' + id).value );
64
- this.currentImage.description = ( 0 == id ? '' : $('nggimage-description-' + id).value );
65
- var widthEl = $('nggimage-width-' + id);
66
- if ( widthEl ) {
67
- this.currentImage.width = ( 0 == id ? '' : widthEl.value );
68
- this.currentImage.height = ( 0 == id ? '' : $('nggimage-height-' + id).value );
69
- } else {
70
- this.currentImage.width = false;
71
- this.currentImage.height = false;
72
- }
73
- this.currentImage.isImage = 1;
74
- this.currentImage.ID = id;
75
- },
76
-
77
- imageView: function(id, e) {
78
- this.prepView(id);
79
- var h = '';
80
-
81
- h += "<div id='upload-file'>"
82
- if ( this.ID ) {
83
- var params = $H(this.params);
84
- params.ID = '';
85
- params.action = '';
86
- h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('&laquo; Back')); ?></a>";
87
- } else {
88
- h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('&laquo; Back')) ?></a>";
89
- }
90
- h += "<div id='file-title'>"
91
- h += "<h2>" + this.currentImage.title + "</h2>";
92
- h += " &#8212; <span>";
93
- h += "<a href='#' onclick='return theFileList.editView(" + id + ");'><?php echo attribute_escape(__('Edit')); ?></a>"
94
- h += "</span>";
95
- h += '</div>'
96
- h += "<div id='upload-file-view' class='alignleft'>";
97
- h += "<a href='" + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>";
98
- h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
99
- h += "</a>";
100
- h += "</div>";
101
-
102
- h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>";
103
- h += "<table>";
104
- var display = [];
105
- var checked = 'display-thumb';
106
- display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> <?php echo attribute_escape(__('Thumbnail')); ?></label><br />");
107
- display.push("<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo attribute_escape(__('Full size')); ?></label>");
108
- if ( display.length ) {
109
- display.push("<br /><label for='display-title'><input type='radio' name='display' id='display-title' value='title' /> <?php echo attribute_escape(__('Title')); ?></label>");
110
- h += "<tr><th style='padding-bottom:.5em'><?php echo attribute_escape(__('Show:')); ?></th><td style='padding-bottom:.5em'>";
111
- $A(display).each( function(i) { h += i; } );
112
- h += "</td></tr>";
113
- }
114
-
115
- h += "<tr><th><?php echo attribute_escape(__('Link to:')); ?></th><td>";
116
- h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo attribute_escape(__('File')); ?></label><br />";
117
- h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo attribute_escape(__('None')); ?></label>";
118
- h += "</td></tr>";
119
-
120
- h += "<tr><td colspan='2'><p class='submit'>";
121
- h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo attribute_escape(__('Send to editor &raquo;')); ?>' />";
122
- h += "</p></td></tr></table>";
123
- h += "</form>";
124
-
125
- h += "</div>";
126
-
127
- new Insertion.Top('upload-content', h);
128
- var displayEl = $(checked);
129
- if ( displayEl )
130
- displayEl.checked = true;
131
-
132
- if (e) Event.stop(e);
133
- return false;
134
- },
135
-
136
- editView: function(id, e) {
137
- this.prepView(id);
138
- var h = '';
139
-
140
- var action = 'upload.php?style=' + this.style + '&amp;tab=' + this.tab;
141
- if ( this.postID )
142
- action += '&amp;post_id=' + this.postID;
143
-
144
- h += "<form id='upload-file' method='post' action='" + action + "'>";
145
- if ( this.ID ) {
146
- var params = $H(this.params);
147
- params.ID = '';
148
- params.action = '';
149
- h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('&laquo; Back')); ?></a>";
150
- } else {
151
- h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('&laquo; Back')); ?></a>";
152
- }
153
- h += "<div id='file-title'>"
154
- h += "<h2>" + this.currentImage.title + "</h2>";
155
- h += " &#8212; <span>";
156
- h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'><?php echo attribute_escape(__('Insert')); ?></a>"
157
- h += "</span>";
158
- h += '</div>'
159
- h += "<div id='upload-file-view' class='alignleft'>";
160
- h += "<a href='" + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file')); ?>'>";
161
- h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
162
- h += "</a>";
163
- h += "</div>";
164
-
165
- h += "<table><col /><col class='widefat' /><tr>"
166
- h += "<th scope='row'><label for='url'><?php echo attribute_escape(__('URL')); ?></label></th>";
167
- h += "<td><input type='text' id='url' class='readonly' value='" + this.currentImage.src + "' readonly='readonly' /></td>";
168
- h += "</tr><tr>";
169
- h += "<th scope='row'><label for='image_title'><?php echo attribute_escape(__('Alt &amp; Title Text','nggallery')); ?></label></th>";
170
- h += "<td><input type='text' id='image_title' name='image_title' value='" + this.currentImage.alttext + "' /></td>";
171
- h += "</tr><tr>";
172
- h += "<th scope='row'><label for='image_desc'><?php echo attribute_escape(__('Description')); ?></label></th>";
173
- h += "<td><textarea name='image_desc' id='image_desc'>" + this.currentImage.description + "</textarea></td>";
174
- h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo attribute_escape(__('Delete File')); ?>' onclick='theFileList.deleteFile(" + id + ");' />";
175
- h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />";
176
- h += "<input type='hidden' name='action' id='action-value' value='update' />";
177
- h += "<input type='hidden' name='ID' value='" + id + "' />";
178
- h += "<input type='hidden' name='from_gal' id='from_gal' value='" + this.gal + "' />";
179
- h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />";
180
- h += "<div class='submit'><input type='submit' name='save' id='save' value='<?php echo attribute_escape(__('Save &raquo;')); ?>' /></div>";
181
- h += "</td></tr></table></form>";
182
-
183
- new Insertion.Top('upload-content', h);
184
- if (e) Event.stop(e);
185
- return false;
186
- },
187
-
188
- prepView: function(id) {
189
- this.cancelView( true );
190
- var filesEl = $('upload-files');
191
- if ( filesEl )
192
- filesEl.hide();
193
- var navEl = $('current-tab-nav');
194
- if ( navEl )
195
- navEl.hide();
196
- var selGAL = $('select-gallery');
197
- if ( selGAL )
198
- selGAL.hide();
199
- this.grabImageData(id);
200
- },
201
-
202
- cancelView: function( prep ) {
203
- if ( !prep ) {
204
- var filesEl = $('upload-files');
205
- if ( filesEl )
206
- Element.show(filesEl);
207
- var navEl = $('current-tab-nav');
208
- if ( navEl )
209
- Element.show(navEl);
210
- var selGAL = $('select-gallery');
211
- if ( selGAL )
212
- Element.show(selGAL);
213
- }
214
- if ( !this.ID )
215
- this.grabImageData(0);
216
- var div = $('upload-file');
217
- if ( div )
218
- Element.remove(div);
219
- return false;
220
- },
221
-
222
- sendToEditor: function(id) {
223
- this.grabImageData(id);
224
- var link = '';
225
- var display = '';
226
- var h = '';
227
-
228
- link = $A(document.forms.uploadoptions.elements.link).detect( function(i) { return i.checked; } ).value;
229
- displayEl = $A(document.forms.uploadoptions.elements.display).detect( function(i) { return i.checked; } )
230
- if ( displayEl )
231
- display = displayEl.value;
232
- else if ( 1 == this.currentImage.isImage )
233
- display = 'full';
234
-
235
- if ( 'none' != link )
236
- h += '<a href="' + this.currentImage.src + '" <?php echo $thumbcode; ?> title="' + this.currentImage.alttext + '">';
237
- if ( display && 'title' != display )
238
- h += "<img src='" + ( 'thumb' == display ? ( this.currentImage.thumb ) : ( this.currentImage.src ) ) + "' alt='" + this.currentImage.title + "' title='" + this.currentImage.alttext + "' />";
239
- else
240
- h += this.currentImage.alttext;
241
- if ( 'none' != link )
242
- h += '</a>';
243
-
244
- var win = window.opener ? window.opener : window.dialogArguments;
245
- if ( !win )
246
- win = top;
247
- tinyMCE = win.tinyMCE;
248
- if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) {
249
- tinyMCE.selectedInstance.getWin().focus();
250
- tinyMCE.execCommand('mceInsertContent', false, h);
251
- } else
252
- win.edInsertContent(win.edCanvas, h);
253
- if ( !this.ID )
254
- this.cancelView();
255
- return false;
256
- },
257
-
258
- deleteFile: function(id) {
259
- if ( confirm("<?php printf(js_escape(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") ) {
260
- $('action-value').value = 'delete';
261
- $('upload-file').submit();
262
- return true;
263
- }
264
- return false;
265
- }
266
-
267
- };
268
- theFileList.initializeVars();
269
- theFileList.initializeLinks();
270
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/manage-galleries.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
+
5
+ // *** show main gallery list
6
+ function nggallery_manage_gallery_main() {
7
+
8
+ global $wpdb, $ngg;
9
+
10
+ ?>
11
+ <div class="wrap">
12
+ <h2><?php _e('Gallery Overview', 'nggallery') ?></h2>
13
+ <br style="clear: both;"/>
14
+ <table class="widefat">
15
+ <thead>
16
+ <tr>
17
+ <th scope="col" ><?php _e('ID') ?></th>
18
+ <th scope="col" ><?php _e('Title', 'nggallery') ?></th>
19
+ <th scope="col" ><?php _e('Description', 'nggallery') ?></th>
20
+ <th scope="col" ><?php _e('Author', 'nggallery') ?></th>
21
+ <th scope="col" ><?php _e('Page ID', 'nggallery') ?></th>
22
+ <th scope="col" ><?php _e('Quantity', 'nggallery') ?></th>
23
+ <th scope="col" ><?php _e('Action'); ?></th>
24
+ </tr>
25
+ </thead>
26
+ <tbody>
27
+ <?php
28
+
29
+ $gallerylist = nggdb::find_all_galleries('gid', 'asc', TRUE);
30
+
31
+ if($gallerylist) {
32
+ foreach($gallerylist as $gallery) {
33
+ $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
34
+ $gid = $gallery->gid;
35
+ $author_user = get_userdata( (int) $gallery->author );
36
+ ?>
37
+ <tr id="gallery-<?php echo $gid ?>" <?php echo $class; ?> >
38
+ <th scope="row"><?php echo $gid; ?></th>
39
+ <td>
40
+ <?php if(nggAdmin::can_manage_this_gallery($gallery->author)) { ?>
41
+ <a href="<?php echo wp_nonce_url( $ngg->manage_page->base_page . "&amp;mode=edit&amp;gid=" . $gid, 'ngg_editgallery')?>" class='edit' title="<?php _e('Edit') ?>" >
42
+ <?php echo $gallery->title; ?>
43
+ </a>
44
+ <?php } else { ?>
45
+ <?php echo $gallery->title; ?>
46
+ <?php } ?>
47
+ </td>
48
+ <td><?php echo $gallery->galdesc; ?>&nbsp;</td>
49
+ <td><?php echo $author_user->display_name; ?></td>
50
+ <td><?php echo $gallery->pageid; ?></td>
51
+ <td><?php echo $gallery->counter; ?></td>
52
+ <td>
53
+ <?php if(nggAdmin::can_manage_this_gallery($gallery->author)) : ?>
54
+ <a href="<?php echo wp_nonce_url( $ngg->manage_page->base_page . "&amp;mode=delete&amp;gid=" . $gid, 'ngg_editgallery')?>" class="delete" onclick="javascript:check=confirm( '<?php _e("Delete this gallery ?",'nggallery')?>');if(check==false) return false;"><?php _e('Delete') ?></a>
55
+ <?php endif; ?>
56
+ </td>
57
+ </tr>
58
+ <?php
59
+ }
60
+ } else {
61
+ echo '<tr><td colspan="7" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
62
+ }
63
+ ?>
64
+ </tbody>
65
+ </table>
66
+ </div>
67
+ <?php
68
+ }
69
+ ?>
admin/manage-images.php ADDED
@@ -0,0 +1,496 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.');}
4
+
5
+ function nggallery_picturelist() {
6
+ // *** show picture list
7
+ global $wpdb, $user_ID, $ngg;
8
+
9
+ // GET variables
10
+ $act_gid = $ngg->manage_page->gid;
11
+ $showTags = $ngg->manage_page->showTags;
12
+ $hideThumbs = $ngg->manage_page->hideThumbs;
13
+
14
+ // Load the gallery metadata
15
+ $gallery = nggdb::find_gallery($act_gid);
16
+
17
+ if (!$gallery) {
18
+ nggGallery::show_error(__('Gallery not found.', 'nggallery'));
19
+ return;
20
+ }
21
+
22
+ // get picture values
23
+ $picturelist = nggdb::get_gallery($act_gid, $ngg->options['galSort'], $ngg->options['galSortDir'], false);
24
+
25
+ // get the current author
26
+ $act_author_user = get_userdata( (int) $gallery->author );
27
+
28
+ // list all galleries
29
+ $gallerylist = nggdb::find_all_galleries();
30
+
31
+ ?>
32
+
33
+ <script type="text/javascript">
34
+ function showDialog( windowId ) {
35
+ var form = document.getElementById('updategallery');
36
+ var elementlist = "";
37
+ for (i = 0, n = form.elements.length; i < n; i++) {
38
+ if(form.elements[i].type == "checkbox") {
39
+ if(form.elements[i].name == "doaction[]")
40
+ if(form.elements[i].checked == true)
41
+ if (elementlist == "")
42
+ elementlist = form.elements[i].value
43
+ else
44
+ elementlist += "," + form.elements[i].value ;
45
+ }
46
+ }
47
+ jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val());
48
+ jQuery("#" + windowId + "_imagelist").val(elementlist);
49
+ // console.log (jQuery("#TB_imagelist").val());
50
+ tb_show("", "#TB_inline?width=640&height=120&inlineId=" + windowId + "&modal=true", false);
51
+ }
52
+ </script>
53
+ <script type="text/javascript">
54
+ <!--
55
+ function checkAll(form)
56
+ {
57
+ for (i = 0, n = form.elements.length; i < n; i++) {
58
+ if(form.elements[i].type == "checkbox") {
59
+ if(form.elements[i].name == "doaction[]") {
60
+ if(form.elements[i].checked == true)
61
+ form.elements[i].checked = false;
62
+ else
63
+ form.elements[i].checked = true;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ function getNumChecked(form)
70
+ {
71
+ var num = 0;
72
+ for (i = 0, n = form.elements.length; i < n; i++) {
73
+ if(form.elements[i].type == "checkbox") {
74
+ if(form.elements[i].name == "doaction[]")
75
+ if(form.elements[i].checked == true)
76
+ num++;
77
+ }
78
+ }
79
+ return num;
80
+ }
81
+
82
+ // this function check for a the number of selected images, sumbmit false when no one selected
83
+ function checkSelected() {
84
+
85
+ var numchecked = getNumChecked(document.getElementById('updategallery'));
86
+
87
+ if(numchecked < 1) {
88
+ alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>');
89
+ return false;
90
+ }
91
+ //TODO: For copy to and move to we need some better way around
92
+ if (jQuery('#bulkaction').val() == 'copy_to') {
93
+ showDialog('selectgallery');
94
+ return false;
95
+ }
96
+
97
+ if (jQuery('#bulkaction').val() == 'move_to') {
98
+ showDialog('selectgallery');
99
+ return false;
100
+ }
101
+
102
+ return confirm('<?php echo sprintf(js_escape(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>');
103
+ }
104
+
105
+ jQuery(document).ready( function() {
106
+ // close postboxes that should be closed
107
+ jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
108
+
109
+ if (typeof postboxes != "undefined")
110
+ postboxes.add_postbox_toggles('ngg-manage-gallery'); // WP 2.7
111
+ else
112
+ add_postbox_toggles('ngg-manage-gallery'); // WP 2.6
113
+
114
+ });
115
+ //-->
116
+ </script>
117
+
118
+ <div class="wrap">
119
+
120
+ <h2><?php echo __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ); ?> : <?php echo $gallery->title; ?></h2>
121
+
122
+ <br style="clear: both;" />
123
+
124
+ <form id="updategallery" class="nggform" method="POST" action="<?php echo $ngg->manage_page->base_page . '&amp;mode=edit&amp;gid=' . $act_gid ?>" accept-charset="utf-8">
125
+ <?php wp_nonce_field('ngg_updategallery') ?>
126
+
127
+ <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
128
+ <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
129
+ <div id="poststuff">
130
+ <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
131
+ <div id="gallerydiv" class="postbox <?php echo postbox_classes('gallerydiv', 'ngg-manage-gallery'); ?>" >
132
+ <h3><?php _e('Gallery settings', 'nggallery') ?><small> (<?php _e('Click here for more settings', 'nggallery') ?>)</small></h3>
133
+ <div class="inside">
134
+ <table class="form-table" >
135
+ <tr>
136
+ <th align="left"><?php _e('Title') ?>:</th>
137
+ <th align="left"><input type="text" size="50" name="title" value="<?php echo $gallery->title; ?>" /></th>
138
+ <th align="right"><?php _e('Page Link to', 'nggallery') ?>:</th>
139
+ <th align="left">
140
+ <select name="pageid" style="width:95%">
141
+ <option value="0" ><?php _e('Not linked', 'nggallery') ?></option>
142
+ <?php parent_dropdown($gallery->pageid); ?>
143
+ </select>
144
+ </th>
145
+ </tr>
146
+ <tr>
147
+ <th align="left"><?php _e('Description') ?>:</th>
148
+ <th align="left"><textarea name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php echo $gallery->galdesc; ?></textarea></th>
149
+ <th align="right"><?php _e('Preview image', 'nggallery') ?>:</th>
150
+ <th align="left">
151
+ <select name="previewpic" style="width:95%" >
152
+ <option value="0" ><?php _e('No Picture', 'nggallery') ?></option>
153
+ <?php
154
+ if(is_array($picturelist)) {
155
+ foreach($picturelist as $picture) {
156
+ $selected = ($picture->pid == $gallery->previewpic) ? 'selected="selected" ' : '';
157
+ echo '<option value="'.$picture->pid.'" '.$selected.'>'.$picture->pid.' - '.$picture->filename.'</option>'."\n";
158
+ }
159
+ }
160
+ ?>
161
+ </select>
162
+ </th>
163
+ </tr>
164
+ <tr>
165
+ <th align="left"><?php _e('Path', 'nggallery') ?>:</th>
166
+ <th align="left"><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="50" name="path" value="<?php echo $gallery->path; ?>" /></th>
167
+ <th align="right"><?php _e('Author', 'nggallery'); ?>:</th>
168
+ <th align="left">
169
+ <?php
170
+ $editable_ids = $ngg->manage_page->get_editable_user_ids( $user_ID );
171
+ if ( $editable_ids && count( $editable_ids ) > 1 )
172
+ wp_dropdown_users( array('include' => $editable_ids, 'name' => 'author', 'selected' => empty( $gallery->author ) ? 0 : $gallery->author ) );
173
+ else
174
+ echo $act_author_user->display_name;
175
+ ?>
176
+ </th>
177
+ </tr>
178
+ <tr>
179
+ <th align="left">&nbsp;</th>
180
+ <th align="left">&nbsp;</th>
181
+ <th align="right"><?php _e('Create new page', 'nggallery') ?>:</th>
182
+ <th align="left">
183
+ <select name="parent_id" style="width:95%">
184
+ <option value="0"><?php _e ('Main page (No parent)', 'nggallery'); ?></option>
185
+ <?php parent_dropdown (); ?>
186
+ </select>
187
+ <input class="button-secondary action" type="submit" name="addnewpage" value="<?php _e ('Add page', 'nggallery'); ?>" id="group"/>
188
+ </th>
189
+ </tr>
190
+ </table>
191
+
192
+ <div class="submit">
193
+ <input type="submit" class="button-secondary" name="scanfolder" value="<?php _e("Scan Folder for new images",'nggallery')?> " />
194
+ <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e("Save Changes",'nggallery')?>" />
195
+ </div>
196
+
197
+ </div>
198
+ </div>
199
+ </div> <!-- poststuff -->
200
+
201
+ <div class="tablenav ngg-tablenav">
202
+ <div class="alignleft actions" style="float: left;">
203
+ <select id="bulkaction" name="bulkaction">
204
+ <option value="no_action" ><?php _e("No action",'nggallery')?></option>
205
+ <?php if (!$showTags) { ?>
206
+ <option value="set_watermark" ><?php _e("Set watermark",'nggallery')?></option>
207
+ <option value="new_thumbnail" ><?php _e("Create new thumbnails",'nggallery')?></option>
208
+ <option value="resize_images" ><?php _e("Resize images",'nggallery')?></option>
209
+ <option value="delete_images" ><?php _e("Delete images",'nggallery')?></option>
210
+ <option value="import_meta" ><?php _e("Import metadata",'nggallery')?></option>
211
+ <option value="copy_to" ><?php _e("Copy to...",'nggallery')?></option>
212
+ <option value="move_to"><?php _e("Move to...",'nggallery')?></option>
213
+ <?php } else { ?>
214
+ <option value="add_tags" ><?php _e("Add tags",'nggallery')?></option>
215
+ <option value="delete_tags" ><?php _e("Delete tags",'nggallery')?></option>
216
+ <option value="overwrite_tags" ><?php _e("Overwrite tags",'nggallery')?></option>
217
+ <?php } ?>
218
+ </select>
219
+
220
+ <?php if (!$showTags) { ?>
221
+ <input class="button-secondary" type="submit" name="doaction" value="<?php _e("OK",'nggallery')?>" onclick="if ( !checkSelected() ) return false;" />
222
+ <?php } else {?>
223
+ <input class="button-secondary" type="submit" name="showThickbox" value="<?php _e("OK",'nggallery')?>" onclick="showDialog('tags'); return false;" />
224
+ <?php } ?>
225
+
226
+ <?php if (!$hideThumbs) { ?>
227
+ <input class="button-secondary" type="submit" name="togglethumbs" value="<?php _e("Hide thumbnails ",'nggallery')?>" />
228
+ <?php } else {?>
229
+ <input class="button-secondary" type="submit" name="togglethumbs" value="<?php _e("Show thumbnails ",'nggallery')?>" />
230
+ <?php } ?>
231
+
232
+ <?php if (!$showTags) { ?>
233
+ <input class="button-secondary" type="submit" name="toggletags" value="<?php _e("Show tags",'nggallery')?>" />
234
+ <?php } else {?>
235
+ <input class="button-secondary" type="submit" name="toggletags" value="<?php _e("Hide tags",'nggallery')?>" />
236
+ <?php } ?>
237
+
238
+ <?php if ($ngg->options['galSort'] == "sortorder") { ?>
239
+ <input class="button-secondary" type="submit" name="sortGallery" value="<?php _e("Sort gallery",'nggallery')?>" />
240
+ <?php } ?>
241
+
242
+ </div>
243
+ <span style="float:right; padding:2px 8px 0 0;"><input type="submit" name="updatepictures" class="button-primary action" value="<?php _e("Save Changes",'nggallery')?>" /></span>
244
+ </div>
245
+
246
+ <table id="ngg-listimages" class="widefat" >
247
+ <thead>
248
+ <tr>
249
+ <?php $gallery_columns = ngg_manage_gallery_columns(); ?>
250
+ <?php foreach($gallery_columns as $gallery_column_key => $column_display_name) {
251
+ switch ($gallery_column_key) {
252
+ case 'cb' :
253
+ $class = ' class="check-column;"';
254
+ break;
255
+ case 'tags' :
256
+ $class = ' style="width:70%;"';
257
+ break;
258
+ case 'action' :
259
+ $class = ' colspan="3" style="text-align: center;"';
260
+ break;
261
+ default :
262
+ $class = ' style="text-align: center;"';
263
+ }
264
+ ?>
265
+ <th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
266
+ <?php } ?>
267
+ </tr>
268
+ </thead>
269
+ <tfoot>
270
+ <tr>
271
+ <?php foreach($gallery_columns as $gallery_column_key => $column_display_name) {
272
+ switch ($gallery_column_key) {
273
+ case 'cb' :
274
+ $class = ' class="check-column;"';
275
+ break;
276
+ case 'tags' :
277
+ $class = ' style="width:70%;"';
278
+ break;
279
+ case 'action' :
280
+ $class = ' colspan="3" style="text-align: center;"';
281
+ break;
282
+ default :
283
+ $class = ' style="text-align: center;"';
284
+ }
285
+ ?>
286
+ <th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
287
+ <?php } ?>
288
+ </tr>
289
+ </tfoot>
290
+ <tbody>
291
+ <?php
292
+ if($picturelist) {
293
+
294
+ $thumbsize = "";
295
+ if ($ngg->options['thumbfix']) {
296
+ $thumbsize = 'width="'.$ngg->options['thumbwidth'].'" height="'.$ngg->options['thumbheight'].'"';
297
+ }
298
+
299
+ if ($ngg->options['thumbcrop']) {
300
+ $thumbsize = 'width="'.$ngg->options['thumbwidth'].'" height="'.$ngg->options['thumbwidth'].'"';
301
+ }
302
+
303
+ foreach($picturelist as $picture) {
304
+
305
+ $pid = (int) $picture->pid;
306
+ $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
307
+ $exclude = ( $picture->exclude ) ? 'checked="checked"' : '';
308
+ $date = mysql2date(get_option('date_format'), $picture->imagedate);
309
+ $time = mysql2date(get_option('time_format'), $picture->imagedate);
310
+
311
+ ?>
312
+ <tr id="picture-<?php echo $pid ?>" <?php echo $class ?> style="text-align:center">
313
+ <?php foreach($gallery_columns as $gallery_column_key => $column_display_name) {
314
+ switch ($gallery_column_key) {
315
+ case 'cb' :
316
+ ?>
317
+ <td class="check-column" scope="row"><input name="doaction[]" type="checkbox" value="<?php echo $pid ?>" /></td>
318
+ <?php
319
+ break;
320
+ case 'id' :
321
+ ?>
322
+ <td class="id column-id" scope="row" style="text-align: center"><?php echo $pid ?></td>
323
+ <?php
324
+ break;
325
+ case 'filename' :
326
+ ?>
327
+ <td class="media-icon" style="text-align: left;">
328
+ <a href="<?php echo $picture->imageURL; ?>" class="thickbox" title="<?php echo $picture->filename ?>">
329
+ <?php echo $picture->filename ?>
330
+ </a>
331
+ <br /><?php echo $date?>
332
+ </td>
333
+ <?php
334
+ break;
335
+ case 'thumbnail' :
336
+ ?>
337
+ <td class="thumbnail column-thumbnail"><a href="<?php echo $picture->imageURL; ?>" class="thickbox" title="<?php echo $picture->filename ?>">
338
+ <img class="thumb" src="<?php echo $picture->thumbURL; ?>" <?php echo $thumbsize ?> />
339
+ </a>
340
+ <br /><?php echo $date?>
341
+ </td>
342
+ <?php
343
+ break;
344
+ case 'alt_title_desc' :
345
+ ?>
346
+ <td class="altdesc column-altdesc" style="width:500px">
347
+ <input name="alttext[<?php echo $pid ?>]" type="text" style="width:95%; margin-bottom: 2px;" value="<?php echo stripslashes($picture->alttext) ?>" /><br/>
348
+ <textarea name="description[<?php echo $pid ?>]" style="width:95%; margin-top: 2px;" rows="2" ><?php echo stripslashes($picture->description) ?></textarea>
349
+ </td>
350
+ <?php
351
+ break;
352
+ case 'description' :
353
+ ?>
354
+ <td class="description column-description"><textarea name="description[<?php echo $pid ?>]" class="textarea1" cols="42" rows="2" ><?php echo stripslashes($picture->description) ?></textarea></td>
355
+ <?php
356
+ break;
357
+ case 'alt_title_text' :
358
+ ?>
359
+ <td class="alttext column-alttext"><input name="alttext[<?php echo $pid ?>]" type="text" size="30" value="<?php echo stripslashes($picture->alttext) ?>" /></td>
360
+ <?php
361
+ break;
362
+ case 'exclude' :
363
+ ?>
364
+ <td class="exclude column-exclude"><input name="exclude[<?php echo $pid ?>]" type="checkbox" value="1" <?php echo $exclude ?> /></td>
365
+ <?php
366
+ break;
367
+ case 'tags' :
368
+ $picture->tags = wp_get_object_terms($pid, 'ngg_tag', 'fields=names');
369
+ if (is_array ($picture->tags) ) $picture->tags = implode(', ', $picture->tags);
370
+ ?>
371
+ <td class="tags column-tags" style="width:500px;"><textarea name="tags[<?php echo $pid ?>]" style="width:95%;" rows="2"><?php echo $picture->tags ?></textarea></td>
372
+ <?php
373
+ break;
374
+ case 'action' :
375
+ ?>
376
+ <td><a href="<?php echo NGGALLERY_URLPATH."admin/showmeta.php?id=".$pid ?>" class="thickbox" title="<?php _e("Show Meta data",'nggallery')?>" ><?php _e('Meta') ?></a></td>
377
+ <td><a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=delpic&amp;gid=".$act_gid."&amp;pid=".$pid, 'ngg_delpicture')?>" class="delete" onclick="javascript:check=confirm( '<?php _e("Delete this file ?",'nggallery')?>');if(check==false) return false;" ><?php _e('Delete') ?></a></td>
378
+ <?php
379
+ break;
380
+ default :
381
+ ?>
382
+ <td><?php do_action('ngg_manage_gallery_custom_column', $gallery_column_key, $pid); ?></td>
383
+ <?php
384
+ break;
385
+ }
386
+ ?>
387
+ <?php } ?>
388
+ </tr>
389
+ <?php
390
+ }
391
+ } else {
392
+ echo '<tr><td colspan="8" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
393
+ }
394
+ ?>
395
+
396
+ </tbody>
397
+ </table>
398
+ <p class="submit"><input type="submit" class="button-primary action" name="updatepictures" value="<?php _e("Save Changes",'nggallery')?>" /></p>
399
+ </form>
400
+ <br class="clear"/>
401
+ </div><!-- /#wrap -->
402
+
403
+ <!-- #entertags -->
404
+ <div id="tags" style="display: none;" >
405
+ <form id="form-tags" method="POST" accept-charset="utf-8">
406
+ <?php wp_nonce_field('ngg_thickbox_form') ?>
407
+ <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
408
+ <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
409
+ <input type="hidden" id="tags_imagelist" name="TB_imagelist" value="" />
410
+ <input type="hidden" id="tags_bulkaction" name="TB_bulkaction" value="" />
411
+ <table width="100%" border="0" cellspacing="3" cellpadding="3" >
412
+ <tr>
413
+ <th><?php _e("Enter the tags",'nggallery')?> : <input name="taglist" type="text" style="width:90%" value="" /></th>
414
+ </tr>
415
+ <tr align="right">
416
+ <td class="submit">
417
+ <input class="button-primary" type="submit" name="TB_EditTags" value="<?php _e("OK",'nggallery')?>" onclick="var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>'); tb_remove(); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>')" />
418
+ &nbsp;
419
+ <input class="button-secondary" type="reset" value="&nbsp;<?php _e("Cancel",'nggallery')?>&nbsp;" onclick="tb_remove()"/>
420
+ </td>
421
+ </tr>
422
+ </table>
423
+ </form>
424
+ </div>
425
+ <!-- /#entertags -->
426
+
427
+ <!-- #selectgallery -->
428
+ <div id="selectgallery" style="display: none;" >
429
+ <form id="form-select-gallery" method="POST" accept-charset="utf-8">
430
+ <?php wp_nonce_field('ngg_thickbox_form') ?>
431
+ <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
432
+ <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
433
+ <input type="hidden" id="selectgallery_imagelist" name="TB_imagelist" value="" />
434
+ <input type="hidden" id="selectgallery_bulkaction" name="TB_bulkaction" value="" />
435
+ <table width="100%" border="0" cellspacing="3" cellpadding="3" >
436
+ <tr>
437
+ <th>
438
+ <?php _e("Select the destination gallery:", 'nggallery'); ?>&nbsp;
439
+ <select name="dest_gid" style="width:90%" >
440
+ <?php
441
+ foreach ($gallerylist as $gallery) {
442
+ if ($gallery->gid != $act_gid) {
443
+ ?>
444
+ <option value="<?php echo $gallery->gid; ?>" ><?php echo $gallery->gid; ?> - <?php echo stripslashes($gallery->title); ?></option>
445
+ <?php
446
+ }
447
+ }
448
+ ?>
449
+ </select>
450
+ </th>
451
+ </tr>
452
+ <tr align="right">
453
+ <td class="submit">
454
+ <input type="submit" class="button-primary" name="TB_SelectGallery" value="<?php _e("OK",'nggallery')?>" onclick="var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>'); tb_remove(); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to copy or move %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>')" />
455
+ &nbsp;
456
+ <input class="button-secondary" type="reset" value="<?php _e("Cancel",'nggallery')?>" onclick="tb_remove()"/>
457
+ </td>
458
+ </tr>
459
+ </table>
460
+ </form>
461
+ </div>
462
+ <!-- /#selectgallery -->
463
+ <?php
464
+ }
465
+
466
+ // define the columns to display, the syntax is 'internal name' => 'display name'
467
+ function ngg_manage_gallery_columns() {
468
+ global $ngg;
469
+
470
+ $gallery_columns = array();
471
+
472
+ $gallery_columns['cb'] = '<input name="checkall" type="checkbox" onclick="checkAll(document.getElementById(\'updategallery\'));" />';
473
+ $gallery_columns['id'] = __('ID');
474
+
475
+ if ( !$ngg->manage_page->hideThumbs ) {
476
+ $gallery_columns['thumbnail'] = __('Thumbnail', 'nggallery') . ' / ' . __('Date', 'nggallery');
477
+ } else {
478
+ $gallery_columns['filename'] = __('File name', 'nggallery') . ' / ' . __('Date', 'nggallery');
479
+ }
480
+
481
+ if ( !$ngg->manage_page->showTags ) {
482
+ $gallery_columns['alt_title_desc'] = __('Alt &amp; Title Text', 'nggallery') . ' / ' . __('Description', 'nggallery');
483
+ // $gallery_columns['description'] = __('Description', 'nggallery');
484
+ // $gallery_columns['alt_title_text'] = __('Alt &amp; Title Text', 'nggallery');
485
+ $gallery_columns['exclude'] = __('exclude', 'nggallery');
486
+ } else {
487
+ $gallery_columns['tags'] = __('Tags (comma separated list)', 'nggallery');
488
+ }
489
+ $gallery_columns['action'] = __('Action', 'nggallery');
490
+
491
+ $gallery_columns = apply_filters('ngg_manage_gallery_columns', $gallery_columns);
492
+
493
+ return $gallery_columns;
494
+ }
495
+
496
+ ?>
admin/manage-sort.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @author Alex Rabe
5
+ * @copyright 2008
6
+ */
7
+
8
+ function nggallery_sortorder($galleryID = 0){
9
+ global $wpdb, $ngg;
10
+
11
+ if ($galleryID == 0) return;
12
+
13
+ $galleryID = (int) $galleryID;
14
+
15
+ if (isset ($_POST['updateSortorder'])) {
16
+ check_admin_referer('ngg_updatesortorder');
17
+ // get variable new sortorder
18
+ parse_str($_POST['sortorder']);
19
+ if (is_array($sortArray)){
20
+ $neworder = array();
21
+ foreach($sortArray as $pid) {
22
+ $pid = substr($pid, 4); // get id from "pid-x"
23
+ $neworder[] = (int) $pid;
24
+ }
25
+ $sortindex = 1;
26
+ foreach($neworder as $pic_id) {
27
+ $wpdb->query("UPDATE $wpdb->nggpictures SET sortorder = '$sortindex' WHERE pid = $pic_id");
28
+ $sortindex++;
29
+ }
30
+ nggGallery::show_message(__('Sort order changed','nggallery'));
31
+ }
32
+ }
33
+
34
+ //TODO:A unique gallery call must provide me with this information, like $gallery = new nggGallery($id);
35
+
36
+ // get gallery values
37
+ $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
38
+
39
+ // set gallery url
40
+ $act_gallery_url = get_option ('siteurl')."/".$act_gallery->path."/";
41
+ $act_thumbnail_url = get_option ('siteurl')."/".$act_gallery->path.nggGallery::get_thumbnail_folder($act_gallery->path, FALSE);
42
+
43
+ // look for presort args
44
+ $presort = $_GET['presort'];
45
+ $dir = ( $_GET['dir'] == 'DESC' ) ? 'DESC' : 'ASC';
46
+ $sortitems = array('pid', 'filename', 'alttext', 'imagedate');
47
+ // ensure that nobody added some evil sorting :-)
48
+ if (in_array( $presort, $sortitems) )
49
+ $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' ORDER BY {$presort} {$dir}");
50
+ else
51
+ $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' ORDER BY sortorder {$dir}");
52
+
53
+ //this is the url without any presort variable
54
+ $clean_url = 'admin.php?page=nggallery-manage-gallery&amp;mode=sort&amp;gid=' . $galleryID;
55
+ // In the case somebody presort, then we take this url
56
+ if ( isset($_GET['dir']) || isset($_GET['presort']) )
57
+ $base_url = $_SERVER['REQUEST_URI'];
58
+ else
59
+ $base_url = $clean_url;
60
+
61
+ ?>
62
+ <script type='text/javascript' src='<?php echo NGGALLERY_URLPATH ?>admin/js/sorter.js'></script>
63
+ <div class="wrap">
64
+ <form id="sortGallery" method="POST" action="<?php echo $clean_url ?>" onsubmit="saveImageOrder()" accept-charset="utf-8">
65
+ <h2><?php _e('Sort Gallery', 'nggallery') ?></h2>
66
+ <div class="tablenav">
67
+ <div class="alignleft actions">
68
+ <?php wp_nonce_field('ngg_updatesortorder') ?>
69
+ <input class="button-primary action" type="submit" name="updateSortorder" onclick="saveImageOrder()" value="<?php _e('Update Sort Order', 'nggallery') ?>" />
70
+ </div>
71
+ <div class="alignright actions">
72
+ <input class="button-secondary action" type="submit" name="backToGallery" value="<?php _e('Back to gallery', 'nggallery') ?>" />
73
+ </div>
74
+ </div>
75
+ <input name="sortorder" type="hidden" />
76
+ <ul class="subsubsub">
77
+ <li><?php _e('Presort', 'nggallery') ?> :</li>
78
+ <li><a href="<?php echo attribute_escape(remove_query_arg('presort', $base_url)); ?>" <?php if ($presort == '') echo 'class="current"'; ?>><?php _e('Unsorted', 'nggallery') ?></a> |</li>
79
+ <li><a href="<?php echo attribute_escape(add_query_arg('presort', 'pid', $base_url)); ?>" <?php if ($presort == 'pid') echo 'class="current"'; ?>><?php _e('Image ID', 'nggallery') ?></a> |</li>
80
+ <li><a href="<?php echo attribute_escape(add_query_arg('presort', 'filename', $base_url)); ?>" <?php if ($presort == 'filename') echo 'class="current"'; ?>><?php _e('Filename', 'nggallery') ?></a> |</li>
81
+ <li><a href="<?php echo attribute_escape(add_query_arg('presort', 'alttext', $base_url)); ?>" <?php if ($presort == 'alttext') echo 'class="current"'; ?>><?php _e('Alt/Title text', 'nggallery') ?></a> |</li>
82
+ <li><a href="<?php echo attribute_escape(add_query_arg('presort', 'imagedate', $base_url)); ?>" <?php if ($presort == 'imagedate') echo 'class="current"'; ?>><?php _e('Date/Time', 'nggallery') ?></a> |</li>
83
+ <li><a href="<?php echo attribute_escape(add_query_arg('dir', 'ASC', $base_url)); ?>" <?php if ($dir == 'ASC') echo 'class="current"'; ?>><?php _e('Ascending', 'nggallery') ?></a> |</li>
84
+ <li><a href="<?php echo attribute_escape(add_query_arg('dir', 'DESC', $base_url)); ?>" <?php if ($dir == 'DESC') echo 'class="current"'; ?>><?php _e('Descending', 'nggallery') ?></a></li>
85
+ </ul>
86
+ </form>
87
+ <div id="debug" style="clear:both"></div>
88
+ <?php
89
+ if($picturelist) {
90
+ foreach($picturelist as $picture) {
91
+ ?>
92
+ <div class="imageBox" id="pid-<?php echo $picture->pid ?>">
93
+ <div class="imageBox_theImage" style="background-image:url('<?php echo $act_thumbnail_url ."thumbs_" .$picture->filename ?>')"></div>
94
+ <div class="imageBox_label"><span><?php echo stripslashes($picture->alttext) ?></span></div>
95
+ </div>
96
+ <?php
97
+ }
98
+ }
99
+ ?>
100
+ <div id="insertionMarker">
101
+ <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_top.gif"/>
102
+ <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_middle.gif" id="insertionMarkerLine"/>
103
+ <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_bottom.gif"/>
104
+ </div>
105
+ <div id="dragDropContent"></div>
106
+ </div>
107
+
108
+ <?php
109
+ }
110
+ ?>
admin/manage.php CHANGED
@@ -1,715 +1,412 @@
1
  <?php
2
 
3
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
 
5
- function nggallery_admin_manage_gallery() {
6
- global $wpdb;
7
 
8
- //TODO:GID & Mode should the hidden post variables
9
-
10
- // GET variables
11
- $act_gid = (int) trim(attribute_escape($_GET['gid']));
12
- $act_pid = (int) trim(attribute_escape($_GET['pid']));
13
- $mode = trim(attribute_escape($_GET['mode']));
14
-
15
- // get the options
16
- $ngg_options=get_option('ngg_options');
17
-
18
- if (isset ($_POST['togglethumbs'])) {
19
- check_admin_referer('ngg_updategallery');
20
- // Toggle thumnails, forgive me if it's to complicated
21
- $hideThumbs = (isset ($_POST['hideThumbs'])) ? false : true ;
22
- } else {
23
- $hideThumbs = (isset ($_POST['hideThumbs'])) ? true : false ;
24
- }
25
-
26
- if (isset ($_POST['toggletags'])) {
27
- check_admin_referer('ngg_updategallery');
28
- // Toggle tag view
29
- $showTags = (isset ($_POST['showTags'])) ? false : true ;
30
- } else {
31
- $showTags = (isset ($_POST['showTags'])) ? true : false ;
32
- }
33
-
34
- if ($mode == 'delete') {
35
- // Delete a gallery
36
-
37
- check_admin_referer('ngg_editgallery');
38
 
39
- // get the path to the gallery
40
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
41
- if ($gallerypath){
42
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
43
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
 
 
44
 
45
- // delete pictures
46
- $imagelist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$act_gid' ");
47
- if ($ngg_options['deleteImg']) {
48
- if (is_array($imagelist)) {
49
- foreach ($imagelist as $filename) {
50
- @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$filename);
51
- @unlink(WINABSPATH.$gallerypath.'/'.$filename);
52
- }
53
- }
54
- // delete folder
55
- @rmdir(WINABSPATH.$gallerypath.'/'.$thumb_folder);
56
- @rmdir(WINABSPATH.$gallerypath);
57
- }
58
- }
59
 
60
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE galleryid = $act_gid");
61
- $delete_galllery = $wpdb->query("DELETE FROM $wpdb->nggallery WHERE gid = $act_gid");
62
-
63
- if($delete_galllery)
64
- $messagetext = '<font color="green">'.__('Gallery','nggallery').' \''.$act_gid.'\' '.__('deleted successfully','nggallery').'</font>';
65
- $mode = 'main'; // show mainpage
66
  }
67
 
68
- if ($mode == 'delpic') {
69
- // Delete a picture
70
- check_admin_referer('ngg_delpicture');
71
- $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$act_pid' ");
72
- if ($filename) {
73
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
74
- if ($gallerypath){
75
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
76
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
77
- if ($ngg_options['deleteImg']) {
78
- @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$filename);
79
- @unlink(WINABSPATH.$gallerypath.'/'.$filename);
80
- }
81
- }
82
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $act_pid");
 
83
  }
84
- if($delete_pic)
85
- $messagetext = '<font color="green">'.__('Picture','nggallery').' \''.$act_pid.'\' '.__('deleted successfully','nggallery').'</font>';
86
- $mode = 'edit'; // show pictures
87
-
88
  }
 
 
89
 
90
- if (isset ($_POST['bulkaction']) && isset ($_POST['doaction'])) {
91
- // do bulk update
92
 
93
- check_admin_referer('ngg_updategallery');
 
94
 
95
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
96
- $imageslist = array();
 
 
 
97
 
98
- if ( is_array($_POST['doaction']) ) {
99
- foreach ( $_POST['doaction'] as $imageID ) {
100
- $imageslist[] = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$imageID' ");
 
 
 
 
 
 
 
 
 
 
 
101
  }
 
 
 
 
 
 
 
 
102
  }
103
-
104
- switch ($_POST['bulkaction']) {
105
- case 0;
106
- // No action
107
- break;
108
- case 1:
109
- // Set watermark
110
- nggAdmin::generateWatermark(WINABSPATH.$gallerypath,$imageslist);
111
- nggallery::show_message(__('Watermark successfully added',"nggallery"));
112
- break;
113
- case 2:
114
- // Create new thumbnails
115
- nggAdmin::generateThumbnail(WINABSPATH.$gallerypath,$imageslist);
116
- nggallery::show_message(__('Thumbnails successfully created. Please refresh your browser cache.',"nggallery"));
117
- break;
118
- case 3:
119
- // Resample images
120
- nggAdmin::resizeImages(WINABSPATH.$gallerypath,$imageslist);
121
- nggallery::show_message(__('Images successfully resized',"nggallery"));
122
- break;
123
- case 4:
124
- // Delete images
125
- if ( is_array($_POST['doaction']) ) {
126
  if ($gallerypath){
127
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
128
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
129
- foreach ( $_POST['doaction'] as $imageID ) {
130
- $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$imageID' ");
131
- if ($ngg_options['deleteImg']) {
132
- @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$filename);
133
- @unlink(WINABSPATH.$gallerypath.'/'.$filename);
134
- }
135
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $imageID");
136
  }
137
  }
138
- if($delete_pic)
139
- nggallery::show_message(__('Pictures deleted successfully ',"nggallery"));
140
- }
141
- break;
142
- case 8:
143
- // Import Metadata
144
- nggAdmin::import_MetaData($_POST['doaction']);
145
- nggallery::show_message(__('Import metadata finished',"nggallery"));
146
- break;
147
- }
148
- }
149
 
150
- if (isset ($_POST['TB_tagaction']) && isset ($_POST['TB_doaction'])) {
151
- // do tags update
152
-
153
- check_admin_referer('ngg_form-tags');
154
-
155
- // get the images list
156
- $pic_ids = explode(",", $_POST['TB_imagelist']);
157
- $taglist = explode(",", $_POST['taglist']);
158
- $taglist = array_map('trim', $taglist);
159
- $slugarray = array_map('sanitize_title', $taglist);
160
-
161
- // load tag list
162
- $nggTags = new ngg_Tags();
163
 
164
- foreach($pic_ids as $pic_id) {
 
 
 
 
 
 
 
 
 
 
 
 
165
 
166
- // which action should be performed ?
167
- switch ($_POST['TB_tagaction']) {
168
- case 0;
169
  // No action
170
  break;
171
- case 7:
172
- // Overwrite tags
173
- // remove all binding
174
- $wpdb->query("DELETE FROM $wpdb->nggpic2tags WHERE picid = '$pic_id'");
175
- // and add now the new tags
176
- case 5:
177
- // Add / append tags
178
- foreach($taglist as $tag) {
179
- // get the tag id
180
- $tagid = $nggTags->add_tag($tag);
181
- if ( $tagid )
182
- $nggTags->add_relationship($pic_id, $tagid);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  }
184
  break;
185
- case 6:
186
- // Delete tags
187
- $nggTags->remove_relationship($pic_id, $slugarray, false);
 
188
  break;
189
  }
190
  }
191
 
192
- // remove not longer used tag
193
- $nggTags->remove_unused_tags();
194
-
195
- nggallery::show_message(__('Tags changed',"nggallery"));
196
- }
197
-
198
- if (isset ($_POST['updatepictures'])) {
199
- // Update pictures
200
-
201
- check_admin_referer('ngg_updategallery');
202
 
203
- $gallery_title = attribute_escape($_POST['title']);
204
- $gallery_path = attribute_escape($_POST['path']);
205
- $gallery_desc = attribute_escape($_POST['gallerydesc']);
206
- $gallery_pageid = attribute_escape($_POST['pageid']);
207
- $gallery_preview = attribute_escape($_POST['previewpic']);
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
- $result = $wpdb->query("UPDATE $wpdb->nggallery SET title= '$gallery_title', path= '$gallery_path', galdesc = '$gallery_desc', pageid = '$gallery_pageid', previewpic = '$gallery_preview' WHERE gid = '$act_gid'");
210
- if ($showTags)
211
- $result = ngg_update_tags(attribute_escape($_POST['tags']));
212
- else
213
- $result = ngg_update_pictures(attribute_escape($_POST['description']), attribute_escape($_POST['alttext']), attribute_escape($_POST['exclude']), $act_gid );
214
-
215
- nggallery::show_message(__('Update successful',"nggallery"));
216
- }
217
-
218
- if (isset ($_POST['scanfolder'])) {
219
- // Rescan folder
220
- check_admin_referer('ngg_updategallery');
221
 
222
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
223
- nggAdmin::import_gallery($gallerypath);
224
- }
225
-
226
- if (isset ($_POST['addnewpage'])) {
227
- // Add a new page
228
 
229
- check_admin_referer('ngg_updategallery');
230
-
231
- $parent_id = attribute_escape($_POST['parent_id']);
232
- $gallery_title = attribute_escape($_POST['title']);
233
- $gallery_name = $wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
 
235
- // Create a WP page
236
- global $user_ID;
237
-
238
- $page['post_type'] = 'page';
239
- $page['post_content'] = '[gallery='.$act_gid.']';
240
- $page['post_parent'] = $parent_id;
241
- $page['post_author'] = $user_ID;
242
- $page['post_status'] = 'publish';
243
- $page['post_title'] = $gallery_title == '' ? $gallery_name : $gallery_title;
244
-
245
- $gallery_pageid = wp_insert_post ($page);
246
- if ($gallery_pageid != 0) {
247
- $result = $wpdb->query("UPDATE $wpdb->nggallery SET title= '$gallery_title', pageid = '$gallery_pageid' WHERE gid = '$act_gid'");
248
- $messagetext = '<font color="green">'.__('New gallery page ID','nggallery'). ' ' . $pageid . ' -> <strong>' . $gallery_title . '</strong> ' .__('created','nggallery').'</font>';
249
  }
250
- }
251
-
252
- // show sort order
253
- if ( ($mode == 'sort') || isset ($_POST['sortGallery'])) {
254
- $mode = 'sort';
255
- include_once (dirname (__FILE__). '/sort.php');
256
- nggallery_sortorder($act_gid);
257
- return;
258
- }
259
-
260
- // message windows
261
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
262
-
263
- if (($mode == '') or ($mode == "main"))
264
- nggallery_manage_gallery_main();
265
-
266
- if ($mode == 'edit')
267
- nggallery_picturelist($hideThumbs,$showTags);
268
 
269
- }//nggallery_admin_manage_gallery
270
-
271
- function nggallery_manage_gallery_main() {
272
- // *** show main gallery list
273
-
274
- global $wpdb;
 
 
 
 
 
 
275
 
276
- ?>
277
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
278
- <div class="wrap">
279
- <h2><?php _e('Gallery Overview', 'nggallery') ?></h2>
280
- <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3" >
281
- <thead>
282
- <tr>
283
- <th scope="col" ><?php _e('ID') ?></th>
284
- <th scope="col" ><?php _e('Gallery name', 'nggallery') ?></th>
285
- <th scope="col" ><?php _e('Title', 'nggallery') ?></th>
286
- <th scope="col" ><?php _e('Description', 'nggallery') ?></th>
287
- <th scope="col" ><?php _e('Page ID', 'nggallery') ?></th>
288
- <th scope="col" ><?php _e('Quantity', 'nggallery') ?></th>
289
- <th scope="col" colspan="2"><?php _e('Action'); ?></th>
290
- </tr>
291
- </thead>
292
- <tbody>
293
- <?php
294
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
295
- if($gallerylist) {
296
- foreach($gallerylist as $gallery) {
297
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
298
- $gid = $gallery->gid;
299
- $counter = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$gid'");
300
- ?>
301
- <tr id="gallery-<?php echo $gid ?>" <?php echo $class; ?> style="text-align:center">
302
- <th scope="row" style="text-align: center"><?php echo $gid; ?></th>
303
- <td><?php echo $gallery->name; ?></td>
304
- <td><?php echo $gallery->title; ?></td>
305
- <td><?php echo $gallery->galdesc; ?></td>
306
- <td><?php echo $gallery->pageid; ?></td>
307
- <td><?php echo $counter; ?></td>
308
- <td><a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=edit&amp;gid=".$gid, 'ngg_editgallery')?>" class='edit'> <?php _e('Edit') ?></a></td>
309
- <td><a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=delete&amp;gid=".$gid, 'ngg_editgallery')?>" class="delete" onclick="javascript:check=confirm( '<?php _e("Delete this gallery ?",'nggallery')?>');if(check==false) return false;"><?php _e('Delete') ?></a></td>
310
- </tr>
311
- <?php
312
- }
313
- } else {
314
- echo '<tr><td colspan="7" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
315
- }
316
- ?>
317
- </tbody>
318
- </table>
319
- </div>
320
- <?php
321
- } //nggallery_manage_gallery_main
322
-
323
- function nggallery_picturelist($hideThumbs = false,$showTags = false) {
324
- // *** show picture list
325
- global $wpdb;
326
 
327
- // GET variables
328
- $act_gid = trim(attribute_escape($_GET['gid']));
 
 
329
 
330
- // get the options
331
- $ngg_options=get_option('ngg_options');
332
 
333
- //TODO:A unique gallery call must provide me with this information, like $gallery = new nggGallery($id);
 
334
 
335
- // get gallery values
336
- $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
337
-
338
- // set gallery url
339
- $act_gallery_url = get_option ('siteurl')."/".$act_gallery->path."/";
340
- $act_thumbnail_url = get_option ('siteurl')."/".$act_gallery->path.nggallery::get_thumbnail_folder($act_gallery->path, FALSE);
341
- $act_thumb_prefix = nggallery::get_thumbnail_prefix($act_gallery->path, FALSE);
342
-
343
- ?>
344
-
345
- <script type="text/javascript">
346
- jQuery(document).ready(
347
- function() {
348
-
349
- //jQuery('.textarea1').Autoexpand([230,400]);
350
 
 
 
 
 
 
 
351
 
352
- /* jQuery("input:checkbox").click(
353
- function() {
354
- jQuery(this).parents('tr').Highlight(500, '#ff0', function(){jQuery(this).parents('tr').css('backgroundColor', 'transparent');});
355
- // jQuery(this).parents('tr').('#td.img').fadeOut(2000);
356
- }
357
- );
358
- */
359
- });
360
 
361
- function enterTags(form) {
362
-
363
- var elementlist = "";
364
- for (i = 0, n = form.elements.length; i < n; i++) {
365
- if(form.elements[i].type == "checkbox") {
366
- if(form.elements[i].name == "doaction[]")
367
- if(form.elements[i].checked == true)
368
- if (elementlist == "")
369
- elementlist = form.elements[i].value
370
- else
371
- elementlist += "," + form.elements[i].value ;
372
  }
373
  }
374
- jQuery("#TB_tagaction").val(jQuery("#bulkaction").val());
375
- jQuery("#TB_imagelist").val(elementlist);
376
- // console.log (jQuery("#TB_imagelist").val());
377
- jQuery.tb_show("", "#TB_inline?width=640&height=110&inlineId=tags&modal=true", false);
 
 
 
378
 
379
  }
380
- </script>
381
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
382
- <style type="text/css" media="all">@import "<?php echo NGGALLERY_URLPATH ?>thickbox/thickbox.css";</style>
383
- <style type="text/css" media="all">
384
- /** required for view button **/
385
- a.thickbox:hover {
386
-
387
- background:#CCCCCC none repeat scroll 0% 50%;
388
- color:#003366;
389
 
390
- }
 
 
391
 
392
- a.thickbox, a.thickbox:hover {
393
- border-bottom:medium none;
394
- display:block;
395
- padding:5px 0pt;
396
- text-align:center;
 
397
  }
398
-
399
- fieldset.nggallery {
400
- border:1px solid #CCCCCC;
401
- }
402
- </style>
403
- <script type="text/javascript">
404
- <!--
405
- function checkAll(form)
406
- {
407
- for (i = 0, n = form.elements.length; i < n; i++) {
408
- if(form.elements[i].type == "checkbox") {
409
- if(form.elements[i].name == "doaction[]") {
410
- if(form.elements[i].checked == true)
411
- form.elements[i].checked = false;
412
- else
413
- form.elements[i].checked = true;
414
  }
415
  }
416
- }
417
- }
418
-
419
- function getNumChecked(form)
420
- {
421
- var num = 0;
422
- for (i = 0, n = form.elements.length; i < n; i++) {
423
- if(form.elements[i].type == "checkbox") {
424
- if(form.elements[i].name == "doaction[]")
425
- if(form.elements[i].checked == true)
426
- num++;
 
 
 
427
  }
 
 
428
  }
429
- return num;
430
- }
431
- //-->
432
- </script>
433
- <div class="wrap">
434
- <h2><?php _e('Gallery', 'nggallery') ?> : <?php echo $act_gallery->name; ?></h2>
435
 
436
- <form id="updategallery" method="POST" action="<?php echo 'admin.php?page=nggallery-manage-gallery&amp;mode=edit&amp;gid='.$act_gid ?>" accept-charset="utf-8">
437
- <?php wp_nonce_field('ngg_updategallery') ?>
438
-
439
- <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
440
- <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
441
-
442
- <fieldset class="options nggallery">
443
- <legend><?php _e('Main settings', 'nggallery') ?></legend>
444
- <table width="100%" border="0" cellspacing="3" cellpadding="3" >
445
- <tr>
446
- <th align="left"><?php _e('Title') ?>:</th>
447
- <th align="left"><input type="text" size="50" name="title" value="<?php echo $act_gallery->title; ?>" /></th>
448
- <th align="right"><?php _e('Page Link to', 'nggallery') ?>:</th>
449
- <th align="left">
450
- <select name="pageid" style="width:95%">
451
- <option value="0" ><?php _e('Not linked', 'nggallery') ?></option>
452
- <?php
453
- $pageids = get_all_page_ids();
454
- foreach($pageids as $pageid) {
455
- $post= get_post($pageid);
456
- if ($pageid == $act_gallery->pageid) $selected = 'selected="selected" ';
457
- else $selected = '';
458
- echo '<option value="'.$pageid.'" '.$selected.'>'.$post->post_title.'</option>'."\n";
459
- }
460
- ?>
461
- </select>
462
- </th>
463
- </tr>
464
- <tr>
465
- <th align="left"><?php _e('Description') ?>:</th>
466
- <th align="left"><textarea name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php echo $act_gallery->galdesc; ?></textarea></th>
467
- <th align="right"><?php _e('Preview image', 'nggallery') ?>:</th>
468
- <th align="left">
469
- <select name="previewpic" >
470
- <option value="0" ><?php _e('No Picture', 'nggallery') ?></option>
471
- <?php
472
- $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$act_gid' ORDER BY $ngg_options[galSort] $ngg_options[galSortDir]");
473
- if(is_array($picturelist)) {
474
- foreach($picturelist as $picture) {
475
- if ($picture->pid == $act_gallery->previewpic) $selected = 'selected="selected" ';
476
- else $selected = '';
477
- echo '<option value="'.$picture->pid.'" '.$selected.'>'.$picture->filename.'</option>'."\n";
478
- }
479
- }
480
- ?>
481
- </select>
482
- </th>
483
- </tr>
484
- <tr>
485
- <th align="left"><?php _e('Path', 'nggallery') ?>:</th>
486
- <th align="left"><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="50" name="path" value="<?php echo $act_gallery->path; ?>" /></th>
487
 
488
- <th align="right"><?php _e('Create new page', 'nggallery') ?>:</th>
489
- <th align="left">
490
- <select name="parent_id" style="width:95%">
491
- <option value="0"><?php _e ('Main page (No parent)', 'nggallery'); ?></option>
492
- <?php parent_dropdown ($group->page_id); ?>
493
- </select>
494
- <input type="submit" name="addnewpage" value="<?php _e ('Add page', 'nggallery'); ?>" id="group"/>
495
- </th>
496
- </tr>
497
-
498
- </table>
499
- <p class="submit">
500
- <input type="submit" name="scanfolder" value="<?php _e("Scan Folder for new images",'nggallery')?> " />
501
- <input type="submit" name="updatepictures" value="<?php _e("Save Changes",'nggallery')?> &raquo;" />
502
- </p>
503
- </fieldset>
504
- <fieldset class="options">
505
- <p><select id="bulkaction" name="bulkaction">
506
- <option value="0" ><?php _e("No action",'nggallery')?></option>
507
- <?php if (!$showTags) { ?>
508
- <option value="1" ><?php _e("Set watermark",'nggallery')?></option>
509
- <option value="2" ><?php _e("Create new thumbnails",'nggallery')?></option>
510
- <option value="3" ><?php _e("Resize images",'nggallery')?></option>
511
- <option value="4" ><?php _e("Delete images",'nggallery')?></option>
512
- <option value="8" ><?php _e("Import metadata",'nggallery')?></option>
513
- <?php } else { ?>
514
- <option value="5" ><?php _e("Add tags",'nggallery')?></option>
515
- <option value="6" ><?php _e("Delete tags",'nggallery')?></option>
516
- <option value="7" ><?php _e("Overwrite tags",'nggallery')?></option>
517
- <?php } ?>
518
- </select>
519
-
520
- <?php if (!$showTags) { ?> <input type="submit" name="doaction" value="<?php _e("OK",'nggallery')?>" onclick="var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>')" /><?php } else {?>
521
- <input type="submit" name="showThickbox" value="<?php _e("OK",'nggallery')?>" onclick="enterTags(document.getElementById('updategallery')); return false;" /><?php } ?>
522
- <?php if (!$hideThumbs) { ?> <input type="submit" name="togglethumbs" value="<?php _e("Hide thumbnails ",'nggallery')?>" /> <?php } else {?>
523
- <input type="submit" name="togglethumbs" value="<?php _e("Show thumbnails ",'nggallery')?>" /><?php } ?>
524
- <?php if (!$showTags) { ?><input type="submit" name="toggletags" value="<?php _e("Show tags",'nggallery')?>" /> <?php } else {?>
525
- <input type="submit" name="toggletags" value="<?php _e("Hide tags",'nggallery')?>" /><?php } ?>
526
- <?php if ($ngg_options['galSort'] == "sortorder") { ?>
527
- <input type="submit" name="sortGallery" value="<?php _e("Sort gallery",'nggallery')?>" />
528
- <?php } ?>
529
- </p>
530
-
531
- <table id="listimages" width="100%" cellspacing="2" cellpadding="5" class="widefat" >
532
- <thead>
533
- <tr>
534
- <th scope="col" style="text-align: center"><input name="checkall" type="checkbox" onclick="checkAll(document.getElementById('updategallery'));" /></th>
535
- <th scope="col" style="text-align: center"><?php _e('ID') ?></th>
536
- <th scope="col" style="text-align: center"><?php _e('File name', 'nggallery') ?></th>
537
- <?php if (!$hideThumbs) { ?>
538
- <th scope="col" style="text-align: center"><?php _e('Thumbnail', 'nggallery') ?></th>
539
- <?php } ?>
540
- <?php if (!$showTags) { ?>
541
- <th scope="col" style="text-align: center"><?php _e('Description', 'nggallery') ?></th>
542
- <th scope="col" style="text-align: center"><?php _e('Alt &amp; Title Text', 'nggallery') ?></th>
543
- <th scope="col" style="text-align: center"><?php _e('exclude', 'nggallery') ?></th>
544
- <?php } else {?>
545
- <th scope="col" style="width:70%"><?php _e('Tags (comma separated list)', 'nggallery') ?></th>
546
- <?php } ?>
547
- <th scope="col" colspan="3" style="text-align: center"><?php _e('Action') ?></th>
548
- </tr>
549
- </thead>
550
- <tbody>
551
- <?php
552
- // load tags
553
- if ($showTags) $nggTags = new ngg_Tags();
554
- if($picturelist) {
555
- foreach($picturelist as $picture) {
556
- //TODO: Ajax delete version , looks better
557
- //TODO: Use effect for inactive pic : style="filter:alpha(opacity=30); -moz-opacity:0.3"
558
-
559
- $pid = $picture->pid;
560
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
561
- $exclude = ( $picture->exclude ) ? 'checked="checked"' : '';
562
-
563
- ?>
564
- <tr id="picture-<?php echo $pid ?>" <?php echo $class ?> style="text-align:center">
565
- <td><input name="doaction[]" type="checkbox" value="<?php echo $pid ?>" /></td>
566
- <th scope="row" style="text-align: center"><?php echo $pid ?></th>
567
- <td><?php echo $picture->filename ?></td>
568
- <?php if (!$hideThumbs) { ?>
569
- <td><img class="thumb" src="<?php echo $act_thumbnail_url.$act_thumb_prefix.$picture->filename ?>" /></td>
570
- <?php } ?>
571
- <?php if (!$showTags) { ?>
572
- <td><textarea name="description[<?php echo $pid ?>]" class="textarea1" cols="30" rows="3" ><?php echo stripslashes($picture->description) ?></textarea></td>
573
- <td><input name="alttext[<?php echo $pid ?>]" type="text" size="20" value="<?php echo stripslashes($picture->alttext) ?>" /></td>
574
- <td><input name="exclude[<?php echo $pid ?>]" type="checkbox" value="1" <?php echo $exclude ?> /></td>
575
- <?php } else {?>
576
- <td ><input name="tags[<?php echo $pid ?>]" type="text" style="width:95%" value="<?php echo $nggTags->get_tags_from_image($pid); ?>" /></td>
577
- <?php } ?>
578
- <td><a href="<?php echo $act_gallery_url.$picture->filename ?>" class="thickbox" title="<?php echo $picture->alttext ?>" ><?php _e('View') ?></a></td>
579
- <td><a href="<?php echo NGGALLERY_URLPATH."admin/showmeta.php?id=".$pid ?>" class="thickbox" title="<?php _e("Show Meta data",'nggallery')?>" ><?php _e('Meta') ?></a></td>
580
- <td><a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=delpic&amp;gid=".$act_gid."&amp;pid=".$pid, 'ngg_delpicture')?>" class="delete" onclick="javascript:check=confirm( '<?php _e("Delete this file ?",'nggallery')?>');if(check==false) return false;" ><?php _e('Delete') ?></a></td>
581
- </tr>
582
- <?php
583
  }
584
- } else {
585
- echo '<tr><td colspan="8" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
586
- }
587
- ?>
588
 
589
- </tbody>
590
- </table>
591
- </fieldset>
592
- <p class="submit"><input type="submit" name="updatepictures" value="<?php _e("Save Changes",'nggallery')?> &raquo;" /></p>
593
- </form>
594
- <br class="clear"/>
595
- </div><!-- /#wrap -->
596
-
597
- <!-- #entertags -->
598
- <div id="tags" style="display: none;" >
599
- <form id="form-tags" method="POST" accept-charset="utf-8">
600
- <?php wp_nonce_field('ngg_form-tags') ?>
601
- <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
602
- <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
603
- <input type="hidden" id="TB_imagelist" name="TB_imagelist" value="" />
604
- <input type="hidden" id="TB_tagaction" name="TB_tagaction" value="" />
605
- <table width="100%" border="0" cellspacing="3" cellpadding="3" >
606
- <tr>
607
- <th><?php _e("Enter the tags",'nggallery')?> : <input name="taglist" type="text" style="width:99%" value="" /></td>
608
- </tr>
609
- <tr align="right">
610
- <td class="submit"><input type="submit" name="TB_doaction" value="<?php _e("OK",'nggallery')?>" onclick="var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>'); jQuery.tb_remove(); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>')" />&nbsp;<input type="reset" value="&nbsp;<?php _e("Cancel",'nggallery')?>&nbsp;" onclick="jQuery.tb_remove()"/></td>
611
- </tr>
612
- </table>
613
- </form>
614
- </div>
615
- <!-- /#entertags -->
616
-
617
- <?php
618
-
619
- } //nggallery_pciturelist
620
-
621
- /**************************************************************************/
622
- function ngg_update_pictures( $nggdescription, $nggalttext, $nggexclude, $nggalleryid ) {
623
- // update all pictures
624
 
625
- global $wpdb;
626
 
627
- if (is_array($nggdescription)) {
628
- foreach($nggdescription as $key=>$value) {
629
- $desc = $wpdb->escape($value);
630
- $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET description = '$desc' WHERE pid = $key");
631
- if($result) $update_ok = $result;
632
- }
633
- }
634
- if (is_array($nggalttext)){
635
- foreach($nggalttext as $key=>$value) {
636
- $alttext = $wpdb->escape($value);
637
- $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET alttext = '$alttext' WHERE pid = $key");
638
- if($result) $update_ok = $result;
639
  }
 
 
 
 
 
 
 
640
  }
641
 
642
- $nggpictures = $wpdb->get_results("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$nggalleryid'");
643
-
644
- if (is_array($nggpictures)){
645
- foreach($nggpictures as $picture){
646
- if (is_array($nggexclude)){
647
- if (array_key_exists($picture->pid, $nggexclude)) {
648
- $result=$wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 1 WHERE pid = '$picture->pid'");
649
- if($result) $update_ok = $result;
650
- }
651
- else {
652
- $result=$wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 0 WHERE pid = '$picture->pid'");
653
- if($result) $update_ok = $result;
654
- }
655
- } else {
656
- $result=$wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 0 WHERE pid = '$picture->pid'");
657
- if($result) $update_ok = $result;
658
- }
659
  }
 
660
  }
661
 
662
- return $update_ok;
663
- }
664
-
665
- /**************************************************************************/
666
- function ngg_update_tags( $taglist ) {
667
- // update all tags
668
-
669
- global $wpdb;
670
-
671
- // load tag list
672
- $nggTags = new ngg_Tags();
673
-
674
- // the taglist contain as key the pic_id
675
- if (is_array($taglist)){
676
- foreach($taglist as $key=>$value) {
677
-
678
- // First, get all of the original tags
679
- $nggTags->get_tags_from_image($key);
680
-
681
- $tags = explode(",", $value);
682
- $new_slugarray = array();
683
-
684
- foreach($tags as $tag) {
685
- if ( !empty($tag) ) {
686
- // create the slug
687
- $tag = trim($tag);
688
- $slug = sanitize_title($tag);
689
- // do not proceed empty slugs
690
- if ( !empty($slug) ) {
691
- $new_slugarray[] = $slug;
692
- // look if we have a new tag in POST
693
- if (!in_array($slug, $nggTags->img_slugs )) {
694
- $tagid = $nggTags->add_tag($tag);
695
- $nggTags->add_relationship($key, $tagid);
696
- // add now to image list
697
- $nggTags->img_slugs[] = $slug;
698
- }
699
- }
700
- }
701
- }
702
-
703
- //do we need to remove some tags?
704
- $delete_tags = array_diff($nggTags->img_slugs, $new_slugarray);
705
- $nggTags->remove_relationship($key, $delete_tags, TRUE);
706
  }
707
 
708
- // remove not longer used tag
709
- $nggTags->remove_unused_tags();
710
- }
711
-
712
- return;
713
  }
714
-
715
  ?>
1
  <?php
2
 
3
+ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
 
5
+ class nggManageGallery {
 
6
 
7
+ var $mode = 'main';
8
+ var $gid = false;
9
+ var $pid = false;
10
+ var $hideThumbs = false;
11
+ var $showTags = false;
12
+ var $base_page = 'admin.php?page=nggallery-manage-gallery';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ // initiate the manage page
15
+ function nggManageGallery() {
16
+
17
+ // GET variables
18
+ $this->gid = (int) $_GET['gid'];
19
+ $this->pid = (int) $_GET['pid'];
20
+ $this->mode = trim ($_GET['mode']);
21
 
22
+ //TODO: Remove this vars
23
+ $this->hide_thumb();
24
+ $this->show_tags();
 
 
 
 
 
 
 
 
 
 
 
25
 
26
+ //Look for POST process
27
+ if ( !empty($_POST) || !empty($_GET) )
28
+ $this->processor();
29
+
 
 
30
  }
31
 
32
+ function controller() {
33
+
34
+ switch($this->mode) {
35
+ case 'sort':
36
+ include_once (dirname (__FILE__) . '/manage-sort.php');
37
+ nggallery_sortorder($this->gid);
38
+ break;
39
+ case 'edit':
40
+ include_once (dirname (__FILE__) . '/manage-images.php');
41
+ nggallery_picturelist();
42
+ break;
43
+ case 'main':
44
+ default:
45
+ include_once (dirname (__FILE__) . '/manage-galleries.php');
46
+ nggallery_manage_gallery_main();
47
+ break;
48
  }
 
 
 
 
49
  }
50
+
51
+ function processor() {
52
 
53
+ global $wpdb, $ngg;
 
54
 
55
+ if ($this->mode == 'delete') {
56
+ // Delete a gallery
57
 
58
+ check_admin_referer('ngg_editgallery');
59
+
60
+ // get the path to the gallery
61
+ $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$this->gid' ");
62
+ if ($gallerypath){
63
 
64
+ // delete pictures
65
+ //TODO:Remove also Tag reference
66
+ $imagelist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$this->gid' ");
67
+ if ($ngg->options['deleteImg']) {
68
+ if (is_array($imagelist)) {
69
+ foreach ($imagelist as $filename) {
70
+ @unlink(WINABSPATH . $gallerypath . '/thumbs/thumbs_' . $filename);
71
+ @unlink(WINABSPATH . $gallerypath .'/'. $filename);
72
+ }
73
+ }
74
+ // delete folder
75
+ @rmdir( WINABSPATH . $gallerypath . '/thumbs' );
76
+ @rmdir( WINABSPATH . $gallerypath );
77
+ }
78
  }
79
+
80
+ $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE galleryid = $this->gid");
81
+ $delete_galllery = $wpdb->query("DELETE FROM $wpdb->nggallery WHERE gid = $this->gid");
82
+
83
+ if($delete_galllery)
84
+ nggGallery::show_message( __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ) . ' \''.$this->gid.'\' '.__('deleted successfully','nggallery'));
85
+
86
+ $this->mode = 'main'; // show mainpage
87
  }
88
+
89
+ if ($this->mode == 'delpic') {
90
+ // Delete a picture
91
+ //TODO:Remove also Tag reference
92
+ check_admin_referer('ngg_delpicture');
93
+ $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$this->pid' ");
94
+ if ($filename) {
95
+ $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$this->gid' ");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  if ($gallerypath){
97
+ $thumb_folder = nggGallery::get_thumbnail_folder($gallerypath, FALSE);
98
+ if ($ngg->options['deleteImg']) {
99
+ @unlink(WINABSPATH . $gallerypath. '/thumbs/thumbs_' .$filename);
100
+ @unlink(WINABSPATH . $gallerypath . '/' . $filename);
 
 
 
 
 
101
  }
102
  }
103
+ $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $this->pid");
104
+ }
105
+ if($delete_pic)
106
+ nggGallery::show_message( __('Picture','nggallery').' \''.$this->pid.'\' '.__('deleted successfully','nggallery') );
107
+
108
+ $this->mode = 'edit'; // show pictures
 
 
 
 
 
109
 
110
+ }
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
+ if (isset ($_POST['bulkaction']) && isset ($_POST['doaction'])) {
113
+ // do bulk update
114
+
115
+ check_admin_referer('ngg_updategallery');
116
+
117
+ $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$this->gid' ");
118
+ $imageslist = array();
119
+
120
+ if ( is_array($_POST['doaction']) ) {
121
+ foreach ( $_POST['doaction'] as $imageID ) {
122
+ $imageslist[] = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$imageID' ");
123
+ }
124
+ }
125
 
126
+ switch ($_POST['bulkaction']) {
127
+ case 'no_action';
 
128
  // No action
129
  break;
130
+ case 'set_watermark':
131
+ // Set watermark
132
+ nggAdmin::do_ajax_operation( 'set_watermark' , $_POST['doaction'], __('Set watermark','nggallery') );
133
+ break;
134
+ case 'new_thumbnail':
135
+ // Create new thumbnails
136
+ nggAdmin::do_ajax_operation( 'create_thumbnail' , $_POST['doaction'], __('Create new thumbnails','nggallery') );
137
+ break;
138
+ case 'resize_images':
139
+ // Resample images
140
+ nggAdmin::do_ajax_operation( 'resize_image' , $_POST['doaction'], __('Resize images','nggallery') );
141
+ break;
142
+ case 'delete_images':
143
+ // Delete images
144
+ if ( is_array($_POST['doaction']) ) {
145
+ if ($gallerypath){
146
+ $thumb_folder = nggGallery::get_thumbnail_folder($gallerypath, FALSE);
147
+ foreach ( $_POST['doaction'] as $imageID ) {
148
+ $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$imageID' ");
149
+ if ($ngg->options['deleteImg']) {
150
+ @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'. "thumbs_" .$filename);
151
+ @unlink(WINABSPATH.$gallerypath.'/'.$filename);
152
+ }
153
+ $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $imageID");
154
+ }
155
+ }
156
+ if($delete_pic)
157
+ nggGallery::show_message(__('Pictures deleted successfully ',"nggallery"));
158
  }
159
  break;
160
+ case 'import_meta':
161
+ // Import Metadata
162
+ nggAdmin::import_MetaData($_POST['doaction']);
163
+ nggGallery::show_message(__('Import metadata finished',"nggallery"));
164
  break;
165
  }
166
  }
167
 
168
+ // will be called after a ajax operation
169
+ if (isset ($_POST['ajax_callback'])) {
170
+ if ($_POST['ajax_callback'] == 1)
171
+ nggGallery::show_message(__('Operation successfull. Please clear your browser cache.',"nggallery"));
172
+ $this->mode = 'edit';
173
+ }
 
 
 
 
174
 
175
+ if (isset ($_POST['TB_bulkaction']) && isset ($_POST['TB_SelectGallery'])) {
176
+
177
+ check_admin_referer('ngg_thickbox_form');
178
+
179
+ $pic_ids = explode(",", $_POST['TB_imagelist']);
180
+ $dest_gid = (int) $_POST['dest_gid'];
181
+
182
+ switch ($_POST['TB_bulkaction']) {
183
+ case 'copy_to':
184
+ // Copy images
185
+ nggAdmin::copy_images( $pic_ids, $dest_gid );
186
+ break;
187
+ case 'move_to':
188
+ // Move images
189
+ nggAdmin::move_images( $pic_ids, $dest_gid );
190
+ break;
191
+ }
192
+ }
193
 
194
+ if (isset ($_POST['TB_bulkaction']) && isset ($_POST['TB_EditTags'])) {
195
+ // do tags update
 
 
 
 
 
 
 
 
 
 
196
 
197
+ check_admin_referer('ngg_thickbox_form');
 
 
 
 
 
198
 
199
+ // get the images list
200
+ $pic_ids = explode(",", $_POST['TB_imagelist']);
201
+ $taglist = explode(",", $_POST['taglist']);
202
+ $taglist = array_map('trim', $taglist);
203
+
204
+ if (is_array($pic_ids)) {
205
+
206
+ foreach($pic_ids as $pic_id) {
207
+
208
+ // which action should be performed ?
209
+ switch ($_POST['TB_bulkaction']) {
210
+ case 'no_action';
211
+ // No action
212
+ break;
213
+ case 'overwrite_tags':
214
+ // Overwrite tags
215
+ wp_set_object_terms($pic_id, $taglist, 'ngg_tag');
216
+ break;
217
+ case 'add_tags':
218
+ // Add / append tags
219
+ wp_set_object_terms($pic_id, $taglist, 'ngg_tag', TRUE);
220
+ break;
221
+ case 'delte_tags':
222
+ // Delete tags
223
+ $oldtags = wp_get_object_terms($pic_id, 'ngg_tag', 'fields=names');
224
+ // get the slugs, to vaoid case sensitive problems
225
+ $slugarray = array_map('sanitize_title', $taglist);
226
+ $oldtags = array_map('sanitize_title', $oldtags);
227
+ // compare them and return the diff
228
+ $newtags = array_diff($oldtags, $slugarray);
229
+ wp_set_object_terms($pic_id, $newtags, 'ngg_tag');
230
+ break;
231
+ }
232
+ }
233
 
234
+ nggGallery::show_message(__('Tags changed',"nggallery"));
235
+ }
 
 
 
 
 
 
 
 
 
 
 
 
236
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
 
238
+ if (isset ($_POST['updatepictures'])) {
239
+ // Update pictures
240
+
241
+ check_admin_referer('ngg_updategallery');
242
+
243
+ $gallery_title = attribute_escape($_POST['title']);
244
+ $gallery_path = attribute_escape($_POST['path']);
245
+ $gallery_desc = attribute_escape($_POST['gallerydesc']);
246
+ $gallery_pageid = (int) $_POST['pageid'];
247
+ $gallery_preview = (int) $_POST['previewpic'];
248
+
249
+ $wpdb->query("UPDATE $wpdb->nggallery SET title= '$gallery_title', path= '$gallery_path', galdesc = '$gallery_desc', pageid = '$gallery_pageid', previewpic = '$gallery_preview' WHERE gid = '$this->gid'");
250
 
251
+ if (isset ($_POST['author'])) {
252
+ $gallery_author = (int) $_POST['author'];
253
+ $wpdb->query("UPDATE $wpdb->nggallery SET author = '$gallery_author' WHERE gid = '$this->gid'");
254
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
 
256
+ if ($this->showTags)
257
+ $this->update_tags();
258
+ else
259
+ $this->update_pictures();
260
 
261
+ //hook for other plugin to update the fields
262
+ do_action('ngg_update_gallery', $this->gid, $_POST);
263
 
264
+ nggGallery::show_message(__('Update successful',"nggallery"));
265
+ }
266
 
267
+ if (isset ($_POST['scanfolder'])) {
268
+ // Rescan folder
269
+ check_admin_referer('ngg_updategallery');
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
+ $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$this->gid' ");
272
+ nggAdmin::import_gallery($gallerypath);
273
+ }
274
+
275
+ if (isset ($_POST['addnewpage'])) {
276
+ // Add a new page
277
 
278
+ check_admin_referer('ngg_updategallery');
279
+
280
+ $parent_id = attribute_escape($_POST['parent_id']);
281
+ $gallery_title = attribute_escape($_POST['title']);
282
+ $gallery_name = $wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE gid = '$this->gid' ");
283
+
284
+ // Create a WP page
285
+ global $user_ID;
286
 
287
+ $page['post_type'] = 'page';
288
+ $page['post_content'] = '[nggallery id='.$this->gid.']';
289
+ $page['post_parent'] = $parent_id;
290
+ $page['post_author'] = $user_ID;
291
+ $page['post_status'] = 'publish';
292
+ $page['post_title'] = $gallery_title == '' ? $gallery_name : $gallery_title;
293
+
294
+ $gallery_pageid = wp_insert_post ($page);
295
+ if ($gallery_pageid != 0) {
296
+ $result = $wpdb->query("UPDATE $wpdb->nggallery SET title= '$gallery_title', pageid = '$gallery_pageid' WHERE gid = '$this->gid'");
297
+ nggGallery::show_message( __('New gallery page ID','nggallery'). ' ' . $pageid . ' -> <strong>' . $gallery_title . '</strong> ' .__('created','nggallery') );
298
  }
299
  }
300
+
301
+ if ( isset ($_POST['backToGallery']) )
302
+ $this->mode = 'edit';
303
+
304
+ // show sort order
305
+ if ( isset ($_POST['sortGallery']) )
306
+ $this->mode = 'sort';
307
 
308
  }
309
+
310
+ function update_pictures() {
311
+ //TODO: Message when update failed
312
+ global $wpdb;
 
 
 
 
 
313
 
314
+ $nggdescription = attribute_escape( $_POST['description'] );
315
+ $nggalttext = attribute_escape( $_POST['alttext'] );
316
+ $nggexclude = attribute_escape( $_POST['exclude'] );
317
 
318
+ if ( is_array($nggdescription) ) {
319
+ foreach( $nggdescription as $key=>$value ) {
320
+ $desc = $wpdb->escape($value);
321
+ $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET description = '$desc' WHERE pid = $key");
322
+ if($result) $update_ok = $result;
323
+ }
324
  }
325
+ if ( is_array($nggalttext) ){
326
+ foreach( $nggalttext as $key=>$value ) {
327
+ $alttext = $wpdb->escape($value);
328
+ $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET alttext = '$alttext' WHERE pid = $key");
329
+ if($result) $update_ok = $result;
 
 
 
 
 
 
 
 
 
 
 
330
  }
331
  }
332
+
333
+ $nggpictures = $wpdb->get_results("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$this->gid'");
334
+
335
+ if ( is_array($nggpictures) ){
336
+ foreach($nggpictures as $picture){
337
+ if (is_array($nggexclude)){
338
+ if ( array_key_exists($picture->pid, $nggexclude) )
339
+ $wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 1 WHERE pid = '$picture->pid'");
340
+ else
341
+ $wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 0 WHERE pid = '$picture->pid'");
342
+ } else {
343
+ $wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 0 WHERE pid = '$picture->pid'");
344
+ }
345
+ }
346
  }
347
+
348
+ return;
349
  }
 
 
 
 
 
 
350
 
351
+ function update_tags() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
 
353
+ $taglist = attribute_escape($_POST['tags']);
354
+
355
+ if (is_array($taglist)){
356
+ foreach($taglist as $key=>$value) {
357
+ $tags = explode(",", $value);
358
+ wp_set_object_terms($key, $tags, 'ngg_tag');
359
+ }
360
+ }
361
+
362
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
 
 
 
 
364
 
365
+ // Check if user can select a author
366
+ function get_editable_user_ids( $user_id, $exclude_zeros = true ) {
367
+ global $wpdb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
 
369
+ $user = new WP_User( $user_id );
370
 
371
+ if ( ! $user->has_cap('NextGEN Manage others gallery') ) {
372
+ if ( $user->has_cap('NextGEN Manage gallery') || $exclude_zeros == false )
373
+ return array($user->id);
374
+ else
375
+ return false;
 
 
 
 
 
 
 
376
  }
377
+
378
+ $level_key = $wpdb->prefix . 'user_level';
379
+ $query = "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '$level_key'";
380
+ if ( $exclude_zeros )
381
+ $query .= " AND meta_value != '0'";
382
+
383
+ return $wpdb->get_col( $query );
384
  }
385
 
386
+ function hide_thumb() {
387
+
388
+ if (isset ($_POST['togglethumbs'])) {
389
+ check_admin_referer('ngg_updategallery');
390
+ // Toggle thumnails, forgive me if it's to complicated
391
+ $this->hideThumbs = (isset ($_POST['hideThumbs'])) ? false : true ;
392
+ } else {
393
+ $this->hideThumbs = (isset ($_POST['hideThumbs'])) ? true : false ;
 
 
 
 
 
 
 
 
 
394
  }
395
+ return;
396
  }
397
 
398
+ function show_tags() {
399
+
400
+ if (isset ($_POST['toggletags'])) {
401
+ check_admin_referer('ngg_updategallery');
402
+ // Toggle tag view
403
+ $this->showTags = (isset ($_POST['showTags'])) ? false : true ;
404
+ } else {
405
+ $this->showTags = (isset ($_POST['showTags'])) ? true : false ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  }
407
 
408
+ return;
409
+ }
410
+
 
 
411
  }
 
412
  ?>
admin/{wp25/media-upload.php → media-upload.php} RENAMED
@@ -24,19 +24,27 @@ function media_upload_nextgen() {
24
  $image = $_POST['image'][$send_id];
25
  $alttext = stripslashes( htmlspecialchars ($image['alttext'], ENT_QUOTES));
26
  $description = stripslashes (htmlspecialchars($image['description'], ENT_QUOTES));
 
27
  // here is no new line allowed
28
  $clean_description = preg_replace("/\n|\r\n|\r$/", " ", $description);
29
- $thumbcode = nggallery::get_thumbcode("");
 
30
  $class="ngg-singlepic ngg-{$image['align']}";
 
31
  // Build output
32
  if ($image['size'] == "thumbnail")
33
  $html = "<img src='{$image['thumb']}' alt='$alttext' class='$class' />";
 
 
 
34
  if ($image['size'] == "full")
35
  $html = "<img src='{$image['url']}' alt='$alttext' class='$class' />";
36
- $html = "<a $thumbcode href='{$image['url']}' title='$clean_description'>$html</a>";
37
  if ($image['size'] == "singlepic")
38
  $html = "[singlepic=$send_id,320,240,,{$image['align']}]";
 
39
  media_upload_nextgen_save_image();
 
40
  // Return it to TinyMCE
41
  return media_send_to_editor($html);
42
  }
@@ -50,9 +58,6 @@ function media_upload_nextgen() {
50
  }
51
 
52
  add_action('media_upload_nextgen', 'media_upload_nextgen');
53
- // not longer needed for wp2.6
54
- if ( !function_exists('wp_enqueue_style') )
55
- add_action('admin_head_media_upload_nextgen_form', 'media_admin_css');
56
 
57
  function media_upload_nextgen_save_image() {
58
 
@@ -73,9 +78,7 @@ function media_upload_nextgen_save_image() {
73
 
74
  function media_upload_nextgen_form($errors) {
75
 
76
- global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
77
-
78
- $ngg_options = get_option('ngg_options');
79
 
80
  media_upload_header();
81
 
@@ -102,8 +105,8 @@ function media_upload_nextgen_form($errors) {
102
 
103
  // Get the images
104
  if ( $galleryID != 0 )
105
- $picarray = $wpdb->get_col("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY $ngg_options[galSort] $ngg_options[galSortDir] LIMIT $start, 10 ");
106
-
107
  ?>
108
 
109
  <form id="filter" action="" method="get">
@@ -124,8 +127,8 @@ function media_upload_nextgen_form($errors) {
124
  echo "<div class='tablenav-pages'>$page_links</div>";
125
  ?>
126
 
127
- <div class="alignleft">
128
- <select id="select_gal" name="select_gal" style="width:250px;">
129
  <option value="0" <?php selected('0', $galleryID); ?> ><?php attribute_escape( _e('No gallery',"nggallery") ); ?></option>
130
  <?php
131
  // Show gallery selection
@@ -133,12 +136,12 @@ function media_upload_nextgen_form($errors) {
133
  if(is_array($gallerylist)) {
134
  foreach($gallerylist as $gallery) {
135
  $selected = ($gallery->gid == $galleryID )? ' selected="selected"' : "";
136
- echo '<option value="'.$gallery->gid.'"'.$selected.' >'.$gallery->name.' | '.$gallery->title.'</option>'."\n";
137
  }
138
  }
139
  ?>
140
  </select>
141
- <input type="submit" id="show-gallery" value="<?php attribute_escape( _e('Select Gallery &#187;','nggallery') ); ?>" class="button-secondary" />
142
  </div>
143
  <br style="clear:both;" />
144
  </div>
@@ -165,16 +168,16 @@ function media_upload_nextgen_form($errors) {
165
  if(is_array($picarray)) {
166
  foreach ($picarray as $picid) {
167
  //TODO:Reduce SQL Queries
168
- $picture = new nggImage($picid);
169
  ?>
170
  <div id='media-item-<?php echo $picid ?>' class='media-item preloaded'>
171
  <div class='filename'></div>
172
  <a class='toggle describe-toggle-on' href='#'><?php attribute_escape( _e('Show',"nggallery") ); ?></a>
173
  <a class='toggle describe-toggle-off' href='#'><?php attribute_escape( _e('Hide',"nggallery") );?></a>
174
- <div class='filename new'><?php echo ( empty($picture->alttext) ) ? wp_html_excerpt($picture->filename,75): stripslashes( wp_html_excerpt($picture->alttext,75) ); ?></div>
175
  <table class='slidetoggle describe startclosed'><tbody>
176
  <tr>
177
- <td rowspan='4'><img class='thumbnail' alt='<?php echo attribute_escape( $picture->alttext ); ?>' src='<?php echo attribute_escape( $picture->thumbPath ); ?>'/></td>
178
  <td><?php attribute_escape( _e('Image ID:',"nggallery") ); ?><?php echo $picid ?></td>
179
  </tr>
180
  <tr><td><?php echo attribute_escape( $picture->filename ); ?></td></tr>
@@ -215,8 +218,8 @@ function media_upload_nextgen_form($errors) {
215
  </tr>
216
  <tr class="submit">
217
  <td>
218
- <input type="hidden" name="image[<?php echo $picid ?>][thumb]" value="<?php echo $picture->thumbPath ?>" />
219
- <input type="hidden" name="image[<?php echo $picid ?>][url]" value="<?php echo $picture->imagePath ?>" />
220
  </td>
221
  <td class="savesend"><button type="submit" class="button" value="1" name="send[<?php echo $picid ?>]"><?php echo attribute_escape( __('Insert into Post') ); ?></button></td>
222
  </tr>
@@ -227,12 +230,13 @@ function media_upload_nextgen_form($errors) {
227
  }
228
  ?>
229
  </div>
230
- <input type="submit" class="button savebutton" name="save" value="<?php attribute_escape( _e('Save all changes','nggallery') ); ?>" />
 
 
231
  <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
232
  <input type="hidden" name="select_gal" id="select_gal" value="<?php echo (int) $galleryID; ?>" />
233
  </form>
234
 
235
  <?php
236
  }
237
-
238
  ?>
24
  $image = $_POST['image'][$send_id];
25
  $alttext = stripslashes( htmlspecialchars ($image['alttext'], ENT_QUOTES));
26
  $description = stripslashes (htmlspecialchars($image['description'], ENT_QUOTES));
27
+
28
  // here is no new line allowed
29
  $clean_description = preg_replace("/\n|\r\n|\r$/", " ", $description);
30
+ $img = nggdb::find_image($send_id);
31
+ $thumbcode = $img->get_thumbcode();
32
  $class="ngg-singlepic ngg-{$image['align']}";
33
+
34
  // Build output
35
  if ($image['size'] == "thumbnail")
36
  $html = "<img src='{$image['thumb']}' alt='$alttext' class='$class' />";
37
+ // Wrap the link to the fullsize image around
38
+ $html = "<a $thumbcode href='{$image['url']}' title='$clean_description'>$html</a>";
39
+
40
  if ($image['size'] == "full")
41
  $html = "<img src='{$image['url']}' alt='$alttext' class='$class' />";
42
+
43
  if ($image['size'] == "singlepic")
44
  $html = "[singlepic=$send_id,320,240,,{$image['align']}]";
45
+
46
  media_upload_nextgen_save_image();
47
+
48
  // Return it to TinyMCE
49
  return media_send_to_editor($html);
50
  }
58
  }
59
 
60
  add_action('media_upload_nextgen', 'media_upload_nextgen');
 
 
 
61
 
62
  function media_upload_nextgen_save_image() {
63
 
78
 
79
  function media_upload_nextgen_form($errors) {
80
 
81
+ global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types, $ngg;
 
 
82
 
83
  media_upload_header();
84
 
105
 
106
  // Get the images
107
  if ( $galleryID != 0 )
108
+ $picarray = $wpdb->get_col("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY {$ngg->options['galSort']} {$ngg->options['galSortDir']} LIMIT $start, 10 ");
109
+
110
  ?>
111
 
112
  <form id="filter" action="" method="get">
127
  echo "<div class='tablenav-pages'>$page_links</div>";
128
  ?>
129
 
130
+ <div class="alignleft actions">
131
+ <select id="select_gal" name="select_gal" style="width:250px;">;
132
  <option value="0" <?php selected('0', $galleryID); ?> ><?php attribute_escape( _e('No gallery',"nggallery") ); ?></option>
133
  <?php
134
  // Show gallery selection
136
  if(is_array($gallerylist)) {
137
  foreach($gallerylist as $gallery) {
138
  $selected = ($gallery->gid == $galleryID )? ' selected="selected"' : "";
139
+ echo '<option value="'.$gallery->gid.'"'.$selected.' >'.$gallery->title.'</option>'."\n";
140
  }
141
  }
142
  ?>
143
  </select>
144
+ <input type="submit" id="show-gallery" value="<?php attribute_escape( _e('Select &#187;','nggallery') ); ?>" class="button-secondary" />
145
  </div>
146
  <br style="clear:both;" />
147
  </div>
168
  if(is_array($picarray)) {
169
  foreach ($picarray as $picid) {
170
  //TODO:Reduce SQL Queries
171
+ $picture = nggdb::find_image($picid);
172
  ?>
173
  <div id='media-item-<?php echo $picid ?>' class='media-item preloaded'>
174
  <div class='filename'></div>
175
  <a class='toggle describe-toggle-on' href='#'><?php attribute_escape( _e('Show',"nggallery") ); ?></a>
176
  <a class='toggle describe-toggle-off' href='#'><?php attribute_escape( _e('Hide',"nggallery") );?></a>
177
+ <div class='filename new'><?php echo ( empty($picture->alttext) ) ? wp_html_excerpt($picture->filename,60): stripslashes( wp_html_excerpt($picture->alttext,60) ); ?></div>
178
  <table class='slidetoggle describe startclosed'><tbody>
179
  <tr>
180
+ <td rowspan='4'><img class='thumbnail' alt='<?php echo attribute_escape( $picture->alttext ); ?>' src='<?php echo attribute_escape( $picture->thumbURL ); ?>'/></td>
181
  <td><?php attribute_escape( _e('Image ID:',"nggallery") ); ?><?php echo $picid ?></td>
182
  </tr>
183
  <tr><td><?php echo attribute_escape( $picture->filename ); ?></td></tr>
218
  </tr>
219
  <tr class="submit">
220
  <td>
221
+ <input type="hidden" name="image[<?php echo $picid ?>][thumb]" value="<?php echo $picture->thumbURL ?>" />
222
+ <input type="hidden" name="image[<?php echo $picid ?>][url]" value="<?php echo $picture->imageURL ?>" />
223
  </td>
224
  <td class="savesend"><button type="submit" class="button" value="1" name="send[<?php echo $picid ?>]"><?php echo attribute_escape( __('Insert into Post') ); ?></button></td>
225
  </tr>
230
  }
231
  ?>
232
  </div>
233
+ <p class="ml-submit">
234
+ <input type="submit" class="button savebutton" name="save" value="<?php attribute_escape( _e('Save all changes','nggallery') ); ?>" />
235
+ </p>
236
  <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
237
  <input type="hidden" name="select_gal" id="select_gal" value="<?php echo (int) $galleryID; ?>" />
238
  </form>
239
 
240
  <?php
241
  }
 
242
  ?>
admin/myimport.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_admin_import() {
5
-
6
- global $wpdb;
7
-
8
- $ngg_mygallery = $wpdb->prefix . 'mygallery';
9
- $ngg_mygprelation = $wpdb->prefix . 'mygprelation';
10
- $ngg_mypictures = $wpdb->prefix . 'mypictures';
11
-
12
- // GET variables
13
- $gid = trim(attribute_escape($_GET['gid']));
14
- $mode = trim(attribute_escape($_GET['mode']));
15
-
16
- // do the import
17
- if ($mode == 'import') {
18
-
19
- // load path setting
20
- $mygoptions = get_option('mygalleryoptions');
21
- $mygbasepath = $mygoptions['gallerybasepath'];
22
-
23
- $gallery = $wpdb->get_row("SELECT * FROM $ngg_mygallery WHERE id = '$gid'");
24
- if ($gallery) {
25
- $galleryfolder = $mygbasepath . $gallery->name;
26
- $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path, title, galdesc, pageid) VALUES ('$gallery->name', '$galleryfolder', '$gallery->longname', '$gallery->galdescrip' ,'$gallery->pageid') ");
27
- if ($result) {
28
- $newgid = $wpdb->insert_id; // get new index_id
29
- $pictures = $wpdb->get_results("SELECT * FROM $ngg_mypictures, $ngg_mygprelation WHERE $ngg_mygprelation.gid = '$gid' AND $ngg_mypictures.id = $ngg_mygprelation.pid ORDER BY $ngg_mygprelation.pid");
30
- // import each picture
31
- if (is_array($pictures)) {
32
- foreach ($pictures as $picture) {
33
- $wpdb->query("INSERT INTO $wpdb->nggpictures (galleryid, filename, description, alttext, exclude) VALUES ('$newgid', '$picture->picturepath', '$picture->description', '$picture->alttitle' ,'$picture->picexclude') ");
34
- }
35
- nggallery::show_message(__('Gallery ',"nggallery"). $gallery->name . __(' : Import successfull',"nggallery"));
36
- }
37
- } else {
38
- nggallery::show_error(__('Database error. Could not add gallery!',"nggallery"));
39
- }
40
- }
41
- }
42
-
43
- ?>
44
- <div class="wrap">
45
- <h2><?php _e('myGallery Import', 'nggallery') ?></h2>
46
- <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3" >
47
- <thead>
48
- <tr>
49
- <th scope="col" ><?php _e('ID') ?></th>
50
- <th scope="col" ><?php _e('Gallery name', 'nggallery') ?></th>
51
- <th scope="col" ><?php _e('Title', 'nggallery') ?></th>
52
- <th scope="col" ><?php _e('Description', 'nggallery') ?></th>
53
- <th scope="col" ><?php _e('Page ID', 'nggallery') ?></th>
54
- <th scope="col" ><?php _e('Quantity', 'nggallery') ?></th>
55
- <th scope="col" ><?php _e('Action'); ?></th>
56
- </tr>
57
- </thead>
58
- <tbody>
59
- <?php
60
- $gallerylist = $wpdb->get_results("SELECT * FROM $ngg_mygallery ORDER BY id ASC");
61
- if($gallerylist) {
62
- foreach($gallerylist as $gallery) {
63
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
64
- $gid = $gallery->id;
65
- $counter = $wpdb->get_var("SELECT COUNT(*) FROM $ngg_mygprelation WHERE gid = '$gid'");
66
- ?>
67
- <tr id="gallery-<?php echo $gid ?>" <?php echo $class; ?> style="text-align:center">
68
- <th scope="row" style="text-align: center"><?php echo $gid; ?></th>
69
- <td><?php echo $gallery->name; ?></td>
70
- <td><?php echo $gallery->longname; ?></td>
71
- <td><?php echo $gallery->galdescrip; ?></td>
72
- <td><?php echo $gallery->pageid; ?></td>
73
- <td><?php echo $counter; ?></td>
74
- <td><a href="admin.php?page=nggallery-import&amp;mode=import&amp;gid=<?php echo $gid; ?>" class="edit" onclick="javascript:check=confirm( '<?php _e("Import this gallery ?",'nggallery')?>');if(check==false) return false;"><?php _e('Import','nggallery') ?></a></td>
75
- </tr>
76
- <?php
77
- }
78
- } else {
79
- echo '<tr><td colspan="7" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
80
- }
81
- ?>
82
- </tbody>
83
- </table>
84
- </div>
85
- <?php
86
-
87
- }
88
-
89
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/overview.php CHANGED
@@ -1,83 +1,106 @@
1
  <?php
2
  if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
 
 
 
 
 
 
 
4
  function nggallery_admin_overview() {
5
- global $wpdb;
6
-
7
- // get feed_messages
8
- require_once(ABSPATH . WPINC . '/rss.php');
9
-
10
- // init PluginChecker
11
- $nggCheck = new CheckPlugin();
12
- $nggCheck->URL = NGGURL;
13
- $nggCheck->version = NGGVERSION;
14
- $nggCheck->name = "ngg";
 
 
 
 
 
 
 
 
15
 
 
 
 
 
 
 
16
  ?>
17
- <div class="wrap" style="overflow:hidden;">
18
- <h2><?php _e('NextGEN Gallery Overview', 'nggallery') ?></h2>
19
-
20
- <div id="zeitgeist">
21
- <h2><?php _e('Summary', 'nggallery') ?></h2>
22
- <p>
23
- <?php
24
- $replace = array
25
- (
26
- '<strong>'.$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures").'</strong>',
27
- '<strong>'.$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggallery").'</strong>',
28
- '<strong>'.$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggalbum").'</strong>'
29
- );
30
- vprintf(__('There are totally %1$s pictures in %2$s galleries, which are spread across %3$s albums.', 'nggallery'), $replace);
31
- ?>
32
- </p>
33
- <?php if ( $nggCheck->startCheck() && (!IS_WPMU) ) { ?>
34
- <h3><font color="red"><?php _e('New Version available', 'nggallery') ?></font></h3>
35
- <p><?php _e('The server reports that a new NextGEN Gallery Version is now available. Please visit the plugin homepage for more information.', 'nggallery') ?></p>
36
- <p><a href="http://wordpress.org/extend/plugins/nextgen-gallery/download/" target="_blank"> <?php _e('Download here', 'nggallery') ?> </a></p>
37
- <?php } ?>
38
  <?php if (IS_WPMU) {
39
  if (wpmu_enable_function('wpmuQuotaCheck'))
40
  echo ngg_SpaceManager::details();
 
 
 
 
41
  } else { ?>
42
- <h3><?php _e('Server Settings', 'nggallery') ?></h3>
43
- <ul>
44
- <?php ngg_get_serverinfo(); ?>
45
- </ul>
46
- <?php ngg_gd_info(); ?>
47
  <?php } ?>
48
  </div>
49
-
50
- <h3><?php _e('Welcome', 'nggallery') ?></h3>
51
-
52
- <p>
53
- <?php
54
- $userlevel = '<strong>' . (current_user_can('manage_options') ? __('gallery administrator', 'nggallery') : __('gallery editor', 'nggallery')) . '</strong>';
55
- printf(__('Welcome to NextGEN Gallery. Here you can control your images, galleries and albums. You currently have %s rights.', 'nggallery'), $userlevel);
56
- ?>
57
- </p>
58
-
59
- <ul>
60
- <?php if(current_user_can('NextGEN Upload images')): ?><li><a href="admin.php?page=nggallery-add-gallery"><?php _e('Add a new gallery or import pictures', 'nggallery') ?></a></li><?php endif; ?>
61
- <?php if(current_user_can('NextGEN Manage gallery')): ?><li><a href="admin.php?page=nggallery-manage-gallery"><?php _e('Manage galleries and images', 'nggallery') ?></a></li><?php endif; ?>
62
- <?php if(current_user_can('NextGEN Edit album')): ?><li><a href="admin.php?page=nggallery-manage-album"><?php _e('Create and manage albums', 'nggallery') ?></a></li><?php endif; ?>
63
- <?php if(current_user_can('NextGEN Change options')): ?><li><a href="admin.php?page=nggallery-options"><?php _e('Change the settings of NextGEN Gallery', 'nggallery') ?></a></li><?php endif; ?>
64
- </ul>
65
- <div id="devnews">
66
- <h3><?php _e('Latest News', 'nggallery') ?></h3>
67
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  <?php
69
- $rss = fetch_rss('http://alexrabe.boelinger.com/?tag=nextgen-gallery&feed=rss2');
70
-
 
71
  if ( isset($rss->items) && 0 != count($rss->items) )
72
  {
73
  $rss->items = array_slice($rss->items, 0, 3);
74
- foreach ($rss->items as $item)
 
75
  {
76
  ?>
77
- <h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> &#8212; <?php echo human_time_diff(strtotime($item['pubdate'], time())); ?></h4>
78
- <p><?php echo '<strong>'.date("F, jS", strtotime($item['pubdate'])).'</strong> - '.$item['description']; ?></p>
 
79
  <?php
80
  }
 
81
  }
82
  else
83
  {
@@ -86,35 +109,91 @@ function nggallery_admin_overview() {
86
  <?php
87
  }
88
  ?>
89
- </div>
90
- <br style="clear: both" />
91
- </div>
92
  <?php
93
  }
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  // ***************************************************************
96
  function ngg_gd_info() {
 
97
  if(function_exists("gd_info")){
98
- echo '<div><h3>'.__('GD support', 'nggallery').'</h3><ul>';
99
  $info = gd_info();
100
  $keys = array_keys($info);
101
  for($i=0; $i<count($keys); $i++) {
102
  if(is_bool($info[$keys[$i]]))
103
- echo "<li> " . $keys[$i] ." : <strong>" . ngg_gd_yesNo($info[$keys[$i]]) . "</strong></li>\n";
104
  else
105
- echo "<li> " . $keys[$i] ." : <strong>" . $info[$keys[$i]] . "</strong></li>\n";
106
  }
107
  }
108
  else {
109
- echo '<div><h3>'.__('No GD support', 'nggallery').'!</h3><ul>';
110
  }
111
- echo '</ul></div>';
112
  }
113
 
114
  // ***************************************************************
115
  function ngg_gd_yesNo($bool){
116
- if($bool) return __('Yes', 'nggallery');
117
- else return __('No', 'nggallery');
 
 
118
  }
119
 
120
  // ***************************************************************
@@ -161,113 +240,30 @@ function ngg_get_serverinfo() {
161
  else $xml = __('No', 'nggallery');
162
 
163
  ?>
164
- <li><?php _e('Operating System', 'nggallery'); ?> : <strong><?php echo PHP_OS; ?></strong></li>
165
- <li><?php _e('Server', 'nggallery'); ?> : <strong><?php echo $_SERVER["SERVER_SOFTWARE"]; ?></strong></li>
166
- <li><?php _e('Memory usage', 'nggallery'); ?> : <strong><?php echo $memory_usage; ?></strong></li>
167
- <li><?php _e('MYSQL Version', 'nggallery'); ?> : <strong><?php echo $sqlversion; ?></strong></li>
168
- <li><?php _e('SQL Mode', 'nggallery'); ?> : <strong><?php echo $sql_mode; ?></strong></li>
169
- <li><?php _e('PHP Version', 'nggallery'); ?> : <strong><?php echo PHP_VERSION; ?></strong></li>
170
- <li><?php _e('PHP Safe Mode', 'nggallery'); ?> : <strong><?php echo $safe_mode; ?></strong></li>
171
- <li><?php _e('PHP Allow URL fopen', 'nggallery'); ?> : <strong><?php echo $allow_url_fopen; ?></strong></li>
172
- <li><?php _e('PHP Memory Limit', 'nggallery'); ?> : <strong><?php echo $memory_limit; ?></strong></li>
173
- <li><?php _e('PHP Max Upload Size', 'nggallery'); ?> : <strong><?php echo $upload_max; ?></strong></li>
174
- <li><?php _e('PHP Max Post Size', 'nggallery'); ?> : <strong><?php echo $post_max; ?></strong></li>
175
- <li><?php _e('PHP Max Script Execute Time', 'nggallery'); ?> : <strong><?php echo $max_execute; ?>s</strong></li>
176
- <li><?php _e('PHP Exif support', 'nggallery'); ?> : <strong><?php echo $exif; ?></strong></li>
177
- <li><?php _e('PHP IPTC support', 'nggallery'); ?> : <strong><?php echo $iptc; ?></strong></li>
178
- <li><?php _e('PHP XML support', 'nggallery'); ?> : <strong><?php echo $xml; ?></strong></li>
179
  <?php
180
  }
181
 
182
- // ***************************************************************
183
-
184
- /**
185
- * WordPress PHP class to check for a new version.
186
- * @author Alex Rabe & Joern Kretzschmar
187
- * @orginal from Per S�derlind
188
- *
189
- // Dashboard update notification example
190
- function myPlugin_update_dashboard() {
191
- $Check = new CheckPlugin();
192
- $Check->URL = "YOUR URL";
193
- $Check->version = "1.00";
194
- $Check->name = "myPlugin";
195
- if ($Check->startCheck()) {
196
- echo '<h3>Update Information</h3>';
197
- echo '<p>A new version is available</p>';
198
- }
199
- }
200
-
201
- add_action('activity_box_end', 'myPlugin_update_dashboard', '0');
202
- *
203
- */
204
- if ( !class_exists( "CheckPlugin" ) ) {
205
- class CheckPlugin {
206
- /**
207
- * URL with the version of the plugin
208
- * @var string
209
- */
210
- var $URL = 'myURL';
211
- /**
212
- * Version of thsi programm or plugin
213
- * @var string
214
- */
215
- var $version = '1.00';
216
- /**
217
- * Name of the plugin (will be used in the options table)
218
- * @var string
219
- */
220
- var $name = 'myPlugin';
221
- /**
222
- * Waiting period until the next check in seconds
223
- * @var int
224
- */
225
- var $period = 86400;
226
-
227
- function startCheck() {
228
- /**
229
- * check for a new version, returns true if a version is avaiable
230
- */
231
-
232
- // use wordpress snoopy class
233
- require_once(ABSPATH . WPINC . '/class-snoopy.php');
234
-
235
- $check_intervall = get_option( $this->name."_next_update" );
236
-
237
- if ( ($check_intervall < time() ) or (empty($check_intervall)) ) {
238
- if (class_exists(snoopy)) {
239
- $client = new Snoopy();
240
- $client->agent = 'NextGEN Gallery Version Checker (+http://www.nextgen.boelinger.com/)';
241
- $client->_fp_timeout = 10;
242
- if (@$client->fetch($this->URL) === false) {
243
- return false;
244
- }
245
-
246
- $remote = $client->results;
247
-
248
- $server_version = unserialize($remote);
249
- if (is_array($server_version)) {
250
- if ( version_compare($server_version[$this->name], $this->version, '>') )
251
- return true;
252
- }
253
-
254
- $check_intervall = time() + $this->period;
255
- update_option( $this->name."_next_update", $check_intervall );
256
- return false;
257
- }
258
- }
259
- }
260
- }
261
- }
262
- // ***************************************************************
263
-
264
  /**
265
  * WPMU feature taken from Z-Space Upload Quotas
266
  * @author Dylan Reeve
267
  * @url http://dylan.wibble.net/
268
  *
269
  */
270
-
271
  class ngg_SpaceManager {
272
 
273
  function getQuota() {
@@ -369,7 +365,7 @@ class ngg_SpaceManager {
369
  $pct = round(($size / $quota)*100);
370
 
371
  if ($settings['graph']) {
372
-
373
  $out = '<div style="display: block; margin: 0; padding: 0; height: 15px; border: 1px inset; width: 100%; background-color: '.$color_bg.';">'."\n";
374
  $out .= '<div style="display: block; height: 15px; border: none; background-color: '.$color_bar.'; width: '.$pct.'%;">'."\n";
375
  $out .= '<div style="display: inline; position: relative; top: 0; left: 0; font-size: 10px; color: '.$color_text.'; font-weight: bold; padding-bottom: 2px; padding-left: 5px;">'."\n";
@@ -384,4 +380,28 @@ class ngg_SpaceManager {
384
 
385
  }
386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  ?>
1
  <?php
2
  if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
 
4
+ /**
5
+ * nggallery_admin_overview()
6
+ *
7
+ * Add the admin overview in wp2.7 style
8
+ * @return mixed content
9
+ */
10
  function nggallery_admin_overview() {
11
+ ?>
12
+ <div class="wrap ngg-wrap">
13
+ <h2><?php _e('NextGEN Gallery Overview', 'nggallery') ?></h2>
14
+ <div id="dashboard-widgets-wrap" class="ngg-overview">
15
+ <div id="dashboard-widgets" class="metabox-holder">
16
+ <div id="side-info-column" class="inner-sidebar">
17
+ <?php do_meta_boxes('ngg_overview', 'right', ''); ?>
18
+ </div>
19
+ <div id="post-body" class="has-sidebar">
20
+ <div id="dashboard-widgets-main-content" class="has-sidebar-content">
21
+ <?php do_meta_boxes('ngg_overview', 'left', ''); ?>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ <?php
28
+ }
29
 
30
+ /**
31
+ * Show the server settings
32
+ *
33
+ * @return void
34
+ */
35
+ function ngg_overview_server() {
36
  ?>
37
+ <div id="dashboard_server_settings" class="dashboard-widget-holder wp_dashboard_empty">
38
+ <div class="ngg-dashboard-widget">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  <?php if (IS_WPMU) {
40
  if (wpmu_enable_function('wpmuQuotaCheck'))
41
  echo ngg_SpaceManager::details();
42
+ else {
43
+ //TODO:WPMU message in WP2.5 style
44
+ echo ngg_SpaceManager::details();
45
+ }
46
  } else { ?>
47
+ <div class="dashboard-widget-content">
48
+ <ul class="settings">
49
+ <?php ngg_get_serverinfo(); ?>
50
+ </ul>
51
+ </div>
52
  <?php } ?>
53
  </div>
54
+ </div>
55
+ <?php
56
+ }
57
+
58
+ /**
59
+ * Show the GD ibfos
60
+ *
61
+ * @return void
62
+ */
63
+ function ngg_overview_graphic_lib() {
64
+ ?>
65
+ <div id="dashboard_server_settings" class="dashboard-widget-holder">
66
+ <div class="ngg-dashboard-widget">
67
+ <div class="dashboard-widget-content">
68
+ <ul class="settings">
69
+ <?php ngg_gd_info(); ?>
70
+ </ul>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ <?php
75
+ }
76
+
77
+ /**
78
+ * Show the latest NextGEN Gallery news
79
+ *
80
+ * @return void
81
+ */
82
+ function ngg_overview_news(){
83
+ // get feed_messages
84
+ require_once(ABSPATH . WPINC . '/rss.php');
85
+ ?>
86
+ <div class="rss-widget">
87
  <?php
88
+ // $rss = @fetch_rss('http://alexrabe.boelinger.com/?tag=nextgen-gallery&feed=rss2');
89
+ $rss = @fetch_rss('http://alexrabe.boelinger.com/feed/rss2/');
90
+
91
  if ( isset($rss->items) && 0 != count($rss->items) )
92
  {
93
  $rss->items = array_slice($rss->items, 0, 3);
94
+ echo "<ul>";
95
+ foreach ($rss->items as $item)
96
  {
97
  ?>
98
+ <li><a class="rsswidget" title="" href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a>
99
+ <span class="rss-date"><?php echo date("F jS, Y", strtotime($item['pubdate'])); ?></span>
100
+ <div class="rssSummary"><strong><?php echo human_time_diff(strtotime($item['pubdate'], time())); ?></strong> - <?php echo $item['description']; ?></div></li>
101
  <?php
102
  }
103
+ echo "</ul>";
104
  }
105
  else
106
  {
109
  <?php
110
  }
111
  ?>
112
+ </div>
 
 
113
  <?php
114
  }
115
 
116
+ /**
117
+ * Show a summary of the used images
118
+ *
119
+ * @return void
120
+ */
121
+ function ngg_overview_right_now() {
122
+ global $wpdb;
123
+ $images = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures") );
124
+ $galleries = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggallery") );
125
+ $albums = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggalbum") );
126
+ ?>
127
+
128
+ <p class="sub"><?php _e('At a Glance', 'nggallery'); ?></p>
129
+ <div class="table">
130
+ <table>
131
+ <tbody>
132
+ <tr class="first">
133
+ <td class="first b"><a href="admin.php?page=nggallery-add-gallery"><?php echo $images; ?></a></td>
134
+ <td class="t"><?php echo __ngettext( 'Image', 'Images', $images, 'nggallery' ); ?></td>
135
+ <td class="b"></td>
136
+ <td class="last"></td>
137
+ </tr>
138
+ <tr>
139
+ <td class="first b"><a href="admin.php?page=nggallery-manage-gallery"><?php echo $galleries; ?></a></td>
140
+ <td class="t"><?php echo __ngettext( 'Gallery', 'Galleries', $galleries, 'nggallery' ); ?></td>
141
+ <td class="b"></td>
142
+ <td class="last"></td>
143
+ </tr>
144
+ <tr>
145
+ <td class="first b"><a href="admin.php?page=nggallery-manage-album"><?php echo $albums; ?></a></td>
146
+ <td class="t"><?php echo __ngettext( 'Album', 'Albums', $albums, 'nggallery' ); ?></td>
147
+ <td class="b"></td>
148
+ <td class="last"></td>
149
+ </tr>
150
+ </tbody>
151
+ </table>
152
+ </div>
153
+ <div class="versions">
154
+ <p>
155
+ <?php if(current_user_can('NextGEN Upload images')): ?><a class="button rbutton" href="admin.php?page=nggallery-add-gallery"><strong><?php _e('Upload pictures', 'nggallery') ?></strong></a><?php endif; ?>
156
+ <?php _e('Here you can control your images, galleries and albums.', 'nggallery') ?>
157
+ </p>
158
+ <span>
159
+ <?php
160
+ $userlevel = '<span class="b">' . (current_user_can('manage_options') ? __('Gallery Administrator', 'nggallery') : __('Gallery Editor', 'nggallery')) . '</span>';
161
+ printf(__('You currently have %s rights.', 'nggallery'), $userlevel);
162
+ ?>
163
+ </span>
164
+ </div>
165
+ <?php
166
+ }
167
+
168
+ add_meta_box('dashboard_right_now', __('Welcome to NextGEN Gallery !', 'nggallery'), 'ngg_overview_right_now', 'ngg_overview', 'left', 'core');
169
+ add_meta_box('dashboard_primary', __('Latest News', 'nggallery'), 'ngg_overview_news', 'ngg_overview', 'right', 'core');
170
+ add_meta_box('ngg_server', __('Server Settings', 'nggallery'), 'ngg_overview_server', 'ngg_overview', 'left', 'core');
171
+ add_meta_box('ngg_gd_lib', __('Graphic Library', 'nggallery'), 'ngg_overview_graphic_lib', 'ngg_overview', 'right', 'core');
172
+
173
  // ***************************************************************
174
  function ngg_gd_info() {
175
+
176
  if(function_exists("gd_info")){
 
177
  $info = gd_info();
178
  $keys = array_keys($info);
179
  for($i=0; $i<count($keys); $i++) {
180
  if(is_bool($info[$keys[$i]]))
181
+ echo "<li> " . $keys[$i] ." : <span>" . ngg_gd_yesNo($info[$keys[$i]]) . "</span></li>\n";
182
  else
183
+ echo "<li> " . $keys[$i] ." : <span>" . $info[$keys[$i]] . "</span></li>\n";
184
  }
185
  }
186
  else {
187
+ echo '<h4>'.__('No GD support', 'nggallery').'!</h4>';
188
  }
 
189
  }
190
 
191
  // ***************************************************************
192
  function ngg_gd_yesNo($bool){
193
+ if($bool)
194
+ return __('Yes', 'nggallery');
195
+ else
196
+ return __('No', 'nggallery');
197
  }
198
 
199
  // ***************************************************************
240
  else $xml = __('No', 'nggallery');
241
 
242
  ?>
243
+ <li><?php _e('Operating System', 'nggallery'); ?> : <span><?php echo PHP_OS; ?></span></li>
244
+ <li><?php _e('Server', 'nggallery'); ?> : <span><?php echo $_SERVER["SERVER_SOFTWARE"]; ?></span></li>
245
+ <li><?php _e('Memory usage', 'nggallery'); ?> : <span><?php echo $memory_usage; ?></span></li>
246
+ <li><?php _e('MYSQL Version', 'nggallery'); ?> : <span><?php echo $sqlversion; ?></span></li>
247
+ <li><?php _e('SQL Mode', 'nggallery'); ?> : <span><?php echo $sql_mode; ?></span></li>
248
+ <li><?php _e('PHP Version', 'nggallery'); ?> : <span><?php echo PHP_VERSION; ?></span></li>
249
+ <li><?php _e('PHP Safe Mode', 'nggallery'); ?> : <span><?php echo $safe_mode; ?></span></li>
250
+ <li><?php _e('PHP Allow URL fopen', 'nggallery'); ?> : <span><?php echo $allow_url_fopen; ?></span></li>
251
+ <li><?php _e('PHP Memory Limit', 'nggallery'); ?> : <span><?php echo $memory_limit; ?></span></li>
252
+ <li><?php _e('PHP Max Upload Size', 'nggallery'); ?> : <span><?php echo $upload_max; ?></span></li>
253
+ <li><?php _e('PHP Max Post Size', 'nggallery'); ?> : <span><?php echo $post_max; ?></span></li>
254
+ <li><?php _e('PHP Max Script Execute Time', 'nggallery'); ?> : <span><?php echo $max_execute; ?>s</span></li>
255
+ <li><?php _e('PHP Exif support', 'nggallery'); ?> : <span><?php echo $exif; ?></span></li>
256
+ <li><?php _e('PHP IPTC support', 'nggallery'); ?> : <span><?php echo $iptc; ?></span></li>
257
+ <li><?php _e('PHP XML support', 'nggallery'); ?> : <span><?php echo $xml; ?></span></li>
258
  <?php
259
  }
260
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  /**
262
  * WPMU feature taken from Z-Space Upload Quotas
263
  * @author Dylan Reeve
264
  * @url http://dylan.wibble.net/
265
  *
266
  */
 
267
  class ngg_SpaceManager {
268
 
269
  function getQuota() {
365
  $pct = round(($size / $quota)*100);
366
 
367
  if ($settings['graph']) {
368
+ //TODO:move style to CSS
369
  $out = '<div style="display: block; margin: 0; padding: 0; height: 15px; border: 1px inset; width: 100%; background-color: '.$color_bg.';">'."\n";
370
  $out .= '<div style="display: block; height: 15px; border: none; background-color: '.$color_bar.'; width: '.$pct.'%;">'."\n";
371
  $out .= '<div style="display: inline; position: relative; top: 0; left: 0; font-size: 10px; color: '.$color_text.'; font-weight: bold; padding-bottom: 2px; padding-left: 5px;">'."\n";
380
 
381
  }
382
 
383
+ /**
384
+ * ngg_get_phpinfo() - Extract all of the data from phpinfo into a nested array
385
+ *
386
+ * @author jon@sitewizard.ca
387
+ * @return array
388
+ */
389
+ function ngg_get_phpinfo() {
390
+
391
+ ob_start();
392
+ phpinfo();
393
+ $phpinfo = array('phpinfo' => array());
394
+
395
+ if ( preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER) )
396
+ foreach($matches as $match) {
397
+ if(strlen($match[1]))
398
+ $phpinfo[$match[1]] = array();
399
+ elseif(isset($match[3]))
400
+ $phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
401
+ else
402
+ $phpinfo[end(array_keys($phpinfo))][] = $match[2];
403
+ }
404
+
405
+ return $phpinfo;
406
+ }
407
  ?>
admin/roles.php CHANGED
@@ -13,11 +13,13 @@ if ( isset($_POST['update_cap']) ) {
13
  ngg_set_capability($_POST['tinymce'],"NextGEN Use TinyMCE");
14
  ngg_set_capability($_POST['add_gallery'],"NextGEN Upload images");
15
  ngg_set_capability($_POST['manage_gallery'],"NextGEN Manage gallery");
 
 
16
  ngg_set_capability($_POST['edit_album'],"NextGEN Edit album");
17
  ngg_set_capability($_POST['change_style'],"NextGEN Change style");
18
  ngg_set_capability($_POST['change_options'],"NextGEN Change options");
19
 
20
- nggallery::show_message(__('Updated capabilities',"nggallery"));
21
  }
22
 
23
  ?>
@@ -27,8 +29,7 @@ if ( isset($_POST['update_cap']) ) {
27
  <?php _e('For a more flexible user management you can use the', 'nggallery') ?> <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">Role Manager</a>.</p>
28
  <form name="addroles" id="addroles" method="POST" accept-charset="utf-8" >
29
  <?php wp_nonce_field('ngg_addroles') ?>
30
- <fieldset class="options">
31
- <table class="optiontable">
32
  <tr valign="top">
33
  <th scope="row"><?php _e('Main NextGEN Gallery overview', 'nggallery') ;?>:</th>
34
  <td><label for="general"><select name="general" id="general"><?php wp_dropdown_roles( ngg_get_role('NextGEN Gallery overview') ); ?></select></label></td>
@@ -45,6 +46,14 @@ if ( isset($_POST['update_cap']) ) {
45
  <th scope="row"><?php _e('Manage gallery', 'nggallery') ;?>:</th>
46
  <td><label for="manage_gallery"><select name="manage_gallery" id="manage_gallery"><?php wp_dropdown_roles( ngg_get_role('NextGEN Manage gallery') ); ?></select></label></td>
47
  </tr>
 
 
 
 
 
 
 
 
48
  <tr valign="top">
49
  <th scope="row"><?php _e('Edit Album', 'nggallery') ;?>:</th>
50
  <td><label for="edit_album"><select name="edit_album" id="edit_album"><?php wp_dropdown_roles( ngg_get_role('NextGEN Edit album') ); ?></select></label></td>
@@ -58,11 +67,10 @@ if ( isset($_POST['update_cap']) ) {
58
  <td><label for="change_options"><select name="change_options" id="change_options"><?php wp_dropdown_roles( ngg_get_role('NextGEN Change options') ); ?></select></label></td>
59
  </tr>
60
  </table>
61
- <div class="submit"><input type="submit" name= "update_cap" value="<?php _e('Update capabilities', 'nggallery') ;?>"/></div>
62
- </fieldset>
63
  </form>
64
  </div>
65
- <?php
66
 
67
  }
68
 
13
  ngg_set_capability($_POST['tinymce'],"NextGEN Use TinyMCE");
14
  ngg_set_capability($_POST['add_gallery'],"NextGEN Upload images");
15
  ngg_set_capability($_POST['manage_gallery'],"NextGEN Manage gallery");
16
+ ngg_set_capability($_POST['manage_others'],"NextGEN Manage others gallery");
17
+ ngg_set_capability($_POST['manage_tags'],"NextGEN Manage tags");
18
  ngg_set_capability($_POST['edit_album'],"NextGEN Edit album");
19
  ngg_set_capability($_POST['change_style'],"NextGEN Change style");
20
  ngg_set_capability($_POST['change_options'],"NextGEN Change options");
21
 
22
+ nggGallery::show_message(__('Updated capabilities',"nggallery"));
23
  }
24
 
25
  ?>
29
  <?php _e('For a more flexible user management you can use the', 'nggallery') ?> <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">Role Manager</a>.</p>
30
  <form name="addroles" id="addroles" method="POST" accept-charset="utf-8" >
31
  <?php wp_nonce_field('ngg_addroles') ?>
32
+ <table class="form-table">
 
33
  <tr valign="top">
34
  <th scope="row"><?php _e('Main NextGEN Gallery overview', 'nggallery') ;?>:</th>
35
  <td><label for="general"><select name="general" id="general"><?php wp_dropdown_roles( ngg_get_role('NextGEN Gallery overview') ); ?></select></label></td>
46
  <th scope="row"><?php _e('Manage gallery', 'nggallery') ;?>:</th>
47
  <td><label for="manage_gallery"><select name="manage_gallery" id="manage_gallery"><?php wp_dropdown_roles( ngg_get_role('NextGEN Manage gallery') ); ?></select></label></td>
48
  </tr>
49
+ <tr valign="top">
50
+ <th scope="row"><?php _e('Manage others gallery', 'nggallery') ;?>:</th>
51
+ <td><label for="manage_others"><select name="manage_others" id="manage_others"><?php wp_dropdown_roles( ngg_get_role('NextGEN Manage others gallery') ); ?></select></label></td>
52
+ </tr>
53
+ <tr valign="top">
54
+ <th scope="row"><?php _e('Manage tags', 'nggallery') ;?>:</th>
55
+ <td><label for="manage_tags"><select name="manage_tags" id="manage_tags"><?php wp_dropdown_roles( ngg_get_role('NextGEN Manage tags') ); ?></select></label></td>
56
+ </tr>
57
  <tr valign="top">
58
  <th scope="row"><?php _e('Edit Album', 'nggallery') ;?>:</th>
59
  <td><label for="edit_album"><select name="edit_album" id="edit_album"><?php wp_dropdown_roles( ngg_get_role('NextGEN Edit album') ); ?></select></label></td>
67
  <td><label for="change_options"><select name="change_options" id="change_options"><?php wp_dropdown_roles( ngg_get_role('NextGEN Change options') ); ?></select></label></td>
68
  </tr>
69
  </table>
70
+ <div class="submit"><input type="submit" class="button-primary" name= "update_cap" value="<?php _e('Update capabilities', 'nggallery') ;?>"/></div>
 
71
  </form>
72
  </div>
73
+ <?php
74
 
75
  }
76
 
admin/settings.php CHANGED
@@ -3,14 +3,12 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
3
 
4
  function nggallery_admin_options() {
5
 
6
- global $wpdb, $wp_version, $nggRewrite;
7
 
8
- // get the options
9
- $ngg_options = get_option('ngg_options');
10
- $old_state = $ngg_options['usePermalinks'];
11
 
12
  // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
13
- $filepath = get_option('siteurl'). '/wp-admin/admin.php?page='.$_GET['page'];
14
 
15
  if ( isset($_POST['updateoption']) ) {
16
  check_admin_referer('ngg_settings');
@@ -22,43 +20,45 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
22
  $option = trim($option);
23
  $value = trim($_POST[$option]);
24
  // $value = sanitize_option($option, $value); // This does stripslashes on those that need it
25
- $ngg_options[$option] = $value;
26
  }
 
 
 
27
  }
 
 
 
28
  // Flush ReWrite rules
29
- if ( $old_state != $ngg_options['usePermalinks'] )
30
  $nggRewrite->flush();
31
- // Save options
32
- update_option('ngg_options', $ngg_options);
33
- $messagetext = '<font color="green">'.__('Update successfully','nggallery').'</font>';
34
  }
35
 
36
  if ( isset($_POST['clearcache']) ) {
37
 
38
- $path = WINABSPATH . $ngg_options['gallerypath'] . "cache/";
39
 
40
  if (is_dir($path))
41
  if ($handle = opendir($path)) {
42
  while (false !== ($file = readdir($handle))) {
43
  if ($file != '.' && $file != '..') {
44
- @unlink($path."/".$file);
45
  }
46
  }
47
  closedir($handle);
48
  }
49
-
50
- $messagetext = '<font color="green">'.__('Cache cleared','nggallery').'</font>';
51
  }
52
  // message windows
53
  if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
 
54
  ?>
55
- <!-- Additional IE/Win specific style sheet (Conditional Comments) -->
56
- <!--[if lte IE 7]>
57
- <link rel="stylesheet" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.tabs-ie.css" type="text/css" media="projection, screen"/>
58
- <![endif]-->
59
  <script type="text/javascript">
60
  jQuery(function() {
61
- jQuery('#slider').tabs({ fxFade: true, fxSpeed: 'fast' });
62
  });
63
 
64
  function insertcode(value) {
@@ -81,7 +81,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
81
  jQuery('#tbImage').hide("slow");
82
  break;
83
  case "shutter":
84
- effectcode = 'class="shutterset"';
85
  jQuery('#tbImage').hide("slow");
86
  break;
87
  default:
@@ -101,7 +101,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
101
  <li><a href="#generaloptions"><?php _e('General Options', 'nggallery') ;?></a></li>
102
  <li><a href="#thumbnails"><?php _e('Thumbnails', 'nggallery') ;?></a></li>
103
  <li><a href="#images"><?php _e('Images', 'nggallery') ;?></a></li>
104
- <li><a href="#gallery"><?php _e('Gallery', 'nggallery') ;?></a></li>
105
  <li><a href="#effects"><?php _e('Effects', 'nggallery') ;?></a></li>
106
  <li><a href="#watermark"><?php _e('Watermark', 'nggallery') ;?></a></li>
107
  <li><a href="#slideshow"><?php _e('Slideshow', 'nggallery') ;?></a></li>
@@ -113,56 +113,58 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
113
  <h2><?php _e('General Options','nggallery'); ?></h2>
114
  <form name="generaloptions" method="post">
115
  <?php wp_nonce_field('ngg_settings') ?>
116
- <input type="hidden" name="page_options" value="gallerypath,scanfolder,deleteImg,usePermalinks,activateTags,appendType,maxImages" />
117
- <fieldset class="options">
118
- <table class="optiontable editform">
119
  <tr valign="top">
120
  <th align="left"><?php _e('Gallery path','nggallery') ?></th>
121
- <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="35" name="gallerypath" value="<?php echo $ngg_options['gallerypath']; ?>" title="TEST" /><br />
122
- <?php _e('This is the default path for all galleries','nggallery') ?></td>
123
- </tr>
124
- <!--TODO: Later... -->
125
- <!--
126
- <tr valign="top">
127
- <th align="left"><?php //_e('Scan folders during runtime','nggallery') ?></th>
128
- <td><input type="checkbox" name="scanfolder" value="1" <?php //checked('1', $ngg_options[scanfolder]); ?> /><br />
129
- <?php //_e('Search automatic in the folders for new images (not working)','nggallery') ?></td>
130
  </tr>
131
- -->
132
  <tr valign="top">
133
  <th align="left"><?php _e('Delete image files','nggallery') ?></th>
134
- <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="checkbox" name="deleteImg" value="1" <?php checked('1', $ngg_options['deleteImg']); ?> /><br />
135
  <?php _e('Delete files, when removing a gallery in the database','nggallery') ?></td>
136
  </tr>
137
  <tr valign="top">
138
  <th align="left"><?php _e('Activate permalinks','nggallery') ?></th>
139
- <td><input type="checkbox" name="usePermalinks" value="1" <?php checked('1', $ngg_options['usePermalinks']); ?> /><br />
140
  <?php _e('When you activate this option, you need to update your permalink structure one time.','nggallery') ?></td>
141
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
142
  </table>
143
- <legend><?php _e('Tags / Categories','nggallery') ?></legend>
144
- <table class="optiontable">
145
  <tr>
146
  <th valign="top"><?php _e('Activate related images','nggallery') ?>:</th>
147
- <td><input name="activateTags" type="checkbox" value="1" <?php checked('1', $ngg_options['activateTags']); ?> />
148
  <?php _e('This option will append related images to every post','nggallery') ?>
149
  </td>
150
  </tr>
151
  <tr>
152
  <th valign="top"><?php _e('Match with','nggallery') ?>:</th>
153
- <td><label><input name="appendType" type="radio" value="category" <?php checked('category', $ngg_options['appendType']); ?> /> <?php _e('Categories', 'nggallery') ;?></label><br />
154
- <label><input name="appendType" type="radio" value="tags" <?php checked('tags', $ngg_options['appendType']); ?> /> <?php _e('Tags', 'nggallery') ;?><?php if (version_compare($wp_version, '2.3.alpha', '<')) _e(' (require WordPress 2.3 or higher)', 'nggallery'); ?></label>
155
  </td>
156
  </tr>
157
  <tr>
158
  <th valign="top"><?php _e('Max. number of images','nggallery') ?>:</th>
159
- <td><input type="text" name="maxImages" value="<?php echo $ngg_options['maxImages'] ?>" size="3" maxlength="3" /><br />
160
- <?php _e('0 will show all images','nggallery') ?>
161
  </td>
162
  </tr>
163
  </table>
164
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
165
- </fieldset>
166
  </form>
167
  </div>
168
 
@@ -172,37 +174,30 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
172
  <h2><?php _e('Thumbnail settings','nggallery'); ?></h2>
173
  <form name="thumbnailsettings" method="POST" action="<?php echo $filepath.'#thumbnails'; ?>" >
174
  <?php wp_nonce_field('ngg_settings') ?>
175
- <input type="hidden" name="page_options" value="thumbwidth,thumbheight,thumbfix,thumbcrop,thumbquality,thumbResampleMode" />
176
- <fieldset class="options">
177
  <p><?php _e('Please note : If you change the settings, you need to recreate the thumbnails under -> Manage Gallery .', 'nggallery') ?></p>
178
- <table class="optiontable editform">
179
  <tr valign="top">
180
  <th align="left"><?php _e('Width x height (in pixel)','nggallery') ?></th>
181
- <td><input type="text" size="4" maxlength="4" name="thumbwidth" value="<?php echo $ngg_options['thumbwidth']; ?>" /> x <input type="text" size="4" maxlength="4" name="thumbheight" value="<?php echo $ngg_options['thumbheight']; ?>" /><br />
182
- <?php _e('These values are maximum values ','nggallery') ?></td>
183
  </tr>
184
  <tr valign="top">
185
  <th align="left"><?php _e('Set fix dimension','nggallery') ?></th>
186
- <td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg_options['thumbfix']); ?> /><br />
187
  <?php _e('Ignore the aspect ratio, no portrait thumbnails','nggallery') ?></td>
188
  </tr>
189
  <tr valign="top">
190
  <th align="left"><?php _e('Crop square thumbnail from image','nggallery') ?></th>
191
- <td><input type="checkbox" name="thumbcrop" value="1" <?php checked('1', $ngg_options['thumbcrop']); ?> /><br />
192
- <?php _e('Create square thumbnails, use only the width setting :','nggallery') ?> <?php echo $ngg_options['thumbwidth']; ?> x <?php echo $ngg_options['thumbwidth']; ?></td>
193
  </tr>
194
  <tr valign="top">
195
  <th align="left"><?php _e('Thumbnail quality','nggallery') ?></th>
196
- <td><input type="text" size="3" maxlength="3" name="thumbquality" value="<?php echo $ngg_options['thumbquality']; ?>" /> %</td>
197
- </tr>
198
- <tr valign="top">
199
- <th align="left"><?php _e('Resample Mode','nggallery') ?></th>
200
- <td><input type="text" size="1" maxlength="1" name="thumbResampleMode" value="<?php echo $ngg_options['thumbResampleMode']; ?>" /><br />
201
- <?php _e('Value between 1-5 (higher value, more CPU load)','nggallery') ?></td>
202
  </tr>
203
  </table>
204
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
205
- </fieldset>
206
  </form>
207
  </div>
208
 
@@ -212,44 +207,36 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
212
  <h2><?php _e('Image settings','nggallery'); ?></h2>
213
  <form name="imagesettings" method="POST" action="<?php echo $filepath.'#images'; ?>" >
214
  <?php wp_nonce_field('ngg_settings') ?>
215
- <input type="hidden" name="page_options" value="imgResize,imgWidth,imgHeight,imgQuality,imgResampleMode,imgCacheSinglePic" />
216
- <fieldset class="options">
217
- <table class="optiontable">
218
  <tr valign="top">
219
  <th scope="row"><label for="fixratio"><?php _e('Resize Images','nggallery') ?></label></th>
220
  <!--TODO: checkbox fixratio can be used later -->
221
- <td><input type="hidden" name="imgResize" value="1" <?php checked('1', $ngg_options['imgResize']); ?> /> </td>
222
- <td><input type="text" size="5" name="imgWidth" value="<?php echo $ngg_options['imgWidth']; ?>" /> x <input type="text" size="5" name="imgHeight" value="<?php echo $ngg_options['imgHeight']; ?>" /><br />
223
- <?php _e('Width x height (in pixel). NextGEN Gallery will keep ratio size','nggallery') ?></td>
224
  </tr>
225
  <tr valign="top">
226
  <th align="left"><?php _e('Image quality','nggallery') ?></th>
227
  <td></td>
228
- <td><input type="text" size="3" maxlength="3" name="imgQuality" value="<?php echo $ngg_options['imgQuality']; ?>" /> %</td>
229
- </tr>
230
- <tr valign="top">
231
- <th align="left"><?php _e('Resample Mode','nggallery') ?></th>
232
- <td></td>
233
- <td><input type="text" size="1" maxlength="1" name="imgResampleMode" value="<?php echo $ngg_options['imgResampleMode']; ?>" /><br />
234
- <?php _e('Value between 1-5 (higher value, more CPU load)','nggallery') ?></td>
235
  </tr>
236
  </table>
237
- <legend><?php _e('Single picture','nggallery') ?></legend>
238
- <table class="optiontable">
239
  <tr valign="top">
240
  <th align="left"><?php _e('Cache single pictures','nggallery') ?></th>
241
  <td></td>
242
- <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="checkbox" name="imgCacheSinglePic" value="1" <?php checked('1', $ngg_options['imgCacheSinglePic']); ?> />
243
- <?php _e('Creates a file for each singlepic settings. Reduce the CPU load','nggallery') ?></td>
244
  </tr>
245
  <tr valign="top">
246
  <th align="left"><?php _e('Clear cache folder','nggallery') ?></th>
247
  <td></td>
248
- <td><input type="submit" name="clearcache" value="<?php _e('Proceed now','nggallery') ;?> &raquo;"/></td>
249
  </tr>
250
  </table>
251
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
252
- </fieldset>
253
  </form>
254
  </div>
255
 
@@ -259,77 +246,60 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
259
  <h2><?php _e('Gallery settings','nggallery'); ?></h2>
260
  <form name="galleryform" method="POST" action="<?php echo $filepath.'#gallery'; ?>" >
261
  <?php wp_nonce_field('ngg_settings') ?>
262
- <input type="hidden" name="page_options" value="galUsejQuery,galNoPages,galImages,galShowSlide,galTextSlide,galTextGallery,galShowOrder,galShowDesc,galImgBrowser,galSort,galSortDir" />
263
- <fieldset class="options">
264
- <table class="optiontable">
265
- <!--TODO: Do better... -->
266
- <!--
267
- <tr>
268
- <th valign="top"><?php //_e('Activate jQuery navigation','nggallery') ?>:</th>
269
- <td><input name="galUsejQuery" type="checkbox" value="1" <?php // checked('1', $ngg_options['galUsejQuery']); ?> />
270
- <?php //_e('Please note : This is still experimental. Requires the Thickbox effect','nggallery') ?>
271
- </td>
272
- </tr>
273
- -->
274
  <tr>
275
  <th valign="top"><?php _e('Deactivate gallery page link','nggallery') ?>:</th>
276
- <td><input name="galNoPages" type="checkbox" value="1" <?php checked('1', $ngg_options['galNoPages']); ?> />
277
  <?php _e('The album will not link to a gallery subpage. The gallery is shown on the same page.','nggallery') ?>
278
  </td>
279
  </tr>
280
  <tr>
281
  <th valign="top"><?php _e('Number of images per page','nggallery') ?>:</th>
282
- <td><input type="text" name="galImages" value="<?php echo $ngg_options['galImages'] ?>" size="3" maxlength="3" /><br />
283
- <?php _e('0 will disable pagination, all images on one page','nggallery') ?>
284
  </td>
285
  </tr>
286
  <tr>
287
  <th valign="top"><?php _e('Integrate slideshow','nggallery') ?>:</th>
288
- <td><input name="galShowSlide" type="checkbox" value="1" <?php checked('1', $ngg_options['galShowSlide']); ?> />
289
- <input type="text" name="galTextSlide" value="<?php echo $ngg_options['galTextSlide'] ?>" size="20" />
290
- <input type="text" name="galTextGallery" value="<?php echo $ngg_options['galTextGallery'] ?>" size="20" />
291
  </td>
292
  </tr>
293
  <tr>
294
  <th valign="top"><?php _e('Show first','nggallery') ?>:</th>
295
- <td><label><input name="galShowOrder" type="radio" value="gallery" <?php checked('gallery', $ngg_options['galShowOrder']); ?> /> <?php _e('Thumbnails', 'nggallery') ;?></label><br />
296
- <label><input name="galShowOrder" type="radio" value="slide" <?php checked('slide', $ngg_options['galShowOrder']); ?> /> <?php _e('Slideshow', 'nggallery') ;?></label>
297
- </td>
298
- </tr>
299
- <tr>
300
- <th valign="top"><?php _e('Show thumbnail description','nggallery') ?>:</th>
301
- <td><label><input name="galShowDesc" type="radio" value="none" <?php checked('none', $ngg_options['galShowDesc']); ?> /> <?php _e('None', 'nggallery') ;?></label><br />
302
- <label><input name="galShowDesc" type="radio" value="desc" <?php checked('desc', $ngg_options['galShowDesc']); ?> /> <?php _e('Description text', 'nggallery') ;?></label><br />
303
- <label><input name="galShowDesc" type="radio" value="alttext" <?php checked('alttext', $ngg_options['galShowDesc']); ?> /> <?php _e('Alt / Title text', 'nggallery') ;?></label>
304
  </td>
305
  </tr>
306
  <tr>
307
  <th valign="top"><?php _e('Show ImageBrowser','nggallery') ?>:</th>
308
- <td><input name="galImgBrowser" type="checkbox" value="1" <?php checked('1', $ngg_options['galImgBrowser']); ?> />
309
  <?php _e('The gallery will open the ImageBrowser instead the effect.','nggallery') ?>
310
  </td>
311
  </tr>
312
  </table>
313
- <legend><?php _e('Sort options','nggallery') ?></legend>
314
- <table class="optiontable">
315
  <tr>
316
  <th valign="top"><?php _e('Sort thumbnails','nggallery') ?>:</th>
317
  <td>
318
- <label><input name="galSort" type="radio" value="sortorder" <?php checked('sortorder', $ngg_options['galSort']); ?> /> <?php _e('Custom order', 'nggallery') ;?></label><br />
319
- <label><input name="galSort" type="radio" value="pid" <?php checked('pid', $ngg_options['galSort']); ?> /> <?php _e('Image ID', 'nggallery') ;?></label><br />
320
- <label><input name="galSort" type="radio" value="filename" <?php checked('filename', $ngg_options['galSort']); ?> /> <?php _e('File name', 'nggallery') ;?></label><br />
321
- <label><input name="galSort" type="radio" value="alttext" <?php checked('alttext', $ngg_options['galSort']); ?> /> <?php _e('Alt / Title text', 'nggallery') ;?></label>
 
322
  </td>
323
  </tr>
324
  <tr>
325
  <th valign="top"><?php _e('Sort direction','nggallery') ?>:</th>
326
- <td><label><input name="galSortDir" type="radio" value="ASC" <?php checked('ASC', $ngg_options['galSortDir']); ?> /> <?php _e('Ascending', 'nggallery') ;?></label><br />
327
- <label><input name="galSortDir" type="radio" value="DESC" <?php checked('DESC', $ngg_options['galSortDir']); ?> /> <?php _e('Descending', 'nggallery') ;?></label>
328
  </td>
329
  </tr>
330
  </table>
331
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
332
- </fieldset>
333
  </form>
334
  </div>
335
 
@@ -339,44 +309,29 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
339
  <h2><?php _e('Effects','nggallery'); ?></h2>
340
  <form name="effectsform" method="POST" action="<?php echo $filepath.'#effects'; ?>" >
341
  <?php wp_nonce_field('ngg_settings') ?>
342
- <input type="hidden" name="page_options" value="thumbEffect,thumbCode,thickboxImage" />
343
  <p><?php _e('Here you can select the thumbnail effect, NextGEN Gallery will integrate the required HTML code in the images. Please note that only the Thickbox effect will automatic added to your theme.','nggallery'); ?>
344
  <?php _e('With the placeholder','nggallery'); ?><strong> %GALLERY_NAME% </strong> <?php _e('you can activate a navigation through the images (depend on the effect). Change the code line only , when you use a different thumbnail effect or you know what you do.','nggallery'); ?></p>
345
- <fieldset class="options">
346
- <table class="optiontable">
347
  <tr valign="top">
348
  <th><?php _e('JavaScript Thumbnail effect','nggallery') ?>:</th>
349
  <td>
350
  <select size="1" id="thumbEffect" name="thumbEffect" onchange="insertcode(this.value)">
351
- <option value="none" <?php selected('none', $ngg_options['thumbEffect']); ?> ><?php _e('None', 'nggallery') ;?></option>
352
- <option value="thickbox" <?php selected('thickbox', $ngg_options['thumbEffect']); ?> ><?php _e('Thickbox', 'nggallery') ;?></option>
353
- <option value="lightbox" <?php selected('lightbox', $ngg_options['thumbEffect']); ?> ><?php _e('Lightbox', 'nggallery') ;?></option>
354
- <option value="highslide" <?php selected('highslide', $ngg_options['thumbEffect']); ?> ><?php _e('Highslide', 'nggallery') ;?></option>
355
- <option value="shutter" <?php selected('shutter', $ngg_options['thumbEffect']); ?> ><?php _e('Shutter', 'nggallery') ;?></option>
356
- <option value="custom" <?php selected('custom', $ngg_options['thumbEffect']); ?> ><?php _e('Custom', 'nggallery') ;?></option>
357
  </select>
358
  </td>
359
  </tr>
360
  <tr valign="top">
361
  <th><?php _e('Link Code line','nggallery') ?> :</th>
362
- <td><textarea id="thumbCode" name="thumbCode" cols="50" rows="5"><?php echo htmlspecialchars(stripslashes($ngg_options['thumbCode'])); ?></textarea></td>
363
  </tr>
364
  </table>
365
-
366
- <div id="tbImage" <?php if ($ngg_options['thumbEffect'] != 'thickbox') echo 'style="display:none"'?> >
367
- <table class="optiontable">
368
- <tr valign="top">
369
- <th><?php _e('Select loading image','nggallery') ?> :</th>
370
- <td>
371
- <label><input name="thickboxImage" id="v2" type="radio" title="Version 2" value="loadingAnimationv2.gif" <?php checked('loadingAnimationv2.gif', $ngg_options['thickboxImage']); ?> /></label> <img src="<?php echo NGGALLERY_URLPATH.'thickbox/loadingAnimationv2.gif' ?>" alt="Version 2" />
372
- <label><input name="thickboxImage" id="v3" type="radio" title="Version 3" value="loadingAnimationv3.gif" <?php checked('loadingAnimationv3.gif', $ngg_options['thickboxImage']); ?> /></label> <img src="<?php echo NGGALLERY_URLPATH.'thickbox/loadingAnimationv3.gif' ?>" alt="Version 3" />
373
- </td>
374
- </tr>
375
- </table>
376
- </div>
377
-
378
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
379
- </fieldset>
380
  </form>
381
  </div>
382
 
@@ -394,100 +349,96 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
394
  <form name="watermarkform" method="POST" action="<?php echo $filepath.'#watermark'; ?>" >
395
  <?php wp_nonce_field('ngg_settings') ?>
396
  <input type="hidden" name="page_options" value="wmPos,wmXpos,wmYpos,wmType,wmPath,wmFont,wmSize,wmColor,wmText,wmOpaque" />
397
- <div id="zeitgeist">
398
  <h3><?php _e('Preview','nggallery') ?></h3>
399
- <p><center><?php echo $imageURL; ?></center></p>
400
  <h3><?php _e('Position','nggallery') ?></h3>
401
- <table width="80%" border="0">
402
- <tr>
403
- <td valign="top">
404
- <strong><?php _e('Position','nggallery') ?></strong><br />
405
- <table border="1">
406
- <tr>
407
- <td><input type="radio" name="wmPos" value="topLeft" <?php checked('topLeft', $ngg_options['wmPos']); ?> /></td>
408
- <td><input type="radio" name="wmPos" value="topCenter" <?php checked('topCenter', $ngg_options['wmPos']); ?> /></td>
409
- <td><input type="radio" name="wmPos" value="topRight" <?php checked('topRight', $ngg_options['wmPos']); ?> /></td>
410
- </tr>
411
- <tr>
412
- <td><input type="radio" name="wmPos" value="midLeft" <?php checked('midLeft', $ngg_options['wmPos']); ?> /></td>
413
- <td><input type="radio" name="wmPos" value="midCenter" <?php checked('midCenter', $ngg_options['wmPos']); ?> /></td>
414
- <td><input type="radio" name="wmPos" value="midRight" <?php checked('midRight', $ngg_options['wmPos']); ?> /></td>
415
- </tr>
416
- <tr>
417
- <td><input type="radio" name="wmPos" value="botLeft" <?php checked('botLeft', $ngg_options['wmPos']); ?> /></td>
418
- <td><input type="radio" name="wmPos" value="botCenter" <?php checked('botCenter', $ngg_options['wmPos']); ?> /></td>
419
- <td><input type="radio" name="wmPos" value="botRight" <?php checked('botRight', $ngg_options['wmPos']); ?> /></td>
420
- </tr>
421
- </table>
422
- </td>
423
- <td valign="top">
424
- <strong><?php _e('Offset','nggallery') ?></strong><br />
425
- <table border="0">
426
- <tr>
427
- <td>x</td>
428
- <td><input type="text" name="wmXpos" value="<?php echo $ngg_options['wmXpos'] ?>" size="4" /> px</td>
429
- </tr>
430
- <tr>
431
- <td>y</td>
432
- <td><input type="text" name="wmYpos" value="<?php echo $ngg_options['wmYpos'] ?>" size="4" /> px</td>
433
- </tr>
434
- </table>
435
- </td>
436
- </tr>
437
- </table>
438
- </div>
439
- <fieldset class="options">
440
- <table class="optiontable" border="0">
441
  <tr>
442
- <td align="left" colspan="2"><label><input type="radio" name="wmType" value="image" <?php checked('image', $ngg_options['wmType']); ?> /> <?php _e('Use image as watermark','nggallery') ?></label></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  </tr>
 
 
 
 
 
444
  <tr>
445
  <th><?php _e('URL to file','nggallery') ?> :</th>
446
- <td><input type="text" size="40" name="wmPath" value="<?php echo $ngg_options['wmPath']; ?>" /><br />
447
  <?php if(!ini_get('allow_url_fopen')) _e('The accessing of URL files is disabled at your server (allow_url_fopen)','nggallery') ?> </td>
448
  </tr>
449
- <tr>
450
- <td colspan="2"><hr /></td>
451
- </tr>
452
- <tr>
453
- <td align="left" colspan="2"><label><input type="radio" name="wmType" value="text" <?php checked('text', $ngg_options['wmType']); ?> /> <?php _e('Use text as watermark','nggallery') ?></label></td>
454
- </tr>
455
  <tr>
456
  <th><?php _e('Font','nggallery') ?>:</th>
457
  <td><select name="wmFont" size="1"> <?php
458
  $fontlist = ngg_get_TTFfont();
459
  foreach ( $fontlist as $fontfile ) {
460
- echo "\n".'<option value="'.$fontfile.'" '.ngg_input_selected($fontfile, $ngg_options['wmFont']).' >'.$fontfile.'</option>';
461
  }
462
  ?>
463
- </select><br />
464
  <?php if ( !function_exists(ImageTTFBBox) )
465
  _e('This function will not work, cause you need the FreeType library','nggallery');
466
  else
467
  _e('You can upload more fonts in the folder <strong>nggallery/fonts</strong>','nggallery'); ?>
 
468
  </td>
469
  </tr>
470
  <tr>
471
  <th><?php _e('Size','nggallery') ?>:</th>
472
- <td><input type="text" name="wmSize" value="<?php echo $ngg_options['wmSize'] ?>" size="4" maxlength="2" /> px</td>
473
  </tr>
474
  <tr>
475
  <th><?php _e('Color','nggallery') ?>:</th>
476
- <td><input type="text" size="6" maxlength="6" id="wmColor" name="wmColor" onchange="setcolor('#previewText', this.value)" value="<?php echo $ngg_options['wmColor'] ?>" />
477
- <input type="text" size="1" readonly="readonly" id="previewText" style="background-color: #<?php echo $ngg_options['wmColor'] ?>" /> <?php _e('(hex w/o #)','nggallery') ?></td>
478
  </tr>
479
  <tr>
480
  <th valign="top"><?php _e('Text','nggallery') ?>:</th>
481
- <td><textarea name="wmText" cols="40" rows="4"><?php echo $ngg_options['wmText'] ?></textarea></td>
482
  </tr>
483
  <tr>
484
  <th><?php _e('Opaque','nggallery') ?>:</th>
485
- <td><input type="text" name="wmOpaque" value="<?php echo $ngg_options['wmOpaque'] ?>" size="3" maxlength="3" /> % </td>
486
  </tr>
487
  </table>
488
- </fieldset>
489
  <div class="clear"> &nbsp; </div>
490
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
491
  </form>
492
  </div>
493
 
@@ -498,105 +449,104 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
498
  <?php wp_nonce_field('ngg_settings') ?>
499
  <input type="hidden" name="page_options" value="irWidth,irHeight,irShuffle,irLinkfromdisplay,irShownavigation,irShowicons,irWatermark,irOverstretch,irRotatetime,irTransition,irKenburns,irBackcolor,irFrontcolor,irLightcolor,irScreencolor,irAudio,irXHTMLvalid" />
500
  <h2><?php _e('Slideshow','nggallery'); ?></h2>
501
- <fieldset class="options">
502
  <?php if (!NGGALLERY_IREXIST) { ?><p><div id="message" class="error fade"><p><?php _e('The imagerotator.swf is not in the nggallery folder, the slideshow will not work.','nggallery') ?></p></div></p><?php }?>
503
- <p><?php _e('The settings are used in the JW Image Rotator Version', 'nggallery') ?> 3.15.
504
- <?php _e('See more information for the Flash Player on the web page', 'nggallery') ?> <a href="http://www.jeroenwijering.com/?item=JW_Image_Rotator" target="_blank">JW Image Rotator from Jeroen Wijering</a>.</p>
505
- <table class="optiontable" border="0" >
 
506
  <tr>
507
  <th><?php _e('Default size (W x H)','nggallery') ?>:</th>
508
- <td><input type="text" size="3" maxlength="4" name="irWidth" value="<?php echo $ngg_options['irWidth'] ?>" /> x
509
- <input type="text" size="3" maxlength="4" name="irHeight" value="<?php echo $ngg_options['irHeight'] ?>" /></td>
510
  </tr>
511
  <tr>
512
  <th><?php _e('Shuffle mode','nggallery') ?>:</th>
513
- <td><input name="irShuffle" type="checkbox" value="1" <?php checked('1', $ngg_options['irShuffle']); ?> /></td>
514
  </tr>
515
  <tr>
516
  <th><?php _e('Show next image on click','nggallery') ?>:</th>
517
- <td><input name="irLinkfromdisplay" type="checkbox" value="1" <?php checked('1', $ngg_options['irLinkfromdisplay']); ?> /></td>
518
  </tr>
519
  <tr>
520
  <th><?php _e('Show navigation bar','nggallery') ?>:</th>
521
- <td><input name="irShownavigation" type="checkbox" value="1" <?php checked('1', $ngg_options['irShownavigation']); ?> /></td>
522
  </tr>
523
  <tr>
524
  <th><?php _e('Show loading icon','nggallery') ?>:</th>
525
- <td><input name="irShowicons" type="checkbox" value="1" <?php checked('1', $ngg_options['irShowicons']); ?> /></td>
526
  </tr>
527
  <tr>
528
  <th><?php _e('Use watermark logo','nggallery') ?>:</th>
529
- <td><input name="irWatermark" type="checkbox" value="1" <?php checked('1', $ngg_options['irWatermark']); ?> />
530
- <?php _e('You can change the logo at the watermark settings','nggallery') ?></td>
531
  </tr>
532
  <tr>
533
  <th><?php _e('Stretch image','nggallery') ?>:</th>
534
  <td>
535
  <select size="1" name="irOverstretch">
536
- <option value="true" <?php selected('true', $ngg_options['irOverstretch']); ?> ><?php _e('true', 'nggallery') ;?></option>
537
- <option value="false" <?php selected('false', $ngg_options['irOverstretch']); ?> ><?php _e('false', 'nggallery') ;?></option>
538
- <option value="fit" <?php selected('fit', $ngg_options['irOverstretch']); ?> ><?php _e('fit', 'nggallery') ;?></option>
539
- <option value="none" <?php selected('none', $ngg_options['irOverstretch']); ?> ><?php _e('none', 'nggallery') ;?></option>
540
  </select>
541
  </td>
542
  </tr>
543
  <tr>
544
  <th><?php _e('Duration time','nggallery') ?>:</th>
545
- <td><input type="text" size="3" maxlength="3" name="irRotatetime" value="<?php echo $ngg_options['irRotatetime'] ?>" /> <?php _e('sec.', 'nggallery') ;?></td>
546
  </tr>
547
  <tr>
548
  <th><?php _e('Transition / Fade effect','nggallery') ?>:</th>
549
  <td>
550
  <select size="1" name="irTransition">
551
- <option value="fade" <?php selected('fade', $ngg_options['irTransition']); ?> ><?php _e('fade', 'nggallery') ;?></option>
552
- <option value="bgfade" <?php selected('bgfade', $ngg_options['irTransition']); ?> ><?php _e('bgfade', 'nggallery') ;?></option>
553
- <option value="slowfade" <?php selected('slowfade', $ngg_options['irTransition']); ?> ><?php _e('slowfade', 'nggallery') ;?></option>
554
- <option value="circles" <?php selected('circles', $ngg_options['irTransition']); ?> ><?php _e('circles', 'nggallery') ;?></option>
555
- <option value="bubbles" <?php selected('bubbles', $ngg_options['irTransition']); ?> ><?php _e('bubbles', 'nggallery') ;?></option>
556
- <option value="blocks" <?php selected('blocks', $ngg_options['irTransition']); ?> ><?php _e('blocks', 'nggallery') ;?></option>
557
- <option value="fluids" <?php selected('fluids', $ngg_options['irTransition']); ?> ><?php _e('fluids', 'nggallery') ;?></option>
558
- <option value="flash" <?php selected('flash', $ngg_options['irTransition']); ?> ><?php _e('flash', 'nggallery') ;?></option>
559
- <option value="lines" <?php selected('lines', $ngg_options['irTransition']); ?> ><?php _e('lines', 'nggallery') ;?></option>
560
- <option value="random" <?php selected('random', $ngg_options['irTransition']); ?> ><?php _e('random', 'nggallery') ;?></option>
561
  </select>
562
  </tr>
563
  <tr>
564
  <th><?php _e('Use slow zooming effect','nggallery') ?>:</th>
565
- <td><input name="irKenburns" type="checkbox" value="1" <?php checked('1', $ngg_options['irKenburns']); ?> /></td>
566
  </tr>
567
  <tr>
568
  <th><?php _e('Background Color','nggallery') ?>:</th>
569
- <td><input type="text" size="6" maxlength="6" id="irBackcolor" name="irBackcolor" onchange="setcolor('#previewBack', this.value)" value="<?php echo $ngg_options['irBackcolor'] ?>" />
570
- <input type="text" size="1" readonly="readonly" id="previewBack" style="background-color: #<?php echo $ngg_options['irBackcolor'] ?>" /></td>
571
  </tr>
572
  <tr>
573
  <th><?php _e('Texts / Buttons Color','nggallery') ?>:</th>
574
- <td><input type="text" size="6" maxlength="6" id="irFrontcolor" name="irFrontcolor" onchange="setcolor('#previewFront', this.value)" value="<?php echo $ngg_options['irFrontcolor'] ?>" />
575
- <input type="text" size="1" readonly="readonly" id="previewFront" style="background-color: #<?php echo $ngg_options['irFrontcolor'] ?>" /></td>
576
  </tr>
577
  <tr>
578
  <th><?php _e('Rollover / Active Color','nggallery') ?>:</th>
579
- <td><input type="text" size="6" maxlength="6" id="irLightcolor" name="irLightcolor" onchange="setcolor('#previewLight', this.value)" value="<?php echo $ngg_options['irLightcolor'] ?>" />
580
- <input type="text" size="1" readonly="readonly" id="previewLight" style="background-color: #<?php echo $ngg_options['irLightcolor'] ?>" /></td>
581
  </tr>
582
  <tr>
583
  <th><?php _e('Screen Color','nggallery') ?>:</th>
584
- <td><input type="text" size="6" maxlength="6" id="irScreencolor" name="irScreencolor" onchange="setcolor('#previewScreen', this.value)" value="<?php echo $ngg_options['irScreencolor'] ?>" />
585
- <input type="text" size="1" readonly="readonly" id="previewScreen" style="background-color: #<?php echo $ngg_options['irScreencolor'] ?>" /></td>
586
  </tr>
587
  <tr>
588
  <th><?php _e('Background music (URL)','nggallery') ?>:</th>
589
- <td><input type="text" size="50" id="irAudio" name="irAudio" value="<?php echo $ngg_options['irAudio'] ?>" /></td>
590
  </tr>
591
  <tr>
592
  <th><?php _e('Try XHTML validation (with CDATA)','nggallery') ?>:</th>
593
- <td><input name="irXHTMLvalid" type="checkbox" value="1" <?php checked('1', $ngg_options['irXHTMLvalid']); ?> />
594
- <?php _e('Important : Could causes problem at some browser. Please recheck your page.','nggallery') ?></td>
595
  </tr>
596
  </table>
597
  <div class="clear"> &nbsp; </div>
598
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
599
- </fieldset>
600
  </form>
601
  </div>
602
  </div>
@@ -609,7 +559,7 @@ function ngg_get_TTFfont() {
609
  $ttf_fonts = array ();
610
 
611
  // Files in wp-content/plugins/nggallery/fonts directory
612
- $plugin_root = NGGALLERY_ABSPATH."fonts";
613
 
614
  $plugins_dir = @ dir($plugin_root);
615
  if ($plugins_dir) {
3
 
4
  function nggallery_admin_options() {
5
 
6
+ global $wpdb, $ngg, $nggRewrite;
7
 
8
+ $old_state = $ngg->options['usePermalinks'];
 
 
9
 
10
  // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
11
+ $filepath = admin_url() . 'admin.php?page='.$_GET['page'];
12
 
13
  if ( isset($_POST['updateoption']) ) {
14
  check_admin_referer('ngg_settings');
20
  $option = trim($option);
21
  $value = trim($_POST[$option]);
22
  // $value = sanitize_option($option, $value); // This does stripslashes on those that need it
23
+ $ngg->options[$option] = $value;
24
  }
25
+ // the path should always end with a slash
26
+ $ngg->options['gallerypath'] = trailingslashit($ngg->options['gallerypath']);
27
+ $ngg->options['imageMagickDir'] = trailingslashit($ngg->options['imageMagickDir']);
28
  }
29
+ // Save options
30
+ update_option('ngg_options', $ngg->options);
31
+
32
  // Flush ReWrite rules
33
+ if ( $old_state != $ngg->options['usePermalinks'] )
34
  $nggRewrite->flush();
35
+
36
+ nggGallery::show_message(__('Update Successfully','nggallery'));
 
37
  }
38
 
39
  if ( isset($_POST['clearcache']) ) {
40
 
41
+ $path = WINABSPATH . $ngg->options['gallerypath'] . "cache/";
42
 
43
  if (is_dir($path))
44
  if ($handle = opendir($path)) {
45
  while (false !== ($file = readdir($handle))) {
46
  if ($file != '.' && $file != '..') {
47
+ @unlink($path . '/' . $file);
48
  }
49
  }
50
  closedir($handle);
51
  }
52
+
53
+ nggGallery::show_message(__('Cache cleared','nggallery'));
54
  }
55
  // message windows
56
  if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
57
+
58
  ?>
 
 
 
 
59
  <script type="text/javascript">
60
  jQuery(function() {
61
+ jQuery('#slider > ul').tabs({ fxFade: true, fxSpeed: 'fast' });
62
  });
63
 
64
  function insertcode(value) {
81
  jQuery('#tbImage').hide("slow");
82
  break;
83
  case "shutter":
84
+ effectcode = 'class="shutterset_%GALLERY_NAME%"';
85
  jQuery('#tbImage').hide("slow");
86
  break;
87
  default:
101
  <li><a href="#generaloptions"><?php _e('General Options', 'nggallery') ;?></a></li>
102
  <li><a href="#thumbnails"><?php _e('Thumbnails', 'nggallery') ;?></a></li>
103
  <li><a href="#images"><?php _e('Images', 'nggallery') ;?></a></li>
104
+ <li><a href="#gallery"><?php echo __ngettext( 'Gallery', 'Galleries', 1, 'nggallery' ) ;?></a></li>
105
  <li><a href="#effects"><?php _e('Effects', 'nggallery') ;?></a></li>
106
  <li><a href="#watermark"><?php _e('Watermark', 'nggallery') ;?></a></li>
107
  <li><a href="#slideshow"><?php _e('Slideshow', 'nggallery') ;?></a></li>
113
  <h2><?php _e('General Options','nggallery'); ?></h2>
114
  <form name="generaloptions" method="post">
115
  <?php wp_nonce_field('ngg_settings') ?>
116
+ <input type="hidden" name="page_options" value="gallerypath,deleteImg,usePicLens,usePermalinks,graphicLibrary,imageMagickDir,activateTags,appendType,maxImages" />
117
+ <table class="form-table ngg-options">
 
118
  <tr valign="top">
119
  <th align="left"><?php _e('Gallery path','nggallery') ?></th>
120
+ <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="35" name="gallerypath" value="<?php echo $ngg->options['gallerypath']; ?>" />
121
+ <span class="setting-description"><?php _e('This is the default path for all galleries','nggallery') ?></span></td>
 
 
 
 
 
 
 
122
  </tr>
 
123
  <tr valign="top">
124
  <th align="left"><?php _e('Delete image files','nggallery') ?></th>
125
+ <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="checkbox" name="deleteImg" value="1" <?php checked('1', $ngg->options['deleteImg']); ?> />
126
  <?php _e('Delete files, when removing a gallery in the database','nggallery') ?></td>
127
  </tr>
128
  <tr valign="top">
129
  <th align="left"><?php _e('Activate permalinks','nggallery') ?></th>
130
+ <td><input type="checkbox" name="usePermalinks" value="1" <?php checked('1', $ngg->options['usePermalinks']); ?> />
131
  <?php _e('When you activate this option, you need to update your permalink structure one time.','nggallery') ?></td>
132
  </tr>
133
+ <tr>
134
+ <th valign="top"><?php _e('Select graphic library','nggallery') ?>:</th>
135
+ <td><label><input name="graphicLibrary" type="radio" value="gd" <?php checked('gd', $ngg->options['graphicLibrary']); ?> /> <?php _e('GD Library', 'nggallery') ;?></label><br />
136
+ <label><input name="graphicLibrary" type="radio" value="im" <?php checked('im', $ngg->options['graphicLibrary']); ?> /> <?php _e('ImageMagick (Experimental). Path to the library :', 'nggallery') ;?>&nbsp;
137
+ <input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="35" name="imageMagickDir" value="<?php echo $ngg->options['imageMagickDir']; ?>" /></label>
138
+ </td>
139
+ </tr>
140
+ <tr>
141
+ <th align="left"><?php _e('Activate PicLens/CoolIris support','nggallery') ?> (<a href="http://www.cooliris.com">CoolIris</a>)</th>
142
+ <td><input type="checkbox" name="usePicLens" value="1" <?php checked('1', $ngg->options['usePicLens']); ?> />
143
+ <span class="setting-description"><?php _e('When you activate this option, some javascript is added to your site footer. Make sure that wp_footer is called in your theme.','nggallery') ?></span></td>
144
+ </tr>
145
  </table>
146
+ <h3><?php _e('Tags / Categories','nggallery') ?></h3>
147
+ <table class="form-table ngg-options">
148
  <tr>
149
  <th valign="top"><?php _e('Activate related images','nggallery') ?>:</th>
150
+ <td><input name="activateTags" type="checkbox" value="1" <?php checked('1', $ngg->options['activateTags']); ?> />
151
  <?php _e('This option will append related images to every post','nggallery') ?>
152
  </td>
153
  </tr>
154
  <tr>
155
  <th valign="top"><?php _e('Match with','nggallery') ?>:</th>
156
+ <td><label><input name="appendType" type="radio" value="category" <?php checked('category', $ngg->options['appendType']); ?> /> <?php _e('Categories', 'nggallery') ;?></label><br />
157
+ <label><input name="appendType" type="radio" value="tags" <?php checked('tags', $ngg->options['appendType']); ?> /> <?php _e('Tags', 'nggallery') ;?></label>
158
  </td>
159
  </tr>
160
  <tr>
161
  <th valign="top"><?php _e('Max. number of images','nggallery') ?>:</th>
162
+ <td><input type="text" name="maxImages" value="<?php echo $ngg->options['maxImages'] ?>" size="3" maxlength="3" />
163
+ <span class="setting-description"><?php _e('0 will show all images','nggallery') ?></span>
164
  </td>
165
  </tr>
166
  </table>
167
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
 
168
  </form>
169
  </div>
170
 
174
  <h2><?php _e('Thumbnail settings','nggallery'); ?></h2>
175
  <form name="thumbnailsettings" method="POST" action="<?php echo $filepath.'#thumbnails'; ?>" >
176
  <?php wp_nonce_field('ngg_settings') ?>
177
+ <input type="hidden" name="page_options" value="thumbwidth,thumbheight,thumbfix,thumbcrop,thumbquality" />
 
178
  <p><?php _e('Please note : If you change the settings, you need to recreate the thumbnails under -> Manage Gallery .', 'nggallery') ?></p>
179
+ <table class="form-table ngg-options">
180
  <tr valign="top">
181
  <th align="left"><?php _e('Width x height (in pixel)','nggallery') ?></th>
182
+ <td><input type="text" size="4" maxlength="4" name="thumbwidth" value="<?php echo $ngg->options['thumbwidth']; ?>" /> x <input type="text" size="4" maxlength="4" name="thumbheight" value="<?php echo $ngg->options['thumbheight']; ?>" />
183
+ <span class="setting-description"><?php _e('These values are maximum values ','nggallery') ?></span></td>
184
  </tr>
185
  <tr valign="top">
186
  <th align="left"><?php _e('Set fix dimension','nggallery') ?></th>
187
+ <td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg->options['thumbfix']); ?> />
188
  <?php _e('Ignore the aspect ratio, no portrait thumbnails','nggallery') ?></td>
189
  </tr>
190
  <tr valign="top">
191
  <th align="left"><?php _e('Crop square thumbnail from image','nggallery') ?></th>
192
+ <td><input type="checkbox" name="thumbcrop" value="1" <?php checked('1', $ngg->options['thumbcrop']); ?> />
193
+ <?php _e('Create square thumbnails, use only the width setting :','nggallery') ?> <?php echo $ngg->options['thumbwidth']; ?> x <?php echo $ngg->options['thumbwidth']; ?></td>
194
  </tr>
195
  <tr valign="top">
196
  <th align="left"><?php _e('Thumbnail quality','nggallery') ?></th>
197
+ <td><input type="text" size="3" maxlength="3" name="thumbquality" value="<?php echo $ngg->options['thumbquality']; ?>" /> %</td>
 
 
 
 
 
198
  </tr>
199
  </table>
200
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
 
201
  </form>
202
  </div>
203
 
207
  <h2><?php _e('Image settings','nggallery'); ?></h2>
208
  <form name="imagesettings" method="POST" action="<?php echo $filepath.'#images'; ?>" >
209
  <?php wp_nonce_field('ngg_settings') ?>
210
+ <input type="hidden" name="page_options" value="imgResize,imgWidth,imgHeight,imgQuality,imgCacheSinglePic" />
211
+ <table class="form-table ngg-options">
 
212
  <tr valign="top">
213
  <th scope="row"><label for="fixratio"><?php _e('Resize Images','nggallery') ?></label></th>
214
  <!--TODO: checkbox fixratio can be used later -->
215
+ <td><input type="hidden" name="imgResize" value="1" <?php checked('1', $ngg->options['imgResize']); ?> /> </td>
216
+ <td><input type="text" size="5" name="imgWidth" value="<?php echo $ngg->options['imgWidth']; ?>" /> x <input type="text" size="5" name="imgHeight" value="<?php echo $ngg->options['imgHeight']; ?>" />
217
+ <span class="setting-description"><?php _e('Width x height (in pixel). NextGEN Gallery will keep ratio size','nggallery') ?></span></td>
218
  </tr>
219
  <tr valign="top">
220
  <th align="left"><?php _e('Image quality','nggallery') ?></th>
221
  <td></td>
222
+ <td><input type="text" size="3" maxlength="3" name="imgQuality" value="<?php echo $ngg->options['imgQuality']; ?>" /> %</td>
 
 
 
 
 
 
223
  </tr>
224
  </table>
225
+ <h3><?php _e('Single picture','nggallery') ?></h3>
226
+ <table class="form-table ngg-options">
227
  <tr valign="top">
228
  <th align="left"><?php _e('Cache single pictures','nggallery') ?></th>
229
  <td></td>
230
+ <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="checkbox" name="imgCacheSinglePic" value="1" <?php checked('1', $ngg->options['imgCacheSinglePic']); ?> />
231
+ <span class="setting-description"><?php _e('Creates a file for each singlepic settings. Reduce the CPU load','nggallery') ?></span></td>
232
  </tr>
233
  <tr valign="top">
234
  <th align="left"><?php _e('Clear cache folder','nggallery') ?></th>
235
  <td></td>
236
+ <td><input type="submit" name="clearcache" class="button-secondary" value="<?php _e('Proceed now','nggallery') ;?> &raquo;"/></td>
237
  </tr>
238
  </table>
239
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
 
240
  </form>
241
  </div>
242
 
246
  <h2><?php _e('Gallery settings','nggallery'); ?></h2>
247
  <form name="galleryform" method="POST" action="<?php echo $filepath.'#gallery'; ?>" >
248
  <?php wp_nonce_field('ngg_settings') ?>
249
+ <input type="hidden" name="page_options" value="galNoPages,galImages,galShowSlide,galTextSlide,galTextGallery,galShowOrder,galImgBrowser,galSort,galSortDir" />
250
+ <table class="form-table ngg-options">
 
 
 
 
 
 
 
 
 
 
251
  <tr>
252
  <th valign="top"><?php _e('Deactivate gallery page link','nggallery') ?>:</th>
253
+ <td><input name="galNoPages" type="checkbox" value="1" <?php checked('1', $ngg->options['galNoPages']); ?> />
254
  <?php _e('The album will not link to a gallery subpage. The gallery is shown on the same page.','nggallery') ?>
255
  </td>
256
  </tr>
257
  <tr>
258
  <th valign="top"><?php _e('Number of images per page','nggallery') ?>:</th>
259
+ <td><input type="text" name="galImages" value="<?php echo $ngg->options['galImages'] ?>" size="3" maxlength="3" />
260
+ <span class="setting-description"><?php _e('0 will disable pagination, all images on one page','nggallery') ?></span>
261
  </td>
262
  </tr>
263
  <tr>
264
  <th valign="top"><?php _e('Integrate slideshow','nggallery') ?>:</th>
265
+ <td><input name="galShowSlide" type="checkbox" value="1" <?php checked('1', $ngg->options['galShowSlide']); ?> />
266
+ <input type="text" name="galTextSlide" value="<?php echo $ngg->options['galTextSlide'] ?>" size="20" />
267
+ <input type="text" name="galTextGallery" value="<?php echo $ngg->options['galTextGallery'] ?>" size="20" />
268
  </td>
269
  </tr>
270
  <tr>
271
  <th valign="top"><?php _e('Show first','nggallery') ?>:</th>
272
+ <td><label><input name="galShowOrder" type="radio" value="gallery" <?php checked('gallery', $ngg->options['galShowOrder']); ?> /> <?php _e('Thumbnails', 'nggallery') ;?></label><br />
273
+ <label><input name="galShowOrder" type="radio" value="slide" <?php checked('slide', $ngg->options['galShowOrder']); ?> /> <?php _e('Slideshow', 'nggallery') ;?></label>
 
 
 
 
 
 
 
274
  </td>
275
  </tr>
276
  <tr>
277
  <th valign="top"><?php _e('Show ImageBrowser','nggallery') ?>:</th>
278
+ <td><input name="galImgBrowser" type="checkbox" value="1" <?php checked('1', $ngg->options['galImgBrowser']); ?> />
279
  <?php _e('The gallery will open the ImageBrowser instead the effect.','nggallery') ?>
280
  </td>
281
  </tr>
282
  </table>
283
+ <h3><?php _e('Sort options','nggallery') ?></h3>
284
+ <table class="form-table ngg-options">
285
  <tr>
286
  <th valign="top"><?php _e('Sort thumbnails','nggallery') ?>:</th>
287
  <td>
288
+ <label><input name="galSort" type="radio" value="sortorder" <?php checked('sortorder', $ngg->options['galSort']); ?> /> <?php _e('Custom order', 'nggallery') ;?></label><br />
289
+ <label><input name="galSort" type="radio" value="pid" <?php checked('pid', $ngg->options['galSort']); ?> /> <?php _e('Image ID', 'nggallery') ;?></label><br />
290
+ <label><input name="galSort" type="radio" value="filename" <?php checked('filename', $ngg->options['galSort']); ?> /> <?php _e('File name', 'nggallery') ;?></label><br />
291
+ <label><input name="galSort" type="radio" value="alttext" <?php checked('alttext', $ngg->options['galSort']); ?> /> <?php _e('Alt / Title text', 'nggallery') ;?></label><br />
292
+ <label><input name="galSort" type="radio" value="imagedate" <?php checked('imagedate', $ngg->options['galSort']); ?> /> <?php _e('Date / Time', 'nggallery') ;?></label>
293
  </td>
294
  </tr>
295
  <tr>
296
  <th valign="top"><?php _e('Sort direction','nggallery') ?>:</th>
297
+ <td><label><input name="galSortDir" type="radio" value="ASC" <?php checked('ASC', $ngg->options['galSortDir']); ?> /> <?php _e('Ascending', 'nggallery') ;?></label><br />
298
+ <label><input name="galSortDir" type="radio" value="DESC" <?php checked('DESC', $ngg->options['galSortDir']); ?> /> <?php _e('Descending', 'nggallery') ;?></label>
299
  </td>
300
  </tr>
301
  </table>
302
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
 
303
  </form>
304
  </div>
305
 
309
  <h2><?php _e('Effects','nggallery'); ?></h2>
310
  <form name="effectsform" method="POST" action="<?php echo $filepath.'#effects'; ?>" >
311
  <?php wp_nonce_field('ngg_settings') ?>
312
+ <input type="hidden" name="page_options" value="thumbEffect,thumbCode" />
313
  <p><?php _e('Here you can select the thumbnail effect, NextGEN Gallery will integrate the required HTML code in the images. Please note that only the Thickbox effect will automatic added to your theme.','nggallery'); ?>
314
  <?php _e('With the placeholder','nggallery'); ?><strong> %GALLERY_NAME% </strong> <?php _e('you can activate a navigation through the images (depend on the effect). Change the code line only , when you use a different thumbnail effect or you know what you do.','nggallery'); ?></p>
315
+ <table class="form-table ngg-options">
 
316
  <tr valign="top">
317
  <th><?php _e('JavaScript Thumbnail effect','nggallery') ?>:</th>
318
  <td>
319
  <select size="1" id="thumbEffect" name="thumbEffect" onchange="insertcode(this.value)">
320
+ <option value="none" <?php selected('none', $ngg->options['thumbEffect']); ?> ><?php _e('None', 'nggallery') ;?></option>
321
+ <option value="thickbox" <?php selected('thickbox', $ngg->options['thumbEffect']); ?> ><?php _e('Thickbox', 'nggallery') ;?></option>
322
+ <option value="lightbox" <?php selected('lightbox', $ngg->options['thumbEffect']); ?> ><?php _e('Lightbox', 'nggallery') ;?></option>
323
+ <option value="highslide" <?php selected('highslide', $ngg->options['thumbEffect']); ?> ><?php _e('Highslide', 'nggallery') ;?></option>
324
+ <option value="shutter" <?php selected('shutter', $ngg->options['thumbEffect']); ?> ><?php _e('Shutter', 'nggallery') ;?></option>
325
+ <option value="custom" <?php selected('custom', $ngg->options['thumbEffect']); ?> ><?php _e('Custom', 'nggallery') ;?></option>
326
  </select>
327
  </td>
328
  </tr>
329
  <tr valign="top">
330
  <th><?php _e('Link Code line','nggallery') ?> :</th>
331
+ <td><textarea id="thumbCode" name="thumbCode" cols="50" rows="5"><?php echo htmlspecialchars(stripslashes($ngg->options['thumbCode'])); ?></textarea></td>
332
  </tr>
333
  </table>
334
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  </form>
336
  </div>
337
 
349
  <form name="watermarkform" method="POST" action="<?php echo $filepath.'#watermark'; ?>" >
350
  <?php wp_nonce_field('ngg_settings') ?>
351
  <input type="hidden" name="page_options" value="wmPos,wmXpos,wmYpos,wmType,wmPath,wmFont,wmSize,wmColor,wmText,wmOpaque" />
352
+ <div id="wm-preview">
353
  <h3><?php _e('Preview','nggallery') ?></h3>
354
+ <p style="text-align:center;"><?php echo $imageURL; ?></p>
355
  <h3><?php _e('Position','nggallery') ?></h3>
356
+ <div>
357
+ <table id="wm-position">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  <tr>
359
+ <td valign="top">
360
+ <strong><?php _e('Position','nggallery') ?></strong>
361
+ <table border="1">
362
+ <tr>
363
+ <td><input type="radio" name="wmPos" value="topLeft" <?php checked('topLeft', $ngg->options['wmPos']); ?> /></td>
364
+ <td><input type="radio" name="wmPos" value="topCenter" <?php checked('topCenter', $ngg->options['wmPos']); ?> /></td>
365
+ <td><input type="radio" name="wmPos" value="topRight" <?php checked('topRight', $ngg->options['wmPos']); ?> /></td>
366
+ </tr>
367
+ <tr>
368
+ <td><input type="radio" name="wmPos" value="midLeft" <?php checked('midLeft', $ngg->options['wmPos']); ?> /></td>
369
+ <td><input type="radio" name="wmPos" value="midCenter" <?php checked('midCenter', $ngg->options['wmPos']); ?> /></td>
370
+ <td><input type="radio" name="wmPos" value="midRight" <?php checked('midRight', $ngg->options['wmPos']); ?> /></td>
371
+ </tr>
372
+ <tr>
373
+ <td><input type="radio" name="wmPos" value="botLeft" <?php checked('botLeft', $ngg->options['wmPos']); ?> /></td>
374
+ <td><input type="radio" name="wmPos" value="botCenter" <?php checked('botCenter', $ngg->options['wmPos']); ?> /></td>
375
+ <td><input type="radio" name="wmPos" value="botRight" <?php checked('botRight', $ngg->options['wmPos']); ?> /></td>
376
+ </tr>
377
+ </table>
378
+ </td>
379
+ <td valign="top">
380
+ <strong><?php _e('Offset','nggallery') ?></strong>
381
+ <table border="0">
382
+ <tr>
383
+ <td>x</td>
384
+ <td><input type="text" name="wmXpos" value="<?php echo $ngg->options['wmXpos'] ?>" size="4" /> px</td>
385
+ </tr>
386
+ <tr>
387
+ <td>y</td>
388
+ <td><input type="text" name="wmYpos" value="<?php echo $ngg->options['wmYpos'] ?>" size="4" /> px</td>
389
+ </tr>
390
+ </table>
391
+ </td>
392
  </tr>
393
+ </table>
394
+ </div>
395
+ </div>
396
+ <h3><label><input type="radio" name="wmType" value="image" <?php checked('image', $ngg->options['wmType']); ?> /> <?php _e('Use image as watermark','nggallery') ?></label></h3>
397
+ <table class="wm-table form-table">
398
  <tr>
399
  <th><?php _e('URL to file','nggallery') ?> :</th>
400
+ <td><input type="text" size="40" name="wmPath" value="<?php echo $ngg->options['wmPath']; ?>" /><br />
401
  <?php if(!ini_get('allow_url_fopen')) _e('The accessing of URL files is disabled at your server (allow_url_fopen)','nggallery') ?> </td>
402
  </tr>
403
+ </table>
404
+ <h3><label><input type="radio" name="wmType" value="text" <?php checked('text', $ngg->options['wmType']); ?> /> <?php _e('Use text as watermark','nggallery') ?></label></h3>
405
+ <table class="wm-table form-table">
 
 
 
406
  <tr>
407
  <th><?php _e('Font','nggallery') ?>:</th>
408
  <td><select name="wmFont" size="1"> <?php
409
  $fontlist = ngg_get_TTFfont();
410
  foreach ( $fontlist as $fontfile ) {
411
+ echo "\n".'<option value="'.$fontfile.'" '.ngg_input_selected($fontfile, $ngg->options['wmFont']).' >'.$fontfile.'</option>';
412
  }
413
  ?>
414
+ </select><br /><span class="setting-description">
415
  <?php if ( !function_exists(ImageTTFBBox) )
416
  _e('This function will not work, cause you need the FreeType library','nggallery');
417
  else
418
  _e('You can upload more fonts in the folder <strong>nggallery/fonts</strong>','nggallery'); ?>
419
+ </span>
420
  </td>
421
  </tr>
422
  <tr>
423
  <th><?php _e('Size','nggallery') ?>:</th>
424
+ <td><input type="text" name="wmSize" value="<?php echo $ngg->options['wmSize'] ?>" size="4" maxlength="2" /> px</td>
425
  </tr>
426
  <tr>
427
  <th><?php _e('Color','nggallery') ?>:</th>
428
+ <td><input type="text" size="6" maxlength="6" id="wmColor" name="wmColor" onchange="setcolor('#previewText', this.value)" value="<?php echo $ngg->options['wmColor'] ?>" />
429
+ <input type="text" size="1" readonly="readonly" id="previewText" style="background-color: #<?php echo $ngg->options['wmColor'] ?>" /> <?php _e('(hex w/o #)','nggallery') ?></td>
430
  </tr>
431
  <tr>
432
  <th valign="top"><?php _e('Text','nggallery') ?>:</th>
433
+ <td><textarea name="wmText" cols="40" rows="4"><?php echo $ngg->options['wmText'] ?></textarea></td>
434
  </tr>
435
  <tr>
436
  <th><?php _e('Opaque','nggallery') ?>:</th>
437
+ <td><input type="text" name="wmOpaque" value="<?php echo $ngg->options['wmOpaque'] ?>" size="3" maxlength="3" /> % </td>
438
  </tr>
439
  </table>
 
440
  <div class="clear"> &nbsp; </div>
441
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
442
  </form>
443
  </div>
444
 
449
  <?php wp_nonce_field('ngg_settings') ?>
450
  <input type="hidden" name="page_options" value="irWidth,irHeight,irShuffle,irLinkfromdisplay,irShownavigation,irShowicons,irWatermark,irOverstretch,irRotatetime,irTransition,irKenburns,irBackcolor,irFrontcolor,irLightcolor,irScreencolor,irAudio,irXHTMLvalid" />
451
  <h2><?php _e('Slideshow','nggallery'); ?></h2>
 
452
  <?php if (!NGGALLERY_IREXIST) { ?><p><div id="message" class="error fade"><p><?php _e('The imagerotator.swf is not in the nggallery folder, the slideshow will not work.','nggallery') ?></p></div></p><?php }?>
453
+ <p><?php _e('The settings are used in the JW Image Rotator Version', 'nggallery') ?> 3.17 .
454
+ <?php _e('See more information for the Flash Player on the web page', 'nggallery') ?> <a href="http://www.jeroenwijering.com/?item=JW_Image_Rotator" target="_blank" >JW Image Rotator from Jeroen Wijering</a>.
455
+ </p>
456
+ <table class="form-table ngg-options">
457
  <tr>
458
  <th><?php _e('Default size (W x H)','nggallery') ?>:</th>
459
+ <td><input type="text" size="3" maxlength="4" name="irWidth" value="<?php echo $ngg->options['irWidth'] ?>" /> x
460
+ <input type="text" size="3" maxlength="4" name="irHeight" value="<?php echo $ngg->options['irHeight'] ?>" /></td>
461
  </tr>
462
  <tr>
463
  <th><?php _e('Shuffle mode','nggallery') ?>:</th>
464
+ <td><input name="irShuffle" type="checkbox" value="1" <?php checked('1', $ngg->options['irShuffle']); ?> /></td>
465
  </tr>
466
  <tr>
467
  <th><?php _e('Show next image on click','nggallery') ?>:</th>
468
+ <td><input name="irLinkfromdisplay" type="checkbox" value="1" <?php checked('1', $ngg->options['irLinkfromdisplay']); ?> /></td>
469
  </tr>
470
  <tr>
471
  <th><?php _e('Show navigation bar','nggallery') ?>:</th>
472
+ <td><input name="irShownavigation" type="checkbox" value="1" <?php checked('1', $ngg->options['irShownavigation']); ?> /></td>
473
  </tr>
474
  <tr>
475
  <th><?php _e('Show loading icon','nggallery') ?>:</th>
476
+ <td><input name="irShowicons" type="checkbox" value="1" <?php checked('1', $ngg->options['irShowicons']); ?> /></td>
477
  </tr>
478
  <tr>
479
  <th><?php _e('Use watermark logo','nggallery') ?>:</th>
480
+ <td><input name="irWatermark" type="checkbox" value="1" <?php checked('1', $ngg->options['irWatermark']); ?> />
481
+ <span class="setting-description"><?php _e('You can change the logo at the watermark settings','nggallery') ?></span></td>
482
  </tr>
483
  <tr>
484
  <th><?php _e('Stretch image','nggallery') ?>:</th>
485
  <td>
486
  <select size="1" name="irOverstretch">
487
+ <option value="true" <?php selected('true', $ngg->options['irOverstretch']); ?> ><?php _e('true', 'nggallery') ;?></option>
488
+ <option value="false" <?php selected('false', $ngg->options['irOverstretch']); ?> ><?php _e('false', 'nggallery') ;?></option>
489
+ <option value="fit" <?php selected('fit', $ngg->options['irOverstretch']); ?> ><?php _e('fit', 'nggallery') ;?></option>
490
+ <option value="none" <?php selected('none', $ngg->options['irOverstretch']); ?> ><?php _e('none', 'nggallery') ;?></option>
491
  </select>
492
  </td>
493
  </tr>
494
  <tr>
495
  <th><?php _e('Duration time','nggallery') ?>:</th>
496
+ <td><input type="text" size="3" maxlength="3" name="irRotatetime" value="<?php echo $ngg->options['irRotatetime'] ?>" /> <?php _e('sec.', 'nggallery') ;?></td>
497
  </tr>
498
  <tr>
499
  <th><?php _e('Transition / Fade effect','nggallery') ?>:</th>
500
  <td>
501
  <select size="1" name="irTransition">
502
+ <option value="fade" <?php selected('fade', $ngg->options['irTransition']); ?> ><?php _e('fade', 'nggallery') ;?></option>
503
+ <option value="bgfade" <?php selected('bgfade', $ngg->options['irTransition']); ?> ><?php _e('bgfade', 'nggallery') ;?></option>
504
+ <option value="slowfade" <?php selected('slowfade', $ngg->options['irTransition']); ?> ><?php _e('slowfade', 'nggallery') ;?></option>
505
+ <option value="circles" <?php selected('circles', $ngg->options['irTransition']); ?> ><?php _e('circles', 'nggallery') ;?></option>
506
+ <option value="bubbles" <?php selected('bubbles', $ngg->options['irTransition']); ?> ><?php _e('bubbles', 'nggallery') ;?></option>
507
+ <option value="blocks" <?php selected('blocks', $ngg->options['irTransition']); ?> ><?php _e('blocks', 'nggallery') ;?></option>
508
+ <option value="fluids" <?php selected('fluids', $ngg->options['irTransition']); ?> ><?php _e('fluids', 'nggallery') ;?></option>
509
+ <option value="flash" <?php selected('flash', $ngg->options['irTransition']); ?> ><?php _e('flash', 'nggallery') ;?></option>
510
+ <option value="lines" <?php selected('lines', $ngg->options['irTransition']); ?> ><?php _e('lines', 'nggallery') ;?></option>
511
+ <option value="random" <?php selected('random', $ngg->options['irTransition']); ?> ><?php _e('random', 'nggallery') ;?></option>
512
  </select>
513
  </tr>
514
  <tr>
515
  <th><?php _e('Use slow zooming effect','nggallery') ?>:</th>
516
+ <td><input name="irKenburns" type="checkbox" value="1" <?php checked('1', $ngg->options['irKenburns']); ?> /></td>
517
  </tr>
518
  <tr>
519
  <th><?php _e('Background Color','nggallery') ?>:</th>
520
+ <td><input type="text" size="6" maxlength="6" id="irBackcolor" name="irBackcolor" onchange="setcolor('#previewBack', this.value)" value="<?php echo $ngg->options['irBackcolor'] ?>" />
521
+ <input type="text" size="1" readonly="readonly" id="previewBack" style="background-color: #<?php echo $ngg->options['irBackcolor'] ?>" /></td>
522
  </tr>
523
  <tr>
524
  <th><?php _e('Texts / Buttons Color','nggallery') ?>:</th>
525
+ <td><input type="text" size="6" maxlength="6" id="irFrontcolor" name="irFrontcolor" onchange="setcolor('#previewFront', this.value)" value="<?php echo $ngg->options['irFrontcolor'] ?>" />
526
+ <input type="text" size="1" readonly="readonly" id="previewFront" style="background-color: #<?php echo $ngg->options['irFrontcolor'] ?>" /></td>
527
  </tr>
528
  <tr>
529
  <th><?php _e('Rollover / Active Color','nggallery') ?>:</th>
530
+ <td><input type="text" size="6" maxlength="6" id="irLightcolor" name="irLightcolor" onchange="setcolor('#previewLight', this.value)" value="<?php echo $ngg->options['irLightcolor'] ?>" />
531
+ <input type="text" size="1" readonly="readonly" id="previewLight" style="background-color: #<?php echo $ngg->options['irLightcolor'] ?>" /></td>
532
  </tr>
533
  <tr>
534
  <th><?php _e('Screen Color','nggallery') ?>:</th>
535
+ <td><input type="text" size="6" maxlength="6" id="irScreencolor" name="irScreencolor" onchange="setcolor('#previewScreen', this.value)" value="<?php echo $ngg->options['irScreencolor'] ?>" />
536
+ <input type="text" size="1" readonly="readonly" id="previewScreen" style="background-color: #<?php echo $ngg->options['irScreencolor'] ?>" /></td>
537
  </tr>
538
  <tr>
539
  <th><?php _e('Background music (URL)','nggallery') ?>:</th>
540
+ <td><input type="text" size="50" id="irAudio" name="irAudio" value="<?php echo $ngg->options['irAudio'] ?>" /></td>
541
  </tr>
542
  <tr>
543
  <th><?php _e('Try XHTML validation (with CDATA)','nggallery') ?>:</th>
544
+ <td><input name="irXHTMLvalid" type="checkbox" value="1" <?php checked('1', $ngg->options['irXHTMLvalid']); ?> />
545
+ <span class="setting-description"><?php _e('Important : Could causes problem at some browser. Please recheck your page.','nggallery') ?></span></td>
546
  </tr>
547
  </table>
548
  <div class="clear"> &nbsp; </div>
549
+ <div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php _e('Save Changes') ;?>"/></div>
 
550
  </form>
551
  </div>
552
  </div>
559
  $ttf_fonts = array ();
560
 
561
  // Files in wp-content/plugins/nggallery/fonts directory
562
+ $plugin_root = NGGALLERY_ABSPATH . 'fonts';
563
 
564
  $plugins_dir = @ dir($plugin_root);
565
  if ($plugins_dir) {
admin/setup.php CHANGED
@@ -2,46 +2,30 @@
2
  if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
 
4
  function nggallery_admin_setup() {
5
- global $wpdb;
6
 
7
  if (isset($_POST['resetdefault'])) {
8
  check_admin_referer('ngg_uninstall');
 
 
9
 
10
  ngg_default_options();
11
-
12
- $messagetext = '<font color="green">'.__('Reset all settings to default parameter','nggallery').'</font>';
 
13
  }
14
 
15
  if (isset($_POST['uninstall'])) {
16
 
17
  check_admin_referer('ngg_uninstall');
 
 
18
 
19
- $wpdb->query("DROP TABLE $wpdb->nggpictures");
20
- $wpdb->query("DROP TABLE $wpdb->nggallery");
21
- $wpdb->query("DROP TABLE $wpdb->nggalbum");
22
- $wpdb->query("DROP TABLE $wpdb->nggtags");
23
- $wpdb->query("DROP TABLE $wpdb->nggpic2tags");
24
-
25
- delete_option( "ngg_options" );
26
- delete_option( "ngg_db_version");
27
-
28
- // now remove the capability
29
- ngg_remove_capability("NextGEN Gallery overview");
30
- ngg_remove_capability("NextGEN Use TinyMCE");
31
- ngg_remove_capability("NextGEN Upload images");
32
- ngg_remove_capability("NextGEN Manage gallery");
33
- ngg_remove_capability("NextGEN Edit album");
34
- ngg_remove_capability("NextGEN Change style");
35
- ngg_remove_capability("NextGEN Change options");
36
-
37
- $messagetext = '<font color="green">'.__('Uninstall sucessfull ! Now delete the plugin and enjoy your life ! Good luck !','nggallery').'</font>';
38
  }
39
-
40
- // message windows
41
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
42
-
43
  ?>
44
-
45
  <div class="wrap">
46
  <h2><?php _e('Reset options', 'nggallery') ;?></h2>
47
  <form name="resetsettings" method="post">
@@ -53,32 +37,22 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
53
  <?php if (!IS_WPMU || wpmu_site_admin() ) : ?>
54
  <div class="wrap">
55
  <h2><?php _e('Uninstall plugin tables', 'nggallery') ;?></h2>
 
56
  <form name="resetsettings" method="post">
 
57
  <?php wp_nonce_field('ngg_uninstall') ?>
58
  <p><?php _e('You don\'t like NextGEN Gallery ?', 'nggallery') ;?></p>
59
  <p><?php _e('No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextGEN Gallery does not remove any data that may have been created. ', 'nggallery') ;?>
60
- <p ><font color="red"><strong><?php _e('WARNING:', 'nggallery') ;?></strong><br />
61
- <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables', 'nggallery') ;?> <strong><?php echo $wpdb->nggpictures; ?></strong>, <strong><?php echo $wpdb->nggalbum; ?></strong>, <strong><?php echo $wpdb->nggtags; ?></strong>, <strong><?php echo $wpdb->nggpic2tags; ?></strong> <?php _e('and', 'nggallery') ;?> <strong><?php echo $wpdb->nggalbum; ?></strong>.</font></p>
62
- <div align="center">
 
63
  <input type="submit" name="uninstall" class="button delete" value="<?php _e('Uninstall plugin', 'nggallery') ?>" onclick="javascript:check=confirm('<?php _e('You are about to Uninstall this plugin from WordPress.\nThis action is not reversible.\n\nChoose [Cancel] to Stop, [OK] to Uninstall.\n','nggallery'); ?>');if(check==false) return false;"/>
64
- </div>
65
  </form>
66
  </div>
67
  <?php endif; ?>
68
 
69
  <?php
70
  }
71
-
72
- function ngg_remove_capability($capability){
73
- // This function remove the $capability
74
- $check_order = array("subscriber", "contributor", "author", "editor", "administrator");
75
-
76
- foreach ($check_order as $role) {
77
-
78
- $role = get_role($role);
79
- $role->remove_cap($capability) ;
80
- }
81
-
82
- }
83
-
84
  ?>
2
  if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
 
4
  function nggallery_admin_setup() {
5
+ global $wpdb, $ngg;
6
 
7
  if (isset($_POST['resetdefault'])) {
8
  check_admin_referer('ngg_uninstall');
9
+
10
+ include_once ( dirname (__FILE__). '/install.php');
11
 
12
  ngg_default_options();
13
+ $ngg->load_options();
14
+
15
+ nggGallery::show_message(__('Reset all settings to default parameter','nggallery'));
16
  }
17
 
18
  if (isset($_POST['uninstall'])) {
19
 
20
  check_admin_referer('ngg_uninstall');
21
+
22
+ include_once ( dirname (__FILE__). '/install.php');
23
 
24
+ nggallery_uninstall();
25
+
26
+ nggGallery::show_message(__('Uninstall sucessfull ! Now delete the plugin and enjoy your life ! Good luck !','nggallery'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
 
 
 
 
28
  ?>
 
29
  <div class="wrap">
30
  <h2><?php _e('Reset options', 'nggallery') ;?></h2>
31
  <form name="resetsettings" method="post">
37
  <?php if (!IS_WPMU || wpmu_site_admin() ) : ?>
38
  <div class="wrap">
39
  <h2><?php _e('Uninstall plugin tables', 'nggallery') ;?></h2>
40
+
41
  <form name="resetsettings" method="post">
42
+ <div>
43
  <?php wp_nonce_field('ngg_uninstall') ?>
44
  <p><?php _e('You don\'t like NextGEN Gallery ?', 'nggallery') ;?></p>
45
  <p><?php _e('No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextGEN Gallery does not remove any data that may have been created. ', 'nggallery') ;?>
46
+ </div>
47
+ <p><font color="red"><strong><?php _e('WARNING:', 'nggallery') ;?></strong><br />
48
+ <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables', 'nggallery') ;?> <strong><?php echo $wpdb->nggpictures; ?></strong>, <strong><?php echo $wpdb->nggalbum; ?></strong> <?php _e('and', 'nggallery') ;?> <strong><?php echo $wpdb->nggalbum; ?></strong>.</font></p>
49
+ <div align="center">
50
  <input type="submit" name="uninstall" class="button delete" value="<?php _e('Uninstall plugin', 'nggallery') ?>" onclick="javascript:check=confirm('<?php _e('You are about to Uninstall this plugin from WordPress.\nThis action is not reversible.\n\nChoose [Cancel] to Stop, [OK] to Uninstall.\n','nggallery'); ?>');if(check==false) return false;"/>
51
+ </div>
52
  </form>
53
  </div>
54
  <?php endif; ?>
55
 
56
  <?php
57
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  ?>
admin/showmeta.php CHANGED
@@ -1,7 +1,10 @@
1
  <?php
2
 
3
- require_once(realpath("../../../../wp-config.php"));
4
- require_once(NGGALLERY_ABSPATH.'/lib/nggmeta.lib.php');
 
 
 
5
 
6
  if ( !is_user_logged_in() )
7
  die(__('Cheatin&#8217; uh?'));
@@ -16,9 +19,9 @@ global $wpdb;
16
 
17
  $id = (int) $_GET['id'];
18
  // let's get the image data
19
- $picture = new nggImage($id );
20
  // let's get the meta data'
21
- $meta = new nggMeta($picture->absPath);
22
  $exifdata = $meta->get_EXIF();
23
  $iptcdata = $meta->get_IPTC();
24
  $xmpdata = $meta->get_XMP();
@@ -31,7 +34,8 @@ $xmpdata = $meta->get_XMP();
31
  <link rel="stylesheet" href="<?php echo get_option( 'siteurl' ) ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
32
  <style type="text/css">
33
  #TB_title{
34
- background-color:#E5F3FF !important;
 
35
  }
36
  </style>
37
  </head>
@@ -39,7 +43,7 @@ $xmpdata = $meta->get_XMP();
39
 
40
  <!-- EXIF DATA -->
41
  <fieldset class="options nggallery">
42
- <legend><?php _e('EXIF Data','nggallery'); ?></legend>
43
  <?php if ($exifdata) { ?>
44
  <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
45
  <thead>
@@ -64,7 +68,7 @@ $xmpdata = $meta->get_XMP();
64
  <!-- IPTC DATA -->
65
  <?php if ($iptcdata) { ?>
66
  <fieldset class="options nggallery">
67
- <legend><?php _e('IPTC Data','nggallery'); ?></legend>
68
  <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
69
  <thead>
70
  <tr>
@@ -88,7 +92,7 @@ $xmpdata = $meta->get_XMP();
88
  <!-- XMP DATA -->
89
  <?php if ($xmpdata) { ?>
90
  <fieldset class="options nggallery">
91
- <legend><?php _e('XMP Data','nggallery'); ?></legend>
92
  <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
93
  <thead>
94
  <tr>
@@ -110,7 +114,4 @@ $xmpdata = $meta->get_XMP();
110
  <?php } ?>
111
 
112
  </body>
113
- </html>
114
- <?php
115
-
116
- ?>
1
  <?php
2
 
3
+ // look up for the path
4
+ require_once( dirname( dirname(__FILE__) ) . '/ngg-config.php');
5
+
6
+ require_once(NGGALLERY_ABSPATH.'/lib/meta.php');
7
+ require_once(NGGALLERY_ABSPATH.'/lib/image.php');
8
 
9
  if ( !is_user_logged_in() )
10
  die(__('Cheatin&#8217; uh?'));
19
 
20
  $id = (int) $_GET['id'];
21
  // let's get the image data
22
+ $picture = nggdb::find_image($id);
23
  // let's get the meta data'
24
+ $meta = new nggMeta($picture->imagePath);
25
  $exifdata = $meta->get_EXIF();
26
  $iptcdata = $meta->get_IPTC();
27
  $xmpdata = $meta->get_XMP();
34
  <link rel="stylesheet" href="<?php echo get_option( 'siteurl' ) ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
35
  <style type="text/css">
36
  #TB_title{
37
+ background-color:#222222;
38
+ color:#CFCFCF;
39
  }
40
  </style>
41
  </head>
43
 
44
  <!-- EXIF DATA -->
45
  <fieldset class="options nggallery">
46
+ <h3><?php _e('EXIF Data','nggallery'); ?></h3>
47
  <?php if ($exifdata) { ?>
48
  <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
49
  <thead>
68
  <!-- IPTC DATA -->
69
  <?php if ($iptcdata) { ?>
70
  <fieldset class="options nggallery">
71
+ <h3><?php _e('IPTC Data','nggallery'); ?></h3>
72
  <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
73
  <thead>
74
  <tr>
92
  <!-- XMP DATA -->
93
  <?php if ($xmpdata) { ?>
94
  <fieldset class="options nggallery">
95
+ <h3><?php _e('XMP Data','nggallery'); ?></h3>
96
  <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
97
  <thead>
98
  <tr>
114
  <?php } ?>
115
 
116
  </body>
117
+ </html>
 
 
 
admin/sort.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * @author Alex Rabe
5
- * @copyright 2008
6
- */
7
-
8
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
9
-
10
- function nggallery_sortorder($galleryID = 0){
11
- global $wpdb;
12
-
13
- if ($galleryID == 0) return;
14
-
15
- $galleryID = (int) $galleryID;
16
-
17
- // get the options
18
- $ngg_options=get_option('ngg_options');
19
-
20
- if (isset ($_POST['updateSortorder'])) {
21
- check_admin_referer('ngg_updatesortorder');
22
- // get variable new sortorder
23
- parse_str($_POST['sortorder']);
24
- if (is_array($sortArray)){
25
- $neworder = array();
26
- foreach($sortArray as $pid) {
27
- $pid = substr($pid, 4); // get id from "pid-x"
28
- $neworder[] = (int) $pid;
29
- }
30
- $sortindex = 1;
31
- foreach($neworder as $pic_id) {
32
- $wpdb->query("UPDATE $wpdb->nggpictures SET sortorder = '$sortindex' WHERE pid = $pic_id");
33
- $sortindex++;
34
- }
35
- nggallery::show_message(__('Sort order changed','nggallery'));
36
- }
37
- }
38
-
39
- // get gallery values
40
- $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
41
-
42
- // set gallery url
43
- $act_gallery_url = get_option ('siteurl')."/".$act_gallery->path."/";
44
- $act_thumbnail_url = get_option ('siteurl')."/".$act_gallery->path.nggallery::get_thumbnail_folder($act_gallery->path, FALSE);
45
- $act_thumb_prefix = nggallery::get_thumbnail_prefix($act_gallery->path, FALSE);
46
-
47
- $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' ORDER BY sortorder ASC");
48
-
49
- ?>
50
- <script type='text/javascript' src='<?php echo NGGALLERY_URLPATH ?>admin/js/sorter.js'></script>
51
- <style type="text/css" media="all">@import "<?php echo NGGALLERY_URLPATH ?>admin/css/nggSorter.css";</style>
52
- <div class="wrap" style="overflow:hidden;">
53
- <h2><?php _e('Sort Gallery', 'nggallery') ?></h2>
54
- <form id="sortGallery" method="POST" action="<?php echo 'admin.php?page=nggallery-manage-gallery&amp;mode=sort&amp;gid='.$galleryID ?>" onsubmit="saveImageOrder()" accept-charset="utf-8">
55
- <?php wp_nonce_field('ngg_updatesortorder') ?>
56
- <input name="sortorder" type="hidden" />
57
- <p class="submit">
58
- <input class="button" type="submit" name="backToGallery" value="<?php _e('Back to gallery', 'nggallery') ?>" />
59
- <input class="button" type="submit" name="updateSortorder" onclick="saveImageOrder()" value="<?php _e('Update Sort Order', 'nggallery') ?> &raquo;" />
60
- </p>
61
- </form>
62
- <?php
63
- if($picturelist) {
64
- foreach($picturelist as $picture) {
65
- ?>
66
- <div class="imageBox" id="pid-<?php echo $picture->pid ?>">
67
- <div class="imageBox_theImage" style="background-image:url('<?php echo $act_thumbnail_url.$act_thumb_prefix.$picture->filename ?>')"></div>
68
- <div class="imageBox_label"><span><?php echo stripslashes($picture->alttext) ?></span></div>
69
- </div>
70
- <?php
71
- }
72
- }
73
- ?>
74
- <div id="insertionMarker">
75
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_top.gif"/>
76
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_middle.gif" id="insertionMarkerLine"/>
77
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_bottom.gif"/>
78
- </div>
79
- <div id="dragDropContent"></div>
80
- </div>
81
-
82
- <?php
83
-
84
- }
85
-
86
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/style.php CHANGED
@@ -3,29 +3,38 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
3
 
4
  function nggallery_admin_style() {
5
 
6
- $ngg_options = get_option('ngg_options');
7
 
8
- if (isset($_POST['css'])) {
9
- check_admin_referer('ngg_style');
10
- $act_cssfile = $_POST['css'];
11
- if (isset($_POST['activate'])) {
12
- // save option now
13
- $ngg_options['activateCSS'] = $_POST['activateCSS'];
14
- $ngg_options['CSSfile'] = $act_cssfile;
15
- update_option('ngg_options', $ngg_options);
16
- $messagetext = '<font color="green">'.__('Update successfully','nggallery').'</font>';
17
- }
18
  } else {
19
- // get the options
20
- if (isset($_POST['file']))
21
- $act_cssfile = $_POST['file'];
22
- else
23
- $act_cssfile = $ngg_options['CSSfile'];
24
- }
25
 
26
- // set the path
27
- $real_file = NGGALLERY_ABSPATH."css/".$act_cssfile;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
 
 
 
 
29
  if (isset($_POST['updatecss'])) {
30
 
31
  check_admin_referer('ngg_style');
@@ -40,7 +49,7 @@ if (isset($_POST['updatecss'])) {
40
  fwrite($f, $newcontent);
41
 
42
  fclose($f);
43
- $messagetext = '<font color="green">'.__('CSS file successfully updated','nggallery').'</font>';
44
  }
45
  }
46
 
@@ -55,80 +64,88 @@ if (!$error && filesize($real_file) > 0) {
55
  $content = htmlspecialchars($content);
56
  }
57
 
58
- // message window
59
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
60
-
61
  ?>
62
  <div class="wrap">
63
- <form name="cssfiles" method="post">
64
- <?php wp_nonce_field('ngg_style') ?>
65
- <input type="checkbox" name="activateCSS" value="1" <?php checked('1', $ngg_options['activateCSS']); ?> />
66
- <?php _e('Activate and use style sheet:','nggallery') ?>
67
- <select name="css" id="css" onchange="this.form.submit();">
68
- <?php
69
- $csslist = ngg_get_cssfiles();
70
- foreach ($csslist as $key =>$a_cssfile) {
71
- $css_name = $a_cssfile['Name'];
72
- if ($key == $act_cssfile) {
73
- $file_show = $key;
74
- $selected = " selected='selected'";
75
- $act_css_description = $a_cssfile['Description'];
76
- $act_css_author = $a_cssfile['Author'];
77
- $act_css_version = $a_cssfile['Version'];
78
- }
79
- else $selected = '';
80
- $css_name = attribute_escape($css_name);
81
- echo "\n\t<option value=\"$key\" $selected>$css_name</option>";
82
- }
83
- ?>
84
- </select>
85
- <input type="submit" name="activate" value="<?php _e('Activate','nggallery') ?> &raquo;" class="button" />
86
- </form>
87
- </div>
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  <?php if (!IS_WPMU || wpmu_site_admin() ) { ?>
90
- <div class="wrap">
91
- <?php
92
- if ( is_writeable($real_file) ) {
93
- echo '<h2>' . sprintf(__('Editing <strong>%s</strong>'), $file_show) . '</h2>';
94
- } else {
95
- echo '<h2>' . sprintf(__('Browsing <strong>%s</strong>'), $file_show) . '</h2>';
96
- }
97
- ?>
98
- <div id="templateside">
99
- <ul>
100
- <li><strong><?php _e('Author','nggallery') ?> :</strong> <?php echo $act_css_author ?></li>
101
- <li><strong><?php _e('Version','nggallery') ?> :</strong> <?php echo $act_css_version ?></li>
102
- <li><strong><?php _e('Description','nggallery') ?> :<br /></strong> <?php echo $act_css_description ?></li>
103
- </ul>
104
 
 
 
 
 
 
 
 
 
 
 
 
105
  </div>
106
- <?php
107
- if (!$error) {
108
- ?>
109
- <form name="template" id="template" method="post">
110
- <?php wp_nonce_field('ngg_style') ?>
111
- <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
112
- <input type="hidden" name="updatecss" value="updatecss" />
113
- <input type="hidden" name="file" value="<?php echo $file_show ?>" />
114
- </div>
115
- <?php if ( is_writeable($real_file) ) : ?>
116
- <p class="submit">
117
- <?php
118
- echo "<input type='submit' name='submit' value=' " . __('Update File &raquo;') . "' tabindex='2' />";
119
- ?>
120
- </p>
121
- <?php else : ?>
122
- <p><em><?php _e('If this file were writable you could edit it.'); ?></em></p>
123
- <?php endif; ?>
124
- </form>
125
- <?php
126
- } else {
127
- echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
128
- }
129
- ?>
130
- <div class="clear"> &nbsp; </div>
131
- </div>
132
 
133
  <?php
134
  }
@@ -148,7 +165,7 @@ function ngg_get_cssfiles() {
148
  $cssfiles = array ();
149
 
150
  // Files in wp-content/plugins/nggallery/css directory
151
- $plugin_root = NGGALLERY_ABSPATH."css";
152
 
153
  $plugins_dir = @ dir($plugin_root);
154
  if ($plugins_dir) {
@@ -192,7 +209,6 @@ function ngg_get_cssfiles() {
192
  return $cssfiles;
193
  }
194
 
195
- /**********************************************************/
196
  // parse the Header information
197
  function ngg_get_cssfiles_data($plugin_file) {
198
  $plugin_data = implode('', file($plugin_file));
@@ -211,5 +227,4 @@ function ngg_get_cssfiles_data($plugin_file) {
211
 
212
  return array ('Name' => $name, 'Description' => $description, 'Author' => $author, 'Version' => $version );
213
  }
214
-
215
  ?>
3
 
4
  function nggallery_admin_style() {
5
 
6
+ global $ngg;
7
 
8
+ if ( $theme_css_exists = file_exists (TEMPLATEPATH . "/nggallery.css") ) {
9
+
10
+ $real_file = TEMPLATEPATH . "/nggallery.css";
11
+ $file_show = 'nggallery.css ' . __('(From the theme folder)','nggallery');
12
+
 
 
 
 
 
13
  } else {
 
 
 
 
 
 
14
 
15
+ if (isset($_POST['css'])) {
16
+ check_admin_referer('ngg_style');
17
+ $act_cssfile = $_POST['css'];
18
+
19
+ if ( isset( $_POST['activate'] ) ) {
20
+ // save option now
21
+ $ngg->options['activateCSS'] = $_POST['activateCSS'];
22
+ $ngg->options['CSSfile'] = $act_cssfile;
23
+ update_option('ngg_options', $ngg->options);
24
+ nggGallery::show_message(__('Update Successfully','nggallery'));
25
+ }
26
+ } else {
27
+ // get the options
28
+ if (isset($_POST['file']))
29
+ $act_cssfile = $_POST['file'];
30
+ else
31
+ $act_cssfile = $ngg->options['CSSfile'];
32
+ }
33
 
34
+ // set the path
35
+ $real_file = NGGALLERY_ABSPATH . "css/" . $act_cssfile;
36
+ }
37
+
38
  if (isset($_POST['updatecss'])) {
39
 
40
  check_admin_referer('ngg_style');
49
  fwrite($f, $newcontent);
50
 
51
  fclose($f);
52
+ nggGallery::show_message(__('CSS file successfully updated','nggallery'));
53
  }
54
  }
55
 
64
  $content = htmlspecialchars($content);
65
  }
66
 
 
 
 
67
  ?>
68
  <div class="wrap">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
+ <div class="bordertitle">
71
+ <h2><?php _e('Style Editor','nggallery') ?></h2>
72
+ <?php if (!$theme_css_exists) : ?>
73
+ <form id="themeselector" name="cssfiles" method="post">
74
+ <?php wp_nonce_field('ngg_style') ?>
75
+ <strong><?php _e('Activate and use style sheet:','nggallery') ?></strong>
76
+ <input type="checkbox" name="activateCSS" value="1" <?php checked('1', $ngg->options['activateCSS']); ?> />
77
+ <select name="css" id="theme" style="margin: 0pt; padding: 0pt;" onchange="this.form.submit();">
78
+ <?php
79
+ $csslist = ngg_get_cssfiles();
80
+ foreach ($csslist as $key =>$a_cssfile) {
81
+ $css_name = $a_cssfile['Name'];
82
+ if ($key == $act_cssfile) {
83
+ $file_show = $key;
84
+ $selected = " selected='selected'";
85
+ $act_css_description = $a_cssfile['Description'];
86
+ $act_css_author = $a_cssfile['Author'];
87
+ $act_css_version = $a_cssfile['Version'];
88
+ }
89
+ else $selected = '';
90
+ $css_name = attribute_escape($css_name);
91
+ echo "\n\t<option value=\"$key\" $selected>$css_name</option>";
92
+ }
93
+ ?>
94
+ </select>
95
+ <input class="button" type="submit" name="activate" value="<?php _e('Activate','nggallery') ?> &raquo;" class="button" />
96
+ </form>
97
+ <?php endif; ?>
98
+ </div>
99
+ <br style="clear: both;"/>
100
+
101
  <?php if (!IS_WPMU || wpmu_site_admin() ) { ?>
102
+ <div class="tablenav">
103
+ <?php
104
+ if ( is_writeable($real_file) ) {
105
+ echo '<big>' . sprintf(__('Editing <strong>%s</strong>','nggallery'), $file_show) . '</big>';
106
+ } else {
107
+ echo '<big>' . sprintf(__('Browsing <strong>%s</strong>','nggallery'), $file_show) . '</big>';
108
+ }
109
+ ?>
110
+ </div>
111
+ <br style="clear: both;"/>
 
 
 
 
112
 
113
+ <div id="templateside">
114
+ <?php if (!$theme_css_exists) : ?>
115
+ <ul>
116
+ <li><strong><?php _e('Author','nggallery') ?> :</strong> <?php echo $act_css_author ?></li>
117
+ <li><strong><?php _e('Version','nggallery') ?> :</strong> <?php echo $act_css_version ?></li>
118
+ <li><strong><?php _e('Description','nggallery') ?> :<br /></strong> <?php echo $act_css_description ?></li>
119
+ </ul>
120
+ <p><?php _e('Tip : Copy your stylesheet (nggallery.css) to your theme folder, so it will be not lost during a upgrade','nggallery') ?></p>
121
+ <?php else: ?>
122
+ <p><?php _e('Your theme contain a NextGEN Gallery stylesheet (nggallery.css), this file will be used','nggallery') ?></p>
123
+ <?php endif; ?>
124
  </div>
125
+ <?php
126
+ if (!$error) {
127
+ ?>
128
+ <form name="template" id="template" method="post">
129
+ <?php wp_nonce_field('ngg_style') ?>
130
+ <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
131
+ <input type="hidden" name="updatecss" value="updatecss" />
132
+ <input type="hidden" name="file" value="<?php echo $file_show ?>" />
133
+ </div>
134
+ <?php if ( is_writeable($real_file) ) : ?>
135
+ <p class="submit">
136
+ <input class="button-primary action" type="submit" name="submit" value="<?php _e('Update File','nggallery') ?>" tabindex="2" />
137
+ </p>
138
+ <?php else : ?>
139
+ <p><em><?php _e('If this file were writable you could edit it.','nggallery'); ?></em></p>
140
+ <?php endif; ?>
141
+ </form>
142
+ <?php
143
+ } else {
144
+ echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.','nggallery') . '</p></div>';
145
+ }
146
+ ?>
147
+ <div class="clear"> &nbsp; </div>
148
+ </div> <!-- wrap-->
 
 
149
 
150
  <?php
151
  }
165
  $cssfiles = array ();
166
 
167
  // Files in wp-content/plugins/nggallery/css directory
168
+ $plugin_root = NGGALLERY_ABSPATH . "css";
169
 
170
  $plugins_dir = @ dir($plugin_root);
171
  if ($plugins_dir) {
209
  return $cssfiles;
210
  }
211
 
 
212
  // parse the Header information
213
  function ngg_get_cssfiles_data($plugin_file) {
214
  $plugin_data = implode('', file($plugin_file));
227
 
228
  return array ('Name' => $name, 'Description' => $description, 'Author' => $author, 'Version' => $version );
229
  }
 
230
  ?>
admin/tags.php ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Tag management page. Inspired from the Simple Tags plugin by Amaury Balmer.
4
+ * http://code.google.com/p/simple-tags/
5
+ */
6
+
7
+ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
8
+
9
+ $action_status = array('message' => '', 'status' => 'ok');
10
+
11
+ if ( isset($_POST['tag_action']) ) {
12
+ //TODO:Include nonce field
13
+ if ( $_POST['tag_action'] == 'renametag' ) {
14
+ $oldtag = (isset($_POST['renametag_old'])) ? $_POST['renametag_old'] : '';
15
+ $newtag = (isset($_POST['renametag_new'])) ? $_POST['renametag_new'] : '';
16
+ $action_status = nggTags::rename_tags( $oldtag, $newtag );
17
+ } elseif ( $_POST['tag_action'] == 'deletetag' ) {
18
+ $todelete = (isset($_POST['deletetag_name'])) ? $_POST['deletetag_name'] : '';
19
+ $action_status = nggTags::delete_tags( $todelete );
20
+ } elseif ( $_POST['tag_action'] == 'editslug' ) {
21
+ $matchtag = (isset($_POST['tagname_match'])) ? $_POST['tagname_match'] : '';
22
+ $newslug = (isset($_POST['tagslug_new'])) ? $_POST['tagslug_new'] : '';
23
+ $action_status = nggTags::edit_tag_slug( $matchtag, $newslug );
24
+ }
25
+ }
26
+
27
+ // Som useful variables
28
+ $admin_base_url = admin_url() . 'admin.php?page=';
29
+ $nb_tags = 50; // Number of tags to show on a single page
30
+
31
+ // Manage URL
32
+ $sort_order = ( isset($_GET['tag_sortorder']) ) ? attribute_escape(stripslashes($_GET['tag_sortorder'])) : 'desc';
33
+ $search_url = ( isset($_GET['search']) ) ? '&amp;search=' . stripslashes($_GET['search']) : '';
34
+ $action_url = $admin_base_url . attribute_escape(stripslashes($_GET['page'])) . '&amp;tag_sortorder=' . $sort_order. $search_url;
35
+
36
+ // Tags Filters
37
+ $order_array = array(
38
+ 'desc' => __('Most popular', 'nggallery'),
39
+ 'asc' => __('Least used', 'nggallery'),
40
+ 'natural' => __('Alphabetical', 'nggallery'));
41
+
42
+ // Build Tags Param
43
+ $param = 'hide_empty=false';
44
+ switch ($sort_order) {
45
+ case 'natural' :
46
+ $param .= '&number='.$nb_tags.'&orderby=name&order=asc';
47
+ break;
48
+ case 'asc' :
49
+ $param .= '&number='.$nb_tags.'&orderby=count&order=asc';
50
+ break;
51
+ default :
52
+ $param .= '&number='.$nb_tags.'&orderby=count&order=desc';
53
+ break;
54
+ }
55
+
56
+
57
+ // Search
58
+ if ( !empty($_GET['search']) ) {
59
+ $search = stripslashes($_GET['search']);
60
+ $param .= '&name__like=' . $search;
61
+ }
62
+
63
+ // Offset
64
+ if ( !empty($_GET['offset']) ) {
65
+ $param .= '&offset=' . $_GET['offset'];
66
+ }
67
+
68
+ // Navigation urls
69
+ if ( empty($_GET['offset']) ) {
70
+ $offset = 0;
71
+ } else {
72
+ $offset = $_GET['offset'];
73
+ }
74
+
75
+ $tag_count = (int)wp_count_terms('ngg_tag', 'ignore_empty=true');
76
+
77
+ if ($offset + $nb_tags < $tag_count) {
78
+ $next_offset = '' . min($offset + $nb_tags, $tag_count - $nb_tags);
79
+ } else {
80
+ $next_offset = '';
81
+ }
82
+
83
+ if ($nb_tags < $tag_count && $offset>0) {
84
+ $prev_offset = '' . max($offset - $nb_tags, 0);
85
+ } else {
86
+ $prev_offset = '';
87
+ }
88
+
89
+ ?>
90
+ <style>
91
+ .disabled, .disabled:hover { border-color: #E5E5E5; color: #999999; cursor: default; }
92
+ </style>
93
+
94
+ <div class="wrap ngg_wrap">
95
+ <h2><?php _e('Manage image tags', 'nggallery'); ?></h2>
96
+
97
+ <?php if ($action_status['message']!='') : ?>
98
+ <div id="message" class="<?php echo ($action_status['status']=='ok' ? 'updated' : $action_status['status']); ?> fade">
99
+ <p><strong><?php echo $action_status['message']; ?></strong></p>
100
+ </div>
101
+ <?php endif; ?>
102
+
103
+ <table>
104
+ <tr>
105
+ <td class="list_tags">
106
+ <fieldset class="options" id="taglist">
107
+ <h3><?php _e('Existing Tags', 'nggallery'); ?></h3>
108
+
109
+ <form method="get">
110
+ <p>
111
+ <label for="search"><?php _e('Search tags', 'nggallery'); ?></label><br />
112
+ <input type="hidden" name="page" value="<?php echo attribute_escape(stripslashes($_GET['page'])); ?>" />
113
+ <input type="hidden" name="tag_sortorder" value="<?php echo $sort_order; ?>" />
114
+ <input type="text" name="search" id="search" size="10" value="<?php echo stripslashes($_GET['search']); ?>" />
115
+ <input class="button" type="submit" value="<?php _e('Go', 'nggallery'); ?>" />
116
+ </p>
117
+ </form>
118
+
119
+ <div class="sort_order">
120
+ <h3><?php _e('Sort Order:', 'nggallery'); ?></h3>
121
+ <?php
122
+ $output = array();
123
+ foreach( $order_array as $sort => $title ) {
124
+ $output[] = ($sort == $sort_order) ? '<span style="color: red;">'.$title.'</span>' : '<a href="'.$admin_base_url.attribute_escape(stripslashes($_GET['page'])).'&amp;tag_sortorder='.$sort.$search_url.'">'.$title.'</a>';
125
+ }
126
+ echo implode('<br />', $output);
127
+ $output = array();
128
+ unset($output);
129
+ ?>
130
+ </div>
131
+
132
+ <div id="ajax_area_tagslist">
133
+ <ul>
134
+ <?php
135
+ $tags = (array) nggTags::find_tags($param, true);
136
+ foreach( $tags as $tag ) {
137
+ echo '<li><span>'.$tag->name.'</span>&nbsp;<a href="'.(get_tag_link( $tag->term_id )).'" title="'.sprintf(__('View all images tagged with %s', 'nggallery'), $tag->name).'">('.$tag->count.')</a></li>'."\n";
138
+ }
139
+ unset($tags);
140
+ ?>
141
+ </ul>
142
+
143
+ <?php if ( $prev_offset!='' || $next_offset!='' ) : ?>
144
+ <div class="navigation">
145
+
146
+ <?php if ($prev_offset!='') { ?>
147
+ <form method="get" style="display: inline;">
148
+ <span>
149
+ <input type="hidden" name="page" value="<?php echo attribute_escape(stripslashes($_GET['page'])); ?>" />
150
+ <input type="hidden" name="tag_sortorder" value="<?php echo $sort_order; ?>" />
151
+ <input type="hidden" name="offset" value="<?php echo $prev_offset; ?>" />
152
+ <input class="button" type="submit" value="&laquo; <?php _e('Previous tags', 'nggallery'); ?>" />
153
+ </span>
154
+ </form>
155
+ <?php } else { ?>
156
+ <span><span class="button disabled">&laquo; <?php _e('Previous tags', 'nggallery'); ?></span></span>
157
+ <?php } ?>
158
+
159
+ <?php if ($next_offset!='') { ?>
160
+ <form method="get" style="display: inline;">
161
+ <span>
162
+ <input type="hidden" name="page" value="<?php echo attribute_escape(stripslashes($_GET['page'])); ?>" />
163
+ <input type="hidden" name="tag_sortorder" value="<?php echo $sort_order; ?>" />
164
+ <input type="hidden" name="offset" value="<?php echo $next_offset; ?>" />
165
+ <input class="button" type="submit" value="<?php _e('Next tags', 'nggallery'); ?> &raquo;" />
166
+ </span>
167
+ </form>
168
+ <?php } else { ?>
169
+ <span><span class="button disabled"><?php _e('Previous tags', 'nggallery'); ?> &raquo;</span></span>
170
+ <?php } ?>
171
+ </div>
172
+ <?php endif; ?>
173
+ </div>
174
+ </fieldset>
175
+ </td>
176
+ <td class="forms_manage">
177
+ <h3><?php _e('Rename Tag', 'nggallery'); ?></h3>
178
+ <form action="<?php echo $action_url; ?>" method="post">
179
+ <input type="hidden" name="tag_action" value="renametag" />
180
+ <input type="hidden" name="tag_nonce" value="<?php echo wp_create_nonce('nggallery_admin'); ?>" />
181
+
182
+ <table class="form-table">
183
+ <tr valign="top">
184
+ <td colspan="2">
185
+ <p><?php _e('Enter the tag to rename and its new value. You can use this feature to merge tags too. Click "Rename" and all posts which use this tag will be updated.', 'nggallery'); ?></p>
186
+ <p><?php _e('You can specify multiple tags to rename by separating them with commas.', 'nggallery'); ?></p>
187
+ </td>
188
+ </tr>
189
+ <tr valign="top">
190
+ <th scope="row"><label for="renametag_old"><?php _e('Tag(s) to rename:', 'nggallery'); ?></label></th>
191
+ <td><input type="text" id="renametag_old" name="renametag_old" value="" size="40" /></td>
192
+ </tr>
193
+ <tr valign="top">
194
+ <th scope="row"><label for="renametag_new"><?php _e('New tag name(s):', 'nggallery'); ?></label></th>
195
+ <td>
196
+ <input type="text" id="renametag_new" name="renametag_new" value="" size="40" />
197
+ <input class="button" type="submit" name="rename" value="<?php _e('Rename', 'nggallery'); ?>" />
198
+ </td>
199
+ </tr>
200
+ </table>
201
+ </form>
202
+
203
+ <h3><?php _e('Delete Tag', 'nggallery'); ?></h3>
204
+ <form action="<?php echo $action_url; ?>" method="post">
205
+ <input type="hidden" name="tag_action" value="deletetag" />
206
+ <input type="hidden" name="tag_nonce" value="<?php echo wp_create_nonce('nggallery_admin'); ?>" />
207
+
208
+ <table class="form-table">
209
+ <tr valign="top">
210
+ <td colspan="2">
211
+ <p><?php _e('Enter the name of the tag to delete. This tag will be removed from all posts.', 'nggallery'); ?></p>
212
+ <p><?php _e('You can specify multiple tags to delete by separating them with commas', 'nggallery'); ?>.</p>
213
+ </td>
214
+ </tr>
215
+ <tr valign="top">
216
+ <th scope="row"><label for="deletetag_name"><?php _e('Tag(s) to delete:', 'nggallery'); ?></label></th>
217
+ <td>
218
+ <input type="text" id="deletetag_name" name="deletetag_name" value="" size="40" />
219
+ <input class="button" type="submit" name="delete" value="<?php _e('Delete', 'nggallery'); ?>" />
220
+ </td>
221
+ </tr>
222
+ </table>
223
+ </form>
224
+
225
+ <h3><?php _e('Edit Tag Slug', 'nggallery'); ?></h3>
226
+ <form action="<?php echo $action_url; ?>" method="post">
227
+ <input type="hidden" name="tag_action" value="editslug" />
228
+ <input type="hidden" name="tag_nonce" value="<?php echo wp_create_nonce('nggallery_admin'); ?>" />
229
+
230
+ <table class="form-table">
231
+ <tr valign="top">
232
+ <td colspan="2">
233
+ <p><?php _e('Enter the tag name to edit and its new slug. <a href="http://codex.wordpress.org/Glossary#Slug">Slug definition</a>', 'nggallery'); ?></p>
234
+ <p><?php _e('You can specify multiple tags to rename by separating them with commas.', 'nggallery'); ?></p>
235
+ </td>
236
+ </tr>
237
+ <tr valign="top">
238
+ <th scope="row"><label for="tagname_match"><?php _e('Tag(s) to match:', 'nggallery'); ?></label></th>
239
+ <td><input type="text" id="tagname_match" name="tagname_match" value="" size="40" /></td>
240
+ </tr>
241
+ <tr valign="top">
242
+ <th scope="row"><label for="tagslug_new"><?php _e('Slug(s) to set:', 'nggallery'); ?></label></th>
243
+ <td>
244
+ <input type="text" id="tagslug_new" name="tagslug_new" value="" size="40" />
245
+ <input class="button" type="submit" name="edit" value="<?php _e('Edit', 'nggallery'); ?>" />
246
+ </td>
247
+ </tr>
248
+ </table>
249
+ </form>
250
+ </td>
251
+ </tr>
252
+ </table>
253
+ <script type="text/javascript">
254
+ // <![CDATA[
255
+ // Register onclick event
256
+ function registerClick() {
257
+ jQuery('#taglist ul li span').bind("click", function(){
258
+ addTag(this.innerHTML, "renametag_old");
259
+ addTag(this.innerHTML, "deletetag_name");
260
+ addTag(this.innerHTML, "tagname_match");
261
+ });
262
+ }
263
+
264
+ // Register initial event
265
+ jQuery(document).ready(function() {
266
+ registerClick();
267
+ });
268
+
269
+ // Add tag into input
270
+ function addTag( tag, name_element ) {
271
+ var input_element = document.getElementById( name_element );
272
+
273
+ if ( input_element.value.length > 0 && !input_element.value.match(/,\s*$/) )
274
+ input_element.value += ", ";
275
+
276
+ var re = new RegExp(tag + ",");
277
+ if ( !input_element.value.match(re) )
278
+ input_element.value += tag + ", ";
279
+
280
+ return true;
281
+ }
282
+ // ]]>
283
+ </script>
284
+ </div>
{tinymce3 → admin/tinymce}/editor_plugin.js RENAMED
@@ -1,78 +1,78 @@
1
- // Docu : http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x#Creating_your_own_plugins
2
-
3
- (function() {
4
- // Load plugin specific language pack
5
- tinymce.PluginManager.requireLangPack('NextGEN');
6
-
7
- tinymce.create('tinymce.plugins.NextGEN', {
8
- /**
9
- * Initializes the plugin, this will be executed after the plugin has been created.
10
- * This call is done before the editor instance has finished it's initialization so use the onInit event
11
- * of the editor instance to intercept that event.
12
- *
13
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
14
- * @param {string} url Absolute URL to where the plugin is located.
15
- */
16
- init : function(ed, url) {
17
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
18
-
19
- ed.addCommand('mceNextGEN', function() {
20
- ed.windowManager.open({
21
- file : url + '/window.php',
22
- width : 360 + ed.getLang('NextGEN.delta_width', 0),
23
- height : 210 + ed.getLang('NextGEN.delta_height', 0),
24
- inline : 1
25
- }, {
26
- plugin_url : url // Plugin absolute URL
27
- });
28
- });
29
-
30
- // Register example button
31
- ed.addButton('NextGEN', {
32
- title : 'NextGEN.desc',
33
- cmd : 'mceNextGEN',
34
- image : url + '/nextgen.gif'
35
- });
36
-
37
- // Add a node change handler, selects the button in the UI when a image is selected
38
- ed.onNodeChange.add(function(ed, cm, n) {
39
- cm.setActive('NextGEN', n.nodeName == 'IMG');
40
- });
41
- },
42
-
43
- /**
44
- * Creates control instances based in the incomming name. This method is normally not
45
- * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
46
- * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
47
- * method can be used to create those.
48
- *
49
- * @param {String} n Name of the control to create.
50
- * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
51
- * @return {tinymce.ui.Control} New control instance or null if no control was created.
52
- */
53
- createControl : function(n, cm) {
54
- return null;
55
- },
56
-
57
- /**
58
- * Returns information about the plugin as a name/value array.
59
- * The current keys are longname, author, authorurl, infourl and version.
60
- *
61
- * @return {Object} Name/value array containing information about the plugin.
62
- */
63
- getInfo : function() {
64
- return {
65
- longname : 'NextGEN',
66
- author : 'Alex Rabe',
67
- authorurl : 'http://alexrabe.boelinger.com',
68
- infourl : 'http://alexrabe.boelinger.com',
69
- version : "2.0"
70
- };
71
- }
72
- });
73
-
74
- // Register plugin
75
- tinymce.PluginManager.add('NextGEN', tinymce.plugins.NextGEN);
76
- })();
77
-
78
-
1
+ // Docu : http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x#Creating_your_own_plugins
2
+
3
+ (function() {
4
+ // Load plugin specific language pack
5
+ tinymce.PluginManager.requireLangPack('NextGEN');
6
+
7
+ tinymce.create('tinymce.plugins.NextGEN', {
8
+ /**
9
+ * Initializes the plugin, this will be executed after the plugin has been created.
10
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
11
+ * of the editor instance to intercept that event.
12
+ *
13
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
14
+ * @param {string} url Absolute URL to where the plugin is located.
15
+ */
16
+ init : function(ed, url) {
17
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
18
+
19
+ ed.addCommand('mceNextGEN', function() {
20
+ ed.windowManager.open({
21
+ file : url + '/window.php',
22
+ width : 360 + ed.getLang('NextGEN.delta_width', 0),
23
+ height : 210 + ed.getLang('NextGEN.delta_height', 0),
24
+ inline : 1
25
+ }, {
26
+ plugin_url : url // Plugin absolute URL
27
+ });
28
+ });
29
+
30
+ // Register example button
31
+ ed.addButton('NextGEN', {
32
+ title : 'NextGEN.desc',
33
+ cmd : 'mceNextGEN',
34
+ image : url + '/nextgen.gif'
35
+ });
36
+
37
+ // Add a node change handler, selects the button in the UI when a image is selected
38
+ ed.onNodeChange.add(function(ed, cm, n) {
39
+ cm.setActive('NextGEN', n.nodeName == 'IMG');
40
+ });
41
+ },
42
+
43
+ /**
44
+ * Creates control instances based in the incomming name. This method is normally not
45
+ * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
46
+ * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
47
+ * method can be used to create those.
48
+ *
49
+ * @param {String} n Name of the control to create.
50
+ * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
51
+ * @return {tinymce.ui.Control} New control instance or null if no control was created.
52
+ */
53
+ createControl : function(n, cm) {
54
+ return null;
55
+ },
56
+
57
+ /**
58
+ * Returns information about the plugin as a name/value array.
59
+ * The current keys are longname, author, authorurl, infourl and version.
60
+ *
61
+ * @return {Object} Name/value array containing information about the plugin.
62
+ */
63
+ getInfo : function() {
64
+ return {
65
+ longname : 'NextGEN',
66
+ author : 'Alex Rabe',
67
+ authorurl : 'http://alexrabe.boelinger.com',
68
+ infourl : 'http://alexrabe.boelinger.com',
69
+ version : "2.0"
70
+ };
71
+ }
72
+ });
73
+
74
+ // Register plugin
75
+ tinymce.PluginManager.add('NextGEN', tinymce.plugins.NextGEN);
76
+ })();
77
+
78
+
tinymce3/langs/de_de.js → admin/tinymce/langs/de.js RENAMED
File without changes
admin/tinymce/langs/de_de.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ // German lang variables for WP2.5
2
+
3
+ tinyMCE.addI18n({de:{
4
+ NextGEN:{
5
+ desc : 'NextGEN Gallery hinzufuegen'
6
+ }}});
{tinymce3 → admin/tinymce}/langs/en.js RENAMED
File without changes
{tinymce3 → admin/tinymce}/langs/en_US.js RENAMED
File without changes
admin/tinymce/nextgen.gif ADDED
Binary file
{tinymce3 → admin/tinymce}/tinymce.js RENAMED
@@ -1,75 +1,76 @@
1
- function init() {
2
- tinyMCEPopup.resizeToInnerSize();
3
- }
4
-
5
- function getCheckedValue(radioObj) {
6
- if(!radioObj)
7
- return "";
8
- var radioLength = radioObj.length;
9
- if(radioLength == undefined)
10
- if(radioObj.checked)
11
- return radioObj.value;
12
- else
13
- return "";
14
- for(var i = 0; i < radioLength; i++) {
15
- if(radioObj[i].checked) {
16
- return radioObj[i].value;
17
- }
18
- }
19
- return "";
20
- }
21
-
22
- function insertNGGLink() {
23
-
24
- var tagtext;
25
-
26
- var gallery = document.getElementById('gallery_panel');
27
- var album = document.getElementById('album_panel');
28
- var singlepic = document.getElementById('singlepic_panel');
29
-
30
- // who is active ?
31
- if (gallery.className.indexOf('current') != -1) {
32
- var galleryid = document.getElementById('gallerytag').value;
33
- var showtype = getCheckedValue(document.getElementsByName('showtype'));
34
- if (galleryid != 0 )
35
- tagtext = "["+ showtype + "=" + galleryid + "]";
36
- else
37
- tinyMCEPopup.close();
38
- }
39
-
40
- if (album.className.indexOf('current') != -1) {
41
- var albumid = document.getElementById('albumtag').value;
42
- var showtype = getCheckedValue(document.getElementsByName('albumtype'));
43
- if (albumid != 0 )
44
- tagtext = "[album=" + albumid + "," + showtype + "]";
45
- else
46
- tinyMCEPopup.close();
47
- }
48
-
49
- if (singlepic.className.indexOf('current') != -1) {
50
- var singlepicid = document.getElementById('singlepictag').value;
51
- var imgWidth = document.getElementById('imgWidth').value;
52
- var imgHeight = document.getElementById('imgHeight').value;
53
- var imgeffect = document.getElementById('imgeffect').value;
54
- var imgfloat = document.getElementById('imgfloat').value;
55
-
56
- if (singlepicid != 0 ) {
57
- if (imgeffect == "none")
58
- tagtext = "[singlepic=" + singlepicid + "," + imgWidth + "," + imgHeight + ",," + imgfloat + "]";
59
- else
60
- tagtext = "[singlepic=" + singlepicid + "," + imgWidth + "," + imgHeight + "," + imgeffect + "," + imgfloat + "]";
61
- } else {
62
- tinyMCEPopup.close();
63
- }
64
- }
65
-
66
- if(window.tinyMCE) {
67
- window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tagtext);
68
- //Peforms a clean up of the current editor HTML.
69
- //tinyMCEPopup.editor.execCommand('mceCleanup');
70
- //Repaints the editor. Sometimes the browser has graphic glitches.
71
- tinyMCEPopup.editor.execCommand('mceRepaint');
72
- tinyMCEPopup.close();
73
- }
74
- return;
75
- }
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+ }
4
+
5
+ function getCheckedValue(radioObj) {
6
+ if(!radioObj)
7
+ return "";
8
+ var radioLength = radioObj.length;
9
+ if(radioLength == undefined)
10
+ if(radioObj.checked)
11
+ return radioObj.value;
12
+ else
13
+ return "";
14
+ for(var i = 0; i < radioLength; i++) {
15
+ if(radioObj[i].checked) {
16
+ return radioObj[i].value;
17
+ }
18
+ }
19
+ return "";
20
+ }
21
+
22
+ function insertNGGLink() {
23
+
24
+ var tagtext;
25
+
26
+ var gallery = document.getElementById('gallery_panel');
27
+ var album = document.getElementById('album_panel');
28
+ var singlepic = document.getElementById('singlepic_panel');
29
+
30
+ // who is active ?
31
+ if (gallery.className.indexOf('current') != -1) {
32
+ var galleryid = document.getElementById('gallerytag').value;
33
+ var showtype = getCheckedValue(document.getElementsByName('showtype'));
34
+ if (galleryid != 0 )
35
+ tagtext = "["+ showtype + " id=" + galleryid + "]";
36
+ else
37
+ tinyMCEPopup.close();
38
+ }
39
+
40
+ if (album.className.indexOf('current') != -1) {
41
+ var albumid = document.getElementById('albumtag').value;
42
+ var showtype = getCheckedValue(document.getElementsByName('albumtype'));
43
+ if (albumid != 0 )
44
+ tagtext = "[album id=" + albumid + " template=" + showtype + "]";
45
+ else
46
+ tinyMCEPopup.close();
47
+ }
48
+
49
+ if (singlepic.className.indexOf('current') != -1) {
50
+ var singlepicid = document.getElementById('singlepictag').value;
51
+ var imgWidth = document.getElementById('imgWidth').value;
52
+ var imgHeight = document.getElementById('imgHeight').value;
53
+ var imgeffect = document.getElementById('imgeffect').value;
54
+ var imgfloat = document.getElementById('imgfloat').value;
55
+
56
+ if (singlepicid != 0 ) {
57
+ if (imgeffect == "none")
58
+ tagtext = "[singlepic id=" + singlepicid + " w=" + imgWidth + " h=" + imgHeight + " float=" + imgfloat + "]";
59
+ else
60
+ tagtext = "[singlepic id=" + singlepicid + " w=" + imgWidth + " h=" + imgHeight + " mode=" + imgeffect + " float=" + imgfloat + "]";
61
+ } else {
62
+ tinyMCEPopup.close();
63
+ }
64
+ }
65
+
66
+ if(window.tinyMCE) {
67
+ //TODO: For QTranslate we should use here 'qtrans_textarea_content' instead 'content'
68
+ window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tagtext);
69
+ //Peforms a clean up of the current editor HTML.
70
+ //tinyMCEPopup.editor.execCommand('mceCleanup');
71
+ //Repaints the editor. Sometimes the browser has graphic glitches.
72
+ tinyMCEPopup.editor.execCommand('mceRepaint');
73
+ tinyMCEPopup.close();
74
+ }
75
+ return;
76
+ }
admin/tinymce/tinymce.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * add_nextgen_button
5
+ *
6
+ * @package NextGEN Gallery
7
+ * @title TinyMCE V3 Button Integration (for WP2.5 and higher)
8
+ * @author Alex Rabe
9
+ * @access public
10
+ */
11
+ class add_nextgen_button {
12
+
13
+ var $pluginname = 'NextGEN';
14
+ var $path = '';
15
+ var $internalVersion = 100;
16
+
17
+ /**
18
+ * add_nextgen_button::add_nextgen_button()
19
+ * the constructor
20
+ *
21
+ * @return void
22
+ */
23
+ function add_nextgen_button() {
24
+
25
+ // Set path to editor_plugin.js
26
+ $this->path = NGGALLERY_URLPATH . 'admin/tinymce/';
27
+
28
+ // Modify the version when tinyMCE plugins are changed.
29
+ add_filter('tiny_mce_version', array (&$this, 'change_tinymce_version') );
30
+
31
+ // init process for button control
32
+ add_action('init', array (&$this, 'addbuttons') );
33
+ }
34
+
35
+ /**
36
+ * add_nextgen_button::addbuttons()
37
+ *
38
+ * @return void
39
+ */
40
+ function addbuttons() {
41
+
42
+ // Don't bother doing this stuff if the current user lacks permissions
43
+ if ( !current_user_can('edit_posts') && !current_user_can('edit_pages') )
44
+ return;
45
+
46
+ // Check for NextGEN capability
47
+ if ( !current_user_can('NextGEN Use TinyMCE') )
48
+ return;
49
+
50
+ // Add only in Rich Editor mode
51
+ if ( get_user_option('rich_editing') == 'true') {
52
+
53
+ // add the button for wp2.5 in a new way
54
+ add_filter("mce_external_plugins", array (&$this, 'add_tinymce_plugin' ), 5);
55
+ add_filter('mce_buttons', array (&$this, 'register_button' ), 5);
56
+ }
57
+ }
58
+
59
+ /**
60
+ * add_nextgen_button::register_button()
61
+ * used to insert button in wordpress 2.5x editor
62
+ *
63
+ * @return $buttons
64
+ */
65
+ function register_button($buttons) {
66
+
67
+ array_push($buttons, 'separator', $this->pluginname );
68
+
69
+ return $buttons;
70
+ }
71
+
72
+ /**
73
+ * add_nextgen_button::add_tinymce_plugin()
74
+ * Load the TinyMCE plugin : editor_plugin.js
75
+ *
76
+ * @return $plugin_array
77
+ */
78
+ function add_tinymce_plugin($plugin_array) {
79
+
80
+ $plugin_array[$this->pluginname] = $this->path . 'editor_plugin.js';
81
+
82
+ return $plugin_array;
83
+ }
84
+
85
+ /**
86
+ * add_nextgen_button::change_tinymce_version()
87
+ * A different version will rebuild the cache
88
+ *
89
+ * @return $versio
90
+ */
91
+ function change_tinymce_version($version) {
92
+ $version = $version + $internalVersion;
93
+ return $version;
94
+ }
95
+
96
+ }
97
+
98
+ // Call it now
99
+ $tinymce_button = new add_nextgen_button ();
100
+
101
+ ?>
{tinymce → admin/tinymce}/window.php RENAMED
@@ -1,17 +1,11 @@
1
  <?php
2
 
3
- $wpconfig = realpath("../../../../wp-config.php");
4
-
5
- if (!file_exists($wpconfig)) {
6
- echo "Could not found wp-config.php. Error in path :\n\n".$wpconfig ;
7
- die;
8
- }// stop when wp-config is not there
9
-
10
- require_once($wpconfig);
11
- require_once(ABSPATH.'/wp-admin/admin.php');
12
 
13
  // check for rights
14
- if(!current_user_can('edit_posts')) die;
 
15
 
16
  global $wpdb;
17
 
@@ -24,7 +18,7 @@ global $wpdb;
24
  <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
25
  <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
26
  <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
27
- <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>tinymce/tinymce.js"></script>
28
  <base target="_self" />
29
  </head>
30
  <body id="link" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('gallerytag').focus();" style="display: none">
@@ -59,8 +53,9 @@ global $wpdb;
59
  </tr>
60
  <tr>
61
  <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
62
- <td><label><input name="showtype" type="radio" value="gallery" checked="checked" /> <?php _e('Image list', 'nggallery') ;?></label><br />
63
- <label><input name="showtype" type="radio" value="slideshow" /> <?php _e('Slideshow', 'nggallery') ;?></label></td>
 
64
  </tr>
65
  </table>
66
  </div>
@@ -153,4 +148,4 @@ global $wpdb;
153
  </div>
154
  </form>
155
  </body>
156
- </html>
1
  <?php
2
 
3
+ // look up for the path
4
+ require_once( dirname( dirname( dirname(__FILE__) ) ) . '/ngg-config.php');
 
 
 
 
 
 
 
5
 
6
  // check for rights
7
+ if ( !is_user_logged_in() || !current_user_can('edit_posts') )
8
+ wp_die(__("You are not allowed to be here"));
9
 
10
  global $wpdb;
11
 
18
  <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
19
  <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
20
  <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
21
+ <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
22
  <base target="_self" />
23
  </head>
24
  <body id="link" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('gallerytag').focus();" style="display: none">
53
  </tr>
54
  <tr>
55
  <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
56
+ <td><label><input name="showtype" type="radio" value="nggallery" checked="checked" /> <?php _e('Image list', 'nggallery') ;?></label><br />
57
+ <label><input name="showtype" type="radio" value="slideshow" /> <?php _e('Slideshow', 'nggallery') ;?></label><br />
58
+ <label><input name="showtype" type="radio" value="imagebrowser" /> <?php _e('Imagebrowser', 'nggallery') ;?></label></td>
59
  </tr>
60
  </table>
61
  </div>
148
  </div>
149
  </form>
150
  </body>
151
+ </html>
admin/upgrade.php ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
+
5
+ /**
6
+ * ngg_upgrade() - update routine for older version
7
+ *
8
+ * @return Success message
9
+ */
10
+ function ngg_upgrade() {
11
+
12
+ global $wpdb, $user_ID;
13
+
14
+ $nggpictures = $wpdb->prefix . 'ngg_pictures';
15
+ $nggallery = $wpdb->prefix . 'ngg_gallery';
16
+
17
+ // get the current user ID
18
+ get_currentuserinfo();
19
+
20
+ // Be sure that the tables exist
21
+ if($wpdb->get_var("show tables like '$nggpictures'") == $nggpictures) {
22
+
23
+ $installed_ver = get_option( "ngg_db_version" );
24
+
25
+ // v0.33 -> v.071
26
+ if (version_compare($installed_ver, '0.71', '<')) {
27
+ $wpdb->query("ALTER TABLE ".$nggpictures." CHANGE pid pid BIGINT(20) NOT NULL AUTO_INCREMENT ");
28
+ $wpdb->query("ALTER TABLE ".$nggpictures." CHANGE galleryid galleryid BIGINT(20) NOT NULL ");
29
+ $wpdb->query("ALTER TABLE ".$nggallery." CHANGE gid gid BIGINT(20) NOT NULL AUTO_INCREMENT ");
30
+ $wpdb->query("ALTER TABLE ".$nggallery." CHANGE pageid pageid BIGINT(20) NULL DEFAULT '0'");
31
+ $wpdb->query("ALTER TABLE ".$nggallery." CHANGE previewpic previewpic BIGINT(20) NULL DEFAULT '0'");
32
+ $wpdb->query("ALTER TABLE ".$nggallery." CHANGE gid gid BIGINT(20) NOT NULL AUTO_INCREMENT ");
33
+ $wpdb->query("ALTER TABLE ".$nggallery." CHANGE description galdesc MEDIUMTEXT NULL");
34
+ }
35
+ // v0.71 -> v0.84
36
+ if (version_compare($installed_ver, '0.84', '<')) {
37
+ $wpdb->query("ALTER TABLE ".$nggpictures." ADD sortorder BIGINT(20) DEFAULT '0' NOT NULL AFTER exclude");
38
+ }
39
+
40
+ // v0.84 -> v0.95
41
+ if (version_compare($installed_ver, '0.95', '<')) {
42
+ // first add the author field and set it to the current administrator
43
+ $wpdb->query("ALTER TABLE ".$nggallery." ADD author BIGINT(20) NOT NULL DEFAULT '$user_ID' AFTER previewpic");
44
+ // switch back to zero
45
+ $wpdb->query("ALTER TABLE ".$nggallery." CHANGE author author BIGINT(20) NOT NULL DEFAULT '0'");
46
+ }
47
+
48
+ // v0.95 -> v0.99
49
+ if (version_compare($installed_ver, '0.96', '<')) {
50
+ // Convert into WordPress Core taxonomy scheme
51
+ ngg_convert_tags();
52
+ // Drop tables, we don't need them anymore
53
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "ngg_tags");
54
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "ngg_pic2tags");
55
+ ngg_convert_filestructure();
56
+
57
+ // New capability for administrator role
58
+ $role = get_role('administrator');
59
+ $role->add_cap('NextGEN Manage tags');
60
+
61
+ // Add new option
62
+ $ngg_options = get_option('ngg_options');
63
+ $ngg_options['graphicLibrary'] = 'gd';
64
+ update_option('ngg_options', $ngg_options);
65
+
66
+ }
67
+
68
+ if (version_compare($installed_ver, '0.97', '<')) {
69
+ $wpdb->query("ALTER TABLE ".$nggpictures." ADD imagedate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER alttext");
70
+ ngg_import_date_time();
71
+ }
72
+
73
+ update_option( "ngg_db_version", NGG_DBVERSION );
74
+ return __('Update database structure', 'nggallery');
75
+ }
76
+ }
77
+
78
+ /**
79
+ * ngg_convert_tags() - Import the tags into the wp tables (only required for pre V1.00 versions)
80
+ *
81
+ * @return Success Message
82
+ */
83
+ function ngg_convert_tags() {
84
+ global $wpdb, $wp_taxonomies;
85
+
86
+ // get the obsolete tables
87
+ $wpdb->nggtags = $wpdb->prefix . 'ngg_tags';
88
+ $wpdb->nggpic2tags = $wpdb->prefix . 'ngg_pic2tags';
89
+
90
+ $picturelist = $wpdb->get_col("SELECT pid FROM $wpdb->nggpictures");
91
+ if ( is_array($picturelist) ) {
92
+ foreach($picturelist as $id) {
93
+ $tags = array();
94
+ $tagarray = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggpic2tags AS t INNER JOIN $wpdb->nggtags AS tt ON t.tagid = tt.id WHERE t.picid = '$id' ORDER BY tt.slug ASC ");
95
+ if (!empty($tagarray)){
96
+ foreach($tagarray as $element) {
97
+ $tags[$element->id] = $element->name;
98
+ }
99
+ wp_set_object_terms($id, $tags, 'ngg_tag');
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ /**
106
+ * ngg_convert_filestructure() - converter for old thumnail folder structure
107
+ *
108
+ * @return void
109
+ */
110
+ function ngg_convert_filestructure() {
111
+ global $wpdb;
112
+
113
+ $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC", OBJECT_K);
114
+ if ( is_array($gallerylist) ) {
115
+ $errors = array();
116
+ foreach($gallerylist as $gallery) {
117
+ $gallerypath = WINABSPATH.$gallery->path;
118
+
119
+ // old mygallery check, convert the wrong folder/ file name now
120
+ if (@is_dir($gallerypath."/tumbs")) {
121
+ if ( !rename($gallerypath."/tumbs", $gallerypath."/thumbs") )
122
+ $errors[] = $gallery->path . "/thumbs";
123
+ // read list of images
124
+ $imageslist = nggAdmin::scandir($gallerypath."/thumbs");
125
+ if ( !empty($imageslist)) {
126
+ foreach($imageslist as $image) {
127
+ $purename = substr($image, 4);
128
+ if ( !rename($gallerypath."/thumbs/".$image, $gallerypath."/thumbs/"."thumbs_".$purename ))
129
+ $errors[] = $gallery->path . "/thumbs/"."thumbs_".$purename ;
130
+ }
131
+ }
132
+ }
133
+ }
134
+ if (!empty($errors)) {
135
+ echo "<div class='error_inline'><p>". __('Some folders/files could not renamed, please recheck the permission and rescan the folder in the manage gallery section.', 'nggallery') ."</p>";
136
+ foreach($errors as $value) {
137
+ echo __('Rename failed', 'nggallery') . " : <strong>" . $value . "</strong><br />\n";
138
+ }
139
+ echo "</div>";
140
+ }
141
+ }
142
+ }
143
+
144
+ /**
145
+ * ngg_import_date_time() - Read the timestamp from exif and insert it into the database
146
+ *
147
+ * @return void
148
+ */
149
+ function ngg_import_date_time() {
150
+ global $wpdb;
151
+
152
+ $imagelist = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid ORDER BY tt.pid ASC");
153
+ if ( is_array($imagelist) ) {
154
+ foreach ($imagelist as $image) {
155
+ $picture = new nggImage($image, $image);
156
+ $meta = new nggMeta($picture->imagePath);
157
+ $date = $meta->get_date_time();
158
+ $wpdb->query("UPDATE $wpdb->nggpictures SET imagedate = '$date' WHERE pid = '$picture->pid'");
159
+ }
160
+ }
161
+ }
162
+
163
+ /**
164
+ * nggallery_upgrade_page() - This page showsup , when the database version doesn't fir to the script NGG_DBVERSION constant.
165
+ *
166
+ * @return Upgrade Message
167
+ */
168
+ function nggallery_upgrade_page() {
169
+ $filepath = admin_url() . 'admin.php?page='.$_GET['page'];
170
+
171
+ if ($_GET['upgrade'] == 'now') {
172
+ nggallery_start_upgrade($filepath);
173
+ return;
174
+ }
175
+ ?>
176
+ <div class="wrap">
177
+ <h2><?php _e('Upgrade NextGEN Gallery', 'nggallery') ;?></h2>
178
+ <p><?php _e('The script detect that you upgrade from a older version.', 'nggallery') ;?>
179
+ <?php _e('Your database tables for NextGEN Gallery is out-of-date, and must be upgraded before you can continue.', 'nggallery'); ?>
180
+ <?php _e('If you would like to downgrade later, please make first a complete backup of your database and the images.', 'nggallery') ;?></p>
181
+ <p><?php _e('The upgrade process may take a while, so please be patient.', 'nggallery'); ?></p>
182
+ <h3><a href="<?php echo $filepath;?>&amp;upgrade=now"><?php _e('Start upgrade now', 'nggallery'); ?>...</a></h3>
183
+ </div>
184
+ <?php
185
+ }
186
+
187
+ /**
188
+ * nggallery_start_upgrade() - Proceed the upgrade routine
189
+ *
190
+ * @param mixed $filepath
191
+ * @return void
192
+ */
193
+ function nggallery_start_upgrade($filepath) {
194
+ global $wpdb;
195
+ ?>
196
+ <div class="wrap">
197
+ <h2><?php _e('Upgrade NextGEN Gallery', 'nggallery') ;?></h2>
198
+ <p><?php echo ngg_upgrade();?></p>
199
+ <p><?php _e('Upgrade sucessfull', 'nggallery') ;?></p>
200
+ <h3><a href="<?php echo $filepath;?>"><?php _e('Continue', 'nggallery'); ?>...</a></h3>
201
+ </div>
202
+ <?php
203
+ }
204
+ ?>
admin/upload.php CHANGED
@@ -1,15 +1,20 @@
1
  <?php
2
 
3
- require_once('../../../../wp-config.php');
 
4
 
5
  // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
6
- if ( empty($_COOKIE[USER_COOKIE]) && !empty($_REQUEST['user_cookie']) )
7
- $_COOKIE[USER_COOKIE] = $_REQUEST['user_cookie'];
8
-
9
- if ( empty($_COOKIE[PASS_COOKIE]) && !empty($_REQUEST['pass_cookie']) )
10
- $_COOKIE[PASS_COOKIE] = $_REQUEST['pass_cookie'];
11
-
12
- // don't ask me why, sometime needed, taken from wp core
 
 
 
 
13
  unset($current_user);
14
 
15
  // admin.php require a proper login cookie
@@ -22,7 +27,7 @@ if ( !is_user_logged_in() )
22
  die('Login failure. -1');
23
 
24
  //check for correct capability
25
- if ( !current_user_can('NextGEN Manage gallery') )
26
  die('You do not have permission to upload files. -2');
27
 
28
  function get_out_now() { exit; }
1
  <?php
2
 
3
+ // look up for the path
4
+ require_once( dirname( dirname(__FILE__) ) . '/ngg-config.php');
5
 
6
  // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
7
+ if (function_exists('is_ssl')) {
8
+ if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
9
+ $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
10
+ elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
11
+ $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
12
+ } else {
13
+ if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
14
+ $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
15
+ }
16
+
17
+ // don't ask me why, sometimes needed, taken from wp core
18
  unset($current_user);
19
 
20
  // admin.php require a proper login cookie
27
  die('Login failure. -1');
28
 
29
  //check for correct capability
30
+ if ( !current_user_can('NextGEN Upload images') )
31
  die('You do not have permission to upload files. -2');
32
 
33
  function get_out_now() { exit; }
admin/uploadtab.php DELETED
@@ -1,232 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * @title Add action/filter for the upload tab
5
- * @author Alex Rabe
6
- * @copyright 2008
7
- */
8
-
9
- function ngg_action_upload_Tab() {
10
- // execute when click on the tab
11
- global $style;
12
- if ( 'inline' == $style )
13
- wp_enqueue_script('nggadmintab', NGGALLERY_URLPATH .'admin/js/uploadtab.js.php', array('prototype'), '0.6');
14
- }
15
-
16
- function ngg_wp_upload_tabs ($array) {
17
-
18
- global $wpdb;
19
-
20
- /*
21
- 0 => tab display name,
22
- 1 => required cap / role,
23
- 2 => function that produces tab content,
24
- 3 => total number objects OR array(total, objects per page),
25
- 4 => add_query_args
26
- */
27
-
28
- // Create navigation
29
- $total = 1;
30
- if ($_GET['select_gal']){
31
- $galleryID = $_GET['select_gal'];
32
- $total = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$galleryID'");
33
- }
34
-
35
- $tab = array(
36
- 'ngg_gallery' => array(__('Gallery','nggallery'), 'NextGEN Use TinyMCE', 'ngg_upload_tab_content', array($total, 10))
37
- );
38
-
39
- return array_merge($array,$tab);
40
- }
41
-
42
- function ngg_upload_tab_content() {
43
- // this is the content of the "Gallery" admin tab
44
- global $ID, $wpdb , $style, $action ;
45
- $ngg_options = get_option('ngg_options');
46
-
47
- // select gallery id
48
- if (isset($_GET['select_gal'])){
49
- $galleryID = $_GET['select_gal'];
50
- } else {
51
- $galleryID = $_POST['from_gal'];
52
- }
53
-
54
- // check for page navigation
55
- $page = (int) $_GET['paged'];
56
- $page = ($page == 0 ) ? 1 : $page;
57
- $start = ( $page - 1 ) * 10;
58
-
59
- if (($action == "update") || ($action == "delete")) {
60
-
61
- // if update/delete pressed
62
- if ( isset($_POST['delete']) || ($action == "delete") ) {
63
- // Function delete image
64
- //TODO: Write a class function "Delete picture"
65
- //TODO: use _wpnonce
66
- $picture = $wpdb->get_row("SELECT * FROM $wpdb->nggpictures WHERE pid = '$ID' ");
67
- if ($picture) {
68
- if ($ngg_options['deleteImg']) {
69
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$picture->galleryid' ");
70
- if ($gallerypath) {
71
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
72
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
73
- unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$picture->filename);
74
- unlink(WINABSPATH.$gallerypath.'/'.$picture->filename);
75
- }
76
- }
77
- $result = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $ID");
78
- }
79
- }
80
-
81
- if ( isset($_POST['save']) ) {
82
- // Function save desription
83
- $img_title = attribute_escape($_POST['image_title']);
84
- $img_desc = attribute_escape($_POST['image_desc']);
85
- $result = $wpdb->query("UPDATE $wpdb->nggpictures SET alttext= '$img_title', description = '$img_desc' WHERE pid = '$ID'");
86
- }
87
- }
88
-
89
- if (($action == "edit") || ($action == "view")) {
90
- ( $style == 'inline' ) ? ngg_admintab_insert_pic($ID) : ngg_image_edit();
91
- return;
92
- }
93
-
94
- ?>
95
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
96
- <style type="text/css" media="all">@import "<?php echo NGGALLERY_URLPATH ?>thickbox/thickbox.css";</style>
97
-
98
- <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']) ?>" method="GET" id="ngg-gallery" style="padding-top:10px;">
99
- <input type="hidden" name="tab" value="<?php echo$_GET['tab']?>" />
100
- <input type="hidden" name="post_id" value="<?php echo$_GET['post_id']?>" />
101
- <input type="hidden" name="action" value="<?php echo$_GET['action']?>" />
102
- <input type="hidden" name="style" value="<?php echo$_GET['style']?>" />
103
- <input type="hidden" name="_wpnonce" value="<?php echo$_GET['_wpnonce']?>" />
104
- <input type="hidden" name="ID" value="<?php echo$_GET['ID']?>" />
105
- <div id="select-gallery"><?php _e('Select a gallery',"nggallery"); ?> :
106
- <select id="select_gal" name="select_gal" onchange="this.form.submit();">';
107
- <option value="0" ><?php _e('No gallery',"nggallery"); ?></option>
108
- <?php
109
- // Show gallery selection
110
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
111
- if(is_array($gallerylist)) {
112
- foreach($gallerylist as $gallery) {
113
- echo '<option value="'.$gallery->gid.'" >'.$gallery->name.' | '.$gallery->title.'</option>'."\n";
114
- }
115
- }
116
- ?>
117
- </select>
118
- </form>
119
- </div>
120
- <ul id="upload-files">
121
- <?php
122
- $picarray = $wpdb->get_col("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY $ngg_options[galSort] $ngg_options[galSortDir] LIMIT $start, 10 ");
123
- if($picarray) {
124
- foreach ($picarray as $picid) {
125
-
126
- $picture = $wpdb->get_row("SELECT * FROM $wpdb->nggpictures WHERE pid = '$picid'");
127
- $imagesrc = nggallery::get_image_url($picid);
128
- $thumbsrc = nggallery::get_thumbnail_url($picid);
129
- $href = add_query_arg( array('action' => $style == 'inline' ? 'view' : 'edit', 'ID' => $picid, 'select_gal' => $galleryID));
130
-
131
- echo '<li id="file-'.$picid.'" class="alignleft">';
132
- echo '<a class="file-link image" title="'.$picture->filename.'" href="'.$href.'" id="file-link-'.$picid.'">
133
- �<img alt="'.$picture->alttext.'" title="'.$picture->alttext.'" src="'.$thumbsrc.'"/></a>';
134
- echo '</li>';
135
- echo '
136
- <div class="upload-file-data">
137
- <p>
138
- <input id="nggimage-url-'.$picid.'" type="hidden" value="'.$imagesrc.'" name="nggimage-url-'.$picid.'"/>
139
- <input id="nggimage-thumb-url-'.$picid.'" type="hidden" value="'.$thumbsrc.'" name="nggimage-thumb-url-'.$picid.'"/>
140
- <input id="nggimage-width-'.$picid.'" type="hidden" value="170" name="nggimage-width-'.$picid.'"/>
141
- <input id="nggimage-height-'.$picid.'" type="hidden" value="128" name="nggimage-height-'.$picid.'"/>
142
- <input id="nggimage-title-'.$picid.'" type="hidden" value="'.$picture->filename.'" name="nggimage-title-'.$picid.'"/>
143
- <input id="nggimage-alttext-'.$picid.'" type="hidden" value="'.$picture->alttext.'" name="nggimage-alttext-'.$picid.'"/>
144
- <input id="nggimage-description-'.$picid.'" type="hidden" value="'.stripslashes($picture->description).'" name="nggimage-description-'.$picid.'"/>
145
- </p>
146
- </div>';
147
- }
148
- }
149
- echo '</ul>';
150
-
151
- }
152
-
153
- function ngg_image_edit() {
154
- global $ID, $wpdb, $post_id, $tab, $style;
155
-
156
- $picture = $wpdb->get_row("SELECT * FROM $wpdb->nggpictures WHERE pid = '$ID'");
157
- $image_src = nggallery::get_image_url($ID);
158
- $thumb_src = nggallery::get_thumbnail_url($ID);
159
-
160
- ?>
161
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
162
- <style type="text/css" media="all">@import "<?php echo NGGALLERY_URLPATH ?>thickbox/thickbox.css";</style>
163
- <form id="upload-file" method="post" action="<?php echo get_option('siteurl') . "/wp-admin/upload.php?style=$style&amp;tab=$tab&amp;post_id=$post_id"; ?>">
164
- <div id="file-title" style="padding-top:10px;">
165
- <h2><?php echo $picture->filename; ?></h2>
166
- </div>
167
- <div id="upload-file-view" class="alignleft">
168
- <?php echo '<a title="'.$picture->alttext.'" href="'.$image_src.'" class="thickbox"><img alt="'.$picture->alttext.'" title="'.$picture->alttext.'" src="'.$thumb_src.'"/></a>'; ?>
169
- </div>
170
- <table><col /><col class="widefat" />
171
- <tr>
172
- <th scope="row"><label for="url"><?php _e('URL',"nggallery"); ?></label></th>
173
- <td><input type="text" id="url" class="readonly" value="<?php echo $image_src ?>" readonly="readonly" /></td>
174
- </tr>
175
- <tr>
176
- <th scope="row"><label for="image_title"><?php _e('Alt &amp; Title Text',"nggallery"); ?></label></th>
177
- <td><input type="text" id="image_title" name="image_title" value="<?php echo $picture->alttext; ?>" /></td>
178
- </tr>
179
- <tr>
180
- <th scope="row"><label for="image_desc"><?php _e('Description',"nggallery"); ?></label></th>
181
- <td><textarea name="image_desc" id="image_desc"><?php echo stripslashes($picture->description); ?></textarea></td>
182
- </tr>
183
- <tr id="buttons" class="submit">
184
- <td colspan='2'>
185
- <input type="submit" name="delete" id="delete" class="delete alignleft" value="<?php _e('Delete File'); ?>" onclick="javascript:check=confirm('<?php _e('Delete image ?','nggallery'); ?>');if(check==false) return false;" />
186
- <input type="hidden" name="from_tab" value="<?php echo $tab; ?>" />
187
- <input type="hidden" name="action" value="update" />
188
- <input type="hidden" name="post_id" value="<?php echo $post_id; ?>" />
189
- <input type="hidden" name="from_gal" value="<?php echo $_GET['select_gal'] ?>" />
190
- <input type="hidden" name="ID" value="<?php echo $ID; ?>" />
191
- <?php wp_nonce_field( 'inlineuploading' ); ?>
192
- <div class="submit">
193
- <input type="submit" name="save" id="save" value="<?php _e('Save') ?> &raquo;" />
194
- </div>
195
- </td>
196
- </tr>
197
- </table>
198
- </form>
199
- <?php
200
- }
201
-
202
- function ngg_admintab_insert_pic($picid) {
203
- global $wpdb, $post_id, $tab, $style;
204
- //TODO: define tb_pathToImage
205
- ?>
206
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
207
- <style type="text/css" media="all">@import "<?php echo NGGALLERY_URLPATH ?>thickbox/thickbox.css";</style>
208
- <?php
209
- //TODO: Image data can be served by a class function
210
- $picture = $wpdb->get_row("SELECT * FROM $wpdb->nggpictures WHERE pid = '$picid'");
211
- $imagesrc = nggallery::get_image_url($picid);
212
- $thumbsrc = nggallery::get_thumbnail_url($picid);
213
-
214
- echo '
215
- <div class="upload-file-data">
216
- <p>
217
- <input id="nggimage-url-'.$picid.'" type="hidden" value="'.$imagesrc.'" name="nggimage-url-'.$picid.'"/>
218
- <input id="nggimage-thumb-url-'.$picid.'" type="hidden" value="'.$thumbsrc.'" name="nggimage-thumb-url-'.$picid.'"/>
219
- <input id="nggimage-width-'.$picid.'" type="hidden" value="170" name="nggimage-width-'.$picid.'"/>
220
- <input id="nggimage-height-'.$picid.'" type="hidden" value="128" name="nggimage-height-'.$picid.'"/>
221
- <input id="nggimage-title-'.$picid.'" type="hidden" value="'.$picture->filename.'" name="nggimage-title-'.$picid.'"/>
222
- <input id="nggimage-alttext-'.$picid.'" type="hidden" value="'.$picture->alttext.'" name="nggimage-alttext-'.$picid.'"/>
223
- <input id="nggimage-description-'.$picid.'" type="hidden" value="'.stripslashes($picture->description).'" name="nggimage-description-'.$picid.'"/>
224
- </p>
225
- </div>';
226
-
227
- }
228
-
229
- add_action('upload_files_ngg_gallery', 'ngg_action_upload_Tab');
230
- add_filter('wp_upload_tabs', 'ngg_wp_upload_tabs');
231
-
232
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/about.php DELETED
@@ -1,225 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_admin_about() {
5
-
6
- ?>
7
-
8
- <div class="wrap">
9
- <h2><?php _e('Copyright notes / Credits', 'nggallery') ;?></h2>
10
- <h3 class="tablenav"><?php _e("NextGEN DEV Team", 'nggallery'); ?></h3>
11
- <p><?php _e('This plugin is primarily developed, maintained, supported, documented by', 'nggallery'); ?> <a href="http://alexrabe.boelinger.com" target="_blank">Alex Rabe</a>. <?php _e('There are many other folks who have made contributions to this project :', 'nggallery') ;?></p>
12
- <p><?php ngg_list_contributors(); ?></p>
13
- <h3 class="tablenav"><?php _e("Contributors / Tribute to", 'nggallery'); ?></h3>
14
- <p><?php _e('If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together.', 'nggallery') ;?>
15
- <?php _e('So, we would like to thank the following people for their pioneer work (without this work it\'s impossible to create such a plugin so fast)', 'nggallery') ;?></p>
16
- <ul>
17
- <li><a href="http://wordpress.org" target="_blank">The WordPress Team</a> <?php _e('for their great documented code', 'nggallery') ;?></li>
18
- <li><a href="http://jquery.com" target="_blank">The jQuery Team</a> <?php _e('for jQuery, which is the best Web2.0 framework', 'nggallery') ;?></li>
19
- <li><a href="http://www.gen-x-design.com" target="_blank">Ian Selby</a> <?php _e('for the fantastic PHP Thumbnail Class', 'nggallery') ;?></li>
20
- <li><a href="http://www.phpconcept.net" target="_blank">Vincent Blavet</a> <?php _e('for PclZip , a PHP library that manage ZIP archives', 'nggallery') ;?></li>
21
- <li><a href="http://www.lesterchan.net/" target="_blank">GaMerZ</a> <?php _e('for a lot of very useful plugins and ideas', 'nggallery') ;?></li>
22
- <li><a href="http://www.stuff.yellowswordfish.com/" target="_blank">Andy Staines</a> <?php _e('for Simple:Press Forum, it saved me a lot of time', 'nggallery') ;?></li>
23
- <li><a href="http://www.jeroenwijering.com/" target="_blank">Jeroen Wijering</a> <?php _e('for the best Media Flash Scripts on earth', 'nggallery') ;?></li>
24
- <li><a href="http://watermark.malcherek.com/" target="_blank">Marek Malcherek</a> <?php _e('for the Watermark plugin', 'nggallery') ;?></li>
25
- </ul>
26
- <p><?php _e('If you didn\'t find your name on this list and there is some code which I integrate in my plugin, don\'t hesitate to send me a mail.', 'nggallery') ;?></p>
27
- <h3 class="tablenav"><?php _e("How to support ?", 'nggallery'); ?></h3>
28
- <p><?php _e('There exist several ways to contribute, help or support us in this work. Non of them are mandatory.', 'nggallery') ;?></p>
29
- <ul>
30
- <li><strong><?php _e('Send us bugfixes / code changes', 'nggallery') ;?></strong><br /><?php _e('The most motivated support for this plugin are your ideas and brain work', 'nggallery') ;?></li>
31
- <li><strong><?php _e('Translate the plugin', 'nggallery') ;?></strong><br /><?php _e('To help people to work with this plugin, I would like to have it in all available languages', 'nggallery') ;?></li>
32
- <li><strong><?php _e('Donate the work via paypal', 'nggallery') ;?></strong><br />
33
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" >
34
- <input type="hidden" name="cmd" value="_xclick"/><input type="hidden" name="business" value="alterego@boelinger.com"/>
35
- <input type="hidden" name="item_name" value="WordPress Plugins www.alexrabe.boelinger.com"/>
36
- <input type="hidden" name="no_shipping" value="1"/><input type="hidden" name="return" value="http://alexrabe.boelinger.com/" />
37
- <input type="hidden" name="cancel_return" value="http://alexrabe.boelinger.com/"/>
38
- <input type="hidden" name="lc" value="US" />
39
- <input type="hidden" name="currency_code" value="USD"/>
40
- <input type="hidden" name="tax" value="0"/>
41
- <input type="hidden" name="bn" value="PP-DonationsBF"/>
42
- <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="border: none;"/>
43
- </form><?php _e('No doubt a very useful and easy motivation :-)', 'nggallery') ;?>
44
- </li>
45
- <li><strong><?php _e('Place a link to the plugin in your blog/webpage', 'nggallery') ;?></strong><br /><?php _e('Yes, share and trackback is also a good support for this work ', 'nggallery') ;?></li>
46
- </ul>
47
- <h3 class="tablenav"><?php _e("Thanks!", 'nggallery'); ?></h3>
48
- <p><?php _e('We would like to thank this people which support us in the work :', 'nggallery') ;?></p>
49
- <p><a href="http://www.boelinger.com/heike/" target="_blank">HEIKE</a>, <?php ngg_list_support(); ?></p>
50
- </div>
51
-
52
- <?php
53
- }
54
-
55
- function ngg_list_contributors() {
56
- /* The list of my contributors. Thanks to all of them !*/
57
-
58
- $contributors = array(
59
- "Frederic De Ranter (AJAX code contributor)" => "http://li.deranter.com/",
60
- "Christian Arnold (Code contributor)" => "http://blog.arctic-media.de/",
61
- "Thomas Matzke (Album code contributor)" => "http://mufuschnu.mu.funpic.de/",
62
- "KeViN (Sidebar Widget developer)" => "http://www.kev.hu/",
63
- "Lazy (German Translation)" => "http://www.lazychris.de/",
64
- "Lise (French Translation)" => "http://liseweb.fr/",
65
- "Anja (Dutch Translation)" => "http://www.werkgroepen.net/wordpress",
66
- "Adrian (Indonesian Translation)" => "http://adrian.web.id/",
67
- "Gaspard Tseng / SillyCCSmile (Chinese Translation)" => "",
68
- "Mika Pennanen (Finnish Translation)" => "http://kapsi.fi/~penni",
69
- "Wojciech Owczarek (Polish Translation)" => "http://www.owczi.net",
70
- "Dilip Ramirez (Spanish Translation)" => "http://jmtd.110mb.com/blog",
71
- "Oleinikov Vedmak Evgeny (Russian Translation)" => "http://ka-2-03.mirea.org/",
72
- "Sebastien MALHERBE (Logo design)" => "http://www.7vision.com/",
73
- "Claudia (German documentation)" => "http://www.blog-werkstatt.de/",
74
- "Robert (German documentation)" => "http://www.curlyrob.de/",
75
- "Pierpaolo Mannone (Italian Translation)" => "http://www.interscambiocasa.com/",
76
- "Mattias Tengblad (Swedish Translation)" => "http://wp-support.se/",
77
- "M&uuml;fit Kiper (Swedish Translation)" => "http://www.kiper.se/",
78
- "Gil Yaker (Documentation)" => "http://bamboosoup.com/",
79
- "Morten Johansen (Danish Translation)" => "http://www.fr3ak.dk/",
80
- "Vidar Seland (Norwegian Translation)" => "http://www.viidar.net/",
81
- "Emre G&uuml;ler (Turkish Translation)" => "http://www.emreguler.com/",
82
- "Emilio Lauretti (Italian Translation)" => "",
83
- "Jan Angelovic (Czech Translation)" => "http://www.angelovic.cz/",
84
- "Laki (Slovak Translation)" => "http://www.laki.sk/",
85
- "Rowan Crane (WPMU support)" => "http://blog.rowancrane.com/",
86
- "Kuba Zwolinski (Polish Translation)" => "http://kubazwolinski.com/",
87
- "Rina Jiang (Chinese Translation)" => "http://http://mysticecho.net/",
88
- "Anthony (Chinese Translation)" => "http://www.angryouth.com/",
89
- "Milan Vasicek (Czech Translation)" => "http://www.NoWorkTeam.cz/",
90
- "Joo Gi-young (Korean Translation)" => "http://lombric.linuxstudy.pe.kr/wp/",
91
- "Oleg A. Safonov (Russian Translation)" => "http://blog.olart.ru",
92
- "AleXander Kirichev (Bulgarian Translation)" => "http://xsakex.art-bg.org/",
93
- "Richer Yang (Chinese Translation)" => "http://fantasyworld.idv.tw/",
94
- "Bill Jones (Forums contributor)" => "http://jonesphoto.bluehorizoninternet.com/",
95
- "TheDonSansone (Forums contributor)" => "http://abseiling.200blogs.co.uk/",
96
- "Komyshov (Russian Translation)" => "http://kf-web.ru/",
97
- "aleX Zhang (Chinese Translation)" => "http://zhangfei.info/",
98
- "TheSoloist (Chinese Translation)" => "http://www.soloist-ic.cn/",
99
- "Nica Luigi Cristian (Romanian Translation)" => "http://www.cristiannica.com/",
100
- "Zdenek Hatas (Czech Translation)" => "",
101
- "David Potter (Documentation and Help)" => "http://dpotter.net/",
102
- "Carlale Chen (Chinese Translation)" => "http://0-o-0.cc/",
103
- "Nica Luigi Cristian (Romanian Translation)" => "http://www.cristiannica.com/",
104
- "Igor Shevkoplyas (Russian Translation)" => "http://www.russian-translation-matters.com",
105
- "Alexandr Kindras (Code contributor)" => "http://www.fixdev.com"
106
- );
107
-
108
- ksort($contributors);
109
- $i = count($contributors);
110
- foreach ($contributors as $name => $url)
111
- {
112
- if ($url)
113
- echo "<a href=\"$url\">$name</a>";
114
- else
115
- echo $name;
116
- $i--;
117
- if ($i == 1)
118
- echo " & ";
119
- elseif ($i)
120
- echo ", ";
121
- }
122
- }
123
-
124
- function ngg_list_support() {
125
- /* The list of my supporters. Thanks to all of them !*/
126
-
127
- $supporter = array(
128
-
129
- "Mike DAmbrose" => "http://www.videovisions.com/",
130
- "Ideablogger" => "http://www.ablogofideas.net/",
131
- "Chuck Coury" => "",
132
- "Kelter" => "http://www.badcat.com",
133
- "Martin Bahr" => "http://www.law-vodcast.de/",
134
- "Marcel Kneuer" => "",
135
- "Martin Bahr" => "http://www.law-vodcast.de/",
136
- "Alakhnor" => "http://www.alakhnor.info",
137
- "Rod" => "http://www.le-hiboo.com",
138
- "Ttancm" => "http://www.ttancm.com/",
139
- "Francoise Pescatore" => "" ,
140
- "Andreas (die-andis)" => "http://www.rummel-platz.de/",
141
- "Andreas" => "http://blog.friedlandreas.de/",
142
- "Joern Kretzschmar" => "http://diekretzschmars.de/",
143
- "Mike" => "http://www.mikemuscroft.com/",
144
- "Sabine (Haselina)" => "http://www.haselina.de/",
145
- "Milemann" => "",
146
- "Kees de Bruin" => "http://www.kdbruin.net/fotoalbum/",
147
- "Helene D." => "http://supernatural.hellioness.com/imagegallery/",
148
- "Ghettomaster" => "http://www.ghettoworld.de/",
149
- "Joe Pharis" => "http://www.southernstylecruisers.com/",
150
- "Charlie (Jump Media)" => "",
151
- "Simon Paarlberg" => "http://www.paarlberg.dk/",
152
- "Clive Loseby" => "http://www.access-bydesign.com/",
153
- "Tonny Kluften" => "http://www.tinnitus-behandling.info/",
154
- "Andreas Oeye" => "http://www.andreasoye.com/",
155
- "Laurent Momy" => "",
156
- "Patrick Hennessey" => "http://www.digitalvagabonding.com/",
157
- "Hans Kiesouw" => "http://www.digitalvagabonding.com/",
158
- "Thomas Bradley" => "http://www.tobeon.co.uk/wordpress/",
159
- "Frederic Deghetto" => "",
160
- "Christopher Weddell" => "",
161
- "Martin Scholz" => "",
162
- "Non Eric" => "http://www.lunatec.de/",
163
- "Ronen Hirsch" => "http://www.stillcreation.com/",
164
- "Michael Erhart" => "",
165
- "Luc Saint-Elie" => "http://luc.saint-elie.com/",
166
- "Matthew Barker" => "",
167
- "Emanuel Kluge" => "",
168
- "Alba Bentos Pereira" => "",
169
- "Bill Babcock" => "http://www.bnj.com",
170
- "Jesper Haug Karsrud" => "http://www.beyond-sanity.com",
171
- "Marco van de Ven" => "http://www.mvdven.nl",
172
- "Peter Krabshuis" => "http://www.dragoneye.nl",
173
- "Teresa Lo" => "http://www.invivoanalytics.com",
174
- "Jes Carlskov" => "",
175
- "John Statler" => "http://www.systemsolver.com",
176
- "Joshua Katinger" => "http://www.accessionmedia.com",
177
- "iSight Technologies" => "http://www.isighttech.com",
178
- "Kay Germer" => "http://highkay.de/",
179
- "Ramon Cutanda Lopez" => "",
180
- "Luc Dubois" => "http://www.oriste.com/",
181
- "Dixie Reid" => "http://www.thereids.co.nz/",
182
- "Gareth Bridger" => "",
183
- "McGillveray Studios" => "http://www.mcgillveraystudios.ca/",
184
- "Paul Rogers" => "http://www.swarfworks.com",
185
- "Steve Lieber" => "http://www.stevelieber.com",
186
- "Modo Web Design" => "http://www.modowebdesign.com",
187
- "Matthew Feldman" => "",
188
- "Gideon Kiers" => "http://www.gideonkiers.com",
189
- "Susan Bates" => "http://www.fineartsmith.com",
190
- "ILISA International USA" => "http://www.ilisa.com",
191
- "Mark Campbell" => "http://www.layersofcolor.com",
192
- "Aaron Snyder" => "http://www.aaronsnyder.net",
193
- "Patrick Pirker" => "",
194
- "Christoph Wander" => "",
195
- "Monterey Bay Singles LLC" => "",
196
- "Elvina Flower" => "",
197
- "Colossal Pups" => "",
198
- "Florian Seuret" => "",
199
- "Petri Teittinen" => "",
200
- "Deval Shah" => "http://www.LuvPix.net ",
201
- "Simply Charlotte Mason, LLC" => "",
202
- "John Williams" => "",
203
- "George Branchflower" => "",
204
- "Douglas J Barnum" => "",
205
- "Bradford Weir" => "http://www.bweir.com",
206
- "Almost Anything Desktop Publishing" => "http://www.almost-anything.com.au/"
207
- );
208
-
209
- ksort($supporter);
210
- $i = count($supporter);
211
- foreach ($supporter as $name => $url)
212
- {
213
- if ($url)
214
- echo "<a href=\"$url\">$name</a>";
215
- else
216
- echo $name;
217
- $i--;
218
- if ($i == 1)
219
- echo " & ";
220
- elseif ($i)
221
- echo ", ";
222
- }
223
- }
224
-
225
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/addgallery.php DELETED
@@ -1,296 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- // sometimes a error feedback is better than a white screen
5
- ini_set('error_reporting', E_ALL ^ E_NOTICE);
6
-
7
- function nggallery_admin_add_gallery() {
8
-
9
- global $wpdb;
10
- $ngg_options = get_option('ngg_options');
11
-
12
- // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
13
- $filepath = get_option('siteurl') . '/wp-admin/admin.php?page='.$_GET['page'];
14
-
15
- // link for the flash file
16
- $swf_upload_link = NGGALLERY_URLPATH . 'admin/wp25/upload.php';
17
- $swf_upload_link = wp_nonce_url($swf_upload_link, 'ngg_swfupload');
18
- //flash doesn't seem to like encoded ampersands, so convert them back here
19
- $swf_upload_link = str_replace('&#038;', '&', $swf_upload_link);
20
-
21
- $defaultpath = $ngg_options['gallerypath'];
22
-
23
- if ($_POST['addgallery']){
24
- check_admin_referer('ngg_addgallery');
25
- $newgallery = attribute_escape($_POST['galleryname']);
26
- if (!empty($newgallery))
27
- nggAdmin::create_gallery($newgallery, $defaultpath);
28
- }
29
-
30
- if ($_POST['zipupload']){
31
- check_admin_referer('ngg_addgallery');
32
- if ($_FILES['zipfile']['error'] == 0)
33
- $messagetext = nggAdmin::import_zipfile($defaultpath);
34
- else
35
- nggallery::show_error(__('Upload failed!','nggallery'));
36
- }
37
-
38
- if ($_POST['importfolder']){
39
- check_admin_referer('ngg_addgallery');
40
- $galleryfolder = $_POST['galleryfolder'];
41
- if ((!empty($galleryfolder)) AND ($defaultpath != $galleryfolder))
42
- $messagetext = nggAdmin::import_gallery($galleryfolder);
43
- }
44
-
45
- if ($_POST['uploadimage']){
46
- check_admin_referer('ngg_addgallery');
47
- if ($_FILES['MF__F_0_0']['error'] == 0) {
48
- $messagetext = nggAdmin::upload_images();
49
- }
50
- else
51
- nggallery::show_error(__('Upload failed!','nggallery'));
52
- }
53
-
54
- if (isset($_POST['swf_callback'])){
55
- if ($_POST['galleryselect'] == "0" )
56
- nggallery::show_error(__('No gallery selected !','nggallery'));
57
- else {
58
- // get the path to the gallery
59
- $galleryID = (int) $_POST['galleryselect'];
60
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
61
- $messagetext = nggAdmin::import_gallery($gallerypath);
62
- }
63
- }
64
-
65
- if ( isset($_POST['disable_flash']) ){
66
- check_admin_referer('ngg_addgallery');
67
- $ngg_options['swfUpload'] = false;
68
- update_option('ngg_options', $ngg_options);
69
- }
70
-
71
- if ( isset($_POST['enable_flash']) ){
72
- check_admin_referer('ngg_addgallery');
73
- $ngg_options['swfUpload'] = true;
74
- update_option('ngg_options', $ngg_options);
75
- }
76
-
77
- // message windows
78
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
79
- ?>
80
-
81
- <?php if($ngg_options['swfUpload']) { ?>
82
- <!-- SWFUpload script -->
83
- <script type="text/javascript">
84
- var ngg_swf_upload;
85
-
86
- window.onload = function () {
87
- ngg_swf_upload = new SWFUpload({
88
- // Backend settings
89
- upload_url : "<?php echo $swf_upload_link; ?>",
90
- flash_url : "<?php echo NGGALLERY_URLPATH; ?>admin/js/swfupload_f9.swf",
91
-
92
- // File Upload Settings
93
- file_size_limit : "<?php echo wp_max_upload_size(); ?>b",
94
- file_types : "*.jpg;*.gif;*.png",
95
- file_types_description : "<?php _e('Image Files', 'nggallery') ;?>",
96
-
97
- // Queue handler
98
- file_queued_handler : fileQueued,
99
-
100
- // Upload handler
101
- upload_start_handler : uploadStart,
102
- upload_progress_handler : uploadProgress,
103
- upload_error_handler : uploadError,
104
- upload_success_handler : uploadSuccess,
105
- upload_complete_handler : uploadComplete,
106
-
107
- post_params : {
108
- "auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",
109
- "galleryselect" : "0"
110
- },
111
-
112
- // i18names
113
- custom_settings : {
114
- "remove" : "<?php _e('remove', 'nggallery') ;?>",
115
- "browse" : "<?php _e('Browse...', 'nggallery') ;?>",
116
- "upload" : "<?php _e('Upload images', 'nggallery') ;?>"
117
- },
118
-
119
- // Debug settings
120
- debug: false
121
-
122
- });
123
-
124
- // on load change the upload to swfupload
125
- initSWFUpload();
126
-
127
- };
128
- </script>
129
-
130
- <div class="wrap" id="progressbar-wrap">
131
- <div class="progressborder">
132
- <div class="progressbar" id="progressbar">
133
- <span>0%</span>
134
- </div>
135
- </div>
136
- </div>
137
-
138
- <?php } else { ?>
139
- <!-- MultiFile script -->
140
- <script type="text/javascript">
141
- jQuery(function(){
142
- jQuery('#imagefiles').MultiFile({
143
- STRING: {
144
- remove:'<?php _e('remove', 'nggallery') ;?>'
145
- }
146
- });
147
- });
148
- </script>
149
- <?php } ?>
150
- <!-- jQuery Tabs script -->
151
- <script type="text/javascript">
152
- jQuery(function() {
153
- jQuery('#slider > ul').tabs({ fxFade: true, fxSpeed: 'fast' });
154
- });
155
- </script>
156
-
157
- <div id="slider" class="wrap">
158
-
159
- <ul id="tabs">
160
- <li><a href="#addgallery"><?php _e('Add new gallery', 'nggallery') ;?></a></li>
161
- <?php if ( wpmu_enable_function('wpmuZipUpload') ) { ?>
162
- <li><a href="#zipupload"><?php _e('Upload a Zip-File', 'nggallery') ;?></a></li>
163
- <?php }
164
- if (!IS_WPMU) {?>
165
- <li><a href="#importfolder"><?php _e('Import image folder', 'nggallery') ;?></a></li>
166
- <?php } ?>
167
- <li><a href="#uploadimage"><?php _e('Upload Images', 'nggallery') ;?></a></li>
168
- </ul>
169
-
170
- <!-- create gallery -->
171
- <div id="addgallery">
172
- <h2><?php _e('Add new gallery', 'nggallery') ;?></h2>
173
- <form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8" >
174
- <?php wp_nonce_field('ngg_addgallery') ?>
175
- <table class="form-table">
176
- <tr valign="top">
177
- <th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
178
- <td><input type="text" size="35" name="galleryname" value="" /><br />
179
- <?php if(!IS_WPMU) { ?>
180
- <?php _e('Create a new , empty gallery below the folder', 'nggallery') ;?> <strong><?php echo $defaultpath ?></strong><br />
181
- <?php } ?>
182
- <i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
183
- </tr>
184
- </table>
185
- <div class="submit"><input type="submit" name= "addgallery" value="<?php _e('Add gallery', 'nggallery') ;?>"/></div>
186
- </form>
187
- </div>
188
- <?php if ( wpmu_enable_function('wpmuZipUpload')) { ?>
189
- <!-- zip-file operation -->
190
- <div id="zipupload">
191
- <h2><?php _e('Upload a Zip-File', 'nggallery') ;?></h2>
192
- <form name="zipupload" id="zipupload_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#zipupload'; ?>" accept-charset="utf-8" >
193
- <?php wp_nonce_field('ngg_addgallery') ?>
194
- <table class="form-table">
195
- <tr valign="top">
196
- <th scope="row"><?php _e('Select Zip-File', 'nggallery') ;?>:</th>
197
- <td><input type="file" name="zipfile" id="zipfile" size="35" class="uploadform"/><br />
198
- <?php _e('Upload a zip file with images', 'nggallery') ;?></td>
199
- </tr>
200
- <tr valign="top">
201
- <th scope="row"><?php _e('in to', 'nggallery') ;?></th>
202
- <td><select name="zipgalselect">
203
- <option value="0" ><?php _e('a new gallery', 'nggallery') ?></option>
204
- <?php
205
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
206
- if(is_array($gallerylist)) {
207
- foreach($gallerylist as $gallery) {
208
- echo '<option value="'.$gallery->name.'" >'.$gallery->name.' | '.$gallery->title.'</option>'."\n";
209
- }
210
- }
211
- ?>
212
- </select>
213
- <br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
214
- <br /><?php if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck') ) display_space_usage(); ?></td>
215
- </tr>
216
- <tr>
217
- <th><?php _e('Add Metadata :', 'nggallery') ;?></th>
218
- <td><input type="checkbox" name="addmetadata" value="1" checked="checked" />
219
- <?php _e('Import EXIF, IPTC or XMP data (if available)', 'nggallery') ;?></td>
220
- </tr>
221
- </table>
222
- <div class="submit"> <input type="submit" name= "zipupload" value="<?php _e('Start upload', 'nggallery') ;?>"/></div>
223
- </form>
224
- </div>
225
- <?php }
226
- if (!IS_WPMU) {?>
227
- <!-- import folder -->
228
- <div id="importfolder">
229
- <h2><?php _e('Import image folder', 'nggallery') ;?></h2>
230
- <form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $filepath.'#importfolder'; ?>" accept-charset="utf-8" >
231
- <?php wp_nonce_field('ngg_addgallery') ?>
232
- <table class="form-table">
233
- <tr valign="top">
234
- <th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?></th>
235
- <td><input type="text" size="35" name="galleryfolder" value="<?php echo$defaultpath; ?>" /><br />
236
- <?php _e('Import a folder with all images.', 'nggallery') ;?>
237
- <?php if (SAFE_MODE) {?><br /><?php _e(' Please note : For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?><?php }; ?></td>
238
- </tr>
239
- <tr>
240
- <th><?php _e('Add Metadata :', 'nggallery') ;?></th>
241
- <td><input type="checkbox" name="addmetadata" value="1" checked="checked" />
242
- <?php _e('Import EXIF, IPTC or XMP data (if available)', 'nggallery') ;?></td>
243
- </tr>
244
- </table>
245
- <div class="submit"> <input type="submit" name= "importfolder" value="<?php _e('Import folder', 'nggallery') ;?>"/></div>
246
- </form>
247
- </div>
248
- <?php } ?>
249
- <!-- upload images -->
250
- <div id="uploadimage">
251
- <h2><?php _e('Upload Images', 'nggallery') ;?></h2>
252
- <form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#uploadimage'; ?>" accept-charset="utf-8" >
253
- <?php wp_nonce_field('ngg_addgallery') ?>
254
- <table class="form-table">
255
- <tr valign="top">
256
- <th scope="row"><?php _e('Upload image', 'nggallery') ;?></th>
257
- <td><input type="file" name="imagefiles" id="imagefiles" size="35" class="imagefiles"/></td>
258
- </tr>
259
- <tr valign="top">
260
- <th scope="row"><?php _e('in to', 'nggallery') ;?></th>
261
- <td><select name="galleryselect" id="galleryselect">
262
- <option value="0" ><?php _e('Choose gallery', 'nggallery') ?></option>
263
- <?php
264
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
265
- if(is_array($gallerylist)) {
266
- foreach($gallerylist as $gallery) {
267
- echo '<option value="'.$gallery->gid.'" >'.$gallery->name.' | '.$gallery->title.'</option>'."\n";
268
- }
269
- }
270
- ?>
271
- </select>
272
- <br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
273
- <br /><?php if ((IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck')) display_space_usage(); ?></td>
274
- </tr>
275
- <tr>
276
- <th><?php _e('Add Metadata :', 'nggallery') ;?></th>
277
- <td><input type="checkbox" name="addmetadata" value="1" checked="checked" />
278
- <?php _e('Import EXIF, IPTC or XMP data (if available)', 'nggallery') ;?></td>
279
- </tr>
280
- </table>
281
- <div class="submit">
282
- <?php if ($ngg_options['swfUpload']) { ?>
283
- <input type="submit" name="disable_flash" id="disable_flash" title="<?php _e('The batch upload requires Adobe Flash 9, disable it if you have problems','nggallery') ?>" value="<?php _e('Disable flash upload', 'nggallery') ;?>" />
284
- <?php } else { ?>
285
- <input type="submit" name="enable_flash" id="enable_flash" title="<?php _e('Upload multiple files at once by ctrl/shift-selecting in dialog','nggallery') ?>" value="<?php _e('Enable flash based upload', 'nggallery') ;?>" />
286
- <?php } ?>
287
- <input type="submit" name="uploadimage" id="uploadimage_btn" value="<?php _e('Upload images', 'nggallery') ;?>" />
288
- </div>
289
- </form>
290
- </div>
291
- </div>
292
-
293
- <?php
294
- }
295
-
296
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/admin.php DELETED
@@ -1,168 +0,0 @@
1
- <?php
2
- // ************************************
3
- // ** Admin Section for NextGEN Gallery
4
- // ** by Alex Rabe
5
- // ************************************
6
-
7
- // add to header in admin area
8
- add_action('admin_head', 'ngg_header');
9
- function ngg_header() {
10
- global $wp_version;
11
- echo "\n".'<meta name="NextGEN" content="'.NGGVERSION.'" />';
12
- echo "\n".'<meta http-equiv="pragma" content="no-cache" />'."\n";
13
-
14
- // since WP2.5 redesign we need a different CSS
15
- switch ($_GET['page']) {
16
- case NGGFOLDER :
17
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/nggadmin.wp25.css" type="text/css" media="screen" />'."\n";
18
- wp_admin_css( 'css/dashboard' );
19
- break;
20
- case "nggallery-add-gallery" :
21
- case "nggallery-options" :
22
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/nggadmin.wp25.css" type="text/css" media="screen" />'."\n";
23
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/jquery.ui.tabs.css" type="text/css" media="print, projection, screen" />'."\n";
24
- break;
25
- case "nggallery-manage-gallery" :
26
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'thickbox/thickbox.css" type="text/css" media="print, projection, screen" />'."\n";
27
- case "nggallery-roles" :
28
- case "nggallery-manage-album" :
29
- echo '<link rel="stylesheet" href="'.NGGALLERY_URLPATH.'admin/css/nggadmin.wp25.css" type="text/css" media="screen" />'."\n";
30
- break;
31
- case "nggallery-style" :
32
- wp_admin_css( 'css/theme-editor' );
33
- break;
34
- }
35
- }
36
-
37
- // Load the NextGEN Gallery Media Upload Tab
38
- include_once (dirname (__FILE__)."/media-upload.php");
39
-
40
- // load script files depend on page
41
- add_action('init', 'ngg_add_admin_js',1);
42
- function ngg_add_admin_js() {
43
- global $wp_version;
44
-
45
- wp_enqueue_script('jquery', NGGALLERY_URLPATH .'admin/js/jquery.js', FALSE, '1.2.2');
46
-
47
- switch ($_GET['page']) {
48
- case "nggallery-manage-gallery" :
49
- wp_enqueue_script('postbox');
50
- wp_enqueue_script('interface', NGGALLERY_URLPATH .'admin/js/interface.js', array('jquery'), '1.2.1');
51
- wp_enqueue_script('ngg-thickbox', NGGALLERY_URLPATH .'thickbox/thickbox-pack.js', array('jquery'), '3.1.1');
52
- break;
53
- case "nggallery-manage-album" :
54
- wp_enqueue_script('interface', NGGALLERY_URLPATH .'admin/js/interface.js', array('jquery'), '1.2.1');
55
- break;
56
- case "nggallery-options" :
57
- wp_enqueue_script('ui-tabs', NGGALLERY_URLPATH .'admin/js/jquery.ui.tabs.pack.js', array('jquery'), '2.7.4');
58
- break;
59
- case "nggallery-add-gallery" :
60
- wp_enqueue_script('ui-tabs', NGGALLERY_URLPATH .'admin/js/jquery.ui.tabs.pack.js', array('jquery'), '2.7.4');
61
- wp_enqueue_script('mutlifile', NGGALLERY_URLPATH .'admin/js/jquery.MultiFile.js', array('jquery'), '1.1.1');
62
- wp_enqueue_script('ngg-swfupload', NGGALLERY_URLPATH .'admin/js/swfupload.js', array('jquery'), '2.0.1');
63
- wp_enqueue_script('ngg-swfupload-handler', NGGALLERY_URLPATH .'admin/js/swfupload.handler.js', array('swfupload'), '1.0.0');
64
- break;
65
- }
66
- }
67
-
68
- // add to menu
69
- add_action('admin_menu', 'add_nextgen_gallery_menu');
70
-
71
- function add_nextgen_gallery_menu()
72
- {
73
- add_menu_page(__('Gallery', 'nggallery'), __('Gallery', 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, 'show_menu');
74
- add_submenu_page( NGGFOLDER , __('Add Gallery', 'nggallery'), __('Add Gallery', 'nggallery'), 'NextGEN Upload images', 'nggallery-add-gallery', 'show_menu');
75
- add_submenu_page( NGGFOLDER , __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', 'show_menu');
76
- add_submenu_page( NGGFOLDER , __('Album', 'nggallery'), __('Album', 'nggallery'), 'NextGEN Edit album', 'nggallery-manage-album', 'show_menu');
77
- add_submenu_page( NGGFOLDER , __('Options', 'nggallery'), __('Options', 'nggallery'), 'NextGEN Change options', 'nggallery-options', 'show_menu');
78
- if (wpmu_enable_function('wpmuStyle'))
79
- add_submenu_page( NGGFOLDER , __('Style', 'nggallery'), __('Style', 'nggallery'), 'NextGEN Change style', 'nggallery-style', 'show_menu');
80
- add_submenu_page( NGGFOLDER , __('Setup Gallery', 'nggallery'), __('Setup', 'nggallery'), 'activate_plugins', 'nggallery-setup', 'show_menu');
81
- if (wpmu_enable_function('wpmuRoles'))
82
- add_submenu_page( NGGFOLDER , __('Roles', 'nggallery'), __('Roles', 'nggallery'), 'activate_plugins', 'nggallery-roles', 'show_menu');
83
- add_submenu_page( NGGFOLDER , __('About this Gallery', 'nggallery'), __('About', 'nggallery'), 'NextGEN Gallery overview', 'nggallery-about', 'show_menu');
84
- if (wpmu_site_admin())
85
- add_submenu_page( 'wpmu-admin.php' , __('NextGEN Gallery', 'nggallery'), __('NextGEN Gallery', 'nggallery'), 'activate_plugins', 'nggallery-wpmu', 'show_menu');
86
-
87
- }
88
-
89
- /************************************************************************/
90
-
91
- // reduce footprint
92
- // Thx to http://weblogtoolscollection.com/archives/2007/07/09/reduce-the-size-of-your-wordpress-plugin-footprint/
93
-
94
- function show_menu() {
95
- global $wp_version;
96
- switch ($_GET["page"]){
97
- case "nggallery-add-gallery" :
98
- include_once (dirname (__FILE__). '/functions.php'); // admin functions
99
- include_once (dirname (__FILE__). '/addgallery.php'); // nggallery_admin_add_gallery
100
- nggallery_admin_add_gallery();
101
- break;
102
- case "nggallery-manage-gallery" :
103
- include_once (dirname (__FILE__). '/functions.php'); // admin functions
104
- include_once (dirname (__FILE__). '/manage.php'); // nggallery_admin_manage_gallery
105
- nggallery_admin_manage_gallery();
106
- break;
107
- case "nggallery-manage-album" :
108
- include_once (dirname (__FILE__). '/album.php'); // nggallery_admin_manage_album
109
- nggallery_admin_manage_album();
110
- break;
111
- case "nggallery-options" :
112
- include_once (dirname (__FILE__). '/settings.php'); // nggallery_admin_options
113
- nggallery_admin_options();
114
- break;
115
- case "nggallery-style" :
116
- include_once (dirname (__FILE__). '/style.php'); // nggallery_admin_style
117
- nggallery_admin_style();
118
- break;
119
- case "nggallery-setup" :
120
- include_once (dirname (__FILE__). '/setup.php'); // nggallery_admin_setup
121
- nggallery_admin_setup();
122
- break;
123
- case "nggallery-roles" :
124
- include_once (dirname (__FILE__). '/roles.php'); // nggallery_admin_roles
125
- nggallery_admin_roles();
126
- break;
127
- case "nggallery-import" :
128
- include_once (dirname (__FILE__). '/myimport.php'); // nggallery_admin_import
129
- nggallery_admin_import();
130
- break;
131
- case "nggallery-about" :
132
- include_once (dirname (__FILE__). '/about.php'); // nggallery_admin_about
133
- nggallery_admin_about();
134
- break;
135
- case "nggallery-wpmu" :
136
- include_once (dirname (__FILE__). '/style.php');
137
- include_once (dirname (__FILE__). '/wpmu.php'); // nggallery_wpmu_admin
138
- nggallery_wpmu_setup();
139
- break;
140
- case "nggallery" :
141
- default :
142
- include_once (dirname (__FILE__). '/overview.php'); // nggallery_admin_overview
143
- nggallery_admin_overview();
144
- break;
145
- }
146
-
147
- }
148
-
149
- /**************************************************************************/
150
- function wpmu_site_admin() {
151
- // Check for site admin
152
- if (function_exists(is_site_admin))
153
- if (is_site_admin())
154
- return true;
155
-
156
- return false;
157
- }
158
-
159
- function wpmu_enable_function($value) {
160
- if (IS_WPMU) {
161
- $ngg_options = get_site_option('ngg_options');
162
- return $ngg_options[$value];
163
- }
164
- // if this is not WPMU, enable it !
165
- return true;
166
- }
167
-
168
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/album.php DELETED
@@ -1,287 +0,0 @@
1
- <?php
2
-
3
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
-
5
- global $wpdb;
6
-
7
- function nggallery_admin_manage_album() {
8
- global $wpdb;
9
-
10
- $albumID = (int) $_POST['act_album'];
11
-
12
- if ($_POST['update']){
13
-
14
- check_admin_referer('ngg_album');
15
-
16
- if ($_POST['newalbum']){
17
- $newalbum = attribute_escape($_POST['newalbum']);
18
- $result = $wpdb->query(" INSERT INTO $wpdb->nggalbum (name, sortorder) VALUES ('$newalbum','0')");
19
- if ($result) nggallery::show_message(__('Update Successfully','nggallery'));
20
- }
21
-
22
- if ($albumID > 0){
23
- // get variable galleryContainer
24
- parse_str($_POST['sortorder']);
25
- if (is_array($galleryContainer)){
26
- $sortorder = array();
27
- foreach($galleryContainer as $gallery) {
28
- $gid = substr($gallery, 4); // get id from "gid-x"
29
- $sortorder[] = $gid;
30
- }
31
- $serial_sort = serialize($sortorder);
32
- $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '$serial_sort' WHERE id = $albumID ");
33
- } else {
34
- $wpdb->query("UPDATE $wpdb->nggalbum SET sortorder = '0' WHERE id = $albumID ");
35
- }
36
- nggallery::show_message(__('Update Successfully','nggallery'));
37
- }
38
- }
39
-
40
- if ($_POST['delete']){
41
- check_admin_referer('ngg_album');
42
-
43
- $result = $wpdb->query("DELETE FROM $wpdb->nggalbum WHERE id = '$albumID' ");
44
- if ($result) nggallery::show_message(__('Album deleted','nggallery'));
45
- }
46
-
47
- ?>
48
-
49
- <script type="text/javascript">
50
-
51
- jQuery(document).ready(
52
- function()
53
- {
54
-
55
- jQuery('div.groupWrapper').Sortable(
56
- {
57
- accept: 'groupItem',
58
- helperclass: 'sort_placeholder',
59
- opacity: 0.7,
60
- tolerance: 'intersect'
61
- }
62
- );
63
-
64
- jQuery('a.min').bind('click', toggleContent);
65
-
66
- // Hide used galleries
67
- jQuery('a#toggle_used').click(function()
68
- {
69
- jQuery('#selectContainer div.inUse').toggle();
70
- return false;
71
- }
72
- );
73
-
74
- // Maximize All Portlets (whole site, no differentiation)
75
- jQuery('a#all_max').click(function()
76
- {
77
- jQuery('div.itemContent:hidden').show();
78
- return false;
79
- }
80
- );
81
-
82
- // Minimize All Portlets (whole site, no differentiation)
83
- jQuery('a#all_min').click(function()
84
- {
85
- jQuery('div.itemContent:visible').hide();
86
- return false;
87
- }
88
- );
89
- // Auto Minimize if more than 4 (whole site, no differentiation)
90
- if(jQuery('a.min').length > 4)
91
- {
92
- jQuery('a.min').html('[+]');
93
- jQuery('div.itemContent:visible').hide();
94
- jQuery('#selectContainer div.inUse').toggle();
95
- };
96
- }
97
- );
98
-
99
- var toggleContent = function(e)
100
- {
101
- var targetContent = jQuery('div.itemContent', this.parentNode.parentNode);
102
- if (targetContent.css('display') == 'none') {
103
- targetContent.slideDown(300);
104
- jQuery(this).html('[-]');
105
- } else {
106
- targetContent.slideUp(300);
107
- jQuery(this).html('[+]');
108
- }
109
- return false;
110
- }
111
-
112
- function ngg_serialize(s)
113
- {
114
- serial = jQuery.SortSerialize(s);
115
- jQuery('input[@name=sortorder]').val(serial.hash);
116
- }
117
- </script>
118
- <div class="wrap album" id="wrap" >
119
- <h2><?php _e('Manage Albums', 'nggallery') ?></h2>
120
- <form id="selectalbum" method="POST" onsubmit="ngg_serialize('galleryContainer')" accept-charset="utf-8">
121
- <?php wp_nonce_field('ngg_album') ?>
122
- <input name="sortorder" type="hidden" />
123
- <table class="ngg-albumnav">
124
- <tr>
125
- <th align="right"><?php _e('Select album', 'nggallery') ?></th>
126
- <td>
127
- <select id="act_album" name="act_album" onchange="this.form.submit();">
128
- <option value="0" ><?php _e('No album selected', 'nggallery') ?></option>
129
- <?php
130
- $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id ASC");
131
- if(is_array($albumlist)) {
132
- foreach($albumlist as $album) {
133
- if ($_POST['act_album'] == $album->id) $selected = 'selected="selected" ';
134
- else $selected = '';
135
- echo '<option value="'.$album->id.'" '.$selected.'>'.$album->name.'</option>'."\n";
136
- }
137
- }
138
- ?>
139
- </select>
140
- </td>
141
- <th align="right"><?php _e('Add new album', 'nggallery') ?></th>
142
- <td><input id="newalbum" name="newalbum" value="" /></td>
143
- <td>
144
- <p class="ngg-submit">
145
- <?php if ($_POST['act_album'] > 0){ ?>
146
- <input type="submit" name="delete" class="button delete" value="<?php _e('Delete') ?> &raquo;" onclick="javascript:check=confirm('<?php _e('Delete album ?','nggallery'); ?>');if(check==false) return false;"/>
147
- <?php } ?>
148
- <input type="submit" name="update" class="button" value="<?php _e('Update') ?> &raquo;" />
149
- </p>
150
- </td>
151
- </tr>
152
- </table>
153
- </form>
154
- <br style="clear: both;"/>
155
- <p>
156
- <div style="float:right;">
157
- <a href="#" id="toggle_used"><?php _e('[Show all]', 'nggallery') ?></a>
158
- | <a href="#" id="all_max"><?php _e('[Maximize]', 'nggallery') ?></a>
159
- | <a href="#" id="all_min"><?php _e('[Minimize]', 'nggallery') ?></a>
160
- </div>
161
- <?php _e('After you create and select a album, you can drag and drop a gallery into your album below','nggallery'); ?>
162
- </p>
163
-
164
- <br class="clear"/>
165
-
166
- <div class="container">
167
- <div id="selectContainer" class="groupWrapper">
168
- <h3><?php _e('Select Gallery', 'nggallery') ?></h3>
169
- <?php
170
- $gallerylist = $wpdb->get_results("SELECT gid FROM $wpdb->nggallery");
171
-
172
- //TODO:Code MUST be optimized, how to flag a used galley better ?
173
- $used_list = getallusedgalleries();
174
-
175
- if(is_array($gallerylist)) {
176
- if ( ($_POST['act_album'] == 0) or (!isset($_POST['act_album'])) ) {
177
- foreach($gallerylist as $gallery) {
178
- if (in_array($gallery->gid,$used_list))
179
- getgallerycontainer($gallery->gid,true);
180
- else
181
- getgallerycontainer($gallery->gid,false);
182
- }
183
- } else {
184
- $act_album = $_POST['act_album'];
185
- $sortorder = $wpdb->get_var("SELECT sortorder FROM $wpdb->nggalbum WHERE id = '$act_album'");
186
- $sort_array = unserialize($sortorder);
187
- // if something went wrong, initialize to empty array
188
- if (!is_array($sort_array)) $sort_array = array();
189
- foreach($gallerylist as $gallery) {
190
- if (!in_array($gallery->gid, $sort_array)) {
191
- if (in_array($gallery->gid,$used_list))
192
- getgallerycontainer($gallery->gid,true);
193
- else
194
- getgallerycontainer($gallery->gid,false);
195
- }
196
- }
197
- }
198
- }
199
- ?>
200
- </div><!-- /#select container -->
201
-
202
- <div id="galleryContainer" class="groupWrapper">
203
- <?php
204
- if ($_POST['act_album'] > 0){
205
- $act_album = $_POST['act_album'];
206
- $album = $wpdb->get_row("SELECT * FROM $wpdb->nggalbum WHERE id = '$act_album'");
207
- echo '<h3>'.__('Album Page ID', 'nggallery').' '.$album->id.' : '.$album->name.'</h3>'."\n";
208
- if (!empty($album->sortorder)) {
209
- $sort_array = unserialize($album->sortorder);
210
- if (is_array($sort_array)) {
211
- foreach($sort_array as $galleryid) {
212
- getgallerycontainer($galleryid,false);
213
- }
214
- }
215
- }
216
- }
217
- else
218
- {
219
- echo '<h3>'.__('No album selected!', 'nggallery').'</h3>';
220
- }
221
- ?>
222
- </div><!-- /#gallery container -->
223
-
224
- </div><!-- /#container -->
225
- </div><!-- /#wrap -->
226
-
227
- <?php
228
- }
229
- function getgallerycontainer($galleryid = 0, $used = false) {
230
- global $wpdb;
231
-
232
- $gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryid'");
233
-
234
- if ($gallery) {
235
-
236
- // set image url
237
- $act_thumbnail_url = get_option ('siteurl')."/".$gallery->path.nggallery::get_thumbnail_folder($gallery->path, FALSE);
238
- $act_thumb_prefix = nggallery::get_thumbnail_prefix($gallery->path, FALSE);
239
-
240
- $post= get_post($gallery->pageid);
241
- $pagename = $post->post_title;
242
- $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$gallery->previewpic'");
243
- if ($filename) $img = '<img src="'.$act_thumbnail_url.$act_thumb_prefix.$filename.'" />';
244
- else $img = '';
245
- // add class if it's in use in other albums
246
- $used = $used ? " inUse" : "";
247
- echo '<div id="gid-'.$gallery->gid.'" class="groupItem'. $used .'">
248
- <div class="innerhandle">
249
- <div class="item_top">
250
- <a href="#" class="min" title="close">[-]</a>
251
- ID: '.$gallery->gid.' || Title: '.$gallery->title.'
252
- </div>
253
- <div class="itemContent">
254
- <div class="inlinepicture">'.$img.'</div>
255
- <p><strong>'.__('ID', 'nggallery').' : </strong>'.$gallery->gid.'</p>
256
- <p><strong>'.__('Name', 'nggallery').' : </strong>'.$gallery->name.'</p>
257
- <p><strong>'.__('Title', 'nggallery').' : </strong>'.$gallery->title.'</p>
258
- <p><strong>'.__('Page', 'nggallery').' : </strong>'.$pagename.'</p>
259
- </div>
260
- </div>
261
- </div>';
262
- }
263
- }
264
-
265
- //get all used galleries form all albums
266
- function getallusedgalleries() {
267
- global $wpdb;
268
-
269
- $albumids = $wpdb->get_col("SELECT id FROM $wpdb->nggalbum");
270
- $used = array();
271
-
272
- if ($albumids) {
273
- foreach($albumids as $albumid) {
274
- $sortorder = $wpdb->get_var("SELECT sortorder FROM $wpdb->nggalbum WHERE id = '$albumid'");
275
- if (!empty($sortorder)) {
276
- $sort_array = unserialize($sortorder);
277
- foreach($sort_array as $galleryid) {
278
- if (!in_array($galleryid,$used))
279
- $used[] = $galleryid;
280
- }
281
- }
282
- }
283
- }
284
- return $used;
285
- }
286
-
287
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/functions.php DELETED
@@ -1,939 +0,0 @@
1
- <?php
2
-
3
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
-
5
- class nggAdmin{
6
-
7
- // **************************************************************
8
- function create_gallery($gallerytitle, $defaultpath) {
9
- // create a new gallery & folder
10
- global $wpdb;
11
-
12
- //cleanup pathname
13
- $galleryname = apply_filters('ngg_gallery_name', $gallerytitle);
14
- $nggpath = $defaultpath.$galleryname;
15
- $nggRoot = WINABSPATH.$defaultpath;
16
- $txt = "";
17
-
18
- // No gallery name ?
19
- if (empty($galleryname)) {
20
- nggallery::show_error( __('No valid gallery name!', 'nggallery') );
21
- return false;
22
- }
23
-
24
- // check for main folder
25
- if ( !is_dir($nggRoot) ) {
26
- if ( !wp_mkdir_p($nggRoot) ) {
27
- $txt = __('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('didn\'t exist. Please create first the main gallery folder ', 'nggallery').'!<br />';
28
- $txt .= __('Check this link, if you didn\'t know how to set the permission :', 'nggallery').' <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a> ';
29
- nggallery::show_error($txt);
30
- return false;
31
- }
32
- }
33
-
34
- // check for permission settings, Safe mode limitations are not taken into account.
35
- if ( !is_writeable($nggRoot ) ) {
36
- $txt = __('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('is not writeable !', 'nggallery').'<br />';
37
- $txt .= __('Check this link, if you didn\'t know how to set the permission :', 'nggallery').' <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a> ';
38
- nggallery::show_error($txt);
39
- return false;
40
- }
41
-
42
- // 1. Create new gallery folder
43
- if ( !is_dir(WINABSPATH.$nggpath) ) {
44
- if ( !wp_mkdir_p (WINABSPATH.$nggpath) )
45
- $txt = __('Unable to create directory ', 'nggallery').$nggpath.'!<br />';
46
- }
47
-
48
- // 2. Check folder permission
49
- if ( !is_writeable(WINABSPATH.$nggpath ) )
50
- $txt .= __('Directory', 'nggallery').' <strong>'.$nggpath.'</strong> '.__('is not writeable !', 'nggallery').'<br />';
51
-
52
- // 3. Now create "thumbs" folder inside
53
- if ( !is_dir(WINABSPATH.$nggpath.'/thumbs') ) {
54
- if ( !wp_mkdir_p ( WINABSPATH.$nggpath.'/thumbs') )
55
- $txt .= __('Unable to create directory ', 'nggallery').' <strong>'.$nggpath.'/thumbs !</strong>';
56
- }
57
-
58
- if (SAFE_MODE) {
59
- $help = __('The server setting Safe-Mode is on !', 'nggallery');
60
- $help .= '<br />'.__('If you have problems, please create directory', 'nggallery').' <strong>'.$nggpath.'</strong> ';
61
- $help .= __('and the thumbnails directory', 'nggallery').' <strong>'.$nggpath.'/thumbs</strong> '.__('with permission 777 manually !', 'nggallery');
62
- nggallery::show_message($help);
63
- }
64
-
65
- // show a error message
66
- if ( !empty($txt) ) {
67
- if (SAFE_MODE) {
68
- // for safe_mode , better delete folder, both folder must be created manually
69
- @rmdir(WINABSPATH.$nggpath.'/thumbs');
70
- @rmdir(WINABSPATH.$nggpath);
71
- }
72
- nggallery::show_error($txt);
73
- return false;
74
- }
75
-
76
- $result=$wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE name = '$galleryname' ");
77
- if ($result) {
78
- nggallery::show_error(__('Gallery', 'nggallery').' <strong>'.$galleryname.'</strong> '.__('already exists', 'nggallery'));
79
- return false;
80
- } else {
81
- $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path, title) VALUES ('$galleryname', '$nggpath', '$gallerytitle') ");
82
- if ($result) nggallery::show_message(__('Gallery', 'nggallery').' <strong>'.$wpdb->insert_id." : ".$galleryname.'</strong> '.__('successfully created!','nggallery')."<br />".__('You can show this gallery with the tag','nggallery').'<strong> [gallery='.$wpdb->insert_id.']</strong>');
83
- return true;;
84
- }
85
- }
86
-
87
- // **************************************************************
88
- function import_gallery($galleryfolder) {
89
- // ** $galleryfolder contains relative path
90
-
91
- //TODO: Check permission of existing thumb folder & images
92
-
93
- global $wpdb;
94
-
95
- $created_msg = "";
96
-
97
- // remove trailing slash at the end, if somebody use it
98
- if (substr($galleryfolder, -1) == '/') $galleryfolder = substr($galleryfolder, 0, -1);
99
- $gallerypath = WINABSPATH.$galleryfolder;
100
-
101
- if (!is_dir($gallerypath)) {
102
- nggallery::show_error(__('Directory', 'nggallery').' <strong>'.$gallerypath.'</strong> '.__('doesn&#96;t exist!', 'nggallery'));
103
- return ;
104
- }
105
-
106
- // read list of images
107
- $new_imageslist = nggAdmin::scandir($gallerypath);
108
- if (empty($new_imageslist)) {
109
- nggallery::show_message(__('Directory', 'nggallery').' <strong>'.$gallerypath.'</strong> '.__('contains no pictures', 'nggallery'));
110
- return;
111
- }
112
- // check & create thumbnail folder
113
- if ( !nggallery::get_thumbnail_folder($gallerypath) )
114
- return;
115
-
116
- // take folder name as gallery name
117
- $galleryname = basename($galleryfolder);
118
-
119
- // check for existing galleryfolder
120
- $gallery_id = $wpdb->get_var("SELECT gid FROM $wpdb->nggallery WHERE path = '$galleryfolder' ");
121
-
122
- if (!$gallery_id) {
123
- $result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path) VALUES ('$galleryname', '$galleryfolder') ");
124
- if (!$result) {
125
- nggallery::show_error(__('Database error. Could not add gallery!','nggallery'));
126
- return;
127
- }
128
- $created_msg =__('Gallery','nggallery').' <strong>'.$galleryname.'</strong> '.__('successfully created!','nggallery').'<br />';
129
- $gallery_id = $wpdb->insert_id; // get index_id
130
- }
131
-
132
- // Look for existing image list
133
- $old_imageslist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$gallery_id' ");
134
- // if no images are there, create empty array
135
- if ($old_imageslist == NULL) $old_imageslist = array();
136
- // check difference
137
- $new_images = array_diff($new_imageslist, $old_imageslist);
138
- // now create thumbnails
139
- nggAdmin::generateThumbnail($gallerypath,$new_images);
140
-
141
- // add images to database
142
- $count_pic = nggAdmin::add_Images($gallery_id, $gallerypath, $new_images);
143
-
144
- nggallery::show_message($created_msg.$count_pic.__(' picture(s) successfully added','nggallery'));
145
- return;
146
-
147
- }
148
- // **************************************************************
149
- function scandir($dirname = ".") {
150
- // thx to php.net :-)
151
- $ext = array("jpeg", "jpg", "png", "gif");
152
- $files = array();
153
- if($handle = opendir($dirname)) {
154
- while(false !== ($file = readdir($handle)))
155
- for($i=0;$i<sizeof($ext);$i++)
156
- if(stristr($file, ".".$ext[$i]))
157
- $files[] = utf8_encode($file);
158
- closedir($handle);
159
- }
160
- sort($files);
161
- return ($files);
162
- }
163
-
164
- // **************************************************************
165
- function resizeImages($gallery_absfolder, $pictures) {
166
- // ** $gallery_absfolder must contain abspath !!
167
-
168
- if(! class_exists('ngg_Thumbnail'))
169
- require_once(NGGALLERY_ABSPATH.'/lib/thumbnail.inc.php');
170
-
171
- $ngg_options = get_option('ngg_options');
172
-
173
- if (is_array($pictures)) {
174
-
175
- $bar = new wpProgressBar(__('Running... Please wait','nggallery'));
176
- $bar->setHeader(__('Resize images','nggallery'));
177
- //total number of elements to process
178
- $elements = count($pictures);
179
- // wait a little bit after finished
180
- if ($elements > 5) $bar->setSleepOnFinish(2);
181
- //print the empty bar
182
- $bar->initialize($elements);
183
-
184
- foreach($pictures as $picture) {
185
-
186
- if (!is_writable($gallery_absfolder."/".$picture)) {
187
- $messagetext .= $gallery_absfolder."/".$picture."<br />";
188
- $bar->increase();
189
- continue;
190
- }
191
-
192
- $thumb = new ngg_Thumbnail($gallery_absfolder."/".$picture, TRUE);
193
- // echo $thumb->errmsg;
194
- // skip if file is not there
195
- if (!$thumb->error) {
196
- $thumb->resize($ngg_options['imgWidth'],$ngg_options['imgHeight'],$ngg_options['imgResampleMode']);
197
- if ( $thumb->save($gallery_absfolder."/".$picture,$ngg_options['imgQuality']) ) {
198
- // do not flush the buffer with useless messages
199
- if ($elements < 100)
200
- $bar->addNote($picture. __(' : Image resized...','nggallery'));
201
- } else
202
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg."</strong>");
203
- $bar->increase();
204
- }
205
- $thumb->destruct();
206
- }
207
- }
208
-
209
- if(!empty($messagetext)) nggallery::show_error('<strong>'.__('Some pictures are not writeable :','nggallery').'</strong><br /><ul>'.$messagetext.'</ul>');
210
- return;
211
- }
212
-
213
- // **************************************************************
214
- function generateWatermark($gallery_absfolder, $pictures) {
215
- // ** $gallery_absfolder must contain abspath !!
216
-
217
- if(! class_exists('ngg_Thumbnail'))
218
- require_once(NGGALLERY_ABSPATH.'/lib/thumbnail.inc.php');
219
-
220
- $ngg_options = get_option('ngg_options');
221
-
222
- if (is_array($pictures)) {
223
-
224
- $bar = new wpProgressBar(__('Running... Please wait','nggallery'));
225
- $bar->setHeader(__('Set watermark','nggallery'));
226
- //total number of elements to process
227
- $elements = count($pictures);
228
- // wait a little bit after finished
229
- if ($elements > 5) $bar->setSleepOnFinish(2);
230
- //print the empty bar
231
- $bar->initialize($elements);
232
-
233
- foreach($pictures as $picture) {
234
-
235
- if (!is_writable($gallery_absfolder."/".$picture)) {
236
- $messagetext .= $gallery_absfolder."/".$picture."<br />";
237
- $bar->increase();
238
- continue;
239
- }
240
-
241
- $thumb = new ngg_Thumbnail($gallery_absfolder."/".$picture, TRUE);
242
- // echo $thumb->errmsg;
243
- // skip if file is not there
244
- if (!$thumb->error) {
245
- if ($ngg_options['wmType'] == 'image') {
246
- $thumb->watermarkImgPath = $ngg_options['wmPath'];
247
- $thumb->watermarkImage($ngg_options['wmPos'], $ngg_options['wmXpos'], $ngg_options['wmYpos']);
248
- }
249
- if ($ngg_options['wmType'] == 'text') {
250
- $thumb->watermarkText = $ngg_options['wmText'];
251
- $thumb->watermarkCreateText($ngg_options['wmColor'], $ngg_options['wmFont'], $ngg_options['wmSize'], $ngg_options['wmOpaque']);
252
- $thumb->watermarkImage($ngg_options['wmPos'], $ngg_options['wmXpos'], $ngg_options['wmYpos']);
253
- }
254
- if ( $thumb->save($gallery_absfolder."/".$picture,$ngg_options['imgQuality']) ) {
255
- // do not flush the buffer with useless messages
256
- if ($elements < 100)
257
- $bar->addNote($picture. __(' : Watermark created...','nggallery'));
258
- } else
259
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg."</strong>");
260
- $bar->increase();
261
- }
262
- $thumb->destruct();
263
- }
264
- }
265
-
266
- if(!empty($messagetext)) nggallery::show_error('<strong>'.__('Some pictures are not writeable :','nggallery').'</strong><br /><ul>'.$messagetext.'</ul>');
267
- return;
268
- }
269
-
270
- // **************************************************************
271
- function generateThumbnail($gallery_absfolder, $pictures) {
272
- // ** $gallery_absfolder must contain abspath !!
273
-
274
- if(! class_exists('ngg_Thumbnail'))
275
- require_once(NGGALLERY_ABSPATH.'/lib/thumbnail.inc.php');
276
-
277
- $ngg_options = get_option('ngg_options');
278
-
279
- $thumbfolder = nggallery::get_thumbnail_folder($gallery_absfolder);
280
- $prefix = nggallery::get_thumbnail_prefix($gallery_absfolder);
281
-
282
- if (!$thumbfolder)
283
- return;
284
-
285
- if (is_array($pictures)) {
286
-
287
- $bar = new wpProgressBar(__('Running... Please wait','nggallery'));
288
- $bar->setHeader(__('Create new thumbnails','nggallery'));
289
- //total number of elements to process
290
- $elements = count($pictures);
291
- // wait a little bit after finished
292
- if ($elements > 10) $bar->setSleepOnFinish(2);
293
- //print the empty bar
294
- $bar->initialize($elements);
295
-
296
- foreach($pictures as $picture) {
297
- // check for existing thumbnail
298
- if (file_exists($gallery_absfolder.$thumbfolder.$prefix.$picture)) {
299
- if (!is_writable($gallery_absfolder.$thumbfolder.$prefix.$picture)) {
300
- $messagetext .= $gallery_absfolder."/".$picture."<br />";
301
- $bar->increase();
302
- continue;
303
- }
304
- }
305
-
306
- $thumb = new ngg_Thumbnail($gallery_absfolder."/".utf8_decode($picture), TRUE);
307
-
308
- // skip if file is not there
309
- if (!$thumb->error) {
310
- if ($ngg_options['thumbcrop']) {
311
-
312
- // THX to Kees de Bruin, better thumbnails if portrait format
313
- $width = $ngg_options['thumbwidth'];
314
- $height = $ngg_options['thumbheight'];
315
- $curwidth = $thumb->currentDimensions['width'];
316
- $curheight = $thumb->currentDimensions['height'];
317
- if ($curwidth > $curheight) {
318
- $aspect = (100 * $curwidth) / $curheight;
319
- } else {
320
- $aspect = (100 * $curheight) / $curwidth;
321
- }
322
- $width = round(($width * $aspect) / 100);
323
- $height = round(($height * $aspect) / 100);
324
- $thumb->resize($width,$height,$ngg_options['thumbResampleMode']);
325
- $thumb->cropFromCenter($width,$ngg_options['thumbResampleMode']);
326
- }
327
- elseif ($ngg_options['thumbfix']) {
328
- // check for portrait format
329
- if ($thumb->currentDimensions['height'] > $thumb->currentDimensions['width']) {
330
- $thumb->resize($ngg_options['thumbwidth'], 0,$ngg_options['thumbResampleMode']);
331
- // get optimal y startpos
332
- $ypos = ($thumb->currentDimensions['height'] - $ngg_options['thumbheight']) / 2;
333
- $thumb->crop(0, $ypos, $ngg_options['thumbwidth'],$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
334
- } else {
335
- $thumb->resize(0,$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
336
- // get optimal x startpos
337
- $xpos = ($thumb->currentDimensions['width'] - $ngg_options['thumbwidth']) / 2;
338
- $thumb->crop($xpos, 0, $ngg_options['thumbwidth'],$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
339
- }
340
- } else {
341
- $thumb->resize($ngg_options['thumbwidth'],$ngg_options['thumbheight'],$ngg_options['thumbResampleMode']);
342
- }
343
- if ( !$thumb->save($gallery_absfolder.$thumbfolder.$prefix.$picture,$ngg_options['thumbquality'])) {
344
- $errortext .= $picture . " <strong>(Error : ".$thumb->errmsg .")</strong><br />";
345
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg)."</strong>";
346
- }
347
- nggAdmin::chmod ($gallery_absfolder.$thumbfolder.$prefix.$picture);
348
- } else {
349
- $errortext .= $picture . " <strong>(Error : ".$thumb->errmsg .")</strong><br />";
350
- $bar->addNote($picture . " : Error : <strong>".$thumb->errmsg."</strong>");
351
- }
352
- $thumb->destruct();
353
- // do not flush the buffer with useless messages
354
- if ($elements < 100)
355
- $bar->addNote($picture. __(' : Thumbnail created...','nggallery'));
356
- $bar->increase();
357
- }
358
- }
359
-
360
- if(!empty($errortext)) nggallery::show_error('<strong>'.__('Follow thumbnails could not created.','nggallery').'</strong><br /><ul>'.$errortext.'</ul>');
361
- if(!empty($messagetext)) nggallery::show_error('<strong>'.__('Some thumbnails are not writeable :','nggallery').'</strong><br /><ul>'.$messagetext.'</ul>');
362
-
363
- return;
364
- }
365
-
366
- // **************************************************************
367
- function add_Images($galleryID, $gallerypath, $imageslist) {
368
- // add images to database
369
- global $wpdb;
370
- $count_pic = 0;
371
- if (is_array($imageslist)) {
372
- foreach($imageslist as $picture) {
373
- $result = $wpdb->query("INSERT INTO $wpdb->nggpictures (galleryid, filename, alttext, exclude) VALUES ('$galleryID', '$picture', '$picture', 0) ");
374
- $pic_id = (int) $wpdb->insert_id;
375
- if ($result) $count_pic++;
376
-
377
- // add the metadata
378
- if ($_POST['addmetadata'])
379
- nggAdmin::import_MetaData($pic_id);
380
-
381
- }
382
- } // is_array
383
-
384
- return $count_pic;
385
-
386
- }
387
-
388
- // **************************************************************
389
- function import_MetaData($imagesIds) {
390
- // add images to database
391
- global $wpdb;
392
-
393
- if (!is_array($imagesIds))
394
- $imagesIds = array($imagesIds);
395
-
396
- foreach($imagesIds as $pic_id) {
397
-
398
- $picture = new nggImage($pic_id );
399
- if (!$picture->error) {
400
-
401
- $meta = nggAdmin::get_MetaData($picture->absPath);
402
-
403
- // get the title
404
- if (!$alttext = $meta['title'])
405
- $alttext = $picture->alttext;
406
- // get the caption / description field
407
- if (!$description = $meta['caption'])
408
- $description = $picture->description;
409
- // update database
410
- $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET alttext = '$alttext', description = '$description' WHERE pid = $pic_id");
411
- // add the tags
412
- if ($meta['keywords']) {
413
- $taglist = explode(",", $meta['keywords']);
414
- $taglist = array_map('trim', $taglist);
415
- // load tag list
416
- $nggTags = new ngg_Tags();
417
- foreach($taglist as $tag) {
418
- // get the tag id
419
- $tagid = $nggTags->add_tag($tag);
420
- if ( $tagid )
421
- $nggTags->add_relationship($pic_id, $tagid);
422
- }
423
- } // add tags
424
- }// error check
425
- } // foreach
426
-
427
- return true;
428
-
429
- }
430
-
431
- // **************************************************************
432
- function get_MetaData($picPath) {
433
- // must be Gallery absPath + filename
434
-
435
- require_once(NGGALLERY_ABSPATH.'/lib/nggmeta.lib.php');
436
-
437
- $meta = array();
438
-
439
- $pdata = new nggMeta($picPath);
440
- $meta['title'] = $pdata->get_META('title');
441
- $meta['caption'] = $pdata->get_META('caption');
442
- $meta['keywords'] = $pdata->get_META('keywords');
443
-
444
- return $meta;
445
-
446
- }
447
-
448
- // **************************************************************
449
- function unzip($dir, $file) {
450
- // thx to Gregor at http://blog.scoutpress.de/forum/topic/45
451
-
452
- if(! class_exists('PclZip'))
453
- require_once(NGGALLERY_ABSPATH.'/lib/pclzip.lib.php');
454
-
455
- $archive = new PclZip($file);
456
-
457
- // extract all files in one folder
458
- if ($archive->extract(PCLZIP_OPT_PATH, $dir, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_CB_PRE_EXTRACT, 'ngg_getOnlyImages') == 0) {
459
- if ($archive->error_code == -22)
460
- nggallery::show_error(__('The Zip-file is too large. Exceed Memory limit !','nggallery'));
461
- else
462
- nggallery::show_error("Error : ".$archive->errorInfo(true));
463
- return false;
464
- }
465
-
466
- return true;
467
- }
468
-
469
- // **************************************************************
470
- function getOnlyImages($p_event, $p_header) {
471
- $info = pathinfo($p_header['filename']);
472
- // check for extension
473
- $ext = array("jpeg", "jpg", "png", "gif");
474
- if (in_array( strtolower($info['extension']), $ext)) {
475
- // For MAC skip the ".image" files
476
- if ($info['basename']{0} == "." )
477
- return 0;
478
- else
479
- return 1;
480
- }
481
- // ----- all other files are skipped
482
- else {
483
- return 0;
484
- }
485
- }
486
-
487
- // **************************************************************
488
- function import_zipfile($defaultpath) {
489
-
490
- if (nggAdmin::check_quota())
491
- return;
492
-
493
- $temp_zipfile = $_FILES['zipfile']['tmp_name'];
494
- $filename = $_FILES['zipfile']['name'];
495
-
496
- // check if file is a zip file
497
- if (!eregi('zip|download|octet-stream', $_FILES['zipfile']['type'])) {
498
- @unlink($temp_zipfile); // del temp file
499
- nggallery::show_error(__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type']);
500
- return;
501
- }
502
-
503
- // get foldername if selected
504
- $foldername = $_POST['zipgalselect'];
505
- if ($foldername == "0") {
506
- //cleanup and take the zipfile name as folder name
507
- $foldername = sanitize_title(strtok ($filename,'.'));
508
- //$foldername = preg_replace ("/(\s+)/", '-', strtolower(strtok ($filename,'.')));
509
- }
510
-
511
- //TODO:FORM must get the path from the tables not from defaultpath !!!
512
- // set complete folder path
513
- $newfolder = WINABSPATH.$defaultpath.$foldername;
514
-
515
- if (!is_dir($newfolder)) {
516
- // create new directories
517
- if (!wp_mkdir_p ($newfolder)) {
518
- $message = sprintf(__('Unable to create directory %s. Is its parent directory writable by the server?', 'nggallery'), $newfolder);
519
- nggallery::show_error($message);
520
- return false;
521
- }
522
- if (!wp_mkdir_p ($newfolder.'/thumbs')) {
523
- nggallery::show_error(__('Unable to create directory ', 'nggallery').$newfolder.'/thumbs !');
524
- return false;
525
- }
526
- }
527
-
528
- // unzip and del temp file
529
- $result = nggAdmin::unzip($newfolder, $temp_zipfile);
530
- @unlink($temp_zipfile);
531
-
532
- if ($result) {
533
- $message = __('Zip-File successfully unpacked','nggallery').'<br />';
534
-
535
- // parse now the folder and add to database
536
- $message .= nggAdmin::import_gallery($defaultpath.$foldername);
537
-
538
- nggallery::show_message($message);
539
- }
540
-
541
- return;
542
- }
543
-
544
- // **************************************************************
545
- function upload_images() {
546
- // upload of pictures
547
-
548
- global $wpdb;
549
-
550
- // WPMU action
551
- if (nggAdmin::check_quota())
552
- return;
553
-
554
- // Images must be an array
555
- $imageslist = array();
556
-
557
- // get selected gallery
558
- $galleryID = (int) $_POST['galleryselect'];
559
-
560
- if ($galleryID == 0) {
561
- nggallery::show_error(__('No gallery selected !','nggallery'));
562
- return;
563
- }
564
-
565
- // get the path to the gallery
566
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
567
-
568
- if (!$gallerypath){
569
- nggallery::show_error(__('Failure in database, no gallery path set !','nggallery'));
570
- return;
571
- }
572
-
573
- // read list of images
574
- $dirlist = nggAdmin::scandir(WINABSPATH.$gallerypath);
575
-
576
- foreach ($_FILES as $key => $value) {
577
-
578
- // look only for uploded files
579
- if ($_FILES[$key]['error'] == 0) {
580
- $temp_file = $_FILES[$key]['tmp_name'];
581
- $filepart = pathinfo ( strtolower($_FILES[$key]['name']) );
582
- // required until PHP 5.2.0
583
- $filepart['filename'] = substr($filepart["basename"],0 ,strlen($filepart["basename"]) - (strlen($filepart["extension"]) + 1) );
584
-
585
- $filename = sanitize_title($filepart['filename']) . "." . $filepart['extension'];
586
-
587
- // check for allowed extension
588
- $ext = array("jpeg", "jpg", "png", "gif");
589
- if (!in_array($filepart['extension'],$ext)){
590
- nggallery::show_error('<strong>'.$_FILES[$key]['name'].' </strong>'.__('is no valid image file!','nggallery'));
591
- continue;
592
- }
593
-
594
- // check if this filename already exist in the folder
595
- $i = 0;
596
- while (in_array($filename,$dirlist)) {
597
- $filename = sanitize_title($filepart['filename']) . "_" . $i++ . "." .$filepart['extension'];
598
- }
599
-
600
- $dest_file = WINABSPATH.$gallerypath."/".$filename;
601
-
602
- //check for folder permission
603
- if (!is_writeable(WINABSPATH.$gallerypath)) {
604
- $message = sprintf(__('Unable to write to directory %s. Is this directory writable by the server?', 'nggallery'), WINABSPATH.$gallerypath);
605
- nggallery::show_error($message);
606
- return;
607
- }
608
-
609
- // save temp file to gallery
610
- if (!@move_uploaded_file($_FILES[$key]['tmp_name'], $dest_file)){
611
- nggallery::show_error(__('Error, the file could not moved to : ','nggallery').$dest_file);
612
- nggAdmin::check_safemode(WINABSPATH.$gallerypath);
613
- continue;
614
- }
615
- if (!nggAdmin::chmod ($dest_file)) {
616
- nggallery::show_error(__('Error, the file permissions could not set','nggallery'));
617
- continue;
618
- }
619
-
620
- // add to imagelist & dirlist
621
- $imageslist[] = $filename;
622
- $dirlist[] = $filename;
623
-
624
- }
625
- }
626
-
627
- if (count($imageslist) > 0) {
628
-
629
- //create thumbnails
630
- nggAdmin::generatethumbnail(WINABSPATH.$gallerypath,$imageslist);
631
-
632
- // add images to database
633
- $count_pic = nggAdmin::add_Images($galleryID, $gallerypath, $imageslist);
634
-
635
- nggallery::show_message($count_pic.__(' Image(s) successfully added','nggallery'));
636
- }
637
-
638
- return;
639
-
640
- } // end function
641
-
642
- // **************************************************************
643
- function swfupload_image($galleryID = 0) {
644
- // This function is called by the swfupload
645
- global $wpdb;
646
- $ngg_options = get_option('ngg_options');
647
-
648
- if ($galleryID == 0) {
649
- @unlink($temp_file);
650
- return __('No gallery selected !','nggallery');;
651
- }
652
-
653
- // WPMU action
654
- if (nggAdmin::check_quota())
655
- return;
656
-
657
- // Check the upload
658
- if (!isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) {
659
- return __('Invalid upload. Error Code : ','nggallery').$_FILES["Filedata"]["error"];
660
- }
661
-
662
- // get the filename and extension
663
- $temp_file = $_FILES["Filedata"]['tmp_name'];
664
- $filepart = pathinfo ( strtolower($_FILES["Filedata"]['name']) );
665
- // required until PHP 5.2.0
666
- $filepart['filename'] = substr($filepart["basename"],0 ,strlen($filepart["basename"]) - (strlen($filepart["extension"]) + 1) );
667
- $filename = sanitize_title($filepart['filename']).".".$filepart['extension'];
668
-
669
- // check for allowed extension
670
- $ext = array("jpeg", "jpg", "png", "gif");
671
- if (!in_array($filepart['extension'],$ext)){
672
- return $_FILES[$key]['name'].__('is no valid image file!','nggallery');
673
- }
674
-
675
- // get the path to the gallery
676
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
677
- if (!$gallerypath){
678
- @unlink($temp_file);
679
- return __('Failure in database, no gallery path set !','nggallery');
680
- }
681
-
682
- // read list of images
683
- $imageslist = nggAdmin::scandir(WINABSPATH.$gallerypath);
684
-
685
- // check if this filename already exist
686
- $i = 0;
687
- while (in_array($filename,$imageslist)) {
688
- $filename = sanitize_title($filepart['filename']) . "_" . $i++ . "." .$filepart['extension'];
689
- }
690
-
691
- $dest_file = WINABSPATH.$gallerypath."/".$filename;
692
-
693
- // save temp file to gallery
694
- if ( !@move_uploaded_file($_FILES["Filedata"]['tmp_name'], $dest_file) ){
695
- nggAdmin::check_safemode(WINABSPATH.$gallerypath);
696
- return __('Error, the file could not moved to : ','nggallery').$dest_file;
697
- }
698
-
699
- if ( !nggAdmin::chmod($dest_file) ) {
700
- return __('Error, the file permissions could not set','nggallery');
701
- }
702
-
703
- return "0";
704
- }
705
-
706
- // **************************************************************
707
- function check_quota() {
708
- // Only for WPMU
709
- if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck'))
710
- if( $error = upload_is_user_over_quota( false ) ) {
711
- nggallery::show_error( __( 'Sorry, you have used your space allocation. Please delete some files to upload more files.','nggallery' ) );
712
- return true;
713
- }
714
- return false;
715
- }
716
-
717
- // **************************************************************
718
- function chmod($filename = "") {
719
- // Set correct file permissions (taken from wp core)
720
- $stat = @ stat(dirname($filename));
721
- $perms = $stat['mode'] & 0007777;
722
- $perms = $perms & 0000666;
723
- if ( @chmod($filename, $perms) )
724
- return true;
725
-
726
- return false;
727
- }
728
-
729
- function check_safemode($foldername) {
730
- // Check UID in folder and Script
731
- // Read http://www.php.net/manual/en/features.safe-mode.php to understand safe_mode
732
- if ( SAFE_MODE ) {
733
-
734
- $script_uid = ( ini_get('safe_mode_gid') ) ? getmygid() : getmyuid();
735
- $folder_uid = fileowner($foldername);
736
-
737
- if ($script_uid != $folder_uid) {
738
- $message = sprintf(__('SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually','nggallery'), $foldername);
739
- $message .= '<br />' . sprintf(__('When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory','nggallery'), $script_uid, $folder_uid );
740
- nggallery::show_error($message);
741
- return false;
742
- }
743
- }
744
-
745
- return true;
746
- }
747
-
748
- } // END class nggAdmin
749
-
750
- /**
751
- * Class wpProgressBar for WordPress & NextGEN Gallery
752
- * Easy to use progress bar in html and css.
753
- *
754
- * @author Based on ProgressBar from David Bongard (mail@bongard.net | www.bongard.net)
755
- * and Phillip Berndt (standards.webmasterpro.de)
756
- * @mixed by Alex Rabe
757
- * @version 1.0 - 20071201
758
- * @license http://www.opensource.org/licenses/mit-license.php MIT License
759
- * @copyright Copyright &copy; 2007, David Bongard , Phillip Berndt
760
- *
761
- */
762
- class wpProgressBar {
763
-
764
- /**
765
- * Constructor
766
- *
767
- * @param str $message Message shown above the bar eg. "Please wait...". Default: ''
768
- * @param bool $hide Hide the bar after completion (with JavaScript). Default: true
769
- * @param int $sleepOnFinish Seconds to sleep after bar completion. Default: 0
770
- * @param int $barLength Length in percent. Default: 100
771
- * @param str $domID Html-Attribute "id" for the bar
772
- * @param str $header the header title
773
- */
774
- function wpProgressBar($message='', $hide=true, $sleepOnFinish=0, $domID='progressbar', $header='')
775
- {
776
- global $pb_instance;
777
- $this->instance = $pb_instance++;
778
- $this->setAutohide($hide);
779
- $this->setSleepOnFinish($sleepOnFinish);
780
- $this->setDomIDs($domID);
781
- $this->setMessage($message);
782
- $this->setheader($header);
783
- }
784
-
785
-
786
- /**
787
- * Print the empty progress bar
788
- * @param int $numElements Number of Elements to be processed and number of times $bar->initialize() will be called while processing
789
- */
790
- function initialize($numElements)
791
- {
792
- $this->StepCount = 0;
793
- $this->ListCount = 0;
794
-
795
- $numElements = (int) $numElements ;
796
-
797
- if($numElements == 0)
798
- return;
799
-
800
- $this->numSteps = $numElements;
801
-
802
- //calculate the % per Step
803
- $this->percentPerStep = round (100 / $numElements, 2);
804
-
805
- //stop buffering
806
- ob_end_flush();
807
- //start buffering
808
- ob_start();
809
-
810
- echo '<div id="'.$this->domID.'_container" class="wrap">
811
- <h2>'.$this->header.'</h2>
812
- <div id="'.$this->domID.'" class="progressborder"><div class="progressbar"><span>0%</span></div></div>
813
- <div class="progressbar_message"><span style="display:block" id="'.$this->domIDMessage.'">'.$this->message.'</span></div>
814
- <ul id="'.$this->domIDProgressNote.'">&nbsp;</ul>
815
- </div>
816
-
817
- <script type="text/javascript">
818
- <!--
819
- oProgressbar = document.getElementById("'.$this->domID.'").firstChild;
820
- function progress(value)
821
- {
822
- oProgressbar.firstChild.firstChild.nodeValue = oProgressbar.style.width = value + "%";
823
- }
824
- // -->
825
- </script>';
826
-
827
- ob_flush();
828
- flush();
829
-
830
- $this->initialized = true;
831
- }
832
-
833
- /**
834
- * Count steps and increase bar length
835
- *
836
- */
837
- function increase()
838
- {
839
- if($this->StepCount < $this->numSteps) {
840
- //add a step
841
- $this->StepCount++;
842
-
843
- $value = $this->StepCount * $this->percentPerStep;
844
- echo('<script type="text/javascript">progress('.intval($value).');</script>');
845
-
846
- ob_flush();
847
- flush();
848
- }
849
-
850
- if(!$this->finished && $this->StepCount == $this->numSteps){
851
- // to be sure that based on round we reached 100%
852
- if ($value != 100){
853
- echo('<script type="text/javascript">progress('.intval(100).');</script>');
854
- ob_flush();
855
- flush();
856
- }
857
- $this->stop();
858
- }
859
- }
860
-
861
- function stop($error=false)
862
- {
863
-
864
- //sleep x seconds before ending the script
865
- if(!$error){
866
- if($this->sleepOnFinish > 0){
867
- sleep($this->sleepOnFinish);
868
- }
869
-
870
- //hide the bar
871
- if($this->hide){
872
- echo '<script type="text/javascript">document.getElementById("'.$this->domID.'_container").style.display = "none";</script>';
873
- ob_flush();
874
- flush();
875
- }
876
- }
877
- $this->finished = true;
878
- }
879
-
880
- function setMessage($text)
881
- {
882
- if($this->initialized){
883
- echo '<script type="text/javascript">document.getElementById("'.$this->domIDMessage.'").innerHTML = "'.$text.'";</script>';
884
- ob_flush();flush();
885
- }else{
886
- $this->message = $text;
887
- }
888
- }
889
-
890
- function addNote($text)
891
- {
892
- if($this->initialized){
893
- echo '<script type="text/javascript">
894
- var newLI = document.createElement("li");
895
- var note = document.createTextNode("'.$text.'");
896
- document.getElementById("'.$this->domIDProgressNote.'").appendChild(newLI);
897
- document.getElementById("'.$this->domIDProgressNote.'").getElementsByTagName("li")['.$this->ListCount.'].appendChild(note);
898
- </script>';
899
- $this->ListCount++;
900
- if ($this->numSteps < 150) {
901
- ob_flush();
902
- flush();
903
- }
904
- }
905
- }
906
-
907
- function setAutohide($hide)
908
- {
909
- $this->hide = (bool) $hide;
910
- }
911
-
912
- function setHeader($header)
913
- {
914
- $this->header = $header;
915
- }
916
-
917
- function setSleepOnFinish($sleepOnFinish)
918
- {
919
- $this->sleepOnFinish = (int) $sleepOnFinish;
920
- }
921
-
922
- function setDomIDs($domID)
923
- {
924
- $this->domID = strip_tags($domID).$this->instance;
925
- $this->domIDMessage = $this->domID.'_message';
926
- $this->domIDProgressNote = $this->domID.'_note';
927
- }
928
-
929
- }
930
-
931
- // **************************************************************
932
- //TODO: Cannot be member of a class ? Check PCLZIP later...
933
- function ngg_getOnlyImages($p_event, $p_header) {
934
-
935
- return nggAdmin::getOnlyImages($p_event, $p_header);
936
-
937
- }
938
-
939
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/index.html DELETED
File without changes
admin/wp25/manage.php DELETED
@@ -1,785 +0,0 @@
1
- <?php
2
-
3
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
-
5
- function nggallery_admin_manage_gallery() {
6
- global $wpdb;
7
-
8
- //TODO:GID & Mode should the hidden post variables
9
-
10
- // GET variables
11
- $act_gid = (int) $_GET['gid'];
12
- $act_pid = (int) $_GET['pid'];
13
- $mode = trim(attribute_escape($_GET['mode']));
14
-
15
- // get the options
16
- $ngg_options=get_option('ngg_options');
17
-
18
- //TODO: Remove this vars
19
- $hideThumbs = ngg_hide_thumb();
20
- $showTags = ngg_show_tags();
21
-
22
- if ($mode == 'delete') {
23
- // Delete a gallery
24
-
25
- check_admin_referer('ngg_editgallery');
26
-
27
- // get the path to the gallery
28
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
29
- if ($gallerypath){
30
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
31
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
32
-
33
- // delete pictures
34
- $imagelist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$act_gid' ");
35
- if ($ngg_options['deleteImg']) {
36
- if (is_array($imagelist)) {
37
- foreach ($imagelist as $filename) {
38
- @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$filename);
39
- @unlink(WINABSPATH.$gallerypath.'/'.$filename);
40
- }
41
- }
42
- // delete folder
43
- @rmdir(WINABSPATH.$gallerypath.'/'.$thumb_folder);
44
- @rmdir(WINABSPATH.$gallerypath);
45
- }
46
- }
47
-
48
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE galleryid = $act_gid");
49
- $delete_galllery = $wpdb->query("DELETE FROM $wpdb->nggallery WHERE gid = $act_gid");
50
-
51
- if($delete_galllery)
52
- $messagetext = '<font color="green">'.__('Gallery','nggallery').' \''.$act_gid.'\' '.__('deleted successfully','nggallery').'</font>';
53
- $mode = 'main'; // show mainpage
54
- }
55
-
56
- if ($mode == 'delpic') {
57
- // Delete a picture
58
- check_admin_referer('ngg_delpicture');
59
- $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$act_pid' ");
60
- if ($filename) {
61
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
62
- if ($gallerypath){
63
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
64
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
65
- if ($ngg_options['deleteImg']) {
66
- @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$filename);
67
- @unlink(WINABSPATH.$gallerypath.'/'.$filename);
68
- }
69
- }
70
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $act_pid");
71
- }
72
- if($delete_pic)
73
- $messagetext = '<font color="green">'.__('Picture','nggallery').' \''.$act_pid.'\' '.__('deleted successfully','nggallery').'</font>';
74
- $mode = 'edit'; // show pictures
75
-
76
- }
77
-
78
- if (isset ($_POST['bulkaction']) && isset ($_POST['doaction'])) {
79
- // do bulk update
80
-
81
- check_admin_referer('ngg_updategallery');
82
-
83
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
84
- $imageslist = array();
85
-
86
- if ( is_array($_POST['doaction']) ) {
87
- foreach ( $_POST['doaction'] as $imageID ) {
88
- $imageslist[] = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$imageID' ");
89
- }
90
- }
91
-
92
- switch ($_POST['bulkaction']) {
93
- case 0;
94
- // No action
95
- break;
96
- case 1:
97
- // Set watermark
98
- nggAdmin::generateWatermark(WINABSPATH.$gallerypath,$imageslist);
99
- nggallery::show_message(__('Watermark successfully added',"nggallery"));
100
- break;
101
- case 2:
102
- // Create new thumbnails
103
- nggAdmin::generateThumbnail(WINABSPATH.$gallerypath,$imageslist);
104
- nggallery::show_message(__('Thumbnails successfully created. Please refresh your browser cache.',"nggallery"));
105
- break;
106
- case 3:
107
- // Resample images
108
- nggAdmin::resizeImages(WINABSPATH.$gallerypath,$imageslist);
109
- nggallery::show_message(__('Images successfully resized',"nggallery"));
110
- break;
111
- case 4:
112
- // Delete images
113
- if ( is_array($_POST['doaction']) ) {
114
- if ($gallerypath){
115
- $thumb_folder = nggallery::get_thumbnail_folder($gallerypath, FALSE);
116
- $thumb_prefix = nggallery::get_thumbnail_prefix($gallerypath, FALSE);
117
- foreach ( $_POST['doaction'] as $imageID ) {
118
- $filename = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$imageID' ");
119
- if ($ngg_options['deleteImg']) {
120
- @unlink(WINABSPATH.$gallerypath.'/'.$thumb_folder.'/'.$thumb_prefix.$filename);
121
- @unlink(WINABSPATH.$gallerypath.'/'.$filename);
122
- }
123
- $delete_pic = $wpdb->query("DELETE FROM $wpdb->nggpictures WHERE pid = $imageID");
124
- }
125
- }
126
- if($delete_pic)
127
- nggallery::show_message(__('Pictures deleted successfully ',"nggallery"));
128
- }
129
- break;
130
- case 8:
131
- // Import Metadata
132
- nggAdmin::import_MetaData($_POST['doaction']);
133
- nggallery::show_message(__('Import metadata finished',"nggallery"));
134
- break;
135
- }
136
- }
137
-
138
- if (isset ($_POST['TB_tagaction']) && isset ($_POST['TB_doaction'])) {
139
- // do tags update
140
-
141
- check_admin_referer('ngg_form-tags');
142
-
143
- // get the images list
144
- $pic_ids = explode(",", $_POST['TB_imagelist']);
145
- $taglist = explode(",", $_POST['taglist']);
146
- $taglist = array_map('trim', $taglist);
147
- $slugarray = array_map('sanitize_title', $taglist);
148
-
149
- // load tag list
150
- $nggTags = new ngg_Tags();
151
-
152
- foreach($pic_ids as $pic_id) {
153
-
154
- // which action should be performed ?
155
- switch ($_POST['TB_tagaction']) {
156
- case 0;
157
- // No action
158
- break;
159
- case 7:
160
- // Overwrite tags
161
- // remove all binding
162
- $wpdb->query("DELETE FROM $wpdb->nggpic2tags WHERE picid = '$pic_id'");
163
- // and add now the new tags
164
- case 5:
165
- // Add / append tags
166
- foreach($taglist as $tag) {
167
- // get the tag id
168
- $tagid = $nggTags->add_tag($tag);
169
- if ( $tagid )
170
- $nggTags->add_relationship($pic_id, $tagid);
171
- }
172
- break;
173
- case 6:
174
- // Delete tags
175
- $nggTags->remove_relationship($pic_id, $slugarray, false);
176
- break;
177
- }
178
- }
179
-
180
- // remove not longer used tag
181
- $nggTags->remove_unused_tags();
182
-
183
- nggallery::show_message(__('Tags changed',"nggallery"));
184
- }
185
-
186
- if (isset ($_POST['updatepictures'])) {
187
- // Update pictures
188
-
189
- check_admin_referer('ngg_updategallery');
190
-
191
- $gallery_title = attribute_escape($_POST['title']);
192
- $gallery_path = attribute_escape($_POST['path']);
193
- $gallery_desc = attribute_escape($_POST['gallerydesc']);
194
- $gallery_pageid = attribute_escape($_POST['pageid']);
195
- $gallery_preview = attribute_escape($_POST['previewpic']);
196
-
197
- $result = $wpdb->query("UPDATE $wpdb->nggallery SET title= '$gallery_title', path= '$gallery_path', galdesc = '$gallery_desc', pageid = '$gallery_pageid', previewpic = '$gallery_preview' WHERE gid = '$act_gid'");
198
- if ($showTags)
199
- $result = ngg_update_tags(attribute_escape($_POST['tags']));
200
- else
201
- $result = ngg_update_pictures(attribute_escape($_POST['description']), attribute_escape($_POST['alttext']), attribute_escape($_POST['exclude']), $act_gid );
202
-
203
- //hook for other plugin to update the fields
204
- do_action('ngg_update_gallery', $act_gid, $_POST);
205
-
206
- nggallery::show_message(__('Update successful',"nggallery"));
207
- }
208
-
209
- if (isset ($_POST['scanfolder'])) {
210
- // Rescan folder
211
- check_admin_referer('ngg_updategallery');
212
-
213
- $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
214
- nggAdmin::import_gallery($gallerypath);
215
- }
216
-
217
- if (isset ($_POST['addnewpage'])) {
218
- // Add a new page
219
-
220
- check_admin_referer('ngg_updategallery');
221
-
222
- $parent_id = attribute_escape($_POST['parent_id']);
223
- $gallery_title = attribute_escape($_POST['title']);
224
- $gallery_name = $wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
225
-
226
- // Create a WP page
227
- global $user_ID;
228
-
229
- $page['post_type'] = 'page';
230
- $page['post_content'] = '[gallery='.$act_gid.']';
231
- $page['post_parent'] = $parent_id;
232
- $page['post_author'] = $user_ID;
233
- $page['post_status'] = 'publish';
234
- $page['post_title'] = $gallery_title == '' ? $gallery_name : $gallery_title;
235
-
236
- $gallery_pageid = wp_insert_post ($page);
237
- if ($gallery_pageid != 0) {
238
- $result = $wpdb->query("UPDATE $wpdb->nggallery SET title= '$gallery_title', pageid = '$gallery_pageid' WHERE gid = '$act_gid'");
239
- $messagetext = '<font color="green">'.__('New gallery page ID','nggallery'). ' ' . $pageid . ' -> <strong>' . $gallery_title . '</strong> ' .__('created','nggallery').'</font>';
240
- }
241
- }
242
-
243
- if (isset ($_POST['backToGallery'])) {
244
- $mode = 'edit';
245
- }
246
-
247
- // show sort order
248
- if ( ($mode == 'sort') || isset ($_POST['sortGallery'])) {
249
- $mode = 'sort';
250
- include_once (dirname (__FILE__). '/sort.php');
251
- nggallery_sortorder($act_gid);
252
- return;
253
- }
254
-
255
- // message windows
256
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
257
-
258
- if (($mode == '') or ($mode == "main"))
259
- nggallery_manage_gallery_main();
260
-
261
- if ($mode == 'edit')
262
- nggallery_picturelist($hideThumbs,$showTags);
263
-
264
- }//nggallery_admin_manage_gallery
265
-
266
- function nggallery_manage_gallery_main() {
267
- // *** show main gallery list
268
-
269
- global $wpdb;
270
-
271
- ?>
272
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
273
- <div class="wrap">
274
- <h2><?php _e('Gallery Overview', 'nggallery') ?></h2>
275
- <br style="clear: both;"/>
276
- <table class="widefat">
277
- <thead>
278
- <tr>
279
- <th scope="col" ><?php _e('ID') ?></th>
280
- <th scope="col" ><?php _e('Gallery name', 'nggallery') ?></th>
281
- <th scope="col" ><?php _e('Title', 'nggallery') ?></th>
282
- <th scope="col" ><?php _e('Description', 'nggallery') ?></th>
283
- <th scope="col" ><?php _e('Page ID', 'nggallery') ?></th>
284
- <th scope="col" ><?php _e('Quantity', 'nggallery') ?></th>
285
- <th scope="col" ><?php _e('Action'); ?></th>
286
- </tr>
287
- </thead>
288
- <tbody>
289
- <?php
290
- $gallerylist = $wpdb->get_results("SELECT * FROM $wpdb->nggallery ORDER BY gid ASC");
291
- if($gallerylist) {
292
- foreach($gallerylist as $gallery) {
293
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
294
- $gid = $gallery->gid;
295
- $counter = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$gid'");
296
- ?>
297
- <tr id="gallery-<?php echo $gid ?>" <?php echo $class; ?> >
298
- <th scope="row"><?php echo $gid; ?></th>
299
- <td><?php echo $gallery->name; ?></td>
300
- <td><?php echo $gallery->title; ?></td>
301
- <td><?php echo $gallery->galdesc; ?></td>
302
- <td><?php echo $gallery->pageid; ?></td>
303
- <td><?php echo $counter; ?></td>
304
- <td><a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=edit&amp;gid=".$gid, 'ngg_editgallery')?>" class='edit'> <?php _e('Edit') ?></a>
305
- | <a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=delete&amp;gid=".$gid, 'ngg_editgallery')?>" class="delete" onclick="javascript:check=confirm( '<?php _e("Delete this gallery ?",'nggallery')?>');if(check==false) return false;"><?php _e('Delete') ?></a></td>
306
- </tr>
307
- <?php
308
- }
309
- } else {
310
- echo '<tr><td colspan="7" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
311
- }
312
- ?>
313
- </tbody>
314
- </table>
315
- </div>
316
- <?php
317
- } //nggallery_manage_gallery_main
318
-
319
- function nggallery_picturelist($hideThumbs = false,$showTags = false) {
320
- // *** show picture list
321
- global $wpdb;
322
-
323
- // GET variables
324
- $act_gid = trim(attribute_escape($_GET['gid']));
325
-
326
- // get the options
327
- $ngg_options=get_option('ngg_options');
328
-
329
- //TODO:A unique gallery call must provide me with this information, like $gallery = new nggGallery($id);
330
-
331
- // get gallery values
332
- $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$act_gid' ");
333
-
334
- // set gallery url
335
- $act_gallery_url = get_option ('siteurl')."/".$act_gallery->path."/";
336
- $act_thumbnail_url = get_option ('siteurl')."/".$act_gallery->path.nggallery::get_thumbnail_folder($act_gallery->path, FALSE);
337
- $act_thumb_prefix = nggallery::get_thumbnail_prefix($act_gallery->path, FALSE);
338
-
339
- ?>
340
-
341
- <script type="text/javascript">
342
- function enterTags(form) {
343
-
344
- var elementlist = "";
345
- for (i = 0, n = form.elements.length; i < n; i++) {
346
- if(form.elements[i].type == "checkbox") {
347
- if(form.elements[i].name == "doaction[]")
348
- if(form.elements[i].checked == true)
349
- if (elementlist == "")
350
- elementlist = form.elements[i].value
351
- else
352
- elementlist += "," + form.elements[i].value ;
353
- }
354
- }
355
- jQuery("#TB_tagaction").val(jQuery("#bulkaction").val());
356
- jQuery("#TB_imagelist").val(elementlist);
357
- // console.log (jQuery("#TB_imagelist").val());
358
- jQuery.tb_show("", "#TB_inline?width=640&height=120&inlineId=tags&modal=true", false);
359
- }
360
- </script>
361
- <script type="text/javascript"> var tb_pathToImage = '<?php echo NGGALLERY_URLPATH ?>thickbox/loadingAnimationv3.gif';</script>
362
- <script type="text/javascript">
363
- <!--
364
- function checkAll(form)
365
- {
366
- for (i = 0, n = form.elements.length; i < n; i++) {
367
- if(form.elements[i].type == "checkbox") {
368
- if(form.elements[i].name == "doaction[]") {
369
- if(form.elements[i].checked == true)
370
- form.elements[i].checked = false;
371
- else
372
- form.elements[i].checked = true;
373
- }
374
- }
375
- }
376
- }
377
-
378
- function getNumChecked(form)
379
- {
380
- var num = 0;
381
- for (i = 0, n = form.elements.length; i < n; i++) {
382
- if(form.elements[i].type == "checkbox") {
383
- if(form.elements[i].name == "doaction[]")
384
- if(form.elements[i].checked == true)
385
- num++;
386
- }
387
- }
388
- return num;
389
- }
390
-
391
- jQuery(document).ready( function() {
392
- // close postboxes that should be closed
393
- jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
394
- // postboxes
395
- add_postbox_toggles('ngg-manage-gallery');
396
- });
397
-
398
- //-->
399
- </script>
400
- <div class="wrap">
401
- <h2><?php _e('Gallery', 'nggallery') ?> : <?php echo $act_gallery->title; ?></h2>
402
-
403
- <br style="clear: both;"/>
404
-
405
- <form id="updategallery" method="POST" action="<?php echo 'admin.php?page=nggallery-manage-gallery&amp;mode=edit&amp;gid='.$act_gid ?>" accept-charset="utf-8">
406
- <?php wp_nonce_field('ngg_updategallery') ?>
407
-
408
- <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
409
- <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
410
- <div id="poststuff">
411
- <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
412
- <div id="gallerydiv" class="postbox <?php echo postbox_classes('gallerydiv', 'ngg-manage-gallery'); ?>" >
413
- <h3><?php _e('Gallery settings', 'nggallery') ?></h3>
414
- <div class="inside">
415
- <table class="form-table" >
416
- <tr>
417
- <th align="left"><?php _e('Title') ?>:</th>
418
- <th align="left"><input type="text" size="50" name="title" value="<?php echo $act_gallery->title; ?>" /></th>
419
- <th align="right"><?php _e('Page Link to', 'nggallery') ?>:</th>
420
- <th align="left">
421
- <select name="pageid" style="width:95%">
422
- <option value="0" ><?php _e('Not linked', 'nggallery') ?></option>
423
- <?php
424
- $pageids = get_all_page_ids();
425
- foreach($pageids as $pageid) {
426
- $post= get_post($pageid);
427
- if ($pageid == $act_gallery->pageid) $selected = 'selected="selected" ';
428
- else $selected = '';
429
- echo '<option value="'.$pageid.'" '.$selected.'>'.$post->post_title.'</option>'."\n";
430
- }
431
- ?>
432
- </select>
433
- </th>
434
- </tr>
435
- <tr>
436
- <th align="left"><?php _e('Description') ?>:</th>
437
- <th align="left"><textarea name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php echo $act_gallery->galdesc; ?></textarea></th>
438
- <th align="right"><?php _e('Preview image', 'nggallery') ?>:</th>
439
- <th align="left">
440
- <select name="previewpic" >
441
- <option value="0" ><?php _e('No Picture', 'nggallery') ?></option>
442
- <?php
443
- $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$act_gid' ORDER BY $ngg_options[galSort] $ngg_options[galSortDir]");
444
- if(is_array($picturelist)) {
445
- foreach($picturelist as $picture) {
446
- if ($picture->pid == $act_gallery->previewpic) $selected = 'selected="selected" ';
447
- else $selected = '';
448
- echo '<option value="'.$picture->pid.'" '.$selected.'>'.$picture->filename.'</option>'."\n";
449
- }
450
- }
451
- ?>
452
- </select>
453
- </th>
454
- </tr>
455
- <tr>
456
- <th align="left"><?php _e('Path', 'nggallery') ?>:</th>
457
- <th align="left"><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="50" name="path" value="<?php echo $act_gallery->path; ?>" /></th>
458
-
459
- <th align="right"><?php _e('Create new page', 'nggallery') ?>:</th>
460
- <th align="left">
461
- <select name="parent_id" style="width:95%">
462
- <option value="0"><?php _e ('Main page (No parent)', 'nggallery'); ?></option>
463
- <?php parent_dropdown ($group->page_id); ?>
464
- </select>
465
- <input type="submit" name="addnewpage" value="<?php _e ('Add page', 'nggallery'); ?>" id="group"/>
466
- </th>
467
- </tr>
468
-
469
- </table>
470
-
471
- <div class="submit">
472
- <input type="submit" name="scanfolder" value="<?php _e("Scan Folder for new images",'nggallery')?> " />
473
- <input type="submit" name="updatepictures" value="<?php _e("Save Changes",'nggallery')?> &raquo;" />
474
- </div>
475
-
476
- </div>
477
- </div>
478
- </div> <!-- poststuff -->
479
-
480
- <div class="tablenav ngg-tablenav">
481
- <div style="float: left;">
482
- <select id="bulkaction" name="bulkaction">
483
- <option value="0" ><?php _e("No action",'nggallery')?></option>
484
- <?php if (!$showTags) { ?>
485
- <option value="1" ><?php _e("Set watermark",'nggallery')?></option>
486
- <option value="2" ><?php _e("Create new thumbnails",'nggallery')?></option>
487
- <option value="3" ><?php _e("Resize images",'nggallery')?></option>
488
- <option value="4" ><?php _e("Delete images",'nggallery')?></option>
489
- <option value="8" ><?php _e("Import metadata",'nggallery')?></option>
490
- <?php } else { ?>
491
- <option value="5" ><?php _e("Add tags",'nggallery')?></option>
492
- <option value="6" ><?php _e("Delete tags",'nggallery')?></option>
493
- <option value="7" ><?php _e("Overwrite tags",'nggallery')?></option>
494
- <?php } ?>
495
- </select>
496
-
497
- <?php if (!$showTags) { ?> <input class="button-secondary" type="submit" name="doaction" value="<?php _e("OK",'nggallery')?>" onclick="var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>')" /><?php } else {?>
498
- <input class="button-secondary" type="submit" name="showThickbox" value="<?php _e("OK",'nggallery')?>" onclick="enterTags(document.getElementById('updategallery')); return false;" /><?php } ?>
499
- <?php if (!$hideThumbs) { ?> <input class="button-secondary" type="submit" name="togglethumbs" value="<?php _e("Hide thumbnails ",'nggallery')?>" /> <?php } else {?>
500
- <input class="button-secondary" type="submit" name="togglethumbs" value="<?php _e("Show thumbnails ",'nggallery')?>" /><?php } ?>
501
- <?php if (!$showTags) { ?><input class="button-secondary" type="submit" name="toggletags" value="<?php _e("Show tags",'nggallery')?>" /> <?php } else {?>
502
- <input class="button-secondary" type="submit" name="toggletags" value="<?php _e("Hide tags",'nggallery')?>" /><?php } ?>
503
- <?php if ($ngg_options['galSort'] == "sortorder") { ?>
504
- <input class="button-secondary" type="submit" name="sortGallery" value="<?php _e("Sort gallery",'nggallery')?>" />
505
- <?php } ?>
506
- </div>
507
- <span style="float:right;"><input type="submit" name="updatepictures" class="button-secondary" value="<?php _e("Save Changes",'nggallery')?> &raquo;" /></span>
508
- </div>
509
- <br style="clear: both;"/>
510
- <table id="ngg-listimages" class="widefat" >
511
- <thead>
512
- <tr>
513
- <?php $gallery_columns = ngg_manage_gallery_columns(); ?>
514
- <?php foreach($gallery_columns as $gallery_column_key => $column_display_name) {
515
- switch ($gallery_column_key) {
516
- case 'cb' :
517
- $class = ' class="check-column"';
518
- break;
519
- case 'tags' :
520
- $class = ' style="width:70%"';
521
- break;
522
- case 'action' :
523
- $class = ' colspan="3" style="text-align: center"';
524
- break;
525
- default :
526
- $class = ' style="text-align: center"';
527
- }
528
- ?>
529
- <th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
530
- <?php } ?>
531
- </tr>
532
- </thead>
533
- <tbody>
534
- <?php
535
- // load tags
536
- if ($showTags) $nggTags = new ngg_Tags();
537
- if($picturelist) {
538
- foreach($picturelist as $picture) {
539
- //TODO: Ajax delete version , looks better
540
- //TODO: Use effect for inactive pic : style="filter:alpha(opacity=30); -moz-opacity:0.3"
541
-
542
- $pid = $picture->pid;
543
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
544
- $exclude = ( $picture->exclude ) ? 'checked="checked"' : '';
545
-
546
- ?>
547
- <tr id="picture-<?php echo $pid ?>" <?php echo $class ?> style="text-align:center">
548
- <?php foreach($gallery_columns as $gallery_column_key => $column_display_name) {
549
- switch ($gallery_column_key) {
550
- case 'cb' :
551
- ?>
552
- <td class="check-column" scope="row"><input name="doaction[]" type="checkbox" value="<?php echo $pid ?>" /></td>
553
- <?php
554
- break;
555
- case 'id' :
556
- ?>
557
- <td scope="row" style="text-align: center"><?php echo $pid ?></td>
558
- <?php
559
- break;
560
- case 'filename' :
561
- ?>
562
- <td class="media-icon" ><?php echo $picture->filename ?></td>
563
- <?php
564
- break;
565
- case 'thumbnail' :
566
- ?>
567
- <td><img class="thumb" src="<?php echo $act_thumbnail_url.$act_thumb_prefix.$picture->filename ?>" /></td>
568
- <?php
569
- break;
570
- case 'description' :
571
- ?>
572
- <td><textarea name="description[<?php echo $pid ?>]" class="textarea1" cols="30" rows="3" ><?php echo stripslashes($picture->description) ?></textarea></td>
573
- <?php
574
- break;
575
- case 'alt_title_text' :
576
- ?>
577
- <td><input name="alttext[<?php echo $pid ?>]" type="text" size="20" value="<?php echo stripslashes($picture->alttext) ?>" /></td>
578
- <?php
579
- break;
580
- case 'exclude' :
581
- ?>
582
- <td><input name="exclude[<?php echo $pid ?>]" type="checkbox" value="1" <?php echo $exclude ?> /></td>
583
- <?php
584
- break;
585
- case 'tags' :
586
- ?>
587
- <td><input name="tags[<?php echo $pid ?>]" type="text" style="width:95%" value="<?php echo $nggTags->get_tags_from_image($pid); ?>" /></td>
588
- <?php
589
- break;
590
- case 'action' :
591
- ?>
592
- <td><a href="<?php echo $act_gallery_url.$picture->filename ?>" class="thickbox" title="<?php echo $picture->alttext ?>" ><?php _e('View') ?></a></td>
593
- <td><a href="<?php echo NGGALLERY_URLPATH."admin/showmeta.php?id=".$pid ?>" class="thickbox" title="<?php _e("Show Meta data",'nggallery')?>" ><?php _e('Meta') ?></a></td>
594
- <td><a href="<?php echo wp_nonce_url("admin.php?page=nggallery-manage-gallery&amp;mode=delpic&amp;gid=".$act_gid."&amp;pid=".$pid, 'ngg_delpicture')?>" class="delete" onclick="javascript:check=confirm( '<?php _e("Delete this file ?",'nggallery')?>');if(check==false) return false;" ><?php _e('Delete') ?></a></td>
595
- <?php
596
- break;
597
- default :
598
- ?>
599
- <td><?php do_action('ngg_manage_gallery_custom_column', $gallery_column_key, $pid); ?></td>
600
- <?php
601
- break;
602
- }
603
- ?>
604
- <?php } ?>
605
- </tr>
606
- <?php
607
- }
608
- } else {
609
- echo '<tr><td colspan="8" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
610
- }
611
- ?>
612
-
613
- </tbody>
614
- </table>
615
- <p class="submit"><input type="submit" name="updatepictures" value="<?php _e("Save Changes",'nggallery')?> &raquo;" /></p>
616
- </form>
617
- <br class="clear"/>
618
- </div><!-- /#wrap -->
619
-
620
- <!-- #entertags -->
621
- <div id="tags" style="display: none;" >
622
- <form id="form-tags" method="POST" accept-charset="utf-8">
623
- <?php wp_nonce_field('ngg_form-tags') ?>
624
- <?php if ($showTags) { ?><input type="hidden" name="showTags" value="true" /><?php } ?>
625
- <?php if ($hideThumbs) { ?><input type="hidden" name="hideThumbs" value="true" /><?php } ?>
626
- <input type="hidden" id="TB_imagelist" name="TB_imagelist" value="" />
627
- <input type="hidden" id="TB_tagaction" name="TB_tagaction" value="" />
628
- <table width="100%" border="0" cellspacing="3" cellpadding="3" >
629
- <tr>
630
- <th><?php _e("Enter the tags",'nggallery')?> : <input name="taglist" type="text" style="width:99%" value="" /></td>
631
- </tr>
632
- <tr align="right">
633
- <td class="submit"><input type="submit" name="TB_doaction" value="<?php _e("OK",'nggallery')?>" onclick="var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo js_escape(__("No images selected",'nggallery')); ?>'); jQuery.tb_remove(); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.",'nggallery')), "' + numchecked + '") ; ?>')" />&nbsp;<input type="reset" value="&nbsp;<?php _e("Cancel",'nggallery')?>&nbsp;" onclick="jQuery.tb_remove()"/></td>
634
- </tr>
635
- </table>
636
- </form>
637
- </div>
638
- <!-- /#entertags -->
639
-
640
- <?php
641
-
642
- } //nggallery_pciturelist
643
-
644
- /**************************************************************************/
645
- function ngg_update_pictures( $nggdescription, $nggalttext, $nggexclude, $nggalleryid ) {
646
- // update all pictures
647
-
648
- global $wpdb;
649
-
650
- if (is_array($nggdescription)) {
651
- foreach($nggdescription as $key=>$value) {
652
- $desc = $wpdb->escape($value);
653
- $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET description = '$desc' WHERE pid = $key");
654
- if($result) $update_ok = $result;
655
- }
656
- }
657
- if (is_array($nggalttext)){
658
- foreach($nggalttext as $key=>$value) {
659
- $alttext = $wpdb->escape($value);
660
- $result=$wpdb->query( "UPDATE $wpdb->nggpictures SET alttext = '$alttext' WHERE pid = $key");
661
- if($result) $update_ok = $result;
662
- }
663
- }
664
-
665
- $nggpictures = $wpdb->get_results("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$nggalleryid'");
666
-
667
- if (is_array($nggpictures)){
668
- foreach($nggpictures as $picture){
669
- if (is_array($nggexclude)){
670
- if (array_key_exists($picture->pid, $nggexclude)) {
671
- $result=$wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 1 WHERE pid = '$picture->pid'");
672
- if($result) $update_ok = $result;
673
- }
674
- else {
675
- $result=$wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 0 WHERE pid = '$picture->pid'");
676
- if($result) $update_ok = $result;
677
- }
678
- } else {
679
- $result=$wpdb->query("UPDATE $wpdb->nggpictures SET exclude = 0 WHERE pid = '$picture->pid'");
680
- if($result) $update_ok = $result;
681
- }
682
- }
683
- }
684
-
685
- return $update_ok;
686
- }
687
-
688
- /**************************************************************************/
689
- function ngg_update_tags( $taglist ) {
690
- // update all tags
691
- //TODO:Move to class nggTags
692
-
693
- global $wpdb;
694
-
695
- // load tag list
696
- $nggTags = new ngg_Tags();
697
-
698
- // the taglist contain as key the pic_id
699
- if (is_array($taglist)){
700
- foreach($taglist as $key=>$value) {
701
-
702
- // First, get all of the original tags
703
- $nggTags->get_tags_from_image($key);
704
-
705
- $tags = explode(",", $value);
706
- $new_slugarray = array();
707
-
708
- foreach($tags as $tag) {
709
- if ( !empty($tag) ) {
710
- // create the slug
711
- $tag = trim($tag);
712
- $slug = sanitize_title($tag);
713
- // do not proceed empty slugs
714
- if ( !empty($slug) ) {
715
- $new_slugarray[] = $slug;
716
- // look if we have a new tag in POST
717
- if (!in_array($slug, $nggTags->img_slugs )) {
718
- $tagid = $nggTags->add_tag($tag);
719
- $nggTags->add_relationship($key, $tagid);
720
- // add now to image list
721
- $nggTags->img_slugs[] = $slug;
722
- }
723
- }
724
- }
725
- }
726
-
727
- //do we need to remove some tags?
728
- $delete_tags = array_diff($nggTags->img_slugs, $new_slugarray);
729
- $nggTags->remove_relationship($key, $delete_tags, TRUE);
730
- }
731
-
732
- // remove not longer used tag
733
- $nggTags->remove_unused_tags();
734
- }
735
-
736
- return;
737
- }
738
-
739
- function ngg_hide_thumb() {
740
- if (isset ($_POST['togglethumbs'])) {
741
- check_admin_referer('ngg_updategallery');
742
- // Toggle thumnails, forgive me if it's to complicated
743
- $hideThumbs = (isset ($_POST['hideThumbs'])) ? false : true ;
744
- } else {
745
- $hideThumbs = (isset ($_POST['hideThumbs'])) ? true : false ;
746
- }
747
- return $hideThumbs;
748
- }
749
-
750
- function ngg_show_tags() {
751
- if (isset ($_POST['toggletags'])) {
752
- check_admin_referer('ngg_updategallery');
753
- // Toggle tag view
754
- $showTags = (isset ($_POST['showTags'])) ? false : true ;
755
- } else {
756
- $showTags = (isset ($_POST['showTags'])) ? true : false ;
757
- }
758
- return $showTags;
759
- }
760
-
761
- // define the columns to display, the syntax is 'internal name' => 'display name'
762
- function ngg_manage_gallery_columns() {
763
- $gallery_columns = array();
764
-
765
- $gallery_columns['cb'] = '<input name="checkall" type="checkbox" onclick="checkAll(document.getElementById(\'updategallery\'));" />';
766
- $gallery_columns['id'] = __('ID');
767
- $gallery_columns['filename'] = __('File name', 'nggallery');
768
-
769
- if ( !ngg_hide_thumb() )
770
- $gallery_columns['thumbnail'] = __('Thumbnail', 'nggallery');
771
- if ( !ngg_show_tags() ) {
772
- $gallery_columns['description'] = __('Description', 'nggallery');
773
- $gallery_columns['alt_title_text'] = __('Alt &amp; Title Text', 'nggallery');
774
- $gallery_columns['exclude'] = __('exclude', 'nggallery');
775
- } else {
776
- $gallery_columns['tags'] = __('Tags (comma separated list)', 'nggallery');
777
- }
778
- $gallery_columns['action'] = __('Action', 'nggallery');
779
-
780
- $gallery_columns = apply_filters('ngg_manage_gallery_columns', $gallery_columns);
781
-
782
- return $gallery_columns;
783
- }
784
-
785
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/overview.php DELETED
@@ -1,413 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- /**
5
- * nggallery_admin_overview()
6
- *
7
- * Add the admin overview wp.25 style
8
- * @return mixed content
9
- */
10
-
11
- function nggallery_admin_overview() {
12
- global $wpdb;
13
-
14
- // get feed_messages
15
- require_once(ABSPATH . WPINC . '/rss.php');
16
-
17
- // init PluginChecker
18
- $nggCheck = new CheckPlugin();
19
- $nggCheck->URL = NGGURL;
20
- $nggCheck->version = NGGVERSION;
21
- $nggCheck->name = "ngg";
22
- ?>
23
- <div class="wrap ngg-wrap">
24
- <h2><?php _e('NextGEN Gallery Overview', 'nggallery') ?></h2>
25
- <br class="clear"/>
26
- <?php if ( $nggCheck->startCheck() && (!IS_WPMU) ) { ?>
27
- <div id="newversion">
28
- <h3 class="dashboard-widget-title"><?php _e('New Version available', 'nggallery') ?> !!!</h3>
29
- <div class="dashboard-widget-content"><?php _e('The server reports that a new NextGEN Gallery Version is now available. Please visit the plugin homepage for more information.', 'nggallery') ?>
30
- <a href="http://wordpress.org/extend/plugins/nextgen-gallery/download/" target="_blank"> <?php _e('Download here', 'nggallery') ?> </a></div>
31
- </div>
32
- <?php } ?>
33
- <div id="rightnow">
34
- <h3 class="reallynow">
35
- <span><?php _e('Welcome to NextGEN Gallery !', 'nggallery') ?></span>
36
- <?php if(current_user_can('NextGEN Upload images')): ?><a class="rbutton" href="admin.php?page=nggallery-add-gallery"><strong><?php _e('Upload pictures', 'nggallery') ?></strong></a><?php endif; ?>
37
- <?php if(current_user_can('NextGEN Manage gallery')): ?><a class="rbutton" href="admin.php?page=nggallery-manage-gallery"><?php _e('Manage galleries', 'nggallery') ?></a><?php endif; ?>
38
- <br class="clear"/>
39
- </h3>
40
- <p class="youhave">
41
- <?php
42
- // get counter values
43
- $replace = array
44
- (
45
- '<strong>'.$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures").'</strong>',
46
- '<strong>'.$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggallery").'</strong>',
47
- '<strong>'.$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggalbum").'</strong>'
48
- );
49
- vprintf(__('There are totally %1$s pictures in %2$s galleries, which are spread across %3$s albums.', 'nggallery'), $replace);
50
- ?>
51
- </p>
52
- <p>
53
- <?php
54
- $userlevel = '<strong>' . (current_user_can('manage_options') ? __('gallery administrator', 'nggallery') : __('gallery editor', 'nggallery')) . '</strong>';
55
- printf(__('Here you can control your images, galleries and albums. You currently have %s rights.', 'nggallery'), $userlevel);
56
- ?>
57
- </p>
58
- </div>
59
- <br class="clear"/>
60
- <div id="dashboard-widgets-wrap">
61
- <div id="dashboard-widgets">
62
- <div id="dashboard_primary" class="dashboard-widget-holder widget_rss wp_dashboard_empty">
63
- <div class="ngg-dashboard-widget">
64
- <h3 class="dashboard-widget-title"><?php _e('Latest News', 'nggallery') ?></h3>
65
- <div class="dashboard-widget-content">
66
- <?php
67
- $rss = @fetch_rss('http://alexrabe.boelinger.com/?tag=nextgen-gallery&feed=rss2');
68
-
69
- if ( isset($rss->items) && 0 != count($rss->items) )
70
- {
71
- $rss->items = array_slice($rss->items, 0, 4);
72
- echo "<ul>";
73
- foreach ($rss->items as $item)
74
- {
75
- ?>
76
- <li><a class="rsswidget" title="" href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a><span class="rss-date"><?php echo date("F jS, Y", strtotime($item['pubdate'])); ?></span>
77
- <div class="rssSummary"><strong><?php echo human_time_diff(strtotime($item['pubdate'], time())); ?></strong> - <?php echo $item['description']; ?></div></li>
78
- <?php
79
- }
80
- echo "</ul>";
81
- }
82
- else
83
- {
84
- ?>
85
- <p><?php printf(__('Newsfeed could not be loaded. Check the <a href="%s">front page</a> to check for updates.', 'nggallery'), 'http://alexrabe.boelinger.com/') ?></p>
86
- <?php
87
- }
88
- ?>
89
- </div>
90
- </div>
91
- </div>
92
-
93
- <div id="dashboard_server_settings" class="dashboard-widget-holder wp_dashboard_empty">
94
- <div class="ngg-dashboard-widget">
95
- <?php if (IS_WPMU) {
96
- if (wpmu_enable_function('wpmuQuotaCheck'))
97
- echo ngg_SpaceManager::details();
98
- else {
99
- //TODO:WPMU message in WP2.5 style
100
- echo ngg_SpaceManager::details();
101
- }
102
- } else { ?>
103
- <h3 class="dashboard-widget-title" ><?php _e('Server Settings', 'nggallery') ?></h3>
104
- <div class="dashboard-widget-content">
105
- <ul class="settings">
106
- <?php ngg_get_serverinfo(); ?>
107
- </ul>
108
- <?php ngg_gd_info(); ?>
109
- </div>
110
- <?php } ?>
111
- </div>
112
- </div>
113
- </div>
114
-
115
- <br style="clear: both" />
116
- </div>
117
- </div>
118
- <?php
119
- }
120
-
121
- // ***************************************************************
122
- function ngg_gd_info() {
123
- if(function_exists("gd_info")){
124
- echo '<h4>'.__('GD support', 'nggallery').'</h4><ul class="settings">';
125
- $info = gd_info();
126
- $keys = array_keys($info);
127
- for($i=0; $i<count($keys); $i++) {
128
- if(is_bool($info[$keys[$i]]))
129
- echo "<li> " . $keys[$i] ." : <strong>" . ngg_gd_yesNo($info[$keys[$i]]) . "</strong></li>\n";
130
- else
131
- echo "<li> " . $keys[$i] ." : <strong>" . $info[$keys[$i]] . "</strong></li>\n";
132
- }
133
- }
134
- else {
135
- echo '<h4>'.__('No GD support', 'nggallery').'!</h4><ul>';
136
- }
137
- echo '</ul>';
138
- }
139
-
140
- // ***************************************************************
141
- function ngg_gd_yesNo($bool){
142
- if($bool) return __('Yes', 'nggallery');
143
- else return __('No', 'nggallery');
144
- }
145
-
146
- // ***************************************************************
147
- function ngg_get_serverinfo() {
148
- // thx to GaMerZ for WP-ServerInfo
149
- // http://www.lesterchan.net
150
-
151
- global $wpdb;
152
- // Get MYSQL Version
153
- $sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
154
- // GET SQL Mode
155
- $mysqlinfo = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'");
156
- if (is_array($mysqlinfo)) $sql_mode = $mysqlinfo[0]->Value;
157
- if (empty($sql_mode)) $sql_mode = __('Not set', 'nggallery');
158
- // Get PHP Safe Mode
159
- if(ini_get('safe_mode')) $safe_mode = __('On', 'nggallery');
160
- else $safe_mode = __('Off', 'nggallery');
161
- // Get PHP allow_url_fopen
162
- if(ini_get('allow_url_fopen')) $allow_url_fopen = __('On', 'nggallery');
163
- else $allow_url_fopen = __('Off', 'nggallery');
164
- // Get PHP Max Upload Size
165
- if(ini_get('upload_max_filesize')) $upload_max = ini_get('upload_max_filesize');
166
- else $upload_max = __('N/A', 'nggallery');
167
- // Get PHP Max Post Size
168
- if(ini_get('post_max_size')) $post_max = ini_get('post_max_size');
169
- else $post_max = __('N/A', 'nggallery');
170
- // Get PHP Max execution time
171
- if(ini_get('max_execution_time')) $max_execute = ini_get('max_execution_time');
172
- else $max_execute = __('N/A', 'nggallery');
173
- // Get PHP Memory Limit
174
- if(ini_get('memory_limit')) $memory_limit = ini_get('memory_limit');
175
- else $memory_limit = __('N/A', 'nggallery');
176
- // Get actual memory_get_usage
177
- if (function_exists('memory_get_usage')) $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'nggallery');
178
- else $memory_usage = __('N/A', 'nggallery');
179
- // required for EXIF read
180
- if (is_callable('exif_read_data')) $exif = __('Yes', 'nggallery'). " ( V" . substr(phpversion('exif'),0,4) . ")" ;
181
- else $exif = __('No', 'nggallery');
182
- // required for meta data
183
- if (is_callable('iptcparse')) $iptc = __('Yes', 'nggallery');
184
- else $iptc = __('No', 'nggallery');
185
- // required for meta data
186
- if (is_callable('xml_parser_create')) $xml = __('Yes', 'nggallery');
187
- else $xml = __('No', 'nggallery');
188
-
189
- ?>
190
- <li><?php _e('Operating System', 'nggallery'); ?> : <strong><?php echo PHP_OS; ?></strong></li>
191
- <li><?php _e('Server', 'nggallery'); ?> : <strong><?php echo $_SERVER["SERVER_SOFTWARE"]; ?></strong></li>
192
- <li><?php _e('Memory usage', 'nggallery'); ?> : <strong><?php echo $memory_usage; ?></strong></li>
193
- <li><?php _e('MYSQL Version', 'nggallery'); ?> : <strong><?php echo $sqlversion; ?></strong></li>
194
- <li><?php _e('SQL Mode', 'nggallery'); ?> : <strong><?php echo $sql_mode; ?></strong></li>
195
- <li><?php _e('PHP Version', 'nggallery'); ?> : <strong><?php echo PHP_VERSION; ?></strong></li>
196
- <li><?php _e('PHP Safe Mode', 'nggallery'); ?> : <strong><?php echo $safe_mode; ?></strong></li>
197
- <li><?php _e('PHP Allow URL fopen', 'nggallery'); ?> : <strong><?php echo $allow_url_fopen; ?></strong></li>
198
- <li><?php _e('PHP Memory Limit', 'nggallery'); ?> : <strong><?php echo $memory_limit; ?></strong></li>
199
- <li><?php _e('PHP Max Upload Size', 'nggallery'); ?> : <strong><?php echo $upload_max; ?></strong></li>
200
- <li><?php _e('PHP Max Post Size', 'nggallery'); ?> : <strong><?php echo $post_max; ?></strong></li>
201
- <li><?php _e('PHP Max Script Execute Time', 'nggallery'); ?> : <strong><?php echo $max_execute; ?>s</strong></li>
202
- <li><?php _e('PHP Exif support', 'nggallery'); ?> : <strong><?php echo $exif; ?></strong></li>
203
- <li><?php _e('PHP IPTC support', 'nggallery'); ?> : <strong><?php echo $iptc; ?></strong></li>
204
- <li><?php _e('PHP XML support', 'nggallery'); ?> : <strong><?php echo $xml; ?></strong></li>
205
- <?php
206
- }
207
-
208
- // ***************************************************************
209
-
210
- /**
211
- * WordPress PHP class to check for a new version.
212
- * @author Alex Rabe & Joern Kretzschmar
213
- * @orginal from Per S�derlind
214
- *
215
- // Dashboard update notification example
216
- function myPlugin_update_dashboard() {
217
- $Check = new CheckPlugin();
218
- $Check->URL = "YOUR URL";
219
- $Check->version = "1.00";
220
- $Check->name = "myPlugin";
221
- if ($Check->startCheck()) {
222
- echo '<h3>Update Information</h3>';
223
- echo '<p>A new version is available</p>';
224
- }
225
- }
226
-
227
- add_action('activity_box_end', 'myPlugin_update_dashboard', '0');
228
- *
229
- */
230
- if ( !class_exists( "CheckPlugin" ) ) {
231
- class CheckPlugin {
232
- /**
233
- * URL with the version of the plugin
234
- * @var string
235
- */
236
- var $URL = 'myURL';
237
- /**
238
- * Version of thsi programm or plugin
239
- * @var string
240
- */
241
- var $version = '1.00';
242
- /**
243
- * Name of the plugin (will be used in the options table)
244
- * @var string
245
- */
246
- var $name = 'myPlugin';
247
- /**
248
- * Waiting period until the next check in seconds
249
- * @var int
250
- */
251
- var $period = 86400;
252
-
253
- function startCheck() {
254
- /**
255
- * check for a new version, returns true if a version is avaiable
256
- */
257
-
258
- // use wordpress snoopy class
259
- require_once(ABSPATH . WPINC . '/class-snoopy.php');
260
-
261
- $check_intervall = get_option( $this->name."_next_update" );
262
-
263
- if ( ($check_intervall < time() ) or (empty($check_intervall)) ) {
264
- if (class_exists(snoopy)) {
265
- $client = new Snoopy();
266
- $client->agent = 'NextGEN Gallery Version Checker (+http://www.nextgen.boelinger.com/)';
267
- $client->_fp_timeout = 10;
268
- if (@$client->fetch($this->URL) === false) {
269
- return false;
270
- }
271
-
272
- $remote = $client->results;
273
-
274
- $server_version = unserialize($remote);
275
- if (is_array($server_version)) {
276
- if ( version_compare($server_version[$this->name], $this->version, '>') )
277
- return true;
278
- }
279
-
280
- $check_intervall = time() + $this->period;
281
- update_option( $this->name."_next_update", $check_intervall );
282
- return false;
283
- }
284
- }
285
- }
286
- }
287
- }
288
- // ***************************************************************
289
-
290
- /**
291
- * WPMU feature taken from Z-Space Upload Quotas
292
- * @author Dylan Reeve
293
- * @url http://dylan.wibble.net/
294
- *
295
- */
296
-
297
- class ngg_SpaceManager {
298
-
299
- function getQuota() {
300
- if (function_exists(get_space_allowed))
301
- $quota = get_space_allowed();
302
- else
303
- $quota = get_site_option( "blog_upload_space" );
304
-
305
- return $quota;
306
- }
307
-
308
- function details() {
309
-
310
- // take default seetings
311
- $settings = array(
312
-
313
- 'remain' => array(
314
- 'color_text' => 'white',
315
- 'color_bar' => '#0D324F',
316
- 'color_bg' => '#a0a0a0',
317
- 'decimals' => 2,
318
- 'unit' => 'm',
319
- 'display' => true,
320
- 'graph' => false
321
- ),
322
-
323
- 'used' => array(
324
- 'color_text' => 'white',
325
- 'color_bar' => '#0D324F',
326
- 'color_bg' => '#a0a0a0',
327
- 'decimals' => 2,
328
- 'unit' => 'm',
329
- 'display' => true,
330
- 'graph' => true
331
- )
332
- );
333
-
334
- $quota = ngg_SpaceManager::getQuota() * 1024 * 1024;
335
- $used = get_dirsize( constant( "ABSPATH" ) . constant( "UPLOADS" ) );
336
- // $used = get_dirsize( ABSPATH."wp-content/blogs.dir/".$blog_id."/files" );
337
-
338
- if ($used > $quota) $percentused = '100';
339
- else $percentused = ( $used / $quota ) * 100;
340
-
341
- $remaining = $quota - $used;
342
- $percentremain = 100 - $percentused;
343
-
344
- $out = "";
345
- $out .= '<div id="spaceused"> <h3>'.__('Storage Space','nggallery').'</h3>';
346
-
347
- if ($settings['used']['display']) {
348
- $out .= __('Upload Space Used:','nggallery') . "\n";
349
- $out .= ngg_SpaceManager::buildGraph($settings['used'], $used,$quota,$percentused);
350
- $out .= "<br />";
351
- }
352
-
353
- if($settings['remain']['display']) {
354
- $out .= __('Upload Space Remaining:','nggallery') . "\n";
355
- $out .= ngg_SpaceManager::buildGraph($settings['remain'], $remaining,$quota,$percentremain);
356
-
357
- }
358
-
359
- $out .= "</div>";
360
-
361
- echo $out;
362
- }
363
-
364
- function buildGraph($settings, $size, $quota, $percent) {
365
- $color_bar = $settings['color_bar'];
366
- $color_bg = $settings['color_bg'];
367
- $color_text = $settings['color_text'];
368
-
369
- switch ($settings['unit']) {
370
- case "b":
371
- $unit = "B";
372
- break;
373
-
374
- case "k":
375
- $unit = "KB";
376
- $size = $size / 1024;
377
- $quota = $quota / 1024;
378
- break;
379
-
380
- case "g": // Gigabytes, really?
381
- $unit = "GB";
382
- $size = $size / 1024 / 1024 / 1024;
383
- $quota = $quota / 1024 / 1024 / 1024;
384
- break;
385
-
386
- default:
387
- $unit = "MB";
388
- $size = $size / 1024 / 1024;
389
- $quota = $quota / 1024 / 1024;
390
- break;
391
- }
392
-
393
- $size = round($size, (int)$settings['decimals']);
394
-
395
- $pct = round(($size / $quota)*100);
396
-
397
- if ($settings['graph']) {
398
- //TODO:move style to CSS
399
- $out = '<div style="display: block; margin: 0; padding: 0; height: 15px; border: 1px inset; width: 100%; background-color: '.$color_bg.';">'."\n";
400
- $out .= '<div style="display: block; height: 15px; border: none; background-color: '.$color_bar.'; width: '.$pct.'%;">'."\n";
401
- $out .= '<div style="display: inline; position: relative; top: 0; left: 0; font-size: 10px; color: '.$color_text.'; font-weight: bold; padding-bottom: 2px; padding-left: 5px;">'."\n";
402
- $out .= $size.$unit;
403
- $out .= "</div>\n</div>\n</div>\n";
404
- } else {
405
- $out = "<strong>".$size.$unit." ( ".number_format($percent)."%)"."</strong><br />";
406
- }
407
-
408
- return $out;
409
- }
410
-
411
- }
412
-
413
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/roles.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
-
3
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
4
-
5
- function nggallery_admin_roles() {
6
-
7
- if ( isset($_POST['update_cap']) ) {
8
-
9
- check_admin_referer('ngg_addroles');
10
-
11
- // now set or remove the capability
12
- ngg_set_capability($_POST['general'],"NextGEN Gallery overview");
13
- ngg_set_capability($_POST['tinymce'],"NextGEN Use TinyMCE");
14
- ngg_set_capability($_POST['add_gallery'],"NextGEN Upload images");
15
- ngg_set_capability($_POST['manage_gallery'],"NextGEN Manage gallery");
16
- ngg_set_capability($_POST['edit_album'],"NextGEN Edit album");
17
- ngg_set_capability($_POST['change_style'],"NextGEN Change style");
18
- ngg_set_capability($_POST['change_options'],"NextGEN Change options");
19
-
20
- nggallery::show_message(__('Updated capabilities',"nggallery"));
21
- }
22
-
23
- ?>
24
- <div class="wrap">
25
- <h2><?php _e('Roles / capabilities', 'nggallery') ;?></h2>
26
- <p><?php _e('Select the lowest role which should be able to access the follow capabilities. NextGEN Gallery supports the standard roles from WordPress.', 'nggallery') ?> <br />
27
- <?php _e('For a more flexible user management you can use the', 'nggallery') ?> <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">Role Manager</a>.</p>
28
- <form name="addroles" id="addroles" method="POST" accept-charset="utf-8" >
29
- <?php wp_nonce_field('ngg_addroles') ?>
30
- <table class="form-table">
31
- <tr valign="top">
32
- <th scope="row"><?php _e('Main NextGEN Gallery overview', 'nggallery') ;?>:</th>
33
- <td><label for="general"><select name="general" id="general"><?php wp_dropdown_roles( ngg_get_role('NextGEN Gallery overview') ); ?></select></label></td>
34
- </tr>
35
- <tr valign="top">
36
- <th scope="row"><?php _e('Use TinyMCE Button / Upload tab', 'nggallery') ;?>:</th>
37
- <td><label for="tinymce"><select name="tinymce" id="tinymce"><?php wp_dropdown_roles( ngg_get_role('NextGEN Use TinyMCE') ); ?></select></label></td>
38
- </tr>
39
- <tr valign="top">
40
- <th scope="row"><?php _e('Add gallery / Upload images', 'nggallery') ;?>:</th>
41
- <td><label for="add_gallery"><select name="add_gallery" id="add_gallery"><?php wp_dropdown_roles( ngg_get_role('NextGEN Upload images') ); ?></select></label></td>
42
- </tr>
43
- <tr valign="top">
44
- <th scope="row"><?php _e('Manage gallery', 'nggallery') ;?>:</th>
45
- <td><label for="manage_gallery"><select name="manage_gallery" id="manage_gallery"><?php wp_dropdown_roles( ngg_get_role('NextGEN Manage gallery') ); ?></select></label></td>
46
- </tr>
47
- <tr valign="top">
48
- <th scope="row"><?php _e('Edit Album', 'nggallery') ;?>:</th>
49
- <td><label for="edit_album"><select name="edit_album" id="edit_album"><?php wp_dropdown_roles( ngg_get_role('NextGEN Edit album') ); ?></select></label></td>
50
- </tr>
51
- <tr valign="top">
52
- <th scope="row"><?php _e('Change style', 'nggallery') ;?>:</th>
53
- <td><label for="change_style"><select name="change_style" id="change_style"><?php wp_dropdown_roles( ngg_get_role('NextGEN Change style') ); ?></select></label></td>
54
- </tr>
55
- <tr valign="top">
56
- <th scope="row"><?php _e('Change options', 'nggallery') ;?>:</th>
57
- <td><label for="change_options"><select name="change_options" id="change_options"><?php wp_dropdown_roles( ngg_get_role('NextGEN Change options') ); ?></select></label></td>
58
- </tr>
59
- </table>
60
- <div class="submit"><input type="submit" name= "update_cap" value="<?php _e('Update capabilities', 'nggallery') ;?>"/></div>
61
- </form>
62
- </div>
63
- <?php
64
-
65
- }
66
-
67
- function ngg_get_role($capability){
68
- // This function return the lowest roles which has the capabilities
69
- $check_order = array("subscriber", "contributor", "author", "editor", "administrator");
70
-
71
- $args = array_slice(func_get_args(), 1);
72
- $args = array_merge(array($capability), $args);
73
-
74
- foreach ($check_order as $role) {
75
- $check_role = get_role($role);
76
-
77
- if ( empty($check_role) )
78
- return false;
79
-
80
- if (call_user_func_array(array(&$check_role, 'has_cap'), $args))
81
- return $role;
82
- }
83
- return false;
84
- }
85
-
86
- function ngg_set_capability($lowest_role, $capability){
87
- // This function set or remove the $capability
88
- $check_order = array("subscriber", "contributor", "author", "editor", "administrator");
89
-
90
- $add_capability = false;
91
-
92
- foreach ($check_order as $role) {
93
- if ($lowest_role == $role)
94
- $add_capability = true;
95
-
96
- $the_role = get_role($role);
97
-
98
- // If you rename the roles, the please use the role manager plugin
99
-
100
- if ( empty($the_role) )
101
- continue;
102
-
103
- $add_capability ? $the_role->add_cap($capability) : $the_role->remove_cap($capability) ;
104
- }
105
-
106
- }
107
-
108
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/settings.php DELETED
@@ -1,633 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_admin_options() {
5
-
6
- global $wpdb, $wp_version, $nggRewrite;
7
-
8
- // get the options
9
- $ngg_options = get_option('ngg_options');
10
- $old_state = $ngg_options['usePermalinks'];
11
-
12
- // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
13
- $filepath = get_option('siteurl'). '/wp-admin/admin.php?page='.$_GET['page'];
14
-
15
- if ( isset($_POST['updateoption']) ) {
16
- check_admin_referer('ngg_settings');
17
- // get the hidden option fields, taken from WP core
18
- if ( $_POST['page_options'] )
19
- $options = explode(',', stripslashes($_POST['page_options']));
20
- if ($options) {
21
- foreach ($options as $option) {
22
- $option = trim($option);
23
- $value = trim($_POST[$option]);
24
- // $value = sanitize_option($option, $value); // This does stripslashes on those that need it
25
- $ngg_options[$option] = $value;
26
- }
27
- }
28
- // Flush ReWrite rules
29
- if ( $old_state != $ngg_options['usePermalinks'] )
30
- $nggRewrite->flush();
31
- // Save options
32
- update_option('ngg_options', $ngg_options);
33
- nggallery::show_message(__('Update Successfully','nggallery'));
34
- }
35
-
36
- if ( isset($_POST['clearcache']) ) {
37
-
38
- $path = WINABSPATH . $ngg_options['gallerypath'] . "cache/";
39
-
40
- if (is_dir($path))
41
- if ($handle = opendir($path)) {
42
- while (false !== ($file = readdir($handle))) {
43
- if ($file != '.' && $file != '..') {
44
- @unlink($path."/".$file);
45
- }
46
- }
47
- closedir($handle);
48
- }
49
-
50
- nggallery::show_message(__('Cache cleared','nggallery'));
51
- }
52
- // message windows
53
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
54
-
55
- ?>
56
- <script type="text/javascript">
57
- jQuery(function() {
58
- jQuery('#slider > ul').tabs({ fxFade: true, fxSpeed: 'fast' });
59
- });
60
-
61
- function insertcode(value) {
62
- var effectcode;
63
- switch (value) {
64
- case "none":
65
- effectcode = "";
66
- jQuery('#tbImage').hide("slow");
67
- break;
68
- case "thickbox":
69
- effectcode = 'class="thickbox" rel="%GALLERY_NAME%"';
70
- jQuery('#tbImage').show("slow");
71
- break;
72
- case "lightbox":
73
- effectcode = 'rel="lightbox[%GALLERY_NAME%]"';
74
- jQuery('#tbImage').hide("slow");
75
- break;
76
- case "highslide":
77
- effectcode = 'class="highslide" onclick="return hs.expand(this, { slideshowGroup: %GALLERY_NAME% })"';
78
- jQuery('#tbImage').hide("slow");
79
- break;
80
- case "shutter":
81
- effectcode = 'class="shutterset"';
82
- jQuery('#tbImage').hide("slow");
83
- break;
84
- default:
85
- break;
86
- }
87
- jQuery("#thumbCode").val(effectcode);
88
- };
89
-
90
- function setcolor(fileid,color) {
91
- jQuery(fileid).css("background", color );
92
- };
93
- </script>
94
-
95
- <div id="slider" class="wrap">
96
-
97
- <ul id="tabs">
98
- <li><a href="#generaloptions"><?php _e('General Options', 'nggallery') ;?></a></li>
99
- <li><a href="#thumbnails"><?php _e('Thumbnails', 'nggallery') ;?></a></li>
100
- <li><a href="#images"><?php _e('Images', 'nggallery') ;?></a></li>
101
- <li><a href="#gallery"><?php _e('Gallery', 'nggallery') ;?></a></li>
102
- <li><a href="#effects"><?php _e('Effects', 'nggallery') ;?></a></li>
103
- <li><a href="#watermark"><?php _e('Watermark', 'nggallery') ;?></a></li>
104
- <li><a href="#slideshow"><?php _e('Slideshow', 'nggallery') ;?></a></li>
105
- </ul>
106
-
107
- <!-- General Options -->
108
-
109
- <div id="generaloptions">
110
- <h2><?php _e('General Options','nggallery'); ?></h2>
111
- <form name="generaloptions" method="post">
112
- <?php wp_nonce_field('ngg_settings') ?>
113
- <input type="hidden" name="page_options" value="gallerypath,scanfolder,deleteImg,usePermalinks,activateTags,appendType,maxImages" />
114
- <table class="form-table">
115
- <tr valign="top">
116
- <th align="left"><?php _e('Gallery path','nggallery') ?></th>
117
- <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="text" size="35" name="gallerypath" value="<?php echo $ngg_options['gallerypath']; ?>" title="TEST" /><br />
118
- <?php _e('This is the default path for all galleries','nggallery') ?></td>
119
- </tr>
120
- <!--TODO: Later... -->
121
- <!--
122
- <tr valign="top">
123
- <th align="left"><?php //_e('Scan folders during runtime','nggallery') ?></th>
124
- <td><input type="checkbox" name="scanfolder" value="1" <?php //checked('1', $ngg_options[scanfolder]); ?> /><br />
125
- <?php //_e('Search automatic in the folders for new images (not working)','nggallery') ?></td>
126
- </tr>
127
- -->
128
- <tr valign="top">
129
- <th align="left"><?php _e('Delete image files','nggallery') ?></th>
130
- <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="checkbox" name="deleteImg" value="1" <?php checked('1', $ngg_options['deleteImg']); ?> /><br />
131
- <?php _e('Delete files, when removing a gallery in the database','nggallery') ?></td>
132
- </tr>
133
- <tr valign="top">
134
- <th align="left"><?php _e('Activate permalinks','nggallery') ?></th>
135
- <td><input type="checkbox" name="usePermalinks" value="1" <?php checked('1', $ngg_options['usePermalinks']); ?> /><br />
136
- <?php _e('When you activate this option, you need to update your permalink structure one time.','nggallery') ?></td>
137
- </tr>
138
- </table>
139
- <h3><?php _e('Tags / Categories','nggallery') ?></h3>
140
- <table class="form-table">
141
- <tr>
142
- <th valign="top"><?php _e('Activate related images','nggallery') ?>:</th>
143
- <td><input name="activateTags" type="checkbox" value="1" <?php checked('1', $ngg_options['activateTags']); ?> />
144
- <?php _e('This option will append related images to every post','nggallery') ?>
145
- </td>
146
- </tr>
147
- <tr>
148
- <th valign="top"><?php _e('Match with','nggallery') ?>:</th>
149
- <td><label><input name="appendType" type="radio" value="category" <?php checked('category', $ngg_options['appendType']); ?> /> <?php _e('Categories', 'nggallery') ;?></label><br />
150
- <label><input name="appendType" type="radio" value="tags" <?php checked('tags', $ngg_options['appendType']); ?> /> <?php _e('Tags', 'nggallery') ;?><?php if (version_compare($wp_version, '2.3.alpha', '<')) _e(' (require WordPress 2.3 or higher)', 'nggallery'); ?></label>
151
- </td>
152
- </tr>
153
- <tr>
154
- <th valign="top"><?php _e('Max. number of images','nggallery') ?>:</th>
155
- <td><input type="text" name="maxImages" value="<?php echo $ngg_options['maxImages'] ?>" size="3" maxlength="3" /><br />
156
- <?php _e('0 will show all images','nggallery') ?>
157
- </td>
158
- </tr>
159
- </table>
160
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
161
- </form>
162
- </div>
163
-
164
- <!-- Thumbnail settings -->
165
-
166
- <div id="thumbnails">
167
- <h2><?php _e('Thumbnail settings','nggallery'); ?></h2>
168
- <form name="thumbnailsettings" method="POST" action="<?php echo $filepath.'#thumbnails'; ?>" >
169
- <?php wp_nonce_field('ngg_settings') ?>
170
- <input type="hidden" name="page_options" value="thumbwidth,thumbheight,thumbfix,thumbcrop,thumbquality,thumbResampleMode" />
171
- <p><?php _e('Please note : If you change the settings, you need to recreate the thumbnails under -> Manage Gallery .', 'nggallery') ?></p>
172
- <table class="form-table">
173
- <tr valign="top">
174
- <th align="left"><?php _e('Width x height (in pixel)','nggallery') ?></th>
175
- <td><input type="text" size="4" maxlength="4" name="thumbwidth" value="<?php echo $ngg_options['thumbwidth']; ?>" /> x <input type="text" size="4" maxlength="4" name="thumbheight" value="<?php echo $ngg_options['thumbheight']; ?>" /><br />
176
- <?php _e('These values are maximum values ','nggallery') ?></td>
177
- </tr>
178
- <tr valign="top">
179
- <th align="left"><?php _e('Set fix dimension','nggallery') ?></th>
180
- <td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg_options['thumbfix']); ?> /><br />
181
- <?php _e('Ignore the aspect ratio, no portrait thumbnails','nggallery') ?></td>
182
- </tr>
183
- <tr valign="top">
184
- <th align="left"><?php _e('Crop square thumbnail from image','nggallery') ?></th>
185
- <td><input type="checkbox" name="thumbcrop" value="1" <?php checked('1', $ngg_options['thumbcrop']); ?> /><br />
186
- <?php _e('Create square thumbnails, use only the width setting :','nggallery') ?> <?php echo $ngg_options['thumbwidth']; ?> x <?php echo $ngg_options['thumbwidth']; ?></td>
187
- </tr>
188
- <tr valign="top">
189
- <th align="left"><?php _e('Thumbnail quality','nggallery') ?></th>
190
- <td><input type="text" size="3" maxlength="3" name="thumbquality" value="<?php echo $ngg_options['thumbquality']; ?>" /> %</td>
191
- </tr>
192
- <tr valign="top">
193
- <th align="left"><?php _e('Resample Mode','nggallery') ?></th>
194
- <td><input type="text" size="1" maxlength="1" name="thumbResampleMode" value="<?php echo $ngg_options['thumbResampleMode']; ?>" /><br />
195
- <?php _e('Value between 1-5 (higher value, more CPU load)','nggallery') ?></td>
196
- </tr>
197
- </table>
198
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
199
- </form>
200
- </div>
201
-
202
- <!-- Image settings -->
203
-
204
- <div id="images">
205
- <h2><?php _e('Image settings','nggallery'); ?></h2>
206
- <form name="imagesettings" method="POST" action="<?php echo $filepath.'#images'; ?>" >
207
- <?php wp_nonce_field('ngg_settings') ?>
208
- <input type="hidden" name="page_options" value="imgResize,imgWidth,imgHeight,imgQuality,imgResampleMode,imgCacheSinglePic" />
209
- <table class="form-table">
210
- <tr valign="top">
211
- <th scope="row"><label for="fixratio"><?php _e('Resize Images','nggallery') ?></label></th>
212
- <!--TODO: checkbox fixratio can be used later -->
213
- <td><input type="hidden" name="imgResize" value="1" <?php checked('1', $ngg_options['imgResize']); ?> /> </td>
214
- <td><input type="text" size="5" name="imgWidth" value="<?php echo $ngg_options['imgWidth']; ?>" /> x <input type="text" size="5" name="imgHeight" value="<?php echo $ngg_options['imgHeight']; ?>" /><br />
215
- <?php _e('Width x height (in pixel). NextGEN Gallery will keep ratio size','nggallery') ?></td>
216
- </tr>
217
- <tr valign="top">
218
- <th align="left"><?php _e('Image quality','nggallery') ?></th>
219
- <td></td>
220
- <td><input type="text" size="3" maxlength="3" name="imgQuality" value="<?php echo $ngg_options['imgQuality']; ?>" /> %</td>
221
- </tr>
222
- <tr valign="top">
223
- <th align="left"><?php _e('Resample Mode','nggallery') ?></th>
224
- <td></td>
225
- <td><input type="text" size="1" maxlength="1" name="imgResampleMode" value="<?php echo $ngg_options['imgResampleMode']; ?>" /><br />
226
- <?php _e('Value between 1-5 (higher value, more CPU load)','nggallery') ?></td>
227
- </tr>
228
- </table>
229
- <h3><?php _e('Single picture','nggallery') ?></h3>
230
- <table class="form-table">
231
- <tr valign="top">
232
- <th align="left"><?php _e('Cache single pictures','nggallery') ?></th>
233
- <td></td>
234
- <td><input <?php if (IS_WPMU) echo 'readonly = "readonly"'; ?> type="checkbox" name="imgCacheSinglePic" value="1" <?php checked('1', $ngg_options['imgCacheSinglePic']); ?> />
235
- <?php _e('Creates a file for each singlepic settings. Reduce the CPU load','nggallery') ?></td>
236
- </tr>
237
- <tr valign="top">
238
- <th align="left"><?php _e('Clear cache folder','nggallery') ?></th>
239
- <td></td>
240
- <td><input type="submit" name="clearcache" value="<?php _e('Proceed now','nggallery') ;?> &raquo;"/></td>
241
- </tr>
242
- </table>
243
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
244
- </form>
245
- </div>
246
-
247
- <!-- Gallery settings -->
248
-
249
- <div id="gallery">
250
- <h2><?php _e('Gallery settings','nggallery'); ?></h2>
251
- <form name="galleryform" method="POST" action="<?php echo $filepath.'#gallery'; ?>" >
252
- <?php wp_nonce_field('ngg_settings') ?>
253
- <input type="hidden" name="page_options" value="galUsejQuery,galNoPages,galImages,galShowSlide,galTextSlide,galTextGallery,galShowOrder,galShowDesc,galImgBrowser,galSort,galSortDir" />
254
- <table class="form-table">
255
- <!--TODO: Do better... -->
256
- <!--
257
- <tr>
258
- <th valign="top"><?php //_e('Activate jQuery navigation','nggallery') ?>:</th>
259
- <td><input name="galUsejQuery" type="checkbox" value="1" <?php // checked('1', $ngg_options['galUsejQuery']); ?> />
260
- <?php //_e('Please note : This is still experimental. Requires the Thickbox effect','nggallery') ?>
261
- </td>
262
- </tr>
263
- -->
264
- <tr>
265
- <th valign="top"><?php _e('Deactivate gallery page link','nggallery') ?>:</th>
266
- <td><input name="galNoPages" type="checkbox" value="1" <?php checked('1', $ngg_options['galNoPages']); ?> />
267
- <?php _e('The album will not link to a gallery subpage. The gallery is shown on the same page.','nggallery') ?>
268
- </td>
269
- </tr>
270
- <tr>
271
- <th valign="top"><?php _e('Number of images per page','nggallery') ?>:</th>
272
- <td><input type="text" name="galImages" value="<?php echo $ngg_options['galImages'] ?>" size="3" maxlength="3" /><br />
273
- <?php _e('0 will disable pagination, all images on one page','nggallery') ?>
274
- </td>
275
- </tr>
276
- <tr>
277
- <th valign="top"><?php _e('Integrate slideshow','nggallery') ?>:</th>
278
- <td><input name="galShowSlide" type="checkbox" value="1" <?php checked('1', $ngg_options['galShowSlide']); ?> />
279
- <input type="text" name="galTextSlide" value="<?php echo $ngg_options['galTextSlide'] ?>" size="20" />
280
- <input type="text" name="galTextGallery" value="<?php echo $ngg_options['galTextGallery'] ?>" size="20" />
281
- </td>
282
- </tr>
283
- <tr>
284
- <th valign="top"><?php _e('Show first','nggallery') ?>:</th>
285
- <td><label><input name="galShowOrder" type="radio" value="gallery" <?php checked('gallery', $ngg_options['galShowOrder']); ?> /> <?php _e('Thumbnails', 'nggallery') ;?></label><br />
286
- <label><input name="galShowOrder" type="radio" value="slide" <?php checked('slide', $ngg_options['galShowOrder']); ?> /> <?php _e('Slideshow', 'nggallery') ;?></label>
287
- </td>
288
- </tr>
289
- <tr>
290
- <th valign="top"><?php _e('Show thumbnail description','nggallery') ?>:</th>
291
- <td><label><input name="galShowDesc" type="radio" value="none" <?php checked('none', $ngg_options['galShowDesc']); ?> /> <?php _e('None', 'nggallery') ;?></label><br />
292
- <label><input name="galShowDesc" type="radio" value="desc" <?php checked('desc', $ngg_options['galShowDesc']); ?> /> <?php _e('Description text', 'nggallery') ;?></label><br />
293
- <label><input name="galShowDesc" type="radio" value="alttext" <?php checked('alttext', $ngg_options['galShowDesc']); ?> /> <?php _e('Alt / Title text', 'nggallery') ;?></label>
294
- </td>
295
- </tr>
296
- <tr>
297
- <th valign="top"><?php _e('Show ImageBrowser','nggallery') ?>:</th>
298
- <td><input name="galImgBrowser" type="checkbox" value="1" <?php checked('1', $ngg_options['galImgBrowser']); ?> />
299
- <?php _e('The gallery will open the ImageBrowser instead the effect.','nggallery') ?>
300
- </td>
301
- </tr>
302
- </table>
303
- <h3><?php _e('Sort options','nggallery') ?></h3>
304
- <table class="form-table">
305
- <tr>
306
- <th valign="top"><?php _e('Sort thumbnails','nggallery') ?>:</th>
307
- <td>
308
- <label><input name="galSort" type="radio" value="sortorder" <?php checked('sortorder', $ngg_options['galSort']); ?> /> <?php _e('Custom order', 'nggallery') ;?></label><br />
309
- <label><input name="galSort" type="radio" value="pid" <?php checked('pid', $ngg_options['galSort']); ?> /> <?php _e('Image ID', 'nggallery') ;?></label><br />
310
- <label><input name="galSort" type="radio" value="filename" <?php checked('filename', $ngg_options['galSort']); ?> /> <?php _e('File name', 'nggallery') ;?></label><br />
311
- <label><input name="galSort" type="radio" value="alttext" <?php checked('alttext', $ngg_options['galSort']); ?> /> <?php _e('Alt / Title text', 'nggallery') ;?></label>
312
- </td>
313
- </tr>
314
- <tr>
315
- <th valign="top"><?php _e('Sort direction','nggallery') ?>:</th>
316
- <td><label><input name="galSortDir" type="radio" value="ASC" <?php checked('ASC', $ngg_options['galSortDir']); ?> /> <?php _e('Ascending', 'nggallery') ;?></label><br />
317
- <label><input name="galSortDir" type="radio" value="DESC" <?php checked('DESC', $ngg_options['galSortDir']); ?> /> <?php _e('Descending', 'nggallery') ;?></label>
318
- </td>
319
- </tr>
320
- </table>
321
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
322
- </form>
323
- </div>
324
-
325
- <!-- Effects settings -->
326
-
327
- <div id="effects">
328
- <h2><?php _e('Effects','nggallery'); ?></h2>
329
- <form name="effectsform" method="POST" action="<?php echo $filepath.'#effects'; ?>" >
330
- <?php wp_nonce_field('ngg_settings') ?>
331
- <input type="hidden" name="page_options" value="thumbEffect,thumbCode,thickboxImage" />
332
- <p><?php _e('Here you can select the thumbnail effect, NextGEN Gallery will integrate the required HTML code in the images. Please note that only the Thickbox effect will automatic added to your theme.','nggallery'); ?>
333
- <?php _e('With the placeholder','nggallery'); ?><strong> %GALLERY_NAME% </strong> <?php _e('you can activate a navigation through the images (depend on the effect). Change the code line only , when you use a different thumbnail effect or you know what you do.','nggallery'); ?></p>
334
- <table class="form-table">
335
- <tr valign="top">
336
- <th><?php _e('JavaScript Thumbnail effect','nggallery') ?>:</th>
337
- <td>
338
- <select size="1" id="thumbEffect" name="thumbEffect" onchange="insertcode(this.value)">
339
- <option value="none" <?php selected('none', $ngg_options['thumbEffect']); ?> ><?php _e('None', 'nggallery') ;?></option>
340
- <option value="thickbox" <?php selected('thickbox', $ngg_options['thumbEffect']); ?> ><?php _e('Thickbox', 'nggallery') ;?></option>
341
- <option value="lightbox" <?php selected('lightbox', $ngg_options['thumbEffect']); ?> ><?php _e('Lightbox', 'nggallery') ;?></option>
342
- <option value="highslide" <?php selected('highslide', $ngg_options['thumbEffect']); ?> ><?php _e('Highslide', 'nggallery') ;?></option>
343
- <option value="shutter" <?php selected('shutter', $ngg_options['thumbEffect']); ?> ><?php _e('Shutter', 'nggallery') ;?></option>
344
- <option value="custom" <?php selected('custom', $ngg_options['thumbEffect']); ?> ><?php _e('Custom', 'nggallery') ;?></option>
345
- </select>
346
- </td>
347
- </tr>
348
- <tr valign="top">
349
- <th><?php _e('Link Code line','nggallery') ?> :</th>
350
- <td><textarea id="thumbCode" name="thumbCode" cols="50" rows="5"><?php echo htmlspecialchars(stripslashes($ngg_options['thumbCode'])); ?></textarea></td>
351
- </tr>
352
- </table>
353
-
354
- <div id="tbImage" <?php if ($ngg_options['thumbEffect'] != 'thickbox') echo 'style="display:none"'?> >
355
- <table class="form-table">
356
- <tr valign="top">
357
- <th><?php _e('Select loading image','nggallery') ?> :</th>
358
- <td>
359
- <label><input name="thickboxImage" id="v2" type="radio" title="Version 2" value="loadingAnimationv2.gif" <?php checked('loadingAnimationv2.gif', $ngg_options['thickboxImage']); ?> /></label> <img src="<?php echo NGGALLERY_URLPATH.'thickbox/loadingAnimationv2.gif' ?>" alt="Version 2" />
360
- <label><input name="thickboxImage" id="v3" type="radio" title="Version 3" value="loadingAnimationv3.gif" <?php checked('loadingAnimationv3.gif', $ngg_options['thickboxImage']); ?> /></label> <img src="<?php echo NGGALLERY_URLPATH.'thickbox/loadingAnimationv3.gif' ?>" alt="Version 3" />
361
- </td>
362
- </tr>
363
- </table>
364
- </div>
365
-
366
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
367
- </form>
368
- </div>
369
-
370
- <!-- Watermark settings -->
371
-
372
- <?php
373
- $imageID = $wpdb->get_var("SELECT MIN(pid) FROM $wpdb->nggpictures");
374
- $imageID = $wpdb->get_row("SELECT * FROM $wpdb->nggpictures WHERE pid = '$imageID'");
375
- if ($imageID) $imageURL = '<img width="75%" src="'.NGGALLERY_URLPATH.'nggshow.php?pid='.$imageID->pid.'&amp;mode=watermark&amp;width=320&amp;height=240" alt="'.$imageID->alttext.'" title="'.$imageID->alttext.'" />';
376
-
377
- ?>
378
- <div id="watermark">
379
- <h2><?php _e('Watermark','nggallery'); ?></h2>
380
- <p><?php _e('Please note : You can only activate the watermark under -> Manage Gallery . This action cannot be undone.', 'nggallery') ?></p>
381
- <form name="watermarkform" method="POST" action="<?php echo $filepath.'#watermark'; ?>" >
382
- <?php wp_nonce_field('ngg_settings') ?>
383
- <input type="hidden" name="page_options" value="wmPos,wmXpos,wmYpos,wmType,wmPath,wmFont,wmSize,wmColor,wmText,wmOpaque" />
384
- <div id="wm-preview">
385
- <h3><?php _e('Preview','nggallery') ?></h3>
386
- <p style="text-align:center;"><?php echo $imageURL; ?></p>
387
- <h3><?php _e('Position','nggallery') ?></h3>
388
- <div>
389
- <table id="wm-position">
390
- <tr>
391
- <td valign="top">
392
- <strong><?php _e('Position','nggallery') ?></strong>
393
- <table border="1">
394
- <tr>
395
- <td><input type="radio" name="wmPos" value="topLeft" <?php checked('topLeft', $ngg_options['wmPos']); ?> /></td>
396
- <td><input type="radio" name="wmPos" value="topCenter" <?php checked('topCenter', $ngg_options['wmPos']); ?> /></td>
397
- <td><input type="radio" name="wmPos" value="topRight" <?php checked('topRight', $ngg_options['wmPos']); ?> /></td>
398
- </tr>
399
- <tr>
400
- <td><input type="radio" name="wmPos" value="midLeft" <?php checked('midLeft', $ngg_options['wmPos']); ?> /></td>
401
- <td><input type="radio" name="wmPos" value="midCenter" <?php checked('midCenter', $ngg_options['wmPos']); ?> /></td>
402
- <td><input type="radio" name="wmPos" value="midRight" <?php checked('midRight', $ngg_options['wmPos']); ?> /></td>
403
- </tr>
404
- <tr>
405
- <td><input type="radio" name="wmPos" value="botLeft" <?php checked('botLeft', $ngg_options['wmPos']); ?> /></td>
406
- <td><input type="radio" name="wmPos" value="botCenter" <?php checked('botCenter', $ngg_options['wmPos']); ?> /></td>
407
- <td><input type="radio" name="wmPos" value="botRight" <?php checked('botRight', $ngg_options['wmPos']); ?> /></td>
408
- </tr>
409
- </table>
410
- </td>
411
- <td valign="top">
412
- <strong><?php _e('Offset','nggallery') ?></strong>
413
- <table border="0">
414
- <tr>
415
- <td>x</td>
416
- <td><input type="text" name="wmXpos" value="<?php echo $ngg_options['wmXpos'] ?>" size="4" /> px</td>
417
- </tr>
418
- <tr>
419
- <td>y</td>
420
- <td><input type="text" name="wmYpos" value="<?php echo $ngg_options['wmYpos'] ?>" size="4" /> px</td>
421
- </tr>
422
- </table>
423
- </td>
424
- </tr>
425
- </table>
426
- </div>
427
- </div>
428
- <h3><label><input type="radio" name="wmType" value="image" <?php checked('image', $ngg_options['wmType']); ?> /> <?php _e('Use image as watermark','nggallery') ?></label></h3>
429
- <table class="wm-table">
430
- <tr>
431
- <th><?php _e('URL to file','nggallery') ?> :</th>
432
- <td><input type="text" size="40" name="wmPath" value="<?php echo $ngg_options['wmPath']; ?>" /><br />
433
- <?php if(!ini_get('allow_url_fopen')) _e('The accessing of URL files is disabled at your server (allow_url_fopen)','nggallery') ?> </td>
434
- </tr>
435
- </table>
436
- <h3><label><input type="radio" name="wmType" value="text" <?php checked('text', $ngg_options['wmType']); ?> /> <?php _e('Use text as watermark','nggallery') ?></label></h3>
437
- <table class="wm-table">
438
- <tr>
439
- <th><?php _e('Font','nggallery') ?>:</th>
440
- <td><select name="wmFont" size="1"> <?php
441
- $fontlist = ngg_get_TTFfont();
442
- foreach ( $fontlist as $fontfile ) {
443
- echo "\n".'<option value="'.$fontfile.'" '.ngg_input_selected($fontfile, $ngg_options['wmFont']).' >'.$fontfile.'</option>';
444
- }
445
- ?>
446
- </select><br />
447
- <?php if ( !function_exists(ImageTTFBBox) )
448
- _e('This function will not work, cause you need the FreeType library','nggallery');
449
- else
450
- _e('You can upload more fonts in the folder <strong>nggallery/fonts</strong>','nggallery'); ?>
451
- </td>
452
- </tr>
453
- <tr>
454
- <th><?php _e('Size','nggallery') ?>:</th>
455
- <td><input type="text" name="wmSize" value="<?php echo $ngg_options['wmSize'] ?>" size="4" maxlength="2" /> px</td>
456
- </tr>
457
- <tr>
458
- <th><?php _e('Color','nggallery') ?>:</th>
459
- <td><input type="text" size="6" maxlength="6" id="wmColor" name="wmColor" onchange="setcolor('#previewText', this.value)" value="<?php echo $ngg_options['wmColor'] ?>" />
460
- <input type="text" size="1" readonly="readonly" id="previewText" style="background-color: #<?php echo $ngg_options['wmColor'] ?>" /> <?php _e('(hex w/o #)','nggallery') ?></td>
461
- </tr>
462
- <tr>
463
- <th valign="top"><?php _e('Text','nggallery') ?>:</th>
464
- <td><textarea name="wmText" cols="40" rows="4"><?php echo $ngg_options['wmText'] ?></textarea></td>
465
- </tr>
466
- <tr>
467
- <th><?php _e('Opaque','nggallery') ?>:</th>
468
- <td><input type="text" name="wmOpaque" value="<?php echo $ngg_options['wmOpaque'] ?>" size="3" maxlength="3" /> % </td>
469
- </tr>
470
- </table>
471
- <div class="clear"> &nbsp; </div>
472
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
473
- </form>
474
- </div>
475
-
476
- <!-- Slideshow settings -->
477
-
478
- <div id="slideshow">
479
- <form name="player_options" method="POST" action="<?php echo $filepath.'#slideshow'; ?>" >
480
- <?php wp_nonce_field('ngg_settings') ?>
481
- <input type="hidden" name="page_options" value="irWidth,irHeight,irShuffle,irLinkfromdisplay,irShownavigation,irShowicons,irWatermark,irOverstretch,irRotatetime,irTransition,irKenburns,irBackcolor,irFrontcolor,irLightcolor,irScreencolor,irAudio,irXHTMLvalid" />
482
- <h2><?php _e('Slideshow','nggallery'); ?></h2>
483
- <?php if (!NGGALLERY_IREXIST) { ?><p><div id="message" class="error fade"><p><?php _e('The imagerotator.swf is not in the nggallery folder, the slideshow will not work.','nggallery') ?></p></div></p><?php }?>
484
- <p><?php _e('The settings are used in the JW Image Rotator Version', 'nggallery') ?> 3.15 .
485
- <?php _e('See more information for the Flash Player on the web page', 'nggallery') ?> <a href="http://www.jeroenwijering.com/?item=JW_Image_Rotator" target="_blank" >JW Image Rotator from Jeroen Wijering</a>.
486
- </p>
487
- <table class="form-table">
488
- <tr>
489
- <th><?php _e('Default size (W x H)','nggallery') ?>:</th>
490
- <td><input type="text" size="3" maxlength="4" name="irWidth" value="<?php echo $ngg_options['irWidth'] ?>" /> x
491
- <input type="text" size="3" maxlength="4" name="irHeight" value="<?php echo $ngg_options['irHeight'] ?>" /></td>
492
- </tr>
493
- <tr>
494
- <th><?php _e('Shuffle mode','nggallery') ?>:</th>
495
- <td><input name="irShuffle" type="checkbox" value="1" <?php checked('1', $ngg_options['irShuffle']); ?> /></td>
496
- </tr>
497
- <tr>
498
- <th><?php _e('Show next image on click','nggallery') ?>:</th>
499
- <td><input name="irLinkfromdisplay" type="checkbox" value="1" <?php checked('1', $ngg_options['irLinkfromdisplay']); ?> /></td>
500
- </tr>
501
- <tr>
502
- <th><?php _e('Show navigation bar','nggallery') ?>:</th>
503
- <td><input name="irShownavigation" type="checkbox" value="1" <?php checked('1', $ngg_options['irShownavigation']); ?> /></td>
504
- </tr>
505
- <tr>
506
- <th><?php _e('Show loading icon','nggallery') ?>:</th>
507
- <td><input name="irShowicons" type="checkbox" value="1" <?php checked('1', $ngg_options['irShowicons']); ?> /></td>
508
- </tr>
509
- <tr>
510
- <th><?php _e('Use watermark logo','nggallery') ?>:</th>
511
- <td><input name="irWatermark" type="checkbox" value="1" <?php checked('1', $ngg_options['irWatermark']); ?> />
512
- <?php _e('You can change the logo at the watermark settings','nggallery') ?></td>
513
- </tr>
514
- <tr>
515
- <th><?php _e('Stretch image','nggallery') ?>:</th>
516
- <td>
517
- <select size="1" name="irOverstretch">
518
- <option value="true" <?php selected('true', $ngg_options['irOverstretch']); ?> ><?php _e('true', 'nggallery') ;?></option>
519
- <option value="false" <?php selected('false', $ngg_options['irOverstretch']); ?> ><?php _e('false', 'nggallery') ;?></option>
520
- <option value="fit" <?php selected('fit', $ngg_options['irOverstretch']); ?> ><?php _e('fit', 'nggallery') ;?></option>
521
- <option value="none" <?php selected('none', $ngg_options['irOverstretch']); ?> ><?php _e('none', 'nggallery') ;?></option>
522
- </select>
523
- </td>
524
- </tr>
525
- <tr>
526
- <th><?php _e('Duration time','nggallery') ?>:</th>
527
- <td><input type="text" size="3" maxlength="3" name="irRotatetime" value="<?php echo $ngg_options['irRotatetime'] ?>" /> <?php _e('sec.', 'nggallery') ;?></td>
528
- </tr>
529
- <tr>
530
- <th><?php _e('Transition / Fade effect','nggallery') ?>:</th>
531
- <td>
532
- <select size="1" name="irTransition">
533
- <option value="fade" <?php selected('fade', $ngg_options['irTransition']); ?> ><?php _e('fade', 'nggallery') ;?></option>
534
- <option value="bgfade" <?php selected('bgfade', $ngg_options['irTransition']); ?> ><?php _e('bgfade', 'nggallery') ;?></option>
535
- <option value="slowfade" <?php selected('slowfade', $ngg_options['irTransition']); ?> ><?php _e('slowfade', 'nggallery') ;?></option>
536
- <option value="circles" <?php selected('circles', $ngg_options['irTransition']); ?> ><?php _e('circles', 'nggallery') ;?></option>
537
- <option value="bubbles" <?php selected('bubbles', $ngg_options['irTransition']); ?> ><?php _e('bubbles', 'nggallery') ;?></option>
538
- <option value="blocks" <?php selected('blocks', $ngg_options['irTransition']); ?> ><?php _e('blocks', 'nggallery') ;?></option>
539
- <option value="fluids" <?php selected('fluids', $ngg_options['irTransition']); ?> ><?php _e('fluids', 'nggallery') ;?></option>
540
- <option value="flash" <?php selected('flash', $ngg_options['irTransition']); ?> ><?php _e('flash', 'nggallery') ;?></option>
541
- <option value="lines" <?php selected('lines', $ngg_options['irTransition']); ?> ><?php _e('lines', 'nggallery') ;?></option>
542
- <option value="random" <?php selected('random', $ngg_options['irTransition']); ?> ><?php _e('random', 'nggallery') ;?></option>
543
- </select>
544
- </tr>
545
- <tr>
546
- <th><?php _e('Use slow zooming effect','nggallery') ?>:</th>
547
- <td><input name="irKenburns" type="checkbox" value="1" <?php checked('1', $ngg_options['irKenburns']); ?> /></td>
548
- </tr>
549
- <tr>
550
- <th><?php _e('Background Color','nggallery') ?>:</th>
551
- <td><input type="text" size="6" maxlength="6" id="irBackcolor" name="irBackcolor" onchange="setcolor('#previewBack', this.value)" value="<?php echo $ngg_options['irBackcolor'] ?>" />
552
- <input type="text" size="1" readonly="readonly" id="previewBack" style="background-color: #<?php echo $ngg_options['irBackcolor'] ?>" /></td>
553
- </tr>
554
- <tr>
555
- <th><?php _e('Texts / Buttons Color','nggallery') ?>:</th>
556
- <td><input type="text" size="6" maxlength="6" id="irFrontcolor" name="irFrontcolor" onchange="setcolor('#previewFront', this.value)" value="<?php echo $ngg_options['irFrontcolor'] ?>" />
557
- <input type="text" size="1" readonly="readonly" id="previewFront" style="background-color: #<?php echo $ngg_options['irFrontcolor'] ?>" /></td>
558
- </tr>
559
- <tr>
560
- <th><?php _e('Rollover / Active Color','nggallery') ?>:</th>
561
- <td><input type="text" size="6" maxlength="6" id="irLightcolor" name="irLightcolor" onchange="setcolor('#previewLight', this.value)" value="<?php echo $ngg_options['irLightcolor'] ?>" />
562
- <input type="text" size="1" readonly="readonly" id="previewLight" style="background-color: #<?php echo $ngg_options['irLightcolor'] ?>" /></td>
563
- </tr>
564
- <tr>
565
- <th><?php _e('Screen Color','nggallery') ?>:</th>
566
- <td><input type="text" size="6" maxlength="6" id="irScreencolor" name="irScreencolor" onchange="setcolor('#previewScreen', this.value)" value="<?php echo $ngg_options['irScreencolor'] ?>" />
567
- <input type="text" size="1" readonly="readonly" id="previewScreen" style="background-color: #<?php echo $ngg_options['irScreencolor'] ?>" /></td>
568
- </tr>
569
- <tr>
570
- <th><?php _e('Background music (URL)','nggallery') ?>:</th>
571
- <td><input type="text" size="50" id="irAudio" name="irAudio" value="<?php echo $ngg_options['irAudio'] ?>" /></td>
572
- </tr>
573
- <tr>
574
- <th><?php _e('Try XHTML validation (with CDATA)','nggallery') ?>:</th>
575
- <td><input name="irXHTMLvalid" type="checkbox" value="1" <?php checked('1', $ngg_options['irXHTMLvalid']); ?> />
576
- <?php _e('Important : Could causes problem at some browser. Please recheck your page.','nggallery') ?></td>
577
- </tr>
578
- </table>
579
- <div class="clear"> &nbsp; </div>
580
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
581
- </form>
582
- </div>
583
- </div>
584
-
585
- <?php
586
- }
587
-
588
- function ngg_get_TTFfont() {
589
-
590
- $ttf_fonts = array ();
591
-
592
- // Files in wp-content/plugins/nggallery/fonts directory
593
- $plugin_root = NGGALLERY_ABSPATH."fonts";
594
-
595
- $plugins_dir = @ dir($plugin_root);
596
- if ($plugins_dir) {
597
- while (($file = $plugins_dir->read()) !== false) {
598
- if (preg_match('|^\.+$|', $file))
599
- continue;
600
- if (is_dir($plugin_root.'/'.$file)) {
601
- $plugins_subdir = @ dir($plugin_root.'/'.$file);
602
- if ($plugins_subdir) {
603
- while (($subfile = $plugins_subdir->read()) !== false) {
604
- if (preg_match('|^\.+$|', $subfile))
605
- continue;
606
- if (preg_match('|\.ttf$|', $subfile))
607
- $ttf_fonts[] = "$file/$subfile";
608
- }
609
- }
610
- } else {
611
- if (preg_match('|\.ttf$|', $file))
612
- $ttf_fonts[] = $file;
613
- }
614
- }
615
- }
616
-
617
- return $ttf_fonts;
618
- }
619
-
620
- /**********************************************************/
621
- // taken from WP Core
622
-
623
- function ngg_input_selected( $selected, $current) {
624
- if ( $selected == $current)
625
- return ' selected="selected"';
626
- }
627
-
628
- function ngg_input_checked( $checked, $current) {
629
- if ( $checked == $current)
630
- return ' checked="checked"';
631
- }
632
-
633
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/setup.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_admin_setup() {
5
- global $wpdb;
6
-
7
- if (isset($_POST['resetdefault'])) {
8
- check_admin_referer('ngg_uninstall');
9
-
10
- ngg_default_options();
11
- nggallery::show_message(__('Reset all settings to default parameter','nggallery'));
12
- }
13
-
14
- if (isset($_POST['uninstall'])) {
15
-
16
- check_admin_referer('ngg_uninstall');
17
-
18
- $wpdb->query("DROP TABLE $wpdb->nggpictures");
19
- $wpdb->query("DROP TABLE $wpdb->nggallery");
20
- $wpdb->query("DROP TABLE $wpdb->nggalbum");
21
- $wpdb->query("DROP TABLE $wpdb->nggtags");
22
- $wpdb->query("DROP TABLE $wpdb->nggpic2tags");
23
-
24
- delete_option( "ngg_options" );
25
- delete_option( "ngg_db_version");
26
-
27
- // now remove the capability
28
- ngg_remove_capability("NextGEN Gallery overview");
29
- ngg_remove_capability("NextGEN Use TinyMCE");
30
- ngg_remove_capability("NextGEN Upload images");
31
- ngg_remove_capability("NextGEN Manage gallery");
32
- ngg_remove_capability("NextGEN Edit album");
33
- ngg_remove_capability("NextGEN Change style");
34
- ngg_remove_capability("NextGEN Change options");
35
-
36
- nggallery::show_message(__('Uninstall sucessfull ! Now delete the plugin and enjoy your life ! Good luck !','nggallery'));
37
- }
38
-
39
- ?>
40
-
41
- <div class="wrap">
42
- <h2><?php _e('Reset options', 'nggallery') ;?></h2>
43
- <form name="resetsettings" method="post">
44
- <?php wp_nonce_field('ngg_uninstall') ?>
45
- <p><?php _e('Reset all options/settings to the default installation.', 'nggallery') ;?></p>
46
- <div align="center"><input type="submit" class="button" name="resetdefault" value="<?php _e('Reset settings', 'nggallery') ;?>" onclick="javascript:check=confirm('<?php _e('Reset all options to default settings ?\n\nChoose [Cancel] to Stop, [OK] to proceed.\n','nggallery'); ?>');if(check==false) return false;" /></div>
47
- </form>
48
- </div>
49
- <?php if (!IS_WPMU || wpmu_site_admin() ) : ?>
50
- <div class="wrap">
51
- <h2><?php _e('Uninstall plugin tables', 'nggallery') ;?></h2>
52
-
53
- <form name="resetsettings" method="post">
54
- <div>
55
- <?php wp_nonce_field('ngg_uninstall') ?>
56
- <p><?php _e('You don\'t like NextGEN Gallery ?', 'nggallery') ;?></p>
57
- <p><?php _e('No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextGEN Gallery does not remove any data that may have been created. ', 'nggallery') ;?>
58
- </div>
59
- <p><font color="red"><strong><?php _e('WARNING:', 'nggallery') ;?></strong><br />
60
- <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables', 'nggallery') ;?> <strong><?php echo $wpdb->nggpictures; ?></strong>, <strong><?php echo $wpdb->nggalbum; ?></strong>, <strong><?php echo $wpdb->nggtags; ?></strong>, <strong><?php echo $wpdb->nggpic2tags; ?></strong> <?php _e('and', 'nggallery') ;?> <strong><?php echo $wpdb->nggalbum; ?></strong>.</font></p>
61
- <div align="center">
62
- <input type="submit" name="uninstall" class="button delete" value="<?php _e('Uninstall plugin', 'nggallery') ?>" onclick="javascript:check=confirm('<?php _e('You are about to Uninstall this plugin from WordPress.\nThis action is not reversible.\n\nChoose [Cancel] to Stop, [OK] to Uninstall.\n','nggallery'); ?>');if(check==false) return false;"/>
63
- </div>
64
- </form>
65
- </div>
66
- <?php endif; ?>
67
-
68
- <?php
69
- }
70
-
71
- function ngg_remove_capability($capability){
72
- // This function remove the $capability
73
- $check_order = array("subscriber", "contributor", "author", "editor", "administrator");
74
-
75
- foreach ($check_order as $role) {
76
-
77
- $role = get_role($role);
78
- $role->remove_cap($capability) ;
79
- }
80
-
81
- }
82
-
83
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/showmeta.php DELETED
@@ -1,127 +0,0 @@
1
- <?php
2
-
3
- $root = dirname(dirname(dirname(dirname(dirname(__FILE__)))));
4
-
5
- if (file_exists($root.'/wp-load.php')) {
6
- // WP 2.6
7
- require_once($root.'/wp-load.php');
8
- } else {
9
- // Before 2.6
10
- if (!file_exists($root.'/wp-config.php'))
11
- die; // stop when wp-config is not there
12
- require_once($root.'/wp-config.php');
13
- }
14
-
15
- require_once(NGGALLERY_ABSPATH.'/lib/nggmeta.lib.php');
16
-
17
- if ( !is_user_logged_in() )
18
- die(__('Cheatin&#8217; uh?'));
19
-
20
- if ( !current_user_can('NextGEN Manage gallery') )
21
- die(__('Cheatin&#8217; uh?'));
22
-
23
- function get_out_now() { exit; }
24
- add_action( 'shutdown', 'get_out_now', -1 );
25
-
26
- global $wpdb;
27
-
28
- $id = (int) $_GET['id'];
29
- // let's get the image data
30
- $picture = new nggImage($id );
31
- // let's get the meta data'
32
- $meta = new nggMeta($picture->absPath);
33
- $exifdata = $meta->get_EXIF();
34
- $iptcdata = $meta->get_IPTC();
35
- $xmpdata = $meta->get_XMP();
36
-
37
- ?>
38
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
39
- <html xmlns="http://www.w3.org/1999/xhtml">
40
- <head>
41
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
42
- <link rel="stylesheet" href="<?php echo get_option( 'siteurl' ) ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
43
- <style type="text/css">
44
- #TB_title{
45
- background-color:#E5F3FF !important;
46
- }
47
- </style>
48
- </head>
49
- <body class="wp-admin">
50
-
51
- <!-- EXIF DATA -->
52
- <fieldset class="options nggallery">
53
- <legend><?php _e('EXIF Data','nggallery'); ?></legend>
54
- <?php if ($exifdata) { ?>
55
- <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
56
- <thead>
57
- <tr>
58
- <th scope="col"><?php _e('Tag','nggallery'); ?></th>
59
- <th scope="col"><?php _e('Value','nggallery'); ?></th>
60
- </tr>
61
- </thead>
62
- <?php
63
- foreach ($exifdata as $key => $value){
64
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
65
- echo '<tr '.$class.'>
66
- <td style="width:230px">'.$meta->i8n_name($key).'</td>
67
- <td>'.$value.'</td>
68
- </tr>';
69
- }
70
- ?>
71
- </table>
72
- <?php } else echo "<strong>". __('No exif data','nggallery'). "</strong>"; ?>
73
- </fieldset>
74
-
75
- <!-- IPTC DATA -->
76
- <?php if ($iptcdata) { ?>
77
- <fieldset class="options nggallery">
78
- <legend><?php _e('IPTC Data','nggallery'); ?></legend>
79
- <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
80
- <thead>
81
- <tr>
82
- <th scope="col"><?php _e('Tag','nggallery'); ?></th>
83
- <th scope="col"><?php _e('Value','nggallery'); ?></th>
84
- </tr>
85
- </thead>
86
- <?php
87
- foreach ($iptcdata as $key => $value){
88
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
89
- echo '<tr '.$class.'>
90
- <td style="width:230px">'.$meta->i8n_name($key).'</td>
91
- <td>'.$value.'</td>
92
- </tr>';
93
- }
94
- ?>
95
- </table>
96
- </fieldset>
97
- <?php } ?>
98
-
99
- <!-- XMP DATA -->
100
- <?php if ($xmpdata) { ?>
101
- <fieldset class="options nggallery">
102
- <legend><?php _e('XMP Data','nggallery'); ?></legend>
103
- <table id="the-list-x" width="100%" cellspacing="3" cellpadding="3">
104
- <thead>
105
- <tr>
106
- <th scope="col"><?php _e('Tag','nggallery'); ?></th>
107
- <th scope="col"><?php _e('Value','nggallery'); ?></th>
108
- </tr>
109
- </thead>
110
- <?php
111
- foreach ($xmpdata as $key => $value){
112
- $class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
113
- echo '<tr '.$class.'>
114
- <td style="width:230px">'.$meta->i8n_name($key).'</td>
115
- <td>'.$value.'</td>
116
- </tr>';
117
- }
118
- ?>
119
- </table>
120
- </fieldset>
121
- <?php } ?>
122
-
123
- </body>
124
- </html>
125
- <?php
126
-
127
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/sort.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * @author Alex Rabe
5
- * @copyright 2008
6
- */
7
-
8
- function nggallery_sortorder($galleryID = 0){
9
- global $wpdb;
10
-
11
- if ($galleryID == 0) return;
12
-
13
- $galleryID = (int) $galleryID;
14
-
15
- // get the options
16
- $ngg_options=get_option('ngg_options');
17
-
18
- if (isset ($_POST['updateSortorder'])) {
19
- check_admin_referer('ngg_updatesortorder');
20
- // get variable new sortorder
21
- parse_str($_POST['sortorder']);
22
- if (is_array($sortArray)){
23
- $neworder = array();
24
- foreach($sortArray as $pid) {
25
- $pid = substr($pid, 4); // get id from "pid-x"
26
- $neworder[] = (int) $pid;
27
- }
28
- $sortindex = 1;
29
- foreach($neworder as $pic_id) {
30
- $wpdb->query("UPDATE $wpdb->nggpictures SET sortorder = '$sortindex' WHERE pid = $pic_id");
31
- $sortindex++;
32
- }
33
- nggallery::show_message(__('Sort order changed','nggallery'));
34
- }
35
- }
36
-
37
- //TODO:A unique gallery call must provide me with this information, like $gallery = new nggGallery($id);
38
-
39
- // get gallery values
40
- $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
41
-
42
- // set gallery url
43
- $act_gallery_url = get_option ('siteurl')."/".$act_gallery->path."/";
44
- $act_thumbnail_url = get_option ('siteurl')."/".$act_gallery->path.nggallery::get_thumbnail_folder($act_gallery->path, FALSE);
45
- $act_thumb_prefix = nggallery::get_thumbnail_prefix($act_gallery->path, FALSE);
46
-
47
- $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' ORDER BY sortorder ASC");
48
-
49
- ?>
50
- <script type='text/javascript' src='<?php echo NGGALLERY_URLPATH ?>admin/js/sorter.js'></script>
51
- <div class="wrap">
52
- <div class="bordertitle">
53
- <h2 style="border: medium none ; padding-bottom: 0px;"><?php _e('Sort Gallery', 'nggallery') ?></h2>
54
- <form id="sortGallery" method="POST" action="<?php echo 'admin.php?page=nggallery-manage-gallery&amp;mode=sort&amp;gid='.$galleryID ?>" onsubmit="saveImageOrder()" accept-charset="utf-8">
55
- <?php wp_nonce_field('ngg_updatesortorder') ?>
56
- <input name="sortorder" type="hidden" />
57
- <input class="button" type="submit" name="backToGallery" value="<?php _e('Back to gallery', 'nggallery') ?>" />
58
- <input class="button" type="submit" name="updateSortorder" onclick="saveImageOrder()" value="<?php _e('Update Sort Order', 'nggallery') ?> &raquo;" />
59
- </form>
60
- </div>
61
- <div id="debug" style="clear:both"></div>
62
- <?php
63
- if($picturelist) {
64
- foreach($picturelist as $picture) {
65
- ?>
66
- <div class="imageBox" id="pid-<?php echo $picture->pid ?>">
67
- <div class="imageBox_theImage" style="background-image:url('<?php echo $act_thumbnail_url.$act_thumb_prefix.$picture->filename ?>')"></div>
68
- <div class="imageBox_label"><span><?php echo stripslashes($picture->alttext) ?></span></div>
69
- </div>
70
- <?php
71
- }
72
- }
73
- ?>
74
- <div id="insertionMarker">
75
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_top.gif"/>
76
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_middle.gif" id="insertionMarkerLine"/>
77
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_bottom.gif"/>
78
- </div>
79
- <div id="dragDropContent"></div>
80
- </div>
81
-
82
- <?php
83
-
84
- }
85
-
86
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/style.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_admin_style() {
5
-
6
- $ngg_options = get_option('ngg_options');
7
-
8
- if (isset($_POST['css'])) {
9
- check_admin_referer('ngg_style');
10
- $act_cssfile = $_POST['css'];
11
- if (isset($_POST['activate'])) {
12
- // save option now
13
- $ngg_options[activateCSS] = $_POST['activateCSS'];
14
- $ngg_options[CSSfile] = $act_cssfile;
15
- update_option('ngg_options', $ngg_options);
16
- $messagetext = '<font color="green">'.__('Update successfully','nggallery').'</font>';
17
- }
18
- } else {
19
- // get the options
20
- if (isset($_POST['file']))
21
- $act_cssfile = $_POST['file'];
22
- else
23
- $act_cssfile = $ngg_options[CSSfile];
24
- }
25
-
26
- // set the path
27
- $real_file = NGGALLERY_ABSPATH."css/".$act_cssfile;
28
-
29
- if (isset($_POST['updatecss'])) {
30
-
31
- check_admin_referer('ngg_style');
32
-
33
- if ( !current_user_can('edit_themes') )
34
- wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>');
35
-
36
- $newcontent = stripslashes($_POST['newcontent']);
37
-
38
- if (is_writeable($real_file)) {
39
- $f = fopen($real_file, 'w+');
40
- fwrite($f, $newcontent);
41
-
42
- fclose($f);
43
- $messagetext = '<font color="green">'.__('CSS file successfully updated','nggallery').'</font>';
44
- }
45
- }
46
-
47
- // get the content of the file
48
- //TODO: BUG : Read failed after write a file, maybe a Cache problem
49
- if (!is_file($real_file))
50
- $error = 1;
51
-
52
- if (!$error && filesize($real_file) > 0) {
53
- $f = fopen($real_file, 'r');
54
- $content = fread($f, filesize($real_file));
55
- $content = htmlspecialchars($content);
56
- }
57
-
58
- // message window
59
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
60
-
61
- ?>
62
- <div class="wrap">
63
-
64
- <div class="bordertitle">
65
- <h2 style="border: medium none ; padding-bottom: 0px;"><?php _e('Style Editor','nggallery') ?></h2>
66
- <form id="themeselector" name="cssfiles" method="post">
67
- <?php wp_nonce_field('ngg_style') ?>
68
- <strong><?php _e('Activate and use style sheet:','nggallery') ?></strong>
69
- <input type="checkbox" name="activateCSS" value="1" <?php checked('1', $ngg_options['activateCSS']); ?> />
70
- <select name="css" id="theme" style="margin: 0pt; padding: 0pt;" onchange="this.form.submit();">
71
- <?php
72
- $csslist = ngg_get_cssfiles();
73
- foreach ($csslist as $key =>$a_cssfile) {
74
- $css_name = $a_cssfile['Name'];
75
- if ($key == $act_cssfile) {
76
- $file_show = $key;
77
- $selected = " selected='selected'";
78
- $act_css_description = $a_cssfile['Description'];
79
- $act_css_author = $a_cssfile['Author'];
80
- $act_css_version = $a_cssfile['Version'];
81
- }
82
- else $selected = '';
83
- $css_name = attribute_escape($css_name);
84
- echo "\n\t<option value=\"$key\" $selected>$css_name</option>";
85
- }
86
- ?>
87
- </select>
88
- <input class="button" type="submit" name="activate" value="<?php _e('Activate','nggallery') ?> &raquo;" class="button" />
89
- </form>
90
- </div>
91
- <br style="clear: both;"/>
92
-
93
- <?php if (!IS_WPMU || wpmu_site_admin() ) { ?>
94
- <div class="tablenav" style="margin-right: 210px;">
95
- <?php
96
- if ( is_writeable($real_file) ) {
97
- echo '<big>' . sprintf(__('Editing <strong>%s</strong>'), $file_show) . '</big>';
98
- } else {
99
- echo '<big>' . sprintf(__('Browsing <strong>%s</strong>'), $file_show) . '</big>';
100
- }
101
- ?>
102
- </div>
103
- <br style="clear: both;"/>
104
-
105
- <div id="templateside">
106
- <ul>
107
- <li><strong><?php _e('Author','nggallery') ?> :</strong> <?php echo $act_css_author ?></li>
108
- <li><strong><?php _e('Version','nggallery') ?> :</strong> <?php echo $act_css_version ?></li>
109
- <li><strong><?php _e('Description','nggallery') ?> :<br /></strong> <?php echo $act_css_description ?></li>
110
- </ul>
111
- </div>
112
-
113
- <?php
114
- if (!$error) {
115
- ?>
116
- <form name="template" id="template" method="post">
117
- <?php wp_nonce_field('ngg_style') ?>
118
- <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
119
- <input type="hidden" name="updatecss" value="updatecss" />
120
- <input type="hidden" name="file" value="<?php echo $file_show ?>" />
121
- </div>
122
- <?php if ( is_writeable($real_file) ) : ?>
123
- <p class="submit">
124
- <input type="submit" name="submit" value="<?php _e('Update File &raquo;','nggallery') ?>" tabindex="2" />
125
- </p>
126
- <?php else : ?>
127
- <p><em><?php _e('If this file were writable you could edit it.','nggallery'); ?></em></p>
128
- <?php endif; ?>
129
- </form>
130
- <?php
131
- } else {
132
- echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.','nggallery') . '</p></div>';
133
- }
134
- ?>
135
- <div class="clear"> &nbsp; </div>
136
- </div> <!-- wrap-->
137
-
138
- <?php
139
- }
140
-
141
- } // END nggallery_admin_style()
142
-
143
- /**********************************************************/
144
- // ### Code from wordpress plugin import
145
- // read in the css files
146
- function ngg_get_cssfiles() {
147
- global $cssfiles;
148
-
149
- if (isset ($cssfiles)) {
150
- return $cssfiles;
151
- }
152
-
153
- $cssfiles = array ();
154
-
155
- // Files in wp-content/plugins/nggallery/css directory
156
- $plugin_root = NGGALLERY_ABSPATH."css";
157
-
158
- $plugins_dir = @ dir($plugin_root);
159
- if ($plugins_dir) {
160
- while (($file = $plugins_dir->read()) !== false) {
161
- if (preg_match('|^\.+$|', $file))
162
- continue;
163
- if (is_dir($plugin_root.'/'.$file)) {
164
- $plugins_subdir = @ dir($plugin_root.'/'.$file);
165
- if ($plugins_subdir) {
166
- while (($subfile = $plugins_subdir->read()) !== false) {
167
- if (preg_match('|^\.+$|', $subfile))
168
- continue;
169
- if (preg_match('|\.css$|', $subfile))
170
- $plugin_files[] = "$file/$subfile";
171
- }
172
- }
173
- } else {
174
- if (preg_match('|\.css$|', $file))
175
- $plugin_files[] = $file;
176
- }
177
- }
178
- }
179
-
180
- if ( !$plugins_dir || !$plugin_files )
181
- return $cssfiles;
182
-
183
- foreach ( $plugin_files as $plugin_file ) {
184
- if ( !is_readable("$plugin_root/$plugin_file"))
185
- continue;
186
-
187
- $plugin_data = ngg_get_cssfiles_data("$plugin_root/$plugin_file");
188
-
189
- if ( empty ($plugin_data['Name']) )
190
- continue;
191
-
192
- $cssfiles[plugin_basename($plugin_file)] = $plugin_data;
193
- }
194
-
195
- uasort($cssfiles, create_function('$a, $b', 'return strnatcasecmp($a["Name"], $b["Name"]);'));
196
-
197
- return $cssfiles;
198
- }
199
-
200
- /**********************************************************/
201
- // parse the Header information
202
- function ngg_get_cssfiles_data($plugin_file) {
203
- $plugin_data = implode('', file($plugin_file));
204
- preg_match("|CSS Name:(.*)|i", $plugin_data, $plugin_name);
205
- preg_match("|Description:(.*)|i", $plugin_data, $description);
206
- preg_match("|Author:(.*)|i", $plugin_data, $author_name);
207
- if (preg_match("|Version:(.*)|i", $plugin_data, $version))
208
- $version = trim($version[1]);
209
- else
210
- $version = '';
211
-
212
- $description = wptexturize(trim($description[1]));
213
-
214
- $name = trim($plugin_name[1]);
215
- $author = trim($author_name[1]);
216
-
217
- return array ('Name' => $name, 'Description' => $description, 'Author' => $author, 'Version' => $version );
218
- }
219
-
220
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/upload.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- $root = dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))));
4
-
5
- if (file_exists($root.'/wp-load.php')) {
6
- // WP 2.6
7
- require_once($root.'/wp-load.php');
8
- } else {
9
- // Before 2.6
10
- if (!file_exists($root.'/wp-config.php'))
11
- die; // stop when wp-config is not there
12
- require_once($root.'/wp-config.php');
13
- }
14
-
15
- // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
16
- if (function_exists('is_ssl')){
17
- if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
18
- $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
19
- elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
20
- $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
21
- } else {
22
- if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
23
- $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
24
- }
25
-
26
- // don't ask me why, sometime needed, taken from wp core
27
- unset($current_user);
28
-
29
- // admin.php require a proper login cookie
30
- require_once(ABSPATH . '/wp-admin/admin.php');
31
-
32
- header('Content-Type: text/plain');
33
-
34
- //check for correct capability
35
- if ( !is_user_logged_in() )
36
- die('Login failure. -1');
37
-
38
- //check for correct capability
39
- if ( !current_user_can('NextGEN Manage gallery') )
40
- die('You do not have permission to upload files. -2');
41
-
42
- function get_out_now() { exit; }
43
- add_action( 'shutdown', 'get_out_now', -1 );
44
-
45
- //check for correct nonce
46
- check_admin_referer('ngg_swfupload');
47
-
48
- //check for nggallery
49
- if ( !defined('NGGALLERY_ABSPATH') )
50
- die('NextGEN Gallery not available. -3');
51
-
52
- include_once (NGGALLERY_ABSPATH. 'admin/wp25/functions.php');
53
-
54
- // get the gallery
55
- $galleryID = (int) $_POST['galleryselect'];
56
-
57
- echo nggAdmin::swfupload_image($galleryID);
58
-
59
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wp25/wpmu.php DELETED
@@ -1,106 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_wpmu_setup() {
5
- global $wpdb;
6
-
7
- //to be sure
8
- if (!is_site_admin())
9
- die('You are not allowed to call this page.');
10
-
11
- // get the options
12
- $ngg_options = get_site_option('ngg_options');
13
-
14
- // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
15
- $filepath = get_option('siteurl'). '/wp-admin/wpmu-admin.php?page='.$_GET['page'];
16
-
17
- if ( isset($_POST['updateoption']) ) {
18
- check_admin_referer('ngg_wpmu_settings');
19
- // get the hidden option fields, taken from WP core
20
- if ( $_POST['page_options'] )
21
- $options = explode(',', stripslashes($_POST['page_options']));
22
- if ($options) {
23
- foreach ($options as $option) {
24
- $option = trim($option);
25
- $value = trim($_POST[$option]);
26
- // $value = sanitize_option($option, $value); // This does strip slashes on those that need it
27
- $ngg_options[$option] = $value;
28
- }
29
- }
30
-
31
- update_site_option('ngg_options', $ngg_options);
32
- $messagetext = '<font color="green">'.__('Update successfully','nggallery').'</font>';
33
- }
34
-
35
- // message windows
36
- if(!empty($messagetext)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$messagetext.'</p></div>'; }
37
-
38
- ?>
39
-
40
- <div class="wrap">
41
- <h2><?php _e('General WordPress MU Settings','nggallery'); ?></h2>
42
- <form name="generaloptions" method="post">
43
- <?php wp_nonce_field('ngg_wpmu_settings') ?>
44
- <input type="hidden" name="page_options" value="gallerypath,wpmuQuotaCheck,wpmuZipUpload,wpmuStyle,wpmuRoles,wpmuCSSfile" />
45
- <fieldset class="options">
46
- <table class="optiontable editform">
47
- <tr valign="top">
48
- <th align="left"><?php _e('Gallery path','nggallery') ?></th>
49
- <td><input type="text" size="50" name="gallerypath" value="<?php echo $ngg_options[gallerypath]; ?>" title="TEST" /><br />
50
- <?php _e('This is the default path for all blogs. With the placeholder %BLOG_ID% you can organize the folder structure better. The path must end with a /.','nggallery') ?></td>
51
- </tr>
52
- <tr>
53
- <th valign="top"><?php _e('Enable upload quota check','nggallery') ?>:</th>
54
- <td><input name="wpmuQuotaCheck" type="checkbox" value="1" <?php checked('1', $ngg_options[wpmuQuotaCheck]); ?> />
55
- <?php _e('Should work if the gallery is bellow the blog.dir','nggallery') ?>
56
- </td>
57
- </tr>
58
- <tr>
59
- <th valign="top"><?php _e('Enable zip upload option','nggallery') ?>:</th>
60
- <td><input name="wpmuZipUpload" type="checkbox" value="1" <?php checked('1', $ngg_options[wpmuZipUpload]); ?> />
61
- <?php _e('Allow users to upload zip folders.','nggallery') ?>
62
- </td>
63
- </tr>
64
- <tr>
65
- <th valign="top"><?php _e('Enable style selection','nggallery') ?>:</th>
66
- <td><input name="wpmuStyle" type="checkbox" value="1" <?php checked('1', $ngg_options[wpmuStyle]); ?> />
67
- <?php _e('Allow users to choose a style for the gallery.','nggallery') ?>
68
- </td>
69
- </tr>
70
- <tr>
71
- <th valign="top"><?php _e('Enable roles/capabilities','nggallery') ?>:</th>
72
- <td><input name="wpmuRoles" type="checkbox" value="1" <?php checked('1', $ngg_options[wpmuRoles]); ?> />
73
- <?php _e('Allow users to change the roles for other blog authors.','nggallery') ?>
74
- </td>
75
- </tr>
76
- <tr>
77
- <th valign="top"><?php _e('Default style','nggallery') ?>:</th>
78
- <td>
79
- <select name="wpmuCSSfile">
80
- <?php
81
- $csslist = ngg_get_cssfiles();
82
- foreach ($csslist as $key =>$a_cssfile) {
83
- $css_name = $a_cssfile['Name'];
84
- if ($key == $ngg_options[wpmuCSSfile]) {
85
- $file_show = $key;
86
- $selected = " selected='selected'";
87
- }
88
- else $selected = '';
89
- $css_name = attribute_escape($css_name);
90
- echo "\n\t<option value=\"$key\" $selected>$css_name</option>";
91
- }
92
- ?>
93
- </select><br />
94
- <?php _e('Choose the default style for the galleries.','nggallery') ?>
95
- </td>
96
- </tr>
97
- </table>
98
- <div class="submit"><input type="submit" name="updateoption" value="<?php _e('Update') ;?> &raquo;"/></div>
99
- </fieldset>
100
- </form>
101
- </div>
102
-
103
- <?php
104
- }
105
-
106
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpmu.php CHANGED
@@ -101,7 +101,5 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
101
  </div>
102
 
103
  <?php
104
- }
105
-
106
-
107
  ?>
101
  </div>
102
 
103
  <?php
104
+ }
 
 
105
  ?>
changelog.txt CHANGED
@@ -1,10 +1,43 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
- V0.99.1 - 01.10.2008
5
- - Bugfix : Added div wrapper around slideshow
6
- - Bugfix : Changed default values for flashvars
7
- - Bugfix : Updated to imagerotator 3.17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  V0.99 - 27.09.2008
10
  - Changed : Included swfobject version 2.1
@@ -20,12 +53,12 @@ V0.97 - 10.07.2008
20
  - Changed : Minor updates for WP2.6
21
  - Changed : Added new filters (THX to Vincent Prat)
22
  - Removed : Revert singlepic wrapper, breaks validation
23
-
24
  V0.96 - 18.05.2008
25
  - Changed : Use postbox for gallery settings
26
  - Added : New filter function to add custom columns
27
  - Bugfix : Fixed width for Thickbox in Manage gallery
28
- - Bugfix : Fixed width for media upload select box
29
  - Bugfix : Remove <p> tag in singlepic regex
30
  - Bugfix : Correct format of shutter speed
31
  - Bugfix : Album name in Short code not useable
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ V1.00 - 11.12.2008
5
+ - NEW : Adding some rewrite rules for the Blog title for a better SEO (Will be continued...)
6
+ - NEW : Added ImageMagick support (currently a bit experimental) (THX to Frederic de Ranter)
7
+ - NEW : Automatic unistall via register_uninstall_hook()
8
+ - NEW : Added a presort option to sort easier the images
9
+ - NEW : Lookup for a nggallery.css in the theme folder
10
+ - NEW : Added Date/Time field to database and import it from EXIF, new sort option
11
+ - NEW : Multi Widgets to show links to Media RSS feeds (THX to Vincent Prat)
12
+ - NEW : PicLens support for galleries (THX to Vincent Prat)
13
+ - NEW : Copy/Move images between galleries (THX to Vincent Prat)
14
+ - NEW : Media RSS feeds (either for galleries, albums or global) (THX to Vincent Prat)
15
+ - NEW : Image tag management (THX to Vincent Prat)
16
+ - NEW : Convert all shortcodes to WP shortcodes API
17
+ - NEW : AJAX based thumbnail generator
18
+ - NEW : Create output via template files, more flexible and support for multiple templates
19
+ - NEW : Extended role system. Each gallery has now a author
20
+ - NEW : [thumb id="4,5,12,..."] shortcode. You can now insert
21
+ thumbnails for one or more images (that are not necessarly inside the same gallery).
22
+ - Changed : Add swfupload 2.2.0. Support for Adobe Flash 10 upload
23
+ - Changed : Update all Admin pages for Wordpress 2.7 Admin UI
24
+ - Changed : New icon for TinyMCE and WP2.7 Menue from http://www.pinvoke.com/
25
+ - Changed : Move update message to admin.php
26
+ - Changed : Widgets are now core and doesn't need to be activate, rework as Multi Widgets
27
+ - Changed : Improved the gallery management page.
28
+ - Changed : Rename the filter 'ngg_create_gallery_thumbcode' to 'ngg_get_thumbcode'.
29
+ - Changed : Convert tags to WP-Taxonomy tables, no more need for ngg_tags, ngg_pic2tags
30
+ - Changed : Arrange manage fields in a new way
31
+ - Changed : Support now SSL
32
+ - Changed : Use JQuery UI instead of interface lib
33
+ - Changed : Updated to swfobject 2.1
34
+ - Changed : Rework of database queries and new central nggdb class
35
+ - Bugfix : Changed CSS for singlepic padding to margin
36
+ - Bugfix : Check for zero in Exif Focal Length
37
+ - Bugfix : Round instead inval for square thumbnails
38
+ - Removed : Do not longer check for myGallery folders
39
+ - Removed : Use now PclZip from WP Core
40
+ - Removed : Wordpress 2.1 - 2.3 files deleted
41
 
42
  V0.99 - 27.09.2008
43
  - Changed : Included swfobject version 2.1
53
  - Changed : Minor updates for WP2.6
54
  - Changed : Added new filters (THX to Vincent Prat)
55
  - Removed : Revert singlepic wrapper, breaks validation
56
+
57
  V0.96 - 18.05.2008
58
  - Changed : Use postbox for gallery settings
59
  - Added : New filter function to add custom columns
60
  - Bugfix : Fixed width for Thickbox in Manage gallery
61
+ - Bugfix : fixed width for media upload select box
62
  - Bugfix : Remove <p> tag in singlepic regex
63
  - Bugfix : Correct format of shutter speed
64
  - Bugfix : Album name in Short code not useable
css/Black_Minimalism.css CHANGED
@@ -2,7 +2,7 @@
2
  CSS Name: Black Minimalism Theme
3
  Description: For Black Minimalism Theme
4
  Author: Alex Rabe
5
- Version: 1.32
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
@@ -160,15 +160,23 @@ it's only a template design
160
  margin:0pt 6px;
161
  }
162
 
163
- .ngg-navigation a.page-numbers, a.next, a.prev,
164
- span.page-numbers, span.next, span.prev {
 
 
 
 
165
  border:1px solid #660000;
166
  margin-right:3px;
167
  padding:3px 7px;
168
  }
169
 
170
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
171
- span.page-numbers:hover, span.next:hover, span.prev:hover {
 
 
 
 
172
  background-color: #660000;
173
  color: #FFFFFF;
174
  text-decoration: none;
@@ -217,6 +225,11 @@ it's only a template design
217
  font-size:0.9em !important;
218
  }
219
 
 
 
 
 
 
220
  /* ----------- Slideshow -------------*/
221
  .slideshow {
222
  margin-left: auto;
@@ -230,25 +243,21 @@ it's only a template design
230
 
231
  /* ----------- Single picture -------------*/
232
  .ngg-singlepic {
233
- background-color:#FFFFFF;
234
- border:1px solid #A9A9A9;
235
  display:block;
236
- margin:5px;
237
  padding:4px;
238
- position:relative;
239
  }
240
 
241
  .ngg-left {
242
  float: left;
243
- padding-right:10px;
244
  }
245
 
246
  .ngg-right {
247
  float: right;
248
- padding-left:10px;
249
  }
250
 
251
- .ngg-center img {
252
  margin-left: auto !important;
253
  margin-right: auto !important;
254
  }
@@ -287,4 +296,4 @@ it's only a template design
287
 
288
  .ngg-related-gallery img:hover {
289
  border: 1px solid #000000;
290
- }
2
  CSS Name: Black Minimalism Theme
3
  Description: For Black Minimalism Theme
4
  Author: Alex Rabe
5
+ Version: 1.35
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
160
  margin:0pt 6px;
161
  }
162
 
163
+ .ngg-navigation a.page-numbers,
164
+ .ngg-navigation a.next,
165
+ .ngg-navigation a.prev,
166
+ .ngg-navigation span.page-numbers,
167
+ .ngg-navigation span.next,
168
+ .ngg-navigation span.prev {
169
  border:1px solid #660000;
170
  margin-right:3px;
171
  padding:3px 7px;
172
  }
173
 
174
+ .ngg-navigation a.page-numbers:hover,
175
+ .ngg-navigation a.next:hover,
176
+ .ngg-navigation a.prev:hover,
177
+ .ngg-navigation span.page-numbers:hover,
178
+ .ngg-navigation span.next:hover,
179
+ .ngg-navigation span.prev:hover {
180
  background-color: #660000;
181
  color: #FFFFFF;
182
  text-decoration: none;
225
  font-size:0.9em !important;
226
  }
227
 
228
+ .exif-data {
229
+ margin-left: auto !important;
230
+ margin-right: auto !important;
231
+ }
232
+
233
  /* ----------- Slideshow -------------*/
234
  .slideshow {
235
  margin-left: auto;
243
 
244
  /* ----------- Single picture -------------*/
245
  .ngg-singlepic {
 
 
246
  display:block;
 
247
  padding:4px;
 
248
  }
249
 
250
  .ngg-left {
251
  float: left;
252
+ margin-right:10px;
253
  }
254
 
255
  .ngg-right {
256
  float: right;
257
+ margin-left:10px;
258
  }
259
 
260
+ .ngg-center {
261
  margin-left: auto !important;
262
  margin-right: auto !important;
263
  }
296
 
297
  .ngg-related-gallery img:hover {
298
  border: 1px solid #000000;
299
+ }
css/hovereffect.css CHANGED
@@ -2,7 +2,7 @@
2
  CSS Name: Hovereffect Styles
3
  Description: Hover Stylesheet based on the idea of Hoverbox from http://host.sonspring.com/hoverbox/
4
  Author: Alex Rabe - Orginal by Nathan Smith
5
- Version: 0.60
6
 
7
  This is a template stylesheet which doesn't support description below the thumbnails. It's a experimental version.
8
 
@@ -184,15 +184,23 @@ This is a template stylesheet which doesn't support description below the thumbn
184
  margin:0pt 6px;
185
  }
186
 
187
- .ngg-navigation a.page-numbers, a.next, a.prev,
188
- span.page-numbers, span.next, span.prev {
 
 
 
 
189
  border:1px solid #DDDDDD;
190
  margin-right:3px;
191
  padding:3px 7px;
192
  }
193
 
194
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
195
- span.page-numbers:hover, span.next:hover, span.prev:hover {
 
 
 
 
196
  background-color: #0066CC;
197
  color: #FFFFFF !important;
198
  text-decoration: none !important;
@@ -266,6 +274,11 @@ This is a template stylesheet which doesn't support description below the thumbn
266
  font-size:0.9em !important;
267
  }
268
 
 
 
 
 
 
269
  /* ----------- Slideshow -------------*/
270
  .slideshow {
271
  margin-left: auto;
@@ -280,21 +293,18 @@ This is a template stylesheet which doesn't support description below the thumbn
280
  /* ----------- Single picture -------------*/
281
  .ngg-singlepic {
282
  background-color:#FFFFFF;
283
- border:1px solid #A9A9A9;
284
  display:block;
285
- margin:4px 0px 4px 5px;
286
  padding:4px;
287
- position:relative;
288
  }
289
 
290
  .ngg-left {
291
  float: left;
292
- padding-right:10px;
293
  }
294
 
295
  .ngg-right {
296
  float: right;
297
- padding-left:10px;
298
  }
299
 
300
  .ngg-center {
@@ -336,4 +346,4 @@ This is a template stylesheet which doesn't support description below the thumbn
336
 
337
  .ngg-related-gallery img:hover {
338
  border: 1px solid #000000;
339
- }
2
  CSS Name: Hovereffect Styles
3
  Description: Hover Stylesheet based on the idea of Hoverbox from http://host.sonspring.com/hoverbox/
4
  Author: Alex Rabe - Orginal by Nathan Smith
5
+ Version: 0.61
6
 
7
  This is a template stylesheet which doesn't support description below the thumbnails. It's a experimental version.
8
 
184
  margin:0pt 6px;
185
  }
186
 
187
+ .ngg-navigation a.page-numbers,
188
+ .ngg-navigation a.next,
189
+ .ngg-navigation a.prev,
190
+ .ngg-navigation span.page-numbers,
191
+ .ngg-navigation span.next,
192
+ .ngg-navigation span.prev {
193
  border:1px solid #DDDDDD;
194
  margin-right:3px;
195
  padding:3px 7px;
196
  }
197
 
198
+ .ngg-navigation a.page-numbers:hover,
199
+ .ngg-navigation a.next:hover,
200
+ .ngg-navigation a.prev:hover,
201
+ .ngg-navigation span.page-numbers:hover,
202
+ .ngg-navigation span.next:hover,
203
+ .ngg-navigation span.prev:hover {
204
  background-color: #0066CC;
205
  color: #FFFFFF !important;
206
  text-decoration: none !important;
274
  font-size:0.9em !important;
275
  }
276
 
277
+ .exif-data {
278
+ margin-left: auto !important;
279
+ margin-right: auto !important;
280
+ }
281
+
282
  /* ----------- Slideshow -------------*/
283
  .slideshow {
284
  margin-left: auto;
293
  /* ----------- Single picture -------------*/
294
  .ngg-singlepic {
295
  background-color:#FFFFFF;
 
296
  display:block;
 
297
  padding:4px;
 
298
  }
299
 
300
  .ngg-left {
301
  float: left;
302
+ margin-right:10px;
303
  }
304
 
305
  .ngg-right {
306
  float: right;
307
+ margin-left:10px;
308
  }
309
 
310
  .ngg-center {
346
 
347
  .ngg-related-gallery img:hover {
348
  border: 1px solid #000000;
349
+ }
css/ngg_dkret3.css CHANGED
@@ -1,284 +1,294 @@
1
- /*
2
- CSS Name: dkret3 Theme
3
- Description: NextGEN dkret3 style with a shadow effect
4
- Author: Jörn Kretzschmar (based on Alex Rabes Default Style)
5
- Version: 1.3
6
-
7
- This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
- styles with the theme dkret3. Modify it when your theme struggle with it,
9
- it's only a template design
10
-
11
- */
12
-
13
- /* ----------- Album Styles Extend -------------*/
14
-
15
- .ngg-albumoverview {
16
- margin-top: 10px;
17
- width: 100%;
18
- clear:both;
19
- display:block !important;
20
- }
21
-
22
- .ngg-album {
23
- height: 100%;
24
- padding: 5px;
25
- margin-bottom: 5px;
26
- border: 1px solid #cccccc;
27
- overflow:hidden;
28
- }
29
-
30
- .ngg-albumtitle {
31
- text-align: left;
32
- font-weight: bold;
33
- margin:0px;
34
- padding:0px;
35
- font-size: 1.4em;
36
- margin-bottom: 10px;
37
- }
38
-
39
- .ngg-thumbnail {
40
- float: left;
41
- margin-right: 12px;
42
- }
43
-
44
- .ngg-thumbnail img {
45
- background-color:#FFFFFF;
46
- border:1px solid #A9A9A9;
47
- margin:4px 0px 4px 5px;
48
- padding:4px;
49
- position:relative;
50
- }
51
-
52
- .ngg-thumbnail img:hover {
53
- background-color: #A9A9A9;
54
- }
55
-
56
- .ngg-description {
57
- text-align: left;
58
- }
59
-
60
- /* ----------- Album Styles Compact -------------*/
61
-
62
- .ngg-album-compact {
63
- float:left;
64
- height:180px;
65
- padding-right:6px !important;
66
- margin:0px !important;
67
- text-align:left;
68
- width:120px;
69
- }
70
-
71
- .ngg-album-compactbox {
72
- background:transparent url(albumset.gif) no-repeat scroll 0%;
73
- height:86px;
74
- margin:0pt 0pt 6px !important;
75
- padding:12px 0pt 0pt 7px !important;
76
- width:120px;
77
- }
78
-
79
-
80
- .ngg-album-compactbox .Thumb {
81
- border:1px solid #000000;
82
- margin:0px !important;
83
- padding:0px !important;
84
- width:91px;
85
- height:68px;
86
- }
87
-
88
- .ngg-album-compact h4 {
89
- font-size:15px;
90
- font-weight:bold;
91
- margin-bottom:0px;
92
- margin-top:0px;
93
- width:110px;
94
- }
95
-
96
- .ngg-album-compact p {
97
- font-size:11px;
98
- margin-top:2px;
99
- }
100
-
101
- /* ----------- Gallery style -------------*/
102
-
103
- .ngg-galleryoverview {
104
- margin-top: 10px;
105
- width: 100%;
106
- clear:both;
107
- display:block !important;
108
- }
109
-
110
- .ngg-gallery-thumbnail-box {
111
- float: left;
112
- }
113
-
114
- .ngg-gallery-thumbnail {
115
- float: left;
116
- background: url(shadowAlpha.png) no-repeat bottom right !important;
117
- background: url(shadow.gif) no-repeat bottom right;
118
- margin: 10px 0 0 10px !important;
119
- }
120
-
121
- .ngg-gallery-thumbnail img {
122
- margin: -6px 6px 6px -6px;
123
- background-color:#FFFFFF;
124
- border:1px solid #A9A9A9;
125
- display:block;
126
- padding:4px;
127
- position:relative;
128
- }
129
-
130
- .ngg-gallery-thumbnail img:hover {
131
- background-color: #A9A9A9;
132
- }
133
-
134
- .ngg-gallery-thumbnail span {
135
- display:none;
136
- }
137
-
138
- .ngg-clear {
139
- clear: both;
140
- }
141
-
142
- /* ----------- Gallery navigation -------------*/
143
-
144
- .ngg-navigation {
145
- font-size:0.9em !important;
146
- clear:both !important;
147
- display:block !important;
148
- padding-top:15px;
149
- text-align:center;
150
- }
151
-
152
- .ngg-navigation span {
153
- font-weight:bold;
154
- margin:0pt 6px;
155
- }
156
-
157
- .ngg-navigation a.page-numbers, a.next, a.prev,
158
- span.page-numbers, span.next, span.prev {
159
- border:1px solid #DDDDDD;
160
- margin-right:3px;
161
- padding:3px 7px;
162
- }
163
-
164
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
165
- span.page-numbers:hover, span.next:hover, span.prev:hover {
166
- background-color: #0066CC;
167
- color: #FFFFFF !important;
168
- text-decoration: none !important;
169
- }
170
-
171
- /* ----------- Image browser style -------------*/
172
-
173
- .ngg-imagebrowser {
174
-
175
- }
176
-
177
- .ngg-imagebrowser h3 {
178
- text-align:center;
179
- }
180
-
181
- .ngg-imagebrowser img {
182
- border:1px solid #A9A9A9;
183
- margin-top: 10px;
184
- margin-bottom: 10px;
185
- width: 100%;
186
- display:block !important;
187
- padding:5px;
188
- }
189
-
190
- .ngg-imagebrowser-nav {
191
- padding:5px;
192
- margin-left:10px;
193
- }
194
-
195
- .ngg-imagebrowser-nav .back {
196
- float:left;
197
- border:1px solid #DDDDDD;
198
- margin-right:3px;
199
- padding:3px 7px;
200
- }
201
-
202
- .ngg-imagebrowser-nav .next {
203
- float:right;
204
- border:1px solid #DDDDDD;
205
- margin-right:3px;
206
- padding:3px 7px;
207
- }
208
-
209
- .ngg-imagebrowser-nav .counter {
210
- text-align:center;
211
- font-size:0.9em !important;
212
- }
213
-
214
- /* ----------- Slideshow -------------*/
215
- .slideshow {
216
- margin-left: auto;
217
- margin-right: auto;
218
- text-align:center;
219
- }
220
-
221
- .slideshowlink {
222
-
223
- }
224
-
225
- /* ----------- Single picture -------------*/
226
- .ngg-singlepic {
227
- background-color:#FFFFFF;
228
- border:1px solid #A9A9A9;
229
- display:block;
230
- margin:5px;
231
- padding:4px;
232
- position:relative;
233
- }
234
-
235
- .ngg-left {
236
- float: left;
237
- }
238
-
239
- .ngg-right {
240
- float: right;
241
- }
242
-
243
- .ngg-center {
244
- margin-left: auto;
245
- margin-right: auto;
246
- }
247
-
248
- /* ----------- Sidebar widget -------------*/
249
-
250
- .ngg-widget,
251
- .ngg-widget-slideshow {
252
- overflow: hidden;
253
- margin:0pt;
254
- padding:5px 0px 0px 0pt;
255
- text-align: center;
256
- }
257
-
258
- .ngg-widget img {
259
- border:2px solid #A9A9A9;
260
- margin:0pt 2px 2px 0px;
261
- padding:1px;
262
- }
263
-
264
- /* ----------- Related images -------------*/
265
- .ngg-related-gallery {
266
- background:#F9F9F9;
267
- border:1px solid #E0E0E0;
268
- overflow:hidden;
269
- margin-bottom:1em;
270
- margin-top:1em;
271
- padding:5px;
272
- }
273
- .ngg-related-gallery img {
274
- border: 1px solid #DDDDDD;
275
- float: left;
276
- margin: 0pt 3px;
277
- padding: 2px;
278
- height: 50px;
279
- width: 50px;
280
- }
281
-
282
- .ngg-related-gallery img:hover {
283
- border: 1px solid #000000;
284
- }
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ CSS Name: dkret3 Theme
3
+ Description: NextGEN dkret3 style with a shadow effect
4
+ Author: Jörn Kretzschmar (based on Alex Rabes Default Style)
5
+ Version: 1.3
6
+
7
+ This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
+ styles with the theme dkret3. Modify it when your theme struggle with it,
9
+ it's only a template design
10
+
11
+ */
12
+
13
+ /* ----------- Album Styles Extend -------------*/
14
+
15
+ .ngg-albumoverview {
16
+ margin-top: 10px;
17
+ width: 100%;
18
+ clear:both;
19
+ display:block !important;
20
+ }
21
+
22
+ .ngg-album {
23
+ height: 100%;
24
+ padding: 5px;
25
+ margin-bottom: 5px;
26
+ border: 1px solid #cccccc;
27
+ overflow:hidden;
28
+ }
29
+
30
+ .ngg-albumtitle {
31
+ text-align: left;
32
+ font-weight: bold;
33
+ margin:0px;
34
+ padding:0px;
35
+ font-size: 1.4em;
36
+ margin-bottom: 10px;
37
+ }
38
+
39
+ .ngg-thumbnail {
40
+ float: left;
41
+ margin-right: 12px;
42
+ }
43
+
44
+ .ngg-thumbnail img {
45
+ background-color:#FFFFFF;
46
+ border:1px solid #A9A9A9;
47
+ margin:4px 0px 4px 5px;
48
+ padding:4px;
49
+ position:relative;
50
+ }
51
+
52
+ .ngg-thumbnail img:hover {
53
+ background-color: #A9A9A9;
54
+ }
55
+
56
+ .ngg-description {
57
+ text-align: left;
58
+ }
59
+
60
+ /* ----------- Album Styles Compact -------------*/
61
+
62
+ .ngg-album-compact {
63
+ float:left;
64
+ height:180px;
65
+ padding-right:6px !important;
66
+ margin:0px !important;
67
+ text-align:left;
68
+ width:120px;
69
+ }
70
+
71
+ .ngg-album-compactbox {
72
+ background:transparent url(albumset.gif) no-repeat scroll 0%;
73
+ height:86px;
74
+ margin:0pt 0pt 6px !important;
75
+ padding:12px 0pt 0pt 7px !important;
76
+ width:120px;
77
+ }
78
+
79
+
80
+ .ngg-album-compactbox .Thumb {
81
+ border:1px solid #000000;
82
+ margin:0px !important;
83
+ padding:0px !important;
84
+ width:91px;
85
+ height:68px;
86
+ }
87
+
88
+ .ngg-album-compact h4 {
89
+ font-size:15px;
90
+ font-weight:bold;
91
+ margin-bottom:0px;
92
+ margin-top:0px;
93
+ width:110px;
94
+ }
95
+
96
+ .ngg-album-compact p {
97
+ font-size:11px;
98
+ margin-top:2px;
99
+ }
100
+
101
+ /* ----------- Gallery style -------------*/
102
+
103
+ .ngg-galleryoverview {
104
+ margin-top: 10px;
105
+ width: 100%;
106
+ clear:both;
107
+ display:block !important;
108
+ }
109
+
110
+ .ngg-gallery-thumbnail-box {
111
+ float: left;
112
+ }
113
+
114
+ .ngg-gallery-thumbnail {
115
+ float: left;
116
+ background: url(shadowAlpha.png) no-repeat bottom right !important;
117
+ background: url(shadow.gif) no-repeat bottom right;
118
+ margin: 10px 0 0 10px !important;
119
+ }
120
+
121
+ .ngg-gallery-thumbnail img {
122
+ margin: -6px 6px 6px -6px;
123
+ background-color:#FFFFFF;
124
+ border:1px solid #A9A9A9;
125
+ display:block;
126
+ padding:4px;
127
+ position:relative;
128
+ }
129
+
130
+ .ngg-gallery-thumbnail img:hover {
131
+ background-color: #A9A9A9;
132
+ }
133
+
134
+ .ngg-gallery-thumbnail span {
135
+ display:none;
136
+ }
137
+
138
+ .ngg-clear {
139
+ clear: both;
140
+ }
141
+
142
+ /* ----------- Gallery navigation -------------*/
143
+
144
+ .ngg-navigation {
145
+ font-size:0.9em !important;
146
+ clear:both !important;
147
+ display:block !important;
148
+ padding-top:15px;
149
+ text-align:center;
150
+ }
151
+
152
+ .ngg-navigation span {
153
+ font-weight:bold;
154
+ margin:0pt 6px;
155
+ }
156
+
157
+ .ngg-navigation a.page-numbers,
158
+ .ngg-navigation a.next,
159
+ .ngg-navigation a.prev,
160
+ .ngg-navigation span.page-numbers,
161
+ .ngg-navigation span.next,
162
+ .ngg-navigation span.prev {
163
+ border:1px solid #DDDDDD;
164
+ margin-right:3px;
165
+ padding:3px 7px;
166
+ }
167
+
168
+ .ngg-navigation a.page-numbers:hover,
169
+ .ngg-navigation a.next:hover,
170
+ .ngg-navigation a.prev:hover,
171
+ .ngg-navigation span.page-numbers:hover,
172
+ .ngg-navigation span.next:hover,
173
+ .ngg-navigation span.prev:hover {
174
+ background-color: #0066CC;
175
+ color: #FFFFFF !important;
176
+ text-decoration: none !important;
177
+ }
178
+
179
+ /* ----------- Image browser style -------------*/
180
+
181
+ .ngg-imagebrowser {
182
+
183
+ }
184
+
185
+ .ngg-imagebrowser h3 {
186
+ text-align:center;
187
+ }
188
+
189
+ .ngg-imagebrowser img {
190
+ border:1px solid #A9A9A9;
191
+ margin-top: 10px;
192
+ margin-bottom: 10px;
193
+ width: 100%;
194
+ display:block !important;
195
+ padding:5px;
196
+ }
197
+
198
+ .ngg-imagebrowser-nav {
199
+ padding:5px;
200
+ margin-left:10px;
201
+ }
202
+
203
+ .ngg-imagebrowser-nav .back {
204
+ float:left;
205
+ border:1px solid #DDDDDD;
206
+ margin-right:3px;
207
+ padding:3px 7px;
208
+ }
209
+
210
+ .ngg-imagebrowser-nav .next {
211
+ float:right;
212
+ border:1px solid #DDDDDD;
213
+ margin-right:3px;
214
+ padding:3px 7px;
215
+ }
216
+
217
+ .ngg-imagebrowser-nav .counter {
218
+ text-align:center;
219
+ font-size:0.9em !important;
220
+ }
221
+
222
+ .exif-data {
223
+ margin-left: auto !important;
224
+ margin-right: auto !important;
225
+ }
226
+
227
+ /* ----------- Slideshow -------------*/
228
+ .slideshow {
229
+ margin-left: auto;
230
+ margin-right: auto;
231
+ text-align:center;
232
+ }
233
+
234
+ .slideshowlink {
235
+
236
+ }
237
+
238
+ /* ----------- Single picture -------------*/
239
+ .ngg-singlepic {
240
+ background-color:#FFFFFF;
241
+ display:block;
242
+ padding:4px;
243
+ }
244
+
245
+ .ngg-left {
246
+ float: left;
247
+ }
248
+
249
+ .ngg-right {
250
+ float: right;
251
+ }
252
+
253
+ .ngg-center {
254
+ margin-left: auto;
255
+ margin-right: auto;
256
+ }
257
+
258
+ /* ----------- Sidebar widget -------------*/
259
+
260
+ .ngg-widget,
261
+ .ngg-widget-slideshow {
262
+ overflow: hidden;
263
+ margin:0pt;
264
+ padding:5px 0px 0px 0pt;
265
+ text-align: center;
266
+ }
267
+
268
+ .ngg-widget img {
269
+ border:2px solid #A9A9A9;
270
+ margin:0pt 2px 2px 0px;
271
+ padding:1px;
272
+ }
273
+
274
+ /* ----------- Related images -------------*/
275
+ .ngg-related-gallery {
276
+ background:#F9F9F9;
277
+ border:1px solid #E0E0E0;
278
+ overflow:hidden;
279
+ margin-bottom:1em;
280
+ margin-top:1em;
281
+ padding:5px;
282
+ }
283
+ .ngg-related-gallery img {
284
+ border: 1px solid #DDDDDD;
285
+ float: left;
286
+ margin: 0pt 3px;
287
+ padding: 2px;
288
+ height: 50px;
289
+ width: 50px;
290
+ }
291
+
292
+ .ngg-related-gallery img:hover {
293
+ border: 1px solid #000000;
294
+ }
css/ngg_k2.css CHANGED
@@ -2,7 +2,7 @@
2
  CSS Name: K2 Theme
3
  Description: NextGEN Style for K2 Theme
4
  Author: Alex Rabe
5
- Version: 1.32
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
@@ -165,15 +165,23 @@ it's only a template design
165
  margin:0pt 6px;
166
  }
167
 
168
- .ngg-navigation a.page-numbers, a.next, a.prev,
169
- span.page-numbers, span.next, span.prev {
 
 
 
 
170
  border:1px solid #DDDDDD;
171
  margin-right:3px;
172
  padding:3px 7px;
173
  }
174
 
175
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
176
- span.page-numbers:hover, span.next:hover, span.prev:hover {
 
 
 
 
177
  background-color: #0066CC;
178
  color: #FFFFFF;
179
  text-decoration: none;
@@ -222,6 +230,11 @@ it's only a template design
222
  font-size:0.9em !important;
223
  }
224
 
 
 
 
 
 
225
  /* ----------- Slideshow -------------*/
226
  .slideshow {
227
  margin-left: auto;
@@ -236,21 +249,18 @@ it's only a template design
236
  /* ----------- Single picture -------------*/
237
  .ngg-singlepic {
238
  background-color:#FFFFFF;
239
- border:1px solid #A9A9A9;
240
  display:block;
241
- margin:5px;
242
  padding:4px;
243
- position:relative;
244
  }
245
 
246
  .ngg-left {
247
  float: left;
248
- padding-right:10px;
249
  }
250
 
251
  .ngg-right {
252
  float: right;
253
- padding-left:10px;
254
  }
255
 
256
  .ngg-center {
2
  CSS Name: K2 Theme
3
  Description: NextGEN Style for K2 Theme
4
  Author: Alex Rabe
5
+ Version: 1.33
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
165
  margin:0pt 6px;
166
  }
167
 
168
+ .ngg-navigation a.page-numbers,
169
+ .ngg-navigation a.next,
170
+ .ngg-navigation a.prev,
171
+ .ngg-navigation span.page-numbers,
172
+ .ngg-navigation span.next,
173
+ .ngg-navigation span.prev {
174
  border:1px solid #DDDDDD;
175
  margin-right:3px;
176
  padding:3px 7px;
177
  }
178
 
179
+ .ngg-navigation a.page-numbers:hover,
180
+ .ngg-navigation a.next:hover,
181
+ .ngg-navigation a.prev:hover,
182
+ .ngg-navigation span.page-numbers:hover,
183
+ .ngg-navigation span.next:hover,
184
+ .ngg-navigation span.prev:hover {
185
  background-color: #0066CC;
186
  color: #FFFFFF;
187
  text-decoration: none;
230
  font-size:0.9em !important;
231
  }
232
 
233
+ .exif-data {
234
+ margin-left: auto !important;
235
+ margin-right: auto !important;
236
+ }
237
+
238
  /* ----------- Slideshow -------------*/
239
  .slideshow {
240
  margin-left: auto;
249
  /* ----------- Single picture -------------*/
250
  .ngg-singlepic {
251
  background-color:#FFFFFF;
 
252
  display:block;
 
253
  padding:4px;
 
254
  }
255
 
256
  .ngg-left {
257
  float: left;
258
+ margin-right:10px;
259
  }
260
 
261
  .ngg-right {
262
  float: right;
263
+ margin-left:10px;
264
  }
265
 
266
  .ngg-center {
css/ngg_shadow.css CHANGED
@@ -2,7 +2,7 @@
2
  CSS Name: Shadow Effect
3
  Description: NextGEN Default Style with a Shadow effect
4
  Author: Alex Rabe
5
- Version: 1.32
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
@@ -154,15 +154,23 @@ it's only a template design
154
  margin:0pt 6px;
155
  }
156
 
157
- .ngg-navigation a.page-numbers, a.next, a.prev,
158
- span.page-numbers, span.next, span.prev {
 
 
 
 
159
  border:1px solid #DDDDDD;
160
  margin-right:3px;
161
  padding:3px 7px;
162
  }
163
 
164
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
165
- span.page-numbers:hover, span.next:hover, span.prev:hover {
 
 
 
 
166
  background-color: #0066CC;
167
  color: #FFFFFF !important;
168
  text-decoration: none !important;
@@ -211,6 +219,11 @@ it's only a template design
211
  font-size:0.9em !important;
212
  }
213
 
 
 
 
 
 
214
  /* ----------- Slideshow -------------*/
215
  .slideshow {
216
  margin-left: auto;
@@ -225,21 +238,18 @@ it's only a template design
225
  /* ----------- Single picture -------------*/
226
  .ngg-singlepic {
227
  background-color:#FFFFFF;
228
- border:1px solid #A9A9A9;
229
  display:block;
230
- margin:5px;
231
  padding:4px;
232
- position:relative;
233
  }
234
 
235
  .ngg-left {
236
  float: left;
237
- padding-right:10px;
238
  }
239
 
240
  .ngg-right {
241
  float: right;
242
- padding-left:10px;
243
  }
244
 
245
  .ngg-center {
2
  CSS Name: Shadow Effect
3
  Description: NextGEN Default Style with a Shadow effect
4
  Author: Alex Rabe
5
+ Version: 1.40
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
154
  margin:0pt 6px;
155
  }
156
 
157
+ .ngg-navigation a.page-numbers,
158
+ .ngg-navigation a.next,
159
+ .ngg-navigation a.prev,
160
+ .ngg-navigation span.page-numbers,
161
+ .ngg-navigation span.next,
162
+ .ngg-navigation span.prev {
163
  border:1px solid #DDDDDD;
164
  margin-right:3px;
165
  padding:3px 7px;
166
  }
167
 
168
+ .ngg-navigation a.page-numbers:hover,
169
+ .ngg-navigation a.next:hover,
170
+ .ngg-navigation a.prev:hover,
171
+ .ngg-navigation span.page-numbers:hover,
172
+ .ngg-navigation span.next:hover,
173
+ .ngg-navigation span.prev:hover {
174
  background-color: #0066CC;
175
  color: #FFFFFF !important;
176
  text-decoration: none !important;
219
  font-size:0.9em !important;
220
  }
221
 
222
+ .exif-data {
223
+ margin-left: auto !important;
224
+ margin-right: auto !important;
225
+ }
226
+
227
  /* ----------- Slideshow -------------*/
228
  .slideshow {
229
  margin-left: auto;
238
  /* ----------- Single picture -------------*/
239
  .ngg-singlepic {
240
  background-color:#FFFFFF;
 
241
  display:block;
 
242
  padding:4px;
 
243
  }
244
 
245
  .ngg-left {
246
  float: left;
247
+ margin-right:10px;
248
  }
249
 
250
  .ngg-right {
251
  float: right;
252
+ margin-left:10px;
253
  }
254
 
255
  .ngg-center {
css/ngg_shadow2.css CHANGED
@@ -2,7 +2,7 @@
2
  CSS Name: Shadow Effect with Description text
3
  Description: NextGEN Default Style with a Shadow effect and description text below the thumbnail
4
  Author: Alex Rabe
5
- Version: 1.42
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
@@ -162,15 +162,23 @@ it's only a template design
162
  margin:0pt 6px;
163
  }
164
 
165
- .ngg-navigation a.page-numbers, a.next, a.prev,
166
- span.page-numbers, span.next, span.prev {
 
 
 
 
167
  border:1px solid #DDDDDD;
168
  margin-right:3px;
169
  padding:3px 7px;
170
  }
171
 
172
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
173
- span.page-numbers:hover, span.next:hover, span.prev:hover {
 
 
 
 
174
  background-color: #0066CC;
175
  color: #FFFFFF !important;
176
  text-decoration: none !important;
@@ -219,6 +227,11 @@ it's only a template design
219
  font-size:0.9em !important;
220
  }
221
 
 
 
 
 
 
222
  /* ----------- Slideshow -------------*/
223
  .slideshow {
224
  margin-left: auto;
@@ -233,21 +246,18 @@ it's only a template design
233
  /* ----------- Single picture -------------*/
234
  .ngg-singlepic {
235
  background-color:#FFFFFF;
236
- border:1px solid #A9A9A9;
237
  display:block;
238
- margin:5px;
239
  padding:4px;
240
- position:relative;
241
  }
242
 
243
  .ngg-left {
244
  float: left;
245
- padding-right:10px;
246
  }
247
 
248
  .ngg-right {
249
  float: right;
250
- padding-left:10px;
251
  }
252
 
253
  .ngg-center {
2
  CSS Name: Shadow Effect with Description text
3
  Description: NextGEN Default Style with a Shadow effect and description text below the thumbnail
4
  Author: Alex Rabe
5
+ Version: 1.44
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
162
  margin:0pt 6px;
163
  }
164
 
165
+ .ngg-navigation a.page-numbers,
166
+ .ngg-navigation a.next,
167
+ .ngg-navigation a.prev,
168
+ .ngg-navigation span.page-numbers,
169
+ .ngg-navigation span.next,
170
+ .ngg-navigation span.prev {
171
  border:1px solid #DDDDDD;
172
  margin-right:3px;
173
  padding:3px 7px;
174
  }
175
 
176
+ .ngg-navigation a.page-numbers:hover,
177
+ .ngg-navigation a.next:hover,
178
+ .ngg-navigation a.prev:hover,
179
+ .ngg-navigation span.page-numbers:hover,
180
+ .ngg-navigation span.next:hover,
181
+ .ngg-navigation span.prev:hover {
182
  background-color: #0066CC;
183
  color: #FFFFFF !important;
184
  text-decoration: none !important;
227
  font-size:0.9em !important;
228
  }
229
 
230
+ .exif-data {
231
+ margin-left: auto !important;
232
+ margin-right: auto !important;
233
+ }
234
+
235
  /* ----------- Slideshow -------------*/
236
  .slideshow {
237
  margin-left: auto;
246
  /* ----------- Single picture -------------*/
247
  .ngg-singlepic {
248
  background-color:#FFFFFF;
 
249
  display:block;
 
250
  padding:4px;
 
251
  }
252
 
253
  .ngg-left {
254
  float: left;
255
+ margin-right:10px;
256
  }
257
 
258
  .ngg-right {
259
  float: right;
260
+ margin-left:10px;
261
  }
262
 
263
  .ngg-center {
css/nggallery.css CHANGED
@@ -2,7 +2,7 @@
2
  CSS Name: Default Styles
3
  Description: NextGEN Default Gallery Stylesheet
4
  Author: Alex Rabe
5
- Version: 1.43
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
@@ -178,15 +178,23 @@ html>body .ngg-album {
178
  margin:0pt 6px;
179
  }
180
 
181
- .ngg-navigation a.page-numbers, a.next, a.prev,
182
- span.page-numbers, span.next, span.prev {
 
 
 
 
183
  border:1px solid #DDDDDD;
184
  margin-right:3px;
185
  padding:3px 7px;
186
  }
187
 
188
- .ngg-navigation a.page-numbers:hover, a.next:hover, a.prev:hover,
189
- span.page-numbers:hover, span.next:hover, span.prev:hover {
 
 
 
 
190
  background-color: #0066CC;
191
  color: #FFFFFF !important;
192
  text-decoration: none !important;
@@ -235,6 +243,11 @@ html>body .ngg-album {
235
  font-size:0.9em !important;
236
  }
237
 
 
 
 
 
 
238
  /* ----------- Slideshow -------------*/
239
  .slideshow {
240
  margin-left: auto;
@@ -249,21 +262,18 @@ html>body .ngg-album {
249
  /* ----------- Single picture -------------*/
250
  .ngg-singlepic {
251
  background-color:#FFFFFF;
252
- border:1px solid #A9A9A9;
253
  display:block;
254
- margin:4px 0px 4px 5px;
255
  padding:4px;
256
- position:relative;
257
  }
258
 
259
  .ngg-left {
260
  float: left;
261
- padding-right:10px;
262
  }
263
 
264
  .ngg-right {
265
  float: right;
266
- padding-left:10px;
267
  }
268
 
269
  .ngg-center {
@@ -305,4 +315,4 @@ html>body .ngg-album {
305
 
306
  .ngg-related-gallery img:hover {
307
  border: 1px solid #000000;
308
- }
2
  CSS Name: Default Styles
3
  Description: NextGEN Default Gallery Stylesheet
4
  Author: Alex Rabe
5
+ Version: 1.50
6
 
7
  This is a template stylesheet that can be used with NextGEN Gallery. I tested the
8
  styles with a default theme Kubrick. Modify it when your theme struggle with it,
178
  margin:0pt 6px;
179
  }
180
 
181
+ .ngg-navigation a.page-numbers,
182
+ .ngg-navigation a.next,
183
+ .ngg-navigation a.prev,
184
+ .ngg-navigation span.page-numbers,
185
+ .ngg-navigation span.next,
186
+ .ngg-navigation span.prev {
187
  border:1px solid #DDDDDD;
188
  margin-right:3px;
189
  padding:3px 7px;
190
  }
191
 
192
+ .ngg-navigation a.page-numbers:hover,
193
+ .ngg-navigation a.next:hover,
194
+ .ngg-navigation a.prev:hover,
195
+ .ngg-navigation span.page-numbers:hover,
196
+ .ngg-navigation span.next:hover,
197
+ .ngg-navigation span.prev:hover {
198
  background-color: #0066CC;
199
  color: #FFFFFF !important;
200
  text-decoration: none !important;
243
  font-size:0.9em !important;
244
  }
245
 
246
+ .exif-data {
247
+ margin-left: auto !important;
248
+ margin-right: auto !important;
249
+ }
250
+
251
  /* ----------- Slideshow -------------*/
252
  .slideshow {
253
  margin-left: auto;
262
  /* ----------- Single picture -------------*/
263
  .ngg-singlepic {
264
  background-color:#FFFFFF;
 
265
  display:block;
 
266
  padding:4px;
 
267
  }
268
 
269
  .ngg-left {
270
  float: left;
271
+ margin-right:10px;
272
  }
273
 
274
  .ngg-right {
275
  float: right;
276
+ margin-left:10px;
277
  }
278
 
279
  .ngg-center {
315
 
316
  .ngg-related-gallery img:hover {
317
  border: 1px solid #000000;
318
+ }
images/mrss-icon.gif ADDED
Binary file
images/piclens.gif ADDED
Binary file
lang/nggallery-de_DE.mo CHANGED
Binary file
lang/nggallery-de_DE.po CHANGED
@@ -2,231 +2,139 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-05-18 12:15+0100\n"
6
- "PO-Revision-Date: 2008-05-18 12:15+0100\n"
7
- "Last-Translator: Alex Rabe\n"
8
  "Language-Team: Alex Rabe\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-Country: GERMANY\n"
15
  "X-Poedit-SourceCharset: utf-8\n"
 
 
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPath-1: ..\n"
18
 
19
- #: ../nggallery.php:61
20
- msgid "Sorry, NextGEN Gallery works only under WordPress 2.1 or higher"
21
- msgstr "Tut mir leid aber NextGEN Galerie arbeitet nur ab WordPress 2.1 und aufwärts"
22
-
23
- #: ../nggallery.php:68
24
  msgid "Sorry, NextGEN Gallery works only with a Memory Limit of 16 MB higher"
25
- msgstr "Tut mir leid aber NextGEN Galerie arbeitet mit einem Memory Limit von 16 MB un mehr"
26
-
27
- #: ../nggfunctions.php:449
28
- #: ../nggfunctions.php:464
29
- msgid "Watch gallery"
30
- msgstr "Galerie ansehen"
31
-
32
- #: ../nggfunctions.php:458
33
- #: ../nggfunctions.php:470
34
- #: ../nggfunctions.php:758
35
- msgid "Photos"
36
- msgstr "Fotos"
37
-
38
- #: ../nggfunctions.php:546
39
- msgid "Back"
40
- msgstr "Zurück"
41
-
42
- #: ../nggfunctions.php:550
43
- msgid "Next"
44
- msgstr "Vor"
45
-
46
- #: ../nggfunctions.php:553
47
- #: ../admin/manage.php:85
48
- msgid "Picture"
49
- msgstr "Bild"
50
-
51
- #: ../nggfunctions.php:553
52
- msgid "from"
53
- msgstr "von"
54
-
55
- #: ../nggfunctions.php:728
56
- msgid "Overview"
57
- msgstr "Übersicht"
58
-
59
- #: ../ngginstall.php:16
60
- msgid "Sorry, NextGEN Gallery works only with a role called administrator"
61
- msgstr "Tut mir leid, aber NextGEN Galerie benötigt die Rolle \"Administrator\""
62
-
63
- #: ../ngginstall.php:124
64
- msgid "NextGEN Gallery : Tables could not created, please check your database settings"
65
- msgstr "NextGEN Gallery : Tabellen konnten nicht erstellt werden, überprüfe deine Datenbank"
66
-
67
- #: ../ngginstall.php:196
68
- msgid "[Show as slideshow]"
69
- msgstr "[Zeige als Diashow]"
70
-
71
- #: ../ngginstall.php:197
72
- msgid "[Show picture list]"
73
- msgstr "[Zeige Bilder-Liste]"
74
-
75
- #: ../nggwidget.php:121
76
- msgid "Title:"
77
- msgstr "Titel:"
78
-
79
- #: ../nggwidget.php:122
80
- msgid "Select Gallery:"
81
- msgstr "Wähle Galerie"
82
-
83
- #: ../nggwidget.php:126
84
- msgid "All images"
85
- msgstr "Alle Bilder"
86
-
87
- #: ../nggwidget.php:136
88
- msgid "Height:"
89
- msgstr "Höhe:"
90
-
91
- #: ../nggwidget.php:137
92
- msgid "Width:"
93
- msgstr "Breite:"
94
-
95
- #: ../nggwidget.php:191
96
- #, php-format
97
- msgid "NextGEN Gallery %d"
98
- msgstr "NextGEN Gallery %d"
99
-
100
- #: ../nggwidget.php:207
101
- msgid "NextGEN Gallery Widgets"
102
- msgstr "NextGEN Gallery Widgets"
103
 
104
- #: ../nggwidget.php:208
105
- msgid "How many NextGEN Gallery widgets would you like?"
106
- msgstr "Wie viele NextGEN Gallery Widgets möchtest du haben ?"
107
 
108
- #: ../nggwidget.php:212
109
- msgid "Save"
110
- msgstr "Speichern"
111
 
112
- #: ../nggwidget.php:304
113
- msgid "Title :"
114
- msgstr "Titel :"
115
-
116
- #: ../nggwidget.php:309
117
- msgid "Show :"
118
- msgstr "Zeige als :"
119
-
120
- #: ../nggwidget.php:314
121
- #: ../admin/settings.php:102
122
- #: ../admin/settings.php:295
123
- msgid "Thumbnails"
124
- msgstr "Thumbnails"
125
-
126
- #: ../nggwidget.php:315
127
- msgid "Orginal images"
128
- msgstr "Orginal Bilder"
129
 
130
- #: ../nggwidget.php:321
131
- #: ../admin/settings.php:560
132
- msgid "random"
133
- msgstr "Zufall"
134
-
135
- #: ../nggwidget.php:322
136
- msgid "recent added "
137
- msgstr "zuletzt hinzugefügt"
138
 
139
- #: ../nggwidget.php:326
140
- msgid "Width x Height :"
141
- msgstr "Breite x Höhe :"
142
 
143
- #: ../nggwidget.php:332
144
- msgid "Select :"
145
- msgstr "Wähle :"
146
 
147
- #: ../nggwidget.php:334
148
- msgid "All galleries"
149
- msgstr "Alle Galerien"
 
150
 
151
- #: ../nggwidget.php:335
152
- msgid "Only which are not listed"
153
- msgstr "Nur ungelistete"
154
 
155
- #: ../nggwidget.php:336
156
- msgid "Only which are listed"
157
- msgstr "Nur gelistete"
158
 
159
- #: ../nggwidget.php:341
160
- msgid "Gallery ID :"
161
- msgstr "Galerie ID :"
162
 
163
- #: ../nggwidget.php:343
164
- msgid "Gallery IDs, separated by commas."
165
- msgstr "Galerie ID's, mit Kommas getrennt"
 
166
 
167
  #: ../admin/about.php:9
168
  msgid "Copyright notes / Credits"
169
  msgstr "Copyright Hinweise / Credits"
170
 
171
- #: ../admin/about.php:11
172
  msgid "NextGEN DEV Team"
173
  msgstr "NextGEN DEV Team"
174
 
175
- #: ../admin/about.php:12
176
  msgid "This plugin is primarily developed, maintained, supported, documented by"
177
  msgstr "Dieses Plugin wird hauptsächlich entwickelt, dokumentiert und supportet von"
178
 
179
- #: ../admin/about.php:12
180
  msgid "There are many other folks who have made contributions to this project :"
181
  msgstr "Folgende Personen haben die Entwicklung bisher unterstützt :"
182
 
183
- #: ../admin/about.php:14
184
  msgid "Contributors / Tribute to"
185
  msgstr "Anerkennung / Hinweise"
186
 
187
- #: ../admin/about.php:15
188
  msgid "If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together."
189
  msgstr "Falls Du Dir den Sourcecode dieses Plugins ansiehst wirst Du merken, das wir verschiedene gute Scripte sowie Ideen verwendet haben."
190
 
191
- #: ../admin/about.php:16
192
  msgid "So, we would like to thank the following people for their pioneer work (without this work it's impossible to create such a plugin so fast)"
193
  msgstr "Wir möchten folgenden Menschen für Ihre Pionier-Arbeit danken (ohne diese Vorleistung wäre es unmöglich ein Plugin so schnell zu entwickeln)"
194
 
195
- #: ../admin/about.php:18
196
  msgid "for their great documented code"
197
  msgstr "für Ihren großartig dokumentierten Code"
198
 
199
- #: ../admin/about.php:19
200
  msgid "for jQuery, which is the best Web2.0 framework"
201
- msgstr "für jQuery, das Beste Web2.0 Framework"
202
 
203
- #: ../admin/about.php:20
204
  msgid "for the fantastic PHP Thumbnail Class"
205
  msgstr "für die fantastische PHP Thumbnail Klasse"
206
 
207
- #: ../admin/about.php:21
208
  msgid "for PclZip , a PHP library that manage ZIP archives"
209
  msgstr "für PclZip, eine ZIP PHP Library"
210
 
211
- #: ../admin/about.php:22
212
  msgid "for a lot of very useful plugins and ideas"
213
  msgstr "für viele nützliche Plugins und Ideen"
214
 
215
- #: ../admin/about.php:23
216
- msgid "for Simple:Press Forum, it saved me a lot of time"
217
- msgstr "für das Simple:Press Forum, welches mir viel Zeit sparte"
218
 
219
- #: ../admin/about.php:24
220
  msgid "for the best Media Flash Scripts on earth"
221
  msgstr "für die besten Media Flash Scripte"
222
 
 
 
 
 
223
  #: ../admin/about.php:25
224
  msgid "for the Watermark plugin"
225
  msgstr "für das Wasserzeichen Plugin"
226
 
227
  #: ../admin/about.php:27
228
  msgid "If you didn't find your name on this list and there is some code which I integrate in my plugin, don't hesitate to send me a mail."
229
- msgstr "Falls Du Deinen Namen hier nicht auf dieser Liste findest und es einigen Code gibt, den ich in meinem Plugin verwendet habe, so schicken mir bitte sofort einfach eine EMail."
230
 
231
  #: ../admin/about.php:28
232
  msgid "How to support ?"
@@ -249,16 +157,16 @@ msgid "Translate the plugin"
249
  msgstr "Übersetze das Plugin"
250
 
251
  #: ../admin/about.php:32
252
- msgid "To help people to work with this plugin, I would like to have it in all avaivable languages"
253
- msgstr "Um jedem das Arbeiten mit diesem Plugin zu vereinfachen würde ich es gerne in allen verfügbaren Sprachen anbieten"
254
 
255
  #: ../admin/about.php:33
256
  msgid "Donate the work via paypal"
257
  msgstr "Zeig Dich für diese Arbeit per PayPal dankbar"
258
 
259
  #: ../admin/about.php:44
260
- msgid "No doubt a very usefull and easy motivation :-)"
261
- msgstr "Kein Zweifel, eine schöne und simple Motivationshilfe"
262
 
263
  #: ../admin/about.php:46
264
  msgid "Place a link to the plugin in your blog/webpage"
@@ -274,250 +182,361 @@ msgstr "Vielen Dank!"
274
 
275
  #: ../admin/about.php:49
276
  msgid "We would like to thank this people which support us in the work :"
277
- msgstr "Wir wollen diesen Menschen für Ihre Hilfe danken:"
278
 
279
- #: ../admin/addgallery.php:35
280
- #: ../admin/addgallery.php:51
281
  msgid "Upload failed!"
282
  msgstr "Upload fehlgeschlagen!"
283
 
284
- #: ../admin/addgallery.php:56
285
- #: ../admin/functions.php:563
286
- #: ../admin/functions.php:652
287
  msgid "No gallery selected !"
288
  msgstr "Keine Galerie ausgewählt !"
289
 
290
- #: ../admin/addgallery.php:111
291
  msgid "Image Files"
292
  msgstr "Bilder"
293
 
294
- #: ../admin/addgallery.php:131
295
- #: ../admin/addgallery.php:161
296
  msgid "remove"
297
  msgstr "Entfernen"
298
 
299
- #: ../admin/addgallery.php:132
300
  msgid "Browse..."
301
  msgstr "Durchsuche..."
302
 
303
- #: ../admin/addgallery.php:133
304
- #: ../admin/addgallery.php:311
305
  msgid "Upload images"
306
  msgstr "Bilder hochladen"
307
 
308
- #: ../admin/addgallery.php:177
309
- #: ../admin/addgallery.php:189
310
  msgid "Add new gallery"
311
  msgstr "Neue Galerie erstellen"
312
 
313
- #: ../admin/addgallery.php:179
314
- #: ../admin/addgallery.php:210
315
  msgid "Upload a Zip-File"
316
  msgstr "Zip-Datei hochladen"
317
 
318
- #: ../admin/addgallery.php:182
319
- #: ../admin/addgallery.php:250
320
  msgid "Import image folder"
321
  msgstr "Bilder-Verzeichnis importieren"
322
 
323
- #: ../admin/addgallery.php:184
324
- #: ../admin/addgallery.php:274
325
  msgid "Upload Images"
326
  msgstr "Bilder hochladen"
327
 
328
- #: ../admin/addgallery.php:195
329
  msgid "New Gallery"
330
  msgstr "Neue Galerie"
331
 
332
- #: ../admin/addgallery.php:198
333
  msgid "Create a new , empty gallery below the folder"
334
  msgstr "Erstelle eine neue, leere Galerie unter dem Verzeichnis"
335
 
336
- #: ../admin/addgallery.php:200
337
  msgid "Allowed characters for file and folder names are"
338
  msgstr "Erlaubte Charaktere für die Datei- und Verzeichnisnamen sind"
339
 
340
- #: ../admin/addgallery.php:203
341
  msgid "Add gallery"
342
  msgstr "Galerie hinzufügen"
343
 
344
- #: ../admin/addgallery.php:216
345
  msgid "Select Zip-File"
346
  msgstr "Wähle Zip-Datei"
347
 
348
- #: ../admin/addgallery.php:218
349
  msgid "Upload a zip file with images"
350
  msgstr "Lade eine Zip-Datei mit Bildern hoch"
351
 
352
- #: ../admin/addgallery.php:221
353
- #: ../admin/addgallery.php:284
354
  msgid "in to"
355
  msgstr "in"
356
 
357
- #: ../admin/addgallery.php:223
358
  msgid "a new gallery"
359
  msgstr "eine neue Galerie"
360
 
361
- #: ../admin/addgallery.php:233
362
- #: ../admin/addgallery.php:296
363
  msgid "Note : The upload limit on your server is "
364
  msgstr "Hinweis : Das Upload-Limit auf dem Server beträgt "
365
 
366
- #: ../admin/addgallery.php:237
367
- #: ../admin/addgallery.php:262
368
- #: ../admin/addgallery.php:300
369
- msgid "Add Metadata :"
370
- msgstr "Metadaten hinzufügen :"
371
-
372
- #: ../admin/addgallery.php:239
373
- #: ../admin/addgallery.php:264
374
- #: ../admin/addgallery.php:302
375
- msgid "Import EXIF, IPTC or XMP data (if available)"
376
- msgstr "EXIF, IPTC oder XMP Daten importieren (wenn verfügbar)"
377
-
378
- #: ../admin/addgallery.php:242
379
  msgid "Start upload"
380
  msgstr "Upload starten"
381
 
382
- #: ../admin/addgallery.php:256
383
  msgid "Import from Server path:"
384
  msgstr "Importieren aus Server-Pfad:"
385
 
386
- #: ../admin/addgallery.php:258
387
- msgid "Import a folder with images. Please note :"
388
- msgstr "Importiere ein Verzeichniss mit Bildern. Bitte beachte:"
389
 
390
- #: ../admin/addgallery.php:259
391
- msgid "For safe-mode = ON you need to add the subfolder thumbs manually"
392
- msgstr "Da der Safe-Mode (PHP.INI) eingeschaltet ist, mußt Du das Unterverzeichnis für die Vorschaubilder (\"thumbs\") manuell (per FTP) anlegen"
393
 
394
- #: ../admin/addgallery.php:267
395
  msgid "Import folder"
396
  msgstr "Verzeichnis importieren"
397
 
398
- #: ../admin/addgallery.php:280
399
  msgid "Upload image"
400
  msgstr "Bild hochladen"
401
 
402
- #: ../admin/addgallery.php:286
403
  msgid "Choose gallery"
404
  msgstr "Wähle Galerie"
405
 
406
- #: ../admin/addgallery.php:307
407
  msgid "The batch upload requires Adobe Flash 9, disable it if you have problems"
408
  msgstr "Das Batch-Upload-Skript benötigt Adbode Flash 9, wenn es Probleme gibt deaktiviere es besser."
409
 
410
- #: ../admin/addgallery.php:307
411
  msgid "Disable flash upload"
412
  msgstr "Deaktiviere Batch-Upload"
413
 
414
- #: ../admin/addgallery.php:309
415
  msgid "Upload multiple files at once by ctrl/shift-selecting in dialog"
416
  msgstr "Wähle im Dialog mit Ctrl/Shift mehrere Bilder gleichzeitig aus."
417
 
418
- #: ../admin/addgallery.php:309
419
  msgid "Enable flash based upload"
420
- msgstr "Aktiviere Flash Batch Uplaod"
421
-
422
- #: ../admin/admin.php:75
423
- #: ../admin/functions.php:78
424
- #: ../admin/functions.php:82
425
- #: ../admin/functions.php:128
426
- #: ../admin/manage.php:64
427
- #: ../admin/manage.php:434
428
- #: ../admin/settings.php:104
429
  msgid "Gallery"
430
- msgstr "Galerie"
 
 
431
 
432
- #: ../admin/admin.php:76
433
- msgid "Add Gallery"
434
- msgstr "Bilder/Galerie hinzufügen"
435
 
436
- #: ../admin/admin.php:77
437
  msgid "Manage Gallery"
438
  msgstr "Galerie verwalten"
439
 
440
- #: ../admin/admin.php:78
441
  msgid "Album"
442
- msgstr "Album"
 
 
443
 
444
- #: ../admin/admin.php:79
 
 
 
 
445
  msgid "Options"
446
  msgstr "Optionen"
447
 
448
- #: ../admin/admin.php:81
449
  msgid "Style"
450
  msgstr "Style"
451
 
452
- #: ../admin/admin.php:82
453
  msgid "Setup Gallery"
454
  msgstr "Galerie Setup"
455
 
456
- #: ../admin/admin.php:82
457
  msgid "Setup"
458
  msgstr "Setup"
459
 
460
- #: ../admin/admin.php:84
461
  msgid "Roles"
462
  msgstr "Zugriff"
463
 
464
- #: ../admin/admin.php:85
465
  msgid "About this Gallery"
466
  msgstr "Über diese Galerie"
467
 
468
- #: ../admin/admin.php:85
469
  msgid "About"
470
  msgstr "Über"
471
 
472
- #: ../admin/admin.php:87
473
  msgid "NextGEN Gallery"
474
  msgstr "NextGEN Gallery"
475
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  #: ../admin/album.php:19
477
- #: ../admin/album.php:37
478
  msgid "Update Successfully"
479
  msgstr "Update erfolgreich"
480
 
481
- #: ../admin/album.php:45
482
  msgid "Album deleted"
483
  msgstr "Album gelöscht"
484
 
485
- #: ../admin/album.php:122
486
  msgid "Manage Albums"
487
  msgstr "Verwalte Alben"
488
 
489
- #: ../admin/album.php:128
490
  msgid "Select album"
491
  msgstr "Wähle Album"
492
 
493
- #: ../admin/album.php:131
494
  msgid "No album selected"
495
  msgstr "Kein Album ausgewählt"
496
 
497
- #: ../admin/album.php:144
498
- msgid "Add new album"
499
- msgstr "Album hinzufügen"
500
 
501
- #: ../admin/album.php:148
502
- #: ../admin/manage.php:309
503
- #: ../admin/manage.php:580
504
  msgid "Delete"
505
  msgstr "Lösche"
506
 
507
- #: ../admin/album.php:148
508
  msgid "Delete album ?"
509
- msgstr "Lösche Album ?"
 
 
 
 
510
 
511
  #: ../admin/album.php:150
512
- #: ../admin/settings.php:164
513
- #: ../admin/settings.php:204
514
- #: ../admin/settings.php:251
515
- #: ../admin/settings.php:331
516
- #: ../admin/settings.php:378
517
- #: ../admin/settings.php:490
518
- #: ../admin/settings.php:598
519
- msgid "Update"
520
- msgstr "Aktualisiere"
521
 
522
  #: ../admin/album.php:158
523
  msgid "[Show all]"
@@ -547,1217 +566,1376 @@ msgstr "Album Seiten ID (Page ID)"
547
  msgid "No album selected!"
548
  msgstr "Kein Album ausgewählt"
549
 
550
- #: ../admin/album.php:256
551
- #: ../admin/manage.php:283
552
- #: ../admin/manage.php:535
553
  msgid "ID"
554
  msgstr "ID"
555
 
556
- #: ../admin/album.php:257
557
  msgid "Name"
558
  msgstr "Name"
559
 
560
- #: ../admin/album.php:258
561
- #: ../admin/manage.php:285
562
- #: ../admin/manage.php:446
563
  msgid "Title"
564
  msgstr "Titel"
565
 
566
- #: ../admin/album.php:259
567
  msgid "Page"
568
  msgstr "Seite"
569
 
570
- #: ../admin/functions.php:20
571
  msgid "No valid gallery name!"
572
  msgstr "Kein gültiger Galerie-Name!"
573
 
574
- #: ../admin/functions.php:27
575
- #: ../admin/functions.php:36
576
- #: ../admin/functions.php:50
577
- #: ../admin/functions.php:102
578
- #: ../admin/functions.php:109
579
  msgid "Directory"
580
  msgstr "Verzeichnis"
581
 
582
- #: ../admin/functions.php:27
583
  msgid "didn't exist. Please create first the main gallery folder "
584
  msgstr "nicht gefunden. Bitte erstelle zuerst das Hauptverzeichnis."
585
 
586
- #: ../admin/functions.php:28
587
- #: ../admin/functions.php:37
588
  msgid "Check this link, if you didn't know how to set the permission :"
589
  msgstr "Dieser Link zeigt dir wie man Verzeichnisrechte ändert :"
590
 
591
- #: ../admin/functions.php:36
592
- #: ../admin/functions.php:50
593
  msgid "is not writeable !"
594
  msgstr "ist schreibgeschützt !"
595
 
596
- #: ../admin/functions.php:45
597
- #: ../admin/functions.php:55
598
- #: ../admin/functions.php:525
599
  msgid "Unable to create directory "
600
  msgstr "Kann Verzeichnis nicht erstellen "
601
 
602
- #: ../admin/functions.php:59
603
  msgid "The server setting Safe-Mode is on !"
604
  msgstr "Auf dem Server ist Safe-Mode aktiviert (PHP.INI)"
605
 
606
- #: ../admin/functions.php:60
607
  msgid "If you have problems, please create directory"
608
  msgstr "Wenn Probleme auftreten, erstelle bitte das Verzeichnis"
609
 
610
- #: ../admin/functions.php:61
611
  msgid "and the thumbnails directory"
612
  msgstr "und das Thumbnails-Verzeichnis"
613
 
614
- #: ../admin/functions.php:61
615
  msgid "with permission 777 manually !"
616
  msgstr "mit den Berechtigungen 777 manuell !"
617
 
618
- #: ../admin/functions.php:78
619
  msgid "already exists"
620
  msgstr "gibt es bereits"
621
 
622
- #: ../admin/functions.php:82
623
- #: ../admin/functions.php:128
624
- msgid "successfully created!"
625
- msgstr "erfolgreich erstellt!"
626
 
627
- #: ../admin/functions.php:82
628
- msgid "You can show this gallery with the tag"
629
- msgstr "Du kannst diese Galerie mit dem Stichwort anzeigen :"
630
 
631
- #: ../admin/functions.php:102
632
  msgid "doesn&#96;t exist!"
633
  msgstr "gibt es nicht !"
634
 
635
- #: ../admin/functions.php:109
636
  msgid "contains no pictures"
637
  msgstr "enthält keine Bilder"
638
 
639
- #: ../admin/functions.php:125
640
  msgid "Database error. Could not add gallery!"
641
  msgstr "Datenbank-Fehler. Kann Galerie nicht hinzufügen!"
642
 
643
- #: ../admin/functions.php:144
644
- msgid " picture(s) successfully added"
645
- msgstr " Bild(er) erfolgreich hinzugefügt"
646
-
647
- #: ../admin/functions.php:175
648
- #: ../admin/functions.php:224
649
- #: ../admin/functions.php:287
650
- msgid "Running... Please wait"
651
- msgstr "Läuft... Bitte warten"
652
-
653
- #: ../admin/functions.php:176
654
- #: ../admin/manage.php:510
655
- msgid "Resize images"
656
- msgstr "Bilder verkleinern"
657
-
658
- #: ../admin/functions.php:200
659
- msgid " : Image resized..."
660
- msgstr " : Bild angepasst..."
661
-
662
- #: ../admin/functions.php:209
663
- #: ../admin/functions.php:266
664
- msgid "Some pictures are not writeable :"
665
- msgstr "Einige Bilder sind schreibgeschützt :"
666
-
667
- #: ../admin/functions.php:225
668
- #: ../admin/manage.php:508
669
- msgid "Set watermark"
670
- msgstr "Wasserzeichen setzen"
671
-
672
- #: ../admin/functions.php:257
673
- msgid " : Watermark created..."
674
- msgstr " : Wasserzeichen gesetzt..."
675
 
676
- #: ../admin/functions.php:288
677
- #: ../admin/manage.php:509
 
 
678
  msgid "Create new thumbnails"
679
  msgstr "Neue Thumbnails erstellen"
680
 
681
- #: ../admin/functions.php:355
682
- msgid " : Thumbnail created..."
683
- msgstr ": Thumbnail erstellt..."
684
 
685
- #: ../admin/functions.php:360
686
- msgid "Follow thumbnails could not created."
687
- msgstr "Folgende Thumbnails konnten nicht erstellt werden :"
 
 
688
 
689
- #: ../admin/functions.php:361
690
- msgid "Some thumbnails are not writeable :"
691
- msgstr "Einige Thumbnails sind schreibgeschützt :"
692
 
693
- #: ../admin/functions.php:460
694
- msgid "The Zip-file is too large. Exceed Memory limit !"
695
- msgstr "Das Zip-File ist zu groß. Speicherlimit überschritten !"
 
696
 
697
- #: ../admin/functions.php:501
698
  msgid "Uploaded file was no or a faulty zip file ! The server recognize : "
699
  msgstr "Die hochgeladene Datei war keine korrekte Zip-Datei. Servermeldung :"
700
 
701
- #: ../admin/functions.php:520
 
 
 
 
702
  #, php-format
703
  msgid "Unable to create directory %s. Is its parent directory writable by the server?"
704
  msgstr "Kann das Verzeichnis %s nicht erstellen. Is das Hauptverzeichnis vielleicht schreibgeschützt ?"
705
 
706
- #: ../admin/functions.php:535
707
  msgid "Zip-File successfully unpacked"
708
  msgstr "Zip-Datei erfolgreich entpackt"
709
 
710
- #: ../admin/functions.php:571
711
- #: ../admin/functions.php:681
712
  msgid "Failure in database, no gallery path set !"
713
  msgstr "Datenbankfehler! Kein Galerie-Pfad gesetzt !"
714
 
715
- #: ../admin/functions.php:592
716
- #: ../admin/functions.php:674
717
  msgid "is no valid image file!"
718
  msgstr "ist keine zulässige Bilddatei !"
719
 
720
- #: ../admin/functions.php:606
 
 
721
  #, php-format
722
  msgid "Unable to write to directory %s. Is this directory writable by the server?"
723
  msgstr "Kann das Verzeichnis %s nicht erstellen. Is das Hauptverzeichnis vielleicht schreibgeschützt ?"
724
 
725
- #: ../admin/functions.php:613
726
- #: ../admin/functions.php:698
727
  msgid "Error, the file could not moved to : "
728
  msgstr "Fehler: Diese Datei kann nicht verschoben werden zu :"
729
 
730
- #: ../admin/functions.php:618
731
- #: ../admin/functions.php:702
732
  msgid "Error, the file permissions could not set"
733
  msgstr "Fehler: Die Berechtigungen für diese Datei können nicht gesetzt werden"
734
 
735
- #: ../admin/functions.php:637
736
  msgid " Image(s) successfully added"
737
  msgstr " Bild(er) erfolgreich hinzugefügt"
738
 
739
- #: ../admin/functions.php:661
740
  msgid "Invalid upload. Error Code : "
741
  msgstr "Ungültiger Upload. Fehler Code :"
742
 
743
- #: ../admin/functions.php:713
744
  msgid "Sorry, you have used your space allocation. Please delete some files to upload more files."
745
  msgstr "Schade, dein freier Speicher scheint aufgebraucht zu sein. Bitte lösche zuerst ein paar Bilder."
746
 
747
- #: ../admin/functions.php:740
748
  #, php-format
749
  msgid "SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually"
750
  msgstr "SAFE MODE Einschränkungen ist aktiv. Du must das Verzeichnis <strong>%s</strong> manuell anlegen."
751
 
752
- #: ../admin/functions.php:741
753
  #, php-format
754
  msgid "When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory"
755
  msgstr "Wenn der Safe-Mode eingeschaltet ist, überprüft PHP ob der Besitzer (%s) des Skript mit dem Besitzer (%s) der Datei/Verzeichnis übereinstimmt."
756
 
757
- #: ../admin/manage.php:64
758
- #: ../admin/manage.php:85
759
- msgid "deleted successfully"
760
- msgstr "erfolgreich gelöscht"
761
 
762
- #: ../admin/manage.php:111
763
- msgid "Watermark successfully added"
764
- msgstr "Wasserzeichen erfolgreich erstellt"
 
765
 
766
- #: ../admin/manage.php:116
767
- msgid "Thumbnails successfully created. Please refresh your browser cache."
768
- msgstr "Thumbnails erfolgreich erstellt. Bitte Browser-Cache aktualisieren."
 
769
 
770
- #: ../admin/manage.php:121
771
- msgid "Images successfully resized"
772
- msgstr "Bilder erfolgreich verkleinert"
 
773
 
774
- #: ../admin/manage.php:139
775
- msgid "Pictures deleted successfully "
776
- msgstr "Bilder erfolgreich gelöscht"
 
777
 
778
- #: ../admin/manage.php:145
779
- msgid "Import metadata finished"
780
- msgstr "Import der Metadaten beendet"
 
781
 
782
- #: ../admin/manage.php:195
783
- msgid "Tags changed"
784
- msgstr "Stichwörter geändert"
 
785
 
786
- #: ../admin/manage.php:215
787
- msgid "Update successful"
788
- msgstr "Aktualisierung erfolgreich"
 
789
 
790
- #: ../admin/manage.php:248
791
- msgid "New gallery page ID"
792
- msgstr "Neue Galerie Seiten ID"
793
 
794
- #: ../admin/manage.php:248
795
- msgid "created"
796
- msgstr "erstellt"
797
 
798
- #: ../admin/manage.php:279
 
 
 
 
 
 
 
 
799
  msgid "Gallery Overview"
800
  msgstr "Galerie Übersicht"
801
 
802
- #: ../admin/manage.php:284
803
- msgid "Gallery name"
804
- msgstr "Galerie Name"
805
-
806
- #: ../admin/manage.php:286
807
- #: ../admin/manage.php:465
808
- #: ../admin/manage.php:541
809
  msgid "Description"
810
  msgstr "Beschreibung"
811
 
812
- #: ../admin/manage.php:287
 
 
 
 
 
813
  msgid "Page ID"
814
- msgstr "Seiten ID (Page ID)"
815
 
816
- #: ../admin/manage.php:288
817
  msgid "Quantity"
818
  msgstr "Anzahl"
819
 
820
- #: ../admin/manage.php:289
821
- #: ../admin/manage.php:547
822
  msgid "Action"
823
  msgstr "Aktion"
824
 
825
- #: ../admin/manage.php:308
826
  msgid "Edit"
827
  msgstr "Bearbeiten"
828
 
829
- #: ../admin/manage.php:309
830
  msgid "Delete this gallery ?"
831
  msgstr "Diese Galerie löschen ?"
832
 
833
- #: ../admin/manage.php:314
834
- #: ../admin/manage.php:585
835
  msgid "No entries found"
836
  msgstr "Keine Einträge gefunden"
837
 
838
- #: ../admin/manage.php:443
839
- msgid "Main settings"
840
- msgstr "Haupteinstellungen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
841
 
842
- #: ../admin/manage.php:448
843
  msgid "Page Link to"
844
  msgstr "Seite verlinkt zu"
845
 
846
- #: ../admin/manage.php:451
847
  msgid "Not linked"
848
  msgstr "Nicht verlinkt"
849
 
850
- #: ../admin/manage.php:467
851
  msgid "Preview image"
852
  msgstr "Vorschau-Bild"
853
 
854
- #: ../admin/manage.php:470
855
  msgid "No Picture"
856
  msgstr "Kein Bild"
857
 
858
- #: ../admin/manage.php:485
859
  msgid "Path"
860
  msgstr "Pfad"
861
 
862
- #: ../admin/manage.php:488
863
  msgid "Create new page"
864
  msgstr "Neue Seite erstellen"
865
 
866
- #: ../admin/manage.php:491
867
  msgid "Main page (No parent)"
868
  msgstr "Haupseite (keine Unterseite)"
869
 
870
- #: ../admin/manage.php:494
871
  msgid "Add page"
872
  msgstr "Seite hinzufügen"
873
 
874
- #: ../admin/manage.php:500
875
  msgid "Scan Folder for new images"
876
  msgstr "Überprüfe Verzeichniss nach neuen Bildern"
877
 
878
- #: ../admin/manage.php:501
879
- #: ../admin/manage.php:592
 
880
  msgid "Save Changes"
881
  msgstr "Änderungen Speichern"
882
 
883
- #: ../admin/manage.php:506
884
  msgid "No action"
885
  msgstr "Keine Aktion"
886
 
887
- #: ../admin/manage.php:511
 
 
 
 
 
 
 
 
 
 
888
  msgid "Delete images"
889
  msgstr "Bilder löschen"
890
 
891
- #: ../admin/manage.php:512
892
  msgid "Import metadata"
893
  msgstr "Metadaten importieren"
894
 
895
- #: ../admin/manage.php:514
 
 
 
 
 
 
 
 
896
  msgid "Add tags"
897
  msgstr "Stichwörter hinzufügen"
898
 
899
- #: ../admin/manage.php:515
900
  msgid "Delete tags"
901
  msgstr "Stichwörter löschen"
902
 
903
- #: ../admin/manage.php:516
904
  msgid "Overwrite tags"
905
  msgstr "Stichwörter überschreiben"
906
 
907
- #: ../admin/manage.php:520
908
- #: ../admin/manage.php:521
909
- #: ../admin/manage.php:610
 
910
  msgid "OK"
911
  msgstr "OK"
912
 
913
- #: ../admin/manage.php:520
914
- #: ../admin/manage.php:610
915
- msgid "No images selected"
916
- msgstr "Keine Bilder ausgewählt"
917
-
918
- #: ../admin/manage.php:520
919
- #: ../admin/manage.php:610
920
- #, php-format
921
- msgid ""
922
- "You are about to start the bulk edit for %s images \n"
923
- " \n"
924
- " 'Cancel' to stop, 'OK' to proceed."
925
- msgstr ""
926
- "Du startest die Bearbeitung von %s Bildern \n"
927
- " \n"
928
- " 'Abbrechenl' um zu stoppen, 'OK' um die Bearbeitung durchzuführen."
929
-
930
- #: ../admin/manage.php:522
931
  msgid "Hide thumbnails "
932
  msgstr "Thumbnails verstecken"
933
 
934
- #: ../admin/manage.php:523
935
  msgid "Show thumbnails "
936
  msgstr "Thumbnails zeigen"
937
 
938
- #: ../admin/manage.php:524
939
  msgid "Show tags"
940
  msgstr "Zeige Tags"
941
 
942
- #: ../admin/manage.php:525
943
  msgid "Hide tags"
944
  msgstr "Verstecke Tags"
945
 
946
- #: ../admin/manage.php:527
947
  msgid "Sort gallery"
948
  msgstr "Sortiere Bilder"
949
 
950
- #: ../admin/manage.php:536
951
- #: ../admin/settings.php:320
952
- msgid "File name"
953
- msgstr "Dateiname"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
954
 
955
- #: ../admin/manage.php:538
 
 
 
 
 
 
 
 
 
 
 
956
  msgid "Thumbnail"
957
  msgstr "Thumbnail"
958
 
959
- #: ../admin/manage.php:542
 
 
 
 
 
 
 
 
 
960
  msgid "Alt &amp; Title Text"
961
  msgstr "Alt &amp; Titel Text"
962
 
963
- #: ../admin/manage.php:543
964
  msgid "exclude"
965
  msgstr "ausschließen"
966
 
967
- #: ../admin/manage.php:545
968
  msgid "Tags (comma separated list)"
969
  msgstr "Stichwörter (Tags)"
970
 
971
- #: ../admin/manage.php:578
972
- msgid "View"
973
- msgstr "Ansehen"
974
 
975
- #: ../admin/manage.php:579
976
- msgid "Show Meta data"
977
- msgstr "Zeige Metadaten"
978
 
979
- #: ../admin/manage.php:579
980
- msgid "Meta"
981
- msgstr "Meta"
982
 
983
- #: ../admin/manage.php:580
984
- msgid "Delete this file ?"
985
- msgstr "Diese Datei löschen ?"
986
 
987
- #: ../admin/manage.php:607
988
- msgid "Enter the tags"
989
- msgstr "Stichwörter angeben"
990
 
991
- #: ../admin/manage.php:610
992
- msgid "Cancel"
993
- msgstr "Abbrechen"
994
 
995
- #: ../admin/overview.php:18
996
- msgid "NextGEN Gallery Overview"
997
- msgstr "NextGEN Galerie Übersicht"
998
 
999
- #: ../admin/overview.php:21
1000
- msgid "Summary"
1001
- msgstr "Zusammenfassung"
1002
 
1003
- #: ../admin/overview.php:30
1004
- #, php-format
1005
- msgid "There are totally %1$s pictures in %2$s galleries, which are spread across %3$s albums."
1006
- msgstr "Es gibt insgesamt %1$s Bilder in %2$s Galerien - verteilt in %3$s Alben."
1007
 
1008
- #: ../admin/overview.php:34
1009
- msgid "New Version available"
1010
- msgstr "Neue Version verfügbar !!"
1011
 
1012
- #: ../admin/overview.php:35
1013
- msgid "The server reports that a new NextGEN Gallery Version is now available. Please visit the plugin homepage for more information."
1014
- msgstr "Der Server benachrichtigt Dich über eine neu verfügbare Version der NextGEN Galerie. Bitte besuche die Plugin Homepage um weitere Informationen zu erhalten."
1015
 
1016
- #: ../admin/overview.php:36
1017
- msgid "Download here"
1018
- msgstr "Hier dowloaden"
1019
 
1020
- #: ../admin/overview.php:42
1021
- msgid "Server Settings"
1022
- msgstr "Server- Einstellungen"
 
1023
 
1024
- #: ../admin/overview.php:50
1025
- msgid "Welcome"
1026
- msgstr "Willkommen"
1027
 
1028
- #: ../admin/overview.php:54
1029
- msgid "gallery administrator"
1030
- msgstr "Galerie-Administrator"
1031
 
1032
- #: ../admin/overview.php:54
1033
- msgid "gallery editor"
1034
- msgstr "Galerie-Mitarbeiter"
1035
 
1036
- #: ../admin/overview.php:55
1037
- #, php-format
1038
- msgid "Welcome to NextGEN Gallery. Here you can control your images, galleries and albums. You currently have %s rights."
1039
- msgstr "Willkommen zur NextGEN Galerie. Hier kannst Du Deine Bilder, Galerien und Alben verwalten. Du hast im Moment %s Rechte."
 
 
 
 
 
 
 
1040
 
1041
- #: ../admin/overview.php:60
1042
- msgid "Add a new gallery or import pictures"
1043
- msgstr "Neue Galerie erstellen oder Bilder importieren"
1044
 
1045
- #: ../admin/overview.php:61
1046
- msgid "Manage galleries and images"
1047
- msgstr "Verwalte Galerien und Bilder"
1048
 
1049
- #: ../admin/overview.php:62
1050
- msgid "Create and manage albums"
1051
- msgstr "Erstelle und verwalte Alben"
 
1052
 
1053
- #: ../admin/overview.php:63
1054
- msgid "Change the settings of NextGEN Gallery"
1055
- msgstr "Ändere die Einstellungen von NextGEN Galerie"
1056
 
1057
- #: ../admin/overview.php:66
1058
- msgid "Latest News"
1059
- msgstr "Letzte Informationen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1060
 
1061
- #: ../admin/overview.php:85
 
 
 
 
1062
  #, php-format
1063
  msgid "Newsfeed could not be loaded. Check the <a href=\"%s\">front page</a> to check for updates."
1064
  msgstr "Der Newsfeed kann nicht geladen werden. Schaue auf die <a href=\"%s\">Hauptseite</a> um Updates mitzubekommen."
1065
 
1066
- #: ../admin/overview.php:98
1067
- msgid "GD support"
1068
- msgstr "GD Unterstützung"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1069
 
1070
- #: ../admin/overview.php:109
1071
  msgid "No GD support"
1072
  msgstr "Keine GD Unterstützung"
1073
 
1074
- #: ../admin/overview.php:116
1075
- #: ../admin/overview.php:154
1076
- #: ../admin/overview.php:157
1077
- #: ../admin/overview.php:160
1078
  msgid "Yes"
1079
  msgstr "Ja"
1080
 
1081
- #: ../admin/overview.php:117
1082
- #: ../admin/overview.php:155
1083
- #: ../admin/overview.php:158
1084
- #: ../admin/overview.php:161
1085
  msgid "No"
1086
  msgstr "Nein"
1087
 
1088
- #: ../admin/overview.php:131
1089
  msgid "Not set"
1090
  msgstr "Nicht gesetzt"
1091
 
1092
- #: ../admin/overview.php:133
1093
- #: ../admin/overview.php:136
1094
  msgid "On"
1095
  msgstr "An"
1096
 
1097
- #: ../admin/overview.php:134
1098
- #: ../admin/overview.php:137
1099
  msgid "Off"
1100
  msgstr "Aus"
1101
 
1102
- #: ../admin/overview.php:140
1103
- #: ../admin/overview.php:143
1104
- #: ../admin/overview.php:146
1105
- #: ../admin/overview.php:149
1106
- #: ../admin/overview.php:152
1107
  msgid "N/A"
1108
  msgstr "N/A"
1109
 
1110
- #: ../admin/overview.php:151
1111
  msgid " MByte"
1112
  msgstr " MByte"
1113
 
1114
- #: ../admin/overview.php:164
1115
  msgid "Operating System"
1116
  msgstr "Betriebssystem"
1117
 
1118
- #: ../admin/overview.php:165
1119
  msgid "Server"
1120
  msgstr "Server"
1121
 
1122
- #: ../admin/overview.php:166
1123
  msgid "Memory usage"
1124
  msgstr "Speicherverbrauch"
1125
 
1126
- #: ../admin/overview.php:167
1127
  msgid "MYSQL Version"
1128
  msgstr "MySQL Version"
1129
 
1130
- #: ../admin/overview.php:168
1131
  msgid "SQL Mode"
1132
  msgstr "SQL Modus"
1133
 
1134
- #: ../admin/overview.php:169
1135
  msgid "PHP Version"
1136
  msgstr "PHP Version"
1137
 
1138
- #: ../admin/overview.php:170
1139
  msgid "PHP Safe Mode"
1140
  msgstr "PHP Safe Mode"
1141
 
1142
- #: ../admin/overview.php:171
1143
  msgid "PHP Allow URL fopen"
1144
  msgstr "PHP Allow URL fopen"
1145
 
1146
- #: ../admin/overview.php:172
1147
  msgid "PHP Memory Limit"
1148
  msgstr "PHP Memory Limit"
1149
 
1150
- #: ../admin/overview.php:173
1151
  msgid "PHP Max Upload Size"
1152
- msgstr "PHP Max Upload Size"
1153
 
1154
- #: ../admin/overview.php:174
1155
  msgid "PHP Max Post Size"
1156
- msgstr "PHP Max Post Size"
1157
 
1158
- #: ../admin/overview.php:175
1159
  msgid "PHP Max Script Execute Time"
1160
  msgstr "PHP Max Script Execute Time"
1161
 
1162
- #: ../admin/overview.php:176
1163
  msgid "PHP Exif support"
1164
  msgstr "PHP Exif Modul"
1165
 
1166
- #: ../admin/overview.php:177
1167
  msgid "PHP IPTC support"
1168
  msgstr "PHP IPTC Modul"
1169
 
1170
- #: ../admin/overview.php:178
1171
  msgid "PHP XML support"
1172
  msgstr "PHP XML Modul"
1173
 
1174
- #: ../admin/overview.php:319
1175
  msgid "Storage Space"
1176
  msgstr "Speicherplatz"
1177
 
1178
- #: ../admin/overview.php:322
1179
  msgid "Upload Space Used:"
1180
  msgstr "Verbrauchter Uploadspeicher:"
1181
 
1182
- #: ../admin/overview.php:328
1183
  msgid "Upload Space Remaining:"
1184
  msgstr "Verbleibender Speicher:"
1185
 
1186
- #: ../admin/roles.php:20
1187
  msgid "Updated capabilities"
1188
  msgstr "Zugriffsrechte geändert"
1189
 
1190
- #: ../admin/roles.php:25
1191
  msgid "Roles / capabilities"
1192
  msgstr "Rollen / Zugriffsrechte"
1193
 
1194
- #: ../admin/roles.php:26
1195
  msgid "Select the lowest role which should be able to access the follow capabilities. NextGEN Gallery supports the standard roles from WordPress."
1196
  msgstr "Wähle die niedrigste Rolle aus, die Zugriff haben soll. NextGEN Gallery unterstützt nur die Standard Wordpress Rollen/Fähigkeiten von WordPress."
1197
 
1198
- #: ../admin/roles.php:27
1199
  msgid "For a more flexible user management you can use the"
1200
  msgstr "Nutze für eine flexiblere Rechteverwaltung den "
1201
 
1202
- #: ../admin/roles.php:33
1203
  msgid "Main NextGEN Gallery overview"
1204
  msgstr "NextGEN Galerie Übersicht"
1205
 
1206
- #: ../admin/roles.php:37
1207
  msgid "Use TinyMCE Button / Upload tab"
1208
  msgstr "TinyMCE Button / Upload Tab"
1209
 
1210
- #: ../admin/roles.php:41
1211
  msgid "Add gallery / Upload images"
1212
  msgstr "Galerie einrichten / Bilder hochladen"
1213
 
1214
- #: ../admin/roles.php:45
1215
  msgid "Manage gallery"
1216
  msgstr "Galerie verwalten"
1217
 
1218
- #: ../admin/roles.php:49
 
 
 
 
 
 
 
 
1219
  msgid "Edit Album"
1220
  msgstr "Album erstellen"
1221
 
1222
- #: ../admin/roles.php:53
1223
  msgid "Change style"
1224
  msgstr "Style anpassen"
1225
 
1226
- #: ../admin/roles.php:57
1227
  msgid "Change options"
1228
  msgstr "Optionen änderen"
1229
 
1230
- #: ../admin/roles.php:61
1231
  msgid "Update capabilities"
1232
  msgstr "Rechte aktualisieren"
1233
 
1234
- #: ../admin/settings.php:33
1235
- msgid "Update successfully"
1236
- msgstr "Aktualisierung erfolgreich"
1237
-
1238
- #: ../admin/settings.php:50
1239
  msgid "Cache cleared"
1240
  msgstr "Cache löschen"
1241
 
1242
- #: ../admin/settings.php:101
1243
- #: ../admin/settings.php:113
1244
  msgid "General Options"
1245
  msgstr "Allg. Optionen"
1246
 
1247
- #: ../admin/settings.php:103
 
 
 
 
 
1248
  msgid "Images"
1249
  msgstr "Bilder"
1250
 
1251
- #: ../admin/settings.php:105
1252
- #: ../admin/settings.php:339
1253
  msgid "Effects"
1254
  msgstr "Effekte"
1255
 
1256
- #: ../admin/settings.php:106
1257
- #: ../admin/settings.php:392
 
1258
  msgid "Watermark"
1259
  msgstr "Wasserzeichen"
1260
 
1261
- #: ../admin/settings.php:107
1262
- #: ../admin/settings.php:296
1263
- #: ../admin/settings.php:500
 
1264
  msgid "Slideshow"
1265
  msgstr "Slideshow"
1266
 
1267
- #: ../admin/settings.php:120
 
1268
  msgid "Gallery path"
1269
  msgstr "Galerie-Pfad"
1270
 
1271
- #: ../admin/settings.php:122
1272
  msgid "This is the default path for all galleries"
1273
  msgstr "Dies ist der Standard-Pfad für alle Galerien"
1274
 
1275
- #: ../admin/settings.php:133
1276
  msgid "Delete image files"
1277
  msgstr "Lösche Bilddateien"
1278
 
1279
- #: ../admin/settings.php:135
1280
  msgid "Delete files, when removing a gallery in the database"
1281
  msgstr "Löscht auch die Dateien, falls die Galerie aus der Datenbank entfernt wird"
1282
 
1283
- #: ../admin/settings.php:138
1284
  msgid "Activate permalinks"
1285
  msgstr "Aktiviere Permalinks"
1286
 
1287
- #: ../admin/settings.php:140
1288
  msgid "When you activate this option, you need to update your permalink structure one time."
1289
  msgstr "Wenn du diese Option aktivierst, muss du einmal die Permalink Struktur aktualisieren."
1290
 
1291
- #: ../admin/settings.php:143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1292
  msgid "Tags / Categories"
1293
  msgstr "Stichwörter / Kategorien"
1294
 
1295
- #: ../admin/settings.php:146
1296
  msgid "Activate related images"
1297
  msgstr "Verwandte Bilder anzeigen"
1298
 
1299
- #: ../admin/settings.php:148
1300
  msgid "This option will append related images to every post"
1301
  msgstr "Diese Option hängt verwandte Bilder an jeden Beitrag"
1302
 
1303
- #: ../admin/settings.php:152
1304
  msgid "Match with"
1305
  msgstr "Vergleiche mit"
1306
 
1307
- #: ../admin/settings.php:153
1308
  msgid "Categories"
1309
  msgstr "Kategorien"
1310
 
1311
- #: ../admin/settings.php:154
1312
- msgid "Tags"
1313
- msgstr "Stichwörter"
1314
-
1315
- #: ../admin/settings.php:154
1316
- msgid " (require WordPress 2.3 or higher)"
1317
- msgstr " (benötigt WordPress 2.3 oder höher)"
1318
-
1319
- #: ../admin/settings.php:158
1320
  msgid "Max. number of images"
1321
  msgstr "Max. Anzahl der Bilder"
1322
 
1323
- #: ../admin/settings.php:160
1324
  msgid "0 will show all images"
1325
  msgstr "0 zeige alle verwandten Bilder"
1326
 
1327
- #: ../admin/settings.php:172
1328
  msgid "Thumbnail settings"
1329
  msgstr "Thumbnail Einstellungen"
1330
 
1331
- #: ../admin/settings.php:177
1332
  msgid "Please note : If you change the settings, you need to recreate the thumbnails under -> Manage Gallery ."
1333
  msgstr "Bitte beachten : Änderungen der Einstellungen werden erst übernommen, wenn Du neue Thumbnails unter -> \"Gallery verwalten\" erstellst"
1334
 
1335
- #: ../admin/settings.php:180
1336
  msgid "Width x height (in pixel)"
1337
  msgstr "Breite x Höhe (in Pixel)"
1338
 
1339
- #: ../admin/settings.php:182
1340
  msgid "These values are maximum values "
1341
  msgstr "Diese Angaben sind maximale Angaben."
1342
 
1343
- #: ../admin/settings.php:185
1344
  msgid "Set fix dimension"
1345
  msgstr "Setze fixe Größe"
1346
 
1347
- #: ../admin/settings.php:187
1348
  msgid "Ignore the aspect ratio, no portrait thumbnails"
1349
  msgstr "Ignoriere Bildseitenverhältnis"
1350
 
1351
- #: ../admin/settings.php:190
1352
  msgid "Crop square thumbnail from image"
1353
  msgstr "Mittige Thumbnails aus Bildern ausschneiden"
1354
 
1355
- #: ../admin/settings.php:192
1356
  msgid "Create square thumbnails, use only the width setting :"
1357
  msgstr "Erstellt viereckige Thumbnails, nutzt nur den Wert der Breite :"
1358
 
1359
- #: ../admin/settings.php:195
1360
  msgid "Thumbnail quality"
1361
  msgstr "Thumbnail Qualität"
1362
 
1363
- #: ../admin/settings.php:199
1364
- #: ../admin/settings.php:231
1365
- msgid "Resample Mode"
1366
- msgstr "Resample Modus"
1367
-
1368
- #: ../admin/settings.php:201
1369
- #: ../admin/settings.php:234
1370
- msgid "Value between 1-5 (higher value, more CPU load)"
1371
- msgstr "Wähle zwischen 1-5 (je höhere desto länger braucht der Server)"
1372
-
1373
- #: ../admin/settings.php:212
1374
  msgid "Image settings"
1375
  msgstr "Bild Einstellungen"
1376
 
1377
- #: ../admin/settings.php:219
1378
  msgid "Resize Images"
1379
  msgstr "Bilder verkleinern"
1380
 
1381
- #: ../admin/settings.php:223
1382
  msgid "Width x height (in pixel). NextGEN Gallery will keep ratio size"
1383
  msgstr "Breite x Höhe (in Pixel). NextGEN Galerie beachtet das Seitenverhältnis."
1384
 
1385
- #: ../admin/settings.php:226
1386
  msgid "Image quality"
1387
  msgstr "Bild Qualität"
1388
 
1389
- #: ../admin/settings.php:237
1390
  msgid "Single picture"
1391
  msgstr "Einzelbilder"
1392
 
1393
- #: ../admin/settings.php:240
1394
  msgid "Cache single pictures"
1395
  msgstr "Nutze Cache für Einzelbidler"
1396
 
1397
- #: ../admin/settings.php:243
1398
  msgid "Creates a file for each singlepic settings. Reduce the CPU load"
1399
  msgstr "Erstellt ein Cache-Bild für jedes Einzelbild (singlepic). Reduziert die CPU Belastung."
1400
 
1401
- #: ../admin/settings.php:246
1402
  msgid "Clear cache folder"
1403
  msgstr "Lösche Cache Verzeichnis"
1404
 
1405
- #: ../admin/settings.php:248
1406
  msgid "Proceed now"
1407
  msgstr "Jetzt durchführen"
1408
 
1409
- #: ../admin/settings.php:259
1410
- msgid "Gallery settings"
1411
- msgstr "Galerie Einstellungen"
1412
-
1413
- #: ../admin/settings.php:275
1414
  msgid "Deactivate gallery page link"
1415
  msgstr "Keine Seitenverzweigung"
1416
 
1417
- #: ../admin/settings.php:277
1418
  msgid "The album will not link to a gallery subpage. The gallery is shown on the same page."
1419
  msgstr "Ein Album benötigt dann keinen Link zur Seite. Die Galerie wird direkt angezeigt."
1420
 
1421
- #: ../admin/settings.php:281
1422
  msgid "Number of images per page"
1423
  msgstr "Anzahl der Bilder pro Seite"
1424
 
1425
- #: ../admin/settings.php:283
1426
  msgid "0 will disable pagination, all images on one page"
1427
  msgstr "0 schaltet Blätterfunktion ab ( = alle Bilder auf einer Seite )"
1428
 
1429
- #: ../admin/settings.php:287
1430
  msgid "Integrate slideshow"
1431
  msgstr "Slideshow verwenden"
1432
 
1433
- #: ../admin/settings.php:294
1434
  msgid "Show first"
1435
  msgstr "Zeige als Erstes"
1436
 
1437
- #: ../admin/settings.php:300
1438
- msgid "Show thumbnail description"
1439
- msgstr "Zeige Bildbeschreibung"
1440
-
1441
- #: ../admin/settings.php:301
1442
- #: ../admin/settings.php:351
1443
- msgid "None"
1444
- msgstr "Keiner"
1445
-
1446
- #: ../admin/settings.php:302
1447
- msgid "Description text"
1448
- msgstr "Beschreibung"
1449
-
1450
- #: ../admin/settings.php:303
1451
- #: ../admin/settings.php:321
1452
- msgid "Alt / Title text"
1453
- msgstr "Alt / Titel Text"
1454
-
1455
- #: ../admin/settings.php:307
1456
  msgid "Show ImageBrowser"
1457
  msgstr "Zeige Bilder Browser"
1458
 
1459
- #: ../admin/settings.php:309
1460
  msgid "The gallery will open the ImageBrowser instead the effect."
1461
  msgstr "Es wird der Bilder Browser angezeigt (Kein JavaScript Effekt)"
1462
 
1463
- #: ../admin/settings.php:313
1464
  msgid "Sort options"
1465
  msgstr "Sortierung"
1466
 
1467
- #: ../admin/settings.php:316
1468
  msgid "Sort thumbnails"
1469
  msgstr "Thumbnails sortieren"
1470
 
1471
- #: ../admin/settings.php:318
1472
  msgid "Custom order"
1473
  msgstr "Benutzerdefiniert"
1474
 
1475
- #: ../admin/settings.php:319
1476
- msgid "Image ID"
1477
- msgstr "Bilder ID"
1478
 
1479
- #: ../admin/settings.php:325
 
 
 
 
1480
  msgid "Sort direction"
1481
  msgstr "Sortierreihenfolge"
1482
 
1483
- #: ../admin/settings.php:326
1484
- msgid "Ascending"
1485
- msgstr "Aufsteigend"
1486
 
1487
- #: ../admin/settings.php:327
1488
- msgid "Descending"
1489
- msgstr "Absteigend"
1490
-
1491
- #: ../admin/settings.php:343
1492
- msgid "Here you can select the thumbnail effect, NextGEN Gallery will integrate the required HTML code in the images. Please note that only the Thickbox effect will automatic added to your theme."
1493
- msgstr "Hier kannst Du den Effekt für die Thumbnails auswählen. NextGEN Galerie wird den benötigten HTML Code verwenden. Bitte beachte, das nur der Thickbox Effekt automatisch in Dein Theme von Wordpress integriert wird. Alle anderen Effekte mußt Du selbst in die header.php eintragen (JS)."
1494
-
1495
- #: ../admin/settings.php:344
1496
  msgid "With the placeholder"
1497
  msgstr "Mit Platzhalter"
1498
 
1499
- #: ../admin/settings.php:344
1500
  msgid "you can activate a navigation through the images (depend on the effect). Change the code line only , when you use a different thumbnail effect or you know what you do."
1501
  msgstr "Du kannst eine Navigation durch die Bilder aktivieren (hängt vom Effekt ab). Ändere nur die Codezeile falls Du einen anderen Effekt für die Thumbnails verwendest oder einfach weißt, was Du tust."
1502
 
1503
- #: ../admin/settings.php:348
1504
  msgid "JavaScript Thumbnail effect"
1505
  msgstr "JavaScript Thumbnail Effekt"
1506
 
1507
- #: ../admin/settings.php:352
1508
  msgid "Thickbox"
1509
  msgstr "Thickbox"
1510
 
1511
- #: ../admin/settings.php:353
1512
  msgid "Lightbox"
1513
  msgstr "Lightbox"
1514
 
1515
- #: ../admin/settings.php:354
1516
  msgid "Highslide"
1517
  msgstr "Highslide"
1518
 
1519
- #: ../admin/settings.php:355
1520
  msgid "Shutter"
1521
  msgstr "Shutter"
1522
 
1523
- #: ../admin/settings.php:356
1524
  msgid "Custom"
1525
  msgstr "Eigener"
1526
 
1527
- #: ../admin/settings.php:361
1528
  msgid "Link Code line"
1529
  msgstr "Link Code Zeile"
1530
 
1531
- #: ../admin/settings.php:369
1532
- msgid "Select loading image"
1533
- msgstr "Wähle Ladeanimation"
1534
-
1535
- #: ../admin/settings.php:393
1536
  msgid "Please note : You can only activate the watermark under -> Manage Gallery . This action cannot be undone."
1537
  msgstr "Bitte beachten : Das Wasserzeichen kann nur unter der Galerieverwaltung gesetzt werden. "
1538
 
1539
- #: ../admin/settings.php:398
1540
  msgid "Preview"
1541
  msgstr "Vorschau"
1542
 
1543
- #: ../admin/settings.php:400
1544
- #: ../admin/settings.php:404
1545
  msgid "Position"
1546
  msgstr "Position"
1547
 
1548
- #: ../admin/settings.php:424
1549
  msgid "Offset"
1550
  msgstr "Abstand"
1551
 
1552
- #: ../admin/settings.php:442
1553
  msgid "Use image as watermark"
1554
  msgstr "Benutze Bild als Wasserzeichen"
1555
 
1556
- #: ../admin/settings.php:445
1557
  msgid "URL to file"
1558
  msgstr "URL zur Datei"
1559
 
1560
- #: ../admin/settings.php:447
1561
  msgid "The accessing of URL files is disabled at your server (allow_url_fopen)"
1562
  msgstr "Der Dateizugriff von URL's ist auf diesem Server deaktiviert (allow_url_fopen)"
1563
 
1564
- #: ../admin/settings.php:453
1565
  msgid "Use text as watermark"
1566
  msgstr "Benutze Text als Wasserzeichen"
1567
 
1568
- #: ../admin/settings.php:456
1569
  msgid "Font"
1570
  msgstr "Schriftart"
1571
 
1572
- #: ../admin/settings.php:465
1573
  msgid "This function will not work, cause you need the FreeType library"
1574
  msgstr "Diese Funktion benötigt die FreeType Bibliothek"
1575
 
1576
- #: ../admin/settings.php:467
1577
  msgid "You can upload more fonts in the folder <strong>nggallery/fonts</strong>"
1578
  msgstr "Du kannst mehr Schriftarten in das Verzeichniss <strong>nggallery/fonts</strong> hochladen."
1579
 
1580
- #: ../admin/settings.php:471
1581
- msgid "Size"
1582
- msgstr "Größe"
1583
-
1584
- #: ../admin/settings.php:475
1585
  msgid "Color"
1586
  msgstr "Farbe"
1587
 
1588
- #: ../admin/settings.php:477
1589
  msgid "(hex w/o #)"
1590
  msgstr "(hex w/o #)"
1591
 
1592
- #: ../admin/settings.php:480
1593
  msgid "Text"
1594
  msgstr "Text"
1595
 
1596
- #: ../admin/settings.php:484
1597
  msgid "Opaque"
1598
  msgstr "Transparenz"
1599
 
1600
- #: ../admin/settings.php:502
1601
  msgid "The imagerotator.swf is not in the nggallery folder, the slideshow will not work."
1602
  msgstr "Die Datei imagerotator.swf ist nicht im Plugin Verzeichniss -> so wird die Slideshow nicht funktionieren."
1603
 
1604
- #: ../admin/settings.php:503
1605
  msgid "The settings are used in the JW Image Rotator Version"
1606
  msgstr "Die Einstellungen werden im JW Image Rotator benutzt , in der Version"
1607
 
1608
- #: ../admin/settings.php:504
1609
  msgid "See more information for the Flash Player on the web page"
1610
  msgstr "Weitere Informationen auf der Flash Player Homepage"
1611
 
1612
- #: ../admin/settings.php:507
1613
  msgid "Default size (W x H)"
1614
  msgstr "Standard Größe (B x H)"
1615
 
1616
- #: ../admin/settings.php:512
1617
  msgid "Shuffle mode"
1618
  msgstr "Shuffle Modus"
1619
 
1620
- #: ../admin/settings.php:516
1621
  msgid "Show next image on click"
1622
  msgstr "Zeige nächstes Bild bei Klick"
1623
 
1624
- #: ../admin/settings.php:520
1625
  msgid "Show navigation bar"
1626
  msgstr "Zeige Navigations-Leiste"
1627
 
1628
- #: ../admin/settings.php:524
1629
  msgid "Show loading icon"
1630
  msgstr "Zeige Lade-Bildchen"
1631
 
1632
- #: ../admin/settings.php:528
1633
  msgid "Use watermark logo"
1634
  msgstr "Wasserzeichen anzeigen"
1635
 
1636
- #: ../admin/settings.php:530
1637
  msgid "You can change the logo at the watermark settings"
1638
  msgstr "Du kannst den Pfad in Einstellungen für da Wasserzeichen angeben"
1639
 
1640
- #: ../admin/settings.php:533
1641
  msgid "Stretch image"
1642
  msgstr "Bild dehnen"
1643
 
1644
- #: ../admin/settings.php:536
1645
  msgid "true"
1646
  msgstr "Ja"
1647
 
1648
- #: ../admin/settings.php:537
1649
  msgid "false"
1650
  msgstr "Nein"
1651
 
1652
- #: ../admin/settings.php:538
1653
  msgid "fit"
1654
  msgstr "Passend"
1655
 
1656
- #: ../admin/settings.php:539
1657
  msgid "none"
1658
  msgstr "keiner"
1659
 
1660
- #: ../admin/settings.php:544
1661
  msgid "Duration time"
1662
  msgstr "Dauer"
1663
 
1664
- #: ../admin/settings.php:545
1665
  msgid "sec."
1666
  msgstr "Sek."
1667
 
1668
- #: ../admin/settings.php:548
1669
  msgid "Transition / Fade effect"
1670
  msgstr "Fade Effekt"
1671
 
1672
- #: ../admin/settings.php:551
1673
  msgid "fade"
1674
  msgstr "Fade"
1675
 
1676
- #: ../admin/settings.php:552
1677
  msgid "bgfade"
1678
  msgstr "BGFade"
1679
 
1680
- #: ../admin/settings.php:553
1681
  msgid "slowfade"
1682
  msgstr "Slowfade"
1683
 
1684
- #: ../admin/settings.php:554
1685
  msgid "circles"
1686
  msgstr "Kreise"
1687
 
1688
- #: ../admin/settings.php:555
1689
  msgid "bubbles"
1690
  msgstr "Blasen"
1691
 
1692
- #: ../admin/settings.php:556
1693
  msgid "blocks"
1694
  msgstr "Blöcke"
1695
 
1696
- #: ../admin/settings.php:557
1697
  msgid "fluids"
1698
  msgstr "Fluids"
1699
 
1700
- #: ../admin/settings.php:558
1701
  msgid "flash"
1702
  msgstr "Flash"
1703
 
1704
- #: ../admin/settings.php:559
1705
  msgid "lines"
1706
  msgstr "Linien"
1707
 
1708
- #: ../admin/settings.php:564
 
 
 
 
1709
  msgid "Use slow zooming effect"
1710
  msgstr "nutze Zoom Effekt"
1711
 
1712
- #: ../admin/settings.php:568
1713
  msgid "Background Color"
1714
  msgstr "Hintergrund (BG) Farbe"
1715
 
1716
- #: ../admin/settings.php:573
1717
  msgid "Texts / Buttons Color"
1718
  msgstr "Text- / Button Farbe"
1719
 
1720
- #: ../admin/settings.php:578
1721
  msgid "Rollover / Active Color"
1722
  msgstr "Rollover / Aktiv (Link) Farbe"
1723
 
1724
- #: ../admin/settings.php:583
1725
  msgid "Screen Color"
1726
  msgstr "Seiten Farbe"
1727
 
1728
- #: ../admin/settings.php:588
1729
  msgid "Background music (URL)"
1730
  msgstr "Hintergrundmusik (URL)"
1731
 
1732
- #: ../admin/settings.php:592
1733
  msgid "Try XHTML validation (with CDATA)"
1734
  msgstr "Integriere XHTML Validierung (mittels CDATA)"
1735
 
1736
- #: ../admin/settings.php:594
1737
  msgid "Important : Could causes problem at some browser. Please recheck your page."
1738
  msgstr "Wichtig : Es könnnten Probleme bei einigen Browser auftauchen. Unbedingt Seite prüfen."
1739
 
1740
- #: ../admin/setup.php:12
1741
  msgid "Reset all settings to default parameter"
1742
  msgstr "Stelle alle Einstellungen auf Anfangswerte zurück"
1743
 
1744
- #: ../admin/setup.php:37
1745
  msgid "Uninstall sucessfull ! Now delete the plugin and enjoy your life ! Good luck !"
1746
  msgstr "Deinstallation erfolgreich ! Nun kannst Du das Plugin löschen und Dein Leben weiterhin genießen ! Stay geeky ! Viel Glück !"
1747
 
1748
- #: ../admin/setup.php:46
1749
  msgid "Reset options"
1750
  msgstr "Optionen zurücksetzen"
1751
 
1752
- #: ../admin/setup.php:49
1753
  msgid "Reset all options/settings to the default installation."
1754
  msgstr "Alle Optionen/Einstellungen zurücksetzen"
1755
 
1756
- #: ../admin/setup.php:50
1757
  msgid "Reset settings"
1758
  msgstr "Einstellungen zurücksetzen"
1759
 
1760
- #: ../admin/setup.php:50
1761
  msgid ""
1762
  "Reset all options to default settings ?\\n"
1763
  "\\n"
@@ -1765,37 +1943,37 @@ msgid ""
1765
  msgstr ""
1766
  "Alle Optionen zu Standard zurücksetzen ?\\n"
1767
  "\\n"
1768
- "Wähle [Cancel] um abzubrechen, [OK] zum Durchführen.\\n"
1769
 
1770
- #: ../admin/setup.php:55
1771
  msgid "Uninstall plugin tables"
1772
  msgstr "Plugin Tabellen (DB) entfernen"
1773
 
1774
- #: ../admin/setup.php:58
1775
  msgid "You don't like NextGEN Gallery ?"
1776
  msgstr "Du magst die NextGEN Galerie nicht ?"
1777
 
1778
- #: ../admin/setup.php:59
1779
  msgid "No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextGEN Gallery does not remove any data that may have been created. "
1780
  msgstr "Null Problemo. Einfach nur vor dem Deaktivieren dieses Plugins den Uninstall-Button betätigen damit alle Tabellen der Galerie entfernt werden."
1781
 
1782
- #: ../admin/setup.php:60
1783
  msgid "WARNING:"
1784
  msgstr "WARNUNG:"
1785
 
1786
- #: ../admin/setup.php:61
1787
  msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables"
1788
- msgstr "Einmal deinstalliert -> keine Rückgängigmachung! D.h. auf Deutsch, das eine einmalig durchgeführte Deinstallation nicht mehr rückgängig gemacht werden kann da alle Tabellen der Galerie aus der Datenbank entfernt werden und KEIN Backup dieser Galerie-Tabellen angelegt wird währenddessen."
1789
 
1790
- #: ../admin/setup.php:61
1791
  msgid "and"
1792
  msgstr "und"
1793
 
1794
- #: ../admin/setup.php:63
1795
  msgid "Uninstall plugin"
1796
  msgstr "Plugin deinstallieren"
1797
 
1798
- #: ../admin/setup.php:63
1799
  msgid ""
1800
  "You are about to Uninstall this plugin from WordPress.\\n"
1801
  "This action is not reversible.\\n"
@@ -1807,123 +1985,249 @@ msgstr ""
1807
  "\\n"
1808
  "Wähle [Cancel] zum Abbrechen, [OK] zum Deinstallieren.\\n"
1809
 
1810
- #: ../admin/showmeta.php:7
1811
  #: ../admin/showmeta.php:10
 
1812
  msgid "Cheatin&#8217; uh?"
1813
  msgstr "Cheatin&#8217; uh?"
1814
 
1815
- #: ../admin/showmeta.php:42
1816
  msgid "EXIF Data"
1817
  msgstr "EXIF Daten"
1818
 
1819
- #: ../admin/showmeta.php:47
1820
- #: ../admin/showmeta.php:71
1821
- #: ../admin/showmeta.php:95
1822
  msgid "Tag"
1823
  msgstr "Stichwort"
1824
 
1825
- #: ../admin/showmeta.php:48
1826
- #: ../admin/showmeta.php:72
1827
- #: ../admin/showmeta.php:96
1828
  msgid "Value"
1829
  msgstr "Wert"
1830
 
1831
- #: ../admin/showmeta.php:61
1832
  msgid "No exif data"
1833
  msgstr "Keine Exif Daten"
1834
 
1835
- #: ../admin/showmeta.php:67
1836
  msgid "IPTC Data"
1837
  msgstr "IPTC Daten"
1838
 
1839
- #: ../admin/showmeta.php:91
1840
  msgid "XMP Data"
1841
  msgstr "XMP Daten"
1842
 
1843
- #: ../admin/sort.php:35
1844
- msgid "Sort order changed"
1845
- msgstr "Reihenfolge aktualisiert"
1846
 
1847
- #: ../admin/sort.php:53
1848
- msgid "Sort Gallery"
1849
- msgstr "Sortiere Bilder"
1850
-
1851
- #: ../admin/sort.php:58
1852
- msgid "Back to gallery"
1853
- msgstr "Zurück zur Galerie"
1854
-
1855
- #: ../admin/sort.php:59
1856
- msgid "Update Sort Order"
1857
- msgstr "Sortierung speichern"
1858
-
1859
- #: ../admin/style.php:34
1860
  msgid "You do not have sufficient permissions to edit templates for this blog."
1861
- msgstr "Du hast nicht die benötigten Rechte um Templates in diesem Blog zu bearbeiten."
1862
 
1863
- #: ../admin/style.php:43
1864
  msgid "CSS file successfully updated"
1865
  msgstr "CSS Datei erfolgreich aktualisiert"
1866
 
1867
- #: ../admin/style.php:66
 
 
 
 
1868
  msgid "Activate and use style sheet:"
1869
  msgstr "Aktiviere und nutze Stylesheet:"
1870
 
1871
- #: ../admin/style.php:85
1872
  msgid "Activate"
1873
  msgstr "Aktiviere"
1874
 
1875
- #: ../admin/style.php:93
1876
  #, php-format
1877
  msgid "Editing <strong>%s</strong>"
1878
  msgstr "Bearbeite <strong>%s</strong>"
1879
 
1880
- #: ../admin/style.php:95
1881
  #, php-format
1882
  msgid "Browsing <strong>%s</strong>"
1883
- msgstr "Browse <strong>%s</strong>"
1884
-
1885
- #: ../admin/style.php:100
1886
- msgid "Author"
1887
- msgstr "Autor"
1888
 
1889
- #: ../admin/style.php:101
1890
  msgid "Version"
1891
  msgstr "Version"
1892
 
1893
- #: ../admin/style.php:118
1894
- msgid "Update File &raquo;"
1895
- msgstr "Datei aktualisieren"
1896
 
1897
  #: ../admin/style.php:122
 
 
 
 
 
 
 
 
1898
  msgid "If this file were writable you could edit it."
1899
  msgstr "Wenn diese Datei beschreibbar wäre, könntest Du sie bearbeiten."
1900
 
1901
- #: ../admin/style.php:127
1902
  msgid "Oops, no such file exists! Double check the name and try again, merci."
1903
  msgstr "Oha, eine solche Datei existiert nicht! Bitte überprüfe den Namen und probiere es erneut, danke."
1904
 
1905
- #: ../admin/uploadtab.php:105
1906
- msgid "Select a gallery"
1907
- msgstr "Wähle Galerie"
1908
 
1909
- #: ../admin/uploadtab.php:107
1910
- #: ../admin/wp25/media-upload.php:127
1911
- msgid "No gallery"
1912
- msgstr "Keine Galerie"
 
 
 
 
 
 
 
 
 
 
 
1913
 
1914
- #: ../admin/uploadtab.php:172
1915
- #: ../admin/js/uploadtab.js.php:166
1916
- msgid "URL"
1917
- msgstr "URL"
1918
 
1919
- #: ../admin/uploadtab.php:185
1920
- #: ../admin/js/uploadtab.js.php:174
1921
- msgid "Delete File"
1922
- msgstr "Datei löschen"
1923
 
1924
- #: ../admin/uploadtab.php:185
1925
- msgid "Delete image ?"
1926
- msgstr "Bilder löschen ?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1927
 
1928
  #: ../admin/wpmu.php:41
1929
  msgid "General WordPress MU Settings"
@@ -1973,343 +2277,582 @@ msgstr "Standard CSS-Style"
1973
  msgid "Choose the default style for the galleries."
1974
  msgstr "Wähle das Default-Stylesheet für die Galerien"
1975
 
1976
- #: ../admin/js/uploadtab.js.php:86
1977
- #: ../admin/js/uploadtab.js.php:88
1978
- #: ../admin/js/uploadtab.js.php:149
1979
- #: ../admin/js/uploadtab.js.php:151
1980
- msgid "Browse your files"
1981
- msgstr "Durchsuche deine Dateien"
1982
-
1983
- #: ../admin/js/uploadtab.js.php:86
1984
- #: ../admin/js/uploadtab.js.php:88
1985
- #: ../admin/js/uploadtab.js.php:149
1986
- #: ../admin/js/uploadtab.js.php:151
1987
- msgid "&laquo; Back"
1988
- msgstr "&laquo; Zurück"
1989
-
1990
- #: ../admin/js/uploadtab.js.php:97
1991
- #: ../admin/js/uploadtab.js.php:160
1992
- msgid "Direct link to file"
1993
- msgstr "Link zur Datei"
1994
-
1995
- #: ../admin/js/uploadtab.js.php:107
1996
- #: ../admin/wp25/media-upload.php:209
1997
- msgid "Full size"
1998
- msgstr "Volle Größe"
1999
-
2000
- #: ../admin/js/uploadtab.js.php:110
2001
- msgid "Show:"
2002
- msgstr "Zeige als:"
2003
-
2004
- #: ../admin/js/uploadtab.js.php:115
2005
- msgid "Link to:"
2006
- msgstr "Link zu:"
2007
-
2008
- #: ../admin/js/uploadtab.js.php:116
2009
- msgid "File"
2010
- msgstr "Datei"
2011
-
2012
- #: ../admin/js/uploadtab.js.php:121
2013
- msgid "Send to editor &raquo;"
2014
- msgstr "Zum Editor schicken &raquo;"
2015
-
2016
- #: ../admin/js/uploadtab.js.php:156
2017
- msgid "Insert"
2018
- msgstr "Einfügen"
2019
-
2020
- #: ../admin/js/uploadtab.js.php:180
2021
- msgid "Save &raquo;"
2022
- msgstr "Speichern &raquo;"
2023
-
2024
- #: ../admin/js/uploadtab.js.php:259
2025
- #, php-format
2026
- msgid ""
2027
- "Are you sure you want to delete the file '%s'?\n"
2028
- "Click ok to delete or cancel to go back."
2029
- msgstr "Bist du sicher das Du diese Datei '%s' löschen willst ?"
2030
-
2031
- #: ../admin/wp25/about.php:31
2032
- msgid "To help people to work with this plugin, I would like to have it in all available languages"
2033
- msgstr "Um jedem das Arbeiten mit diesem Plugin zu vereinfachen würde ich es gerne in allen verfügbaren Sprachen anbieten"
2034
-
2035
- #: ../admin/wp25/about.php:43
2036
- msgid "No doubt a very useful and easy motivation :-)"
2037
- msgstr "Kein Zweifel, eine schöne und simple Motivationshilfe"
2038
-
2039
- #: ../admin/wp25/addgallery.php:236
2040
- msgid "Import a folder with all images."
2041
- msgstr "Importiere ein Verzeichniss mit Bildern."
2042
-
2043
- #: ../admin/wp25/addgallery.php:237
2044
- msgid " Please note : For safe-mode = ON you need to add the subfolder thumbs manually"
2045
- msgstr "Achtung : Da der Safe-Mode (PHP.INI) eingeschaltet ist, mußt Du das Unterverzeichnis für die Vorschaubilder (\"thumbs\") manuell (per FTP) anlegen"
2046
 
2047
- #: ../admin/wp25/media-upload.php:139
2048
- msgid "Select Gallery &#187;"
2049
- msgstr "Wähle Galerie &#187;"
2050
 
2051
- #: ../admin/wp25/media-upload.php:170
2052
- msgid "Show"
2053
- msgstr "Zeige"
 
2054
 
2055
- #: ../admin/wp25/media-upload.php:171
2056
- msgid "Hide"
2057
- msgstr "Verstecke"
2058
 
2059
- #: ../admin/wp25/media-upload.php:176
2060
- msgid "Image ID:"
2061
- msgstr "Bilder ID:"
2062
 
2063
- #: ../admin/wp25/media-upload.php:182
2064
- msgid "Alt/Title text"
2065
- msgstr "Alt / Titel Text"
2066
-
2067
- #: ../admin/wp25/media-upload.php:190
2068
- msgid "Alignment"
2069
- msgstr "Ausrichtung"
2070
 
2071
- #: ../admin/wp25/media-upload.php:195
2072
- msgid "Left"
2073
- msgstr "Links"
2074
 
2075
- #: ../admin/wp25/media-upload.php:197
2076
- msgid "Center"
2077
- msgstr "Zentrieren"
2078
 
2079
- #: ../admin/wp25/media-upload.php:199
2080
- msgid "Right"
2081
- msgstr "Rechts"
2082
 
2083
- #: ../admin/wp25/media-upload.php:211
2084
- msgid "Singlepic"
2085
- msgstr "Einzelbilder"
2086
 
2087
- #: ../admin/wp25/media-upload.php:219
2088
- msgid "Insert into Post"
2089
- msgstr "In Beitrag einfügen"
2090
 
2091
- #: ../admin/wp25/media-upload.php:228
2092
- msgid "Save all changes"
2093
- msgstr "Änderungen Speichern"
2094
 
2095
- #: ../admin/wp25/overview.php:35
2096
- msgid "Welcome to NextGEN Gallery !"
2097
- msgstr "Willkomen bei NextGEN Gallery"
2098
 
2099
- #: ../admin/wp25/overview.php:36
2100
- msgid "Upload pictures"
2101
- msgstr "Bilder hochladen"
2102
 
2103
- #: ../admin/wp25/overview.php:37
2104
- msgid "Manage galleries"
2105
- msgstr "Galerie verwalten"
2106
 
2107
- #: ../admin/wp25/overview.php:55
2108
- #, php-format
2109
- msgid "Here you can control your images, galleries and albums. You currently have %s rights."
2110
- msgstr "Hier kannst Du Deine Bilder, Galerien und Alben verwalten. Du hast im Moment %s Rechte."
2111
 
2112
- #: ../admin/wp25/style.php:65
2113
- msgid "Style Editor"
2114
- msgstr "CSS Editor"
2115
 
2116
- #: ../lib/nggmeta.lib.php:83
2117
  msgid " mm"
2118
  msgstr " mm"
2119
 
2120
- #: ../lib/nggmeta.lib.php:89
2121
  msgid " sec"
2122
  msgstr " Sek."
2123
 
2124
- #: ../lib/nggmeta.lib.php:366
 
2125
  msgid "Aperture"
2126
  msgstr "Blende"
2127
 
2128
- #: ../lib/nggmeta.lib.php:367
2129
- #: ../lib/nggmeta.lib.php:392
2130
  msgid "Credit"
2131
  msgstr "Autor"
2132
 
2133
- #: ../lib/nggmeta.lib.php:368
2134
  msgid "Camera"
2135
  msgstr "Kamera"
2136
 
2137
- #: ../lib/nggmeta.lib.php:369
2138
  msgid "Caption"
2139
  msgstr "Beschreibung"
2140
 
2141
- #: ../lib/nggmeta.lib.php:370
2142
- msgid "Date/Time"
2143
- msgstr "Datum/Zeit"
2144
-
2145
- #: ../lib/nggmeta.lib.php:371
2146
  msgid "Copyright"
2147
  msgstr "Rechte"
2148
 
2149
- #: ../lib/nggmeta.lib.php:372
2150
  msgid "Focal length"
2151
  msgstr "Brennweite"
2152
 
2153
- #: ../lib/nggmeta.lib.php:373
2154
  msgid "ISO"
2155
  msgstr "ISO"
2156
 
2157
- #: ../lib/nggmeta.lib.php:374
 
2158
  msgid "Shutter speed"
2159
  msgstr "Belichtungszeit"
2160
 
2161
- #: ../lib/nggmeta.lib.php:378
2162
  msgid "Subject"
2163
  msgstr "Betreff"
2164
 
2165
- #: ../lib/nggmeta.lib.php:379
2166
  msgid "Make"
2167
  msgstr "Hersteller"
2168
 
2169
- #: ../lib/nggmeta.lib.php:380
2170
  msgid "Edit Status"
2171
  msgstr "Ändere Status"
2172
 
2173
- #: ../lib/nggmeta.lib.php:381
2174
  msgid "Category"
2175
  msgstr "Kategorie"
2176
 
2177
- #: ../lib/nggmeta.lib.php:382
2178
  msgid "Keywords"
2179
  msgstr "Schlüsselwörter"
2180
 
2181
- #: ../lib/nggmeta.lib.php:383
2182
  msgid "Date Created"
2183
  msgstr "erstellt (Datum)"
2184
 
2185
- #: ../lib/nggmeta.lib.php:384
2186
  msgid "Time Created"
2187
  msgstr "erstellt (Zeit)"
2188
 
2189
- #: ../lib/nggmeta.lib.php:385
2190
  msgid "Author Position"
2191
  msgstr "Autor Position"
2192
 
2193
- #: ../lib/nggmeta.lib.php:386
2194
  msgid "City"
2195
  msgstr "Stadt"
2196
 
2197
- #: ../lib/nggmeta.lib.php:387
2198
  msgid "Location"
2199
  msgstr "Ort"
2200
 
2201
- #: ../lib/nggmeta.lib.php:388
2202
  msgid "Province/State"
2203
  msgstr "Staat / PLZ"
2204
 
2205
- #: ../lib/nggmeta.lib.php:389
2206
  msgid "Country code"
2207
  msgstr "Landescode"
2208
 
2209
- #: ../lib/nggmeta.lib.php:390
2210
  msgid "Country"
2211
  msgstr "Land"
2212
 
2213
- #: ../lib/nggmeta.lib.php:391
2214
  msgid "Headline"
2215
  msgstr "Kopfzeile"
2216
 
2217
- #: ../lib/nggmeta.lib.php:393
2218
  msgid "Source"
2219
  msgstr "Quelle"
2220
 
2221
- #: ../lib/nggmeta.lib.php:394
2222
  msgid "Copyright Notice"
2223
  msgstr "Copyright Hinweise / Credits"
2224
 
2225
- #: ../lib/nggmeta.lib.php:395
2226
  msgid "Contact"
2227
  msgstr "Kontakt"
2228
 
2229
- #: ../lib/nggmeta.lib.php:396
2230
  msgid "Last modified"
2231
  msgstr "Zuletzt geändert"
2232
 
2233
- #: ../lib/nggmeta.lib.php:397
2234
  msgid "Program tool"
2235
  msgstr "Programm"
2236
 
2237
- #: ../lib/nggmeta.lib.php:398
2238
  msgid "Format"
2239
  msgstr "Format"
2240
 
2241
- #: ../tinymce/window.php:47
2242
- #: ../tinymce3/window.php:47
2243
- msgid "Select gallery"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2244
  msgstr "Wähle Galerie"
2245
 
2246
- #: ../tinymce/window.php:61
2247
- #: ../tinymce/window.php:88
2248
- #: ../tinymce3/window.php:61
2249
- #: ../tinymce3/window.php:88
2250
- msgid "Show as"
2251
- msgstr "Zeige als"
2252
 
2253
- #: ../tinymce/window.php:62
2254
- #: ../tinymce3/window.php:62
2255
- msgid "Image list"
2256
- msgstr "Bilder-Liste"
2257
 
2258
- #: ../tinymce/window.php:76
2259
- #: ../tinymce3/window.php:76
2260
- msgid "No album"
2261
- msgstr "Kein Album"
2262
 
2263
- #: ../tinymce/window.php:89
2264
- #: ../tinymce3/window.php:89
2265
- msgid "Extended version"
2266
- msgstr "Erweiterte Version"
2267
 
2268
- #: ../tinymce/window.php:90
2269
- #: ../tinymce3/window.php:90
2270
- msgid "Compact version"
2271
- msgstr "Kompakte Version"
2272
 
2273
- #: ../tinymce/window.php:101
2274
- #: ../tinymce3/window.php:101
2275
- msgid "Select picture"
2276
- msgstr "Wähle Bild"
2277
 
2278
- #: ../tinymce/window.php:103
2279
- #: ../tinymce3/window.php:103
2280
- msgid "No picture"
2281
- msgstr "Kein Bild"
2282
 
2283
- #: ../tinymce/window.php:115
2284
- #: ../tinymce3/window.php:115
2285
- msgid "Width x Height"
2286
- msgstr "Breite x Höhe"
2287
 
2288
- #: ../tinymce/window.php:119
2289
- #: ../tinymce3/window.php:119
2290
- msgid "Effect"
2291
- msgstr "Effekt"
2292
 
2293
- #: ../tinymce/window.php:122
2294
- #: ../tinymce3/window.php:122
2295
- msgid "No effect"
2296
- msgstr "Kein Effekt"
2297
 
2298
- #: ../tinymce/window.php:124
2299
- #: ../tinymce3/window.php:124
2300
- msgid "Web 2.0"
2301
- msgstr "Web 2.0"
2302
 
2303
- #: ../tinymce/window.php:129
2304
- #: ../tinymce3/window.php:129
2305
- msgid "Float"
2306
- msgstr "Float"
2307
 
2308
- #: ../tinymce/window.php:132
2309
- #: ../tinymce3/window.php:132
2310
- msgid "No float"
2311
- msgstr "Kein Float"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2312
 
2313
- #~ msgid "Edit gallery"
2314
- #~ msgstr "Galerie ändern"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2315
 
2
  msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-12-07 12:16+0100\n"
6
+ "PO-Revision-Date: 2008-12-07 12:16+0100\n"
7
+ "Last-Translator: Alex Rabe <no@email.com>\n"
8
  "Language-Team: Alex Rabe\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2\n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-Country: GERMANY\n"
15
  "X-Poedit-SourceCharset: utf-8\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Poedit-Language: German\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPath-1: ..\n"
20
 
21
+ #: ../nggallery.php:151
 
 
 
 
22
  msgid "Sorry, NextGEN Gallery works only with a Memory Limit of 16 MB higher"
23
+ msgstr "Tut mir leid, aber NextGEN Galerie benötigt minimum 16MB Speicher (Memory Limit) oder mehr"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
+ #: ../nggallery.php:178
26
+ msgid "Picture tag"
27
+ msgstr "Bilder Stichwort"
28
 
29
+ #: ../nggallery.php:179
30
+ msgid "Picture tag: %2$l."
31
+ msgstr "Bilder Stichwort: %2$l."
32
 
33
+ #: ../nggallery.php:180
34
+ msgid "Separate picture tags with commas."
35
+ msgstr "Trenne Stichwörter mittels Komma"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ #: ../nggallery.php:274
38
+ msgid "L O A D I N G"
39
+ msgstr "B I T T E W A R T E N"
 
 
 
 
 
40
 
41
+ #: ../nggallery.php:275
42
+ msgid "Click to Close"
43
+ msgstr "Klicken zum Schliessen "
44
 
45
+ #: ../nggfunctions.php:32
46
+ msgid "The <a href=\"http://www.macromedia.com/go/getflashplayer\">Flash Player</a> and <a href=\"http://www.mozilla.com/firefox/\">a browser with Javascript support</a> are needed.."
47
+ msgstr "Es wird der <a href=\"http://www.macromedia.com/go/getflashplayer\">Adobe Flash Player</a> benötigt und <a href=\"http://www.mozilla.com/firefox/\">im Browser muss Javascript</a> aktiviert sein.."
48
 
49
+ #: ../nggfunctions.php:95
50
+ #: ../nggfunctions.php:387
51
+ msgid "[Gallery not found]"
52
+ msgstr "[Galerie nicht gefunden]"
53
 
54
+ #: ../nggfunctions.php:274
55
+ msgid "[Album not found]"
56
+ msgstr "[Album nicht gefunden]"
57
 
58
+ #: ../nggfunctions.php:489
59
+ msgid "[SinglePic not found]"
60
+ msgstr "[Bild nicht gefunden]"
61
 
62
+ #: ../nggfunctions.php:608
63
+ msgid "Related images for"
64
+ msgstr "Verwandte Bilder von"
65
 
66
+ #: ../nggfunctions.php:643
67
+ #: ../admin/admin.php:30
68
+ msgid "Overview"
69
+ msgstr "Übersicht"
70
 
71
  #: ../admin/about.php:9
72
  msgid "Copyright notes / Credits"
73
  msgstr "Copyright Hinweise / Credits"
74
 
75
+ #: ../admin/about.php:10
76
  msgid "NextGEN DEV Team"
77
  msgstr "NextGEN DEV Team"
78
 
79
+ #: ../admin/about.php:11
80
  msgid "This plugin is primarily developed, maintained, supported, documented by"
81
  msgstr "Dieses Plugin wird hauptsächlich entwickelt, dokumentiert und supportet von"
82
 
83
+ #: ../admin/about.php:11
84
  msgid "There are many other folks who have made contributions to this project :"
85
  msgstr "Folgende Personen haben die Entwicklung bisher unterstützt :"
86
 
87
+ #: ../admin/about.php:13
88
  msgid "Contributors / Tribute to"
89
  msgstr "Anerkennung / Hinweise"
90
 
91
+ #: ../admin/about.php:14
92
  msgid "If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together."
93
  msgstr "Falls Du Dir den Sourcecode dieses Plugins ansiehst wirst Du merken, das wir verschiedene gute Scripte sowie Ideen verwendet haben."
94
 
95
+ #: ../admin/about.php:15
96
  msgid "So, we would like to thank the following people for their pioneer work (without this work it's impossible to create such a plugin so fast)"
97
  msgstr "Wir möchten folgenden Menschen für Ihre Pionier-Arbeit danken (ohne diese Vorleistung wäre es unmöglich ein Plugin so schnell zu entwickeln)"
98
 
99
+ #: ../admin/about.php:17
100
  msgid "for their great documented code"
101
  msgstr "für Ihren großartig dokumentierten Code"
102
 
103
+ #: ../admin/about.php:18
104
  msgid "for jQuery, which is the best Web2.0 framework"
105
+ msgstr "für jQuery, das Beste Web 2.0 Framework"
106
 
107
+ #: ../admin/about.php:19
108
  msgid "for the fantastic PHP Thumbnail Class"
109
  msgstr "für die fantastische PHP Thumbnail Klasse"
110
 
111
+ #: ../admin/about.php:20
112
  msgid "for PclZip , a PHP library that manage ZIP archives"
113
  msgstr "für PclZip, eine ZIP PHP Library"
114
 
115
+ #: ../admin/about.php:21
116
  msgid "for a lot of very useful plugins and ideas"
117
  msgstr "für viele nützliche Plugins und Ideen"
118
 
119
+ #: ../admin/about.php:22
120
+ msgid "for Shutter Reloaded, a real lightweight image effect"
121
+ msgstr "für Shutter Reloaded, ein wirklich smarten Bildeffekt"
122
 
123
+ #: ../admin/about.php:23
124
  msgid "for the best Media Flash Scripts on earth"
125
  msgstr "für die besten Media Flash Scripte"
126
 
127
+ #: ../admin/about.php:24
128
+ msgid "for the Fugue Iconset"
129
+ msgstr "für das Fugue Iconset"
130
+
131
  #: ../admin/about.php:25
132
  msgid "for the Watermark plugin"
133
  msgstr "für das Wasserzeichen Plugin"
134
 
135
  #: ../admin/about.php:27
136
  msgid "If you didn't find your name on this list and there is some code which I integrate in my plugin, don't hesitate to send me a mail."
137
+ msgstr "Falls Du deinen Namen nicht auf dieser Liste findest und es aber Code gibt, den ich in meinem Plugin verwendet habe, so schicken mir bitte sofort eine EMail."
138
 
139
  #: ../admin/about.php:28
140
  msgid "How to support ?"
157
  msgstr "Übersetze das Plugin"
158
 
159
  #: ../admin/about.php:32
160
+ msgid "To help people to work with this plugin, I would like to have it in all available languages"
161
+ msgstr "Um jedem das Arbeiten mit diesem Plugin zu vereinfachen, würde ich es gerne in allen möglichen Sprachen anbieten"
162
 
163
  #: ../admin/about.php:33
164
  msgid "Donate the work via paypal"
165
  msgstr "Zeig Dich für diese Arbeit per PayPal dankbar"
166
 
167
  #: ../admin/about.php:44
168
+ msgid "No doubt a very useful and easy motivation :-)"
169
+ msgstr "Kein Zweifel, eine schöne und einfache Motivationshilfe"
170
 
171
  #: ../admin/about.php:46
172
  msgid "Place a link to the plugin in your blog/webpage"
182
 
183
  #: ../admin/about.php:49
184
  msgid "We would like to thank this people which support us in the work :"
185
+ msgstr "Ich möchte mich bei diesen Menschen für Ihre Unterstützung bedanken:"
186
 
187
+ #: ../admin/addgallery.php:34
188
+ #: ../admin/addgallery.php:50
189
  msgid "Upload failed!"
190
  msgstr "Upload fehlgeschlagen!"
191
 
192
+ #: ../admin/addgallery.php:55
193
+ #: ../admin/functions.php:548
194
+ #: ../admin/functions.php:638
195
  msgid "No gallery selected !"
196
  msgstr "Keine Galerie ausgewählt !"
197
 
198
+ #: ../admin/addgallery.php:102
199
  msgid "Image Files"
200
  msgstr "Bilder"
201
 
202
+ #: ../admin/addgallery.php:121
203
+ #: ../admin/addgallery.php:151
204
  msgid "remove"
205
  msgstr "Entfernen"
206
 
207
+ #: ../admin/addgallery.php:122
208
  msgid "Browse..."
209
  msgstr "Durchsuche..."
210
 
211
+ #: ../admin/addgallery.php:123
212
+ #: ../admin/addgallery.php:271
213
  msgid "Upload images"
214
  msgstr "Bilder hochladen"
215
 
216
+ #: ../admin/addgallery.php:167
217
+ #: ../admin/addgallery.php:179
218
  msgid "Add new gallery"
219
  msgstr "Neue Galerie erstellen"
220
 
221
+ #: ../admin/addgallery.php:169
222
+ #: ../admin/addgallery.php:198
223
  msgid "Upload a Zip-File"
224
  msgstr "Zip-Datei hochladen"
225
 
226
+ #: ../admin/addgallery.php:172
227
+ #: ../admin/addgallery.php:227
228
  msgid "Import image folder"
229
  msgstr "Bilder-Verzeichnis importieren"
230
 
231
+ #: ../admin/addgallery.php:174
232
+ #: ../admin/addgallery.php:244
233
  msgid "Upload Images"
234
  msgstr "Bilder hochladen"
235
 
236
+ #: ../admin/addgallery.php:184
237
  msgid "New Gallery"
238
  msgstr "Neue Galerie"
239
 
240
+ #: ../admin/addgallery.php:187
241
  msgid "Create a new , empty gallery below the folder"
242
  msgstr "Erstelle eine neue, leere Galerie unter dem Verzeichnis"
243
 
244
+ #: ../admin/addgallery.php:189
245
  msgid "Allowed characters for file and folder names are"
246
  msgstr "Erlaubte Charaktere für die Datei- und Verzeichnisnamen sind"
247
 
248
+ #: ../admin/addgallery.php:192
249
  msgid "Add gallery"
250
  msgstr "Galerie hinzufügen"
251
 
252
+ #: ../admin/addgallery.php:203
253
  msgid "Select Zip-File"
254
  msgstr "Wähle Zip-Datei"
255
 
256
+ #: ../admin/addgallery.php:205
257
  msgid "Upload a zip file with images"
258
  msgstr "Lade eine Zip-Datei mit Bildern hoch"
259
 
260
+ #: ../admin/addgallery.php:208
261
+ #: ../admin/addgallery.php:253
262
  msgid "in to"
263
  msgstr "in"
264
 
265
+ #: ../admin/addgallery.php:210
266
  msgid "a new gallery"
267
  msgstr "eine neue Galerie"
268
 
269
+ #: ../admin/addgallery.php:216
270
+ #: ../admin/addgallery.php:261
271
  msgid "Note : The upload limit on your server is "
272
  msgstr "Hinweis : Das Upload-Limit auf dem Server beträgt "
273
 
274
+ #: ../admin/addgallery.php:220
 
 
 
 
 
 
 
 
 
 
 
 
275
  msgid "Start upload"
276
  msgstr "Upload starten"
277
 
278
+ #: ../admin/addgallery.php:232
279
  msgid "Import from Server path:"
280
  msgstr "Importieren aus Server-Pfad:"
281
 
282
+ #: ../admin/addgallery.php:234
283
+ msgid "Import a folder with all images."
284
+ msgstr "Importiere ein Verzeichniss mit Bildern."
285
 
286
+ #: ../admin/addgallery.php:235
287
+ msgid " Please note : For safe-mode = ON you need to add the subfolder thumbs manually"
288
+ msgstr "Achtung : Da der Safe-Mode (PHP.INI) eingeschaltet ist, mußt Du das Unterverzeichnis für die Vorschaubilder (\"thumbs\") manuell (per FTP) anlegen"
289
 
290
+ #: ../admin/addgallery.php:238
291
  msgid "Import folder"
292
  msgstr "Verzeichnis importieren"
293
 
294
+ #: ../admin/addgallery.php:249
295
  msgid "Upload image"
296
  msgstr "Bild hochladen"
297
 
298
+ #: ../admin/addgallery.php:255
299
  msgid "Choose gallery"
300
  msgstr "Wähle Galerie"
301
 
302
+ #: ../admin/addgallery.php:267
303
  msgid "The batch upload requires Adobe Flash 9, disable it if you have problems"
304
  msgstr "Das Batch-Upload-Skript benötigt Adbode Flash 9, wenn es Probleme gibt deaktiviere es besser."
305
 
306
+ #: ../admin/addgallery.php:267
307
  msgid "Disable flash upload"
308
  msgstr "Deaktiviere Batch-Upload"
309
 
310
+ #: ../admin/addgallery.php:269
311
  msgid "Upload multiple files at once by ctrl/shift-selecting in dialog"
312
  msgstr "Wähle im Dialog mit Ctrl/Shift mehrere Bilder gleichzeitig aus."
313
 
314
+ #: ../admin/addgallery.php:269
315
  msgid "Enable flash based upload"
316
+ msgstr "Aktiviere Flash Batch Upload"
317
+
318
+ #: ../admin/admin.php:29
319
+ #: ../admin/admin.php:200
320
+ #: ../admin/functions.php:81
321
+ #: ../admin/functions.php:142
322
+ #: ../admin/manage-images.php:120
323
+ #: ../admin/manage.php:84
 
324
  msgid "Gallery"
325
+ msgid_plural "Galleries"
326
+ msgstr[0] "Galerie"
327
+ msgstr[1] "Galerien"
328
 
329
+ #: ../admin/admin.php:31
330
+ msgid "Add Gallery / Images"
331
+ msgstr "Galerie / Bilder hinzufügen"
332
 
333
+ #: ../admin/admin.php:32
334
  msgid "Manage Gallery"
335
  msgstr "Galerie verwalten"
336
 
337
+ #: ../admin/admin.php:33
338
  msgid "Album"
339
+ msgid_plural "Albums"
340
+ msgstr[0] "Album"
341
+ msgstr[1] "Alben"
342
 
343
+ #: ../admin/admin.php:34
344
+ msgid "Tags"
345
+ msgstr "Stichwörter"
346
+
347
+ #: ../admin/admin.php:35
348
  msgid "Options"
349
  msgstr "Optionen"
350
 
351
+ #: ../admin/admin.php:37
352
  msgid "Style"
353
  msgstr "Style"
354
 
355
+ #: ../admin/admin.php:38
356
  msgid "Setup Gallery"
357
  msgstr "Galerie Setup"
358
 
359
+ #: ../admin/admin.php:38
360
  msgid "Setup"
361
  msgstr "Setup"
362
 
363
+ #: ../admin/admin.php:40
364
  msgid "Roles"
365
  msgstr "Zugriff"
366
 
367
+ #: ../admin/admin.php:41
368
  msgid "About this Gallery"
369
  msgstr "Über diese Galerie"
370
 
371
+ #: ../admin/admin.php:41
372
  msgid "About"
373
  msgstr "Über"
374
 
375
+ #: ../admin/admin.php:43
376
  msgid "NextGEN Gallery"
377
  msgstr "NextGEN Gallery"
378
 
379
+ #: ../admin/admin.php:68
380
+ msgid "A new version of NextGEN Gallery is available !"
381
+ msgstr "Eine neue Version von NextGEN Gallery ist jetzt verfügbar"
382
+
383
+ #: ../admin/admin.php:68
384
+ msgid "Download here"
385
+ msgstr "Hier downloaden"
386
+
387
+ #: ../admin/admin.php:139
388
+ msgid "You do not have the correct permission"
389
+ msgstr "Du hast keine Zugriffsrechte"
390
+
391
+ #: ../admin/admin.php:140
392
+ msgid "Unexpected Error"
393
+ msgstr "Unerwarteter Fehler"
394
+
395
+ #: ../admin/admin.php:141
396
+ msgid "A failure occurred"
397
+ msgstr "Ein Fehler ist aufgetreten"
398
+
399
+ #: ../admin/admin.php:204
400
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Introduction</a>"
401
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Einführung</a>"
402
+
403
+ #: ../admin/admin.php:207
404
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Setup</a>"
405
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Setup</a>"
406
+
407
+ #: ../admin/admin.php:210
408
+ msgid "<a href=\"http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/languages/\" target=\"_blank\">Translation by alex rabe</a>"
409
+ msgstr "<a href=\"http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/languages/\" target=\"_blank\">Unterstütze bei der Übersetzung</a>"
410
+
411
+ #: ../admin/admin.php:213
412
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Roles / Capabilities</a>"
413
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Einführung</a>"
414
+
415
+ #: ../admin/admin.php:216
416
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Styles</a>"
417
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Einführung</a>"
418
+
419
+ #: ../admin/admin.php:217
420
+ msgid "Templates"
421
+ msgstr "Vorlagen"
422
+
423
+ #: ../admin/admin.php:220
424
+ #: ../admin/admin.php:224
425
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Gallery management</a>"
426
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Einführung</a>"
427
+
428
+ #: ../admin/admin.php:221
429
+ msgid "Gallery example"
430
+ msgstr "Galerie Beispiel"
431
+
432
+ #: ../admin/admin.php:225
433
+ #: ../admin/admin.php:235
434
+ msgid "Gallery tags"
435
+ msgstr "Galerie Stichwörter"
436
+
437
+ #: ../admin/admin.php:228
438
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Album management</a>"
439
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Einführung</a>"
440
+
441
+ #: ../admin/admin.php:229
442
+ msgid "Album example"
443
+ msgstr "Album Beispiel"
444
+
445
+ #: ../admin/admin.php:230
446
+ #: ../admin/admin.php:236
447
+ msgid "Album tags"
448
+ msgstr "Album Stichwörter"
449
+
450
+ #: ../admin/admin.php:233
451
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Gallery tags</a>"
452
+ msgstr "<a href=\"http://www.curlyrob.de/curlyrob/?page_id=129\" target=\"_blank\">Einführung</a>"
453
+
454
+ #: ../admin/admin.php:234
455
+ msgid "Related images"
456
+ msgstr "Verwandte Bilder"
457
+
458
+ #: ../admin/admin.php:239
459
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-image-management/\" target=\"_blank\">Image management</a>"
460
+ msgstr "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-image-management/\" target=\"_blank\">Bilderverwaltung (Englisch)</a>"
461
+
462
+ #: ../admin/admin.php:240
463
+ msgid "Custom fields"
464
+ msgstr "Spezialfelder"
465
+
466
+ #: ../admin/admin.php:245
467
+ msgid "Get help with NextGEN Gallery"
468
+ msgstr "Weitere Hilfe zu NextGEN Gallery"
469
+
470
+ #: ../admin/admin.php:249
471
+ msgid "More Help & Info"
472
+ msgstr "Weitere Hilfe & Informationen"
473
+
474
+ #: ../admin/admin.php:251
475
+ msgid "<a href=\"http://wordpress.org/tags/nextgen-gallery\" target=\"_blank\">Support Forums</a>"
476
+ msgstr "<a href=\"http://wordpress.org/tags/nextgen-gallery\" target=\"_blank\">Support Forum (Englisch)</a>"
477
+
478
+ #: ../admin/admin.php:252
479
+ msgid "FAQ"
480
+ msgstr "FAQ (englisch)"
481
+
482
+ #: ../admin/admin.php:253
483
+ msgid "Feature request"
484
+ msgstr "Wünsch dir was"
485
+
486
+ #: ../admin/admin.php:254
487
+ msgid "Get your language pack"
488
+ msgstr "Lade deine Sprachdatei"
489
+
490
+ #: ../admin/admin.php:255
491
+ msgid "Contribute development"
492
+ msgstr "Entwicklung helfen"
493
+
494
+ #: ../admin/admin.php:256
495
+ msgid "Download latest version"
496
+ msgstr "Aktuelle Version downloaden"
497
+
498
  #: ../admin/album.php:19
499
+ #: ../admin/album.php:31
500
  msgid "Update Successfully"
501
  msgstr "Update erfolgreich"
502
 
503
+ #: ../admin/album.php:40
504
  msgid "Album deleted"
505
  msgstr "Album gelöscht"
506
 
507
+ #: ../admin/album.php:125
508
  msgid "Manage Albums"
509
  msgstr "Verwalte Alben"
510
 
511
+ #: ../admin/album.php:131
512
  msgid "Select album"
513
  msgstr "Wähle Album"
514
 
515
+ #: ../admin/album.php:133
516
  msgid "No album selected"
517
  msgstr "Kein Album ausgewählt"
518
 
519
+ #: ../admin/album.php:146
520
+ msgid "Update"
521
+ msgstr "Aktualisiere"
522
 
523
+ #: ../admin/album.php:147
524
+ #: ../admin/manage-galleries.php:54
525
+ #: ../admin/manage-images.php:377
526
  msgid "Delete"
527
  msgstr "Lösche"
528
 
529
+ #: ../admin/album.php:147
530
  msgid "Delete album ?"
531
+ msgstr "Album löschen ?"
532
+
533
+ #: ../admin/album.php:149
534
+ msgid "Add new album"
535
+ msgstr "Album hinzufügen"
536
 
537
  #: ../admin/album.php:150
538
+ msgid "Add"
539
+ msgstr "Hinzufügen"
 
 
 
 
 
 
 
540
 
541
  #: ../admin/album.php:158
542
  msgid "[Show all]"
566
  msgid "No album selected!"
567
  msgstr "Kein Album ausgewählt"
568
 
569
+ #: ../admin/album.php:254
570
+ #: ../admin/manage-galleries.php:17
571
+ #: ../admin/manage-images.php:473
572
  msgid "ID"
573
  msgstr "ID"
574
 
575
+ #: ../admin/album.php:255
576
  msgid "Name"
577
  msgstr "Name"
578
 
579
+ #: ../admin/album.php:256
580
+ #: ../admin/manage-galleries.php:18
581
+ #: ../admin/manage-images.php:136
582
  msgid "Title"
583
  msgstr "Titel"
584
 
585
+ #: ../admin/album.php:257
586
  msgid "Page"
587
  msgstr "Seite"
588
 
589
+ #: ../admin/functions.php:23
590
  msgid "No valid gallery name!"
591
  msgstr "Kein gültiger Galerie-Name!"
592
 
593
+ #: ../admin/functions.php:30
594
+ #: ../admin/functions.php:39
595
+ #: ../admin/functions.php:53
596
+ #: ../admin/functions.php:116
597
+ #: ../admin/functions.php:123
598
  msgid "Directory"
599
  msgstr "Verzeichnis"
600
 
601
+ #: ../admin/functions.php:30
602
  msgid "didn't exist. Please create first the main gallery folder "
603
  msgstr "nicht gefunden. Bitte erstelle zuerst das Hauptverzeichnis."
604
 
605
+ #: ../admin/functions.php:31
606
+ #: ../admin/functions.php:40
607
  msgid "Check this link, if you didn't know how to set the permission :"
608
  msgstr "Dieser Link zeigt dir wie man Verzeichnisrechte ändert :"
609
 
610
+ #: ../admin/functions.php:39
611
+ #: ../admin/functions.php:53
612
  msgid "is not writeable !"
613
  msgstr "ist schreibgeschützt !"
614
 
615
+ #: ../admin/functions.php:48
616
+ #: ../admin/functions.php:58
617
+ #: ../admin/functions.php:511
618
  msgid "Unable to create directory "
619
  msgstr "Kann Verzeichnis nicht erstellen "
620
 
621
+ #: ../admin/functions.php:62
622
  msgid "The server setting Safe-Mode is on !"
623
  msgstr "Auf dem Server ist Safe-Mode aktiviert (PHP.INI)"
624
 
625
+ #: ../admin/functions.php:63
626
  msgid "If you have problems, please create directory"
627
  msgstr "Wenn Probleme auftreten, erstelle bitte das Verzeichnis"
628
 
629
+ #: ../admin/functions.php:64
630
  msgid "and the thumbnails directory"
631
  msgstr "und das Thumbnails-Verzeichnis"
632
 
633
+ #: ../admin/functions.php:64
634
  msgid "with permission 777 manually !"
635
  msgstr "mit den Berechtigungen 777 manuell !"
636
 
637
+ #: ../admin/functions.php:81
638
  msgid "already exists"
639
  msgstr "gibt es bereits"
640
 
641
+ #: ../admin/functions.php:86
642
+ #, php-format
643
+ msgid "Gallery %1$s successfully created.<br/>You can show this gallery with the tag %2$s.<br/>"
644
+ msgstr "Galerie %1$s erstellt..<br/>Du kannst diese Galerie jetzt mit dem Stichwort %2$s einbinden.<br/>"
645
 
646
+ #: ../admin/functions.php:89
647
+ msgid "Edit gallery"
648
+ msgstr "Galerie ändern"
649
 
650
+ #: ../admin/functions.php:116
651
  msgid "doesn&#96;t exist!"
652
  msgstr "gibt es nicht !"
653
 
654
+ #: ../admin/functions.php:123
655
  msgid "contains no pictures"
656
  msgstr "enthält keine Bilder"
657
 
658
+ #: ../admin/functions.php:139
659
  msgid "Database error. Could not add gallery!"
660
  msgstr "Datenbank-Fehler. Kann Galerie nicht hinzufügen!"
661
 
662
+ #: ../admin/functions.php:142
663
+ msgid "successfully created!"
664
+ msgstr "erfolgreich erstellt!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
665
 
666
+ #: ../admin/functions.php:161
667
+ #: ../admin/functions.php:620
668
+ #: ../admin/manage-images.php:207
669
+ #: ../admin/manage.php:136
670
  msgid "Create new thumbnails"
671
  msgstr "Neue Thumbnails erstellen"
672
 
673
+ #: ../admin/functions.php:164
674
+ msgid " picture(s) successfully added"
675
+ msgstr " Bild(er) erfolgreich hinzugefügt"
676
 
677
+ #: ../admin/functions.php:203
678
+ #: ../admin/functions.php:282
679
+ #: ../admin/functions.php:323
680
+ msgid "Object didn't contain correct data"
681
+ msgstr "Das Objekt enhält nicht die notwendigen Daten"
682
 
683
+ #: ../admin/functions.php:208
684
+ msgid " is not writeable "
685
+ msgstr "ist schreibgeschützt !"
686
 
687
+ #: ../admin/functions.php:289
688
+ #: ../admin/functions.php:326
689
+ msgid " is not writeable"
690
+ msgstr "ist schreibgeschützt !"
691
 
692
+ #: ../admin/functions.php:482
693
  msgid "Uploaded file was no or a faulty zip file ! The server recognize : "
694
  msgstr "Die hochgeladene Datei war keine korrekte Zip-Datei. Servermeldung :"
695
 
696
+ #: ../admin/functions.php:496
697
+ msgid "Could not get a vaild foldername"
698
+ msgstr "Konnte keinen gültigen Verzeichnisnamen finden"
699
+
700
+ #: ../admin/functions.php:506
701
  #, php-format
702
  msgid "Unable to create directory %s. Is its parent directory writable by the server?"
703
  msgstr "Kann das Verzeichnis %s nicht erstellen. Is das Hauptverzeichnis vielleicht schreibgeschützt ?"
704
 
705
+ #: ../admin/functions.php:521
706
  msgid "Zip-File successfully unpacked"
707
  msgstr "Zip-Datei erfolgreich entpackt"
708
 
709
+ #: ../admin/functions.php:556
710
+ #: ../admin/functions.php:665
711
  msgid "Failure in database, no gallery path set !"
712
  msgstr "Datenbankfehler! Kein Galerie-Pfad gesetzt !"
713
 
714
+ #: ../admin/functions.php:577
715
+ #: ../admin/functions.php:659
716
  msgid "is no valid image file!"
717
  msgstr "ist keine zulässige Bilddatei !"
718
 
719
+ #: ../admin/functions.php:591
720
+ #: ../admin/functions.php:767
721
+ #: ../admin/functions.php:835
722
  #, php-format
723
  msgid "Unable to write to directory %s. Is this directory writable by the server?"
724
  msgstr "Kann das Verzeichnis %s nicht erstellen. Is das Hauptverzeichnis vielleicht schreibgeschützt ?"
725
 
726
+ #: ../admin/functions.php:598
727
+ #: ../admin/functions.php:682
728
  msgid "Error, the file could not moved to : "
729
  msgstr "Fehler: Diese Datei kann nicht verschoben werden zu :"
730
 
731
+ #: ../admin/functions.php:603
732
+ #: ../admin/functions.php:686
733
  msgid "Error, the file permissions could not set"
734
  msgstr "Fehler: Die Berechtigungen für diese Datei können nicht gesetzt werden"
735
 
736
+ #: ../admin/functions.php:624
737
  msgid " Image(s) successfully added"
738
  msgstr " Bild(er) erfolgreich hinzugefügt"
739
 
740
+ #: ../admin/functions.php:647
741
  msgid "Invalid upload. Error Code : "
742
  msgstr "Ungültiger Upload. Fehler Code :"
743
 
744
+ #: ../admin/functions.php:696
745
  msgid "Sorry, you have used your space allocation. Please delete some files to upload more files."
746
  msgstr "Schade, dein freier Speicher scheint aufgebraucht zu sein. Bitte lösche zuerst ein paar Bilder."
747
 
748
+ #: ../admin/functions.php:723
749
  #, php-format
750
  msgid "SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually"
751
  msgstr "SAFE MODE Einschränkungen ist aktiv. Du must das Verzeichnis <strong>%s</strong> manuell anlegen."
752
 
753
+ #: ../admin/functions.php:724
754
  #, php-format
755
  msgid "When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory"
756
  msgstr "Wenn der Safe-Mode eingeschaltet ist, überprüft PHP ob der Besitzer (%s) des Skript mit dem Besitzer (%s) der Datei/Verzeichnis übereinstimmt."
757
 
758
+ #: ../admin/functions.php:761
759
+ #: ../admin/functions.php:829
760
+ msgid "The destination gallery does not exist"
761
+ msgstr "Die ausgewählte Galerie existiert nicht"
762
 
763
+ #: ../admin/functions.php:792
764
+ #, php-format
765
+ msgid "Failed to move image %1$s to %2$s"
766
+ msgstr "Konte das Bild %1$s nicht nach %2$s verschieben"
767
 
768
+ #: ../admin/functions.php:810
769
+ #, php-format
770
+ msgid "Moved %1$s picture(s) to gallery : %2$s ."
771
+ msgstr " %1$s Bild(er) in Galerie : %2$s verschoben."
772
 
773
+ #: ../admin/functions.php:862
774
+ #, php-format
775
+ msgid "Failed to copy image %1$s to %2$s"
776
+ msgstr "Konnte das Bild %1$s nicht nach %2$s kopieren"
777
 
778
+ #: ../admin/functions.php:874
779
+ #, php-format
780
+ msgid "Failed to copy database row for picture %s"
781
+ msgstr "Fehler bei der Datenbank-Operation für Bild %s"
782
 
783
+ #: ../admin/functions.php:882
784
+ #, php-format
785
+ msgid "Image %1$s (%2$s) copied as image %3$s (%4$s) &raquo; The file already existed in the destination gallery."
786
+ msgstr "Bild %1$s (%2$s) als Bild %3$s (%4$s) kopiert &raquo; Die Datei existierte bereits."
787
 
788
+ #: ../admin/functions.php:885
789
+ #, php-format
790
+ msgid "Image %1$s (%2$s) copied as image %3$s (%4$s)"
791
+ msgstr "Bild %1$s (%2$s) kopiert als Bild %3$s (%4$s)"
792
 
793
+ #: ../admin/functions.php:894
794
+ #, php-format
795
+ msgid "Copied %1$s picture(s) to gallery: %2$s ."
796
+ msgstr "Kopiere %1$s Bild(er) in die Galerie : %2$s ."
797
 
798
+ #: ../admin/install.php:23
799
+ msgid "Sorry, NextGEN Gallery works only with a role called administrator"
800
+ msgstr "Tut mir leid, aber NextGEN Galerie benötigt zwingend die Rolle \"Administrator\""
801
 
802
+ #: ../admin/install.php:102
803
+ msgid "NextGEN Gallery : Tables could not created, please check your database settings"
804
+ msgstr "NextGEN Gallery : Tabellen konnten nicht erstellt werden, überprüfe deine Datenbank"
805
 
806
+ #: ../admin/install.php:154
807
+ msgid "[Show as slideshow]"
808
+ msgstr "[Zeige als Diashow]"
809
+
810
+ #: ../admin/install.php:155
811
+ msgid "[Show picture list]"
812
+ msgstr "[Zeige Bilder-Liste]"
813
+
814
+ #: ../admin/manage-galleries.php:12
815
  msgid "Gallery Overview"
816
  msgstr "Galerie Übersicht"
817
 
818
+ #: ../admin/manage-galleries.php:19
819
+ #: ../admin/manage-images.php:147
820
+ #: ../admin/manage-images.php:482
 
 
 
 
821
  msgid "Description"
822
  msgstr "Beschreibung"
823
 
824
+ #: ../admin/manage-galleries.php:20
825
+ #: ../admin/manage-images.php:167
826
+ msgid "Author"
827
+ msgstr "Autor"
828
+
829
+ #: ../admin/manage-galleries.php:21
830
  msgid "Page ID"
831
+ msgstr "Seiten ID"
832
 
833
+ #: ../admin/manage-galleries.php:22
834
  msgid "Quantity"
835
  msgstr "Anzahl"
836
 
837
+ #: ../admin/manage-galleries.php:23
838
+ #: ../admin/manage-images.php:489
839
  msgid "Action"
840
  msgstr "Aktion"
841
 
842
+ #: ../admin/manage-galleries.php:41
843
  msgid "Edit"
844
  msgstr "Bearbeiten"
845
 
846
+ #: ../admin/manage-galleries.php:54
847
  msgid "Delete this gallery ?"
848
  msgstr "Diese Galerie löschen ?"
849
 
850
+ #: ../admin/manage-galleries.php:61
851
+ #: ../admin/manage-images.php:392
852
  msgid "No entries found"
853
  msgstr "Keine Einträge gefunden"
854
 
855
+ #: ../admin/manage-images.php:18
856
+ msgid "Gallery not found."
857
+ msgstr "Galerie nicht gefunden"
858
+
859
+ #: ../admin/manage-images.php:88
860
+ #: ../admin/manage-images.php:417
861
+ #: ../admin/manage-images.php:454
862
+ msgid "No images selected"
863
+ msgstr "Keine Bilder ausgewählt"
864
+
865
+ #: ../admin/manage-images.php:102
866
+ #: ../admin/manage-images.php:417
867
+ #, php-format
868
+ msgid ""
869
+ "You are about to start the bulk edit for %s images \n"
870
+ " \n"
871
+ " 'Cancel' to stop, 'OK' to proceed."
872
+ msgstr ""
873
+ "Du startest die Bearbeitung von %s Bildern \n"
874
+ " \n"
875
+ " 'Abbrechen' um zu stoppen, 'OK' um die Bearbeitung durchzuführen."
876
+
877
+ #: ../admin/manage-images.php:132
878
+ msgid "Gallery settings"
879
+ msgstr "Galerie Einstellungen"
880
+
881
+ #: ../admin/manage-images.php:132
882
+ msgid "Click here for more settings"
883
+ msgstr "Hier klicken für weitere Einstellungen"
884
 
885
+ #: ../admin/manage-images.php:138
886
  msgid "Page Link to"
887
  msgstr "Seite verlinkt zu"
888
 
889
+ #: ../admin/manage-images.php:141
890
  msgid "Not linked"
891
  msgstr "Nicht verlinkt"
892
 
893
+ #: ../admin/manage-images.php:149
894
  msgid "Preview image"
895
  msgstr "Vorschau-Bild"
896
 
897
+ #: ../admin/manage-images.php:152
898
  msgid "No Picture"
899
  msgstr "Kein Bild"
900
 
901
+ #: ../admin/manage-images.php:165
902
  msgid "Path"
903
  msgstr "Pfad"
904
 
905
+ #: ../admin/manage-images.php:181
906
  msgid "Create new page"
907
  msgstr "Neue Seite erstellen"
908
 
909
+ #: ../admin/manage-images.php:184
910
  msgid "Main page (No parent)"
911
  msgstr "Haupseite (keine Unterseite)"
912
 
913
+ #: ../admin/manage-images.php:187
914
  msgid "Add page"
915
  msgstr "Seite hinzufügen"
916
 
917
+ #: ../admin/manage-images.php:193
918
  msgid "Scan Folder for new images"
919
  msgstr "Überprüfe Verzeichniss nach neuen Bildern"
920
 
921
+ #: ../admin/manage-images.php:194
922
+ #: ../admin/manage-images.php:243
923
+ #: ../admin/manage-images.php:398
924
  msgid "Save Changes"
925
  msgstr "Änderungen Speichern"
926
 
927
+ #: ../admin/manage-images.php:204
928
  msgid "No action"
929
  msgstr "Keine Aktion"
930
 
931
+ #: ../admin/manage-images.php:206
932
+ #: ../admin/manage.php:132
933
+ msgid "Set watermark"
934
+ msgstr "Wasserzeichen setzen"
935
+
936
+ #: ../admin/manage-images.php:208
937
+ #: ../admin/manage.php:140
938
+ msgid "Resize images"
939
+ msgstr "Bilder verkleinern"
940
+
941
+ #: ../admin/manage-images.php:209
942
  msgid "Delete images"
943
  msgstr "Bilder löschen"
944
 
945
+ #: ../admin/manage-images.php:210
946
  msgid "Import metadata"
947
  msgstr "Metadaten importieren"
948
 
949
+ #: ../admin/manage-images.php:211
950
+ msgid "Copy to..."
951
+ msgstr "Kopiere nach..."
952
+
953
+ #: ../admin/manage-images.php:212
954
+ msgid "Move to..."
955
+ msgstr "Verschiebe nach..."
956
+
957
+ #: ../admin/manage-images.php:214
958
  msgid "Add tags"
959
  msgstr "Stichwörter hinzufügen"
960
 
961
+ #: ../admin/manage-images.php:215
962
  msgid "Delete tags"
963
  msgstr "Stichwörter löschen"
964
 
965
+ #: ../admin/manage-images.php:216
966
  msgid "Overwrite tags"
967
  msgstr "Stichwörter überschreiben"
968
 
969
+ #: ../admin/manage-images.php:221
970
+ #: ../admin/manage-images.php:223
971
+ #: ../admin/manage-images.php:417
972
+ #: ../admin/manage-images.php:454
973
  msgid "OK"
974
  msgstr "OK"
975
 
976
+ #: ../admin/manage-images.php:227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
977
  msgid "Hide thumbnails "
978
  msgstr "Thumbnails verstecken"
979
 
980
+ #: ../admin/manage-images.php:229
981
  msgid "Show thumbnails "
982
  msgstr "Thumbnails zeigen"
983
 
984
+ #: ../admin/manage-images.php:233
985
  msgid "Show tags"
986
  msgstr "Zeige Tags"
987
 
988
+ #: ../admin/manage-images.php:235
989
  msgid "Hide tags"
990
  msgstr "Verstecke Tags"
991
 
992
+ #: ../admin/manage-images.php:239
993
  msgid "Sort gallery"
994
  msgstr "Sortiere Bilder"
995
 
996
+ #: ../admin/manage-images.php:376
997
+ msgid "Show Meta data"
998
+ msgstr "Zeige Metadaten"
999
+
1000
+ #: ../admin/manage-images.php:376
1001
+ msgid "Meta"
1002
+ msgstr "Meta"
1003
+
1004
+ #: ../admin/manage-images.php:377
1005
+ msgid "Delete this file ?"
1006
+ msgstr "Diese Datei löschen ?"
1007
+
1008
+ #: ../admin/manage-images.php:413
1009
+ msgid "Enter the tags"
1010
+ msgstr "Stichwörter angeben"
1011
+
1012
+ #: ../admin/manage-images.php:419
1013
+ #: ../admin/manage-images.php:456
1014
+ msgid "Cancel"
1015
+ msgstr "Abbrechen"
1016
+
1017
+ #: ../admin/manage-images.php:438
1018
+ msgid "Select the destination gallery:"
1019
+ msgstr "Galerie nicht gefunden"
1020
 
1021
+ #: ../admin/manage-images.php:454
1022
+ #, php-format
1023
+ msgid ""
1024
+ "You are about to copy or move %s images \n"
1025
+ " \n"
1026
+ " 'Cancel' to stop, 'OK' to proceed."
1027
+ msgstr ""
1028
+ "Willst du wirklich %s Bild(er) verschieben \n"
1029
+ " \n"
1030
+ " 'Abbrechen' um zu stoppen, 'OK' um die Bearbeitung durchzuführen."
1031
+
1032
+ #: ../admin/manage-images.php:476
1033
  msgid "Thumbnail"
1034
  msgstr "Thumbnail"
1035
 
1036
+ #: ../admin/manage-images.php:476
1037
+ #: ../admin/manage-images.php:478
1038
+ msgid "Date"
1039
+ msgstr "Datum"
1040
+
1041
+ #: ../admin/manage-images.php:478
1042
+ msgid "File name"
1043
+ msgstr "Dateiname"
1044
+
1045
+ #: ../admin/manage-images.php:482
1046
  msgid "Alt &amp; Title Text"
1047
  msgstr "Alt &amp; Titel Text"
1048
 
1049
+ #: ../admin/manage-images.php:485
1050
  msgid "exclude"
1051
  msgstr "ausschließen"
1052
 
1053
+ #: ../admin/manage-images.php:487
1054
  msgid "Tags (comma separated list)"
1055
  msgstr "Stichwörter (Tags)"
1056
 
1057
+ #: ../admin/manage-sort.php:30
1058
+ msgid "Sort order changed"
1059
+ msgstr "Reihenfolge aktualisiert"
1060
 
1061
+ #: ../admin/manage-sort.php:65
1062
+ msgid "Sort Gallery"
1063
+ msgstr "Sortiere Bilder"
1064
 
1065
+ #: ../admin/manage-sort.php:69
1066
+ msgid "Update Sort Order"
1067
+ msgstr "Sortierung speichern"
1068
 
1069
+ #: ../admin/manage-sort.php:72
1070
+ msgid "Back to gallery"
1071
+ msgstr "Zurück zur Galerie"
1072
 
1073
+ #: ../admin/manage-sort.php:77
1074
+ msgid "Presort"
1075
+ msgstr "Vorsortieren"
1076
 
1077
+ #: ../admin/manage-sort.php:78
1078
+ msgid "Unsorted"
1079
+ msgstr "Unsortiert"
1080
 
1081
+ #: ../admin/manage-sort.php:79
1082
+ msgid "Image ID"
1083
+ msgstr "Bilder ID"
1084
 
1085
+ #: ../admin/manage-sort.php:80
1086
+ msgid "Filename"
1087
+ msgstr "Dateiname"
1088
 
1089
+ #: ../admin/manage-sort.php:81
1090
+ msgid "Alt/Title text"
1091
+ msgstr "Alt / Titel Text"
 
1092
 
1093
+ #: ../admin/manage-sort.php:82
1094
+ msgid "Date/Time"
1095
+ msgstr "Datum/Zeit"
1096
 
1097
+ #: ../admin/manage-sort.php:83
1098
+ msgid "Ascending"
1099
+ msgstr "Aufsteigend"
1100
 
1101
+ #: ../admin/manage-sort.php:84
1102
+ msgid "Descending"
1103
+ msgstr "Absteigend"
1104
 
1105
+ #: ../admin/manage.php:84
1106
+ #: ../admin/manage.php:106
1107
+ msgid "deleted successfully"
1108
+ msgstr "erfolgreich gelöscht"
1109
 
1110
+ #: ../admin/manage.php:106
1111
+ msgid "Picture"
1112
+ msgstr "Bild"
1113
 
1114
+ #: ../admin/manage.php:157
1115
+ msgid "Pictures deleted successfully "
1116
+ msgstr "Bilder erfolgreich gelöscht"
1117
 
1118
+ #: ../admin/manage.php:163
1119
+ msgid "Import metadata finished"
1120
+ msgstr "Import der Metadaten beendet"
1121
 
1122
+ #: ../admin/manage.php:171
1123
+ msgid "Operation successfull. Please clear your browser cache."
1124
+ msgstr "Thumbnails erfolgreich erstellt. Bitte Browser-Cache aktualisieren."
1125
+
1126
+ #: ../admin/manage.php:234
1127
+ msgid "Tags changed"
1128
+ msgstr "Stichwörter geändert"
1129
+
1130
+ #: ../admin/manage.php:264
1131
+ msgid "Update successful"
1132
+ msgstr "Aktualisierung erfolgreich"
1133
 
1134
+ #: ../admin/manage.php:297
1135
+ msgid "New gallery page ID"
1136
+ msgstr "Neue Galerie Seiten ID"
1137
 
1138
+ #: ../admin/manage.php:297
1139
+ msgid "created"
1140
+ msgstr "erstellt"
1141
 
1142
+ #: ../admin/media-upload.php:132
1143
+ #: ../admin/tinymce/window.php:43
1144
+ msgid "No gallery"
1145
+ msgstr "Keine Galerie"
1146
 
1147
+ #: ../admin/media-upload.php:144
1148
+ msgid "Select &#187;"
1149
+ msgstr "Wähle &#187;"
1150
 
1151
+ #: ../admin/media-upload.php:175
1152
+ msgid "Show"
1153
+ msgstr "Zeige"
1154
+
1155
+ #: ../admin/media-upload.php:176
1156
+ msgid "Hide"
1157
+ msgstr "Verstecke"
1158
+
1159
+ #: ../admin/media-upload.php:181
1160
+ msgid "Image ID:"
1161
+ msgstr "Bild ID:"
1162
+
1163
+ #: ../admin/media-upload.php:195
1164
+ msgid "Alignment"
1165
+ msgstr "Ausrichtung"
1166
+
1167
+ #: ../admin/media-upload.php:198
1168
+ #: ../admin/settings.php:315
1169
+ msgid "None"
1170
+ msgstr "Keiner"
1171
+
1172
+ #: ../admin/media-upload.php:200
1173
+ #: ../admin/tinymce/window.php:128
1174
+ msgid "Left"
1175
+ msgstr "Links"
1176
+
1177
+ #: ../admin/media-upload.php:202
1178
+ #: ../admin/tinymce/window.php:129
1179
+ msgid "Center"
1180
+ msgstr "Zentrieren"
1181
+
1182
+ #: ../admin/media-upload.php:204
1183
+ #: ../admin/tinymce/window.php:130
1184
+ msgid "Right"
1185
+ msgstr "Rechts"
1186
+
1187
+ #: ../admin/media-upload.php:208
1188
+ #: ../admin/settings.php:418
1189
+ msgid "Size"
1190
+ msgstr "Größe"
1191
+
1192
+ #: ../admin/media-upload.php:214
1193
+ msgid "Full size"
1194
+ msgstr "Volle Größe"
1195
+
1196
+ #: ../admin/media-upload.php:216
1197
+ msgid "Singlepic"
1198
+ msgstr "Einzelbilder"
1199
+
1200
+ #: ../admin/media-upload.php:224
1201
+ msgid "Insert into Post"
1202
+ msgstr "In den Beitrag einfügen"
1203
+
1204
+ #: ../admin/media-upload.php:234
1205
+ msgid "Save all changes"
1206
+ msgstr "Änderungen Speichern"
1207
 
1208
+ #: ../admin/overview.php:13
1209
+ msgid "NextGEN Gallery Overview"
1210
+ msgstr "NextGEN Galerie Übersicht"
1211
+
1212
+ #: ../admin/overview.php:108
1213
  #, php-format
1214
  msgid "Newsfeed could not be loaded. Check the <a href=\"%s\">front page</a> to check for updates."
1215
  msgstr "Der Newsfeed kann nicht geladen werden. Schaue auf die <a href=\"%s\">Hauptseite</a> um Updates mitzubekommen."
1216
 
1217
+ #: ../admin/overview.php:128
1218
+ msgid "At a Glance"
1219
+ msgstr "Übersicht"
1220
+
1221
+ #: ../admin/overview.php:134
1222
+ msgid "Image"
1223
+ msgid_plural "Images"
1224
+ msgstr[0] "Bild"
1225
+ msgstr[1] "Bilder"
1226
+
1227
+ #: ../admin/overview.php:155
1228
+ msgid "Upload pictures"
1229
+ msgstr "Bilder hochladen"
1230
+
1231
+ #: ../admin/overview.php:156
1232
+ msgid "Here you can control your images, galleries and albums."
1233
+ msgstr "Hier kannst Du die Bilder, Galerien und Alben verwalten."
1234
+
1235
+ #: ../admin/overview.php:160
1236
+ msgid "Gallery Administrator"
1237
+ msgstr "Galerie-Administrator"
1238
+
1239
+ #: ../admin/overview.php:160
1240
+ msgid "Gallery Editor"
1241
+ msgstr "Galerie-Mitarbeiter"
1242
+
1243
+ #: ../admin/overview.php:161
1244
+ #, php-format
1245
+ msgid "You currently have %s rights."
1246
+ msgstr "Du hast derzeit %s Rechte."
1247
+
1248
+ #: ../admin/overview.php:168
1249
+ msgid "Welcome to NextGEN Gallery !"
1250
+ msgstr "Willkomen bei NextGEN Gallery"
1251
+
1252
+ #: ../admin/overview.php:169
1253
+ msgid "Latest News"
1254
+ msgstr "Letzte Informationen"
1255
+
1256
+ #: ../admin/overview.php:170
1257
+ msgid "Server Settings"
1258
+ msgstr "Server- Einstellungen"
1259
+
1260
+ #: ../admin/overview.php:171
1261
+ msgid "Graphic Library"
1262
+ msgstr "Grafik Bibliothek"
1263
 
1264
+ #: ../admin/overview.php:187
1265
  msgid "No GD support"
1266
  msgstr "Keine GD Unterstützung"
1267
 
1268
+ #: ../admin/overview.php:194
1269
+ #: ../admin/overview.php:233
1270
+ #: ../admin/overview.php:236
1271
+ #: ../admin/overview.php:239
1272
  msgid "Yes"
1273
  msgstr "Ja"
1274
 
1275
+ #: ../admin/overview.php:196
1276
+ #: ../admin/overview.php:234
1277
+ #: ../admin/overview.php:237
1278
+ #: ../admin/overview.php:240
1279
  msgid "No"
1280
  msgstr "Nein"
1281
 
1282
+ #: ../admin/overview.php:210
1283
  msgid "Not set"
1284
  msgstr "Nicht gesetzt"
1285
 
1286
+ #: ../admin/overview.php:212
1287
+ #: ../admin/overview.php:215
1288
  msgid "On"
1289
  msgstr "An"
1290
 
1291
+ #: ../admin/overview.php:213
1292
+ #: ../admin/overview.php:216
1293
  msgid "Off"
1294
  msgstr "Aus"
1295
 
1296
+ #: ../admin/overview.php:219
1297
+ #: ../admin/overview.php:222
1298
+ #: ../admin/overview.php:225
1299
+ #: ../admin/overview.php:228
1300
+ #: ../admin/overview.php:231
1301
  msgid "N/A"
1302
  msgstr "N/A"
1303
 
1304
+ #: ../admin/overview.php:230
1305
  msgid " MByte"
1306
  msgstr " MByte"
1307
 
1308
+ #: ../admin/overview.php:243
1309
  msgid "Operating System"
1310
  msgstr "Betriebssystem"
1311
 
1312
+ #: ../admin/overview.php:244
1313
  msgid "Server"
1314
  msgstr "Server"
1315
 
1316
+ #: ../admin/overview.php:245
1317
  msgid "Memory usage"
1318
  msgstr "Speicherverbrauch"
1319
 
1320
+ #: ../admin/overview.php:246
1321
  msgid "MYSQL Version"
1322
  msgstr "MySQL Version"
1323
 
1324
+ #: ../admin/overview.php:247
1325
  msgid "SQL Mode"
1326
  msgstr "SQL Modus"
1327
 
1328
+ #: ../admin/overview.php:248
1329
  msgid "PHP Version"
1330
  msgstr "PHP Version"
1331
 
1332
+ #: ../admin/overview.php:249
1333
  msgid "PHP Safe Mode"
1334
  msgstr "PHP Safe Mode"
1335
 
1336
+ #: ../admin/overview.php:250
1337
  msgid "PHP Allow URL fopen"
1338
  msgstr "PHP Allow URL fopen"
1339
 
1340
+ #: ../admin/overview.php:251
1341
  msgid "PHP Memory Limit"
1342
  msgstr "PHP Memory Limit"
1343
 
1344
+ #: ../admin/overview.php:252
1345
  msgid "PHP Max Upload Size"
1346
+ msgstr "PHP Max Upload Größe"
1347
 
1348
+ #: ../admin/overview.php:253
1349
  msgid "PHP Max Post Size"
1350
+ msgstr "PHP Max Post Größe"
1351
 
1352
+ #: ../admin/overview.php:254
1353
  msgid "PHP Max Script Execute Time"
1354
  msgstr "PHP Max Script Execute Time"
1355
 
1356
+ #: ../admin/overview.php:255
1357
  msgid "PHP Exif support"
1358
  msgstr "PHP Exif Modul"
1359
 
1360
+ #: ../admin/overview.php:256
1361
  msgid "PHP IPTC support"
1362
  msgstr "PHP IPTC Modul"
1363
 
1364
+ #: ../admin/overview.php:257
1365
  msgid "PHP XML support"
1366
  msgstr "PHP XML Modul"
1367
 
1368
+ #: ../admin/overview.php:315
1369
  msgid "Storage Space"
1370
  msgstr "Speicherplatz"
1371
 
1372
+ #: ../admin/overview.php:318
1373
  msgid "Upload Space Used:"
1374
  msgstr "Verbrauchter Uploadspeicher:"
1375
 
1376
+ #: ../admin/overview.php:324
1377
  msgid "Upload Space Remaining:"
1378
  msgstr "Verbleibender Speicher:"
1379
 
1380
+ #: ../admin/roles.php:22
1381
  msgid "Updated capabilities"
1382
  msgstr "Zugriffsrechte geändert"
1383
 
1384
+ #: ../admin/roles.php:27
1385
  msgid "Roles / capabilities"
1386
  msgstr "Rollen / Zugriffsrechte"
1387
 
1388
+ #: ../admin/roles.php:28
1389
  msgid "Select the lowest role which should be able to access the follow capabilities. NextGEN Gallery supports the standard roles from WordPress."
1390
  msgstr "Wähle die niedrigste Rolle aus, die Zugriff haben soll. NextGEN Gallery unterstützt nur die Standard Wordpress Rollen/Fähigkeiten von WordPress."
1391
 
1392
+ #: ../admin/roles.php:29
1393
  msgid "For a more flexible user management you can use the"
1394
  msgstr "Nutze für eine flexiblere Rechteverwaltung den "
1395
 
1396
+ #: ../admin/roles.php:34
1397
  msgid "Main NextGEN Gallery overview"
1398
  msgstr "NextGEN Galerie Übersicht"
1399
 
1400
+ #: ../admin/roles.php:38
1401
  msgid "Use TinyMCE Button / Upload tab"
1402
  msgstr "TinyMCE Button / Upload Tab"
1403
 
1404
+ #: ../admin/roles.php:42
1405
  msgid "Add gallery / Upload images"
1406
  msgstr "Galerie einrichten / Bilder hochladen"
1407
 
1408
+ #: ../admin/roles.php:46
1409
  msgid "Manage gallery"
1410
  msgstr "Galerie verwalten"
1411
 
1412
+ #: ../admin/roles.php:50
1413
+ msgid "Manage others gallery"
1414
+ msgstr "Alle Galerien verwalten"
1415
+
1416
+ #: ../admin/roles.php:54
1417
+ msgid "Manage tags"
1418
+ msgstr "Verwalte Stichwörter"
1419
+
1420
+ #: ../admin/roles.php:58
1421
  msgid "Edit Album"
1422
  msgstr "Album erstellen"
1423
 
1424
+ #: ../admin/roles.php:62
1425
  msgid "Change style"
1426
  msgstr "Style anpassen"
1427
 
1428
+ #: ../admin/roles.php:66
1429
  msgid "Change options"
1430
  msgstr "Optionen änderen"
1431
 
1432
+ #: ../admin/roles.php:70
1433
  msgid "Update capabilities"
1434
  msgstr "Rechte aktualisieren"
1435
 
1436
+ #: ../admin/settings.php:48
 
 
 
 
1437
  msgid "Cache cleared"
1438
  msgstr "Cache löschen"
1439
 
1440
+ #: ../admin/settings.php:96
1441
+ #: ../admin/settings.php:108
1442
  msgid "General Options"
1443
  msgstr "Allg. Optionen"
1444
 
1445
+ #: ../admin/settings.php:97
1446
+ #: ../admin/settings.php:267
1447
+ msgid "Thumbnails"
1448
+ msgstr "Thumbnails"
1449
+
1450
+ #: ../admin/settings.php:98
1451
  msgid "Images"
1452
  msgstr "Bilder"
1453
 
1454
+ #: ../admin/settings.php:100
1455
+ #: ../admin/settings.php:304
1456
  msgid "Effects"
1457
  msgstr "Effekte"
1458
 
1459
+ #: ../admin/settings.php:101
1460
+ #: ../admin/settings.php:342
1461
+ #: ../admin/tinymce/window.php:118
1462
  msgid "Watermark"
1463
  msgstr "Wasserzeichen"
1464
 
1465
+ #: ../admin/settings.php:102
1466
+ #: ../admin/settings.php:268
1467
+ #: ../admin/settings.php:446
1468
+ #: ../admin/tinymce/window.php:57
1469
  msgid "Slideshow"
1470
  msgstr "Slideshow"
1471
 
1472
+ #: ../admin/settings.php:114
1473
+ #: ../admin/wpmu.php:48
1474
  msgid "Gallery path"
1475
  msgstr "Galerie-Pfad"
1476
 
1477
+ #: ../admin/settings.php:116
1478
  msgid "This is the default path for all galleries"
1479
  msgstr "Dies ist der Standard-Pfad für alle Galerien"
1480
 
1481
+ #: ../admin/settings.php:119
1482
  msgid "Delete image files"
1483
  msgstr "Lösche Bilddateien"
1484
 
1485
+ #: ../admin/settings.php:121
1486
  msgid "Delete files, when removing a gallery in the database"
1487
  msgstr "Löscht auch die Dateien, falls die Galerie aus der Datenbank entfernt wird"
1488
 
1489
+ #: ../admin/settings.php:124
1490
  msgid "Activate permalinks"
1491
  msgstr "Aktiviere Permalinks"
1492
 
1493
+ #: ../admin/settings.php:126
1494
  msgid "When you activate this option, you need to update your permalink structure one time."
1495
  msgstr "Wenn du diese Option aktivierst, muss du einmal die Permalink Struktur aktualisieren."
1496
 
1497
+ #: ../admin/settings.php:129
1498
+ msgid "Select graphic library"
1499
+ msgstr "Wähle Grafik-Bibliothek"
1500
+
1501
+ #: ../admin/settings.php:130
1502
+ msgid "GD Library"
1503
+ msgstr "GD Bibliothek"
1504
+
1505
+ #: ../admin/settings.php:131
1506
+ msgid "ImageMagick (Experimental). Path to the library :"
1507
+ msgstr "ImageMagick (Experimental). Pfad zur Bibliothek :"
1508
+
1509
+ #: ../admin/settings.php:136
1510
+ msgid "Activate PicLens/CoolIris support"
1511
+ msgstr "Aktiviere PicLens/CoolIris"
1512
+
1513
+ #: ../admin/settings.php:138
1514
+ msgid "When you activate this option, some javascript is added to your site footer. Make sure that wp_footer is called in your theme."
1515
+ msgstr "Dieser Effekt fügt ein neues Javascript zu deinem Theme hinzu. Beachte das wp_footer() in deinen Vorlagen aufgerufen wird."
1516
+
1517
+ #: ../admin/settings.php:141
1518
  msgid "Tags / Categories"
1519
  msgstr "Stichwörter / Kategorien"
1520
 
1521
+ #: ../admin/settings.php:144
1522
  msgid "Activate related images"
1523
  msgstr "Verwandte Bilder anzeigen"
1524
 
1525
+ #: ../admin/settings.php:146
1526
  msgid "This option will append related images to every post"
1527
  msgstr "Diese Option hängt verwandte Bilder an jeden Beitrag"
1528
 
1529
+ #: ../admin/settings.php:150
1530
  msgid "Match with"
1531
  msgstr "Vergleiche mit"
1532
 
1533
+ #: ../admin/settings.php:151
1534
  msgid "Categories"
1535
  msgstr "Kategorien"
1536
 
1537
+ #: ../admin/settings.php:156
 
 
 
 
 
 
 
 
1538
  msgid "Max. number of images"
1539
  msgstr "Max. Anzahl der Bilder"
1540
 
1541
+ #: ../admin/settings.php:158
1542
  msgid "0 will show all images"
1543
  msgstr "0 zeige alle verwandten Bilder"
1544
 
1545
+ #: ../admin/settings.php:169
1546
  msgid "Thumbnail settings"
1547
  msgstr "Thumbnail Einstellungen"
1548
 
1549
+ #: ../admin/settings.php:173
1550
  msgid "Please note : If you change the settings, you need to recreate the thumbnails under -> Manage Gallery ."
1551
  msgstr "Bitte beachten : Änderungen der Einstellungen werden erst übernommen, wenn Du neue Thumbnails unter -> \"Gallery verwalten\" erstellst"
1552
 
1553
+ #: ../admin/settings.php:176
1554
  msgid "Width x height (in pixel)"
1555
  msgstr "Breite x Höhe (in Pixel)"
1556
 
1557
+ #: ../admin/settings.php:178
1558
  msgid "These values are maximum values "
1559
  msgstr "Diese Angaben sind maximale Angaben."
1560
 
1561
+ #: ../admin/settings.php:181
1562
  msgid "Set fix dimension"
1563
  msgstr "Setze fixe Größe"
1564
 
1565
+ #: ../admin/settings.php:183
1566
  msgid "Ignore the aspect ratio, no portrait thumbnails"
1567
  msgstr "Ignoriere Bildseitenverhältnis"
1568
 
1569
+ #: ../admin/settings.php:186
1570
  msgid "Crop square thumbnail from image"
1571
  msgstr "Mittige Thumbnails aus Bildern ausschneiden"
1572
 
1573
+ #: ../admin/settings.php:188
1574
  msgid "Create square thumbnails, use only the width setting :"
1575
  msgstr "Erstellt viereckige Thumbnails, nutzt nur den Wert der Breite :"
1576
 
1577
+ #: ../admin/settings.php:191
1578
  msgid "Thumbnail quality"
1579
  msgstr "Thumbnail Qualität"
1580
 
1581
+ #: ../admin/settings.php:202
 
 
 
 
 
 
 
 
 
 
1582
  msgid "Image settings"
1583
  msgstr "Bild Einstellungen"
1584
 
1585
+ #: ../admin/settings.php:208
1586
  msgid "Resize Images"
1587
  msgstr "Bilder verkleinern"
1588
 
1589
+ #: ../admin/settings.php:212
1590
  msgid "Width x height (in pixel). NextGEN Gallery will keep ratio size"
1591
  msgstr "Breite x Höhe (in Pixel). NextGEN Galerie beachtet das Seitenverhältnis."
1592
 
1593
+ #: ../admin/settings.php:215
1594
  msgid "Image quality"
1595
  msgstr "Bild Qualität"
1596
 
1597
+ #: ../admin/settings.php:220
1598
  msgid "Single picture"
1599
  msgstr "Einzelbilder"
1600
 
1601
+ #: ../admin/settings.php:223
1602
  msgid "Cache single pictures"
1603
  msgstr "Nutze Cache für Einzelbidler"
1604
 
1605
+ #: ../admin/settings.php:226
1606
  msgid "Creates a file for each singlepic settings. Reduce the CPU load"
1607
  msgstr "Erstellt ein Cache-Bild für jedes Einzelbild (singlepic). Reduziert die CPU Belastung."
1608
 
1609
+ #: ../admin/settings.php:229
1610
  msgid "Clear cache folder"
1611
  msgstr "Lösche Cache Verzeichnis"
1612
 
1613
+ #: ../admin/settings.php:231
1614
  msgid "Proceed now"
1615
  msgstr "Jetzt durchführen"
1616
 
1617
+ #: ../admin/settings.php:247
 
 
 
 
1618
  msgid "Deactivate gallery page link"
1619
  msgstr "Keine Seitenverzweigung"
1620
 
1621
+ #: ../admin/settings.php:249
1622
  msgid "The album will not link to a gallery subpage. The gallery is shown on the same page."
1623
  msgstr "Ein Album benötigt dann keinen Link zur Seite. Die Galerie wird direkt angezeigt."
1624
 
1625
+ #: ../admin/settings.php:253
1626
  msgid "Number of images per page"
1627
  msgstr "Anzahl der Bilder pro Seite"
1628
 
1629
+ #: ../admin/settings.php:255
1630
  msgid "0 will disable pagination, all images on one page"
1631
  msgstr "0 schaltet Blätterfunktion ab ( = alle Bilder auf einer Seite )"
1632
 
1633
+ #: ../admin/settings.php:259
1634
  msgid "Integrate slideshow"
1635
  msgstr "Slideshow verwenden"
1636
 
1637
+ #: ../admin/settings.php:266
1638
  msgid "Show first"
1639
  msgstr "Zeige als Erstes"
1640
 
1641
+ #: ../admin/settings.php:272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1642
  msgid "Show ImageBrowser"
1643
  msgstr "Zeige Bilder Browser"
1644
 
1645
+ #: ../admin/settings.php:274
1646
  msgid "The gallery will open the ImageBrowser instead the effect."
1647
  msgstr "Es wird der Bilder Browser angezeigt (Kein JavaScript Effekt)"
1648
 
1649
+ #: ../admin/settings.php:278
1650
  msgid "Sort options"
1651
  msgstr "Sortierung"
1652
 
1653
+ #: ../admin/settings.php:281
1654
  msgid "Sort thumbnails"
1655
  msgstr "Thumbnails sortieren"
1656
 
1657
+ #: ../admin/settings.php:283
1658
  msgid "Custom order"
1659
  msgstr "Benutzerdefiniert"
1660
 
1661
+ #: ../admin/settings.php:286
1662
+ msgid "Alt / Title text"
1663
+ msgstr "Alt / Titel Text"
1664
 
1665
+ #: ../admin/settings.php:287
1666
+ msgid "Date / Time"
1667
+ msgstr "Datum/Zeit"
1668
+
1669
+ #: ../admin/settings.php:291
1670
  msgid "Sort direction"
1671
  msgstr "Sortierreihenfolge"
1672
 
1673
+ #: ../admin/settings.php:308
1674
+ msgid "Here you can select the thumbnail effect, NextGEN Gallery will integrate the required HTML code in the images. Please note that only the Thickbox effect will automatic added to your theme."
1675
+ msgstr "Hier kannst Du den Effekt für die Thumbnails auswählen. NextGEN Galerie wird den benötigten HTML Code verwenden. Bitte beachte, das nur der Thickbox Effekt automatisch in Dein Theme von Wordpress integriert wird. Alle anderen Effekte mußt Du selbst in die header.php eintragen (JS)."
1676
 
1677
+ #: ../admin/settings.php:309
 
 
 
 
 
 
 
 
1678
  msgid "With the placeholder"
1679
  msgstr "Mit Platzhalter"
1680
 
1681
+ #: ../admin/settings.php:309
1682
  msgid "you can activate a navigation through the images (depend on the effect). Change the code line only , when you use a different thumbnail effect or you know what you do."
1683
  msgstr "Du kannst eine Navigation durch die Bilder aktivieren (hängt vom Effekt ab). Ändere nur die Codezeile falls Du einen anderen Effekt für die Thumbnails verwendest oder einfach weißt, was Du tust."
1684
 
1685
+ #: ../admin/settings.php:312
1686
  msgid "JavaScript Thumbnail effect"
1687
  msgstr "JavaScript Thumbnail Effekt"
1688
 
1689
+ #: ../admin/settings.php:316
1690
  msgid "Thickbox"
1691
  msgstr "Thickbox"
1692
 
1693
+ #: ../admin/settings.php:317
1694
  msgid "Lightbox"
1695
  msgstr "Lightbox"
1696
 
1697
+ #: ../admin/settings.php:318
1698
  msgid "Highslide"
1699
  msgstr "Highslide"
1700
 
1701
+ #: ../admin/settings.php:319
1702
  msgid "Shutter"
1703
  msgstr "Shutter"
1704
 
1705
+ #: ../admin/settings.php:320
1706
  msgid "Custom"
1707
  msgstr "Eigener"
1708
 
1709
+ #: ../admin/settings.php:325
1710
  msgid "Link Code line"
1711
  msgstr "Link Code Zeile"
1712
 
1713
+ #: ../admin/settings.php:343
 
 
 
 
1714
  msgid "Please note : You can only activate the watermark under -> Manage Gallery . This action cannot be undone."
1715
  msgstr "Bitte beachten : Das Wasserzeichen kann nur unter der Galerieverwaltung gesetzt werden. "
1716
 
1717
+ #: ../admin/settings.php:348
1718
  msgid "Preview"
1719
  msgstr "Vorschau"
1720
 
1721
+ #: ../admin/settings.php:350
1722
+ #: ../admin/settings.php:355
1723
  msgid "Position"
1724
  msgstr "Position"
1725
 
1726
+ #: ../admin/settings.php:375
1727
  msgid "Offset"
1728
  msgstr "Abstand"
1729
 
1730
+ #: ../admin/settings.php:391
1731
  msgid "Use image as watermark"
1732
  msgstr "Benutze Bild als Wasserzeichen"
1733
 
1734
+ #: ../admin/settings.php:394
1735
  msgid "URL to file"
1736
  msgstr "URL zur Datei"
1737
 
1738
+ #: ../admin/settings.php:396
1739
  msgid "The accessing of URL files is disabled at your server (allow_url_fopen)"
1740
  msgstr "Der Dateizugriff von URL's ist auf diesem Server deaktiviert (allow_url_fopen)"
1741
 
1742
+ #: ../admin/settings.php:399
1743
  msgid "Use text as watermark"
1744
  msgstr "Benutze Text als Wasserzeichen"
1745
 
1746
+ #: ../admin/settings.php:402
1747
  msgid "Font"
1748
  msgstr "Schriftart"
1749
 
1750
+ #: ../admin/settings.php:411
1751
  msgid "This function will not work, cause you need the FreeType library"
1752
  msgstr "Diese Funktion benötigt die FreeType Bibliothek"
1753
 
1754
+ #: ../admin/settings.php:413
1755
  msgid "You can upload more fonts in the folder <strong>nggallery/fonts</strong>"
1756
  msgstr "Du kannst mehr Schriftarten in das Verzeichniss <strong>nggallery/fonts</strong> hochladen."
1757
 
1758
+ #: ../admin/settings.php:422
 
 
 
 
1759
  msgid "Color"
1760
  msgstr "Farbe"
1761
 
1762
+ #: ../admin/settings.php:424
1763
  msgid "(hex w/o #)"
1764
  msgstr "(hex w/o #)"
1765
 
1766
+ #: ../admin/settings.php:427
1767
  msgid "Text"
1768
  msgstr "Text"
1769
 
1770
+ #: ../admin/settings.php:431
1771
  msgid "Opaque"
1772
  msgstr "Transparenz"
1773
 
1774
+ #: ../admin/settings.php:447
1775
  msgid "The imagerotator.swf is not in the nggallery folder, the slideshow will not work."
1776
  msgstr "Die Datei imagerotator.swf ist nicht im Plugin Verzeichniss -> so wird die Slideshow nicht funktionieren."
1777
 
1778
+ #: ../admin/settings.php:448
1779
  msgid "The settings are used in the JW Image Rotator Version"
1780
  msgstr "Die Einstellungen werden im JW Image Rotator benutzt , in der Version"
1781
 
1782
+ #: ../admin/settings.php:449
1783
  msgid "See more information for the Flash Player on the web page"
1784
  msgstr "Weitere Informationen auf der Flash Player Homepage"
1785
 
1786
+ #: ../admin/settings.php:453
1787
  msgid "Default size (W x H)"
1788
  msgstr "Standard Größe (B x H)"
1789
 
1790
+ #: ../admin/settings.php:458
1791
  msgid "Shuffle mode"
1792
  msgstr "Shuffle Modus"
1793
 
1794
+ #: ../admin/settings.php:462
1795
  msgid "Show next image on click"
1796
  msgstr "Zeige nächstes Bild bei Klick"
1797
 
1798
+ #: ../admin/settings.php:466
1799
  msgid "Show navigation bar"
1800
  msgstr "Zeige Navigations-Leiste"
1801
 
1802
+ #: ../admin/settings.php:470
1803
  msgid "Show loading icon"
1804
  msgstr "Zeige Lade-Bildchen"
1805
 
1806
+ #: ../admin/settings.php:474
1807
  msgid "Use watermark logo"
1808
  msgstr "Wasserzeichen anzeigen"
1809
 
1810
+ #: ../admin/settings.php:476
1811
  msgid "You can change the logo at the watermark settings"
1812
  msgstr "Du kannst den Pfad in Einstellungen für da Wasserzeichen angeben"
1813
 
1814
+ #: ../admin/settings.php:479
1815
  msgid "Stretch image"
1816
  msgstr "Bild dehnen"
1817
 
1818
+ #: ../admin/settings.php:482
1819
  msgid "true"
1820
  msgstr "Ja"
1821
 
1822
+ #: ../admin/settings.php:483
1823
  msgid "false"
1824
  msgstr "Nein"
1825
 
1826
+ #: ../admin/settings.php:484
1827
  msgid "fit"
1828
  msgstr "Passend"
1829
 
1830
+ #: ../admin/settings.php:485
1831
  msgid "none"
1832
  msgstr "keiner"
1833
 
1834
+ #: ../admin/settings.php:490
1835
  msgid "Duration time"
1836
  msgstr "Dauer"
1837
 
1838
+ #: ../admin/settings.php:491
1839
  msgid "sec."
1840
  msgstr "Sek."
1841
 
1842
+ #: ../admin/settings.php:494
1843
  msgid "Transition / Fade effect"
1844
  msgstr "Fade Effekt"
1845
 
1846
+ #: ../admin/settings.php:497
1847
  msgid "fade"
1848
  msgstr "Fade"
1849
 
1850
+ #: ../admin/settings.php:498
1851
  msgid "bgfade"
1852
  msgstr "BGFade"
1853
 
1854
+ #: ../admin/settings.php:499
1855
  msgid "slowfade"
1856
  msgstr "Slowfade"
1857
 
1858
+ #: ../admin/settings.php:500
1859
  msgid "circles"
1860
  msgstr "Kreise"
1861
 
1862
+ #: ../admin/settings.php:501
1863
  msgid "bubbles"
1864
  msgstr "Blasen"
1865
 
1866
+ #: ../admin/settings.php:502
1867
  msgid "blocks"
1868
  msgstr "Blöcke"
1869
 
1870
+ #: ../admin/settings.php:503
1871
  msgid "fluids"
1872
  msgstr "Fluids"
1873
 
1874
+ #: ../admin/settings.php:504
1875
  msgid "flash"
1876
  msgstr "Flash"
1877
 
1878
+ #: ../admin/settings.php:505
1879
  msgid "lines"
1880
  msgstr "Linien"
1881
 
1882
+ #: ../admin/settings.php:506
1883
+ msgid "random"
1884
+ msgstr "Zufall"
1885
+
1886
+ #: ../admin/settings.php:510
1887
  msgid "Use slow zooming effect"
1888
  msgstr "nutze Zoom Effekt"
1889
 
1890
+ #: ../admin/settings.php:514
1891
  msgid "Background Color"
1892
  msgstr "Hintergrund (BG) Farbe"
1893
 
1894
+ #: ../admin/settings.php:519
1895
  msgid "Texts / Buttons Color"
1896
  msgstr "Text- / Button Farbe"
1897
 
1898
+ #: ../admin/settings.php:524
1899
  msgid "Rollover / Active Color"
1900
  msgstr "Rollover / Aktiv (Link) Farbe"
1901
 
1902
+ #: ../admin/settings.php:529
1903
  msgid "Screen Color"
1904
  msgstr "Seiten Farbe"
1905
 
1906
+ #: ../admin/settings.php:534
1907
  msgid "Background music (URL)"
1908
  msgstr "Hintergrundmusik (URL)"
1909
 
1910
+ #: ../admin/settings.php:538
1911
  msgid "Try XHTML validation (with CDATA)"
1912
  msgstr "Integriere XHTML Validierung (mittels CDATA)"
1913
 
1914
+ #: ../admin/settings.php:540
1915
  msgid "Important : Could causes problem at some browser. Please recheck your page."
1916
  msgstr "Wichtig : Es könnnten Probleme bei einigen Browser auftauchen. Unbedingt Seite prüfen."
1917
 
1918
+ #: ../admin/setup.php:15
1919
  msgid "Reset all settings to default parameter"
1920
  msgstr "Stelle alle Einstellungen auf Anfangswerte zurück"
1921
 
1922
+ #: ../admin/setup.php:26
1923
  msgid "Uninstall sucessfull ! Now delete the plugin and enjoy your life ! Good luck !"
1924
  msgstr "Deinstallation erfolgreich ! Nun kannst Du das Plugin löschen und Dein Leben weiterhin genießen ! Stay geeky ! Viel Glück !"
1925
 
1926
+ #: ../admin/setup.php:30
1927
  msgid "Reset options"
1928
  msgstr "Optionen zurücksetzen"
1929
 
1930
+ #: ../admin/setup.php:33
1931
  msgid "Reset all options/settings to the default installation."
1932
  msgstr "Alle Optionen/Einstellungen zurücksetzen"
1933
 
1934
+ #: ../admin/setup.php:34
1935
  msgid "Reset settings"
1936
  msgstr "Einstellungen zurücksetzen"
1937
 
1938
+ #: ../admin/setup.php:34
1939
  msgid ""
1940
  "Reset all options to default settings ?\\n"
1941
  "\\n"
1943
  msgstr ""
1944
  "Alle Optionen zu Standard zurücksetzen ?\\n"
1945
  "\\n"
1946
+ "Wähle [Cancel] um abzubrechen, [OK] zum Fortfahren.\\n"
1947
 
1948
+ #: ../admin/setup.php:39
1949
  msgid "Uninstall plugin tables"
1950
  msgstr "Plugin Tabellen (DB) entfernen"
1951
 
1952
+ #: ../admin/setup.php:44
1953
  msgid "You don't like NextGEN Gallery ?"
1954
  msgstr "Du magst die NextGEN Galerie nicht ?"
1955
 
1956
+ #: ../admin/setup.php:45
1957
  msgid "No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextGEN Gallery does not remove any data that may have been created. "
1958
  msgstr "Null Problemo. Einfach nur vor dem Deaktivieren dieses Plugins den Uninstall-Button betätigen damit alle Tabellen der Galerie entfernt werden."
1959
 
1960
+ #: ../admin/setup.php:47
1961
  msgid "WARNING:"
1962
  msgstr "WARNUNG:"
1963
 
1964
+ #: ../admin/setup.php:48
1965
  msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables"
1966
+ msgstr "Eine einmalig durchgeführte Deinstallation kann nicht mehr rückgängig gemacht werden, da alle Tabellen der Galerie aus der Datenbank entfernt werden und KEIN Backup dieser Galerie-Tabellen angelegt wird."
1967
 
1968
+ #: ../admin/setup.php:48
1969
  msgid "and"
1970
  msgstr "und"
1971
 
1972
+ #: ../admin/setup.php:50
1973
  msgid "Uninstall plugin"
1974
  msgstr "Plugin deinstallieren"
1975
 
1976
+ #: ../admin/setup.php:50
1977
  msgid ""
1978
  "You are about to Uninstall this plugin from WordPress.\\n"
1979
  "This action is not reversible.\\n"
1985
  "\\n"
1986
  "Wähle [Cancel] zum Abbrechen, [OK] zum Deinstallieren.\\n"
1987
 
 
1988
  #: ../admin/showmeta.php:10
1989
+ #: ../admin/showmeta.php:13
1990
  msgid "Cheatin&#8217; uh?"
1991
  msgstr "Cheatin&#8217; uh?"
1992
 
1993
+ #: ../admin/showmeta.php:46
1994
  msgid "EXIF Data"
1995
  msgstr "EXIF Daten"
1996
 
1997
+ #: ../admin/showmeta.php:51
1998
+ #: ../admin/showmeta.php:75
1999
+ #: ../admin/showmeta.php:99
2000
  msgid "Tag"
2001
  msgstr "Stichwort"
2002
 
2003
+ #: ../admin/showmeta.php:52
2004
+ #: ../admin/showmeta.php:76
2005
+ #: ../admin/showmeta.php:100
2006
  msgid "Value"
2007
  msgstr "Wert"
2008
 
2009
+ #: ../admin/showmeta.php:65
2010
  msgid "No exif data"
2011
  msgstr "Keine Exif Daten"
2012
 
2013
+ #: ../admin/showmeta.php:71
2014
  msgid "IPTC Data"
2015
  msgstr "IPTC Daten"
2016
 
2017
+ #: ../admin/showmeta.php:95
2018
  msgid "XMP Data"
2019
  msgstr "XMP Daten"
2020
 
2021
+ #: ../admin/style.php:11
2022
+ msgid "(From the theme folder)"
2023
+ msgstr "(Aus dem Theme Verzeichnis)"
2024
 
2025
+ #: ../admin/style.php:43
 
 
 
 
 
 
 
 
 
 
 
 
2026
  msgid "You do not have sufficient permissions to edit templates for this blog."
2027
+ msgstr "Du hast nicht die benötigten Rechte um Vorlagen in diesem Blog zu bearbeiten."
2028
 
2029
+ #: ../admin/style.php:52
2030
  msgid "CSS file successfully updated"
2031
  msgstr "CSS Datei erfolgreich aktualisiert"
2032
 
2033
+ #: ../admin/style.php:71
2034
+ msgid "Style Editor"
2035
+ msgstr "CSS Editor"
2036
+
2037
+ #: ../admin/style.php:75
2038
  msgid "Activate and use style sheet:"
2039
  msgstr "Aktiviere und nutze Stylesheet:"
2040
 
2041
+ #: ../admin/style.php:95
2042
  msgid "Activate"
2043
  msgstr "Aktiviere"
2044
 
2045
+ #: ../admin/style.php:105
2046
  #, php-format
2047
  msgid "Editing <strong>%s</strong>"
2048
  msgstr "Bearbeite <strong>%s</strong>"
2049
 
2050
+ #: ../admin/style.php:107
2051
  #, php-format
2052
  msgid "Browsing <strong>%s</strong>"
2053
+ msgstr "Durchsuche <strong>%s</strong>"
 
 
 
 
2054
 
2055
+ #: ../admin/style.php:117
2056
  msgid "Version"
2057
  msgstr "Version"
2058
 
2059
+ #: ../admin/style.php:120
2060
+ msgid "Tip : Copy your stylesheet (nggallery.css) to your theme folder, so it will be not lost during a upgrade"
2061
+ msgstr "Keiner Tip : Kopiere das Stylesheet (nggaller.css) in dein Theme-Verzeichnis, dadurch wird es beim nächsten Update nicht überschrieben."
2062
 
2063
  #: ../admin/style.php:122
2064
+ msgid "Your theme contain a NextGEN Gallery stylesheet (nggallery.css), this file will be used"
2065
+ msgstr "Dein Theme-Paket enthält eine NextGEN Gallery Stylesheet (nggallery.css), dieses Sheet wird automatisch eingebunden"
2066
+
2067
+ #: ../admin/style.php:136
2068
+ msgid "Update File"
2069
+ msgstr "Datei aktualisieren"
2070
+
2071
+ #: ../admin/style.php:139
2072
  msgid "If this file were writable you could edit it."
2073
  msgstr "Wenn diese Datei beschreibbar wäre, könntest Du sie bearbeiten."
2074
 
2075
+ #: ../admin/style.php:144
2076
  msgid "Oops, no such file exists! Double check the name and try again, merci."
2077
  msgstr "Oha, eine solche Datei existiert nicht! Bitte überprüfe den Namen und probiere es erneut, danke."
2078
 
2079
+ #: ../admin/tags.php:38
2080
+ msgid "Most popular"
2081
+ msgstr "Beliebteste Stichwörter"
2082
 
2083
+ #: ../admin/tags.php:39
2084
+ msgid "Least used"
2085
+ msgstr "Zuletzt benutzt"
2086
+
2087
+ #: ../admin/tags.php:40
2088
+ msgid "Alphabetical"
2089
+ msgstr "Alphabetisch"
2090
+
2091
+ #: ../admin/tags.php:95
2092
+ msgid "Manage image tags"
2093
+ msgstr "Verwalte Bilder Stichwörter"
2094
+
2095
+ #: ../admin/tags.php:107
2096
+ msgid "Existing Tags"
2097
+ msgstr "Vorhandene Stichwörter"
2098
 
2099
+ #: ../admin/tags.php:111
2100
+ msgid "Search tags"
2101
+ msgstr "Suche nach Stichwörter"
 
2102
 
2103
+ #: ../admin/tags.php:115
2104
+ msgid "Go"
2105
+ msgstr "Start"
 
2106
 
2107
+ #: ../admin/tags.php:120
2108
+ msgid "Sort Order:"
2109
+ msgstr "Sortierung :"
2110
+
2111
+ #: ../admin/tags.php:137
2112
+ #, php-format
2113
+ msgid "View all images tagged with %s"
2114
+ msgstr "Zeige alle Bilder die mit dem Stichwort %s markiert sind"
2115
+
2116
+ #: ../admin/tags.php:152
2117
+ #: ../admin/tags.php:156
2118
+ #: ../admin/tags.php:169
2119
+ msgid "Previous tags"
2120
+ msgstr "Vorheriges Stichwort"
2121
+
2122
+ #: ../admin/tags.php:165
2123
+ msgid "Next tags"
2124
+ msgstr "Nächstes Stichwörter"
2125
+
2126
+ #: ../admin/tags.php:177
2127
+ msgid "Rename Tag"
2128
+ msgstr "Schlagwort umbenennen"
2129
+
2130
+ #: ../admin/tags.php:185
2131
+ msgid "Enter the tag to rename and its new value. You can use this feature to merge tags too. Click \"Rename\" and all posts which use this tag will be updated."
2132
+ msgstr "Trage das Stichwort ein, das Du umbenennen willst und seinen neuen Wert/Namen. Du kannst diese Funktion auch nutzen, um Stichwörter zusammenzuführen. Klicke auf \"Umbenennen\" und alle Bilder, die das Stichwort verwenden, werden aktualisiert."
2133
+
2134
+ #: ../admin/tags.php:186
2135
+ #: ../admin/tags.php:234
2136
+ msgid "You can specify multiple tags to rename by separating them with commas."
2137
+ msgstr "Mehrere Stichwörter zum Umbenennen durch Komma trennen"
2138
+
2139
+ #: ../admin/tags.php:190
2140
+ msgid "Tag(s) to rename:"
2141
+ msgstr "Stichwörter umbennenen :"
2142
+
2143
+ #: ../admin/tags.php:194
2144
+ msgid "New tag name(s):"
2145
+ msgstr "Neuer Name für das Stichwort"
2146
+
2147
+ #: ../admin/tags.php:197
2148
+ msgid "Rename"
2149
+ msgstr "Umbenennen"
2150
+
2151
+ #: ../admin/tags.php:203
2152
+ msgid "Delete Tag"
2153
+ msgstr "Stichwort löschen"
2154
+
2155
+ #: ../admin/tags.php:211
2156
+ msgid "Enter the name of the tag to delete. This tag will be removed from all posts."
2157
+ msgstr "Trage das zu löschenden Stichwort ein. Das Stichwort wird aus allen Bildern entfernt."
2158
+
2159
+ #: ../admin/tags.php:212
2160
+ msgid "You can specify multiple tags to delete by separating them with commas"
2161
+ msgstr "Du kannst mehrere Stichwörter zum Löschen markieren, indem Du sie mit Kommas trennst"
2162
+
2163
+ #: ../admin/tags.php:216
2164
+ msgid "Tag(s) to delete:"
2165
+ msgstr "Folgede Stichwörter löschen:"
2166
+
2167
+ #: ../admin/tags.php:225
2168
+ msgid "Edit Tag Slug"
2169
+ msgstr "Ändere Schlagwort"
2170
+
2171
+ #: ../admin/tags.php:233
2172
+ msgid "Enter the tag name to edit and its new slug. <a href=\"http://codex.wordpress.org/Glossary#Slug\">Slug definition</a>"
2173
+ msgstr "Trage den Namen des zu ändernden Stichwort und seinen neuen \"Slug\" ein. <a href=\"http://codex.wordpress.org/Glossary#Slug\">Was ist ein Slug?</a>"
2174
+
2175
+ #: ../admin/tags.php:238
2176
+ msgid "Tag(s) to match:"
2177
+ msgstr "Stichwörter vergleichen :"
2178
+
2179
+ #: ../admin/tags.php:242
2180
+ msgid "Slug(s) to set:"
2181
+ msgstr "Schlagwörter setzen:"
2182
+
2183
+ #: ../admin/upgrade.php:74
2184
+ msgid "Update database structure"
2185
+ msgstr "Aktualisiere die Datenbank-Struturen"
2186
+
2187
+ #: ../admin/upgrade.php:135
2188
+ msgid "Some folders/files could not renamed, please recheck the permission and rescan the folder in the manage gallery section."
2189
+ msgstr "Einige Verzeichnisse / Bilder konnten nicht umbenannt werden, bitte überprüfe die Zugriffsrechte und Scanne dann das Verzeichnis neu ein."
2190
+
2191
+ #: ../admin/upgrade.php:137
2192
+ msgid "Rename failed"
2193
+ msgstr "Konnte nicht umbenannt werden"
2194
+
2195
+ #: ../admin/upgrade.php:177
2196
+ #: ../admin/upgrade.php:197
2197
+ msgid "Upgrade NextGEN Gallery"
2198
+ msgstr "NextGEN Gallery aktualisieren"
2199
+
2200
+ #: ../admin/upgrade.php:178
2201
+ msgid "The script detect that you upgrade from a older version."
2202
+ msgstr "Es wurde eine ältere NextGEN Datenbank erkannt."
2203
+
2204
+ #: ../admin/upgrade.php:179
2205
+ msgid "Your database tables for NextGEN Gallery is out-of-date, and must be upgraded before you can continue."
2206
+ msgstr "Deinen Datenbank für NextGEN Gallery ist nicht auf dem aktuellen Stand, Sie muss jetzt aktualisiert werden."
2207
+
2208
+ #: ../admin/upgrade.php:180
2209
+ msgid "If you would like to downgrade later, please make first a complete backup of your database and the images."
2210
+ msgstr "Wenn du wieder auf eine älter Version zurückgehen möchtest, musst du vorher die Datenbank sichern."
2211
+
2212
+ #: ../admin/upgrade.php:181
2213
+ msgid "The upgrade process may take a while, so please be patient."
2214
+ msgstr "Der Upgrade Prozess kann etwas dauern, bitte sei geduldig..."
2215
+
2216
+ #: ../admin/upgrade.php:182
2217
+ msgid "Start upgrade now"
2218
+ msgstr "Aktualisierung starten"
2219
+
2220
+ #: ../admin/upgrade.php:199
2221
+ msgid "Upgrade sucessfull"
2222
+ msgstr "Aktualisierung erfolgreich"
2223
+
2224
+ #: ../admin/upgrade.php:200
2225
+ msgid "Continue"
2226
+ msgstr "Weiter"
2227
+
2228
+ #: ../admin/wpmu.php:32
2229
+ msgid "Update successfully"
2230
+ msgstr "Aktualisierung erfolgreich"
2231
 
2232
  #: ../admin/wpmu.php:41
2233
  msgid "General WordPress MU Settings"
2277
  msgid "Choose the default style for the galleries."
2278
  msgstr "Wähle das Default-Stylesheet für die Galerien"
2279
 
2280
+ #: ../admin/tinymce/window.php:8
2281
+ msgid "You are not allowed to be here"
2282
+ msgstr "Keine Zugrangsberechtigung"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2283
 
2284
+ #: ../admin/tinymce/window.php:41
2285
+ msgid "Select gallery"
2286
+ msgstr "Wähle Galerie"
2287
 
2288
+ #: ../admin/tinymce/window.php:55
2289
+ #: ../admin/tinymce/window.php:83
2290
+ msgid "Show as"
2291
+ msgstr "Zeige als"
2292
 
2293
+ #: ../admin/tinymce/window.php:56
2294
+ msgid "Image list"
2295
+ msgstr "Bilder-Liste"
2296
 
2297
+ #: ../admin/tinymce/window.php:58
2298
+ msgid "Imagebrowser"
2299
+ msgstr "Bilder Browser"
2300
 
2301
+ #: ../admin/tinymce/window.php:71
2302
+ msgid "No album"
2303
+ msgstr "Kein Album"
 
 
 
 
2304
 
2305
+ #: ../admin/tinymce/window.php:84
2306
+ msgid "Extended version"
2307
+ msgstr "Erweiterte Version"
2308
 
2309
+ #: ../admin/tinymce/window.php:85
2310
+ msgid "Compact version"
2311
+ msgstr "Kompakte Version"
2312
 
2313
+ #: ../admin/tinymce/window.php:96
2314
+ msgid "Select picture"
2315
+ msgstr "Wähle Bild"
2316
 
2317
+ #: ../admin/tinymce/window.php:98
2318
+ msgid "No picture"
2319
+ msgstr "Kein Bild"
2320
 
2321
+ #: ../admin/tinymce/window.php:110
2322
+ msgid "Width x Height"
2323
+ msgstr "Breite x Höhe"
2324
 
2325
+ #: ../admin/tinymce/window.php:114
2326
+ msgid "Effect"
2327
+ msgstr "Effekt"
2328
 
2329
+ #: ../admin/tinymce/window.php:117
2330
+ msgid "No effect"
2331
+ msgstr "Kein Effekt"
2332
 
2333
+ #: ../admin/tinymce/window.php:119
2334
+ msgid "Web 2.0"
2335
+ msgstr "Web 2.0"
2336
 
2337
+ #: ../admin/tinymce/window.php:124
2338
+ msgid "Float"
2339
+ msgstr "Float"
2340
 
2341
+ #: ../admin/tinymce/window.php:127
2342
+ msgid "No float"
2343
+ msgstr "Kein Float"
 
2344
 
2345
+ #: ../admin/tinymce/window.php:146
2346
+ msgid "Insert"
2347
+ msgstr "Einfügen"
2348
 
2349
+ #: ../lib/meta.php:83
2350
  msgid " mm"
2351
  msgstr " mm"
2352
 
2353
+ #: ../lib/meta.php:89
2354
  msgid " sec"
2355
  msgstr " Sek."
2356
 
2357
+ #: ../lib/meta.php:367
2358
+ #: ../view/imagebrowser-exif.php:42
2359
  msgid "Aperture"
2360
  msgstr "Blende"
2361
 
2362
+ #: ../lib/meta.php:368
2363
+ #: ../lib/meta.php:393
2364
  msgid "Credit"
2365
  msgstr "Autor"
2366
 
2367
+ #: ../lib/meta.php:369
2368
  msgid "Camera"
2369
  msgstr "Kamera"
2370
 
2371
+ #: ../lib/meta.php:370
2372
  msgid "Caption"
2373
  msgstr "Beschreibung"
2374
 
2375
+ #: ../lib/meta.php:372
 
 
 
 
2376
  msgid "Copyright"
2377
  msgstr "Rechte"
2378
 
2379
+ #: ../lib/meta.php:373
2380
  msgid "Focal length"
2381
  msgstr "Brennweite"
2382
 
2383
+ #: ../lib/meta.php:374
2384
  msgid "ISO"
2385
  msgstr "ISO"
2386
 
2387
+ #: ../lib/meta.php:375
2388
+ #: ../view/imagebrowser-exif.php:50
2389
  msgid "Shutter speed"
2390
  msgstr "Belichtungszeit"
2391
 
2392
+ #: ../lib/meta.php:379
2393
  msgid "Subject"
2394
  msgstr "Betreff"
2395
 
2396
+ #: ../lib/meta.php:380
2397
  msgid "Make"
2398
  msgstr "Hersteller"
2399
 
2400
+ #: ../lib/meta.php:381
2401
  msgid "Edit Status"
2402
  msgstr "Ändere Status"
2403
 
2404
+ #: ../lib/meta.php:382
2405
  msgid "Category"
2406
  msgstr "Kategorie"
2407
 
2408
+ #: ../lib/meta.php:383
2409
  msgid "Keywords"
2410
  msgstr "Schlüsselwörter"
2411
 
2412
+ #: ../lib/meta.php:384
2413
  msgid "Date Created"
2414
  msgstr "erstellt (Datum)"
2415
 
2416
+ #: ../lib/meta.php:385
2417
  msgid "Time Created"
2418
  msgstr "erstellt (Zeit)"
2419
 
2420
+ #: ../lib/meta.php:386
2421
  msgid "Author Position"
2422
  msgstr "Autor Position"
2423
 
2424
+ #: ../lib/meta.php:387
2425
  msgid "City"
2426
  msgstr "Stadt"
2427
 
2428
+ #: ../lib/meta.php:388
2429
  msgid "Location"
2430
  msgstr "Ort"
2431
 
2432
+ #: ../lib/meta.php:389
2433
  msgid "Province/State"
2434
  msgstr "Staat / PLZ"
2435
 
2436
+ #: ../lib/meta.php:390
2437
  msgid "Country code"
2438
  msgstr "Landescode"
2439
 
2440
+ #: ../lib/meta.php:391
2441
  msgid "Country"
2442
  msgstr "Land"
2443
 
2444
+ #: ../lib/meta.php:392
2445
  msgid "Headline"
2446
  msgstr "Kopfzeile"
2447
 
2448
+ #: ../lib/meta.php:394
2449
  msgid "Source"
2450
  msgstr "Quelle"
2451
 
2452
+ #: ../lib/meta.php:395
2453
  msgid "Copyright Notice"
2454
  msgstr "Copyright Hinweise / Credits"
2455
 
2456
+ #: ../lib/meta.php:396
2457
  msgid "Contact"
2458
  msgstr "Kontakt"
2459
 
2460
+ #: ../lib/meta.php:397
2461
  msgid "Last modified"
2462
  msgstr "Zuletzt geändert"
2463
 
2464
+ #: ../lib/meta.php:398
2465
  msgid "Program tool"
2466
  msgstr "Programm"
2467
 
2468
+ #: ../lib/meta.php:399
2469
  msgid "Format"
2470
  msgstr "Format"
2471
 
2472
+ #: ../lib/ngg-db.php:198
2473
+ msgid "Album overview"
2474
+ msgstr "Album Übersicht"
2475
+
2476
+ #: ../lib/shortcodes.php:268
2477
+ msgid "[Pictures not found]"
2478
+ msgstr "[Bilder nicht gefunden]"
2479
+
2480
+ #: ../lib/tags.php:35
2481
+ msgid "No new tag specified!"
2482
+ msgstr "Kein neues Stichwort definiert!"
2483
+
2484
+ #: ../lib/tags.php:50
2485
+ msgid "No new/old valid tag specified!"
2486
+ msgstr "Kein neues Stichwort definiert !"
2487
+
2488
+ #: ../lib/tags.php:86
2489
+ msgid "No tag renamed."
2490
+ msgstr "Kein Stichwort umbenannt."
2491
+
2492
+ #: ../lib/tags.php:88
2493
+ #, php-format
2494
+ msgid "Renamed tag(s) &laquo;%1$s&raquo; to &laquo;%2$s&raquo;"
2495
+ msgstr "Es wurden die Stichwörter &laquo;%1$s&raquo; bis &laquo;%2$s&raquo; umbenannt"
2496
+
2497
+ #: ../lib/tags.php:95
2498
+ msgid "No valid new tag."
2499
+ msgstr "Kein gültiges Stichwort"
2500
+
2501
+ #: ../lib/tags.php:112
2502
+ msgid "No objects (post/page) found for specified old tags."
2503
+ msgstr "Keine Objekte (Seite/Beitrag) enthält das ausgewählte Stichwort"
2504
+
2505
+ #: ../lib/tags.php:141
2506
+ msgid "No tag merged."
2507
+ msgstr "Keine Stichwörter zusammengeführt."
2508
+
2509
+ #: ../lib/tags.php:143
2510
+ #, php-format
2511
+ msgid "Merge tag(s) &laquo;%1$s&raquo; to &laquo;%2$s&raquo;. %3$s objects edited."
2512
+ msgstr "Stichwörter &laquo;%1$s&raquo; bis &laquo;%2$s&raquo; zusammengeführt. %3$s Objekte geändert."
2513
+
2514
+ #: ../lib/tags.php:146
2515
+ msgid "Error. No enough tags for rename. Too for merge. Choose !"
2516
+ msgstr "Fehler. Es wurden nicht genung Stichwörter ausgewählt."
2517
+
2518
+ #: ../lib/tags.php:163
2519
+ msgid "No tag specified!"
2520
+ msgstr "Kein Stichwort angegeben"
2521
+
2522
+ #: ../lib/tags.php:186
2523
+ msgid "No tag deleted."
2524
+ msgstr "Kein Stichwort gelöscht"
2525
+
2526
+ #: ../lib/tags.php:188
2527
+ #, php-format
2528
+ msgid "%1s tag(s) deleted."
2529
+ msgstr "%1s Stichwörter gelöscht"
2530
+
2531
+ #: ../lib/tags.php:202
2532
+ msgid "No new slug(s) specified!"
2533
+ msgstr "Keine neuen Stichwörter ausgewählt"
2534
+
2535
+ #: ../lib/tags.php:214
2536
+ msgid "Tags number and slugs number isn't the same!"
2537
+ msgstr "Stichwort und Schlagwort ist nicht das gleiche!"
2538
+
2539
+ #: ../lib/tags.php:241
2540
+ msgid "No slug edited."
2541
+ msgstr "Kein Stichwort geändert"
2542
+
2543
+ #: ../lib/tags.php:243
2544
+ #, php-format
2545
+ msgid "%s slug(s) edited."
2546
+ msgstr "%s Stichwörter geändert"
2547
+
2548
+ #: ../view/album-compact.php:31
2549
+ #: ../view/album-extend.php:29
2550
+ msgid "Photos"
2551
+ msgstr "Fotos"
2552
+
2553
+ #: ../view/gallery.php:32
2554
+ #: ../widgets/media-rss-widget.php:236
2555
+ msgid "[View with PicLens]"
2556
+ msgstr "[Mit PicLens anzeigen]"
2557
+
2558
+ #: ../view/imagebrowser-exif.php:26
2559
+ #: ../view/imagebrowser.php:26
2560
+ msgid "Back"
2561
+ msgstr "Zurück"
2562
+
2563
+ #: ../view/imagebrowser-exif.php:29
2564
+ #: ../view/imagebrowser.php:29
2565
+ msgid "Next"
2566
+ msgstr "Vor"
2567
+
2568
+ #: ../view/imagebrowser-exif.php:31
2569
+ #: ../view/imagebrowser.php:31
2570
+ msgid "of"
2571
+ msgstr "von"
2572
+
2573
+ #: ../view/imagebrowser-exif.php:34
2574
+ msgid "Meta data"
2575
+ msgstr "Metadaten"
2576
+
2577
+ #: ../view/imagebrowser-exif.php:38
2578
+ msgid "Camera / Type"
2579
+ msgstr "Kameratyp"
2580
+
2581
+ #: ../view/imagebrowser-exif.php:46
2582
+ msgid "Focal Length"
2583
+ msgstr "Brennweite"
2584
+
2585
+ #: ../widgets/media-rss-widget.php:31
2586
+ msgid "NextGEN Media RSS"
2587
+ msgstr "NextGEN Media RSS"
2588
+
2589
+ #: ../widgets/media-rss-widget.php:37
2590
+ msgid "Widget that displays Media RSS links for NextGEN Gallery."
2591
+ msgstr "Hiermit können NextGEN Bilder als Media RSS eingebunden werden"
2592
+
2593
+ #: ../widgets/media-rss-widget.php:135
2594
+ #: ../widgets/media-rss-widget.php:203
2595
+ #: ../widgets/media-rss-widget.php:260
2596
+ msgid "Media RSS"
2597
+ msgstr "Media RSS"
2598
+
2599
+ #: ../widgets/media-rss-widget.php:136
2600
+ #: ../widgets/media-rss-widget.php:261
2601
+ msgid "Link to the main image feed"
2602
+ msgstr "Link zum Bilder-Feed"
2603
+
2604
+ #: ../widgets/media-rss-widget.php:153
2605
+ #: ../widgets/widgets.php:134
2606
+ msgid "Title:"
2607
+ msgstr "Titel:"
2608
+
2609
+ #: ../widgets/media-rss-widget.php:160
2610
+ msgid "Media RSS icon:"
2611
+ msgstr "Media RSS Icon:"
2612
+
2613
+ #: ../widgets/media-rss-widget.php:168
2614
+ msgid "Show the global Media RSS link:"
2615
+ msgstr "Zeige den globalen Media RSS Link:"
2616
+
2617
+ #: ../widgets/media-rss-widget.php:172
2618
+ msgid "Text for the global Media RSS link:"
2619
+ msgstr "Text für den globalen Media RSS link:"
2620
+
2621
+ #: ../widgets/media-rss-widget.php:178
2622
+ msgid "Tooltip text for the global Media RSS link:"
2623
+ msgstr "Tooltip-Text für den globalen Media RSS Link."
2624
+
2625
+ #: ../widgets/widgets.php:28
2626
+ msgid "Show a NextGEN Gallery Slideshow"
2627
+ msgstr "Binde eine NextGEN Gallery Slideshow eine"
2628
+
2629
+ #: ../widgets/widgets.php:29
2630
+ #: ../widgets/widgets.php:30
2631
+ msgid "NextGEN Slideshow"
2632
+ msgstr "NextGEN Diashow"
2633
+
2634
+ #: ../widgets/widgets.php:54
2635
+ msgid "<a href=\"http://www.macromedia.com/go/getflashplayer\">Get the Flash Player</a> to see the slideshow."
2636
+ msgstr "<a href=\"http://www.macromedia.com/go/getflashplayer\">Lade Dir den Flash Player</a> um die Diashow zu sehen."
2637
+
2638
+ #: ../widgets/widgets.php:136
2639
+ msgid "Select Gallery:"
2640
  msgstr "Wähle Galerie"
2641
 
2642
+ #: ../widgets/widgets.php:138
2643
+ msgid "All images"
2644
+ msgstr "Alle Bilder"
 
 
 
2645
 
2646
+ #: ../widgets/widgets.php:151
2647
+ msgid "Height:"
2648
+ msgstr "Höhe:"
 
2649
 
2650
+ #: ../widgets/widgets.php:152
2651
+ msgid "Width:"
2652
+ msgstr "Breite:"
 
2653
 
2654
+ #: ../widgets/widgets.php:185
2655
+ msgid "Add recent or random images from the galleries"
2656
+ msgstr "Füge die neusten Bilder oder Zufallsbilder aus NextGEN Gallery ein"
 
2657
 
2658
+ #: ../widgets/widgets.php:187
2659
+ msgid "NextGEN Widget"
2660
+ msgstr "NextGEN Widget"
 
2661
 
2662
+ #: ../widgets/widgets.php:285
2663
+ msgid "Title :"
2664
+ msgstr "Titel :"
 
2665
 
2666
+ #: ../widgets/widgets.php:291
2667
+ msgid "Show :"
2668
+ msgstr "Zeige als :"
 
2669
 
2670
+ #: ../widgets/widgets.php:297
2671
+ msgid "Orginal images"
2672
+ msgstr "Orginal Bilder"
 
2673
 
2674
+ #: ../widgets/widgets.php:305
2675
+ msgid "recent added "
2676
+ msgstr "zuletzt hinzugefügt"
 
2677
 
2678
+ #: ../widgets/widgets.php:310
2679
+ msgid "Width x Height :"
2680
+ msgstr "Breite x Höhe :"
 
2681
 
2682
+ #: ../widgets/widgets.php:317
2683
+ msgid "Select :"
2684
+ msgstr "Wähle :"
 
2685
 
2686
+ #: ../widgets/widgets.php:319
2687
+ msgid "All galleries"
2688
+ msgstr "Alle Galerien"
 
2689
 
2690
+ #: ../widgets/widgets.php:320
2691
+ msgid "Only which are not listed"
2692
+ msgstr "Nur ungelistete"
2693
+
2694
+ #: ../widgets/widgets.php:321
2695
+ msgid "Only which are listed"
2696
+ msgstr "Nur gelistete"
2697
+
2698
+ #: ../widgets/widgets.php:327
2699
+ msgid "Gallery ID :"
2700
+ msgstr "Galerie ID :"
2701
+
2702
+ #: ../widgets/widgets.php:329
2703
+ msgid "Gallery IDs, separated by commas."
2704
+ msgstr "Galerie ID's, mit Kommas getrennt"
2705
+
2706
+ #: ../xml/media-rss.php:58
2707
+ msgid "No galleries have been yet created."
2708
+ msgstr "Keine Galerie wurde derzeit erstellt."
2709
+
2710
+ #: ../xml/media-rss.php:77
2711
+ #, php-format
2712
+ msgid "The gallery ID=%s does not exist."
2713
+ msgstr "Die Galerie ID=%s existiert nicht."
2714
 
2715
+ #: ../xml/media-rss.php:108
2716
+ msgid "No album ID has been provided as parameter"
2717
+ msgstr "Es wurde kein Album als Parameter übergeben"
2718
+
2719
+ #: ../xml/media-rss.php:116
2720
+ #, php-format
2721
+ msgid "The album ID=%s does not exist."
2722
+ msgstr "Album-ID %s existiert nicht"
2723
+
2724
+ #: ../xml/media-rss.php:123
2725
+ #, php-format
2726
+ msgid "Invalid MediaRSS command (%s)."
2727
+ msgstr "Ungültiger Media RSS Befehl (%s)"
2728
+
2729
+ #~ msgid "Add Gallery"
2730
+ #~ msgstr "Bilder/Galerie hinzufügen"
2731
+ #~ msgid "Manage galleries"
2732
+ #~ msgstr "Galerie verwalten"
2733
+ #~ msgid ""
2734
+ #~ "There are totally %1$s pictures in %2$s galleries, which are spread "
2735
+ #~ "across %3$s albums."
2736
+ #~ msgstr ""
2737
+ #~ "Es gibt insgesamt %1$s Bilder in %2$s Galerien - verteilt in %3$s Alben."
2738
+ #~ msgid "GD support"
2739
+ #~ msgstr "GD Unterstützung"
2740
+ #~ msgid "ImageMagick"
2741
+ #~ msgstr "ImageMagick"
2742
+ #~ msgid "Add Metadata :"
2743
+ #~ msgstr "Metadaten hinzufügen :"
2744
+ #~ msgid "Import EXIF, IPTC or XMP data (if available)"
2745
+ #~ msgstr "EXIF, IPTC oder XMP Daten importieren (wenn verfügbar)"
2746
+ #~ msgid "New Version available"
2747
+ #~ msgstr "Neue Version verfügbar !!"
2748
+ #~ msgid ""
2749
+ #~ "The server reports that a new NextGEN Gallery Version is now available. "
2750
+ #~ "Please visit the plugin homepage for more information."
2751
+ #~ msgstr ""
2752
+ #~ "Der Server benachrichtigt Dich über eine neu verfügbare Version der "
2753
+ #~ "NextGEN Galerie. Bitte besuche die Plugin Homepage um weitere "
2754
+ #~ "Informationen zu erhalten."
2755
+ #~ msgid "Resample Mode"
2756
+ #~ msgstr "Resample Modus"
2757
+ #~ msgid "Value between 1-5 (higher value, more CPU load)"
2758
+ #~ msgstr "Wähle zwischen 1-5 (je höhere desto länger braucht der Server)"
2759
+ #~ msgid "NextGEN Gallery %d"
2760
+ #~ msgstr "NextGEN Gallery %d"
2761
+ #~ msgid "How many NextGEN Gallery widgets would you like?"
2762
+ #~ msgstr "Wie viele NextGEN Gallery Widgets möchtest du haben ?"
2763
+ #~ msgid "Save"
2764
+ #~ msgstr "Speichern"
2765
+ #~ msgid "Select loading image"
2766
+ #~ msgstr "Wähle Ladeanimation"
2767
+ #~ msgid "for Simple:Press Forum, it saved me a lot of time"
2768
+ #~ msgstr "für das Simple:Press Forum, welches mir viel Zeit sparte"
2769
+ #~ msgid "Sorry, NextGEN Gallery works only under WordPress 2.5 or higher"
2770
+ #~ msgstr ""
2771
+ #~ "Tut mir leid aber NextGEN Galerie arbeitet nur ab WordPress 2.5 und "
2772
+ #~ "aufwärts"
2773
+ #~ msgid "Watch gallery"
2774
+ #~ msgstr "Galerie ansehen"
2775
+ #~ msgid "from"
2776
+ #~ msgstr "von"
2777
+ #~ msgid "Running... Please wait"
2778
+ #~ msgstr "Läuft... Bitte warten"
2779
+ #~ msgid " : Image resized..."
2780
+ #~ msgstr " : Bild angepasst..."
2781
+ #~ msgid "Some pictures are not writeable :"
2782
+ #~ msgstr "Einige Bilder sind schreibgeschützt :"
2783
+ #~ msgid " : Watermark created..."
2784
+ #~ msgstr " : Wasserzeichen gesetzt..."
2785
+ #~ msgid " : Thumbnail created..."
2786
+ #~ msgstr ": Thumbnail erstellt..."
2787
+ #~ msgid "Follow thumbnails could not created."
2788
+ #~ msgstr "Folgende Thumbnails konnten nicht erstellt werden :"
2789
+ #~ msgid "Some thumbnails are not writeable :"
2790
+ #~ msgstr "Einige Thumbnails sind schreibgeschützt :"
2791
+ #~ msgid "Watermark successfully added"
2792
+ #~ msgstr "Wasserzeichen erfolgreich erstellt"
2793
+ #~ msgid "Images successfully resized"
2794
+ #~ msgstr "Bilder erfolgreich verkleinert"
2795
+ #~ msgid "View"
2796
+ #~ msgstr "Ansehen"
2797
+ #~ msgid " (require WordPress 2.3 or higher)"
2798
+ #~ msgstr " (benötigt WordPress 2.3 oder höher)"
2799
+ #~ msgid "Show thumbnail description"
2800
+ #~ msgstr "Zeige Bildbeschreibung"
2801
+ #~ msgid "Description text"
2802
+ #~ msgstr "Beschreibung"
2803
+ #~ msgid "Import a folder with images. Please note :"
2804
+ #~ msgstr "Importiere ein Verzeichniss mit Bildern. Bitte beachte:"
2805
+ #~ msgid "For safe-mode = ON you need to add the subfolder thumbs manually"
2806
+ #~ msgstr ""
2807
+ #~ "Da der Safe-Mode (PHP.INI) eingeschaltet ist, mußt Du das "
2808
+ #~ "Unterverzeichnis für die Vorschaubilder (\"thumbs\") manuell (per FTP) "
2809
+ #~ "anlegen"
2810
+ #~ msgid "The Zip-file is too large. Exceed Memory limit !"
2811
+ #~ msgstr "Das Zip-File ist zu groß. Speicherlimit überschritten !"
2812
+ #~ msgid "Main settings"
2813
+ #~ msgstr "Haupteinstellungen"
2814
+ #~ msgid "Summary"
2815
+ #~ msgstr "Zusammenfassung"
2816
+ #~ msgid "Welcome"
2817
+ #~ msgstr "Willkommen"
2818
+ #~ msgid ""
2819
+ #~ "Welcome to NextGEN Gallery. Here you can control your images, galleries "
2820
+ #~ "and albums. You currently have %s rights."
2821
+ #~ msgstr ""
2822
+ #~ "Willkommen zur NextGEN Galerie. Hier kannst Du Deine Bilder, Galerien und "
2823
+ #~ "Alben verwalten. Du hast im Moment %s Rechte."
2824
+ #~ msgid "Add a new gallery or import pictures"
2825
+ #~ msgstr "Neue Galerie erstellen oder Bilder importieren"
2826
+ #~ msgid "Manage galleries and images"
2827
+ #~ msgstr "Verwalte Galerien und Bilder"
2828
+ #~ msgid "Create and manage albums"
2829
+ #~ msgstr "Erstelle und verwalte Alben"
2830
+ #~ msgid "URL"
2831
+ #~ msgstr "URL"
2832
+ #~ msgid "Delete File"
2833
+ #~ msgstr "Datei löschen"
2834
+ #~ msgid "Delete image ?"
2835
+ #~ msgstr "Bilder löschen ?"
2836
+ #~ msgid "Browse your files"
2837
+ #~ msgstr "Durchsuche deine Dateien"
2838
+ #~ msgid "&laquo; Back"
2839
+ #~ msgstr "&laquo; Zurück"
2840
+ #~ msgid "Direct link to file"
2841
+ #~ msgstr "Link zur Datei"
2842
+ #~ msgid "Show:"
2843
+ #~ msgstr "Zeige als:"
2844
+ #~ msgid "Link to:"
2845
+ #~ msgstr "Link zu:"
2846
+ #~ msgid "File"
2847
+ #~ msgstr "Datei"
2848
+ #~ msgid "Send to editor &raquo;"
2849
+ #~ msgstr "Zum Editor schicken &raquo;"
2850
+ #~ msgid "Save &raquo;"
2851
+ #~ msgstr "Speichern &raquo;"
2852
+ #~ msgid ""
2853
+ #~ "Are you sure you want to delete the file '%s'?\n"
2854
+ #~ "Click ok to delete or cancel to go back."
2855
+ #~ msgstr "Bist du sicher das Du diese Datei '%s' löschen willst ?"
2856
+ #~ msgid "Alt/Titel text"
2857
+ #~ msgstr "Alt / Titel Text"
2858
 
lang/nggallery.po CHANGED
@@ -2,222 +2,129 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-05-18 12:15+0100\n"
6
- "PO-Revision-Date: 2008-05-18 12:15+0100\n"
7
- "Last-Translator: Alex Rabe\n"
8
  "Language-Team: Alex Rabe\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-Country: GERMANY\n"
15
  "X-Poedit-SourceCharset: utf-8\n"
 
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPath-1: ..\n"
18
 
19
- #: ../nggallery.php:61
20
- msgid "Sorry, NextGEN Gallery works only under WordPress 2.1 or higher"
21
- msgstr ""
22
-
23
- #: ../nggallery.php:68
24
  msgid "Sorry, NextGEN Gallery works only with a Memory Limit of 16 MB higher"
25
  msgstr ""
26
 
27
- #: ../nggfunctions.php:449
28
- #: ../nggfunctions.php:464
29
- msgid "Watch gallery"
30
- msgstr ""
31
-
32
- #: ../nggfunctions.php:458
33
- #: ../nggfunctions.php:470
34
- #: ../nggfunctions.php:758
35
- msgid "Photos"
36
- msgstr ""
37
-
38
- #: ../nggfunctions.php:546
39
- msgid "Back"
40
- msgstr ""
41
-
42
- #: ../nggfunctions.php:550
43
- msgid "Next"
44
- msgstr ""
45
-
46
- #: ../nggfunctions.php:553
47
- #: ../admin/manage.php:85
48
- msgid "Picture"
49
- msgstr ""
50
-
51
- #: ../nggfunctions.php:553
52
- msgid "from"
53
- msgstr ""
54
-
55
- #: ../nggfunctions.php:728
56
- msgid "Overview"
57
- msgstr ""
58
-
59
- #: ../ngginstall.php:16
60
- msgid "Sorry, NextGEN Gallery works only with a role called administrator"
61
- msgstr ""
62
-
63
- #: ../ngginstall.php:124
64
- msgid "NextGEN Gallery : Tables could not created, please check your database settings"
65
- msgstr ""
66
-
67
- #: ../ngginstall.php:196
68
- msgid "[Show as slideshow]"
69
- msgstr ""
70
-
71
- #: ../ngginstall.php:197
72
- msgid "[Show picture list]"
73
- msgstr ""
74
-
75
- #: ../nggwidget.php:121
76
- msgid "Title:"
77
- msgstr ""
78
-
79
- #: ../nggwidget.php:122
80
- msgid "Select Gallery:"
81
- msgstr ""
82
-
83
- #: ../nggwidget.php:126
84
- msgid "All images"
85
- msgstr ""
86
-
87
- #: ../nggwidget.php:136
88
- msgid "Height:"
89
- msgstr ""
90
-
91
- #: ../nggwidget.php:137
92
- msgid "Width:"
93
- msgstr ""
94
-
95
- #: ../nggwidget.php:191
96
- #, php-format
97
- msgid "NextGEN Gallery %d"
98
- msgstr ""
99
-
100
- #: ../nggwidget.php:207
101
- msgid "NextGEN Gallery Widgets"
102
- msgstr ""
103
-
104
- #: ../nggwidget.php:208
105
- msgid "How many NextGEN Gallery widgets would you like?"
106
- msgstr ""
107
-
108
- #: ../nggwidget.php:212
109
- msgid "Save"
110
- msgstr ""
111
-
112
- #: ../nggwidget.php:304
113
- msgid "Title :"
114
- msgstr ""
115
-
116
- #: ../nggwidget.php:309
117
- msgid "Show :"
118
- msgstr ""
119
-
120
- #: ../nggwidget.php:314
121
- #: ../admin/settings.php:102
122
- #: ../admin/settings.php:295
123
- msgid "Thumbnails"
124
  msgstr ""
125
 
126
- #: ../nggwidget.php:315
127
- msgid "Orginal images"
128
  msgstr ""
129
 
130
- #: ../nggwidget.php:321
131
- #: ../admin/settings.php:560
132
- msgid "random"
133
  msgstr ""
134
 
135
- #: ../nggwidget.php:322
136
- msgid "recent added "
137
  msgstr ""
138
 
139
- #: ../nggwidget.php:326
140
- msgid "Width x Height :"
141
  msgstr ""
142
 
143
- #: ../nggwidget.php:332
144
- msgid "Select :"
145
  msgstr ""
146
 
147
- #: ../nggwidget.php:334
148
- msgid "All galleries"
 
149
  msgstr ""
150
 
151
- #: ../nggwidget.php:335
152
- msgid "Only which are not listed"
153
  msgstr ""
154
 
155
- #: ../nggwidget.php:336
156
- msgid "Only which are listed"
157
  msgstr ""
158
 
159
- #: ../nggwidget.php:341
160
- msgid "Gallery ID :"
161
  msgstr ""
162
 
163
- #: ../nggwidget.php:343
164
- msgid "Gallery IDs, separated by commas."
 
165
  msgstr ""
166
 
167
  #: ../admin/about.php:9
168
  msgid "Copyright notes / Credits"
169
  msgstr ""
170
 
171
- #: ../admin/about.php:11
172
  msgid "NextGEN DEV Team"
173
  msgstr ""
174
 
175
- #: ../admin/about.php:12
176
  msgid "This plugin is primarily developed, maintained, supported, documented by"
177
  msgstr ""
178
 
179
- #: ../admin/about.php:12
180
  msgid "There are many other folks who have made contributions to this project :"
181
  msgstr ""
182
 
183
- #: ../admin/about.php:14
184
  msgid "Contributors / Tribute to"
185
  msgstr ""
186
 
187
- #: ../admin/about.php:15
188
  msgid "If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together."
189
  msgstr ""
190
 
191
- #: ../admin/about.php:16
192
  msgid "So, we would like to thank the following people for their pioneer work (without this work it's impossible to create such a plugin so fast)"
193
  msgstr ""
194
 
195
- #: ../admin/about.php:18
196
  msgid "for their great documented code"
197
  msgstr ""
198
 
199
- #: ../admin/about.php:19
200
  msgid "for jQuery, which is the best Web2.0 framework"
201
  msgstr ""
202
 
203
- #: ../admin/about.php:20
204
  msgid "for the fantastic PHP Thumbnail Class"
205
  msgstr ""
206
 
207
- #: ../admin/about.php:21
208
  msgid "for PclZip , a PHP library that manage ZIP archives"
209
  msgstr ""
210
 
211
- #: ../admin/about.php:22
212
  msgid "for a lot of very useful plugins and ideas"
213
  msgstr ""
214
 
 
 
 
 
215
  #: ../admin/about.php:23
216
- msgid "for Simple:Press Forum, it saved me a lot of time"
217
  msgstr ""
218
 
219
  #: ../admin/about.php:24
220
- msgid "for the best Media Flash Scripts on earth"
221
  msgstr ""
222
 
223
  #: ../admin/about.php:25
@@ -249,7 +156,7 @@ msgid "Translate the plugin"
249
  msgstr ""
250
 
251
  #: ../admin/about.php:32
252
- msgid "To help people to work with this plugin, I would like to have it in all avaivable languages"
253
  msgstr ""
254
 
255
  #: ../admin/about.php:33
@@ -257,7 +164,7 @@ msgid "Donate the work via paypal"
257
  msgstr ""
258
 
259
  #: ../admin/about.php:44
260
- msgid "No doubt a very usefull and easy motivation :-)"
261
  msgstr ""
262
 
263
  #: ../admin/about.php:46
@@ -276,247 +183,358 @@ msgstr ""
276
  msgid "We would like to thank this people which support us in the work :"
277
  msgstr ""
278
 
279
- #: ../admin/addgallery.php:35
280
- #: ../admin/addgallery.php:51
281
  msgid "Upload failed!"
282
  msgstr ""
283
 
284
- #: ../admin/addgallery.php:56
285
- #: ../admin/functions.php:563
286
- #: ../admin/functions.php:652
287
  msgid "No gallery selected !"
288
  msgstr ""
289
 
290
- #: ../admin/addgallery.php:111
291
  msgid "Image Files"
292
  msgstr ""
293
 
294
- #: ../admin/addgallery.php:131
295
- #: ../admin/addgallery.php:161
296
  msgid "remove"
297
  msgstr ""
298
 
299
- #: ../admin/addgallery.php:132
300
  msgid "Browse..."
301
  msgstr ""
302
 
303
- #: ../admin/addgallery.php:133
304
- #: ../admin/addgallery.php:311
305
  msgid "Upload images"
306
  msgstr ""
307
 
308
- #: ../admin/addgallery.php:177
309
- #: ../admin/addgallery.php:189
310
  msgid "Add new gallery"
311
  msgstr ""
312
 
313
- #: ../admin/addgallery.php:179
314
- #: ../admin/addgallery.php:210
315
  msgid "Upload a Zip-File"
316
  msgstr ""
317
 
318
- #: ../admin/addgallery.php:182
319
- #: ../admin/addgallery.php:250
320
  msgid "Import image folder"
321
  msgstr ""
322
 
323
- #: ../admin/addgallery.php:184
324
- #: ../admin/addgallery.php:274
325
  msgid "Upload Images"
326
  msgstr ""
327
 
328
- #: ../admin/addgallery.php:195
329
  msgid "New Gallery"
330
  msgstr ""
331
 
332
- #: ../admin/addgallery.php:198
333
  msgid "Create a new , empty gallery below the folder"
334
  msgstr ""
335
 
336
- #: ../admin/addgallery.php:200
337
  msgid "Allowed characters for file and folder names are"
338
  msgstr ""
339
 
340
- #: ../admin/addgallery.php:203
341
  msgid "Add gallery"
342
  msgstr ""
343
 
344
- #: ../admin/addgallery.php:216
345
  msgid "Select Zip-File"
346
  msgstr ""
347
 
348
- #: ../admin/addgallery.php:218
349
  msgid "Upload a zip file with images"
350
  msgstr ""
351
 
352
- #: ../admin/addgallery.php:221
353
- #: ../admin/addgallery.php:284
354
  msgid "in to"
355
  msgstr ""
356
 
357
- #: ../admin/addgallery.php:223
358
  msgid "a new gallery"
359
  msgstr ""
360
 
361
- #: ../admin/addgallery.php:233
362
- #: ../admin/addgallery.php:296
363
  msgid "Note : The upload limit on your server is "
364
  msgstr ""
365
 
366
- #: ../admin/addgallery.php:237
367
- #: ../admin/addgallery.php:262
368
- #: ../admin/addgallery.php:300
369
- msgid "Add Metadata :"
370
- msgstr ""
371
-
372
- #: ../admin/addgallery.php:239
373
- #: ../admin/addgallery.php:264
374
- #: ../admin/addgallery.php:302
375
- msgid "Import EXIF, IPTC or XMP data (if available)"
376
- msgstr ""
377
-
378
- #: ../admin/addgallery.php:242
379
  msgid "Start upload"
380
  msgstr ""
381
 
382
- #: ../admin/addgallery.php:256
383
  msgid "Import from Server path:"
384
  msgstr ""
385
 
386
- #: ../admin/addgallery.php:258
387
- msgid "Import a folder with images. Please note :"
388
  msgstr ""
389
 
390
- #: ../admin/addgallery.php:259
391
- msgid "For safe-mode = ON you need to add the subfolder thumbs manually"
392
  msgstr ""
393
 
394
- #: ../admin/addgallery.php:267
395
  msgid "Import folder"
396
  msgstr ""
397
 
398
- #: ../admin/addgallery.php:280
399
  msgid "Upload image"
400
  msgstr ""
401
 
402
- #: ../admin/addgallery.php:286
403
  msgid "Choose gallery"
404
  msgstr ""
405
 
406
- #: ../admin/addgallery.php:307
407
  msgid "The batch upload requires Adobe Flash 9, disable it if you have problems"
408
  msgstr ""
409
 
410
- #: ../admin/addgallery.php:307
411
  msgid "Disable flash upload"
412
  msgstr ""
413
 
414
- #: ../admin/addgallery.php:309
415
  msgid "Upload multiple files at once by ctrl/shift-selecting in dialog"
416
  msgstr ""
417
 
418
- #: ../admin/addgallery.php:309
419
  msgid "Enable flash based upload"
420
  msgstr ""
421
 
422
- #: ../admin/admin.php:75
423
- #: ../admin/functions.php:78
424
- #: ../admin/functions.php:82
425
- #: ../admin/functions.php:128
426
- #: ../admin/manage.php:64
427
- #: ../admin/manage.php:434
428
- #: ../admin/settings.php:104
429
  msgid "Gallery"
430
- msgstr ""
 
 
431
 
432
- #: ../admin/admin.php:76
433
- msgid "Add Gallery"
434
  msgstr ""
435
 
436
- #: ../admin/admin.php:77
437
  msgid "Manage Gallery"
438
  msgstr ""
439
 
440
- #: ../admin/admin.php:78
441
  msgid "Album"
 
 
 
 
 
 
442
  msgstr ""
443
 
444
- #: ../admin/admin.php:79
445
  msgid "Options"
446
  msgstr ""
447
 
448
- #: ../admin/admin.php:81
449
  msgid "Style"
450
  msgstr ""
451
 
452
- #: ../admin/admin.php:82
453
  msgid "Setup Gallery"
454
  msgstr ""
455
 
456
- #: ../admin/admin.php:82
457
  msgid "Setup"
458
  msgstr ""
459
 
460
- #: ../admin/admin.php:84
461
  msgid "Roles"
462
  msgstr ""
463
 
464
- #: ../admin/admin.php:85
465
  msgid "About this Gallery"
466
  msgstr ""
467
 
468
- #: ../admin/admin.php:85
469
  msgid "About"
470
  msgstr ""
471
 
472
- #: ../admin/admin.php:87
473
  msgid "NextGEN Gallery"
474
  msgstr ""
475
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  #: ../admin/album.php:19
477
- #: ../admin/album.php:37
478
  msgid "Update Successfully"
479
  msgstr ""
480
 
481
- #: ../admin/album.php:45
482
  msgid "Album deleted"
483
  msgstr ""
484
 
485
- #: ../admin/album.php:122
486
  msgid "Manage Albums"
487
  msgstr ""
488
 
489
- #: ../admin/album.php:128
490
  msgid "Select album"
491
  msgstr ""
492
 
493
- #: ../admin/album.php:131
494
  msgid "No album selected"
495
  msgstr ""
496
 
497
- #: ../admin/album.php:144
498
- msgid "Add new album"
499
  msgstr ""
500
 
501
- #: ../admin/album.php:148
502
- #: ../admin/manage.php:309
503
- #: ../admin/manage.php:580
504
  msgid "Delete"
505
  msgstr ""
506
 
507
- #: ../admin/album.php:148
508
  msgid "Delete album ?"
509
  msgstr ""
510
 
 
 
 
 
511
  #: ../admin/album.php:150
512
- #: ../admin/settings.php:164
513
- #: ../admin/settings.php:204
514
- #: ../admin/settings.php:251
515
- #: ../admin/settings.php:331
516
- #: ../admin/settings.php:378
517
- #: ../admin/settings.php:490
518
- #: ../admin/settings.php:598
519
- msgid "Update"
520
  msgstr ""
521
 
522
  #: ../admin/album.php:158
@@ -547,1249 +565,1405 @@ msgstr ""
547
  msgid "No album selected!"
548
  msgstr ""
549
 
550
- #: ../admin/album.php:256
551
- #: ../admin/manage.php:283
552
- #: ../admin/manage.php:535
553
  msgid "ID"
554
  msgstr ""
555
 
556
- #: ../admin/album.php:257
557
  msgid "Name"
558
  msgstr ""
559
 
560
- #: ../admin/album.php:258
561
- #: ../admin/manage.php:285
562
- #: ../admin/manage.php:446
563
  msgid "Title"
564
  msgstr ""
565
 
566
- #: ../admin/album.php:259
567
  msgid "Page"
568
  msgstr ""
569
 
570
- #: ../admin/functions.php:20
571
  msgid "No valid gallery name!"
572
  msgstr ""
573
 
574
- #: ../admin/functions.php:27
575
- #: ../admin/functions.php:36
576
- #: ../admin/functions.php:50
577
- #: ../admin/functions.php:102
578
- #: ../admin/functions.php:109
579
  msgid "Directory"
580
  msgstr ""
581
 
582
- #: ../admin/functions.php:27
583
  msgid "didn't exist. Please create first the main gallery folder "
584
  msgstr ""
585
 
586
- #: ../admin/functions.php:28
587
- #: ../admin/functions.php:37
588
  msgid "Check this link, if you didn't know how to set the permission :"
589
  msgstr ""
590
 
591
- #: ../admin/functions.php:36
592
- #: ../admin/functions.php:50
593
  msgid "is not writeable !"
594
  msgstr ""
595
 
596
- #: ../admin/functions.php:45
597
- #: ../admin/functions.php:55
598
- #: ../admin/functions.php:525
599
  msgid "Unable to create directory "
600
  msgstr ""
601
 
602
- #: ../admin/functions.php:59
603
  msgid "The server setting Safe-Mode is on !"
604
  msgstr ""
605
 
606
- #: ../admin/functions.php:60
607
  msgid "If you have problems, please create directory"
608
  msgstr ""
609
 
610
- #: ../admin/functions.php:61
611
  msgid "and the thumbnails directory"
612
  msgstr ""
613
 
614
- #: ../admin/functions.php:61
615
  msgid "with permission 777 manually !"
616
  msgstr ""
617
 
618
- #: ../admin/functions.php:78
619
  msgid "already exists"
620
  msgstr ""
621
 
622
- #: ../admin/functions.php:82
623
- #: ../admin/functions.php:128
624
- msgid "successfully created!"
625
  msgstr ""
626
 
627
- #: ../admin/functions.php:82
628
- msgid "You can show this gallery with the tag"
629
  msgstr ""
630
 
631
- #: ../admin/functions.php:102
632
  msgid "doesn&#96;t exist!"
633
  msgstr ""
634
 
635
- #: ../admin/functions.php:109
636
  msgid "contains no pictures"
637
  msgstr ""
638
 
639
- #: ../admin/functions.php:125
640
  msgid "Database error. Could not add gallery!"
641
  msgstr ""
642
 
643
- #: ../admin/functions.php:144
644
- msgid " picture(s) successfully added"
645
- msgstr ""
646
-
647
- #: ../admin/functions.php:175
648
- #: ../admin/functions.php:224
649
- #: ../admin/functions.php:287
650
- msgid "Running... Please wait"
651
- msgstr ""
652
-
653
- #: ../admin/functions.php:176
654
- #: ../admin/manage.php:510
655
- msgid "Resize images"
656
- msgstr ""
657
-
658
- #: ../admin/functions.php:200
659
- msgid " : Image resized..."
660
- msgstr ""
661
-
662
- #: ../admin/functions.php:209
663
- #: ../admin/functions.php:266
664
- msgid "Some pictures are not writeable :"
665
- msgstr ""
666
-
667
- #: ../admin/functions.php:225
668
- #: ../admin/manage.php:508
669
- msgid "Set watermark"
670
- msgstr ""
671
-
672
- #: ../admin/functions.php:257
673
- msgid " : Watermark created..."
674
  msgstr ""
675
 
676
- #: ../admin/functions.php:288
677
- #: ../admin/manage.php:509
 
 
678
  msgid "Create new thumbnails"
679
  msgstr ""
680
 
681
- #: ../admin/functions.php:355
682
- msgid " : Thumbnail created..."
683
  msgstr ""
684
 
685
- #: ../admin/functions.php:360
686
- msgid "Follow thumbnails could not created."
 
 
687
  msgstr ""
688
 
689
- #: ../admin/functions.php:361
690
- msgid "Some thumbnails are not writeable :"
691
  msgstr ""
692
 
693
- #: ../admin/functions.php:460
694
- msgid "The Zip-file is too large. Exceed Memory limit !"
 
695
  msgstr ""
696
 
697
- #: ../admin/functions.php:501
698
  msgid "Uploaded file was no or a faulty zip file ! The server recognize : "
699
  msgstr ""
700
 
701
- #: ../admin/functions.php:520
 
 
 
 
702
  #, php-format
703
  msgid "Unable to create directory %s. Is its parent directory writable by the server?"
704
  msgstr ""
705
 
706
- #: ../admin/functions.php:535
707
  msgid "Zip-File successfully unpacked"
708
  msgstr ""
709
 
710
- #: ../admin/functions.php:571
711
- #: ../admin/functions.php:681
712
  msgid "Failure in database, no gallery path set !"
713
  msgstr ""
714
 
715
- #: ../admin/functions.php:592
716
- #: ../admin/functions.php:674
717
  msgid "is no valid image file!"
718
  msgstr ""
719
 
720
- #: ../admin/functions.php:606
 
 
721
  #, php-format
722
  msgid "Unable to write to directory %s. Is this directory writable by the server?"
723
  msgstr ""
724
 
725
- #: ../admin/functions.php:613
726
- #: ../admin/functions.php:698
727
  msgid "Error, the file could not moved to : "
728
  msgstr ""
729
 
730
- #: ../admin/functions.php:618
731
- #: ../admin/functions.php:702
732
  msgid "Error, the file permissions could not set"
733
  msgstr ""
734
 
735
- #: ../admin/functions.php:637
736
  msgid " Image(s) successfully added"
737
  msgstr ""
738
 
739
- #: ../admin/functions.php:661
740
  msgid "Invalid upload. Error Code : "
741
  msgstr ""
742
 
743
- #: ../admin/functions.php:713
744
  msgid "Sorry, you have used your space allocation. Please delete some files to upload more files."
745
  msgstr ""
746
 
747
- #: ../admin/functions.php:740
748
  #, php-format
749
  msgid "SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually"
750
  msgstr ""
751
 
752
- #: ../admin/functions.php:741
753
  #, php-format
754
  msgid "When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory"
755
  msgstr ""
756
 
757
- #: ../admin/manage.php:64
758
- #: ../admin/manage.php:85
759
- msgid "deleted successfully"
760
  msgstr ""
761
 
762
- #: ../admin/manage.php:111
763
- msgid "Watermark successfully added"
 
764
  msgstr ""
765
 
766
- #: ../admin/manage.php:116
767
- msgid "Thumbnails successfully created. Please refresh your browser cache."
 
768
  msgstr ""
769
 
770
- #: ../admin/manage.php:121
771
- msgid "Images successfully resized"
 
772
  msgstr ""
773
 
774
- #: ../admin/manage.php:139
775
- msgid "Pictures deleted successfully "
 
776
  msgstr ""
777
 
778
- #: ../admin/manage.php:145
779
- msgid "Import metadata finished"
 
780
  msgstr ""
781
 
782
- #: ../admin/manage.php:195
783
- msgid "Tags changed"
 
784
  msgstr ""
785
 
786
- #: ../admin/manage.php:215
787
- msgid "Update successful"
 
788
  msgstr ""
789
 
790
- #: ../admin/manage.php:248
791
- msgid "New gallery page ID"
792
  msgstr ""
793
 
794
- #: ../admin/manage.php:248
795
- msgid "created"
796
  msgstr ""
797
 
798
- #: ../admin/manage.php:279
799
- msgid "Gallery Overview"
800
  msgstr ""
801
 
802
- #: ../admin/manage.php:284
803
- msgid "Gallery name"
 
 
 
 
804
  msgstr ""
805
 
806
- #: ../admin/manage.php:286
807
- #: ../admin/manage.php:465
808
- #: ../admin/manage.php:541
809
  msgid "Description"
810
  msgstr ""
811
 
812
- #: ../admin/manage.php:287
 
 
 
 
 
813
  msgid "Page ID"
814
  msgstr ""
815
 
816
- #: ../admin/manage.php:288
817
  msgid "Quantity"
818
  msgstr ""
819
 
820
- #: ../admin/manage.php:289
821
- #: ../admin/manage.php:547
822
  msgid "Action"
823
  msgstr ""
824
 
825
- #: ../admin/manage.php:308
826
  msgid "Edit"
827
  msgstr ""
828
 
829
- #: ../admin/manage.php:309
830
  msgid "Delete this gallery ?"
831
  msgstr ""
832
 
833
- #: ../admin/manage.php:314
834
- #: ../admin/manage.php:585
835
  msgid "No entries found"
836
  msgstr ""
837
 
838
- #: ../admin/manage.php:443
839
- msgid "Main settings"
840
  msgstr ""
841
 
842
- #: ../admin/manage.php:448
843
- msgid "Page Link to"
 
 
844
  msgstr ""
845
 
846
- #: ../admin/manage.php:451
847
- msgid "Not linked"
 
 
 
 
 
848
  msgstr ""
849
 
850
- #: ../admin/manage.php:467
851
- msgid "Preview image"
852
  msgstr ""
853
 
854
- #: ../admin/manage.php:470
855
- msgid "No Picture"
856
  msgstr ""
857
 
858
- #: ../admin/manage.php:485
859
- msgid "Path"
860
  msgstr ""
861
 
862
- #: ../admin/manage.php:488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
863
  msgid "Create new page"
864
  msgstr ""
865
 
866
- #: ../admin/manage.php:491
867
  msgid "Main page (No parent)"
868
  msgstr ""
869
 
870
- #: ../admin/manage.php:494
871
  msgid "Add page"
872
  msgstr ""
873
 
874
- #: ../admin/manage.php:500
875
  msgid "Scan Folder for new images"
876
  msgstr ""
877
 
878
- #: ../admin/manage.php:501
879
- #: ../admin/manage.php:592
 
880
  msgid "Save Changes"
881
  msgstr ""
882
 
883
- #: ../admin/manage.php:506
884
  msgid "No action"
885
  msgstr ""
886
 
887
- #: ../admin/manage.php:511
 
 
 
 
 
 
 
 
 
 
888
  msgid "Delete images"
889
  msgstr ""
890
 
891
- #: ../admin/manage.php:512
892
  msgid "Import metadata"
893
  msgstr ""
894
 
895
- #: ../admin/manage.php:514
896
- msgid "Add tags"
897
  msgstr ""
898
 
899
- #: ../admin/manage.php:515
900
- msgid "Delete tags"
901
  msgstr ""
902
 
903
- #: ../admin/manage.php:516
904
- msgid "Overwrite tags"
905
  msgstr ""
906
 
907
- #: ../admin/manage.php:520
908
- #: ../admin/manage.php:521
909
- #: ../admin/manage.php:610
910
- msgid "OK"
911
  msgstr ""
912
 
913
- #: ../admin/manage.php:520
914
- #: ../admin/manage.php:610
915
- msgid "No images selected"
916
  msgstr ""
917
 
918
- #: ../admin/manage.php:520
919
- #: ../admin/manage.php:610
920
- #, php-format
921
- msgid ""
922
- "You are about to start the bulk edit for %s images \n"
923
- " \n"
924
- " 'Cancel' to stop, 'OK' to proceed."
925
  msgstr ""
926
 
927
- #: ../admin/manage.php:522
928
  msgid "Hide thumbnails "
929
  msgstr ""
930
 
931
- #: ../admin/manage.php:523
932
  msgid "Show thumbnails "
933
  msgstr ""
934
 
935
- #: ../admin/manage.php:524
936
  msgid "Show tags"
937
  msgstr ""
938
 
939
- #: ../admin/manage.php:525
940
  msgid "Hide tags"
941
  msgstr ""
942
 
943
- #: ../admin/manage.php:527
944
  msgid "Sort gallery"
945
  msgstr ""
946
 
947
- #: ../admin/manage.php:536
948
- #: ../admin/settings.php:320
949
- msgid "File name"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
950
  msgstr ""
951
 
952
- #: ../admin/manage.php:538
953
  msgid "Thumbnail"
954
  msgstr ""
955
 
956
- #: ../admin/manage.php:542
 
 
 
 
 
 
 
 
 
957
  msgid "Alt &amp; Title Text"
958
  msgstr ""
959
 
960
- #: ../admin/manage.php:543
961
  msgid "exclude"
962
  msgstr ""
963
 
964
- #: ../admin/manage.php:545
965
  msgid "Tags (comma separated list)"
966
  msgstr ""
967
 
968
- #: ../admin/manage.php:578
969
- msgid "View"
970
  msgstr ""
971
 
972
- #: ../admin/manage.php:579
973
- msgid "Show Meta data"
974
  msgstr ""
975
 
976
- #: ../admin/manage.php:579
977
- msgid "Meta"
978
  msgstr ""
979
 
980
- #: ../admin/manage.php:580
981
- msgid "Delete this file ?"
982
  msgstr ""
983
 
984
- #: ../admin/manage.php:607
985
- msgid "Enter the tags"
986
  msgstr ""
987
 
988
- #: ../admin/manage.php:610
989
- msgid "Cancel"
990
  msgstr ""
991
 
992
- #: ../admin/overview.php:18
993
- msgid "NextGEN Gallery Overview"
994
  msgstr ""
995
 
996
- #: ../admin/overview.php:21
997
- msgid "Summary"
998
  msgstr ""
999
 
1000
- #: ../admin/overview.php:30
1001
- #, php-format
1002
- msgid "There are totally %1$s pictures in %2$s galleries, which are spread across %3$s albums."
1003
  msgstr ""
1004
 
1005
- #: ../admin/overview.php:34
1006
- msgid "New Version available"
1007
  msgstr ""
1008
 
1009
- #: ../admin/overview.php:35
1010
- msgid "The server reports that a new NextGEN Gallery Version is now available. Please visit the plugin homepage for more information."
1011
  msgstr ""
1012
 
1013
- #: ../admin/overview.php:36
1014
- msgid "Download here"
1015
  msgstr ""
1016
 
1017
- #: ../admin/overview.php:42
1018
- msgid "Server Settings"
 
 
 
 
 
 
 
 
 
1019
  msgstr ""
1020
 
1021
- #: ../admin/overview.php:50
1022
- msgid "Welcome"
1023
  msgstr ""
1024
 
1025
- #: ../admin/overview.php:54
1026
- msgid "gallery administrator"
1027
  msgstr ""
1028
 
1029
- #: ../admin/overview.php:54
1030
- msgid "gallery editor"
1031
  msgstr ""
1032
 
1033
- #: ../admin/overview.php:55
1034
- #, php-format
1035
- msgid "Welcome to NextGEN Gallery. Here you can control your images, galleries and albums. You currently have %s rights."
 
 
 
1036
  msgstr ""
1037
 
1038
- #: ../admin/overview.php:60
1039
- msgid "Add a new gallery or import pictures"
1040
  msgstr ""
1041
 
1042
- #: ../admin/overview.php:61
1043
- msgid "Manage galleries and images"
 
1044
  msgstr ""
1045
 
1046
- #: ../admin/overview.php:62
1047
- msgid "Create and manage albums"
1048
  msgstr ""
1049
 
1050
- #: ../admin/overview.php:63
1051
- msgid "Change the settings of NextGEN Gallery"
1052
  msgstr ""
1053
 
1054
- #: ../admin/overview.php:66
1055
- msgid "Latest News"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1056
  msgstr ""
1057
 
1058
- #: ../admin/overview.php:85
1059
  #, php-format
1060
  msgid "Newsfeed could not be loaded. Check the <a href=\"%s\">front page</a> to check for updates."
1061
  msgstr ""
1062
 
1063
- #: ../admin/overview.php:98
1064
- msgid "GD support"
1065
  msgstr ""
1066
 
1067
- #: ../admin/overview.php:109
1068
- msgid "No GD support"
 
 
 
 
 
 
 
 
 
 
1069
  msgstr ""
1070
 
1071
- #: ../admin/overview.php:116
1072
- #: ../admin/overview.php:154
1073
- #: ../admin/overview.php:157
1074
  #: ../admin/overview.php:160
1075
- msgid "Yes"
 
 
 
 
1076
  msgstr ""
1077
 
1078
- #: ../admin/overview.php:117
1079
- #: ../admin/overview.php:155
1080
- #: ../admin/overview.php:158
1081
  #: ../admin/overview.php:161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1082
  msgid "No"
1083
  msgstr ""
1084
 
1085
- #: ../admin/overview.php:131
1086
  msgid "Not set"
1087
  msgstr ""
1088
 
1089
- #: ../admin/overview.php:133
1090
- #: ../admin/overview.php:136
1091
  msgid "On"
1092
  msgstr ""
1093
 
1094
- #: ../admin/overview.php:134
1095
- #: ../admin/overview.php:137
1096
  msgid "Off"
1097
  msgstr ""
1098
 
1099
- #: ../admin/overview.php:140
1100
- #: ../admin/overview.php:143
1101
- #: ../admin/overview.php:146
1102
- #: ../admin/overview.php:149
1103
- #: ../admin/overview.php:152
1104
  msgid "N/A"
1105
  msgstr ""
1106
 
1107
- #: ../admin/overview.php:151
1108
  msgid " MByte"
1109
  msgstr ""
1110
 
1111
- #: ../admin/overview.php:164
1112
  msgid "Operating System"
1113
  msgstr ""
1114
 
1115
- #: ../admin/overview.php:165
1116
  msgid "Server"
1117
  msgstr ""
1118
 
1119
- #: ../admin/overview.php:166
1120
  msgid "Memory usage"
1121
  msgstr ""
1122
 
1123
- #: ../admin/overview.php:167
1124
  msgid "MYSQL Version"
1125
  msgstr ""
1126
 
1127
- #: ../admin/overview.php:168
1128
  msgid "SQL Mode"
1129
  msgstr ""
1130
 
1131
- #: ../admin/overview.php:169
1132
  msgid "PHP Version"
1133
  msgstr ""
1134
 
1135
- #: ../admin/overview.php:170
1136
  msgid "PHP Safe Mode"
1137
  msgstr ""
1138
 
1139
- #: ../admin/overview.php:171
1140
  msgid "PHP Allow URL fopen"
1141
  msgstr ""
1142
 
1143
- #: ../admin/overview.php:172
1144
  msgid "PHP Memory Limit"
1145
  msgstr ""
1146
 
1147
- #: ../admin/overview.php:173
1148
  msgid "PHP Max Upload Size"
1149
  msgstr ""
1150
 
1151
- #: ../admin/overview.php:174
1152
  msgid "PHP Max Post Size"
1153
  msgstr ""
1154
 
1155
- #: ../admin/overview.php:175
1156
  msgid "PHP Max Script Execute Time"
1157
  msgstr ""
1158
 
1159
- #: ../admin/overview.php:176
1160
  msgid "PHP Exif support"
1161
  msgstr ""
1162
 
1163
- #: ../admin/overview.php:177
1164
  msgid "PHP IPTC support"
1165
  msgstr ""
1166
 
1167
- #: ../admin/overview.php:178
1168
  msgid "PHP XML support"
1169
  msgstr ""
1170
 
1171
- #: ../admin/overview.php:319
1172
  msgid "Storage Space"
1173
  msgstr ""
1174
 
1175
- #: ../admin/overview.php:322
1176
  msgid "Upload Space Used:"
1177
  msgstr ""
1178
 
1179
- #: ../admin/overview.php:328
1180
  msgid "Upload Space Remaining:"
1181
  msgstr ""
1182
 
1183
- #: ../admin/roles.php:20
1184
  msgid "Updated capabilities"
1185
  msgstr ""
1186
 
1187
- #: ../admin/roles.php:25
1188
  msgid "Roles / capabilities"
1189
  msgstr ""
1190
 
1191
- #: ../admin/roles.php:26
1192
  msgid "Select the lowest role which should be able to access the follow capabilities. NextGEN Gallery supports the standard roles from WordPress."
1193
  msgstr ""
1194
 
1195
- #: ../admin/roles.php:27
1196
  msgid "For a more flexible user management you can use the"
1197
  msgst
2
  msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-12-07 12:18+0100\n"
6
+ "PO-Revision-Date: 2008-12-07 12:18+0100\n"
7
+ "Last-Translator: Alex Rabe <no@email.com>\n"
8
  "Language-Team: Alex Rabe\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __ngettext:1,2;__;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-Country: GERMANY\n"
15
  "X-Poedit-SourceCharset: utf-8\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPath-1: ..\n"
19
 
20
+ #: ../nggallery.php:151
 
 
 
 
21
  msgid "Sorry, NextGEN Gallery works only with a Memory Limit of 16 MB higher"
22
  msgstr ""
23
 
24
+ #: ../nggallery.php:178
25
+ msgid "Picture tag"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  msgstr ""
27
 
28
+ #: ../nggallery.php:179
29
+ msgid "Picture tag: %2$l."
30
  msgstr ""
31
 
32
+ #: ../nggallery.php:180
33
+ msgid "Separate picture tags with commas."
 
34
  msgstr ""
35
 
36
+ #: ../nggallery.php:274
37
+ msgid "L O A D I N G"
38
  msgstr ""
39
 
40
+ #: ../nggallery.php:275
41
+ msgid "Click to Close"
42
  msgstr ""
43
 
44
+ #: ../nggfunctions.php:32
45
+ msgid "The <a href=\"http://www.macromedia.com/go/getflashplayer\">Flash Player</a> and <a href=\"http://www.mozilla.com/firefox/\">a browser with Javascript support</a> are needed.."
46
  msgstr ""
47
 
48
+ #: ../nggfunctions.php:95
49
+ #: ../nggfunctions.php:387
50
+ msgid "[Gallery not found]"
51
  msgstr ""
52
 
53
+ #: ../nggfunctions.php:274
54
+ msgid "[Album not found]"
55
  msgstr ""
56
 
57
+ #: ../nggfunctions.php:489
58
+ msgid "[SinglePic not found]"
59
  msgstr ""
60
 
61
+ #: ../nggfunctions.php:608
62
+ msgid "Related images for"
63
  msgstr ""
64
 
65
+ #: ../nggfunctions.php:643
66
+ #: ../admin/admin.php:30
67
+ msgid "Overview"
68
  msgstr ""
69
 
70
  #: ../admin/about.php:9
71
  msgid "Copyright notes / Credits"
72
  msgstr ""
73
 
74
+ #: ../admin/about.php:10
75
  msgid "NextGEN DEV Team"
76
  msgstr ""
77
 
78
+ #: ../admin/about.php:11
79
  msgid "This plugin is primarily developed, maintained, supported, documented by"
80
  msgstr ""
81
 
82
+ #: ../admin/about.php:11
83
  msgid "There are many other folks who have made contributions to this project :"
84
  msgstr ""
85
 
86
+ #: ../admin/about.php:13
87
  msgid "Contributors / Tribute to"
88
  msgstr ""
89
 
90
+ #: ../admin/about.php:14
91
  msgid "If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together."
92
  msgstr ""
93
 
94
+ #: ../admin/about.php:15
95
  msgid "So, we would like to thank the following people for their pioneer work (without this work it's impossible to create such a plugin so fast)"
96
  msgstr ""
97
 
98
+ #: ../admin/about.php:17
99
  msgid "for their great documented code"
100
  msgstr ""
101
 
102
+ #: ../admin/about.php:18
103
  msgid "for jQuery, which is the best Web2.0 framework"
104
  msgstr ""
105
 
106
+ #: ../admin/about.php:19
107
  msgid "for the fantastic PHP Thumbnail Class"
108
  msgstr ""
109
 
110
+ #: ../admin/about.php:20
111
  msgid "for PclZip , a PHP library that manage ZIP archives"
112
  msgstr ""
113
 
114
+ #: ../admin/about.php:21
115
  msgid "for a lot of very useful plugins and ideas"
116
  msgstr ""
117
 
118
+ #: ../admin/about.php:22
119
+ msgid "for Shutter Reloaded, a real lightweight image effect"
120
+ msgstr ""
121
+
122
  #: ../admin/about.php:23
123
+ msgid "for the best Media Flash Scripts on earth"
124
  msgstr ""
125
 
126
  #: ../admin/about.php:24
127
+ msgid "for the Fugue Iconset"
128
  msgstr ""
129
 
130
  #: ../admin/about.php:25
156
  msgstr ""
157
 
158
  #: ../admin/about.php:32
159
+ msgid "To help people to work with this plugin, I would like to have it in all available languages"
160
  msgstr ""
161
 
162
  #: ../admin/about.php:33
164
  msgstr ""
165
 
166
  #: ../admin/about.php:44
167
+ msgid "No doubt a very useful and easy motivation :-)"
168
  msgstr ""
169
 
170
  #: ../admin/about.php:46
183
  msgid "We would like to thank this people which support us in the work :"
184
  msgstr ""
185
 
186
+ #: ../admin/addgallery.php:34
187
+ #: ../admin/addgallery.php:50
188
  msgid "Upload failed!"
189
  msgstr ""
190
 
191
+ #: ../admin/addgallery.php:55
192
+ #: ../admin/functions.php:548
193
+ #: ../admin/functions.php:638
194
  msgid "No gallery selected !"
195
  msgstr ""
196
 
197
+ #: ../admin/addgallery.php:102
198
  msgid "Image Files"
199
  msgstr ""
200
 
201
+ #: ../admin/addgallery.php:121
202
+ #: ../admin/addgallery.php:151
203
  msgid "remove"
204
  msgstr ""
205
 
206
+ #: ../admin/addgallery.php:122
207
  msgid "Browse..."
208
  msgstr ""
209
 
210
+ #: ../admin/addgallery.php:123
211
+ #: ../admin/addgallery.php:271
212
  msgid "Upload images"
213
  msgstr ""
214
 
215
+ #: ../admin/addgallery.php:167
216
+ #: ../admin/addgallery.php:179
217
  msgid "Add new gallery"
218
  msgstr ""
219
 
220
+ #: ../admin/addgallery.php:169
221
+ #: ../admin/addgallery.php:198
222
  msgid "Upload a Zip-File"
223
  msgstr ""
224
 
225
+ #: ../admin/addgallery.php:172
226
+ #: ../admin/addgallery.php:227
227
  msgid "Import image folder"
228
  msgstr ""
229
 
230
+ #: ../admin/addgallery.php:174
231
+ #: ../admin/addgallery.php:244
232
  msgid "Upload Images"
233
  msgstr ""
234
 
235
+ #: ../admin/addgallery.php:184
236
  msgid "New Gallery"
237
  msgstr ""
238
 
239
+ #: ../admin/addgallery.php:187
240
  msgid "Create a new , empty gallery below the folder"
241
  msgstr ""
242
 
243
+ #: ../admin/addgallery.php:189
244
  msgid "Allowed characters for file and folder names are"
245
  msgstr ""
246
 
247
+ #: ../admin/addgallery.php:192
248
  msgid "Add gallery"
249
  msgstr ""
250
 
251
+ #: ../admin/addgallery.php:203
252
  msgid "Select Zip-File"
253
  msgstr ""
254
 
255
+ #: ../admin/addgallery.php:205
256
  msgid "Upload a zip file with images"
257
  msgstr ""
258
 
259
+ #: ../admin/addgallery.php:208
260
+ #: ../admin/addgallery.php:253
261
  msgid "in to"
262
  msgstr ""
263
 
264
+ #: ../admin/addgallery.php:210
265
  msgid "a new gallery"
266
  msgstr ""
267
 
268
+ #: ../admin/addgallery.php:216
269
+ #: ../admin/addgallery.php:261
270
  msgid "Note : The upload limit on your server is "
271
  msgstr ""
272
 
273
+ #: ../admin/addgallery.php:220
 
 
 
 
 
 
 
 
 
 
 
 
274
  msgid "Start upload"
275
  msgstr ""
276
 
277
+ #: ../admin/addgallery.php:232
278
  msgid "Import from Server path:"
279
  msgstr ""
280
 
281
+ #: ../admin/addgallery.php:234
282
+ msgid "Import a folder with all images."
283
  msgstr ""
284
 
285
+ #: ../admin/addgallery.php:235
286
+ msgid " Please note : For safe-mode = ON you need to add the subfolder thumbs manually"
287
  msgstr ""
288
 
289
+ #: ../admin/addgallery.php:238
290
  msgid "Import folder"
291
  msgstr ""
292
 
293
+ #: ../admin/addgallery.php:249
294
  msgid "Upload image"
295
  msgstr ""
296
 
297
+ #: ../admin/addgallery.php:255
298
  msgid "Choose gallery"
299
  msgstr ""
300
 
301
+ #: ../admin/addgallery.php:267
302
  msgid "The batch upload requires Adobe Flash 9, disable it if you have problems"
303
  msgstr ""
304
 
305
+ #: ../admin/addgallery.php:267
306
  msgid "Disable flash upload"
307
  msgstr ""
308
 
309
+ #: ../admin/addgallery.php:269
310
  msgid "Upload multiple files at once by ctrl/shift-selecting in dialog"
311
  msgstr ""
312
 
313
+ #: ../admin/addgallery.php:269
314
  msgid "Enable flash based upload"
315
  msgstr ""
316
 
317
+ #: ../admin/admin.php:29
318
+ #: ../admin/admin.php:200
319
+ #: ../admin/functions.php:81
320
+ #: ../admin/functions.php:142
321
+ #: ../admin/manage-images.php:120
322
+ #: ../admin/manage.php:84
 
323
  msgid "Gallery"
324
+ msgid_plural "Galleries"
325
+ msgstr[0] ""
326
+ msgstr[1] ""
327
 
328
+ #: ../admin/admin.php:31
329
+ msgid "Add Gallery / Images"
330
  msgstr ""
331
 
332
+ #: ../admin/admin.php:32
333
  msgid "Manage Gallery"
334
  msgstr ""
335
 
336
+ #: ../admin/admin.php:33
337
  msgid "Album"
338
+ msgid_plural "Albums"
339
+ msgstr[0] ""
340
+ msgstr[1] ""
341
+
342
+ #: ../admin/admin.php:34
343
+ msgid "Tags"
344
  msgstr ""
345
 
346
+ #: ../admin/admin.php:35
347
  msgid "Options"
348
  msgstr ""
349
 
350
+ #: ../admin/admin.php:37
351
  msgid "Style"
352
  msgstr ""
353
 
354
+ #: ../admin/admin.php:38
355
  msgid "Setup Gallery"
356
  msgstr ""
357
 
358
+ #: ../admin/admin.php:38
359
  msgid "Setup"
360
  msgstr ""
361
 
362
+ #: ../admin/admin.php:40
363
  msgid "Roles"
364
  msgstr ""
365
 
366
+ #: ../admin/admin.php:41
367
  msgid "About this Gallery"
368
  msgstr ""
369
 
370
+ #: ../admin/admin.php:41
371
  msgid "About"
372
  msgstr ""
373
 
374
+ #: ../admin/admin.php:43
375
  msgid "NextGEN Gallery"
376
  msgstr ""
377
 
378
+ #: ../admin/admin.php:68
379
+ msgid "A new version of NextGEN Gallery is available !"
380
+ msgstr ""
381
+
382
+ #: ../admin/admin.php:68
383
+ msgid "Download here"
384
+ msgstr ""
385
+
386
+ #: ../admin/admin.php:139
387
+ msgid "You do not have the correct permission"
388
+ msgstr ""
389
+
390
+ #: ../admin/admin.php:140
391
+ msgid "Unexpected Error"
392
+ msgstr ""
393
+
394
+ #: ../admin/admin.php:141
395
+ msgid "A failure occurred"
396
+ msgstr ""
397
+
398
+ #: ../admin/admin.php:204
399
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Introduction</a>"
400
+ msgstr ""
401
+
402
+ #: ../admin/admin.php:207
403
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Setup</a>"
404
+ msgstr ""
405
+
406
+ #: ../admin/admin.php:210
407
+ msgid "<a href=\"http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/languages/\" target=\"_blank\">Translation by alex rabe</a>"
408
+ msgstr ""
409
+
410
+ #: ../admin/admin.php:213
411
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Roles / Capabilities</a>"
412
+ msgstr ""
413
+
414
+ #: ../admin/admin.php:216
415
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Styles</a>"
416
+ msgstr ""
417
+
418
+ #: ../admin/admin.php:217
419
+ msgid "Templates"
420
+ msgstr ""
421
+
422
+ #: ../admin/admin.php:220
423
+ #: ../admin/admin.php:224
424
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Gallery management</a>"
425
+ msgstr ""
426
+
427
+ #: ../admin/admin.php:221
428
+ msgid "Gallery example"
429
+ msgstr ""
430
+
431
+ #: ../admin/admin.php:225
432
+ #: ../admin/admin.php:235
433
+ msgid "Gallery tags"
434
+ msgstr ""
435
+
436
+ #: ../admin/admin.php:228
437
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Album management</a>"
438
+ msgstr ""
439
+
440
+ #: ../admin/admin.php:229
441
+ msgid "Album example"
442
+ msgstr ""
443
+
444
+ #: ../admin/admin.php:230
445
+ #: ../admin/admin.php:236
446
+ msgid "Album tags"
447
+ msgstr ""
448
+
449
+ #: ../admin/admin.php:233
450
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-introduction/\" target=\"_blank\">Gallery tags</a>"
451
+ msgstr ""
452
+
453
+ #: ../admin/admin.php:234
454
+ msgid "Related images"
455
+ msgstr ""
456
+
457
+ #: ../admin/admin.php:239
458
+ msgid "<a href=\"http://dpotter.net/Technical/2008/03/nextgen-gallery-review-image-management/\" target=\"_blank\">Image management</a>"
459
+ msgstr ""
460
+
461
+ #: ../admin/admin.php:240
462
+ msgid "Custom fields"
463
+ msgstr ""
464
+
465
+ #: ../admin/admin.php:245
466
+ msgid "Get help with NextGEN Gallery"
467
+ msgstr ""
468
+
469
+ #: ../admin/admin.php:249
470
+ msgid "More Help & Info"
471
+ msgstr ""
472
+
473
+ #: ../admin/admin.php:251
474
+ msgid "<a href=\"http://wordpress.org/tags/nextgen-gallery\" target=\"_blank\">Support Forums</a>"
475
+ msgstr ""
476
+
477
+ #: ../admin/admin.php:252
478
+ msgid "FAQ"
479
+ msgstr ""
480
+
481
+ #: ../admin/admin.php:253
482
+ msgid "Feature request"
483
+ msgstr ""
484
+
485
+ #: ../admin/admin.php:254
486
+ msgid "Get your language pack"
487
+ msgstr ""
488
+
489
+ #: ../admin/admin.php:255
490
+ msgid "Contribute development"
491
+ msgstr ""
492
+
493
+ #: ../admin/admin.php:256
494
+ msgid "Download latest version"
495
+ msgstr ""
496
+
497
  #: ../admin/album.php:19
498
+ #: ../admin/album.php:31
499
  msgid "Update Successfully"
500
  msgstr ""
501
 
502
+ #: ../admin/album.php:40
503
  msgid "Album deleted"
504
  msgstr ""
505
 
506
+ #: ../admin/album.php:125
507
  msgid "Manage Albums"
508
  msgstr ""
509
 
510
+ #: ../admin/album.php:131
511
  msgid "Select album"
512
  msgstr ""
513
 
514
+ #: ../admin/album.php:133
515
  msgid "No album selected"
516
  msgstr ""
517
 
518
+ #: ../admin/album.php:146
519
+ msgid "Update"
520
  msgstr ""
521
 
522
+ #: ../admin/album.php:147
523
+ #: ../admin/manage-galleries.php:54
524
+ #: ../admin/manage-images.php:377
525
  msgid "Delete"
526
  msgstr ""
527
 
528
+ #: ../admin/album.php:147
529
  msgid "Delete album ?"
530
  msgstr ""
531
 
532
+ #: ../admin/album.php:149
533
+ msgid "Add new album"
534
+ msgstr ""
535
+
536
  #: ../admin/album.php:150
537
+ msgid "Add"
 
 
 
 
 
 
 
538
  msgstr ""
539
 
540
  #: ../admin/album.php:158
565
  msgid "No album selected!"
566
  msgstr ""
567
 
568
+ #: ../admin/album.php:254
569
+ #: ../admin/manage-galleries.php:17
570
+ #: ../admin/manage-images.php:473
571
  msgid "ID"
572
  msgstr ""
573
 
574
+ #: ../admin/album.php:255
575
  msgid "Name"
576
  msgstr ""
577
 
578
+ #: ../admin/album.php:256
579
+ #: ../admin/manage-galleries.php:18
580
+ #: ../admin/manage-images.php:136
581
  msgid "Title"
582
  msgstr ""
583
 
584
+ #: ../admin/album.php:257
585
  msgid "Page"
586
  msgstr ""
587
 
588
+ #: ../admin/functions.php:23
589
  msgid "No valid gallery name!"
590
  msgstr ""
591
 
592
+ #: ../admin/functions.php:30
593
+ #: ../admin/functions.php:39
594
+ #: ../admin/functions.php:53
595
+ #: ../admin/functions.php:116
596
+ #: ../admin/functions.php:123
597
  msgid "Directory"
598
  msgstr ""
599
 
600
+ #: ../admin/functions.php:30
601
  msgid "didn't exist. Please create first the main gallery folder "
602
  msgstr ""
603
 
604
+ #: ../admin/functions.php:31
605
+ #: ../admin/functions.php:40
606
  msgid "Check this link, if you didn't know how to set the permission :"
607
  msgstr ""
608
 
609
+ #: ../admin/functions.php:39
610
+ #: ../admin/functions.php:53
611
  msgid "is not writeable !"
612
  msgstr ""
613
 
614
+ #: ../admin/functions.php:48
615
+ #: ../admin/functions.php:58
616
+ #: ../admin/functions.php:511
617
  msgid "Unable to create directory "
618
  msgstr ""
619
 
620
+ #: ../admin/functions.php:62
621
  msgid "The server setting Safe-Mode is on !"
622
  msgstr ""
623
 
624
+ #: ../admin/functions.php:63
625
  msgid "If you have problems, please create directory"
626
  msgstr ""
627
 
628
+ #: ../admin/functions.php:64
629
  msgid "and the thumbnails directory"
630
  msgstr ""
631
 
632
+ #: ../admin/functions.php:64
633
  msgid "with permission 777 manually !"
634
  msgstr ""
635
 
636
+ #: ../admin/functions.php:81
637
  msgid "already exists"
638
  msgstr ""
639
 
640
+ #: ../admin/functions.php:86
641
+ #, php-format
642
+ msgid "Gallery %1$s successfully created.<br/>You can show this gallery with the tag %2$s.<br/>"
643
  msgstr ""
644
 
645
+ #: ../admin/functions.php:89
646
+ msgid "Edit gallery"
647
  msgstr ""
648
 
649
+ #: ../admin/functions.php:116
650
  msgid "doesn&#96;t exist!"
651
  msgstr ""
652
 
653
+ #: ../admin/functions.php:123
654
  msgid "contains no pictures"
655
  msgstr ""
656
 
657
+ #: ../admin/functions.php:139
658
  msgid "Database error. Could not add gallery!"
659
  msgstr ""
660
 
661
+ #: ../admin/functions.php:142
662
+ msgid "successfully created!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663
  msgstr ""
664
 
665
+ #: ../admin/functions.php:161
666
+ #: ../admin/functions.php:620
667
+ #: ../admin/manage-images.php:207
668
+ #: ../admin/manage.php:136
669
  msgid "Create new thumbnails"
670
  msgstr ""
671
 
672
+ #: ../admin/functions.php:164
673
+ msgid " picture(s) successfully added"
674
  msgstr ""
675
 
676
+ #: ../admin/functions.php:203
677
+ #: ../admin/functions.php:282
678
+ #: ../admin/functions.php:323
679
+ msgid "Object didn't contain correct data"
680
  msgstr ""
681
 
682
+ #: ../admin/functions.php:208
683
+ msgid " is not writeable "
684
  msgstr ""
685
 
686
+ #: ../admin/functions.php:289
687
+ #: ../admin/functions.php:326
688
+ msgid " is not writeable"
689
  msgstr ""
690
 
691
+ #: ../admin/functions.php:482
692
  msgid "Uploaded file was no or a faulty zip file ! The server recognize : "
693
  msgstr ""
694
 
695
+ #: ../admin/functions.php:496
696
+ msgid "Could not get a vaild foldername"
697
+ msgstr ""
698
+
699
+ #: ../admin/functions.php:506
700
  #, php-format
701
  msgid "Unable to create directory %s. Is its parent directory writable by the server?"
702
  msgstr ""
703
 
704
+ #: ../admin/functions.php:521
705
  msgid "Zip-File successfully unpacked"
706
  msgstr ""
707
 
708
+ #: ../admin/functions.php:556
709
+ #: ../admin/functions.php:665
710
  msgid "Failure in database, no gallery path set !"
711
  msgstr ""
712
 
713
+ #: ../admin/functions.php:577
714
+ #: ../admin/functions.php:659
715
  msgid "is no valid image file!"
716
  msgstr ""
717
 
718
+ #: ../admin/functions.php:591
719
+ #: ../admin/functions.php:767
720
+ #: ../admin/functions.php:835
721
  #, php-format
722
  msgid "Unable to write to directory %s. Is this directory writable by the server?"
723
  msgstr ""
724
 
725
+ #: ../admin/functions.php:598
726
+ #: ../admin/functions.php:682
727
  msgid "Error, the file could not moved to : "
728
  msgstr ""
729
 
730
+ #: ../admin/functions.php:603
731
+ #: ../admin/functions.php:686
732
  msgid "Error, the file permissions could not set"
733
  msgstr ""
734
 
735
+ #: ../admin/functions.php:624
736
  msgid " Image(s) successfully added"
737
  msgstr ""
738
 
739
+ #: ../admin/functions.php:647
740
  msgid "Invalid upload. Error Code : "
741
  msgstr ""
742
 
743
+ #: ../admin/functions.php:696
744
  msgid "Sorry, you have used your space allocation. Please delete some files to upload more files."
745
  msgstr ""
746
 
747
+ #: ../admin/functions.php:723
748
  #, php-format
749
  msgid "SAFE MODE Restriction in effect! You need to create the folder <strong>%s</strong> manually"
750
  msgstr ""
751
 
752
+ #: ../admin/functions.php:724
753
  #, php-format
754
  msgid "When safe_mode is on, PHP checks to see if the owner (%s) of the current script matches the owner (%s) of the file to be operated on by a file function or its directory"
755
  msgstr ""
756
 
757
+ #: ../admin/functions.php:761
758
+ #: ../admin/functions.php:829
759
+ msgid "The destination gallery does not exist"
760
  msgstr ""
761
 
762
+ #: ../admin/functions.php:792
763
+ #, php-format
764
+ msgid "Failed to move image %1$s to %2$s"
765
  msgstr ""
766
 
767
+ #: ../admin/functions.php:810
768
+ #, php-format
769
+ msgid "Moved %1$s picture(s) to gallery : %2$s ."
770
  msgstr ""
771
 
772
+ #: ../admin/functions.php:862
773
+ #, php-format
774
+ msgid "Failed to copy image %1$s to %2$s"
775
  msgstr ""
776
 
777
+ #: ../admin/functions.php:874
778
+ #, php-format
779
+ msgid "Failed to copy database row for picture %s"
780
  msgstr ""
781
 
782
+ #: ../admin/functions.php:882
783
+ #, php-format
784
+ msgid "Image %1$s (%2$s) copied as image %3$s (%4$s) &raquo; The file already existed in the destination gallery."
785
  msgstr ""
786
 
787
+ #: ../admin/functions.php:885
788
+ #, php-format
789
+ msgid "Image %1$s (%2$s) copied as image %3$s (%4$s)"
790
  msgstr ""
791
 
792
+ #: ../admin/functions.php:894
793
+ #, php-format
794
+ msgid "Copied %1$s picture(s) to gallery: %2$s ."
795
  msgstr ""
796
 
797
+ #: ../admin/install.php:23
798
+ msgid "Sorry, NextGEN Gallery works only with a role called administrator"
799
  msgstr ""
800
 
801
+ #: ../admin/install.php:102
802
+ msgid "NextGEN Gallery : Tables could not created, please check your database settings"
803
  msgstr ""
804
 
805
+ #: ../admin/install.php:154
806
+ msgid "[Show as slideshow]"
807
  msgstr ""
808
 
809
+ #: ../admin/install.php:155
810
+ msgid "[Show picture list]"
811
+ msgstr ""
812
+
813
+ #: ../admin/manage-galleries.php:12
814
+ msgid "Gallery Overview"
815
  msgstr ""
816
 
817
+ #: ../admin/manage-galleries.php:19
818
+ #: ../admin/manage-images.php:147
819
+ #: ../admin/manage-images.php:482
820
  msgid "Description"
821
  msgstr ""
822
 
823
+ #: ../admin/manage-galleries.php:20
824
+ #: ../admin/manage-images.php:167
825
+ msgid "Author"
826
+ msgstr ""
827
+
828
+ #: ../admin/manage-galleries.php:21
829
  msgid "Page ID"
830
  msgstr ""
831
 
832
+ #: ../admin/manage-galleries.php:22
833
  msgid "Quantity"
834
  msgstr ""
835
 
836
+ #: ../admin/manage-galleries.php:23
837
+ #: ../admin/manage-images.php:489
838
  msgid "Action"
839
  msgstr ""
840
 
841
+ #: ../admin/manage-galleries.php:41
842
  msgid "Edit"
843
  msgstr ""
844
 
845
+ #: ../admin/manage-galleries.php:54
846
  msgid "Delete this gallery ?"
847
  msgstr ""
848
 
849
+ #: ../admin/manage-galleries.php:61
850
+ #: ../admin/manage-images.php:392
851
  msgid "No entries found"
852
  msgstr ""
853
 
854
+ #: ../admin/manage-images.php:18
855
+ msgid "Gallery not found."
856
  msgstr ""
857
 
858
+ #: ../admin/manage-images.php:88
859
+ #: ../admin/manage-images.php:417
860
+ #: ../admin/manage-images.php:454
861
+ msgid "No images selected"
862
  msgstr ""
863
 
864
+ #: ../admin/manage-images.php:102
865
+ #: ../admin/manage-images.php:417
866
+ #, php-format
867
+ msgid ""
868
+ "You are about to start the bulk edit for %s images \n"
869
+ " \n"
870
+ " 'Cancel' to stop, 'OK' to proceed."
871
  msgstr ""
872
 
873
+ #: ../admin/manage-images.php:132
874
+ msgid "Gallery settings"
875
  msgstr ""
876
 
877
+ #: ../admin/manage-images.php:132
878
+ msgid "Click here for more settings"
879
  msgstr ""
880
 
881
+ #: ../admin/manage-images.php:138
882
+ msgid "Page Link to"
883
  msgstr ""
884
 
885
+ #: ../admin/manage-images.php:141
886
+ msgid "Not linked"
887
+ msgstr ""
888
+
889
+ #: ../admin/manage-images.php:149
890
+ msgid "Preview image"
891
+ msgstr ""
892
+
893
+ #: ../admin/manage-images.php:152
894
+ msgid "No Picture"
895
+ msgstr ""
896
+
897
+ #: ../admin/manage-images.php:165
898
+ msgid "Path"
899
+ msgstr ""
900
+
901
+ #: ../admin/manage-images.php:181
902
  msgid "Create new page"
903
  msgstr ""
904
 
905
+ #: ../admin/manage-images.php:184
906
  msgid "Main page (No parent)"
907
  msgstr ""
908
 
909
+ #: ../admin/manage-images.php:187
910
  msgid "Add page"
911
  msgstr ""
912
 
913
+ #: ../admin/manage-images.php:193
914
  msgid "Scan Folder for new images"
915
  msgstr ""
916
 
917
+ #: ../admin/manage-images.php:194
918
+ #: ../admin/manage-images.php:243
919
+ #: ../admin/manage-images.php:398
920
  msgid "Save Changes"
921
  msgstr ""
922
 
923
+ #: ../admin/manage-images.php:204
924
  msgid "No action"
925
  msgstr ""
926
 
927
+ #: ../admin/manage-images.php:206
928
+ #: ../admin/manage.php:132
929
+ msgid "Set watermark"
930
+ msgstr ""
931
+
932
+ #: ../admin/manage-images.php:208
933
+ #: ../admin/manage.php:140
934
+ msgid "Resize images"
935
+ msgstr ""
936
+
937
+ #: ../admin/manage-images.php:209
938
  msgid "Delete images"
939
  msgstr ""
940
 
941
+ #: ../admin/manage-images.php:210
942
  msgid "Import metadata"
943
  msgstr ""
944
 
945
+ #: ../admin/manage-images.php:211
946
+ msgid "Copy to..."
947
  msgstr ""
948
 
949
+ #: ../admin/manage-images.php:212
950
+ msgid "Move to..."
951
  msgstr ""
952
 
953
+ #: ../admin/manage-images.php:214
954
+ msgid "Add tags"
955
  msgstr ""
956
 
957
+ #: ../admin/manage-images.php:215
958
+ msgid "Delete tags"
 
 
959
  msgstr ""
960
 
961
+ #: ../admin/manage-images.php:216
962
+ msgid "Overwrite tags"
 
963
  msgstr ""
964
 
965
+ #: ../admin/manage-images.php:221
966
+ #: ../admin/manage-images.php:223
967
+ #: ../admin/manage-images.php:417
968
+ #: ../admin/manage-images.php:454
969
+ msgid "OK"
 
 
970
  msgstr ""
971
 
972
+ #: ../admin/manage-images.php:227
973
  msgid "Hide thumbnails "
974
  msgstr ""
975
 
976
+ #: ../admin/manage-images.php:229
977
  msgid "Show thumbnails "
978
  msgstr ""
979
 
980
+ #: ../admin/manage-images.php:233
981
  msgid "Show tags"
982
  msgstr ""
983
 
984
+ #: ../admin/manage-images.php:235
985
  msgid "Hide tags"
986
  msgstr ""
987
 
988
+ #: ../admin/manage-images.php:239
989
  msgid "Sort gallery"
990
  msgstr ""
991
 
992
+ #: ../admin/manage-images.php:376
993
+ msgid "Show Meta data"
994
+ msgstr ""
995
+
996
+ #: ../admin/manage-images.php:376
997
+ msgid "Meta"
998
+ msgstr ""
999
+
1000
+ #: ../admin/manage-images.php:377
1001
+ msgid "Delete this file ?"
1002
+ msgstr ""
1003
+
1004
+ #: ../admin/manage-images.php:413
1005
+ msgid "Enter the tags"
1006
+ msgstr ""
1007
+
1008
+ #: ../admin/manage-images.php:419
1009
+ #: ../admin/manage-images.php:456
1010
+ msgid "Cancel"
1011
+ msgstr ""
1012
+
1013
+ #: ../admin/manage-images.php:438
1014
+ msgid "Select the destination gallery:"
1015
+ msgstr ""
1016
+
1017
+ #: ../admin/manage-images.php:454
1018
+ #, php-format
1019
+ msgid ""
1020
+ "You are about to copy or move %s images \n"
1021
+ " \n"
1022
+ " 'Cancel' to stop, 'OK' to proceed."
1023
  msgstr ""
1024
 
1025
+ #: ../admin/manage-images.php:476
1026
  msgid "Thumbnail"
1027
  msgstr ""
1028
 
1029
+ #: ../admin/manage-images.php:476
1030
+ #: ../admin/manage-images.php:478
1031
+ msgid "Date"
1032
+ msgstr ""
1033
+
1034
+ #: ../admin/manage-images.php:478
1035
+ msgid "File name"
1036
+ msgstr ""
1037
+
1038
+ #: ../admin/manage-images.php:482
1039
  msgid "Alt &amp; Title Text"
1040
  msgstr ""
1041
 
1042
+ #: ../admin/manage-images.php:485
1043
  msgid "exclude"
1044
  msgstr ""
1045
 
1046
+ #: ../admin/manage-images.php:487
1047
  msgid "Tags (comma separated list)"
1048
  msgstr ""
1049
 
1050
+ #: ../admin/manage-sort.php:30
1051
+ msgid "Sort order changed"
1052
  msgstr ""
1053
 
1054
+ #: ../admin/manage-sort.php:65
1055
+ msgid "Sort Gallery"
1056
  msgstr ""
1057
 
1058
+ #: ../admin/manage-sort.php:69
1059
+ msgid "Update Sort Order"
1060
  msgstr ""
1061
 
1062
+ #: ../admin/manage-sort.php:72
1063
+ msgid "Back to gallery"
1064
  msgstr ""
1065
 
1066
+ #: ../admin/manage-sort.php:77
1067
+ msgid "Presort"
1068
  msgstr ""
1069
 
1070
+ #: ../admin/manage-sort.php:78
1071
+ msgid "Unsorted"
1072
  msgstr ""
1073
 
1074
+ #: ../admin/manage-sort.php:79
1075
+ msgid "Image ID"
1076
  msgstr ""
1077
 
1078
+ #: ../admin/manage-sort.php:80
1079
+ msgid "Filename"
1080
  msgstr ""
1081
 
1082
+ #: ../admin/manage-sort.php:81
1083
+ msgid "Alt/Title text"
 
1084
  msgstr ""
1085
 
1086
+ #: ../admin/manage-sort.php:82
1087
+ msgid "Date/Time"
1088
  msgstr ""
1089
 
1090
+ #: ../admin/manage-sort.php:83
1091
+ msgid "Ascending"
1092
  msgstr ""
1093
 
1094
+ #: ../admin/manage-sort.php:84
1095
+ msgid "Descending"
1096
  msgstr ""
1097
 
1098
+ #: ../admin/manage.php:84
1099
+ #: ../admin/manage.php:106
1100
+ msgid "deleted successfully"
1101
+ msgstr ""
1102
+
1103
+ #: ../admin/manage.php:106
1104
+ msgid "Picture"
1105
+ msgstr ""
1106
+
1107
+ #: ../admin/manage.php:157
1108
+ msgid "Pictures deleted successfully "
1109
  msgstr ""
1110
 
1111
+ #: ../admin/manage.php:163
1112
+ msgid "Import metadata finished"
1113
  msgstr ""
1114
 
1115
+ #: ../admin/manage.php:171
1116
+ msgid "Operation successfull. Please clear your browser cache."
1117
  msgstr ""
1118
 
1119
+ #: ../admin/manage.php:234
1120
+ msgid "Tags changed"
1121
  msgstr ""
1122
 
1123
+ #: ../admin/manage.php:264
1124
+ msgid "Update successful"
1125
+ msgstr ""
1126
+
1127
+ #: ../admin/manage.php:297
1128
+ msgid "New gallery page ID"
1129
  msgstr ""
1130
 
1131
+ #: ../admin/manage.php:297
1132
+ msgid "created"
1133
  msgstr ""
1134
 
1135
+ #: ../admin/media-upload.php:132
1136
+ #: ../admin/tinymce/window.php:43
1137
+ msgid "No gallery"
1138
  msgstr ""
1139
 
1140
+ #: ../admin/media-upload.php:144
1141
+ msgid "Select &#187;"
1142
  msgstr ""
1143
 
1144
+ #: ../admin/media-upload.php:175
1145
+ msgid "Show"
1146
  msgstr ""
1147
 
1148
+ #: ../admin/media-upload.php:176
1149
+ msgid "Hide"
1150
+ msgstr ""
1151
+
1152
+ #: ../admin/media-upload.php:181
1153
+ msgid "Image ID:"
1154
+ msgstr ""
1155
+
1156
+ #: ../admin/media-upload.php:195
1157
+ msgid "Alignment"
1158
+ msgstr ""
1159
+
1160
+ #: ../admin/media-upload.php:198
1161
+ #: ../admin/settings.php:315
1162
+ msgid "None"
1163
+ msgstr ""
1164
+
1165
+ #: ../admin/media-upload.php:200
1166
+ #: ../admin/tinymce/window.php:128
1167
+ msgid "Left"
1168
+ msgstr ""
1169
+
1170
+ #: ../admin/media-upload.php:202
1171
+ #: ../admin/tinymce/window.php:129
1172
+ msgid "Center"
1173
+ msgstr ""
1174
+
1175
+ #: ../admin/media-upload.php:204
1176
+ #: ../admin/tinymce/window.php:130
1177
+ msgid "Right"
1178
+ msgstr ""
1179
+
1180
+ #: ../admin/media-upload.php:208
1181
+ #: ../admin/settings.php:418
1182
+ msgid "Size"
1183
+ msgstr ""
1184
+
1185
+ #: ../admin/media-upload.php:214
1186
+ msgid "Full size"
1187
+ msgstr ""
1188
+
1189
+ #: ../admin/media-upload.php:216
1190
+ msgid "Singlepic"
1191
+ msgstr ""
1192
+
1193
+ #: ../admin/media-upload.php:224
1194
+ msgid "Insert into Post"
1195
+ msgstr ""
1196
+
1197
+ #: ../admin/media-upload.php:234
1198
+ msgid "Save all changes"
1199
+ msgstr ""
1200
+
1201
+ #: ../admin/overview.php:13
1202
+ msgid "NextGEN Gallery Overview"
1203
  msgstr ""
1204
 
1205
+ #: ../admin/overview.php:108
1206
  #, php-format
1207
  msgid "Newsfeed could not be loaded. Check the <a href=\"%s\">front page</a> to check for updates."
1208
  msgstr ""
1209
 
1210
+ #: ../admin/overview.php:128
1211
+ msgid "At a Glance"
1212
  msgstr ""
1213
 
1214
+ #: ../admin/overview.php:134
1215
+ msgid "Image"
1216
+ msgid_plural "Images"
1217
+ msgstr[0] ""
1218
+ msgstr[1] ""
1219
+
1220
+ #: ../admin/overview.php:155
1221
+ msgid "Upload pictures"
1222
+ msgstr ""
1223
+
1224
+ #: ../admin/overview.php:156
1225
+ msgid "Here you can control your images, galleries and albums."
1226
  msgstr ""
1227
 
 
 
 
1228
  #: ../admin/overview.php:160
1229
+ msgid "Gallery Administrator"
1230
+ msgstr ""
1231
+
1232
+ #: ../admin/overview.php:160
1233
+ msgid "Gallery Editor"
1234
  msgstr ""
1235
 
 
 
 
1236
  #: ../admin/overview.php:161
1237
+ #, php-format
1238
+ msgid "You currently have %s rights."
1239
+ msgstr ""
1240
+
1241
+ #: ../admin/overview.php:168
1242
+ msgid "Welcome to NextGEN Gallery !"
1243
+ msgstr ""
1244
+
1245
+ #: ../admin/overview.php:169
1246
+ msgid "Latest News"
1247
+ msgstr ""
1248
+
1249
+ #: ../admin/overview.php:170
1250
+ msgid "Server Settings"
1251
+ msgstr ""
1252
+
1253
+ #: ../admin/overview.php:171
1254
+ msgid "Graphic Library"
1255
+ msgstr ""
1256
+
1257
+ #: ../admin/overview.php:187
1258
+ msgid "No GD support"
1259
+ msgstr ""
1260
+
1261
+ #: ../admin/overview.php:194
1262
+ #: ../admin/overview.php:233
1263
+ #: ../admin/overview.php:236
1264
+ #: ../admin/overview.php:239
1265
+ msgid "Yes"
1266
+ msgstr ""
1267
+
1268
+ #: ../admin/overview.php:196
1269
+ #: ../admin/overview.php:234
1270
+ #: ../admin/overview.php:237
1271
+ #: ../admin/overview.php:240
1272
  msgid "No"
1273
  msgstr ""
1274
 
1275
+ #: ../admin/overview.php:210
1276
  msgid "Not set"
1277
  msgstr ""
1278
 
1279
+ #: ../admin/overview.php:212
1280
+ #: ../admin/overview.php:215
1281
  msgid "On"
1282
  msgstr ""
1283
 
1284
+ #: ../admin/overview.php:213
1285
+ #: ../admin/overview.php:216
1286
  msgid "Off"
1287
  msgstr ""
1288
 
1289
+ #: ../admin/overview.php:219
1290
+ #: ../admin/overview.php:222
1291
+ #: ../admin/overview.php:225
1292
+ #: ../admin/overview.php:228
1293
+ #: ../admin/overview.php:231
1294
  msgid "N/A"
1295
  msgstr ""
1296
 
1297
+ #: ../admin/overview.php:230
1298
  msgid " MByte"
1299
  msgstr ""
1300
 
1301
+ #: ../admin/overview.php:243
1302
  msgid "Operating System"
1303
  msgstr ""
1304
 
1305
+ #: ../admin/overview.php:244
1306
  msgid "Server"
1307
  msgstr ""
1308
 
1309
+ #: ../admin/overview.php:245
1310
  msgid "Memory usage"
1311
  msgstr ""
1312
 
1313
+ #: ../admin/overview.php:246
1314
  msgid "MYSQL Version"
1315
  msgstr ""
1316
 
1317
+ #: ../admin/overview.php:247
1318
  msgid "SQL Mode"
1319
  msgstr ""
1320
 
1321
+ #: ../admin/overview.php:248
1322
  msgid "PHP Version"
1323
  msgstr ""
1324
 
1325
+ #: ../admin/overview.php:249
1326
  msgid "PHP Safe Mode"
1327
  msgstr ""
1328
 
1329
+ #: ../admin/overview.php:250
1330
  msgid "PHP Allow URL fopen"
1331
  msgstr ""
1332
 
1333
+ #: ../admin/overview.php:251
1334
  msgid "PHP Memory Limit"
1335
  msgstr ""
1336
 
1337
+ #: ../admin/overview.php:252
1338
  msgid "PHP Max Upload Size"
1339
  msgstr ""
1340
 
1341
+ #: ../admin/overview.php:253
1342
  msgid "PHP Max Post Size"
1343
  msgstr ""
1344
 
1345
+ #: ../admin/overview.php:254
1346
  msgid "PHP Max Script Execute Time"
1347
  msgstr ""
1348
 
1349
+ #: ../admin/overview.php:255
1350
  msgid "PHP Exif support"
1351
  msgstr ""
1352
 
1353
+ #: ../admin/overview.php:256
1354
  msgid "PHP IPTC support"
1355
  msgstr ""
1356
 
1357
+ #: ../admin/overview.php:257
1358
  msgid "PHP XML support"
1359
  msgstr ""
1360
 
1361
+ #: ../admin/overview.php:315
1362
  msgid "Storage Space"
1363
  msgstr ""
1364
 
1365
+ #: ../admin/overview.php:318
1366
  msgid "Upload Space Used:"
1367
  msgstr ""
1368
 
1369
+ #: ../admin/overview.php:324
1370
  msgid "Upload Space Remaining:"
1371
  msgstr ""
1372
 
1373
+ #: ../admin/roles.php:22
1374
  msgid "Updated capabilities"
1375
  msgstr ""
1376
 
1377
+ #: ../admin/roles.php:27
1378
  msgid "Roles / capabilities"
1379
  msgstr ""
1380
 
1381
+ #: ../admin/roles.php:28
1382
  msgid "Select the lowest role which should be able to access the follow capabilities. NextGEN Gallery supports the standard roles from WordPress."
1383
  msgstr ""
1384
 
1385
+ #: ../admin/roles.php:29
1386
  msgid "For a more flexible user management you can use the"
1387
  msgst