Re: Image Upload 1.2.1

@iceymoon
2. All images are thumbnailed and placed into an in-post gallery
3. The administrator can define the maximum number of images per post in the mod's configuration

@NImda - this mod will work fine for 1.2.14.

Looking for a certain modification for your forum? Please take a look here before posting.

102

Re: Image Upload 1.2.1

hi;
ive installed your mods... i tried to upload it but i couldnt too...it has a lot of errors while uploading...

first is like this:

Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 10007 is not allowed to access /srv/www/vhosts/xxxx/os/httpdocs/Forum/uploads/478 owned by uid 30 in /srv/www/vhosts/xxxxx/os/httpdocs/Forum/include/image_upload/image_upload.php on line 341

second one is

Warning: chmod(): Unable to access /srv/www/vhosts/xxxxxxxx/os/httpdocs/Forum/uploads/478/thumbnails in /srv/www/vhosts/xxxxxxxxxxx/os/httpdocs/Forum/include/image_upload/image_upload.php on line 342

Warning: chmod(): No such file or directory in /srv/www/vhosts/xxxxxxxxxx/os/httpdocs/Forum/include/image_upload/image_upload.php on line 342

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 10007 is not allowed to access /srv/www/xxxxxxxxx/os/httpdocs/Forum/uploads/478 owned by uid 30 in /srv/www/vhosts/xxxxxxxxxx/os/httpdocs/Forum/include/image_upload/image_upload.php on line 346

im sure ive created the uploads folder as well as Chmod it to 777... but i have no idea...

please help me..

p/s im using ssl (https) so is that the problem?

I love sky - i love flowers - and i love myself :D

Re: Image Upload 1.2.1

It would appear that you need to turn off safe mode (or reconfigure). You'll have to talk to your host.

Looking for a certain modification for your forum? Please take a look here before posting.

104

Re: Image Upload 1.2.1

Sorry for the double post - I posted this at PunRes too--- I'm never sure which one to use.


how hard would it be to get image upload to work with highslide:  http://vikjavev.no/highslide/

All it requires is the url of the thumbnail and the url of the large image...

So what I was thinking it would be wrapped around the thumbnail and then when you click on it it would open the large image directly.

I have highslide working with cpmfetch (a coppermine mod) inside my punbb forum here:

http://www.amateurillustrator.com/forums/

Just click on the thumbnails at the top to see the zoom effet.

I explain how I did it here:

http://punbb.org/forums/viewtopic.php?id=12768

This would be a cool feature I think.

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: Image Upload 1.2.1

I'd wait for 1.3 for this one personally. the image upload mod is one of the biggest to "install" as far as source edits are concerned. so a simple upload and click to install would be welcome for this with the extension system.

thanks for the link to the script. big_smile

~James
FluxBB - Less is more

106

Re: Image Upload 1.2.1

ive already installed it...just wanted to know how hard it would be to do this little mod of a mod

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

107 (edited by nickfzx 2006-12-03 03:09)

Re: Image Upload 1.2.1

got it working by myself....


here is the a link to where u can see it in action:
http://www.amateurillustrator.com/forum … php?id=239

Just click on one of the uploaded images.


here is what i did to the "displays all image section" of image_upload.php

