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)

rake 11-16-2002 10:00 PM

Attachment Database
 
It's self-explanatory and easy to install. You can view a demo here: http://forums.ffdiscovery.com/attach.php


Instalation
===========

Installation is extremely easy. First open the attach.php file and check the configuration. It's designed to work with the private attachments hack and the attachment viewer. After checking the config, upload the file to your forums directory, create a new template called attachment with the contents of the attachment.txt file and a new template called attachmentbit with the contents of the attachmentbit.txt file. That's it.

Feedback is always appreciated. You can get assistance, if needed, either through an e-mail or through my forums.

SpeedStreet 11-17-2002 06:19 PM

Nice Idea!

Is it possible to grant moderators and admins delete privileges? This would be a great addon for managing the amount of attachments you currently have!

EDIT: Listing of file size would be pretty groovy too... :)

KelteN 11-17-2002 06:21 PM

Quote:

Originally posted by SpeedStreet
Nice Idea!

Is it possible to grant moderators and admins delete privileges? This would be a great addon for managing the amount of attachments you currently have!

EDIT: Listing of file size would be pretty groovy too... :)

Nice ideas :D It would be nice to see them added into this hack ;)

corsacrazy 11-17-2002 06:37 PM

kool ive been lookin for something like this , cheers ... i have the hack thing "attactments : 112" and i was lookin 2 put a link on that to goto all the attatchment and this hack wood b perfect thanks alot.

corsacrazy 11-17-2002 06:46 PM

damn im getting this error
Quote:

Database error in vBulletin 2.2.8:

Invalid SQL: SELECT attachment.attachmentid,attachment.userid,attachme nt.dateline,attachment.filename,attachment.visible ,attachment.private,attachment.counter,post.postid ,post.threadid,thread.title,user.username FROM attachment LEFT JOIN post on attachment.attachmentid=post.attachmentid LEFT JOIN thread USING(threadid) LEFT JOIN user on attachment.userid=user.userid WHERE attachment.visible=1 AND post.attachmentid<>0 LIMIT 0,15
mysql error: Unknown column 'attachment.private' in 'field list'

mysql error number: 1054

this is how i have set up the attatc.php file

PHP Code:

//===================== config ===============
$privattach 0// set this to 1 if you have the private attachments hack installed. 0 if not.
$ppg 15// atttachments to show per page
$maxppg 100// maximum attachments per page
$attachviewer 1//set this to 1 if you've got the attachment viewer installed. 0 if not.
//============================================ 

please can you help me out ? thanks

Ninth Dimension 11-17-2002 06:47 PM

I'm using the attachments as files hack, is this compatabul with it?

!!! 11-17-2002 06:50 PM

Quote:

Originally posted by rake
It's self-explanatory and easy to install. You can view a demo here: http://forums.ffdiscovery.com/attach.php


Instalation
===========

Installation is extremely easy. First open the attach.php file and check the configuration. It's designed to work with the private attachments hack and the attachment viewer. After checking the config, upload the file to your forums directory, create a new template called attachment with the contents of the attachment.txt file and a new template called attachmentbit with the contents of the attachmentbit.txt file. That's it.

Feedback is always appreciated. You can get assistance, if needed, either through an e-mail or through my forums.

Private attachment? Attachment viewer?

corsacrazy 11-17-2002 06:52 PM

they are other hacks

Private attachment : allows u 2 attactch files in a pm
Attachment viewer: shows the attachment within a page looking like your forum, ie includes the header/footer and shows who posted the attactment

rake 11-17-2002 06:58 PM

Quote:

Originally posted by corsacrazy
damn im getting this error



this is how i have set up the attatc.php file

PHP Code:

//===================== config ===============
$privattach 0// set this to 1 if you have the private attachments hack installed. 0 if not.
$ppg 15// atttachments to show per page
$maxppg 100// maximum attachments per page
$attachviewer 1//set this to 1 if you've got the attachment viewer installed. 0 if not.
//============================================ 

please can you help me out ? thanks


sorry about that. re-download the file

corsacrazy 11-17-2002 07:03 PM

