Version Description
- COMPATIBILITY: WordPress 2.9
- FIXED: #fullsize z-index to keep below other elements such as drop down menus.
Download this release
Release Info
Developer | contrid |
Plugin | Slideshow Gallery |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- css/gallery-css.php +2 -2
- helpers/db.php +287 -281
- js/gallery.js +11 -9
- models/slide.php +2 -1
- readme.txt +7 -3
- slideshow-gallery-plugin.php +17 -5
- slideshow-gallery.php +1 -1
- views/admin/metaboxes/settings-general.php +1 -1
- views/admin/metaboxes/settings-submit.php +2 -4
- views/admin/settings.php +9 -5
- views/admin/slides/index.php +2 -2
- views/admin/slides/save.php +16 -2
- views/default/gallery.php +1 -1
css/gallery-css.php
CHANGED
@@ -9,12 +9,12 @@
|
|
9 |
#slideshow span { display:none; }
|
10 |
#wrapper { width:<?php echo ((int) $styles['width'] - 6); ?>px; background:<?php echo $styles['background']; ?>; padding:2px; border:<?php echo $styles['border']; ?>; margin:25px auto; display:none; }
|
11 |
#wrapper * { margin:0; padding:0; }
|
12 |
-
#fullsize { position:relative; overflow:hidden; width:<?php echo ((int) $styles['width'] - 6); ?>px; height:<?php echo $styles['height']; ?>px; }
|
13 |
#information { position:absolute; bottom:0; width:<?php echo ((int) $styles['width'] - 6); ?>px; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:200; opacity:.7; filter:alpha(opacity=70); }
|
14 |
#information h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; font-size:14px; }
|
15 |
#information p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; }
|
16 |
#image { width:<?php echo ((int) $styles['width'] - 6); ?>px; }
|
17 |
-
<?php if (empty($styles['resizeimages']) || $styles['resizeimages'] == "Y") : ?>#image img { position:absolute; border:none; width:<?php echo ((int) $styles['width'] - 6); ?>px; }<?php else : ?>#image img { position:absolute; border:none; width:auto; }<?php endif; ?>
|
18 |
.imgnav { position:absolute; width:25%; height:<?php echo ((int) $styles['height'] + 6); ?>px; cursor:pointer; z-index:150; }
|
19 |
#imgprev { left:0; background:url('../images/left.gif') left center no-repeat; }
|
20 |
#imgnext { right:0; background:url('../images/right.gif') right center no-repeat; }
|
9 |
#slideshow span { display:none; }
|
10 |
#wrapper { width:<?php echo ((int) $styles['width'] - 6); ?>px; background:<?php echo $styles['background']; ?>; padding:2px; border:<?php echo $styles['border']; ?>; margin:25px auto; display:none; }
|
11 |
#wrapper * { margin:0; padding:0; }
|
12 |
+
#fullsize { position:relative; z-index:1; overflow:hidden; width:<?php echo ((int) $styles['width'] - 6); ?>px; height:<?php echo $styles['height']; ?>px; }
|
13 |
#information { position:absolute; bottom:0; width:<?php echo ((int) $styles['width'] - 6); ?>px; height:0; background:<?php echo $styles['infobackground']; ?>; color:<?php echo $styles['infocolor']; ?>; overflow:hidden; z-index:200; opacity:.7; filter:alpha(opacity=70); }
|
14 |
#information h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; font-size:14px; }
|
15 |
#information p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; }
|
16 |
#image { width:<?php echo ((int) $styles['width'] - 6); ?>px; }
|
17 |
+
<?php if (empty($styles['resizeimages']) || $styles['resizeimages'] == "Y") : ?>#image img { position:absolute; border:none; width:<?php echo ((int) $styles['width'] - 6); ?>px; height:auto; }<?php else : ?>#image img { position:absolute; border:none; width:auto; }<?php endif; ?>
|
18 |
.imgnav { position:absolute; width:25%; height:<?php echo ((int) $styles['height'] + 6); ?>px; cursor:pointer; z-index:150; }
|
19 |
#imgprev { left:0; background:url('../images/left.gif') left center no-repeat; }
|
20 |
#imgnext { right:0; background:url('../images/right.gif') right center no-repeat; }
|
helpers/db.php
CHANGED
@@ -1,282 +1,288 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class GalleryDbHelper extends GalleryPlugin {
|
4 |
-
|
5 |
-
var $name = 'Db';
|
6 |
-
|
7 |
-
function find($conditions = array(), $fields = false, $order = array('id', "DESC"), $assign = true, $atts = array()) {
|
8 |
-
global $wpdb;
|
9 |
-
|
10 |
-
$newfields = "*";
|
11 |
-
|
12 |
-
if (!empty($fields)) {
|
13 |
-
if (is_array($fields)) {
|
14 |
-
$newfields = "";
|
15 |
-
$f = 1;
|
16 |
-
|
17 |
-
foreach ($fields as $field) {
|
18 |
-
$newfields .= "`" . $field . "`";
|
19 |
-
|
20 |
-
if ($f < count($fields)) {
|
21 |
-
$newfields .= ", ";
|
22 |
-
}
|
23 |
-
|
24 |
-
$f++;
|
25 |
-
}
|
26 |
-
} else {
|
27 |
-
$newfields = $fields;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
$query = "SELECT " . $newfields . " FROM `" . $this -> table . "`";
|
32 |
-
|
33 |
-
if (!empty($conditions) && is_array($conditions)) {
|
34 |
-
$query .= " WHERE";
|
35 |
-
$c = 1;
|
36 |
-
|
37 |
-
foreach ($conditions as $ckey => $cval) {
|
38 |
-
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
39 |
-
|
40 |
-
if ($c < count($conditions)) {
|
41 |
-
$query .= " AND";
|
42 |
-
}
|
43 |
-
|
44 |
-
$c++;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
$order = (empty($order)) ? array('id', "DESC") : $order;
|
49 |
-
list($ofield, $odir) = $order;
|
50 |
-
$query .= " ORDER BY `" . $ofield . "` " . $odir . "";
|
51 |
-
$query .= " LIMIT 1";
|
52 |
-
|
53 |
-
if ($record = $wpdb -> get_row($query)) {
|
54 |
-
if (!empty($record)) {
|
55 |
-
$data = $this -> init_class($this -> model, $record);
|
56 |
-
|
57 |
-
if ($assign == true) {
|
58 |
-
$this -> data = $data;
|
59 |
-
}
|
60 |
-
|
61 |
-
return $data;
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
return false;
|
66 |
-
}
|
67 |
-
|
68 |
-
function find_all($conditions = array(), $fields = false, $order = array('id', "DESC"), $limit = false, $assign = false, $distinct = false) {
|
69 |
-
global $wpdb;
|
70 |
-
|
71 |
-
$newfields = "*";
|
72 |
-
if (!empty($fields) && !is_array($fields)) { $newfields = $fields; }
|
73 |
-
$distinct = (!empty($distinct)) ? "DISTINCT " : "";
|
74 |
-
|
75 |
-
$query = "SELECT " . $distinct . $newfields . " FROM `" . $this -> table . "`";
|
76 |
-
|
77 |
-
if (!empty($conditions) && is_array($conditions)) {
|
78 |
-
$query .= " WHERE";
|
79 |
-
$c = 1;
|
80 |
-
|
81 |
-
foreach ($conditions as $ckey => $cval) {
|
82 |
-
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
83 |
-
|
84 |
-
if ($c < count($conditions)) {
|
85 |
-
$query .= " AND";
|
86 |
-
}
|
87 |
-
|
88 |
-
$c++;
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
$order = (empty($order)) ? array('id', "DESC") : $order;
|
93 |
-
list($ofield, $odir) = $order;
|
94 |
-
$query .= " ORDER BY `" . $ofield . "` " . $odir . "";
|
95 |
-
$query .= (empty($limit)) ? '' : " LIMIT " . $limit . "";
|
96 |
-
|
97 |
-
if ($records = $wpdb -> get_results($query)) {
|
98 |
-
if (!empty($records)) {
|
99 |
-
$data = array();
|
100 |
-
|
101 |
-
foreach ($records as $record) {
|
102 |
-
$data[] = $this -> init_class($this -> model, $record);
|
103 |
-
}
|
104 |
-
|
105 |
-
if ($assign == true) {
|
106 |
-
$this -> data = $data;
|
107 |
-
}
|
108 |
-
|
109 |
-
return $data;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
return false;
|
114 |
-
}
|
115 |
-
|
116 |
-
function save($data = null, $validate = true) {
|
117 |
-
global $wpdb;
|
118 |
-
|
119 |
-
$defaults = (method_exists($this, 'defaults')) ? $this -> defaults() : false;
|
120 |
-
$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
|
121 |
-
|
122 |
-
$r = wp_parse_args($data, $defaults);
|
123 |
-
$this -> data = GalleryHtmlHelper::array_to_object($r);
|
124 |
-
|
125 |
-
if ($validate == true) {
|
126 |
-
if (method_exists($this, 'validate')) {
|
127 |
-
$this -> validate($r);
|
128 |
-
}
|
129 |
-
}
|
130 |
-
|
131 |
-
if (empty($this -> errors)) {
|
132 |
-
switch ($this -> model) {
|
133 |
-
case 'Slide' :
|
134 |
-
$this -> data -> image = basename($this -> data -> image_url);
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
$
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
$
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
$
|
263 |
-
|
264 |
-
|
265 |
-
$
|
266 |
-
}
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class GalleryDbHelper extends GalleryPlugin {
|
4 |
+
|
5 |
+
var $name = 'Db';
|
6 |
+
|
7 |
+
function find($conditions = array(), $fields = false, $order = array('id', "DESC"), $assign = true, $atts = array()) {
|
8 |
+
global $wpdb;
|
9 |
+
|
10 |
+
$newfields = "*";
|
11 |
+
|
12 |
+
if (!empty($fields)) {
|
13 |
+
if (is_array($fields)) {
|
14 |
+
$newfields = "";
|
15 |
+
$f = 1;
|
16 |
+
|
17 |
+
foreach ($fields as $field) {
|
18 |
+
$newfields .= "`" . $field . "`";
|
19 |
+
|
20 |
+
if ($f < count($fields)) {
|
21 |
+
$newfields .= ", ";
|
22 |
+
}
|
23 |
+
|
24 |
+
$f++;
|
25 |
+
}
|
26 |
+
} else {
|
27 |
+
$newfields = $fields;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
$query = "SELECT " . $newfields . " FROM `" . $this -> table . "`";
|
32 |
+
|
33 |
+
if (!empty($conditions) && is_array($conditions)) {
|
34 |
+
$query .= " WHERE";
|
35 |
+
$c = 1;
|
36 |
+
|
37 |
+
foreach ($conditions as $ckey => $cval) {
|
38 |
+
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
39 |
+
|
40 |
+
if ($c < count($conditions)) {
|
41 |
+
$query .= " AND";
|
42 |
+
}
|
43 |
+
|
44 |
+
$c++;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$order = (empty($order)) ? array('id', "DESC") : $order;
|
49 |
+
list($ofield, $odir) = $order;
|
50 |
+
$query .= " ORDER BY `" . $ofield . "` " . $odir . "";
|
51 |
+
$query .= " LIMIT 1";
|
52 |
+
|
53 |
+
if ($record = $wpdb -> get_row($query)) {
|
54 |
+
if (!empty($record)) {
|
55 |
+
$data = $this -> init_class($this -> model, $record);
|
56 |
+
|
57 |
+
if ($assign == true) {
|
58 |
+
$this -> data = $data;
|
59 |
+
}
|
60 |
+
|
61 |
+
return $data;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
return false;
|
66 |
+
}
|
67 |
+
|
68 |
+
function find_all($conditions = array(), $fields = false, $order = array('id', "DESC"), $limit = false, $assign = false, $distinct = false) {
|
69 |
+
global $wpdb;
|
70 |
+
|
71 |
+
$newfields = "*";
|
72 |
+
if (!empty($fields) && !is_array($fields)) { $newfields = $fields; }
|
73 |
+
$distinct = (!empty($distinct)) ? "DISTINCT " : "";
|
74 |
+
|
75 |
+
$query = "SELECT " . $distinct . $newfields . " FROM `" . $this -> table . "`";
|
76 |
+
|
77 |
+
if (!empty($conditions) && is_array($conditions)) {
|
78 |
+
$query .= " WHERE";
|
79 |
+
$c = 1;
|
80 |
+
|
81 |
+
foreach ($conditions as $ckey => $cval) {
|
82 |
+
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
83 |
+
|
84 |
+
if ($c < count($conditions)) {
|
85 |
+
$query .= " AND";
|
86 |
+
}
|
87 |
+
|
88 |
+
$c++;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
$order = (empty($order)) ? array('id', "DESC") : $order;
|
93 |
+
list($ofield, $odir) = $order;
|
94 |
+
$query .= " ORDER BY `" . $ofield . "` " . $odir . "";
|
95 |
+
$query .= (empty($limit)) ? '' : " LIMIT " . $limit . "";
|
96 |
+
|
97 |
+
if ($records = $wpdb -> get_results($query)) {
|
98 |
+
if (!empty($records)) {
|
99 |
+
$data = array();
|
100 |
+
|
101 |
+
foreach ($records as $record) {
|
102 |
+
$data[] = $this -> init_class($this -> model, $record);
|
103 |
+
}
|
104 |
+
|
105 |
+
if ($assign == true) {
|
106 |
+
$this -> data = $data;
|
107 |
+
}
|
108 |
+
|
109 |
+
return $data;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
return false;
|
114 |
+
}
|
115 |
+
|
116 |
+
function save($data = null, $validate = true) {
|
117 |
+
global $wpdb;
|
118 |
+
|
119 |
+
$defaults = (method_exists($this, 'defaults')) ? $this -> defaults() : false;
|
120 |
+
$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
|
121 |
+
|
122 |
+
$r = wp_parse_args($data, $defaults);
|
123 |
+
$this -> data = GalleryHtmlHelper::array_to_object($r);
|
124 |
+
|
125 |
+
if ($validate == true) {
|
126 |
+
if (method_exists($this, 'validate')) {
|
127 |
+
$this -> validate($r);
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
if (empty($this -> errors)) {
|
132 |
+
switch ($this -> model) {
|
133 |
+
case 'Slide' :
|
134 |
+
$this -> data -> image = basename($this -> data -> image_url);
|
135 |
+
|
136 |
+
if (empty($this -> data -> uselink) || $this -> data -> uselink == "N") {
|
137 |
+
$this -> data -> link = "";
|
138 |
+
}
|
139 |
+
break;
|
140 |
+
}
|
141 |
+
|
142 |
+
//the MySQL query
|
143 |
+
$query = (empty($this -> data -> id)) ? $this -> insert_query($this -> model) : $this -> update_query($this -> model);
|
144 |
+
echo $query;
|
145 |
+
//return false;
|
146 |
+
|
147 |
+
if ($wpdb -> query($query)) {
|
148 |
+
$this -> insertid = $insertid = (empty($this -> data -> id)) ? $wpdb -> insert_id : $this -> data -> id;
|
149 |
+
return true;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
|
156 |
+
function save_field($field = null, $value = null, $conditions = array()) {
|
157 |
+
if (!empty($this -> model)) {
|
158 |
+
global $wpdb;
|
159 |
+
|
160 |
+
if (!empty($field)) {
|
161 |
+
$query = "UPDATE `" . $this -> table . "` SET `" . $field . "` = '" . $value . "'";
|
162 |
+
|
163 |
+
if (!empty($conditions) && is_array($conditions)) {
|
164 |
+
$query .= " WHERE";
|
165 |
+
$c = 1;
|
166 |
+
|
167 |
+
foreach ($conditions as $ckey => $cval) {
|
168 |
+
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
169 |
+
|
170 |
+
if ($c < count($conditions)) {
|
171 |
+
$query .= " AND";
|
172 |
+
}
|
173 |
+
|
174 |
+
$c++;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
if ($wpdb -> query($query)) {
|
179 |
+
return true;
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
|
187 |
+
function delete($record_id = '') {
|
188 |
+
global $wpdb;
|
189 |
+
|
190 |
+
if (!empty($record_id) && $record = $this -> find(array('id' => $record_id))) {
|
191 |
+
$query = "DELETE FROM `" . $this -> table . "` WHERE `id` = '" . $record_id . "' LIMIT 1";
|
192 |
+
|
193 |
+
if ($wpdb -> query($query)) {
|
194 |
+
//do nothing...
|
195 |
+
return true;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
|
202 |
+
function insert_query($model = '') {
|
203 |
+
if (!empty($model)) {
|
204 |
+
global $wpdb;
|
205 |
+
|
206 |
+
if (!empty($this -> data)) {
|
207 |
+
if (empty($this -> data -> id)) {
|
208 |
+
$query1 = "INSERT INTO `" . $this -> table . "` (";
|
209 |
+
$query2 = "";
|
210 |
+
$c = 1;
|
211 |
+
unset($this -> fields['key']);
|
212 |
+
|
213 |
+
foreach (array_keys($this -> fields) as $field) {
|
214 |
+
if (!empty($this -> data -> {$field}) || $this -> data -> {$field} == "0") {
|
215 |
+
if (is_array($this -> data -> {$field}) || is_object($this -> data -> {$field})) {
|
216 |
+
$value = serialize($this -> data -> {$field});
|
217 |
+
} else {
|
218 |
+
$value = mysql_escape_string($this -> data -> {$field});
|
219 |
+
}
|
220 |
+
|
221 |
+
$query1 .= "`" . $field . "`";
|
222 |
+
$query2 .= "'" . $value . "'";
|
223 |
+
|
224 |
+
if ($c < count($this -> fields)) {
|
225 |
+
$query1 .= ", ";
|
226 |
+
$query2 .= ", ";
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
$c++;
|
231 |
+
}
|
232 |
+
|
233 |
+
$query1 .= ") VALUES (";
|
234 |
+
$query = $query1 . "" . $query2 . ");";
|
235 |
+
|
236 |
+
return $query;
|
237 |
+
} else {
|
238 |
+
$query = $this -> update_query($model);
|
239 |
+
|
240 |
+
return $query;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
return false;
|
246 |
+
}
|
247 |
+
|
248 |
+
function update_query($model = '') {
|
249 |
+
if (!empty($model)) {
|
250 |
+
global $wpdb;
|
251 |
+
|
252 |
+
if (!empty($this -> data)) {
|
253 |
+
$query = "UPDATE `" . $this -> table . "` SET ";
|
254 |
+
$c = 1;
|
255 |
+
|
256 |
+
unset($this -> fields['id']);
|
257 |
+
unset($this -> fields['key']);
|
258 |
+
unset($this -> fields['created']);
|
259 |
+
|
260 |
+
foreach (array_keys($this -> fields) as $field) {
|
261 |
+
//if (!empty($this -> data -> {$field}) || $this -> data -> {$field} == "0") {
|
262 |
+
if (is_array($this -> data -> {$field}) || is_object($this -> data -> {$field})) {
|
263 |
+
$value = serialize($this -> data -> {$field});
|
264 |
+
} else {
|
265 |
+
$value = mysql_escape_string($this -> data -> {$field});
|
266 |
+
}
|
267 |
+
|
268 |
+
$query .= "`" . $field . "` = '" . $value . "'";
|
269 |
+
|
270 |
+
if ($c < count($this -> fields)) {
|
271 |
+
$query .= ", ";
|
272 |
+
}
|
273 |
+
//}
|
274 |
+
|
275 |
+
$c++;
|
276 |
+
}
|
277 |
+
|
278 |
+
$query .= " WHERE `id` = '" . $this -> data -> id . "' LIMIT 1";
|
279 |
+
|
280 |
+
return $query;
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
return false;
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
?>
|
js/gallery.js
CHANGED
@@ -23,6 +23,7 @@ TINY.slideshow.prototype={
|
|
23 |
this.f=tid(z);
|
24 |
this.r=tid(this.info);
|
25 |
this.o=parseInt(TINY.style.val(z,'width'));
|
|
|
26 |
if(this.thumbs){
|
27 |
var u=tid(this.left), r=tid(this.right);
|
28 |
u.onmouseover=new Function('TINY.scroll.init("'+this.thumbs+'",-1,'+this.scrollSpeed+')');
|
@@ -30,6 +31,7 @@ TINY.slideshow.prototype={
|
|
30 |
r.onmouseover=new Function('TINY.scroll.init("'+this.thumbs+'",1,'+this.scrollSpeed+')');
|
31 |
this.p=tid(this.thumbs)
|
32 |
}
|
|
|
33 |
for(i;i<this.l;i++){
|
34 |
this.a[i]={};
|
35 |
var h=m[i], a=this.a[i];
|
@@ -38,7 +40,7 @@ TINY.slideshow.prototype={
|
|
38 |
a.l= tag('a',h)[0]? tag('a',h)[0].href:'';
|
39 |
a.p= tag('span',h)[0].innerHTML;
|
40 |
if(this.thumbs){
|
41 |
-
var g= tag('img',h)[0];
|
42 |
this.p.appendChild(g);
|
43 |
w+=parseInt(g.offsetWidth);
|
44 |
if(i!=this.l-1){
|
@@ -109,17 +111,17 @@ TINY.slideshow.prototype={
|
|
109 |
if(!c){
|
110 |
this.at=setTimeout(new Function(this.n+'.mv(1,0)'),this.speed*1000)
|
111 |
}
|
112 |
-
if(this.a[s].l!=
|
113 |
-
this.q.onclick=new Function('window.location="'+this.a[s].l+'"');
|
114 |
-
this.q.onmouseover=new Function('this.className="'+this.link+'"');
|
115 |
-
this.q.onmouseout=new Function('this.className=""');
|
116 |
-
this.q.style.cursor='pointer'
|
117 |
}else{
|
118 |
this.q.onclick=this.q.onmouseover=null;
|
119 |
-
this.q.style.cursor='default'
|
120 |
}
|
121 |
var m= tag('img',this.f);
|
122 |
-
if(m.length>2){
|
123 |
this.f.removeChild(m[0])
|
124 |
}
|
125 |
},
|
@@ -157,7 +159,7 @@ TINY.height=function(){
|
|
157 |
},
|
158 |
tw:function(e,h,ho,hd,s){
|
159 |
var oh=e.offsetHeight-ho;
|
160 |
-
if(oh==h){clearInterval(e.si)}else{if(oh!=h){e.style.height=oh+(Math.ceil(Math.abs(h-oh)/s)*hd)+'px'}}
|
161 |
}
|
162 |
}
|
163 |
}();
|
23 |
this.f=tid(z);
|
24 |
this.r=tid(this.info);
|
25 |
this.o=parseInt(TINY.style.val(z,'width'));
|
26 |
+
|
27 |
if(this.thumbs){
|
28 |
var u=tid(this.left), r=tid(this.right);
|
29 |
u.onmouseover=new Function('TINY.scroll.init("'+this.thumbs+'",-1,'+this.scrollSpeed+')');
|
31 |
r.onmouseover=new Function('TINY.scroll.init("'+this.thumbs+'",1,'+this.scrollSpeed+')');
|
32 |
this.p=tid(this.thumbs)
|
33 |
}
|
34 |
+
|
35 |
for(i;i<this.l;i++){
|
36 |
this.a[i]={};
|
37 |
var h=m[i], a=this.a[i];
|
40 |
a.l= tag('a',h)[0]? tag('a',h)[0].href:'';
|
41 |
a.p= tag('span',h)[0].innerHTML;
|
42 |
if(this.thumbs){
|
43 |
+
var g = tag('img',h)[0];
|
44 |
this.p.appendChild(g);
|
45 |
w+=parseInt(g.offsetWidth);
|
46 |
if(i!=this.l-1){
|
111 |
if(!c){
|
112 |
this.at=setTimeout(new Function(this.n+'.mv(1,0)'),this.speed*1000)
|
113 |
}
|
114 |
+
if(this.a[s].l != ""){
|
115 |
+
this.q.onclick = new Function('window.location="'+this.a[s].l+'"');
|
116 |
+
this.q.onmouseover = new Function('this.className="'+this.link+'"');
|
117 |
+
this.q.onmouseout = new Function('this.className=""');
|
118 |
+
this.q.style.cursor = 'pointer';
|
119 |
}else{
|
120 |
this.q.onclick=this.q.onmouseover=null;
|
121 |
+
this.q.style.cursor='default';
|
122 |
}
|
123 |
var m= tag('img',this.f);
|
124 |
+
if(m.length > 2){
|
125 |
this.f.removeChild(m[0])
|
126 |
}
|
127 |
},
|
159 |
},
|
160 |
tw:function(e,h,ho,hd,s){
|
161 |
var oh=e.offsetHeight-ho;
|
162 |
+
if(oh == h){clearInterval(e.si)}else{if(oh!=h){e.style.height=oh+(Math.ceil(Math.abs(h-oh)/s)*hd)+'px'}}
|
163 |
}
|
164 |
}
|
165 |
}();
|
models/slide.php
CHANGED
@@ -16,6 +16,7 @@ class GallerySlide extends GalleryDbHelper {
|
|
16 |
'description' => "TEXT NOT NULL",
|
17 |
'image' => "VARCHAR(50) NOT NULL DEFAULT ''",
|
18 |
'image_url' => "VARCHAR(200) NOT NULL DEFAULT ''",
|
|
|
19 |
'link' => "VARCHAR(200) NOT NULL DEFAULT ''",
|
20 |
'order' => "INT(11) NOT NULL DEFAULT '0'",
|
21 |
'created' => "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'",
|
@@ -65,7 +66,7 @@ class GallerySlide extends GalleryDbHelper {
|
|
65 |
else {
|
66 |
if ($image = wp_remote_fopen($image_url)) {
|
67 |
$filename = basename($image_url);
|
68 |
-
$filepath = ABSPATH . 'wp-content
|
69 |
$filefull = $filepath . $filename;
|
70 |
|
71 |
if (!file_exists($filefull)) {
|
16 |
'description' => "TEXT NOT NULL",
|
17 |
'image' => "VARCHAR(50) NOT NULL DEFAULT ''",
|
18 |
'image_url' => "VARCHAR(200) NOT NULL DEFAULT ''",
|
19 |
+
'uselink' => "ENUM('Y','N') NOT NULL DEFAULT 'N'",
|
20 |
'link' => "VARCHAR(200) NOT NULL DEFAULT ''",
|
21 |
'order' => "INT(11) NOT NULL DEFAULT '0'",
|
22 |
'created' => "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'",
|
66 |
else {
|
67 |
if ($image = wp_remote_fopen($image_url)) {
|
68 |
$filename = basename($image_url);
|
69 |
+
$filepath = ABSPATH . 'wp-content' . DS . 'uploads' . DS . $this -> plugin_name . DS;
|
70 |
$filefull = $filepath . $filename;
|
71 |
|
72 |
if (!file_exists($filefull)) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Antonie Potgieter
|
|
3 |
Donate link: http://tribulant.com/
|
4 |
Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 2.9
|
7 |
-
Stable tag: 1.0.
|
8 |
|
9 |
Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
|
10 |
|
@@ -52,4 +52,8 @@ Yes, you can
|
|
52 |
* ADDED: `post_id` parameter for the `[slideshow]` shortcode to display images from a post/page.
|
53 |
* IMPROVED: Plugin doesn't utilize PHP short open tags anymore.
|
54 |
* COMPATIBILITY: Removed `autoLoad` (introduced in PHP 5) parameter from `class_exists` function for PHP 4 compatibility.
|
55 |
-
* IMPROVED: Directory separator constant DS from DIRECTORY_SEPARATOR.
|
|
|
|
|
|
|
|
3 |
Donate link: http://tribulant.com/
|
4 |
Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 2.9
|
7 |
+
Stable tag: 1.0.4
|
8 |
|
9 |
Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
|
10 |
|
52 |
* ADDED: `post_id` parameter for the `[slideshow]` shortcode to display images from a post/page.
|
53 |
* IMPROVED: Plugin doesn't utilize PHP short open tags anymore.
|
54 |
* COMPATIBILITY: Removed `autoLoad` (introduced in PHP 5) parameter from `class_exists` function for PHP 4 compatibility.
|
55 |
+
* IMPROVED: Directory separator constant DS from DIRECTORY_SEPARATOR.
|
56 |
+
|
57 |
+
= 1.0.4 =
|
58 |
+
* COMPATIBILITY: WordPress 2.9
|
59 |
+
* FIXED: #fullsize z-index to keep below other elements such as drop down menus.
|
slideshow-gallery-plugin.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
|
3 |
class GalleryPlugin {
|
4 |
|
5 |
-
var $version = '1.0.
|
6 |
var $plugin_name;
|
7 |
var $plugin_base;
|
8 |
var $pre = 'Gallery';
|
9 |
-
var $debugging =
|
10 |
|
11 |
var $helpers = array('Db', 'Html', 'Form', 'Metabox');
|
12 |
var $models = array('Slide');
|
@@ -226,24 +226,36 @@ class GalleryPlugin {
|
|
226 |
return false;
|
227 |
}
|
228 |
|
229 |
-
function enqueue_scripts() {
|
230 |
wp_enqueue_script('jquery');
|
231 |
-
wp_enqueue_script($this -> plugin_name, '/' . PLUGINDIR . '/' . $this -> plugin_name . '/js/gallery.js', null, "1.0");
|
232 |
|
233 |
if (is_admin()) {
|
|
|
|
|
234 |
if (!empty($_GET['page'])) {
|
235 |
-
if ($_GET['page'] == "slideshow-gallery-settings" || ($_GET['page'] == $this -> plugin_name . ".php" && $_GET['method'] == "order")) {
|
|
|
|
|
|
|
|
|
|
|
236 |
wp_enqueue_script('suggest');
|
|
|
237 |
wp_enqueue_script('jquery-ui-tabs');
|
238 |
wp_enqueue_script('wp-lists');
|
239 |
wp_enqueue_script('jquery-ui-sortable');
|
|
|
|
|
240 |
wp_enqueue_script('postbox');
|
241 |
wp_enqueue_script('post');
|
|
|
242 |
}
|
243 |
}
|
244 |
|
245 |
wp_enqueue_script($this -> plugin_name . 'admin', '/' . PLUGINDIR . '/' . $this -> plugin_name . '/js/admin.js', null, '1.0');
|
246 |
add_thickbox();
|
|
|
|
|
247 |
}
|
248 |
|
249 |
return true;
|
2 |
|
3 |
class GalleryPlugin {
|
4 |
|
5 |
+
var $version = '1.0.4';
|
6 |
var $plugin_name;
|
7 |
var $plugin_base;
|
8 |
var $pre = 'Gallery';
|
9 |
+
var $debugging = false;
|
10 |
|
11 |
var $helpers = array('Db', 'Html', 'Form', 'Metabox');
|
12 |
var $models = array('Slide');
|
226 |
return false;
|
227 |
}
|
228 |
|
229 |
+
function enqueue_scripts() {
|
230 |
wp_enqueue_script('jquery');
|
|
|
231 |
|
232 |
if (is_admin()) {
|
233 |
+
require_once(ABSPATH . 'wp-admin' . DS . 'admin.php');
|
234 |
+
|
235 |
if (!empty($_GET['page'])) {
|
236 |
+
if ($_GET['page'] == "slideshow-gallery-settings" || ($_GET['page'] == $this -> plugin_name . ".php" && $_GET['method'] == "order")) {
|
237 |
+
wp_enqueue_script('utils');
|
238 |
+
wp_enqueue_script('autosave');
|
239 |
+
wp_enqueue_script('editor');
|
240 |
+
wp_enqueue_script('media-upload');
|
241 |
+
wp_enqueue_script('word-count');
|
242 |
wp_enqueue_script('suggest');
|
243 |
+
wp_enqueue_script('jquery-ui-core');
|
244 |
wp_enqueue_script('jquery-ui-tabs');
|
245 |
wp_enqueue_script('wp-lists');
|
246 |
wp_enqueue_script('jquery-ui-sortable');
|
247 |
+
wp_enqueue_script('jquery-ui-draggable');
|
248 |
+
wp_enqueue_script('jquery-ui-droppable');
|
249 |
wp_enqueue_script('postbox');
|
250 |
wp_enqueue_script('post');
|
251 |
+
wp_enqueue_script('admin-widgets');
|
252 |
}
|
253 |
}
|
254 |
|
255 |
wp_enqueue_script($this -> plugin_name . 'admin', '/' . PLUGINDIR . '/' . $this -> plugin_name . '/js/admin.js', null, '1.0');
|
256 |
add_thickbox();
|
257 |
+
} else {
|
258 |
+
wp_enqueue_script($this -> plugin_name, '/' . PLUGINDIR . '/' . $this -> plugin_name . '/js/gallery.js', null, "1.0");
|
259 |
}
|
260 |
|
261 |
return true;
|
slideshow-gallery.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wpgallery.tribulant.net
|
|
6 |
Author: Antonie Potgieter
|
7 |
Author URI: http://tribulant.com
|
8 |
Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code><?php if (class_exists('Gallery')) { $Gallery = new Gallery(); $Gallery -> slideshow($output = true, $post_id = null); } ?></code> and specify the required <code>$post_id</code> parameter accordingly.
|
9 |
-
Version: 1.0.
|
10 |
*/
|
11 |
|
12 |
define('DS', DIRECTORY_SEPARATOR);
|
6 |
Author: Antonie Potgieter
|
7 |
Author URI: http://tribulant.com
|
8 |
Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code><?php if (class_exists('Gallery')) { $Gallery = new Gallery(); $Gallery -> slideshow($output = true, $post_id = null); } ?></code> and specify the required <code>$post_id</code> parameter accordingly.
|
9 |
+
Version: 1.0.4
|
10 |
*/
|
11 |
|
12 |
define('DS', DIRECTORY_SEPARATOR);
|
views/admin/metaboxes/settings-general.php
CHANGED
@@ -110,7 +110,7 @@
|
|
110 |
<tr>
|
111 |
<th><label for="thumbscrollspeed"><?php _e('Thumbnails Scroll Speed', $this -> plugin_name); ?></label></th>
|
112 |
<td>
|
113 |
-
<input style="width:45px;" name="thumbscrollspeed" value="<?php echo $this -> get_option('thumbscrollspeed'); ?>" id="thumbscrollspeed" /> <?php _e('speed', $this -> plugin_name); ?>
|
114 |
<span class="howto"><?php _e('default:5 recommended:1-20', $this -> plugin_name); ?></span>
|
115 |
</td>
|
116 |
</tr>
|
110 |
<tr>
|
111 |
<th><label for="thumbscrollspeed"><?php _e('Thumbnails Scroll Speed', $this -> plugin_name); ?></label></th>
|
112 |
<td>
|
113 |
+
<input class="widefat" style="width:45px;" name="thumbscrollspeed" value="<?php echo $this -> get_option('thumbscrollspeed'); ?>" id="thumbscrollspeed" /> <?php _e('speed', $this -> plugin_name); ?>
|
114 |
<span class="howto"><?php _e('default:5 recommended:1-20', $this -> plugin_name); ?></span>
|
115 |
</td>
|
116 |
</tr>
|
views/admin/metaboxes/settings-submit.php
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<div class="submitbox" id="submitpost">
|
2 |
<div id="minor-publishing">
|
3 |
<div id="misc-publishing-actions">
|
4 |
-
<div class="misc-pub-section">
|
5 |
-
<
|
6 |
-
<li><a href="<?php echo $this -> url; ?>&method=reset" title="<?php _e('Reset all configuration settings to their default values', $this -> plugin_name); ?>" onclick="if (!confirm('<?php _e('Are you sure you wish to reset all configuration settings?', $this -> plugin_name); ?>')) { return false; }"><?php _e('Reset to Defaults', $this -> plugin_name); ?></a></li>
|
7 |
-
</ul>
|
8 |
</div>
|
9 |
</div>
|
10 |
</div>
|
1 |
<div class="submitbox" id="submitpost">
|
2 |
<div id="minor-publishing">
|
3 |
<div id="misc-publishing-actions">
|
4 |
+
<div class="misc-pub-section misc-pub-section-last">
|
5 |
+
<a href="<?php echo $this -> url; ?>&method=reset" title="<?php _e('Reset all configuration settings to their default values', $this -> plugin_name); ?>" onclick="if (!confirm('<?php _e('Are you sure you wish to reset all configuration settings?', $this -> plugin_name); ?>')) { return false; }"><?php _e('Reset to Defaults', $this -> plugin_name); ?></a>
|
|
|
|
|
6 |
</div>
|
7 |
</div>
|
8 |
</div>
|
views/admin/settings.php
CHANGED
@@ -1,15 +1,18 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
global $post_ID, $post, $wp_meta_boxes;
|
4 |
$post_ID = 1;
|
|
|
5 |
$wp_meta_boxes = false;
|
6 |
|
7 |
add_meta_box('submitdiv', __('Save Settings', $this -> plugin_name), array($this -> Metabox, "settings_submit"), 'post', 'side', 'core');
|
8 |
add_meta_box('generaldiv', __('General Settings', $this -> plugin_name), array($this -> Metabox, "settings_general"), 'post', 'normal', 'core');
|
9 |
add_meta_box('stylesdiv', __('Appearance & Styles', $this -> plugin_name), array($this -> Metabox, "settings_styles"), 'post', 'normal', 'core');
|
10 |
|
11 |
-
|
12 |
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
|
|
|
|
|
13 |
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
14 |
|
15 |
?>
|
@@ -17,16 +20,17 @@ wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
|
17 |
<div class="wrap">
|
18 |
<h2><?php _e('Configuration Settings', $this -> plugin_name); ?></h2>
|
19 |
|
20 |
-
<form action="<?php echo $this -> url; ?>" method="post">
|
21 |
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
22 |
<div id="side-info-column" class="inner-sidebar">
|
23 |
<?php do_meta_boxes('post', 'side', $post); ?>
|
24 |
</div>
|
25 |
-
<div id="post-body"
|
26 |
-
<div id="post-body-content"
|
27 |
<?php do_meta_boxes('post', 'normal', $post); ?>
|
28 |
</div>
|
29 |
</div>
|
|
|
30 |
</div>
|
31 |
</form>
|
32 |
</div>
|
1 |
<?php
|
2 |
|
3 |
+
global $user_ID, $post_ID, $post, $wp_meta_boxes;
|
4 |
$post_ID = 1;
|
5 |
+
$post = get_default_post_to_edit();
|
6 |
$wp_meta_boxes = false;
|
7 |
|
8 |
add_meta_box('submitdiv', __('Save Settings', $this -> plugin_name), array($this -> Metabox, "settings_submit"), 'post', 'side', 'core');
|
9 |
add_meta_box('generaldiv', __('General Settings', $this -> plugin_name), array($this -> Metabox, "settings_general"), 'post', 'normal', 'core');
|
10 |
add_meta_box('stylesdiv', __('Appearance & Styles', $this -> plugin_name), array($this -> Metabox, "settings_styles"), 'post', 'normal', 'core');
|
11 |
|
12 |
+
wp_nonce_field('autosave', 'autosavenonce', false);
|
13 |
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
|
14 |
+
wp_nonce_field('getpermalink', 'getpermalinknonce', false);
|
15 |
+
wp_nonce_field('samplepermalink', 'samplepermalinknonce', false);
|
16 |
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
17 |
|
18 |
?>
|
20 |
<div class="wrap">
|
21 |
<h2><?php _e('Configuration Settings', $this -> plugin_name); ?></h2>
|
22 |
|
23 |
+
<form action="<?php echo $this -> url; ?>" name="post" id="post" method="post">
|
24 |
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
25 |
<div id="side-info-column" class="inner-sidebar">
|
26 |
<?php do_meta_boxes('post', 'side', $post); ?>
|
27 |
</div>
|
28 |
+
<div id="post-body">
|
29 |
+
<div id="post-body-content">
|
30 |
<?php do_meta_boxes('post', 'normal', $post); ?>
|
31 |
</div>
|
32 |
</div>
|
33 |
+
<br class="clear" />
|
34 |
</div>
|
35 |
</form>
|
36 |
</div>
|
views/admin/slides/index.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div class="wrap">
|
2 |
-
<h2><?php _e('Manage Slides', $this -> plugin_name); ?>
|
3 |
|
4 |
<?php if (!empty($slides)) : ?>
|
5 |
<form id="posts-filter" action="<?php echo $this -> url; ?>" method="post">
|
@@ -13,7 +13,7 @@
|
|
13 |
<form onsubmit="if (!confirm('<?php _e('Are you sure you wish to execute this action on the selected slides?', $this -> plugin_name); ?>')) { return false; }" action="<?php echo $this -> url; ?>&method=mass" method="post">
|
14 |
<div class="tablenav">
|
15 |
<div class="alignleft actions">
|
16 |
-
<a href="<?php echo $this -> url; ?>&method=order" title="<?php _e('Order all your slides', $this -> plugin_name); ?>" class="button"><?php _e('Order Slides', $this -> plugin_name); ?></a>
|
17 |
|
18 |
<select name="action" class="action">
|
19 |
<option value="">- <?php _e('Bulk Actions', $this -> plugin_name); ?> -</option>
|
1 |
<div class="wrap">
|
2 |
+
<h2><?php _e('Manage Slides', $this -> plugin_name); ?> <?php echo $this -> Html -> link(__('Add New'), $this -> url . '&method=save', array('class' => "button add-new-h2")); ?></h2>
|
3 |
|
4 |
<?php if (!empty($slides)) : ?>
|
5 |
<form id="posts-filter" action="<?php echo $this -> url; ?>" method="post">
|
13 |
<form onsubmit="if (!confirm('<?php _e('Are you sure you wish to execute this action on the selected slides?', $this -> plugin_name); ?>')) { return false; }" action="<?php echo $this -> url; ?>&method=mass" method="post">
|
14 |
<div class="tablenav">
|
15 |
<div class="alignleft actions">
|
16 |
+
<a href="<?php echo $this -> url; ?>&method=order" title="<?php _e('Order all your slides', $this -> plugin_name); ?>" class="button button-secondary"><?php _e('Order Slides', $this -> plugin_name); ?></a>
|
17 |
|
18 |
<select name="action" class="action">
|
19 |
<option value="">- <?php _e('Bulk Actions', $this -> plugin_name); ?> -</option>
|
views/admin/slides/save.php
CHANGED
@@ -29,12 +29,26 @@
|
|
29 |
</td>
|
30 |
</tr>
|
31 |
<tr>
|
32 |
-
<th><label for="
|
33 |
-
<td
|
|
|
|
|
|
|
34 |
</tr>
|
35 |
</tbody>
|
36 |
</table>
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
<p class="submit">
|
39 |
<input class="button-primary" type="submit" name="submit" value="<?php _e('Save Slide', $this -> plugin_name); ?>" />
|
40 |
</p>
|
29 |
</td>
|
30 |
</tr>
|
31 |
<tr>
|
32 |
+
<th><label for=""><?php _e('Use Link', $this -> plugin_name); ?></label></th>
|
33 |
+
<td>
|
34 |
+
<label><input onclick="jQuery('#Slide_uselink_div').show();" <?php echo ($this -> Slide -> data -> uselink == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="Y" id="Slide_uselink_Y" /> <?php _e('Yes', $this -> plugin_name); ?></label>
|
35 |
+
<label><input onclick="jQuery('#Slide_uselink_div').hide();" <?php echo (empty($this -> Slide -> data -> uselink) || $this -> Slide -> data -> uselink == "N") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="N" id="Slide_uselink_N" /> <?php _e('No', $this -> plugin_name); ?></label>
|
36 |
+
</td>
|
37 |
</tr>
|
38 |
</tbody>
|
39 |
</table>
|
40 |
|
41 |
+
<div id="Slide_uselink_div" style="display:<?php echo ($this -> Slide -> data -> uselink == "Y") ? 'block' : 'none'; ?>;">
|
42 |
+
<table class="form-table">
|
43 |
+
<tbody>
|
44 |
+
<tr>
|
45 |
+
<th><label for="Slide.link"><?php _e('Link To', $this -> plugin_name); ?></label></th>
|
46 |
+
<td><input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($this -> Slide -> data -> link); ?>" id="Slide.link" /></td>
|
47 |
+
</tr>
|
48 |
+
</tbody>
|
49 |
+
</table>
|
50 |
+
</div>
|
51 |
+
|
52 |
<p class="submit">
|
53 |
<input class="button-primary" type="submit" name="submit" value="<?php _e('Save Slide', $this -> plugin_name); ?>" />
|
54 |
</p>
|
views/default/gallery.php
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
<span><?php echo get_bloginfo('wpurl'); ?>/wp-content/uploads/<?php echo $this -> plugin_name; ?>/<?php echo basename($slide -> image_url); ?></span>
|
27 |
<p><?php echo $slide -> description; ?></p>
|
28 |
<?php if ($this -> get_option('thumbnails') == "Y") : ?>
|
29 |
-
<?php if (!empty($slide -> link)) : ?>
|
30 |
<a href="<?php echo $slide -> link; ?>" title="<?php echo $slide -> title; ?>"><img style="height:75px;" src="<?php echo $this -> Html -> image_url($this -> Html -> thumbname(basename($slide -> image_url))); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> title); ?>" /></a>
|
31 |
<?php else : ?>
|
32 |
<img style="height:75px;" src="<?php echo $this -> Html -> image_url($this -> Html -> thumbname(basename($slide -> image_url))); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> title); ?>" />
|
26 |
<span><?php echo get_bloginfo('wpurl'); ?>/wp-content/uploads/<?php echo $this -> plugin_name; ?>/<?php echo basename($slide -> image_url); ?></span>
|
27 |
<p><?php echo $slide -> description; ?></p>
|
28 |
<?php if ($this -> get_option('thumbnails') == "Y") : ?>
|
29 |
+
<?php if ($slide -> uselink == "Y" && !empty($slide -> link)) : ?>
|
30 |
<a href="<?php echo $slide -> link; ?>" title="<?php echo $slide -> title; ?>"><img style="height:75px;" src="<?php echo $this -> Html -> image_url($this -> Html -> thumbname(basename($slide -> image_url))); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> title); ?>" /></a>
|
31 |
<?php else : ?>
|
32 |
<img style="height:75px;" src="<?php echo $this -> Html -> image_url($this -> Html -> thumbname(basename($slide -> image_url))); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> title); ?>" />
|