76

Re: Attachment Mod 1.0.1 by Frank H

ive installed the mod on my forum, but other useras than me (admin) cant upload files... i have set the permissions so that all except guests can upload files but registrerd users still cant upload...

im running punbb 1.1.4

Most people are other people. Their thoughts are someone else's opinions, their lives a mimicry, their passions a quotation - Oscar Wilde

Re: Attachment Mod 1.0.1 by Frank H

have you also altered the max allowed filesize for each forum?
(admins override that value, and also override allowed filetypes)

78 (edited by Aleksei 2004-08-01 16:56)

Re: Attachment Mod 1.0.1 by Frank H

i have punbb 1.1.5 and attachment mod 1.0.1 installed, and when i type in:
http://localhost/forum/attachment.php?item=2
i get:

Notice: Undefined variable: pun_root in z:\home\localhost\www\forum\include\common.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\forum\include\common.php:33) in z:\home\localhost\www\forum\include\functions.php on line 82

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\forum\include\common.php:33) in z:\home\localhost\www\forum\attachment.php on line 98

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\forum\include\common.php:33) in z:\home\localhost\www\forum\attachment.php on line 100

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\forum\include\common.php:33) in z:\home\localhost\www\forum\attachment.php on line 101

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\forum\include\common.php:33) in z:\home\localhost\www\forum\attachment.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at z:\home\localhost\www\forum\include\common.php:33) in z:\home\localhost\www\forum\attachment.php on line 104