same error :(

rake 11-17-2002 07:16 PM

check for this line:

$getattach = $DB_site->query("SELECT attachment.attachmentid,attachment.userid,attachme nt.dateline,attachment.filenam e,attachment.visible ".iif($privattach,',attachment.private','').",atta chment.counter,post.postid,pos t.threadid,thread.title,user.username FROM attachment LEFT JOIN post on attachment.attachmentid=post.attachmentid LEFT JOIN thread USING(threadid) LEFT JOIN user on attachment.userid=user.userid WHERE attachment.visible=1 AND post.attachmentid<>0 ".iif($privattach,'AND private=0','')." LIMIT $min,$perpage");

corsacrazy 11-17-2002 07:17 PM

mine says

$getattach = $DB_site->query("SELECT attachment.attachmentid,attachment.userid,attachme nt.dateline,attachment.filenam e,attachment.visible,attachment.private,attachment .counter,post.postid,post.thre adid,thread.title,user.username FROM attachment LEFT JOIN post on attachment.attachmentid=post.attachmentid LEFT JOIN thread USING(threadid) LEFT JOIN user on attachment.userid=user.userid WHERE attachment.visible=1 AND post.attachmentid<>0 ".iif($privattach,'AND private=0','')." LIMIT $min,$perpage");

rake 11-17-2002 07:19 PM

replace it with the one i posted above and it will work.

corsacrazy 11-17-2002 07:19 PM

i replaced my code with the one you said and its working now , thanks alot ;)

Velocd 11-17-2002 07:31 PM

Very nice, this is one I will be sure to install, but an even more efficient attachment database is one that categorizes the attachments by the forum they are in. I'll consider revising it with this improvement if you don't want to yourself, and then posting it.

[high]* Velocd clicks install ;)[/high]

Dean C 11-17-2002 07:32 PM

Thats pretty damn cool...

- miSt

corsacrazy 11-17-2002 07:55 PM

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. ? ?

Dark_Wizard 11-17-2002 11:59 PM

Does this work with the "Attachments as Files" hack? Otherwise I would have to rewrite it and don't have the time to do it...

dev 11-18-2002 06:28 AM

Very cool Hack, great! thx

Bison 11-18-2002 10:36 AM

Quote:

Originally posted by Velocd
Very nice, this is one I will be sure to install, but an even more efficient attachment database is one that categorizes the attachments by the forum they are in. I'll consider revising it with this improvement if you don't want to yourself, and then posting it.

* Velocd clicks install ;)

I await your modifications! :)

rake 11-18-2002 12:15 PM

Quote:

Originally posted by Dark_Wizard
Does this work with the "Attachments as Files" hack? Otherwise I would have to rewrite it and don't have the time to do it...
I don't know if that hack modifies the announcement table or not. I'll have to look into it and create a compatible version, but my time is limited. I have a whole lot of exams this week. :nervous:

Larry@IOG 11-19-2002 12:17 AM

Database error in vBulletin 2.2.8:

Invalid SQL: SELECT COUNT(*) FROM attachment WHERE visible=1 AND private=0
mysql error: Unknown column 'private' in 'where clause'

mysql error number: 1054

Date: Monday 18th of November 2002 08:08:53 PM
Script: http://www.impulseownersgroup.com/vb/vb/attach.php
Referer:


Is what I am getting

Larry

SWFans.net 11-19-2002 04:15 AM

I'm not sure why, but I installed this hack to test it out, and as I tried to load attach.php my server load on a semi dedicated server wen't through the roof and stalled MySQL on my forums. I think something needs some optimization maybe.

FWC 11-19-2002 06:50 AM

Quote:

Originally posted by SWFans.net
I'm not sure why, but I installed this hack to test it out, and as I tried to load attach.php my server load on a semi dedicated server wen't through the roof and stalled MySQL on my forums. I think something needs some optimization maybe.
I saw it driving the loads through the roof on two servers today. It locks multiple queries in the mysql server for huge amounts of time. I restarted mysql on both of them to get them back to normal.

lalo landa 11-19-2002 06:56 AM

Quote:

Originally posted by Larry@IOG
Database error in vBulletin 2.2.8:

Invalid SQL: SELECT COUNT(*) FROM attachment WHERE visible=1 AND private=0
mysql error: Unknown column 'private' in 'where clause'

mysql error number: 1054

Date: Monday 18th of November 2002 08:08:53 PM
Script: http://www.impulseownersgroup.com/vb/vb/attach.php
Referer:


Is what I am getting

Larry

