26

Re: Image Post

sif wrote:

It works fine exept that i have to upload once and after edit again the same post and upload then again for it to work.
But it' s ok for me.=)

Not only from a perfectionist's point of view this is definitely not ok smile
Maybe it is some strange caching problem with your browser?

The German PunBB Site:
PunBB-forum.de

27

Re: Image Post

Example I would like smile
http://www.seinemaritime.net/publicatio … ritime.php

You define categories and under each of them ... you have the PDF smile As you can see it's a new request, in fact smile So I stop to spam this thread.

28

Re: Image Post

OMG!!!! I installed this and now all i see is a blank page!
Debug mode on doesnt show anything.

I am using Attachment MOD. Conflict?

29

Re: Image Post

Either that or you didn't install correctly.
I do not know the attachment mod so it may be..... but I hope it's just a mistake you made.. wink

The German PunBB Site:
PunBB-forum.de

30

Re: Image Post

Preview Messeng Button not show on post topic in post.php

31

Re: Image Post

I saw in the readme.txt that this preview button was commented out -)

32

Re: Image Post

Tobi wrote:

Either that or you didn't install correctly.
I do not know the attachment mod so it may be..... but I hope it's just a mistake you made.. wink

phew!!
it took me 90 mins to find out i missed that one comma in the language file!
works great on 1.2.7 with attachment mod as well.

btw, if i upload a picture in a post, and make another post with the same image filename (may happen when users upload different file but same filename), how to prevent broken images when one of the posts is deleted? randomized filename?

anyway thanks for a great mod.

Re: Image Post

Any thoughts on this??


Error: Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory 'cache'.

I get this when trying to set the rules for the image post...

alot of these things im trying to add do not exist..

like in viewtopic (readme.txt says viewtopics.php.. not viewtopic.php)


#---------[ 13. FIND (line:329) ]---------------------------------------------------
#

<?php echo $cur_post['message']."\n" ?>

#
#---------[ 14. AFTER, ADD ]---------------------------------------------------
#

<!-- MOD IMAGE POST -->
                    <?php if ($cur_post['userimage'] != '') echo "<br /><img src=\"".PUN_ROOT."img/users/" . $cur_post['userimage'] ."\" alt=\"" . $cur_post['userimage'] ."\">\n"; ?>
<!-- // MOD IMAGE POST -->


#

the line didn't exist in my viewtopic..


there were a couple that I couldn't find... but I think its because of the attachment mod??

34

Re: Image Post

@af3: Yes, the preview button is commented out. That can not work with image upload. Sorry this is the price to pay.. wink

@smartmonkey: Which version are you running?

The German PunBB Site:
PunBB-forum.de

35 (edited by beotiger 2006-02-21 10:34)

Re: Image Post

Have any of you noticed a bug in the version 1.0.1 when after editing a post with an image, the image vanishes from that post even if you didn't mean to delete it?
After some re-engineering wink Tobi's code in file edit.php I found next:

// MOD IMAGEPOST
if((isset($_POST['delete_userimage']) and $_POST['delete_userimage'] == 1) or is_uploaded_file($_FILES['userimage']['tmp_name']))  {
    include_once(PUN_ROOT.'/include/mod_imagepost.php');
    @unlink($userdir .'/'. $_POST['current_userimage']);
    }
if(is_uploaded_file($_FILES['userimage']['tmp_name']))  {
    include_once(PUN_ROOT.'/include/mod_imagepost.php');
    $name = uploadImage();
    }
else  $name = '';

That means that if you saving your editing post without any pointing to an image (even if you had one), the name of your image becomes blank (see the last line of code).
OK. All you should do to correct the problem, I am showing you the correct example (if Tobi doesn't' mind, of course):

// MOD IMAGEPOST
$b_deleted = true;
if((isset($_POST['delete_userimage']) && $_POST['delete_userimage'] == 1) || is_uploaded_file($_FILES['userimage']['tmp_name']))  {
    include_once(PUN_ROOT.'/include/mod_imagepost.php');
    @unlink($userdir .'/'. $_POST['current_userimage']);
    $b_deleted=false;
    }
if(is_uploaded_file($_FILES['userimage']['tmp_name']))  {
    include_once(PUN_ROOT.'/include/mod_imagepost.php');
    $name = uploadImage();
    }
elseif ($b_deleted && isset($_POST['current_userimage'])) $name = $_POST['current_userimage'];
else  $name = '';

You will never lose an image of your editing post from that time on! smile

36

Re: Image Post

tobi, with this mod i just realized that when user upload a file bigger than the set maxsize or unallowed ext, the user gets error msg as intended; but still the topic id is registered in database and thus creates an entry in the forum. How to prevent this? i have to manually erase each of this "empty" post everytime. thanks.

37

Re: Image Post

Sorry for the delay, been on holidays... smile
Anyway, the problem is that the uploaded image is just a part of the message.
So if there is nothing else than the image it is still considered to be a message...
just imagine somebody has text and an image to upload.
Do you want the message to vanish just because the image upload failed?
However, it is possible to check if a post is an image-only one and if so, not enter it when the upload fails.
As soon as I am happily back at my own computer I'll have a look wink

The German PunBB Site:
PunBB-forum.de

38

Re: Image Post

tobi -- i probably messed up the script somewhere but cant figure out where. I tried posting text + oversized image and I get the error msgs related to img as expected. But then, the message is posted with no text in it (empty).. from the database, the post is being registered as having last_post_id as ZERO. any idea?

39

Re: Image Post

I don't really know.
Doesn't happen on my installations.
Maybe another mod of yours or an installation error.... really difficult to say.....sorry.

The German PunBB Site:
PunBB-forum.de

40

Re: Image Post

well my forums are based on graphic design so this little modification should be perfect for me smile thanks tobi ill test it out with a full back up jsut incase.

41

Re: Image Post

I installed this mod, but when attaching an image when posting a new message, no image is shown in the message. Only the text.

If I edit an existing message, and is adding an image, it is posted in the message.

Any suggestions on whats wrong?

42

Re: Image Post

You're 100% sure you followed the readme.txt from line 177 on?
Because I never heard of this before.
I just double checked on my installs and everything's fine!

The German PunBB Site:
PunBB-forum.de