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-09-20 13:36:32

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

Image Upload 1.0.2

Code:

##
##
##        Mod title:  Image Upload
##
##      Mod version:  1.0.2
##   Works on PunBB:  1.2.6, 1.2.7
##     Release date:  2005-09-20
##           Author:  Max Khitrov <max@mxserve.net>
##
##      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
##                    include/functions.php
##                    lang/English/common.php
##
##       Affects DB:  Yes
##
##            Notes:  1) This version of the mod should be stable enough for
##                       production environment. If you find any problems,
##                       please e-mail them to me.
##                    2) If upgrading from version 1.0.1, see instructions in
##                       upgrade-1.0.1_to_1.0.2.txt
##                    3) See changelog.txt for a list of all changes.
##                    4) If you test this mod on PunBB version other then 1.2.7,
##                       and it works, please let me know so I can add it to the
##                       official list. I could also use a few people testing it
##                       on windows.
##                    5) Currently, it is possible for people to view images
##                       in posts that they have no access to. For example,
##                       if someone doesn't have access to a forum, they can
##                       still access images posted in that forum given that
##                       know the id of the post and image name. This is a minor
##                       issue that will be fixed in the next version (should
##                       be out later this week).
##                    6) After you install this mod, be sure to configure it
##                       from the Administrator 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-09-20 13:51:17

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

Re: Image Upload 1.0.2

Hi everyone,

Found 2 bugs in the 1.0.1 version, so decided to make an early release to fix them. Thanks to StevenBullen for pointing out the problem the updating settings (which I probably should've found myself before making the release roll).

Anyway, the admin plug-in should be fine now, and I also fixed another bug that showed up when you made a post with images, and right away clicked on one of them. The "Back to Post" link wouldn't work correctly. Now it does smile

To upgrade from previous versions, just overwrite mod files. The exact details are in the archive.

Last edited by NightFalcon (2005-09-20 13:51:38)

Offline

 

#3 2005-09-21 06:41:10

tz8
Member
Registered: 2005-08-17
Posts: 26

Re: Image Upload 1.0.2

works perfectly with the frontpage mod... good work!

Offline

 

#4 2005-09-21 07:28:21

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

Re: Image Upload 1.0.2

humm, great but on some of my machine, I don'T have GD nor I can get it. Would it be possible to have an option to choose between GD and imagemagik ? Would be great.

Offline

 

#5 2005-09-21 13:12:15

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

Re: Image Upload 1.0.2

lmarecha wrote:

humm, great but on some of my machine, I don'T have GD nor I can get it. Would it be possible to have an option to choose between GD and imagemagik ? Would be great.

I'll see what I can do, right now the script is using phpThumb to generate thumbnails, and that only supports GD. If I can find a similar class, or have time to write my own using imagemagik I'll add that in.

Offline

 

#6 2005-09-21 14:29:37

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

Re: Image Upload 1.0.2

Wait a sec, I take that back - phpThumb does support ImageMagick. Did you test it out and it didn't work, or did you just assume that it was GD only? If it doesn't work, let me know so I could take a look at why, otherwise you should be ok.

Last edited by NightFalcon (2005-09-21 14:30:40)

Offline

 

#7 2005-09-22 06:12:42

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

Re: Image Upload 1.0.2

My mistake, seems to work pretty well with it.

As a future modification, could it be possible that when you preview a post, it does not 'forgot' the choice of picture ?

Except this little thing, this is a great mod.

Offline

 

#8 2005-09-22 06:29:58

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

Re: Image Upload 1.0.2

Yep, that's on my to-do list smile

Offline

 

#9 2005-09-22 06:48:04

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

Re: Image Upload 1.0.2

Other possible improvments:
- Full use of the lang directory for translation of all user text
- test for directory existing and/or writtable
- enable or not the extension from the admin panel.

Offline

 

#10 2005-09-22 07:04:17

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

Re: Image Upload 1.0.2

About the DD/Imagemagick, it seems phpthumbs need GD :

phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly.

But well, it works locally, I will test it later to see if it pick up imagemagick...

Offline

 

#11 2005-09-22 12:31:48

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

Re: Image Upload 1.0.2

See just below that:

Supported source image formats:

    * JPEG (via GD or ImageMagick)
    * PNG (via GD or ImageMagick)
    * GIF (via GD, ImageMagick, or phpthumb.gif.php)
    * BMP (via ImageMagick or phpthumb.bmp.php)
    * any image format ImageMagick can read

As for your suggestions, the last 2 are already there. smile

Offline

 

#12 2005-09-23 03:19:32

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

Re: Image Upload 1.0.2

then it's a perfect mod...

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.