vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   New Posting Features - Attachment In Quickreply (https://vborg.vbsupport.ru/showthread.php?t=62963)

tnguy3n 03-25-2004 10:00 PM

Attachment In Quickreply
 
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

Quote:

Originally Posted by Oblivion Knight
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
PHP Code:

    require_once('./includes/functions_file.php');
    
$inimaxattach fetch_max_attachment_size(); 

with:
PHP Code:

    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

Quote:

Originally Posted by tnguy3n
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:

Code:

<!--- showthread quickreply attachement --->
                        </tr>
                                <td>
                                $showthread_attachmentoption
                                </td>
                        </tr>
<!--- showthread quickreply attachement --->

Should be this:

Code:

<!--- 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

Quote:

Originally Posted by tnguy3n
*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

Quote:

Originally Posted by tnguy3n
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

Quote:

Originally Posted by gmarik
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:
PHP Code:

Fatal errorCall 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

Quote:

Originally Posted by LPTV
Sorry! But i have problem:
PHP Code:

Fatal errorCall to undefined function: fetch_max_attachment_size() in /home/pvbcttc/public_html/forum/showthread.php on line 1530 

Can you help me? :(

above:
Quote:

$inimaxattach = fetch_max_attachment_size();
make sure you have this line
Quote:

require_once('./includes/functions_file.php');

LPTV 03-28-2004 05:25 AM

yes! i'm sure i have code:
PHP 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

Quote:

Originally Posted by alfaowner
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/showt...700#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

Quote:

Originally Posted by PlenoJure
One small change I made to the showthread.php change, replace
PHP Code:

    require_once('./includes/functions_file.php');
    
$inimaxattach fetch_max_attachment_size(); 

with:
PHP Code:

    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

Quote:

Originally Posted by SnowBot
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

[high]* MrFaldyn clicks install[/high]

SnowBot 07-20-2004 10:49 PM

Quote:

Originally Posted by Oblivion Knight
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

Code:

Parse error: parse error, unexpected T_ELSE in /home/kfiasche/public_html/forum/newattachment.php on line 288
??????


All times are GMT. The time now is 07:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01400 seconds
  • Memory Usage 1,834KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (7)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete