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)
-   -   Attachment Database (https://vborg.vbsupport.ru/showthread.php?t=45831)

corsacrazy 11-25-2002 08:05 PM

Quote:

Originally posted by corsacrazy
wood there be a way to order the attactments by a value set in the attach.php file ie, order by filesize, number of times downloaded, or extension. ? ?

i would still like there to be an option to order the attactments by date or number of downloads etc , :cry: wood this b possible ? cheers

LanciaStratos 02-10-2003 04:08 PM

This just killed my dedicated server, unfortunately! Too bad, it had a lot of potential. :(

TLfuRy 02-12-2003 02:20 PM

I guess nothing ever got done as far as fixing the load issue. I just installed it, and it loaded a few times....30+ seconds processing time for each pageload. Now my server is down. :(

This is a great idea, and I think this functionality should be part of vB. It would be great to also have the ability to see if the thread still exists, and let you delete selected attachments. Viewing size would be great too.

Martin64 02-12-2003 06:38 PM

I tried this one as well, I had to shut down mysql because it was killing it. Perhaps it's selecting too many attachments? I have an attachment database of 400 MB so maybe that's what caused it, because when installing it locally it worked.

Good idea with the hack though. :)

kuska 02-26-2003 05:45 AM

Well im sure you had good intentions but i had to remowe this hack from my shared server and as ive been told all the people running this hack had to remove it.
I highly dont recommend installing this hack due to the server kill it creates. This is two emails i just recieved from my host http://www.f5hosting.com:

Quote:

David,

You are running a hack file in your public_html folder called attach.php. That is horribly written code, complete garbage. It's got three JOIN's in it!! It's a total server killer. It could choke a dedicated server, much less a shared server. Please remove it. We can't allow it. It locks up mySQL for more than a minute at a time and drives the server load up by a factor of 5 or more. I had to get several sites to remove it, as did many other hosts, when it first came out. Thank you.

Michael

And after i removed the file this is the second email i recieved:




Quote:

Thanks, David. It's not your fault. We all have to be careful what hacks we put on our vB's. Some of them are great, but a lot of them are really bad. This one may be the all time champion server killer, the piece of crap. Some kid wrote it, and didn't know what he was doing.

Michael
lol , not to be mean, i dont know nothing about writing hacks, but Michael totally burned you !!!! :)

Bison 02-26-2003 12:12 PM

No doubt ... the code is bad.

Better let someone revise this hack. It has great potential! :)

Tim Wheatley 03-29-2003 09:25 PM

*bump* :)

mtha 04-18-2003 06:41 AM

Cool hack

I would link thread to the post which has the attachment, using
showthread.php?s=$session[sessionhash]&postid=$att[postid]#post$att[postid]" , and open them in new window:


Quote:

Template name: attachmentbit
Template:

<tr align="center">
<td bgcolor="#F1F1F1"><normalfont><img src="https://vborg.vbsupport.ru/vbimages/attach/$extension.gif" width="16" height="16" border="0" alt=""></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont><a href="$link" target="_blank">$att[filename]</a></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$att[userid]" target="_blank">$att[username]</a></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$att[counter]</normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$date</normalfont></td>
<td bgcolor="#DFDFDF" align="left"><normalfont><a href="showthread.php?s=$session[sessionhash]&postid=$att[postid]#post$att[postid] " target="_blank">$att[title]</a></normalfont></td>
</tr>


for big forum with many attachments, the script takes too long :((

rake 04-18-2003 06:47 PM

Quote:

02-26-03 at 07:45 AM kuska said this in Post #45
Well im sure you had good intentions but i had to remowe this hack from my shared server and as ive been told all the people running this hack had to remove it.
I highly dont recommend installing this hack due to the server kill it creates. This is two emails i just recieved from my host http://www.f5hosting.com:

And after i removed the file this is the second email i recieved:

lol , not to be mean, i dont know nothing about writing hacks, but Michael totally burned you !!!! :)

Well, at least he's right about my age, but you don't measure the speed of a query by the number of joins. I mean, wow! It's got three joins in it, it must be bad. Oh well, i shouldn't complain. It was my fault.

Here's the fix:
Run the following query:
ALTER TABLE `post` ADD INDEX ( `attachmentid` )

and replace attach.php with the attached file. Be sure to TEST IT.

Kars10 04-18-2003 07:44 PM

Can someone please test it? I have only my liveboard @ the moment but i need this hack! :)

Thanks in advance
Kars

Jitway 04-18-2003 08:28 PM

Works great! :D version 2.2.9

Kars10 04-19-2003 12:59 PM

@ Rake, theres a Bug.

Search for:

Code:

".iif($privattach,'AND priv=0','')."
replace it with:

Code:

".iif($privattach,'AND private=0','')."
Kars :)

rake 04-19-2003 01:16 PM

Thank Kars. I'll update the file. :)

Kars10 04-19-2003 01:19 PM

N/P.
I thank you for this Great Hack!

Kars:)

M.C. 04-19-2003 02:57 PM

Hi! is it possible to sort by date, username, thread and etc. (not only by downloads)?

