PDA

View Full Version : New Posting Features - Attachment In Quickreply


tnguy3n
03-25-2004, 10:00 PM
What this hack does is to add an attachment option to quickreply in showthread as of New Reply or New Thread. This is good for boards that have slacked members who don't want to click on New Reply, but wanting to attach file on Quickreply.

/*-----------------------------------------------------------------------*\
File modification: 1
Template modication: 1
New Templates: 2
(estimate hack time: 2-5 mins)
/*-----------------------------------------------------------------------*\

Live Demo: http://all4actions.net

-- T. Nguyen --

Red Blaze
03-26-2004, 04:19 AM
worked flawlessly. :)

Vivi Ornitier
03-26-2004, 04:50 AM
nice and very useful addition ;)

Oblivion Knight
03-26-2004, 07:42 AM
Does this take in to consideration the usergroup's attachment permissions?

If I had my board set up to only allow staff to upload attachments, would registered users still be able to see the attachment option on QuickReply, and would they be able to use it?

tnguy3n
03-26-2004, 08:08 AM
Does this take in to consideration the usergroup's attachment permissions?

If I had my board set up to only allow staff to upload attachments, would registered users still be able to see the attachment option on QuickReply, and would they be able to use it?

If you disable upload to certain usergroups, the upload manager wont show in quickreply, those users just see normal quickreply. ^_^

PlenoJure
03-26-2004, 09:34 AM
One small change I made to the showthread.php change, replace require_once('./includes/functions_file.php');
$inimaxattach = fetch_max_attachment_size();with: require_once('./includes/functions_file.php');
$attachtypes = unserialize($datastore['attachmentcache']);
$inimaxattach = fetch_max_attachment_size();This will list the valid extentions instead of just displaying a blank space.

Oblivion Knight
03-26-2004, 09:50 AM
If you disable upload to certain usergroups, the upload manager wont show in quickreply, those users just see normal quickreply. ^_^
Awesome.. I'll be installing this later then :)

Thanks for sharing.

Red Blaze
03-26-2004, 11:32 AM
Thanks PlenoJure, I noticed that myself, but didn't know what code to add. ^^;;

Oblivion Knight
03-26-2004, 12:04 PM
In showthread_quickreply, I think this:

<!--- showthread quickreply attachement --->
</tr>
<td>
$showthread_attachmentoption
</td>
</tr>
<!--- showthread quickreply attachement --->Should be this:

<!--- showthread quickreply attachment --->
<tr>
<td align="$stylevar[left]">
$showthread_attachmentoption
</td>
</tr>
<!--- showthread quickreply attachment --->

tnguy3n
03-26-2004, 12:50 PM
*attachment updated* thanks, PlenoJure & Oblivion Knight . :)

NuclioN
03-26-2004, 12:58 PM
Usefull :) Tnx.

Oblivion Knight
03-26-2004, 01:02 PM
*attachment updated* thanks, PlenoJure & Oblivion Knight . :)You've still got part of the template wrong, there should be an opening <tr> tag and a closing </tr> tag. Currently you have 2 closing </tr> tags.. :)

tnguy3n
03-26-2004, 01:18 PM
thanks for the notice. *updated*. ^_^

zajako
03-26-2004, 02:38 PM
thanks for the notice. *updated*. ^_^
Very nice! good work

Gio Takahashi
03-26-2004, 04:40 PM
Oh B'ah I was working on doing this hack myself, you beat me to it. good job however and will install.

gmarik
03-26-2004, 05:08 PM
nice one... adding smilies woould be another great functuoin... in one line like other boards has...

tnguy3n
03-26-2004, 05:24 PM
nice one... adding smilies woould be another great functuoin... in one line like other boards has...

Megatekno already released "Smiles quichreply" (and I got it worked great on my board). i don't know if it's necessary to addy this function again in the quickreply.

LPTV
03-27-2004, 03:56 PM
Sorry! But i have problem:
Fatal error: Call to undefined function: fetch_max_attachment_size() in /home/pvbcttc/public_html/forum/showthread.php on line 1530

Can you help me? :(

tnguy3n
03-27-2004, 06:08 PM
Sorry! But i have problem:
Fatal error: Call to undefined function: fetch_max_attachment_size() in /home/pvbcttc/public_html/forum/showthread.php on line 1530

Can you help me? :(

above:
$inimaxattach = fetch_max_attachment_size();

make sure you have this line
require_once('./includes/functions_file.php');

LPTV
03-28-2004, 05:25 AM
yes! i'm sure i have code:
require_once('./includes/functions_file.php');

Can you check for me now?

tnguy3n
03-28-2004, 06:23 AM
check your showthread.php file again . i don't think it prints out warning fetch_max_attachment_size() as an underfined function if you have includes/functions_file.php included. (fetch_max_attachment_size() is declared in includes/functions_file.php file ;))

(can you post link to your board so that i can check that error?)

LPTV
03-28-2004, 07:12 AM
i did step by step of you in instruction and i have seen a bug. Now i removed hack of you.

thAnkx!

alfaowner
03-29-2004, 09:41 PM
downloaded and installed into eack skins within 10 mins, very easy to do. Many thanks

alfaowner
03-30-2004, 03:53 PM
Hmmm, it appears my members cannot use it? looks as if its only working for admins!?

tnguy3n
03-30-2004, 04:03 PM
Hmmm, it appears my members cannot use it? looks as if its only working for admins!?

Do you have Upload Attachment enabled to Registered Group? Usergroup that has no Upload permission won't see this option in quickreply. :)

Enable Upload: Usergroup -> Usergroup Manager -> Can Upload Attachments.

alfaowner
03-30-2004, 04:40 PM
Hi mate, thanks for replying to offer help, well, i knew the answer already, but i checked this and "Upload Attachments" is Yes. Plus they are uploading on the board already.

So i created a fresh account to try it. (BTW - I can still see the button at all times)

HERE IS THE MESSAGE I RECIEVE WHEN I TRY TO UPLOAD AS A MEMBER
------------------------------------------------------------------------------------------

meatandtwoveg, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


Very weird! http://www.alfaowner.com/Forum/showthread.php?p=337700#post337700

tnguy3n
03-30-2004, 06:34 PM
that's odd cuz I tested on localhost & my board as normal users, and they both work fine.

( you can test it out on my board as well... http://all4actions.net )



**** edited ****

I figured out why.... cuz you set regular members not to upload nor download attachment in Announcement forum. It works fine for any other forums on your board. ^_^

alfaowner
03-30-2004, 08:43 PM
ok, cheers, whats the edited bit, you u swear at me ;)

enginethatcan't
04-13-2004, 12:49 AM
installed, thanks

Boofo
04-13-2004, 02:10 AM
One small change I made to the showthread.php change, replace require_once('./includes/functions_file.php');
$inimaxattach = fetch_max_attachment_size();with: require_once('./includes/functions_file.php');
$attachtypes = unserialize($datastore['attachmentcache']);
$inimaxattach = fetch_max_attachment_size();This will list the valid extentions instead of just displaying a blank space.

How would you add commas to separate the extentions?

welo
04-25-2004, 05:49 AM
Installed on 3.0.1. Went without a hitch ;).

SnowBot
07-06-2004, 03:42 AM
Any chance of update for 3.0.3 as most the instructions nolonger fit :(

Oblivion Knight
07-07-2004, 05:13 PM
Any chance of update for 3.0.3 as most the instructions nolonger fit :(Worked fine for me.. I have it running flawlessly on 3.0.3.

dubumb
07-17-2004, 11:55 PM
Installed! My forum's first mod... easier than i thought :P thanks a lot!

MrFaldyn
07-20-2004, 09:03 PM
Is anyone else having trouble getting it to show the attachments if there's more than one?

nevermind I fixed it :D

* MrFaldyn clicks install

SnowBot
07-20-2004, 10:49 PM
Worked fine for me.. I have it running flawlessly on 3.0.3.
Sorry my bad, wrong hack i was meaning to say that for the attachments in PM quickreply.

43v3rl0v3.yen
02-02-2005, 10:59 AM
i cant hack this mod, cuz i hacked mod only member can view theard, so when i hack this mod done, i cant attach file from quick reply, it's warning me cuz i havent permission, but i'm admin ?????????????
anybody help me

Dennis Olson
02-16-2005, 05:50 PM
I installed this hack, and get the "manage attachments" button (and associated popup window when I click the button). Everything appears to work normally, but when the post is made, the attachment is gone. (vB 3.0.3)

Anyone have any insight on this?

Thanks!

Reece D
03-01-2005, 09:36 AM
*installed*

kfiasche81
03-03-2005, 03:06 PM
Parse error: parse error, unexpected T_ELSE in /home/kfiasche/public_html/forum/newattachment.php on line 288

??????

kfiasche81
03-04-2005, 06:17 AM
this error on 3.0.7

Zachery
03-04-2005, 02:06 PM
Parse error: parse error, unexpected T_ELSE in /home/kfiasche/public_html/forum/newattachment.php on line 288

??????
Sounds like you did not hack your file properly.

Please know reporting the post will not get it fixed any faster.

tnguy3n
03-05-2005, 11:03 AM
@ 43v3rl0v3.yen: check Attachment option for your usergroup in that forum.

@ kfiasche81: you perhaps didn't hack your file properly like Zachery.
check,
##### FIND: ######

// ************************************************** *******************************
// build quick reply if appropriate
if ($SHOWQUICKREPLY)

ABOVE ADD:

bigbaldben
03-23-2005, 12:16 AM
Fantastic and simple to install! Many thanks. :)

MajidOnline
03-26-2005, 03:30 AM
I installed it on3.0.7 without any problem!

Winchester
03-26-2005, 09:24 PM
Did everything as in instructions, but dont have the button for attachments on quick reply :( can anyone help?

Winchester
03-26-2005, 10:54 PM
done it!

xtreme-mobile
03-27-2005, 06:00 PM
works great on 3.0.6 :)

turkforum
04-06-2005, 06:43 AM
me too 3.07 noproblem

ekopapers
04-09-2005, 05:34 AM
me too 3.07 noproblem
installed 3.0.7 worked perfectly thanks

trevelyn1015
04-16-2005, 02:59 PM
awesome. installed.

trevelyn1015
04-23-2005, 02:44 PM
for some reason my guys can't attach to it..

says that they have no permission, but their usergroup does allow attaching. it works fine for them in regular reply, but not quick reply...

xtreme-mobile
09-19-2005, 06:27 PM
installed on new forum @ http://www.talk-365.com :D

GoTTi
10-24-2005, 08:16 AM
this not released for 3.5.0 yet? whats goin on?

mfizzel
10-29-2005, 03:03 AM
pretty please can someone port this to 3.5?? I really want to keep this when I upgrade to 3.5 tommorrow - it's vital

Floris
12-18-2006, 05:21 AM
I'd love to have this ported and working on 3.6.4 ! :)

brvheart
12-25-2006, 01:58 AM
I'd love to have this ported and working on 3.6.4 ! :)

me to :)