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)
-   -   Optimized attachments in vB2.X.X (https://vborg.vbsupport.ru/showthread.php?t=49306)

Boofo 02-27-2003 05:46 AM

The extra bracket needs to be there because you have 2 of the other ones before it.

Aaron1 02-27-2003 06:00 AM

Hmm, you're right that sounds logical Boofo!
But strangely enough; without it, i am not having parse errors anymore.

Although adding attachements with the post don't work anymore.
Argh :)

Boofo 02-27-2003 06:09 AM

You do have an } after the very last return $attachmentid; right? I would say check your code again. You might have missed something in the update. ;)

Aaron1 02-27-2003 06:23 AM

Damn, I couldn't find what i did wrong!
I changed it back to the old version hack, because that worked.
Well i guess it did :(

Boofo 02-27-2003 06:36 AM

After you last message, I tested mine to make sure it works. It works fine here, although I did notice something with it. If you have 2 messages with the same attachment in it, once you delete one of the messages, the other message no longer has an attachment hooked to it.

pogo 02-27-2003 08:14 AM

I hope this is the last bug ;)
Scott will update the hackfile when he is online but you can do this:

In admin/functions.php find
PHP Code:

AND threadid<>'$postinfo[threadid]' 

in function deletepost().

Delete it or copy it in a comment line.

Then open editpost.php and find
PHP Code:

      $DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
      
updatethreadcount($threadinfo[threadid]); 

replace it with
PHP Code:

      $otherattachs=$DB_site->query("SELECT attachmentid FROM post WHERE attachmentid=$postinfo[attachmentid]");
        if (
$DB_site->num_rows($otherattachs)==1) {
          
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
        
updatethreadcount($threadinfo[threadid]);
        } 

If you find other inconsistencies, please tell me.

Boofo 02-27-2003 08:25 AM

Thanks for the fix. I will test it out. Also, can you please put the English version in the first post after Scott updates it? The German version is there now. ;)

Edit: Works like a charm. Thanks!

TranceMaster 02-27-2003 01:37 PM

seem to be having a new problem
god i suck at doing this :(
sorry guys
anyway hope u can help
what it is now is, the site is running fine, speed is ok, queries ran ok(i think) but when i try 2 attach something my message appers
but no attachment appears and no error message
any ideas?

TranceMaster 02-27-2003 02:07 PM

ok nevermind
i finally got it all sorted
thanks again guys
appreciate ur help

Boofo 02-27-2003 02:10 PM

What was causing your problem? Just curious. ;)

s.molinari 02-27-2003 06:17 PM

Hi,

Newest version is up. This time in english.;)

Scott

TranceMaster 02-28-2003 01:23 PM

Quote:

Originally posted by Boofo
What was causing your problem? Just curious. ;)
there seemed to be duplicate hash indexes in the database.
so i just removed them
and everything seemed to work.

TheComputerGuy 03-04-2003 09:07 PM

great hack.. will install tonight.

gmarik 01-31-2004 05:36 PM

I hope it works from 2.3 -> 3.0 RC2


All times are GMT. The time now is 04:16 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.01195 seconds
  • Memory Usage 1,752KB
  • 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_php_printable
  • (1)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
  • (14)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