20
20
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
23
* @version $Revision: 1.7 $ $Date: 2005/08/26 05:15:14 $
24
* @package uploadapplet
23
* @version $Revision: 1.11 $ $Date: 2006/02/27 00:25:57 $
24
* @package SlideshowApplet
25
25
* @author Pierre-Luc Paour <gallery@paour.com>
36
36
list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'slideshowapplet');
37
if ($ret->isError()) {
38
38
return array($ret->wrap(__FILE__, __LINE__), null);
41
41
list ($ret, $modules) = GalleryCoreApi::fetchPluginStatus('module');
42
if ($ret->isError()) {
43
43
return array($ret->wrap(__FILE__, __LINE__), null);
75
75
$SlideshowApplet['g2BaseUrl'] = $urlGenerator->getCurrentUrlDir(true);
76
76
list ($ret, $cookiePath) = $urlGenerator->getCookiePath(true);
77
if ($ret->isError()) {
78
return array($ret->wrap(__FILE__, __LINE__), null);
80
list ($ret, $cookieDomain) = $session->getCookieDomain();
78
82
return array($ret->wrap(__FILE__, __LINE__), null);
80
84
$SlideshowApplet['NoProtocolError'] = 0;
81
85
$SlideshowApplet['cookieName'] = $session->getKey();
82
86
$SlideshowApplet['cookieValue'] = $session->getId();
83
$SlideshowApplet['cookieDomain'] = $session->getCookieDomain();
87
$SlideshowApplet['cookieDomain'] = $cookieDomain;
84
88
$SlideshowApplet['cookiePath'] = $cookiePath;
85
89
$SlideshowApplet['album'] = $item->getId();
86
//$SlideshowApplet['defaults'] = array();
87
$SlideshowApplet['overrides'] = array('toSysOut' => 'true');
88
90
$SlideshowApplet['userAgent'] = GalleryUtilities::getServerVar('HTTP_USER_AGENT');
89
91
$SlideshowApplet['galleryVersion'] = 2;
90
92
$SlideshowApplet['code'] = 'com.gallery.GalleryRemote.GRAppletSlideshow';
94
list ($ret, $locale) = $gallery->getActiveLanguageCode();
96
return array($ret->wrap(__FILE__, __LINE__), null);
98
$SlideshowApplet['locale'] = $locale;
92
100
if (isset($startId)) {
93
/* format the start_from as album_picture, that's what GR expects */
94
$SlideshowApplet['extra']['gr_slideshow_start_from'] = $item->getId().'_'.$startId;
101
/* format the start_from as album_picture, that's what GR expects */
102
$SlideshowApplet['extra']['gr_slideshow_start_from'] = $item->getId().'_'.$startId;
97
list ($ret, $params) = GalleryCoreApi::fetchAllPluginParameters('module', 'slideshowapplet');
98
if ($ret->isError()) {
105
list ($ret, $params) =
106
GalleryCoreApi::fetchAllPluginParameters('module', 'slideshowapplet');
99
108
return array($ret->wrap(__FILE__, __LINE__), null);
101
$SlideshowApplet['defaults'] = $params;
110
foreach (array('default', 'override') as $type) {
111
$SlideshowApplet[$type] = array();
112
if (!empty($params['slideshow' . $type . 'Variables'])) {
113
$variablesArray = explode('|', $params['slideshow' . $type . 'Variables']);
114
foreach ($variablesArray as $variable) {
115
list($name, $value) = explode('=', $variable);
116
$SlideshowApplet[$type][$name] = $value;
104
122
$form['formName'] = '';
105
123
$template->setVariable('controller', '');
106
124
$template->setVariable('SlideshowApplet', $SlideshowApplet);
107
return array(GalleryStatus::success(),
108
126
array('body' => 'modules/slideshowapplet/templates/SlideshowApplet.tpl'));
114
132
function getViewDescription() {
115
133
list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'slideshowapplet');
116
if ($ret->isError()) {
117
135
return array($ret->wrap(__FILE__, __LINE__), null);
120
return array(GalleryStatus::success(), $module->translate('slideshow (fullscreen)'));
138
return array(null, $module->translate('slideshow (fullscreen)'));