Gallery – Photo Gallery – Image Gallery - Version 1.0.1

Version Description

Download this release

Release Info

Developer GreenTreeLabs
Plugin Icon wp plugin Gallery – Photo Gallery – Image Gallery
Version 1.0.1
Comparing to
See all releases

Version 1.0.1

Files changed (54) hide show
  1. Modula.php +1000 -0
  2. README.txt +73 -0
  3. admin/add-gallery.php +116 -0
  4. admin/css/colors.css +0 -0
  5. admin/css/materialdesignicons.css +5107 -0
  6. admin/css/materialize.css +5702 -0
  7. admin/css/style.css +1440 -0
  8. admin/edit-gallery.php +426 -0
  9. admin/font/material-design-icons/license.txt +96 -0
  10. admin/font/material-design-icons/materialdesignicons-webfont.eot +0 -0
  11. admin/font/material-design-icons/materialdesignicons-webfont.svg +3804 -0
  12. admin/font/material-design-icons/materialdesignicons-webfont.ttf +0 -0
  13. admin/font/material-design-icons/materialdesignicons-webfont.woff +0 -0
  14. admin/font/material-design-icons/materialdesignicons-webfont.woff2 +0 -0
  15. admin/font/modula/modula-icons.eot +0 -0
  16. admin/font/modula/modula-icons.svg +19 -0
  17. admin/font/modula/modula-icons.ttf +0 -0
  18. admin/font/modula/modula-icons.woff +0 -0
  19. admin/font/roboto/Roboto-Bold-webfont.eot +0 -0
  20. admin/font/roboto/Roboto-Bold-webfont.svg +593 -0
  21. admin/font/roboto/Roboto-Bold-webfont.ttf +0 -0
  22. admin/font/roboto/Roboto-Bold-webfont.woff +0 -0
  23. admin/font/roboto/Roboto-Light-webfont.eot +0 -0
  24. admin/font/roboto/Roboto-Light-webfont.svg +641 -0
  25. admin/font/roboto/Roboto-Light-webfont.ttf +0 -0
  26. admin/font/roboto/Roboto-Light-webfont.woff +0 -0
  27. admin/font/roboto/Roboto-Regular-webfont.eot +0 -0
  28. admin/font/roboto/Roboto-Regular-webfont.svg +621 -0
  29. admin/font/roboto/Roboto-Regular-webfont.ttf +0 -0
  30. admin/font/roboto/Roboto-Regular-webfont.woff +0 -0
  31. admin/header.php +4 -0
  32. admin/icon.png +0 -0
  33. admin/images/effect.jpg +0 -0
  34. admin/include/image-list.php +90 -0
  35. admin/include/tinymce-galleries.php +83 -0
  36. admin/overview.php +162 -0
  37. admin/scripts/editor-plugin.js +32 -0
  38. admin/scripts/materialize.min.js +9 -0
  39. admin/scripts/modula-admin.js +862 -0
  40. admin/tutorial.php +9 -0
  41. lib/db-class.php +155 -0
  42. lib/gallery-class.php +351 -0
  43. lib/install-db.php +42 -0
  44. lib/languages/modula-gallery.pot +648 -0
  45. lightbox/lightbox2/css/style.css +202 -0
  46. lightbox/lightbox2/img/close.png +0 -0
  47. lightbox/lightbox2/img/loading.gif +0 -0
  48. lightbox/lightbox2/img/next.png +0 -0
  49. lightbox/lightbox2/img/prev.png +0 -0
  50. lightbox/lightbox2/js/script.js +1 -0
  51. scripts/effects.css +125 -0
  52. scripts/jquery.modula.js +534 -0
  53. scripts/materialize.min.js +9 -0
  54. scripts/modula.css +152 -0
