vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Limit Attachments Per Time (https://vborg.vbsupport.ru/showthread.php?t=36044)

Admin 06-09-2002 07:34 AM

Ok, it tells you to find this, right?
Code:

    // sort attachement
    if ($permissions[canpostattachment] and trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") {

Disregard the first line (the // comment), and just look for the second line.

Boofo 06-09-2002 07:42 AM

This is why I couldn't find it. I had to narrow the search down to just canpostattachment. :) Usually any code you say to look for is right on target for me. I must have installed some hack somewhere that changed something. :)

Sorry I bothered you with it. I feel kindof stupid now. :)

Code:

if ($permissions['canpostattachment'] and trim($attachment) != 'none' and trim($attachment) != '' and trim($attachment_name) != '') {
Quote:

Originally posted by FireFly
Ok, it tells you to find this, right?
Code:

    // sort attachement
    if ($permissions[canpostattachment] and trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") {

Disregard the first line (the // comment), and just look for the second line.


Boofo 06-09-2002 07:52 AM

Here's the code I found it in in newreply. There are actually 2 places here that have that code. I should replace the first one?

Code:

case 'new':
                                if ($permissions['canpostattachment'] and trim($attachment) != 'none' and trim($attachment) != '' and trim($attachment_name) != '') {
                                        $attachmentid = acceptupload(1);
                                        $DB_site->query("
        DELETE FROM attachment
        WHERE attachmentid = $oldattachid
                                        ");
                                        $postinfo = $DB_site->query_first("
        SELECT attachmentid, filename FROM attachment
        WHERE attachmentid = $attachmentid
                                        ");
                                }
                                break;
                        default:
                                $attachmentid = $oldattachid;
                }
        } elseif ($permissions['canpostattachment'] and trim($attachment) != 'none' and trim($attachment) != '' and trim($attachment_name) != '') {
                $attachmentid = acceptupload(1);
                $oldattachid = true;
                $postinfo = $DB_site->query_first('
                        SELECT attachmentid, filename FROM attachment
                        WHERE attachmentid = '.intval($attachmentid).' AND visible = 0
                ');


Admin 06-09-2002 07:53 AM

Ahh, you installed another hack that changes that part (my Save Attachments on Preview). Sorry.

Boofo 06-09-2002 07:57 AM

Guess I should have installed this one first huh? :) Was I right, only the first part under case new gets changed? Thanks for helping me figure it out though. I was starting to think I was losing the ability to install hacks. :)

Quote:

Originally posted by FireFly
Ahh, you installed another hack that changes that part (my Save Attachments on Preview). Sorry.

Admin 06-09-2002 08:02 AM

I think you only need to update the 'new' case, but I'm not sure.

Boofo 06-09-2002 08:13 AM

Well, the board didn't blow up or lock me out, so I think we did it. :) The options are there in the Admin settings so I guess that means it is working? Thanks, Chen, for all of your help on this one. :)

BTW: PM on the way.

Quote:

Originally posted by FireFly
I think you only need to update the 'new' case, but I'm not sure.

blazin 12-22-2003 02:08 AM

i have had this hack installed for quite some time, but ecently it has taken the forum very long to post a new thread or submit a reply.

I found out the slowness was due to this hack, particulary this line of code:

$attachcount = $DB_site->query_first('SELECT COUNT(*) AS total FROM attachment WHERE userid='.$bbuserinfo['userid'].' AND dateline>('.time().'-3600*'.$limitattachtime.')');

My attachment table is about 370MB with 7,700 records. When I make a simple query to this table in phpmyadmin, its very slow to respond also.

The rest of the site is extremely fast, any suggestions?

blazin 04-10-2004 04:06 AM

any ideas on the above? anyone?

pimpfelix 02-08-2007 03:00 PM

Is this hack available for 3.6?


All times are GMT. The time now is 01:46 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.01594 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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