Your ultimate PunBB resource!
You are not logged in.
## ## ## Mod title: Image Upload ## ## Mod version: 1.2.1 ## Works on PunBB: 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.2.10 ## Release date: 2005-11-3 ## Author: Max Khitrov <max@mxsoft.org> ## ## Description: This mod allows forum users to upload images with their ## posts. Some of the highlights include: full permission ## management, automatic thumbnail generation, a per-post ## gallery, and no virtually no database involvement. ## ## Affected files: admin_forums.php ## viewtopic.php ## post.php ## edit.php ## delete.php ## profile.php ## header.php ## moderate.php ## include/functions.php ## lang/English/common.php ## ## Affects DB: Yes ## ## Notes: 1) As always, if you find problems with this mod, ## please post on mxsoft.org forums or e-mail them to me ## so I could get them fixed as soon as possible. ## 2) A number of people have asked me already, so just to ## prevent further confusion: After you install this mod, ## the admins are the ONLY ones who can post images. ## To let others upload as well, go to permissions for ## individual forums and set them there. Until you do ## that, the upload form will not show for your visitors. ## 3) If upgrading from a previous version, see the ## upgrade.txt file. It's becoming a bit of a problem ## maintaining this in order for all the other version, ## so from now on, this file will only contain ## instructions for upgrading from the last version. ## If you happen to skip one, you'll have to either figure ## it out on your own, or go through all previous updates. ## 4) See changelog.txt for a list of all changes. ## 5) After you install this mod, be sure to configure it ## from the Administration Panel before use! ## ## DISCLAIMER: Please note that "mods" are not officially supported by ## PunBB. Installation of this modification is done at your ## own risk. Backup your forum database and any and all ## applicable files before proceeding. ## ##
Offline
This release fixes two problems with the previous release, and updates the install script to work with PunBB 1.2.10.
Enjoy!
Offline
I think there are still an issue.
No matter what I do, the image does not appear in the post. It's empty but it's uploaded.
I traced that to the thumball missing. it's not generated at all, the directory is created but not the file itself.
I ran the demo script and all is fine. I ewas working before when I was in 1.1.0. Server is windows.
Offline
This works well, but I have to ask if its possible to have the image displayed in the post in the middle of the text instead of having thumbnails at the bottom? It would also be very cool if you could display the whole image instead of just a thumbnail.
Offline
this can do XSS bug no?
Offline
works well but... viewing pictures more than 1500x1500 in gallery suxx
(
picture width > punbb width...
uploaded_image just spreads out of forum
Offline
Hi I have a problem with image_upload.js
When choosing number of slot upload image there nothing happens, when I check javascript console the following error has been return:
Error: document.forms[0].upload_slots has no properties Source File: http://domain.com/board/include/image_upload/image_upload.js Line: 13
Do you guys has any idea with this ?
Thanks
Offline
The problem is solved.
As I have another form that on the top of the page, hence the javascript is not working properly. I have modified the javascript so that it fits on our page.
Anyway, thanks for the great mod.
Cheers,
Nigel
Offline
This mod is awesome, FYI. I'm just having one problem. When I edit a post and try to delete one of the attached images, I press submit and it saves, but the image is still attached.
I've checked over the code a few times everything seems right.
Is there something I'm doing wrong?
Thanks
Dan
Offline
Doesn't work for me. ![]()
It has all the appearance of having installed correctly. It's there in admin and can be configured. It's there at the bottom of the post page. But when image file selected (within correct size limits) and Preview clicked.....the preview (text only) appears at the top of the post but there is no SUBMIT button! Clicking Preview again just gets the same again. No image is uploaded to the 'uploads' directory, either.
Bugger! and I really wanted this feature!
Offline
hj wrote:
Doesn't work for me.
It has all the appearance of having installed correctly. It's there in admin and can be configured. It's there at the bottom of the post page. But when image file selected (within correct size limits) and Preview clicked.....the preview (text only) appears at the top of the post but there is no SUBMIT button! Clicking Preview again just gets the same again. No image is uploaded to the 'uploads' directory, either.
Bugger! and I really wanted this feature!
Yeah, I just got that same issue as well. Where did the post-button go? Have we messed something up? ![]()
I noticed that post.php, for example, lacks the code for the Submit-button after the modification.
Before
<p><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="s" /><input type="submit" name="preview" value="<?php echo $lang_post['Preview'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="p" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
After
<p><input type="submit" name="preview" onclick="ClearUploadSlots();" value="<?php echo $lang_post['Preview'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="p" /></p>
What gives?
Last edited by frippz (2006-02-17 11:50:35)
Offline
This is normal: you deleted the submit button. You'll need to add this into the After-Code, just after<p>:
<input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="s" />
Final result:
<p><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="s" /><input type="submit" name="preview" onclick="ClearUploadSlots();" value="<?php echo $lang_post['Preview'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="p" /></p>
What you did:
you remplace the two button (submit and preview) by only one button: preview... ![]()
Offline
Error on windows server with the image module, in postgallery.php.
If your WinOS create the "Thumbs.db" file the postgallery.php will show the name: Thumbs.db into the gallery. To erase that go into: include/image_upload/image_upload.php and remplace in the function get_contents_dir (line 77) the expression in line 86 by "my bold expression":
function get_dir_contents($dir, $remove_thumbnails = false)
{
$contents = array();
if (!is_dir($dir))
return $contents;
$dh = opendir($dir);
while (false !== ($file = readdir($dh))) {
if ($file == '.' || $file == '..' || $file == 'Thumbs.db' || ($remove_thumbnails &&
$file == 'thumbnails'))
continue;
$contents[] = $file;
}
closedir($dh);
sort($contents);
return $contents;
}
Last edited by kursion (2006-02-23 04:04:20)
Offline
Thanks! But now another problem emerges.
Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid/gid is 135179/135179 is not allowed to access /hsphere/local/home/adjust/adjust.nu/forum/uploads/2543 owned by uid/gid 398/398 in /hsphere/local/home/adjust/adjust.nu/forum/include/image_upload/image_upload.php on line 341 Warning: chmod(): Unable to access /hsphere/local/home/adjust/adjust.nu/forum/uploads/2543/thumbnails in /hsphere/local/home/adjust/adjust.nu/forum/include/image_upload/image_upload.php on line 342 Warning: chmod(): No such file or directory in /hsphere/local/home/adjust/adjust.nu/forum/include/image_upload/image_upload.php on line 342 Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 135179/135179 is not allowed to access /hsphere/local/home/adjust/adjust.nu/forum/uploads/2543 owned by uid/gid 398/398 in /hsphere/local/home/adjust/adjust.nu/forum/include/image_upload/image_upload.php on line 346 Warning: chmod(): Unable to access /hsphere/local/home/adjust/adjust.nu/forum/uploads/2543/pussy_close-up.jpg in /hsphere/local/home/adjust/adjust.nu/forum/include/image_upload/image_upload.php on line 347 Warning: chmod(): No such file or directory in /hsphere/local/home/adjust/adjust.nu/forum/include/image_upload/image_upload.php on line 347
I know that my host uses Safemode in PHP, so does this mean I'm boned or is there a way to circumvent this?
Last edited by frippz (2006-02-23 04:23:27)
Offline
"No GD support detected"
I have gone through everything and did a search through the forums, but i keep on getting this error message. Can anyone help?
edit - oh, i just found this...duh, sorry.
http://mxsoft.org/forums/viewtopic.php?pid=69
Last edited by Useless (2006-03-19 07:46:22)
I love this mod, thought that it was working great, but turns out that the option is only showing up for admin:
http://thecozyshack.com/pics/image_upload.gif
Can anyone tell me what I've done wrong and how I can fix this...please...
Thanks in advance!
Last edited by webby (2006-05-18 06:55:55)
Offline
My bad...reading is fundamental. I needed to set permissions on that particular forum.
Offline
installed this mod. thumbs generating succesfully but cant see any images in posts in frame "uploaded images"
pbb ver.1.2.11
where may be problem?
Last edited by arashi (2006-05-20 16:25:57)
Offline
problem solved: I forgot to upload "image_upload.css" into "/styles/" (%
âàùåçëî
Last edited by arashi (2006-05-20 17:58:47)
Offline
Greetings
Just installed the image_upload couple of days ago and it looks great. I've only got one thing that is causing some problems. The problem has to do with the Upload slot javascript not working properly. The error message is as follows:
Line: 14
Char: 2
Error: 'document.forms.0.upload_slots.value' is null or not an object
Code: 0
Url: httP://localhost/nyttevekster.no/forum/post.php/fid=1
I've located the source for the problem but I'm not sure how to solve it. The problem lies in those two simple lines:
1. <form method="get" action="http://localhost/cgi/search/search.pl">
2. </form>
If I remove one of the lines the script works as is should. So, I'm wondering how this is able to cause this kind of problem. Is there a solution for this. I'm using the latest image_upload script and the latest version of the forum.
Another thing I wondering about is how I'm able to stop new topics/replies being sent to the database when the picture is not within the allowed range of size. Like it is to day one can hardly see the warning where it states that the picture is to big before the message is saved. Should be a solution where people are able to resize the picture and try posting the message again without the message being saved on the server. I must admit that I¨ve not looked at this problem yet. Just thought someone had some thoughts about this before I try to fix the problem. No need to discover the wheel again.
Thanks in advance
Offline
version 2.1.12?????
Offline
Greetings
I'm using PunBB 1.2.11 and 1.2.1 version of the Image Upload.
Offline
I'm using PunBB 1.2.12! What is support it?
Offline