5 * Java photo uploader, uses Jumploader
7 * WARNING: This module currently has privacy issues.
8 * The java package does not pass the permissions array intact and could lead to
9 * photos being seen by people that were excluded from seeing them.
14 function java_upload_install() {
15 register_hook('photo_upload_form', 'addon/java_upload/java_upload.php', 'java_upload_form');
16 register_hook('photo_post_init', 'addon/java_upload/java_upload.php', 'java_upload_post_init');
17 register_hook('photo_post_end', 'addon/java_upload/java_upload.php', 'java_upload_post_end');
21 function java_upload_uninstall() {
22 unregister_hook('photo_upload_form', 'addon/java_upload/java_upload.php', 'java_upload_form');
23 unregister_hook('photo_post_init', 'addon/java_upload/java_upload.php', 'java_upload_post_init');
24 unregister_hook('photo_post_end', 'addon/java_upload/java_upload.php', 'java_upload_post_end');
28 function java_upload_form(&$a,&$b) {
30 $uploadurl = $b['post_url'];
31 $sessid = session_id();
32 $archive = $a->get_baseurl() . '/addon/java_upload/jumploader_z.jar';
33 $filestext = t('Select files to upload: ');
35 $nojava = t('Use the following controls only if the Java uploader [above] fails to launch.');
37 $b['default_upload'] = true;
40 $b['addon_text'] .= <<< EOT
42 <div id="photos-upload-select-files-text">$filestext</div>
44 <div id="photos_upload_applet_wrapper">
45 <applet name="jumpLoaderApplet"
46 code="jmaster.jumploader.app.JumpLoaderApplet.class"
51 <param name="uc_uploadUrl" value="$uploadurl" />
52 <param name="uc_uploadFormName" value="photos-upload-form" />
53 <param name="gc_loggingLeveL" value="FATAL" />
54 <param name="uc_fileParameterName" value="userfile" />
55 <param name="uc_cookie" value="PHPSESSID=$sessid; path=/;" />
56 <param name="vc_disableLocalFileSystem" value="false" />
57 <param name="vc_uploadViewMenuBarVisible" value="false" />
58 <param name="vc_mainViewFileListViewVisible" value="true" />
59 <param name="vc_mainViewFileListViewHeightPercent" value="50" />
60 <param name="vc_mainViewFileTreeViewVisible" value="true" />
61 <param name="vc_mainViewFileTreeViewWidthPercent" value="35" />
62 <param name="vc_lookAndFeel" value="system" />
68 <div id="photos-upload-no-java-message" >
80 function java_upload_photo_post_init(&$a,&$b) {
82 if($_POST['partitionCount'])
83 $a->data['java_upload'] = true;
85 $a->data['java_upload'] = false;
91 function java_upload_photo_post_end(&$a,&$b) {
93 if(x($a->data,'java_upload') && $a->data['java_upload'])