Exif Sony a200 Joomla
De php code:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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
283
284
285
286
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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
283
284
285
286
<?php
/**
* @version $Id: slimbox.php 2008-02-01 AmyStephen $
* @package Joomla!
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* Usage:
*
* Slimbox is a visual clone of the popular Lightbox JS v2.0 by Lokesh Dhakar,
* written using the ultra compact mootools framework. It was designed to be small,
* efficient, more convenient and 100% compatible with the original Lightbox v2.
* From http://www.digitalia.be/software/slimbox
* Slimbox is free software released under MIT License.
* http://www.opensource.org/licenses/mit-license.php
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
// Import library dependencies
jimport('joomla.event.plugin');
/**
* Plugin that loads module positions within contentz
*/
class plgContentSlimbox extends JPlugin
{
/**
* Constructor
*
* For php4 compatability we must not use the __constructor as a constructor for
* plugins because func_get_args ( void ) returns a copy of all passed arguments
* NOT references. This causes problems with cross-referencing necessary for the
* observer design pattern.
*/
function plgContentSlimbox ( &$subject, $config )
{
parent::__construct( $subject, $config );
}
/**
* Plugin method with the same name as the event will be called automatically.
*/
function onPrepareContent( &$row, &$params )
{
global $mainframe;
$document =& JFactory::getDocument();
JHTML::_( 'behavior.mootools' );
// Add CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/slimbox/slimbox.css' );
// Add Javascript
$document->addScript( JURI::base() .'plugins/content/slimbox/slimbox.js');
// Find all plugin occurrences
$firsttime = true;
$working = "";
$replacethis = "";
$withthis = "";
$regex = '/{slimbox\s*.*?}/i';
preg_match_all( $regex, $row->text, $matches );
$count = count( $matches[0] );
// Perform once for each plugin occurrence
for ( $i=0; $i < $count; $i++ ) {
$firsttime = true;
$replacethis = $matches[0][$i];
$working = $replacethis;
$working = str_replace( '{slimbox', '', $working );
$working = str_replace( '}', '', $working );
$working = trim($working);
// Display Single image or Gallery of images
if (substr($working,0,6) == "single") {
$singleorGallery = "single";
$working = substr($working,6,(strlen($working) - 6));
$working = trim($working);
} else {
$singleorGallery = "gallery";
}
if ($singleorGallery == "single") {
$js = "";
$js = "
function openGallery" . ($i + 1) . "() {
return Lightbox.open([";
}
$withthis = '';
$withthis .= '<div id="slimbox'. ($i + 1) . '">';
$countimagesets = 0;
$imagesets = explode(";",$working);
$countimagesets = count( $imagesets );
for ( $j=0; $j < $countimagesets; $j++ ) {
$thumbnail = '';
$imagefile = '';
$countpartsofimageset = 0;
$singleimage = explode(",",$imagesets[$j]);
$countpartsofimageset = count( $singleimage );
$imagefile = trim($singleimage[0]);
$thumbnail = trim($singleimage[1]);
$caption = "";
if ($countpartsofimageset == 3) {
$caption = trim($singleimage[2]);
}
if ($singleorGallery == "single") {
if ($firsttime == true) {
$withthis .= '<a href="#" onclick="return openGallery' . ($i + 1) . '()">' . '<img src="'. $thumbnail . '" border="0" /></a>';
} else {
$js .= ", ";
}
$js .= "['" . JURI::base() . $imagefile . "', '" . $caption . "']";
} else {
$withthis .= '<a href="' . JURI::base() . $imagefile . '" class="slimbox" rel="lightbox[slimbox'. $i . ']" title="' . $caption . '">';
$withthis .= '<img src="'. $thumbnail . '" border="0" /></a>';
}
$firsttime = false;
}
if ($singleorGallery == "single") {
$js .= "], 0);
}";
$document->addScriptDeclaration( $js );
}
$withthis .= '</div>';
$row->text = str_replace( $replacethis, $withthis, $row->text );
}
return true;
}
}
[/code]
Als je op een foto klikt krijg je de foto te zien een soort lijstje. ik zou graag willen dat de mensen bij het vergroten links onder een link krijgen waar ze dan de exif kunnen bekijken en liefst dat ik maar een script nog heb en die ik gelijk kan intgreren. Bijvoorbeeld ik zou graag de FocusMode willen uitlezen:
16 FocusMode int16u 0 = Manual
1 = AF-S
2 = AF-C
3 = AF-A
Wat bedoelen ze met:
int16u en index
Zouden jullie misschien een simpel voorbeeld script kunnen maken (ik heb een Sony a200)?
Alvast bedankt.
/**
* @version $Id: slimbox.php 2008-02-01 AmyStephen $
* @package Joomla!
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* Usage:
*
* Slimbox is a visual clone of the popular Lightbox JS v2.0 by Lokesh Dhakar,
* written using the ultra compact mootools framework. It was designed to be small,
* efficient, more convenient and 100% compatible with the original Lightbox v2.
* From http://www.digitalia.be/software/slimbox
* Slimbox is free software released under MIT License.
* http://www.opensource.org/licenses/mit-license.php
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
// Import library dependencies
jimport('joomla.event.plugin');
/**
* Plugin that loads module positions within contentz
*/
class plgContentSlimbox extends JPlugin
{
/**
* Constructor
*
* For php4 compatability we must not use the __constructor as a constructor for
* plugins because func_get_args ( void ) returns a copy of all passed arguments
* NOT references. This causes problems with cross-referencing necessary for the
* observer design pattern.
*/
function plgContentSlimbox ( &$subject, $config )
{
parent::__construct( $subject, $config );
}
/**
* Plugin method with the same name as the event will be called automatically.
*/
function onPrepareContent( &$row, &$params )
{
global $mainframe;
$document =& JFactory::getDocument();
JHTML::_( 'behavior.mootools' );
// Add CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/slimbox/slimbox.css' );
// Add Javascript
$document->addScript( JURI::base() .'plugins/content/slimbox/slimbox.js');
// Find all plugin occurrences
$firsttime = true;
$working = "";
$replacethis = "";
$withthis = "";
$regex = '/{slimbox\s*.*?}/i';
preg_match_all( $regex, $row->text, $matches );
$count = count( $matches[0] );
// Perform once for each plugin occurrence
for ( $i=0; $i < $count; $i++ ) {
$firsttime = true;
$replacethis = $matches[0][$i];
$working = $replacethis;
$working = str_replace( '{slimbox', '', $working );
$working = str_replace( '}', '', $working );
$working = trim($working);
// Display Single image or Gallery of images
if (substr($working,0,6) == "single") {
$singleorGallery = "single";
$working = substr($working,6,(strlen($working) - 6));
$working = trim($working);
} else {
$singleorGallery = "gallery";
}
if ($singleorGallery == "single") {
$js = "";
$js = "
function openGallery" . ($i + 1) . "() {
return Lightbox.open([";
}
$withthis = '';
$withthis .= '<div id="slimbox'. ($i + 1) . '">';
$countimagesets = 0;
$imagesets = explode(";",$working);
$countimagesets = count( $imagesets );
for ( $j=0; $j < $countimagesets; $j++ ) {
$thumbnail = '';
$imagefile = '';
$countpartsofimageset = 0;
$singleimage = explode(",",$imagesets[$j]);
$countpartsofimageset = count( $singleimage );
$imagefile = trim($singleimage[0]);
$thumbnail = trim($singleimage[1]);
$caption = "";
if ($countpartsofimageset == 3) {
$caption = trim($singleimage[2]);
}
if ($singleorGallery == "single") {
if ($firsttime == true) {
$withthis .= '<a href="#" onclick="return openGallery' . ($i + 1) . '()">' . '<img src="'. $thumbnail . '" border="0" /></a>';
} else {
$js .= ", ";
}
$js .= "['" . JURI::base() . $imagefile . "', '" . $caption . "']";
} else {
$withthis .= '<a href="' . JURI::base() . $imagefile . '" class="slimbox" rel="lightbox[slimbox'. $i . ']" title="' . $caption . '">';
$withthis .= '<img src="'. $thumbnail . '" border="0" /></a>';
}
$firsttime = false;
}
if ($singleorGallery == "single") {
$js .= "], 0);
}";
$document->addScriptDeclaration( $js );
}
$withthis .= '</div>';
$row->text = str_replace( $replacethis, $withthis, $row->text );
}
return true;
}
}
[/code]
Als je op een foto klikt krijg je de foto te zien een soort lijstje. ik zou graag willen dat de mensen bij het vergroten links onder een link krijgen waar ze dan de exif kunnen bekijken en liefst dat ik maar een script nog heb en die ik gelijk kan intgreren. Bijvoorbeeld ik zou graag de FocusMode willen uitlezen:
16 FocusMode int16u 0 = Manual
1 = AF-S
2 = AF-C
3 = AF-A
Wat bedoelen ze met:
int16u en index
Zouden jullie misschien een simpel voorbeeld script kunnen maken (ik heb een Sony a200)?
Alvast bedankt.
Dubbelpost