/*
********************************************************************************
** Displays all images that are currently attached to a post.
********************************************************************************
*/
function show_post_images($pid, $edit = false)
{
    global $pun_config, $lang_common;

    if (!check_mod_config())
        return;

    // Check if this post has images attached
    if (!is_dir($pun_config['iu_upload_path'].$pid))
        return;

    // Create an array of all image names for this post
    $images = get_dir_contents($pun_config['iu_upload_path'].$pid.'/thumbnails/');
    $image_count = count($images);

    $col = 0;
    $idx = 0;

    $column_count = $pun_config['iu_table_cols'];
    $column_width = floor(100/$column_count);
    $image_height = $pun_config['iu_thumb_height'];
    $row_height   = $image_height + 6;

    if ($edit)
        $row_height += 20;

    $output[] = '';

    if (!$edit)
        $output[] = "\t\t\t\t\t<br />";
    $output[] = "\t\t\t\t\t<div class='image_thumbnails'>";

    $output[] = "\t\t\t\t\t\t<fieldset>";
    $output[] = "\t\t\t\t\t\t\t<legend>$lang_common[Uploaded_Images]</legend>";

    while ($idx < $image_count) {

        $output[] = "\t\t\t\t\t\t\t<div class='image_row' style='height: ".
                    $row_height."px;'>";

        for ($col = 0; $col < $column_count; $col++, $idx++) {
            if ($col == $column_count - 1)
                $column_width--;    // Oh the wonderful IE CSS engine...

            if ($idx < $image_count) {
                $url_name = urlencode($images[$idx]);
                $output[] = "\t\t\t\t\t\t\t\t<span class='image_item' style='width: ".
                            $column_width."%; height: $image_height"."px;'>";

                            
echo '<div id="highslide-container"></div>';
                if (!$edit) $output[] = "\t\t\t\t\t\t\t\t\t<a href='showimage.php?".
                                        "pid=$pid&filename=$url_name' class='highslide' onclick='return hs.expand(this)' title='Click to enlarge' alt='Highslide JS'>";
                $output[] = "\t\t\t\t\t\t\t\t\t\t<span class='image_thumbnail' ".
                            "style=\"background-image: url('showimage.php?".
                            "pid=$pid&filename=$url_name&preview=true'); ".
                            ($edit ? '' : 'cursor: pointer;') . "\"></span>";
                if (!$edit) $output[] = "\t\t\t\t\t\t\t\t\t</a>";

                if ($edit)
                    $output[] = "\t\t\t\t\t\t\t\t\t<label for='delete_image_$idx'>".
                                "<input type='checkbox' name='delete_image[]' ".
                                "id='delete_image_$idx' value='".urlencode($images[$idx]).
                                "' /> Delete</label>";
                $output[] = "\t\t\t\t\t\t\t\t</span>";
            }

            if ($col == $column_count - 1)
                $column_width++;
        }

        $output[] = "\t\t\t\t\t\t\t</div>";
    }

    $output[] = "\t\t\t\t\t\t</fieldset>";
    $output[] = "\t\t\t\t\t</div>";
    $output[] = "\t\t\t\t\t<br />\n";

    echo implode("\n", $output);

}
Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

108 (edited by FredrikK 2006-12-06 19:18)

Re: Image Upload 1.2.1

Really great mod!

But I want the images to be displayed inline at some max resolution (for example 800x600) and the php thumb stuff to be removed. And by clicking on the pictures in the thread you should be redirected directly to their path (for example www:forum.com/uploads/example_picutre.jpg).

Can anyone help me achieving this?

For now I have installed your mod according to the instruction and it works fine!
My knowledge about php is very small and that is why I'm asking for help.

I would be mostly grateful!

hej!

Re: Image Upload 1.2.1

hi there...can anybody help me out with this problem: when I try to uplaod a picture to the gallery I get the next message: ERROR : You did not select a file to be downloaded. I've tried several files..all JPG but everytime I get the same info message.

Its a bit strange that the problem just started to day....did not have the problem earlier.

Someone with any idea???

110 (edited by lie2815 2007-02-20 20:09)

Re: Image Upload 1.2.1

@nightfalcon:
Really nice mod.
Just one question:
In header.php you include the stylesheet image_upload.css here:

if (defined('PUN_ADMIN_CONSOLE'))
    echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";
    echo '<link rel="stylesheet" type="text/css" href="style/imports/image_upload.css" />'."\n";

Wouldn't it be better when that would be under "imports", since it doesn't really work out fine as forum design option (I am just concerned about this, because my users don't have a clue about all that php-stuff... wink

EDIT: Oops. As you can see, I already fixed it. The original form was obviously this:

if (defined('PUN_ADMIN_CONSOLE'))
    echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";
    echo '<link rel="stylesheet" type="text/css" href="style/image_upload.css" />'."\n";
FluxBB - v1.4.8

111

Re: Image Upload 1.2.1

has anyone tried this mod with 1.2.15?

Re: Image Upload 1.2.1

I believe the most recent version I tried this mod with was 1.2.13; the changes between the various 1.2.x versions are minor enough that it should probably work perfectly on 1.2.15.

Looking for a certain modification for your forum? Please take a look here before posting.

113

Re: Image Upload 1.2.1

yep it works I have it installed on 1.2.15

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: Image Upload 1.2.1

Hi All

Hoping someone can shed some light on a few things ...

1. When I try to create a new post, I have no 'submit' button ... on the 'preview' button.
2. Even after I press 'preview', the images does not show on the preview post.
3. I dont need the thumbnail functionality. How can I disable it and only have the original images showing in the post?

Thanks in advance!

PS. I'm running 1.2.16 ... would this have anything to do with the above problems?

115

Re: Image Upload 1.2.1

hi there,

i have a problem with the image uploader (well, with other modifications too).

so i have a forum that use the image upload mod, and all works ok. then i want to update the punBB with the latest version. I made mistake, i downloaded a full package of punBB, instead of the update package, and i run the update. after the update, few days later i found some of my mods don't work. image_upload is one of them and the users can't upload their avatars now. i have checked the folder and it's already have the correct CHMOD.

i look into the affected files and i could find anything has changed. so i assume that it must be affected the DB.

can i run a fresh install of image upload mod?

thanks a lot.

regards,

Soyuz