The same to me.. :(
I need the another two hacks to make work this one?

I set to 0 the options, and use all te posibble combinations.. but don't work

Help please .. this hack looks SO Cool!

rake 11-19-2002 01:47 PM

Quote:

Originally posted by Larry@IOG
Database error in vBulletin 2.2.8:

Invalid SQL: SELECT COUNT(*) FROM attachment WHERE visible=1 AND private=0
mysql error: Unknown column 'private' in 'where clause'

mysql error number: 1054

Date: Monday 18th of November 2002 08:08:53 PM
Script: http://www.impulseownersgroup.com/vb/vb/attach.php
Referer:


Is what I am getting

Larry

the answer is on the first page. A query needs to be replaced.
And FWC, would you mind running the script with explain=1 and posting the results? It might help finding the cause.

thenetbox 11-19-2002 03:13 PM

Hello..

I added the templates but as soon as I did that it got very very very slow...

Weird...

thenetbox 11-19-2002 03:16 PM

ok.. I removed the templates and everything became very fast again..

does VB have a template limit or something?

afterlab 11-19-2002 08:55 PM

You showed me this hack earlier, and I was amazed. Now, when releasing it, it will soon become a part of my own community. Thanks for the contribution.

joeboo 11-21-2002 09:57 PM

i love it rake, but, for some reason, it makes the whole damn server run so slow, especially that page O_o

Mike11212 11-22-2002 06:49 PM

beware if installing this hack
it works fine but causes your database to overload mines simply shutdown because of this and the server had to be restarted

!!! 11-22-2002 07:10 PM

Quote:

Originally posted by Mike11212
beware if installing this hack
it works fine but causes your database to overload mines simply shutdown because of this and the server had to be restarted

Interesting...why would this hack do that?

SWFans.net 11-22-2002 07:43 PM

Quote:

Originally posted by SWFans.net
I'm not sure why, but I installed this hack to test it out, and as I tried to load attach.php my server load on a semi dedicated server wen't through the roof and stalled MySQL on my forums. I think something needs some optimization maybe.
Quote:

Originally posted by FWC
I saw it driving the loads through the roof on two servers today. It locks multiple queries in the mysql server for huge amounts of time. I restarted mysql on both of them to get them back to normal.
Quote:

Originally posted by thenetbox
Hello..

I added the templates but as soon as I did that it got very very very slow...

Weird...

Quote:

Originally posted by Mike11212
beware if installing this hack
it works fine but causes your database to overload mines simply shutdown because of this and the server had to be restarted

Don't know why, but I'm not alone in seeing it do that.

Mike11212 11-22-2002 11:29 PM

the server im on is dedicated p3 1ghz 1gb of ram
and when i executed attach.php
it worked but took about 3 minutes to load
hit the arrow for the next page and it wouldnt load server went down

LOD-squa 11-23-2002 02:37 AM

It loads fine for me o-O

lalo landa 11-23-2002 06:24 AM

Quote:

Originally posted by rake
check for this line:

$getattach = $DB_site->query("SELECT attachment.attachmentid,attachment.userid,attachme nt.dateline,attachment.filename,attachment.visible ".iif($privattach,',attachment.private','').",atta chment.counter,post.postid,post.threadid,thread.ti tle,user.username FROM attachment LEFT JOIN post on attachment.attachmentid=post.attachmentid LEFT JOIN thread USING(threadid) LEFT JOIN user on attachment.userid=user.userid WHERE attachment.visible=1 AND post.attachmentid<>0 ".iif($privattach,'AND private=0','')." LIMIT $min,$perpage");


Please update the attached file... (still wrong)

rake 11-23-2002 08:39 AM

i've identified the problem. I'll release a patch soon. Sorry for the trouble everyone.

shovel 11-25-2002 12:36 PM

Great job Alex. It's great how you can both wow myself aswell as Eric. Lol.

- Anthony AKA CS

Erwin 11-25-2002 08:01 PM

!!!,


You are appearing as unlicensed.

To download hacks you will need to go to this page and enter your email address, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.

Erwin 11-25-2002 08:03 PM

rake,

You are appearing as unlicensed. Get your admin to do the following:

To download hacks you will need to go to this page and enter your email address, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.


All times are GMT. The time now is 05:33 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.01443 seconds
  • Memory Usage 1,838KB
  • 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_php_printable
  • (15)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