Thanx

rake 04-19-2003 07:43 PM

Yes. Replace the attachment template with the one attached, and the re-updated attach.php file a couple of posts above and you'll get that extra functionality.

M.C. 04-19-2003 08:18 PM

rake, thanx a million! ;)

TheComputerGuy 04-21-2003 12:40 PM

Does this work properly without killing the server yet?

Kars10 04-21-2003 12:43 PM

@ TheComputerGuy, yes it works like a charm. :)

Kars

bandersen 04-26-2003 11:04 AM

Nice hack!

I am looking for a hack that will show only a certain type of files in the database (not the .jpg's). Can I use this hack then - and which one of the other hacks below do you recommend I use?


Quote:

11-17-02 at 10:50 PM !!! said this in Post #7
Private attachment? Attachment viewer?

rake 04-26-2003 07:49 PM

what do you want to restrict them to? it could easily be done.

bandersen 04-27-2003 02:53 PM

what if I wanted to restrict the database to show only .zip files....

rake 04-27-2003 03:02 PM

Under
===============
$extension = substr(strrchr($att[filename],"."),1);
Add
===============
if($extension!="zip") {
continue;
}

sajjid 05-12-2003 11:20 PM

i know this might be a newbie question but it will help me a lot i need the following info
i run forums with a host and have 10 Gig Transfer and 1 Gig space i also have access to mysql and space with my isp i like to link my images and attachments on that server to save bandwith i would be graet full if anyone can direct me in the right direction
many thanks in Advance

TLfuRy 05-15-2003 02:52 PM

Great job rake. With that added index it works great! I would love to have it show file size on the view page, but other than that it's great! :D

goyo 05-17-2003 03:14 AM

Quote:

04-21-03 at 02:40 PM TheComputerGuy said this in Post #58
Does this work properly without killing the server yet?
Nope it's kills my dedicated server.
I'm using only the updated files.
It took more than a minute to load the page


By the way my attachment database size is 2.6 GB...

Maybe attach.php don't like that fact ?

agfisdn 05-19-2003 09:37 AM

any news on this great hack?

it still has problems on my mysql server... load's too high ! :(

Attachment Usage: 210.04 MB

rake 05-19-2003 04:02 PM

Are you sure you ran the queries? The index is vital and drastically reduces load.

goyo 05-19-2003 08:30 PM

Quote:

Today at 06:02 PM rake said this in Post #68
Are you sure you ran the queries? The index is vital and drastically reduces load.
Yes I run them. In case you need it I can give you access to my server, but I think it's because the 2,6 GB attachment table...

Alien 05-30-2003 07:01 PM

So if you have a large attachment amount, this will still bring everything to a crawl? :)

Oblivion Knight 05-30-2003 07:51 PM

I love the concept of the hack, but I had no idea where to place a link to it..
It's an awkward thing to place since it's only really an archive and doesn't add any kind of functionality to the forums..

I placed it below my $logincode in the welcome panel for now.. ;)

Excellent work though!


[Edit]
There still seems to be an issue with the amount of MySQL load this requires.
I'm using the latest file and ran the query, but I came to the server this morning and it was running at snails pace. Also on the Microstats, the MySQL % had shot up from around an average of 50% to a whopping 95%+. Upon removal, both the speed and MySQL load statistic returned back to normal.

Anyone wanting to remove the query can use this:
ALTER TABLE `post` DROP INDEX ( `attachmentid` )

tkeil69575 07-14-2003 07:54 AM

hi rake,
nice hack. :)

however, there seems to be a small problem with the page link. if you klick on "last page" you come to e.g. page 55. the listing is blank. the previous 5 or 6 page also. any ideas?

tina

Steve123 07-31-2003 10:27 PM

Ive followed all the instructions..

It makes me server load jump to 100%...

gota have to uninstall.. o well it looked good :S

Steve123 07-31-2003 10:34 PM

ALTER TABLE `post` DROP INDEX ( `attachmentid` )

ERROR 1064: You have an error in your SQL syntax near '( `attachmentid` )' at line 1


;)

Oblivion Knight 08-01-2003 06:34 AM

Quote:

Today at 12:34 AM Steve123 said this in Post #74
ALTER TABLE `post` DROP INDEX ( `attachmentid` )

ERROR 1064: You have an error in your SQL syntax near '( `attachmentid` )' at line 1


;)

There's nothing wrong with the syntax.. All it's doing is reversing the original query that was run.

Did the original query run successfully?
ALTER TABLE `post` ADD INDEX ( `attachmentid` )

gmarik 08-02-2003 12:04 PM

It's good to see it working now.

Johnny 02-07-2004 01:37 PM

can someone tell me how I can limit this so it displays attatcments from certain forums instead of all of them

350Chevy 03-22-2004 05:11 PM

Any updates on this that wont crash my server and have the options to manage the attachments (ie. delete...prun)?


All times are GMT. The time now is 09:30 PM.

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.01352 seconds
  • Memory Usage 1,819KB
  • 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
  • (2)bbcode_code_printable
  • (9)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
  • (38)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