Re: Attachment Mod 2.0.1 by Frank H
yep, I believe that should be correct
remember that you still have the quirks of 1.2.6 mentioned in this installation guide aswell
Followed, and installed now. Thanks
rgds
Si
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Attachment Mod 2.0.1 by Frank H
yep, I believe that should be correct
remember that you still have the quirks of 1.2.6 mentioned in this installation guide aswell
Followed, and installed now. Thanks
rgds
Si
Hi,
I installed 1.2.7 version and install this mod after.
I read the Installation this mod for 1.2.6. Change corrections and Change files step by step.
Fine, no erros, but no works. The link to file and icon attach no appears and same file is not in the folder. Why?
I trie download v.1.2.6 but don't find it
Thanks for any help
regards
The link to file and icon attach no appears and same file is not in the folder.
I didn't get that? (I'm sick with flue or something, but I still think it's a bit unclear)
Please email me to the adress in my signature and I'll try to help out ... describe what works and what doesn't work, and I'll do my very best to help out
Followed, and installed now. Thanks
rgds
Si
nice to hear you got it working
(myself I haven't upgraded yet ... no go to be in flue clouds and try to do an update ... but the security patches didn't affect me, so I can take it easy )
well ... there's no such strings in the attachment lang files
Either write your message in there (easiest if you only have one language, just replace $lang_attach['Not allowed to post attachments'] with 'your errormessage' ), or add the appropiate lines in the lang files as the other stuff in there is written, somehting like this:
'Not allowed to post attachments' => 'what you want to say'
its working now..
but i found other thing > with the error msg in place, whenever a post is made with unallowed attachmet, post will be posted but then it become a ghost post i.e. when clicked, it says bad link or no longer available. i have to then manually take out the topic from mysql.
any way to put the error msg being inserted as part of the post itself?
hmm... I thought I had put the attachment things after Rickards stuff, obvoisly not ... then, perhaps its not so good to use it?
for now i am using this which prevented the ghost link.
message($lang_attach['Error Message'],1);
If you are a member on the board, and you are logged on. Does the image apper, so you dont need to klick on the attatchment link?
I couldent find any preview.
no preview, works the same way for all users allowed to view (making previews will hog resources)
you can put an image in a post by checking what url the image has ...
Someone that have succesfully added this mod to the 1.2.7 version? Pls post your files, i cant get it to work.
I did a little mod to this mod, I hope you don't mind frank. I have set it so that if it is an image file to just show the image in the post.
Just open viewtopic.php and look for (around line 332.:
$attach_output .= '<br />'."\n\t\t\t\t\t\t".attach_icon($attachment_extension).' <a href="./attachment.php?item='.$attachment_id.'">'.$attachment_filename.'</a>, '.$lang_attach['Size:'].' '.number_format($attachment_size).' '.$lang_attach['bytes'].', '.$lang_attach['Downloads:'].' '.number_format($attachment_downloads);
and replace that with:
if ($attachment_extension=='jpg' || $attachment_extension=='jpeg' || $attachment_extension=='gif' || $attachment_extension=='png') {
$attach_output .= '<br />'."\n\t\t\t\t\t\t".'<a href="./attachment.php?item='.$attachment_id.'"><img src="./attachment.php?item='.$attachment_id.'&download=1" border="0"></a><br>'.$attachment_filename.', '.$lang_attach['Size:'].' '.number_format($attachment_size).' '.$lang_attach['bytes'].', '.$lang_attach['Downloads:'].' '.number_format($attachment_downloads);
} else {
$attach_output .= '<br />'."\n\t\t\t\t\t\t".attach_icon($attachment_extension).' <a href="./attachment.php?item='.$attachment_id.'">'.$attachment_filename.'</a>, '.$lang_attach['Size:'].' '.number_format($attachment_size).' '.$lang_attach['bytes'].', '.$lang_attach['Downloads:'].' '.number_format($attachment_downloads);
}
Maybe someone can modify it some more to create a thumbnail using GD.
I wrote it so it would be possible to mod, and tried to make loads of comments and stuff
the gdstuff I decided not to implement, due to the extra load ... but I suppose it shouldn't be that hard
as a sidenote, I run it successfully on a 1.2.8 version ... so it still works
and a future thing I might do is to tweak the filename generator to make backups even simpler (to add some smalll stuff at the front of the filename to help sorting it, but still keep the random letters at the end to make bruteforcing hard) + optimize the viewtopic code ...
But, I suppose I won't have much time until PunBB 1.3 is released to make any changes unless any security issues arise...
For a newbie like myself, I am not really willing to try modify the scripts myself.
Has anyone made an installation guide for 1.2.8? I see messages indicating that it runs successfully.
Colya
It's the same changes as those for 1.2.6 that is mentioned on the installation guide. I don't think the security fixes after 1.2.6 has affected the mod in any way.
Hi,
I have installed this mod into version 1.2.9
It all seems to work fine except that I can only upload .txt files. When I try something like a Word document, nothing gets uploaded and the post has no link to the attachment.
Any ideas?
Thanks
Jon
have you followed the installationguide mentioned on the first post in this thread. It has a section on how to setup the board for larger files than 2000 bytes (as most servers differs, one need to setup it according to your server, and setting it too high default will make files 'go lost' without any clue why)
so, make sure you've set the variables correctly
for now i am using this which prevented the ghost link.
message($lang_attach['Error Message'],1);
err did not work.
frank -- this will give a message to tell the poster abt the invalid size, etension etc but did not prevent creation of a topic (with ghost post link, something like .. viewtopic.php?pid=0#p0). Do you have any suggestion to fix this?
thanks.
Hello,
I'm running punBB 1.2.6 and would like to upgrade to 1.2.10. I have the attachment mod installed so how can I update without losing my attachments?
Sorry if its a silly question
Elad
depends on how you are planning on doing the upgrade ... if you're using the hdiffs, you don't have to do anything (as 1.2.7 -> 1.2.10 are just small updates) ... just that some of the linenumbers might differ
but ... backups are always nice to do
frank -- this will give a message to tell the poster abt the invalid size, etension etc but did not prevent creation of a topic (with ghost post link, something like .. viewtopic.php?pid=0#p0). Do you have any suggestion to fix this?
thanks.
Not without adding a bunch of code ... I thought about it a bit, and never figured out a good way to fix it ...
Any idea when an update for 1.2.10 will be created?
never ... unless a security issue is discovered (the 1.2.6 installation guide should work fine for 1.2.10 ...)
af3 wrote:frank -- this will give a message to tell the poster abt the invalid size, etension etc but did not prevent creation of a topic (with ghost post link, something like .. viewtopic.php?pid=0#p0). Do you have any suggestion to fix this?
thanks.Not without adding a bunch of code ... I thought about it a bit, and never figured out a good way to fix it ...
if i can delete from database the created ghost topic automatically, then this should be fine :-) any way to insert mysql command in the attachment script if the upload size is excessive or ext. not allowed?
I have this mod up and working, but a user just pointed out an issue. He tried to upload a very large file and it didn't work. I tried it and it works fine. I figured it was his error, but after logging in as a regular user, I can't upload the file either.
So, I'm able to do it as an admin, but not as a user. Permission are set for the forum, so it isn't that. I can select the file, it takes a while for the post to happen so it is uploading the file, but the post appears with no attachment.
As far as I can tell the file size limit isn't set by the user type (admin vs. member). Am I missing something?
Nevermind. I didn't realize that it had to be set for each group in each forum. I have seven user groups and seventeen forums. That was a pain, but they are all reset now.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Attachment Mod 2.0.1 by Frank H
Powered by PunBB, supported by Informer Technologies, Inc.