Eskimobleu wrote:

Hello,
I am trying to install and configure Attachment Mod for my PunBB board.
The thing is that I have the same problem than FredrikK, which is the "Unable to move file from: /tmp/phpbTaHmT to /forum/attachments/5b965acd05257c60857c7d24937ead5a/198a17057604be15a9ff95aa6a0a9991.attach." error.

I have given 777 chmod to /forum/attachments folder, so as for the /forum/attachments/5b965acd05257c60857c7d24937ead5a one, and now I don't really know what to do sad

Please, help me smile

Is the server running with safemode on?

52

(29 replies, posted in Programming)

pedrotuga wrote:

mmmm... don't really know what to think. The words 'microsoft' and 'interesting' do not coexist in my brain.

sounds like you've already made up your mind ... wink

9. Installation trouble can be caused by php running in safe mode, turning it off will make it work. (if you're getting an error on .htaccess beeing copied, but the chmod seems to be correct)

Do you have safe_mode on (PHP setting)?

Ok, it was a really easy bug, it just showed the first value (but in the htmlsource, all items were there) ... it was just a neglected  htmlspecialchars() on the output variable smile

Bugfix:

#
# OPEN ------------------------------------------------------
#

AP_Attachment_Mod.php

#
# FIND (line 597) -------------------------------------------
#

                                            <input type="text" name="file_ext" value="'.$attach_file_extarray[$key].'" size="80" />

#
# REPLACE WITH ----------------------------------------------
#

                                            <input type="text" name="file_ext" value="'.htmlspecialchars($attach_file_extarray[$key]).'" size="80" />

#
# SAVE, UPLOAD-----------------------------------------------
#

I'm leaning towards updating the download, including the fixes that has been made ... we will see how much time I have during the weekend smile

hmm ... that's a bug! smile

gotta look closer at it ... good notice (and the first one to notice it I think smile)

no, re-check the original readme.txt, and compare it to what you pasted as "#---------[ 43. FIND (line: 187) ]--------------------------------------------"

You'll see that those differ at the end ....

either way, it's the  false) or error   instead of   true) or error    that should be changed and the comment that needs to be added to that row ... then it should work ...


now I need to get back to work wink

I just checked the readme.txt, what you pasted is not what the readme.txt says, (the false is set to true in that one) ...

Where did you download the readme.txt?

well, I told about it in the installation guide, did you read the "Installing the mod on PunBB 1.2.6+"?
In there you find:

Secondly, step 43 & 44 is altered. Just change the true to false after the query (and add the comment behind , so you have a mark that the attachment mod has altered that line)

Edit: aaah, you're meaning the actual text in readme.txt is wrong... hmm... gotta take a look...

yes, follow the installation guide, and you'll be fine. smile  (all parts of that page must be done, but read through it first, and backup the files before starting smile)

Well, if someone delete it ,it shouldn't be there IMHO, just like posts, threads, forums, categorys, users, groups etc. smile
(And if the post itself then looks odd, why not alter it at the time one delete the file, as you're already in edit mode?)

Anyhow, it sounds like fluff to me, so I won't add such a thing. But I guess there's always a possibility for a mod on the mod wink
(just like I don't add javascripts to handle the uploads and such)

lol, sometimes it's easy (sometimes not) smile

sounds like you haven't done all the edits in viewtopic.php, recheck those steps. (it should be visible above the signature)

no, it's not an image uploader per se (there is such a mod, perhaps that one has the ability to do it?) ... this mod is for all files, so I make no difference (except the image viewer that is wink)

but I suppose you can add such code in the same place as above for the thumbnails, but I won't incorporate it smile

I would think the best place to create the thumbnail would in the attachment functions file, after it's moved to the correct location.

Look for this in attach_create_attachment()   (include/attach/attach_func.php ~line 106)

        if(!move_uploaded_file($tmp_name,$pun_config['attach_basefolder'].$pun_config['attach_subfolder'].'/'.$unique_name))
            error('Unable to move file from: '.$tmp_name.' to '.$pun_config['attach_basefolder'].$pun_config['attach_subfolder'].'/'.$unique_name.'',__FILE__,__LINE__);
            //return false;
            
        if(strlen($mime)==0)
            $mime = attach_create_mime(attach_find_extention($name));
        
        // update the database with this info
        $result = $db->query('INSERT INTO '.$db->prefix.'attach_2_files (owner,post_id,filename,extension,mime,location,size) VALUES (\''.$pun_user['id'].'\',\''.$post_id.'\',\''.$db->escape($name).'\',\''.attach_get_extension($name).'\',\''.$db->escape($mime).'\',\''.$db->escape($pun_config['attach_subfolder'].'/'.$unique_name).'\',\''.$size.'\')')or error('Unable to insert attachment record into database.',__FILE__,__LINE__,$db->error());
        return true;
}

Adding it before the "return true;" would probably be the best place, it will only be created after the image/file has been uploaded correctly.

The file will be named: $pun_config['attach_basefolder'].$pun_config['attach_subfolder'].'/'.$unique_name


But I'll see if I make it possible for 1.3 to have this feature added 'afterwards'... as the mod will be rewritten... again wink

no plans for that ... the extensions in PunBB1.3 will make the life much easier ...

just another type of spam ... the CAPTCHA mod at punres (not sure if it's updated), should take care of these automatically created users ...

67

(21 replies, posted in Programming)

If you have a limitied things they can submit, a switch() statement is pretty solid aswell.

Well when I rewrite it to use the extension system, I'll also make it more flexible ... perhaps even so flexible that the mod itself would be possible to extend further with the extension system ...

But I don't make any promises, but I'll try to make it really easy to fiddle with so thisngs like this is possible to add. (it will more or less become the 2nd ground up rewrite of the mod)

69

(38 replies, posted in PunBB 1.2 discussion)

CreedFeed wrote:

What's the status on 1.3? Is there an expected release date? How far off is it to being ready to be released, estimated??

* Development version, not for live use, more for curios people who want to know how it looks/functions now. (But remember that the dev version isn't guaranteed to work!)
(Lots of things will still change, and I wouldn't advice people to use it until at least a beta or a release candidate has been released)
* No. (Deadlines etc. rush the creation, resulting in things that might not be so good, but does do what it's intended to do, in a way that might not be the best...)
* When it's done. (see above)

70

(1 replies, posted in PunBB 1.2 discussion)

IIRC it was added because of the people making false logout links

[url=login.php?action=out]Look at my new site[/url]

Adding that id will make it only to work for one person ... not everyone clicking there...

no security stuff, just to stop annoying things wink

71

(4 replies, posted in PunBB 1.2 troubleshooting)

IIRC missing languagefiles can cause this thing to happen

I don't see any white lines on my IE6 ...

there is only a start ' at the numbers aswell, causing really odd strings ... but elbekkos line should work

It's the attachment mod, you didn't follow the installationguide, so you replaced one of the changesets made to PunBB.
http://dev.punbb.org/changeset/172

Re-add that changeset, then read the "Installing the mod on PunBB 1.2.6+" at the installation guide over at http://cms.frankh.shacknet.nu/. And redo the attachment mod steps 43 & 44, according to the installation guide.

Edit: it's mentioned in this topic, but the topic description isn't really describing this phenomen, so hard to find, but I knew about it wink


Edit2: Considering how many that mess up on this I'm thinking of re-doing the readme ... but I really haven't got the time atm ... hmm... ah well, we'll see...

sent a mail...

Edit: and it seems like it's solved smile