and then my file appears...what`s wrong?

hm.. when I add $pun_root = './'; before if (is_dir($pun_root)) @include $pun_root.'config.php'; in common.php all go right...

79 (edited by Frank H 2004-08-01 17:18)

Re: Attachment Mod 1.0.1 by Frank H

hmm... yeah you're right ... in attachment.php before

require 'config.php';

you should put that

$pun_root = './';

odd that my 1.1.2 doesn't produce the same error, as I have tons of attachments I have looked on and never seen that error tongue

actually I think you don't need the require 'cnfig.php'; line either, looks like common.php fetches that information smile


well ... I now see that the mod really need a rewrite from scratch ... too many small things wink

80

Re: Attachment Mod 1.0.1 by Frank H

How can I understand id in attach_rules ???
So what 'affected' should I enter if I don't want guests upload files ?

Re: Attachment Mod 1.0.1 by Frank H

I don't understand what you are trying to do. You do not need to edit files for setting what forums users are allowed to post files in.

Go to Admin-Forums, and you should see some extra controls for the attachments, one control for each forum (there you allow who may post and download file, how large files may be, and what files to allow)

82

Re: Attachment Mod 1.0.1 by Frank H

Thanks. It works smile

Re: Attachment Mod 1.0.1 by Frank H

nice smile

Re: Attachment Mod 1.0.1 by Frank H

Frank, I appreciate all your work on this mod.. it works really great!

it works great for the most part.. I am having the same problem as a few others that have posted here.. I implemented the mod into my forum but only I, admin, am able to upload files.. no one else is able to see the files or is anyone else able to post files. They all have the field to upload files but when they upload it, it does not attatch anything to the message. Now I have seen what you have posted for other users to try.. I have gone through and made the appropriate changes, I have even gone back thru the readme.txt and made sure everything was set correctly **I hope**

Currently I have a forum where i granted rights to EVERYONE just to test, and again only admin is able to post / see files. I have also set a file size of 500,000 Im wondering what im doing wrong?

85 (edited by Frank H 2004-10-20 12:02)

Re: Attachment Mod 1.0.1 by Frank H

considering you've set up a forum where you allow all, I take it as you have done all the neccessary settings in Admin-Forums. (using the checkboxes etc to allow users to upload)

but it sounds like you have something wrong in the mod, did you use the zip file linked from the first post aswell, and added all fixes written in the first post?  (it sounds like either attach.php is faulty, or there are more than one line missing), considering only admins can post/see files, it implies that it's something with the if statements and/or calls to functions in attach.php to check if user is allowed or not...


I'm quite occupied tomorrow, but in the evening I should probably find some time to do some hunting smile
If you like, you can compress the php files, and I can take a peak on them ... (in that case, mail me an url to the archive, to frank_n05pam@hotmale.com, and replace hotmale with msn's mail service big_smile)

Edit: Saw that you had mailed that the mail didn't work, but it did work, only that the hotmail spam filter had put the mail in junk mail, but I saw it and replied ... (then I saw the mail from this email-form on PunBB that you couldn't mail, but it did work ... must have been because it was delivered into the junk mail box or something, further emails should go to my inbox)

Edit: I have recieved the files, and when I unpacked the zip PunBB weren't installed correctly, at leat what it seems, so the problems is most probably there. I'm actually amazed stuff worked at all, to be honest. Hopefully moving all files to correct position will make it all work (and there was some files missing aswell, or at least "include/attach.php")

Edit: got another file, everything looks ok to me, no idea what might be wrong...

Edit: and so does the database ... I'm now fresh out of ideas ...

Edit: We have to give up, there's something that I cannot find, and a fully working version on apache fail on IIS, if it's apache vs IIS I'm not sure, as admins can upload, so it might be a combination of IIS+PHP, but I'm not sure.... either way, the user having these problem could let people be administrators.

Re: Attachment Mod 1.0.1 by Frank H

IIS users!
Important! If you're installing this on an IIS machine, there has once been a problem where the admins are the only ones allowed to post files. So you therefore may ge tthis problem aswell. I have no idea what's wrong, and why it does this. So I haven't come up with a fix for this.
The files that work fully on an apache machine fail on an IIS machine. I'm sorry to say this, but I haven't a clue what's wrong. When I write the new version I'll try to figure out what may have caused it and how to bypass it.
Either way, uploads and downloads still work for administrators.


I'm too choked with work atm to figure this out, but I would actually be happier if the mod would fail more, as now I haven't a clue what might be wrong ... security checks works on some parts (as the file upload field comes), but only administrators files is saved into the database, that's really odd... but something I need to look into when rewriting the mod for 1.2 (and it's new group system, the big piece in the rewrite wink)

87

Re: Attachment Mod 1.0.1 by Frank H

Question : how to put the FORM upload just after the Quick Answer in viewtopic.php ?!

Re: Attachment Mod 1.0.1 by Frank H

haven't included that (as the new attachment mod for punbb 1.2 will allow multiple files(had that in the works for punbb 1.1.5 aswell, but kind of decided I hadn't enough time to add it), so it'll come in punbb 1.2 instead, I haven't considered quickposts to upload aswell, due to the multiple files)

you probably need to do the same changes as in the post file, that is: doing the check if one is allowed to upload a file, if so, altering the enctype and add the fields needed,  ... not sure you need to fiddle with more things (if post.php will be called on in another way) ... and now I'm too tired to check wink
could be ok to do, could also require some more rewites in the post.php file aswell ...

Re: Attachment Mod 1.0.1 by Frank H

I can't wait for an upgrade sad

90

Re: Attachment Mod 1.0.1 by Frank H

Frank H wrote:

I do have plans on updating the mod to support files to be saved on disk and thus only use the database for reference and file info.

Frank
Pls remember to bear this in mind for 1.2. Backups become huge without it.
Can't wait for 1.2. I use this mod all the time. Great stuff!

I've been down so long it's beginning to look like up..

Re: Attachment Mod 1.0.1 by Frank H

yep, no more database storage ... everything will be put on disk instead, and I'll make a little installscript that will 'move' the files from database to file storage... and I'm also going to try not to use any file editing to set configurations either (going to try using PunBB's own things for those things instead, if possible)

Either way ... I have started to poke around planning for the rewrite, and some things seems to be much better for modding than previous versions, which is nice, but the mod requires a total rewrite, so it'll take a while (but on the bright side, once the mod is released, 1.2 should have been tested throughout big_smile)

92

Re: Attachment Mod 1.0.1 by Frank H

Hum ... I have a request about attachment mod ... but very specific for me ...

I organize games about a theme on my site http://www.fantasya.net (first THEME : Blue Fairy)

I would like all people attach pic in THIS post can see all the pics in a gallery called "blue fairy"

Do U see I would like ? But in this case, it's not compatible with your new version which visibly will not use DB ...

Re: Attachment Mod 1.0.1 by Frank H

hmm... sounds too fluffy for the attachment mod I make... but it should be possible to write some kind of gallery mod later, that use the attachment mod ... all files will be on disk, and references to them will be on database, but there will still be a php file that transfer the attachment, so rights etc shouldn't fail (and the modwriter wouldn't need to worry about those things)... it's probably similar to how it works 'from the outside' ...

So, what's needed in that gallery mod is something to check what attachments that's in that thread/forum, and then just spit them out on the gallery page ... a bit of coding needed, but I doubt it should be that hard to do, but I probably haven't time to do it. (after the attachment mod, I have another one that needs my attention... I don't want to say what that mod is just yet (think only Rickard knows atm) ... so I can work on it in my own pace, without too many demands ... lol smile)

Re: Attachment Mod 1.0.1 by Frank H

nooooooo i can't think of what it could be tongue but i'm going to demand you finish it instantly tongue

Re: Attachment Mod 1.0.1 by Frank H

Connorhd wrote:

nooooooo i can't think of what it could be tongue but i'm going to demand you finish it instantly tongue

lol, crap I should've kept my mouth closed big_smile

Re: Attachment Mod 1.0.1 by Frank H

oh btw if i click on your sig "Your search returned no hits."

97

Re: Attachment Mod 1.0.1 by Frank H

Frank H wrote:

hmm... sounds too fluffy for the attachment mod I make... but it should be possible to write some kind of gallery mod later, that use the attachment mod ... all files will be on disk, and references to them will be on database, but there will still be a php file that transfer the attachment, so rights etc shouldn't fail (and the modwriter wouldn't need to worry about those things)... it's probably similar to how it works 'from the outside' ...

So, what's needed in that gallery mod is something to check what attachments that's in that thread/forum, and then just spit them out on the gallery page ... a bit of coding needed, but I doubt it should be that hard to do, but I probably haven't time to do it. (after the attachment mod, I have another one that needs my attention... I don't want to say what that mod is just yet (think only Rickard knows atm) ... so I can work on it in my own pace, without too many demands ... lol smile)

But it would be great : because if you did it ... I could write all my fantasya.net about PunBB ...

98

Re: Attachment Mod 1.0.1 by Frank H

i use a simple gallery on my punBB wink

i got a simple admin-plugin with upload, delete and auto-thumbnailning
it supports subfolders and so on...

it uses some readir() wink

Re: Attachment Mod 1.0.1 by Frank H

you gonna release it?

100 (edited by Frank H 2005-01-13 20:39)

Re: Attachment Mod 1.0.1 by Frank H

Connorhd wrote:

oh btw if i click on your sig "Your search returned no hits."

Odd, it worked earlier ... but I cannot get the search to work at all, perhaps Rickard is doing some tests atm?
Edit: ok, I have fixed it ... This bugreport got me thinking, and I replaced the big letters in the keywords, now it works again...

@Rod:
Well there's that little issue called time ... and I haven't enough of that, that's the reason why I don't feel I can take on that project... better to say no now, than to say yes and not deliver something wink