PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2005-11-03 15:34:41

NightFalcon
Member
From: Maryland, US
Registered: 2005-09-14
Posts: 38
Website

Image Upload 1.2.1

Code:

##
##
##        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.
##
##

Download here

Offline

 

#2 2005-11-03 15:36:27

NightFalcon
Member
From: Maryland, US
Registered: 2005-09-14
Posts: 38
Website

Re: Image Upload 1.2.1

This release fixes two problems with the previous release, and updates the install script to work with PunBB 1.2.10.

Enjoy!

Offline

 

#3 2005-11-10 08:49:13

lmarecha
Member
Registered: 2005-05-05
Posts: 71

Re: Image Upload 1.2.1

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

 

#4 2005-11-11 13:12:43

hypnotoad
Member
Registered: 2005-11-10
Posts: 18

Re: Image Upload 1.2.1

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

 

#5 2005-11-12 00:40:36

b4lz0r
Member
Registered: 2005-10-01
Posts: 28

Re: Image Upload 1.2.1

this can do XSS bug no?

Offline

 

#6 2005-11-14 14:22:06

rndc
New member
Registered: 2005-09-22
Posts: 4

Re: Image Upload 1.2.1

works well but... viewing pictures more than 1500x1500 in gallery suxx sad(
picture width > punbb width...

uploaded_image just spreads out of forum

Offline

 

#7 2005-12-26 16:20:44

noxcuse
New member
Registered: 2005-12-17
Posts: 9

Re: Image Upload 1.2.1

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:

Code:

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

 

#8 2005-12-27 00:42:25

noxcuse
New member
Registered: 2005-12-17
Posts: 9

Re: Image Upload 1.2.1

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

 

#9 2005-12-31 17:28:40

cytexone
New member
Registered: 2005-12-26
Posts: 4

Re: Image Upload 1.2.1

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

 

#10 2006-01-30 15:22:58

Keulig
Member
From: France
Registered: 2005-06-29
Posts: 14
Website

Re: Image Upload 1.2.1

Images are uploaded but thumbnails arent generated.

I turned on debug mode and phpthumb tells :

"" does not exist

sad

GD 2 libraries are running, chmods are ok... i don't know what to do !

Offline

 

#11 2006-01-31 17:05:45

hj
New member
Registered: 2006-01-31
Posts: 2

Re: Image Upload 1.2.1

Doesn't work for me. sad

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

 

#12 2006-02-17 11:32:39

frippz
New member
Registered: 2006-02-17
Posts: 2

Re: Image Upload 1.2.1

hj wrote:

Doesn't work for me. sad

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? hmm

I noticed that post.php, for example, lacks the code for the Submit-button after the modification.

Before

Code:

<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

Code:

<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

 

#13 2006-02-23 03:57:47

kursion
New member
Registered: 2006-02-23
Posts: 2

Re: Image Upload 1.2.1

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... wink

Offline

 

#14 2006-02-23 04:02:55

kursion
New member
Registered: 2006-02-23
Posts: 2

Re: Image Upload 1.2.1

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

 

#15 2006-02-23 04:22:36

frippz
New member
Registered: 2006-02-17
Posts: 2

Re: Image Upload 1.2.1

Thanks! But now another problem emerges.

Code:

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

 

#16 2006-03-19 07:44:26

Useless
Guest

Re: Image Upload 1.2.1

"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)

 

#17 2006-05-18 06:55:37

webby
Member
Registered: 2006-01-27
Posts: 13

Re: Image Upload 1.2.1

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

 

#18 2006-05-18 06:57:55

webby
Member
Registered: 2006-01-27
Posts: 13

Re: Image Upload 1.2.1

My bad...reading is fundamental. I needed to set permissions on that particular forum.

Offline

 

#19 2006-05-18 07:42:01

redbo
Member
From: Leipzig
Registered: 2006-05-08
Posts: 11
Website

Re: Image Upload 1.2.1

webby wrote:

My bad...reading is fundamental. I needed to set permissions on that particular forum.

which forum version do you use ?

Offline

 

#20 2006-05-20 16:25:32

arashi
New member
Registered: 2005-12-19
Posts: 6

Re: Image Upload 1.2.1

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

 

#21 2006-05-20 17:58:27

arashi
New member
Registered: 2005-12-19
Posts: 6

Re: Image Upload 1.2.1

problem solved: I forgot to upload "image_upload.css" into "/styles/" (%

âàùåçëî

Last edited by arashi (2006-05-20 17:58:47)

Offline

 

#22 2006-05-25 18:57:37

Magnus
New member
From: Oslo, Norway
Registered: 2006-05-25
Posts: 2

Re: Image Upload 1.2.1

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

 

#23 2006-05-27 21:34:29

trongha
Member
Registered: 2006-05-25
Posts: 51

Re: Image Upload 1.2.1

version 2.1.12?????


I'm sorry! I speak english very bad.

Offline

 

#24 2006-05-28 06:42:55

Magnus
New member
From: Oslo, Norway
Registered: 2006-05-25
Posts: 2

Re: Image Upload 1.2.1

Greetings

I'm using PunBB 1.2.11 and 1.2.1 version of the Image Upload.

Offline

 

#25 2006-05-28 07:32:18

trongha
Member
Registered: 2006-05-25
Posts: 51

Re: Image Upload 1.2.1

I'm using PunBB 1.2.12! What is support it?


I'm sorry! I speak english very bad.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.