So this mod has anyone who can upload allowed access to this jupload? Do you already have a system to make it only people part of a group? My last jupload integration had this and it is a must have.
Ok here is your code:
// Check to see if user can upload pictures. Quit with an error if he cannot.
if (!USER_CAN_UPLOAD_PICTURES && !GALLERY_ADMIN_MODE && !USER_ADMIN_MODE) {
$msg =
str_replace(
'$1',
'login.php?referer=plugins/jupload/jupload.php',
$lang_jupload_php['perm_denied'])
;
cpg_die(ERROR, $msg, __FILE__, __LINE__);
}
Here is example of my code that already features group permissions that can be integrated into yours either HARD code or plugin style:
// Check to see if user can upload pictures. Quit with an error if he cannot.
if (!USER_CAN_UPLOAD_PICTURES && !USER_CAN_USE_JUPLOAD && !GALLERY_ADMIN_MODE && !USER_ADMIN_MODE) {
$msg =
str_replace(
'$1',
'login.php?referer=plugins/jupload/jupload.php',
$lang_jupload_php['perm_denied'])
;
cpg_die(ERROR, $msg, __FILE__, __LINE__);
}
Now you can either keep the can upload pictures or just delete it and have jupload override. You will need to edit the template so the button or text does not show unless USER_CAN_USE_JUPLOAD. It would be very easy to integrate if you want the code. It has been around for 4 years. You can also look at my old thread for the FULL instructions on how to add it HARD code wise. Only would need to transfer that to your mod so it is not hard coded anymore. The admin control panel within the groups settings is where you allow that group to be able to use or not here is an image to show you. Now you can put the button where ever you want I just decided to put it there.
Also I am getting this error:
04:25:48.750 [INFO] Debug level set to 0
04:25:48.765 [INFO] Current debug output file: C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36685_log.txt
04:25:48.765 [WARN] Invalid int value: true, using default value: 0
04:25:48.875 [WARN] Invalid int value: , using default value: 0
04:25:48.875 [INFO] JUpload plugin for coppermine version 2.6.4
04:26:51.531 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36686.tmp)
04:26:52.359 [INFO] Start of metadata managing, for DSC00432.JPG
04:26:53.718 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36687.tmp)
04:26:54.546 [INFO] Start of metadata managing, for DSC00433.JPG
04:26:55.781 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36688.tmp)
04:26:56.593 [INFO] Start of metadata managing, for DSC00434.JPG
04:26:57.812 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36689.tmp)
04:26:58.640 [INFO] Start of metadata managing, for DSC00435.JPG
04:26:59.875 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36690.tmp)
04:27:00.703 [INFO] Start of metadata managing, for DSC00436.JPG
04:27:01.937 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36691.tmp)
04:27:02.750 [INFO] Start of metadata managing, for DSC00437.JPG
04:27:03.984 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36692.tmp)
04:27:04.796 [INFO] Start of metadata managing, for DSC00438.JPG
04:27:06.000 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36693.tmp)
04:27:06.812 [INFO] Start of metadata managing, for DSC00439.JPG
04:27:08.046 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36694.tmp)
04:27:08.859 [INFO] Start of metadata managing, for DSC00440.JPG
04:27:10.109 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36695.tmp)
04:27:10.937 [INFO] Start of metadata managing, for DSC00441.JPG
04:27:12.187 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36696.tmp)
04:27:13.140 [INFO] Start of metadata managing, for DSC00442.JPG
04:27:14.390 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36697.tmp)
04:27:15.218 [INFO] Start of metadata managing, for DSC00443.JPG
04:27:16.484 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36698.tmp)
04:27:17.312 [INFO] Start of metadata managing, for DSC00456.JPG
04:27:18.578 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36699.tmp)
04:27:19.421 [INFO] Start of metadata managing, for DSC00457.JPG
04:27:20.671 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36700.tmp)
04:27:21.500 [INFO] Start of metadata managing, for DSC00458.JPG
04:27:22.765 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36701.tmp)
04:27:23.593 [INFO] Start of metadata managing, for DSC00459.JPG
04:27:24.875 [WARN] PictureFileData.getTransformedPictureFile(): temp file already exists C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36702.tmp)
04:27:25.828 [INFO] Start of metadata managing, for DSC00460.JPG
04:27:31.453 [INFO] Debug level set to 1
04:27:31.453 [INFO] Current debug output file: C:\DOCUME~1\AWJUNK~1\LOCALS~1\Temp\jupload_36685_log.txt
04:27:47.000 [ERROR] wjhk.jupload2.exception.JUploadExceptionUploadFailed: wjhk.jupload2.policies.CoppermineUploadPolicy.checkUploadSuccess(): The string "^SUCCESS$" was not found in the response body (wjhk.jupload2.policies.CoppermineUploadPolicy.checkUploadSuccess(): The string "^SUCCESS$" was not found in the response body)
04:27:47.000 wjhk.jupload2.exception.JUploadExceptionUploadFailed: wjhk.jupload2.policies.CoppermineUploadPolicy.checkUploadSuccess(): The string "^SUCCESS$" was not found in the response body
04:27:47.000 at wjhk.jupload2.policies.DefaultUploadPolicy.checkUploadSuccess(DefaultUploadPolicy.java:600)
04:27:47.000 at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:731)
04:27:47.000 at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:486)
04:27:54.281 [ERROR] wjhk.jupload2.exception.JUploadExceptionUploadFailed: Upload failed: unexpected HTTP response (An error occured during log management (readingHttpBody))
04:27:54.281 wjhk.jupload2.exception.JUploadExceptionUploadFailed: Upload failed: unexpected HTTP response
04:27:54.281 at wjhk.jupload2.policies.DefaultUploadPolicy.sendDebugInformation(DefaultUploadPolicy.java:1052)
04:27:54.281 at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:542)
04:27:54.328 [WARN] CoppermineUploadPolicy.afterUpload: No file were uploaded! (0)