Modula.php ADDED
@@ -0,0 +1,1000 @@
1
+ <?php
2
+ /**
3
+ Plugin Name: Modula Grid Gallery Lite
4
+ Plugin URI: http://modula.greentreelabs.net
5
+ Description: The Best Wordpress Gallery.
6
+ Author: GreenTreeLabs
7
+ Version: 1.0.1
8
+ Author URI: http://modula.greentreelabs.net
9
+ */
10
+
11
+ function modula_lite_create_db_tables()
12
+ {
13
+ include_once (WP_PLUGIN_DIR . '/modula-best-grid-gallery/lib/install-db.php');
14
+ modula_lite_install_db();
15
+ }
16
+
17
+ if (!class_exists("ModulaLite"))
18
+ {
19
+ class ModulaLite
20
+ {
21
+ private $defaultValues = array(
22
+ 'width' => 100,
23
+ 'height' => 800,
24
+ 'margin' => 10,
25
+ 'filters' => '',
26
+ 'filterClick' => 'F',
27
+ 'allFilterLabel' => 'All',
28
+ 'lightbox' => '',
29
+ 'shuffle' => 'F',
30
+ 'captionColor' => '#ffffff',
31
+ 'wp_field_caption' => 'caption',
32
+ 'wp_field_title' => 'title',
33
+ 'captionFontSize' => 14,
34
+ 'titleFontSize' => 16,
35
+ 'enableTwitter' => 'T',
36
+ 'enableFacebook' => 'T',
37
+ 'enableGplus' => 'T',
38
+ 'enablePinterest' => 'T',
39
+ 'socialIconColor' => '#ffffff',
40
+ 'loadedScale' => 100,
41
+ 'loadedRotate' => 0,
42
+ 'loadedHSlide' => 0,
43
+ 'loadedVSlide' => 0,
44
+ 'borderSize' => 0,
45
+ 'borderRadius' => 0,
46
+ 'borderColor' => '#ffffff',
47
+ 'shadowSize' => 0,
48
+ 'shadowColor' => '#ffffff',
49
+ 'style' => '',
50
+ 'script' => '',
51
+ 'randomFactor' => 50,
52
+ 'hoverColor' => '#000000',
53
+ 'hoverOpacity' => '50',
54
+ 'hoverEffect' => 'pufrobo'
55
+ );
56
+
57
+ public function __construct()
58
+ {
59
+ $this->plugin_name = plugin_basename(__FILE__);
60
+ $this->define_constants();
61
+ $this->define_db_tables();
62
+ $this->define_hover_effects();
63
+ $this->ModulaDB = $this->create_db_conn();
64
+
65
+ add_filter('widget_text', 'do_shortcode');
66
+ add_filter('mce_buttons', array($this, 'editor_button'));
67
+ add_filter('mce_external_plugins', array($this, 'register_editor_plugin'));
68
+
69
+ add_action('init', array($this, 'create_textdomain'));
70
+
71
+ add_action('wp_enqueue_scripts', array($this, 'add_gallery_scripts'));
72
+
73
+ add_action( 'admin_menu', array($this, 'add_gallery_admin_menu') );
74
+
75
+ add_shortcode( 'Modula', array($this, 'gallery_shortcode_handler') );
76
+
77
+ add_action('wp_ajax_modula_save_gallery', array($this,'save_gallery'));
78
+ add_action('wp_ajax_modula_save_image', array($this,'save_image'));
79
+ add_action('wp_ajax_modula_add_image', array($this,'add_image'));
80
+ add_action('wp_ajax_modula_list_images', array($this,'list_images'));
81
+ add_action('wp_ajax_modula_sort_images', array($this,'sort_images'));
82
+ add_action('wp_ajax_modula_delete_image', array($this,'delete_image'));
83
+ add_action('wp_ajax_modula_resize_images', array($this,'resize_images'));
84
+ add_action('wp_ajax_modula_delete_gallery', array($this,'delete_gallery'));
85
+ add_action('wp_ajax_modula_clone_gallery', array($this,'clone_gallery'));
86
+ add_action('wp_ajax_modula_create_gallery', array($this,'create_gallery'));
87
+ add_action('wp_ajax_mtg_shortcode_editor', array($this, 'mtg_shortcode_editor'));
88
+ add_action('wp_ajax_modula_get_config', array($this, 'get_config'));
89
+ add_action('wp_ajax_modula_update_config', array($this, 'update_config'));
90
+ }
91
+
92
+ //Define textdomain
93
+ public function create_textdomain()
94
+ {
95
+ $plugin_dir = basename(dirname(__FILE__));
96
+ load_plugin_textdomain( 'modula-gallery', false, $plugin_dir.'/lib/languages' );
97
+ }
98
+
99
+ function define_hover_effects()
100
+ {
101
+ $this->hoverEffects = array();
102
+ $this->hoverEffects[] = new ModulaHoverEffect('None', 'none', false, false, 0);
103
+ $this->hoverEffects[] = new ModulaHoverEffect('Pufrobo', 'pufrobo', true, true, 4);
104
+ $this->hoverEffects[] = new ModulaHoverEffect('Fluid Up', '', true, true, 0);
105
+ $this->hoverEffects[] = new ModulaHoverEffect('Hide', '', true, true, 4);
106
+ $this->hoverEffects[] = new ModulaHoverEffect('Quiet', '', true, false, 4);
107
+ $this->hoverEffects[] = new ModulaHoverEffect('Catinelle', '', false, false, 4);
108
+ $this->hoverEffects[] = new ModulaHoverEffect('Reflex', '', true, true, 4);
109
+ $this->hoverEffects[] = new ModulaHoverEffect('Curtain', '', true, false, 4);
110
+ $this->hoverEffects[] = new ModulaHoverEffect('Lens', '', true, true, 4);
111
+ $this->hoverEffects[] = new ModulaHoverEffect('Appear', '', true, false, 4);
112
+ $this->hoverEffects[] = new ModulaHoverEffect('Crafty', '', true, true, 0);
113
+ $this->hoverEffects[] = new ModulaHoverEffect('Seemo', '', true, false, 4);
114
+ $this->hoverEffects[] = new ModulaHoverEffect('Comodo', '', true, false, 4);
115
+ }
116
+
117
+
118
+ //delete gallery
119
+ function delete_gallery()
120
+ {
121
+ if(check_admin_referer("Modula","Modula"))
122
+ {
123
+ $id= intval($_POST['gid']);
124
+ $this->ModulaDB->deleteGallery($id);
125
+ }
126
+
127
+ die();
128
+ }
129
+
130
+ public function update_config()
131
+ {
132
+ if(check_admin_referer("Modula","Modula"))
133
+ {
134
+ $id = $_POST['id'];
135
+ $config = stripslashes($_POST['config']);
136
+
137
+ $this->ModulaDB->update_config($id, $config);
138
+ }
139
+
140
+ die();
141
+ }
142
+
143
+ public function get_config()
144
+ {
145
+ if(check_admin_referer("Modula","Modula"))
146
+ {
147
+ $id = $_POST['id'];
148
+
149
+ $data = $this->ModulaDB->getConfig($id);
150
+
151
+ print json_encode($data);
152
+
153
+ }
154
+
155
+ die();
156
+ }
157
+
158
+ //add gallery
159
+
160
+ function create_gallery()
161
+ {
162
+ if(check_admin_referer("Modula","Modula"))
163
+ {
164
+ $data = $this->defaultValues;
165
+ $data["name"] = $_POST['name'];
166
+ $data["description"] = $_POST['description'];
167
+ $data["width"] = $_POST['width'];
168
+ $data["height"] = $_POST['height'];
169
+
170
+ $this->ModulaDB->addGallery($data);
171
+ $id = $this->ModulaDB->getLastGalleryId()->Id;
172
+
173
+ if($id > 0 && array_key_exists('images', $_POST) && strlen($_POST['images']))
174
+ {
175
+ $enc_images = stripslashes($_POST["images"]);
176
+ $images = array_splice(json_decode($enc_images), 0, 11 + 9);
177
+ $result = $this->ModulaDB->addImages($id, $images);
178
+ }
179
+
180
+ print $id;
181
+ }
182
+
183
+ die;
184
+ }
185
+
186
+ //clone gallery
187
+ function clone_gallery()
188
+ {
189
+ if(check_admin_referer('Modula','Modula'))
190
+ {
191
+ $sourceId = intval($_POST['gid']);
192
+ $g = $this->ModulaDB->getGalleryById($sourceId);
193
+ $g->name .="(copy)";
194
+ $this->ModulaDB->addGallery($g);
195
+ $id = $this->ModulaDB->getNewGalleryId();
196
+ $images = $this->ModulaDB->getImagesByGalleryId($sourceId);
197
+
198
+ foreach($images as &$image)
199
+ {
200
+ $image->Id = null;
201
+ $image->gid = $id;
202
+ }
203
+
204
+ $this->ModulaDB->addImages($id, $images);
205
+ }
206
+
207
+ die();
208
+ }
209
+
210
+
211
+ //Define constants
212
+ public function define_constants()
213
+ {
214
+ if ( ! defined( 'Modula_PLUGIN_BASENAME' ) )
215
+ define( 'Modula_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
216
+
217
+ if ( ! defined( 'Modula_PLUGIN_NAME' ) )
218
+ define( 'Modula_PLUGIN_NAME', trim( dirname( Modula_PLUGIN_BASENAME ), '/' ) );
219
+
220
+ if ( ! defined( 'Modula_PLUGIN_DIR' ) )
221
+ define( 'Modula_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . Modula_PLUGIN_NAME );
222
+ }
223
+
224
+ //delete Gallery
225
+
226
+
227
+
228
+ //Define DB tables
229
+ public function define_db_tables()
230
+ {
231
+ global $wpdb;
232
+
233
+ $wpdb->ModulaGalleries = $wpdb->prefix . 'modula';
234
+ $wpdb->ModulaImages = $wpdb->prefix . 'modula_images';
235
+ }
236
+
237
+
238
+ public function create_db_conn()
239
+ {
240
+ require('lib/db-class.php');
241
+ $ModulaDB = ModulaLiteDB::getInstance();
242
+ return $ModulaDB;
243
+ }
244
+
245
+ public function editor_button($buttons)
246
+ {
247
+ array_push($buttons, 'separator', 'mtg_shortcode_editor');
248
+ return $buttons;
249
+ }
250
+
251
+ public function register_editor_plugin($plugin_array)
252
+ {
253
+ $plugin_array['mtg_shortcode_editor'] = plugins_url('/admin/scripts/editor-plugin.js',__file__);
254
+ return $plugin_array;
255
+ }
256
+
257
+ public function mtg_shortcode_editor()
258
+ {
259
+ $css_path = plugins_url( 'assets/css/admin.css', __FILE__ );
260
+ $admin_url = admin_url();
261
+
262
+ $galleries = $this->ModulaDB->getGalleries(); //load all galleries
263
+
264
+ include 'admin/include/tinymce-galleries.php';
265
+ die();
266
+ }
267
+
268
+ //Add gallery scripts
269
+ public function add_gallery_scripts()
270
+ {
271
+ wp_enqueue_script('jquery');
272
+
273
+ wp_register_script('modula', WP_PLUGIN_URL.'/modula-best-grid-gallery/scripts/jquery.modula.js', array('jquery'));
274
+ wp_enqueue_script('modula');
275
+
276
+
277
+ wp_register_style('modula_stylesheet', WP_PLUGIN_URL.'/modula-best-grid-gallery/scripts/modula.css');
278
+ wp_enqueue_style('modula_stylesheet');
279
+
280
+ wp_register_style('effects_stylesheet', WP_PLUGIN_URL.'/modula-best-grid-gallery/scripts/effects.css');
281
+ wp_enqueue_style('effects_stylesheet');
282
+
283
+ wp_register_script('lightbox2_script', WP_PLUGIN_URL.'/modula-best-grid-gallery/lightbox/lightbox2/js/script.js', array('jquery'));
284
+ wp_register_style('lightbox2_stylesheet', WP_PLUGIN_URL.'/modula-best-grid-gallery/lightbox/lightbox2/css/style.css');
285
+ }
286
+
287
+ //Admin Section - register scripts and styles
288
+ public function gallery_admin_init()
289
+ {
290
+ if(function_exists( 'wp_enqueue_media' ))
291
+ {
292
+ wp_enqueue_media();
293
+ }
294
+
295
+ wp_enqueue_script('jquery');
296
+
297
+ wp_enqueue_script( 'wp-color-picker' );
298
+ wp_enqueue_style( 'wp-color-picker' );
299
+
300
+ wp_enqueue_script('media-upload');
301
+ wp_enqueue_script('thickbox');
302
+
303
+ wp_register_style('materialize', WP_PLUGIN_URL.'/modula-best-grid-gallery/admin/css/materialize.css');
304
+ wp_enqueue_style('materialize');
305
+
306
+ wp_register_style('styles', WP_PLUGIN_URL.'/modula-best-grid-gallery/admin/css/style.css');
307
+ wp_enqueue_style('styles');
308
+
309
+ wp_register_style('effects', WP_PLUGIN_URL.'/modula-best-grid-gallery/scripts/effects.css');
310
+ wp_enqueue_style('effects');
311
+
312
+ wp_register_script('modula', WP_PLUGIN_URL.'/modula-best-grid-gallery/admin/scripts/modula-admin.js', array('jquery','media-upload','thickbox'));
313
+ wp_enqueue_script('modula');
314
+
315
+ wp_register_script('materialize', WP_PLUGIN_URL.'/modula-best-grid-gallery/admin/scripts/materialize.min.js', array('jquery'));
316
+ wp_enqueue_script('materialize');
317
+
318
+ wp_register_style('materialdesign-icons', WP_PLUGIN_URL.'/modula-best-grid-gallery/admin/css/materialdesignicons.css');
319
+ wp_enqueue_style('materialdesign-icons');
320
+
321
+ wp_enqueue_style('thickbox');
322
+
323
+ $tg_db_version = '1.0';
324
+ $installed_ver = get_option( "Modula_db_version" );
325
+
326
+ if($installed_ver != $tg_db_version )
327
+ {
328
+ modula_lite_create_db_tables();
329
+ update_option( "Modula_db_version", $tg_db_version );
330
+ }
331
+ }
332
+
333
+
334
+
335
+ //Create Admin Menu
336
+ public function add_gallery_admin_menu()
337
+ {
338
+ $overview = add_menu_page('Modula', 'Modula', 'edit_posts', 'Modula-admin', array($this, 'add_overview'), WP_PLUGIN_URL.'/modula-best-grid-gallery/admin/icon.png');
339
+ $tutorial = add_submenu_page('Modula-admin', __('Modula >> Tutorial','Modula'), __('Tutorial','Modula'), 'edit_posts', 'modula-tutorial', array($this, 'tutorial'));
340
+ $add_gallery = add_submenu_page('Modula-admin', __('Modula >> Add Gallery','Modula'), __('Add Gallery','Modula'), 'edit_posts', 'add-modula', array($this, 'add_gallery'));
341
+ $edit_gallery = add_submenu_page('Modula-admin', __('Modula >> Edit Gallery','Modula'), __('Edit Gallery','Modula'), 'edit_posts', 'edit-modula', array($this, 'edit_gallery'));
342
+
343
+ add_action('load-'.$tutorial, array($this, 'gallery_admin_init'));
344
+ add_action('load-'.$overview, array($this, 'gallery_admin_init'));
345
+ add_action('load-'.$add_gallery, array($this, 'gallery_admin_init'));
346
+ add_action('load-'.$edit_gallery, array($this, 'gallery_admin_init'));
347
+ }
348
+
349
+ //Create Admin Pages
350
+ public function add_overview()
351
+ {
352
+ include("admin/overview.php");
353
+ }
354
+
355
+ public function tutorial()
356
+ {
357
+ include("admin/tutorial.php");
358
+ }
359
+
360
+ public function add_gallery()
361
+ {
362
+ include("admin/add-gallery.php");
363
+ }
364
+
365
+
366
+
367
+ public function delete_image()
368
+ {
369
+ if(check_admin_referer('Modula','Modula'))
370
+ {
371
+ foreach (explode(",", $_POST["id"]) as $id) {
372
+ $this->ModulaDB->deleteImage(intval($id));
373
+ }
374
+ }
375
+ die();
376
+ }
377
+
378
+ public function resize_images()
379
+ {
380
+ if(check_admin_referer('Modula','Modula'))
381
+ {
382
+ foreach (explode(",", $_POST["id"]) as $data)
383
+ {
384
+ $data = explode("-", $data);
385
+ $image = wp_get_attachment_image_src( $data[1], $_POST['size'] );
386
+
387
+ if ( !empty( $image ) )
388
+ $this->ModulaDB->editImage($data[0], array("imagePath" => $image[0]));
389
+ }
390
+ }
391
+ die();
392
+ }
393
+
394
+ public function add_image()
395
+ {
396
+ if(check_admin_referer('Modula','Modula'))
397
+ {
398
+ $gid = intval($_POST['galleryId']);
399
+ $prev = $this->ModulaDB->getImagesByGalleryId($gid);
400
+
401
+ $enc_images = stripslashes($_POST["enc_images"]);
402
+ $images = json_decode($enc_images);
403
+
404
+ $d = 18 + log10(100);
405
+ $images = array_slice($images, 0, $d - count($prev));
406
+
407
+ $result = $this->ModulaDB->addImages($gid, $images);
408
+
409
+ header("Content-type: application/json");
410
+ if($result === false)
411
+ {
412
+ print "{\"success\":false}";
413
+ }
414
+ else
415
+ {
416
+ print "{\"success\":true}";
417
+ }
418
+ }
419
+ die();
420
+ }
421
+
422
+ public function sort_images()
423
+ {
424
+ if(check_admin_referer('Modula','Modula'))
425
+ {
426
+ $result = $this->ModulaDB->sortImages(explode(',', $_POST['ids']));
427
+
428
+ header("Content-type: application/json");
429
+ if($result === false)
430
+ {
431
+ print "{\"success\":false}";
432
+ }
433
+ else
434
+ {
435
+ print "{\"success\":true}";
436
+ }
437
+ }
438
+ die();
439
+ }
440
+
441
+ public function save_image()
442
+ {
443
+ if(check_admin_referer('Modula','Modula'))
444
+ {
445
+ $result = false;
446
+ // $type = $_POST['type'];
447
+ $imageUrl = stripslashes($_POST['img_url']);
448
+ $imageCaption = stripslashes($_POST['description']);
449
+ $title = $_POST['title'];
450
+ $target = $_POST['target'];
451
+ $link = isset($_POST['link']) ? stripslashes($_POST['link']) : null;
452
+ $imageId = intval($_POST['img_id']);
453
+ $sortOrder = intval($_POST['sortOrder']);
454
+ $halign = $_POST['halign'];
455
+ $valign = $_POST['valign'];
456
+
457
+ $data = array("imagePath" => $imageUrl,
458
+ "target" => $target,
459
+ "link" => $link,
460
+ "imageId" => $imageId,
461
+ "description" => $imageCaption,
462
+ 'title' => $title,
463
+ "halign" => $halign,
464
+ "valign" => $valign,
465
+ "sortOrder" => $sortOrder);
466
+
467
+ if(!empty($_POST['id']))
468
+ {
469
+ $imageId = intval($_POST['id']);
470
+ $result = $this->ModulaDB->editImage($imageId, $data);
471
+ }
472
+ else
473
+ {
474
+ $data["gid"] = intval($_POST['galleryId']);
475
+ $result = $this->ModulaDB->addFullImage($data);
476
+ }
477
+
478
+ header("Content-type: application/json");
479
+
480
+ if($result === false)
481
+ {
482
+ print "{\"success\":false}";
483
+ }
484
+ else
485
+ {
486
+ print "{\"success\":true}";
487
+ }
488
+
489
+ }
490
+ die();
491
+ }
492
+
493
+ public function list_images()
494
+ {
495
+ if(check_admin_referer('Modula','Modula'))
496
+ {
497
+ $gid = intval($_POST["gid"]);
498
+ $gallery = $this->ModulaDB->getGalleryById($gid);
499
+
500
+ $imageResults = $this->ModulaDB->getImagesByGalleryId($gid);
501
+
502
+ include('admin/include/image-list.php');
503
+ }
504
+ die();
505
+ }
506
+
507
+ private function checkboxVal($field)
508
+ {
509
+ if(isset($_POST[$field]))
510
+ //return 'checked';
511
+ return 'T';
512
+ //return '';
513
+ return 'F';
514
+ }
515
+
516
+ public function save_gallery()
517
+ {
518
+ if(check_admin_referer('Modula','Modula'))
519
+ {
520
+
521
+ $galleryName = stripslashes($_POST['tg_name']);
522
+ $galleryDescription = stripslashes($_POST['tg_description']);
523
+ $slug = strtolower(str_replace(" ", "", $galleryName));
524
+ $margin = intval($_POST['tg_margin']);
525
+ $shuffle = $this->checkboxVal('tg_shuffle');
526
+ $width = $_POST['tg_width'];
527
+ $height = $_POST['tg_height'];
528
+ $enableTwitter = $this->checkboxVal('tg_enableTwitter');
529
+ $enableFacebook =$this->checkboxVal('tg_enableFacebook');
530
+ $enableGplus = $this->checkboxVal('tg_enableGplus');
531
+ $enablePinterest =$this->checkboxVal('tg_enablePinterest');
532
+ $lightbox = $_POST['tg_lightbox'];
533
+ $wp_field_caption = $_POST['tg_wp_field_caption'];
534
+ $wp_field_title = $_POST['tg_wp_field_title'];
535
+ $captionColor = $_POST['tg_captionColor'];
536
+ $borderSize = intval($_POST['tg_borderSize']);
537
+ $loadedScale = intval($_POST['tg_loadedScale']);
538
+ $loadedRotate = intval($_POST['tg_loadedRotate']);
539
+ $loadedVSlide = intval($_POST['tg_loadedVSlide']);
540
+ $loadedHSlide = intval($_POST['tg_loadedHSlide']);
541
+ $socialIconColor = $_POST['tg_socialIconColor'];
542
+ $hoverEffect = $_POST['tg_hoverEffect'];
543
+ $titleFontSize = intval($_POST['tg_titleFontSize']);
544
+ $captionFontSize = intval($_POST['tg_captionFontSize']);
545
+ $borderColor = $_POST['tg_borderColor'];
546
+ $borderRadius = intval($_POST['tg_borderRadius']);
547
+ $shadowColor = $_POST['tg_shadowColor'];
548
+ $shadowSize = intval($_POST['tg_shadowSize']);
549
+ $style = $_POST['tg_style'];
550
+ $script = $_POST['tg_script'];
551
+
552
+ $id = isset($_POST['ftg_gallery_edit']) ? intval($_POST['ftg_gallery_edit']) : 0;
553
+
554
+ $data = array('name' => $galleryName,
555
+ 'slug' => $slug,
556
+ 'description' => $galleryDescription,
557
+ 'lightbox' => $lightbox,
558
+ 'wp_field_caption' => $wp_field_caption,
559
+ 'wp_field_title' => $wp_field_title,
560
+ 'margin' => $margin,
561
+ 'randomFactor' => $_POST['tg_randomFactor'],
562
+ 'shuffle' => $shuffle,
563
+ 'enableTwitter' => $enableTwitter,
564
+ 'enableFacebook' => $enableFacebook,
565
+ 'enableGplus' => $enableGplus,
566
+ 'enablePinterest' => $enablePinterest,
567
+ 'captionColor' => $captionColor,
568
+ 'hoverEffect' => $hoverEffect,
569
+ 'borderSize' => $borderSize,
570
+ 'loadedScale' => $loadedScale,
571
+ 'loadedHSlide' => $loadedHSlide,
572
+ 'loadedVSlide' => $loadedVSlide,
573
+ 'loadedRotate' => $loadedRotate,
574
+ 'socialIconColor' => $socialIconColor,
575
+ 'captionFontSize' => $captionFontSize,
576
+ 'titleFontSize' => $titleFontSize,
577
+ 'borderColor' => $borderColor,
578
+ 'borderRadius' => $borderRadius,
579
+ 'shadowSize' => $shadowSize,
580
+ 'shadowColor' => $shadowColor,
581
+ 'width' => $width,
582
+ 'height' => $height,
583
+ 'style' => $style,
584
+ 'script' => $script
585
+ );
586
+
587
+ header("Content-type: application/json");
588
+ if($id > 0)
589
+ {
590
+ $result = $this->ModulaDB->editGallery($id, $data);
591
+ }
592
+ else
593
+ {
594
+ $result = $this->ModulaDB->addGallery($data);
595
+ $id = $this->ModulaDB->getNewGalleryId();
596
+ }
597
+
598
+ if($result)
599
+ print "{\"success\":true,\"id\":" . $id ."}";
600
+ else
601
+ print "{\"success\":false}";
602
+ }
603
+ die();
604
+ }
605
+
606
+ public function edit_gallery()
607
+ {
608
+ $modula_fields = $this->fields;
609
+ $modula_parent_page = "dashboard";
610
+
611
+ include("admin/edit-gallery.php");
612
+ }
613
+
614
+ public function list_thumbnail_sizes()
615
+ {
616
+ global $_wp_additional_image_sizes;
617
+ $sizes = array();
618
+ foreach( get_intermediate_image_sizes() as $s )
619
+ {
620
+ $sizes[ $s ] = array( 0, 0 );
621
+ if( in_array( $s, array( 'thumbnail', 'medium', 'large' ) ) )
622
+ {
623
+ $sizes[ $s ][0] = get_option( $s . '_size_w' );
624
+ $sizes[ $s ][1] = get_option( $s . '_size_h' );
625
+ }
626
+ else
627
+ {
628
+ if( isset( $_wp_additional_image_sizes ) &&
629
+ isset( $_wp_additional_image_sizes[ $s ] ))
630
+ $sizes[ $s ] = array( $_wp_additional_image_sizes[ $s ]['width'], $_wp_additional_image_sizes[ $s ]['height'], );
631
+ }
632
+ }
633
+
634
+ return $sizes;
635
+ }
636
+
637
+ public function gallery_shortcode_handler($atts)
638
+ {
639
+ require_once('lib/gallery-class.php');
640
+ global $Modula;
641
+
642
+ if (class_exists('ModulaFE')) {
643
+ $Modula = new ModulaFE($this->ModulaDB);
644
+
645
+ if(! empty($atts['id']))
646
+ $Modula->initByGalleryId($atts['id']);
647
+
648
+ if(! empty($atts['ids']))
649
+ $Modula->initByImageIds($atts['ids']);
650
+
651
+ $settings = $Modula->getGallery();
652
+ switch($settings->lightbox)
653
+ {
654
+ default:
655
+ case "lightbox2":
656
+ wp_enqueue_style('lightbox2_stylesheet');
657
+ wp_enqueue_script('lightbox2_script');
658
+ break;
659
+ }
660
+ return $Modula->render();
661
+ }
662
+ else {
663
+ return "Gallery not found.";
664
+ }
665
+ }
666
+
667
+
668
+ /* example */
669
+
670
+ var $fields = array(
671
+
672
+ "General" => array(
673
+ "icon" => "mdi mdi-settings",
674
+ "fields" => array(
675
+ "name" => array(
676
+ "name" => "Name",
677
+ "type" => "text",
678
+ "description" => "Name of the gallery, for internal use.",
679
+ "excludeFrom" => array()
680
+ ),
681
+ "description" => array(
682
+ "name" => "Description",
683
+ "type" => "text",
684
+ "description" => "This description is for internal use.",
685
+ "excludeFrom" => array()
686
+ ),
687
+ "width" => array(
688
+ "name" => "Width",
689
+ "type" => "text",
690
+ "description" => "Width of the gallery (i.e.: 100% or 500px)",
691
+ "mu" => "px or %",
692
+ "excludeFrom" => array()
693
+ ),
694
+ "height" => array(
695
+ "name" => "Height",
696
+ "type" => "number",
697
+ "description" => "Height of the gallery in pixels",
698
+ "mu" => "px",
699
+ "excludeFrom" => array()
700
+ ),
701
+ "margin" => array(
702
+ "name" => "Margin",
703
+ "type" => "number",
704
+ "description" => "Margin between images",
705
+ "mu" => "px",
706
+ "excludeFrom" => array()
707
+ ),
708
+ "randomFactor" => array(
709
+ "name" => "Random factor",
710
+ "type" => "slider",
711
+ "description" => "",
712
+ "min" => 0,
713
+ "max" => 100,
714
+ "mu" => "%",
715
+ "default"=>20,
716
+ "excludeFrom" => array()
717
+ ),
718
+ "filters" => array(
719
+ "name" => "Filters",
720
+ "type" => "PRO_FEATURE",
721
+ "description" => "Add your own filters here. Each image can have one or more filters.",
722
+ "excludeFrom" => array()
723
+ ),
724
+ "filterClick" => array(
725
+ "name" => "Reload Page on filter click",
726
+ "type" => "PRO_FEATURE",
727
+ "description" => "Turn this feature ON if you want to use filters with most lightboxes",
728
+ "excludeFrom" => array()
729
+ ),
730
+ "allFilterLabel" => array(
731
+ "name" => "Text for 'All' filter",
732
+ "type" => "PRO_FEATURE",
733
+ "description" => "Write here the label for the 'All' filter",
734
+ "default"=>"All",
735
+ "excludeFrom" => array()
736
+ ),
737
+ "lightbox" => array(
738
+ "name" => "Lightbox &amp; Links",
739
+ "type" => "select",
740
+ "description" => "<strong><a href='http://modula.greentreelabs.net/pro.html' target='_blank'>Buy Modula PRO</a> and get 5 more lightboxes!</strong><br>Define here what happens when user click on the images.",
741
+ "values" => array(
742
+ "Link" => array("|No link", "direct|Direct link to image", "|Attachment page"),
743
+ "Lightboxes" => array("lightbox2|Lightbox")
744
+ ),
745
+ "disabled" => array(
746
+ "Lightboxes with PRO license" => array("magnific|Magnific popup", "prettyphoto|PrettyPhoto", "fancybox|FancyBox", "swipebox|SwipeBox", "lightbox2|Lightbox")
747
+ ),
748
+ "excludeFrom" => array()
749
+ ),
750
+ "shuffle" => array(
751
+ "name" => "Shuffle images",
752
+ "type" => "toggle",
753
+ "default" => "T",
754
+ "description" => "Flag it if you want to shuffle the gallery at each page load",
755
+ "excludeFrom" => array()
756
+ )
757
+ )
758
+ ),
759
+ "Captions" => array(
760
+ "icon" => "mdi mdi-comment-text-outline",
761
+ "fields" => array(
762
+ "captionColor" => array(
763
+ "name" => "Caption color",
764
+ "type" => "color",
765
+ "description" => "Color of the caption.",
766
+ "default" => "#ffffff",
767
+ "excludeFrom" => array()
768
+ ),
769
+ "wp_field_caption" => array(
770
+ "name" => "WordPress caption field",
771
+ "type" => "select",
772
+ "description" => "WordPress field used for captions. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore captions just set it to '<i>Don't use captions</i>'.",
773
+ "values" => array(
774
+ "Field" => array("none|Don't use captions", "title|Title", "caption|Caption", "description|Description")
775
+ ),
776
+ "excludeFrom" => array("shortcode")
777
+ ),
778
+ "wp_field_title" => array(
779
+ "name" => "WordPress title field",
780
+ "type" => "select",
781
+ "description" => "WordPress field used for titles. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore titles just set it to '<i>Don't use titles</i>'.",
782
+ "values" => array(
783
+ "Field" => array("none|Don't use titles", "title|Title", "description|Description")
784
+ ),
785
+ "excludeFrom" => array("shortcode")
786
+ ),
787
+ "captionFontSize" => array(
788
+ "name" => "Caption Font Size",
789
+ "type" => "number",
790
+ "description" => "",
791
+ "mu" => "px",
792
+ "excludeFrom" => array()
793
+ ),
794
+ "titleFontSize" => array(
795
+ "name" => "Title Font Size",
796
+ "type" => "number",
797
+ "description" => "",
798
+ "mu" => "px",
799
+ "excludeFrom" => array()
800
+ ),
801
+ )
802
+
803
+ ),
804
+ "Social" => array(
805
+ "icon" => "mdi mdi-link-variant",
806
+ "fields" => array(
807
+ "enableTwitter" => array(
808
+ "name" => "Add Twitter icon",
809
+ "type" => "toggle",
810
+ "default" => "T",
811
+ "description" => "Enable Twitter Sharing",
812
+ "excludeFrom" => array()
813
+ ),
814
+ "enableFacebook" => array(
815
+ "name" => "Add Facebook icon",
816
+ "type" => "toggle",
817
+ "default" => "T",
818
+ "description" => "Enable Facebook Sharing",
819
+ "excludeFrom" => array()
820
+ ),
821
+ "enableGplus" => array(
822
+ "name" => "Add Google Plus icon",
823
+ "type" => "toggle",
824
+ "default" => "T",
825
+ "description" => "Enable Google Plus Sharing",
826
+ "excludeFrom" => array()
827
+ ),
828
+ "enablePinterest" => array(
829
+ "name" => "Add Pinterest icon",
830
+ "type" => "toggle",
831
+ "default" => "T",
832
+ "description" => "Enable Pinterest Sharing",
833
+ "excludeFrom" => array()
834
+ ),
835
+ "socialIconColor" => array(
836
+ "name" => "Color of social sharing icons",
837
+ "type" => "color",
838
+ "description" => "Set the color of the social sharing icons",
839
+ "default" => "#ffffff",
840
+ "excludeFrom" => array()
841
+ )
842
+ )
843
+
844
+ ),
845
+ "Image loaded effects" => array(
846
+ "icon" => "mdi mdi-reload",
847
+ "fields" => array(
848
+ "loadedScale" => array(
849
+ "name" => "Scale",
850
+ "description" => "Choose a value below 100% for a zoom-in effect. Choose a value over 100% for a zoom-out effect",
851
+ "type" => "slider",
852
+ "min" => 0,
853
+ "max" => 200,
854
+ "mu" => "%",
855
+ "default"=>100,
856
+ "excludeFrom" => array()
857
+ ),
858
+ "loadedRotate" => array(
859
+ "name" => "Rotate",
860
+ "description" => "",
861
+ "type" => "PRO_FEATURE",
862
+ "min" => -180,
863
+ "max" => 180,
864
+ "default" => 0,
865
+ "mu" => "deg",
866
+ "excludeFrom" => array()
867
+ ),
868
+ "loadedHSlide" => array(
869
+ "name" => "Horizontal slide",
870
+ "description" => "",
871
+ "type" => "PRO_FEATURE",
872
+ "min" => -100,
873
+ "max" => 100,
874
+ "mu" => "px",
875
+ "default" => 0,
876
+ "excludeFrom" => array()
877
+ ),
878
+ "loadedVSlide" => array(
879
+ "name" => "Vertical slide",
880
+ "description" => "",
881
+ "type" => "PRO_FEATURE",
882
+ "min" => -100,
883
+ "max" => 100,
884
+ "mu" => "px",
885
+ "default" => 0,
886
+ "excludeFrom" => array()
887
+ )
888
+
889
+ )
890
+ ),
891
+ "Hover effect" => array(
892
+ "icon" => "mdi mdi-blur",
893
+ "fields" => array(
894
+ "Effect" => array(
895
+ "name" => "Effect",
896
+ "description" => "Select an hover effect",
897
+ "type" => "hover-effect",
898
+ "excludeFrom" => array()
899
+ )
900
+ )
901
+ ),
902
+ "Style" => array(
903
+ "icon" => "mdi mdi-format-paint",
904
+ "fields" => array(
905
+ "borderSize" => array(
906
+ "name" => "Border Size",
907
+ "type" => "slider",
908
+ "description" => "",
909
+ "mu" => "px",
910
+ "min" => 0,
911
+ "max" => 10,
912
+ "default" => 0,
913
+ "excludeFrom" => array()
914
+ ),
915
+ "borderRadius" => array(
916
+ "name" => "Border Radius",
917
+ "type" => "slider",
918
+ "description" => "",
919
+ "mu" => "px",
920
+ "min" => 0,
921
+ "max" => 100,
922
+ "default" => 0,
923
+ "excludeFrom" => array()
924
+ ),
925
+ "borderColor" => array(
926
+ "name" => "Border Color",
927
+ "type" => "color",
928
+ "description" => "",
929
+ "default" => "#ffffff",
930
+ "excludeFrom" => array()
931
+ ),
932
+ "shadowSize" => array(
933
+ "name" => "Shadow Size",
934
+ "type" => "slider",
935
+ "description" => "",
936
+ "mu" => "px",
937
+ "min" => 0,
938
+ "max" => 20,
939
+ "default" => 0,
940
+ "excludeFrom" => array()
941
+ ),
942
+ "shadowColor" => array(
943
+ "name" => "Shadow Color",
944
+ "type" => "color",
945
+ "description" => "",
946
+ "default" => "#ffffff",
947
+ "excludeFrom" => array()
948
+ ),
949
+
950
+ )
951
+ ),
952
+ "Customizations" => array(
953
+ "icon" => "mdi mdi-puzzle",
954
+ "fields" => array(
955
+ "script" => array(
956
+ "name" => "Custom scripts",
957
+ "type" => "textarea",
958
+ "description" => "This script will be called after the gallery initialization. Useful for custom lightboxes.
959
+ <br />
960
+ <br />
961
+ <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>",
962
+ "excludeFrom" => array("shortcode")
963
+ ),
964
+ "style" => array(
965
+ "name" => "Custom css",
966
+ "type" => "textarea",
967
+ "description" => "<strong>Write just the code without using the &lt;style&gt;&lt;/style&gt; tags</strong>",
968
+ "excludeFrom" => array("shortcode")
969
+ )
970
+ )
971
+ )
972
+
973
+ );
974
+ }
975
+
976
+ class ModulaHoverEffect
977
+ {
978
+ var $name;
979
+ var $code;
980
+ var $allowTitle;
981
+ var $allowSubtitle;
982
+ var $maxSocial;
983
+
984
+ public function __construct($name, $code, $allowTitle, $allowSubtitle, $maxSocial)
985
+ {
986
+ $this->name = $name;
987
+ $this->code = $code;
988
+ $this->allowTitle = $allowTitle;
989
+ $this->allowSubtitle = $allowSubtitle;
990
+ $this->maxSocial = $maxSocial;
991
+ }
992
+ }
993
+ }
994
+
995
+ if (class_exists("ModulaLite"))
996
+ {
997
+ global $ob_ModulaLite;
998
+ $ob_ModulaLite = new ModulaLite();
999
+ }
1000
+ ?>
README.txt ADDED
@@ -0,0 +1,73 @@
1
+ === Best WordPress Gallery - Modula Grid Lite ===
2
+ Contributors: GreenTreeLabs
3
+ Tags: best gallery, best gallery plugin, best responsive gallery, best responsive wordpress gallery, best wordpress gallery, best wordpress gallery plugin, best wp gallery, design portfolio, fullscreen, gallery, Gallery Plugin, image gallery, image gallery plugin, Image Rotator, javascript gallery, javascript rotator, jquery gallery, jquery rotator, media uploader, photo gallery, photo rotator, Picture Gallery, portfolio, responsive, responsive galleries, responsive gallery, responsive gallery plugin, responsive image gallery, responsive image gallery plugin, responsive rotator, responsive slideshow, responsive slideshow plugin, rotator, shortcode, slideshow, slideshow plugin, template tag, wordpress galleries, wordpress gallery, wordpress gallery plugin
4
+ Requires at least: 4.0
5
+ Tested up to: 4.3.1
6
+ Stable tag: trunk
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Creative Multipurpose Grid Gallery for WordPress
11
+
12
+ == Description ==
13
+ Modula Grid Gallery, the best WordPress gallery plugin, is now available also in Lite version. Modula is currently the easiest and fastest gallery plugin for WordPress. With its wizard you are able to build your galleries in a few seconds, unlike many other galleries.
14
+
15
+ Do you wonder why this gallery is the best one? Look at the other galleries, see their demos, you’ll notice something weird ... THEY ALL LOOK THE SAME!
16
+
17
+ Modula is creative! Modula is dynamic! Modula doesn’t always look the same. Just have fun with it! Modula uses a new concept to build its internal grid. After you set a width and a height for the gallery, Modula will create a random but smart grid inside. The result is a dynamic, creative, interesting and attractive gallery.
18
+
19
+ You can control how much randomness to use in each gallery, so you can obtain a more traditional layout by switching off the “random factor,” or you can make something much more different by incrementing this factor.
20
+
21
+ Modula is a justified grid gallery because YOU decide the width and the height of the gallery, and the images to put inside. Modula will think about everything else. Images will never exceed their container.
22
+
23
+ To achieve such a result, images will be cropped, but that’s not a problem at all, because you can set a custom alignment for those images where the subject is not at the center of the image.
24
+
25
+ Modula Grid Gallery is not only responsive but also fluid, which means you’ll see images organize themselves with an impressive animation even on mobile devices thanks to the CSS3 engine.
26
+
27
+ Ease of use doesn’t mean trivial galleries, indeed!
28
+ By using the Modula Admin Panel you’re able to fine tune every aspect of the gallery. Choose a gallery size, margins between images, the color and the size of captions. Each photo can have a title and a subtitle so you’re able to best describe every image.
29
+
30
+ What is Modula good for? Modula is also the best WordPress portfolio plugin, as it allows you to build gorgeous, creative portfolios.
31
+ Applications are: architecture, art, photography, food blogs, pets and animals, tattoos, travel and also wedding albums.
32
+
33
+ == Installation ==
34
+ = For automatic installation: =
35
+
36
+ The simplest way to install is to click on \'Plugins\' then \'Add\' and type \'Modula\' in the search field.
37
+
38
+ = For manual installation 1: =
39
+
40
+ 1. Login to your website and go to the Plugins section of your admin panel.
41
+ 2. Click the Add New button.
42
+ 3. Under Install Plugins, click the Upload link.
43
+ 4. Select the plugin zip file (modula.x.x.x.zip) from your computer then click the Install Now button.
44
+ 5. You should see a message stating that the plugin was installed successfully.
45
+ 6. Click the Activate Plugin link.
46
+
47
+ = For manual installation 2: =
48
+
49
+ 1. You should have access to the server where WordPress is installed. If you don\'t, see your system administrator.
50
+ 2. Copy the plugin zip file (modula.x.x.x.zip) up to your server and unzip it somewhere on the file system.
51
+ 3. Copy the \"modula-lite\" folder into the /wp-content/plugins directory of your WordPress installation.
52
+ 4. Login to your website and go to the Plugins section of your admin panel.
53
+ 5. Look for \"Modula\" and click Activate.
54
+
55
+ == Screenshots ==
56
+
57
+ 1. Gallery with Appear effect
58
+ 2. Gallery with Crafty effect and round corners
59
+ 3. Gallery with Catinelle effect
60
+ 4. Gallery with Appear effect
61
+ 5. Gallery with Pufrobo effect
62
+ 6. Lightgallery lightbox
63
+ 7. Admin panel with Material design
64
+
65
+ == Changelog ==
66
+ 1.0
67
+
68
+ First release!
69
+
70
+ == Upgrade Notice ==
71
+
72
+ = 1.0 =
73
+ * This is the launch version. No changes yet.
admin/add-gallery.php ADDED
@@ -0,0 +1,116 @@
1
+ <?php
2
+ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die(_e('You are not allowed to call this page directly.','modula-gallery')); }
3
+
4
+ $tg_subtitle = "New Gallery";
5
+ ?>
6
+
7
+ <?php include("header.php") ?>
8
+
9
+
10
+
11
+ <div id="modula-wizard" >
12
+ <h2> <?php _e('Add New Gallery','modula-gallery'); ?> </h2>
13
+ <form action="#" method="post">
14
+ <?php wp_nonce_field('Modula', 'Modula'); ?>
15
+ <input type="hidden" name="enc_images" value="" />
16
+
17
+ <fieldset data-step="1">
18
+ <div class="row">
19
+ <div class="input-field">
20
+ <input name="tg_name" id="name" type="text" class="validate" required="required">
21
+ <label for="name"><?php _e('Name of the gallery','modula-gallery')?></label>
22
+ </div>
23
+ </div>
24
+ <div class="row">
25
+ <div class="input-field">
26
+ <input name="tg_description" id="description" type="text" class="validate">
27
+ <label for="description"><?php _e('Description of the gallery (for internal use)','modula-gallery')?></label>
28
+ </div>
29
+ </div>
30
+ <div class="row">
31
+ <div class="input-field col s6">
32
+ <input name="tg_width" id="width" type="text" value="100%">
33
+ <label for="width"><?php _e('Gallery width','modula-gallery')?></label>
34
+ </div>
35
+ <div class="input-field col s6">
36
+ <input name="tg_height" id="height" type="text" value="800">
37
+ <label for="height"><?php _e('Gallery height in pixels','modula-gallery')?></label>
38
+ </div>
39
+ </div>
40
+ </fieldset>
41
+ <fieldset data-step="2" data-branch="images">
42
+ <div class="field">
43
+ <h5><?php _e('WordPress field for titles:','modula')?></h5>
44
+ <select class="browser-default" name="ftg_wp_field_title">
45
+ <option value="none">Don't use titles</option>
46
+ <option value="title" selected>Title</option>
47
+ <option value="description">Description</option>
48
+ </select>
49
+ </div>
50
+ <div class="field">
51
+ <h5><?php _e('WordPress field for captions:','modula')?></h5>
52
+ <select class="browser-default" name="ftg_wp_field_caption">
53
+ <option value="none">Don't use captions</option>
54
+ <option value="title">Title</option>
55
+ <option value="caption" selected>Caption</option>
56
+ <option value="description">Description</option>
57
+ </select>
58
+ </div>
59
+ </fieldset>
60
+ <fieldset data-step="3" data-save="true">
61
+ <div class="field">
62
+ <h5><?php _e('Choose a default image size','modula-gallery')?></h5>
63
+
64
+ <select name="def_imgsize" class="browser-default dropdown-menu">
65
+ <?php
66
+ foreach ($this->list_thumbnail_sizes() as $size => $atts)
67
+ {
68
+ print '<option '.($size == 'medium' ? 'selected' : '').' value="'. $size .'">' . $size . " (" . implode( 'x', $atts ) . ")</option>";
69
+ }
70
+ ?>
71
+ </select>
72
+ <label><?php _e('You can customize each image later','modula-gallery')?></label>
73
+ </div>
74
+ <div class="field select-images">
75
+ <a class="waves-effect waves-light btn add-images">
76
+ <i class="mdi mdi-plus left"></i> <?php _e('Add images','modula-gallery')?></a>
77
+ <br>
78
+ <label><?php _e('You can add images now or later.','modula-gallery')?></label>
79
+ <div class="images list-group"></div>
80
+ </div>
81
+ </fieldset>
82
+
83
+ <footer class="page-footer">
84
+ <div class="progress loading hide">
85
+ <div class="indeterminate"></div>
86
+ </div>
87
+
88
+ <a class="waves-effect waves-yellow btn-flat prev"><?php _e('Previous','modula-gallery')?></a>
89
+ <a class="waves-effect waves-green btn-flat next"><?php _e('Next','modula-gallery')?></a>
90
+ </footer>
91
+
92
+ </form>
93
+ <div id="success" class="modal">
94
+ <div class="modal-content">
95
+ <h4><?php _e('Success!','modula-gallery')?></h4>
96
+ <p><?php _e('Your gallery','modula-gallery')?> "<span class="gallery-name"></span>" <?php _e('has been created. Copy the following shortcode:','modula-gallery')?><br>
97
+ <code></code><br>
98
+ <?php _e('and paste it inside a post or a page. Otherwise click','modula-gallery')?> <a class='customize'><?php _e('here','modula-gallery')?></a> <?php _e('to customize
99
+ the gallery.','modula-gallery')?>
100
+ </p>
101
+ </div>
102
+ <div class="modal-'footer">
103
+ <a href="?page=Modula-admin" id="modal-close" class="waves-effect waves-green btn-flat modal-action"><?php _e('Close','modula-gallery')?></a>
104
+ </div>
105
+ </div>
106
+
107
+ <div id="error" class="modal">
108
+ <div class="modal-content">
109
+ <h4><?php _e('Error!','modula-gallery')?></h4>
110
+ <p><?php _e('For some reason it was not possible to save your gallery','modula-gallery')?></p>
111
+ </div>
112
+ <div class="modal-footer">
113
+ <a href="?page=Modula-admin" class="waves-effect waves-green btn-flat modal-action"><?php _e('Close','modula-gallery')?></a>
114
+ </div>
115
+ </div>
116
+ </div>
admin/css/colors.css ADDED
File without changes
admin/css/materialdesignicons.css ADDED
@@ -0,0 +1,5107 @@