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)
-   -   Attachments as files (https://vborg.vbsupport.ru/showthread.php?t=35193)

Scott MacVicar 06-08-2002 09:31 PM

Will update the code when i get back from my 2 week vacation. :)

Jawelin 06-09-2002 08:44 AM

Have nice holidays.... :D

AWS 06-16-2002 06:40 PM

Finally got arround to installing this.

DB size before 234Meg
DB size after 98Meg

Great hack. Did just what I was looking for.

Courage 06-18-2002 11:18 PM

I really nned this hack :@
I'm running vb 2.2.2 and I get this nasty error when I try to run the installer (on the first step)
Code:

Database error in vBulletin Control Panel 2.2.2:

Invalid SQL: ALTER TABLE `attachment` ADD `hash` VARCHAR(32) NOT NULL
mysql error: Lost connection to MySQL server during query

mysql error number: 2013

Date: Wednesday 19th of June 2002 03:08:30 AM
Script: http://www.softnews.ro/forum/forum/a....php?s=&step=3
Referer: http://www.softnews.ro/forum/admin/a...t_install.php?

I have a lot of hacks installed...
This is the problem ? :(

Please HELP !!!

eoc_Jason 06-23-2002 05:22 AM

Just a thought, you might want to have some "upgrade" instructions. I accidently clicked the remove one thinking I could convert back from files to DB, but instead it just wiped out my hashes (ACK!), maybe have a confirm on what is about to happen?

But anyhow, It would be helpful if you could do a "upgrade" choice which would just re-display the code that is needed but not do any other stuff. :)

Tigger9969 06-24-2002 10:40 PM

Here is my problem:

We're running vb2.2.6. We have no problem uploading files smaller than 2MB, other than it takes a REALLY long time.

We are not using safe mode.

When we try to upload a file larger, after a really long time the message is posted but the file attachement is not there.

Does anyone know why? Any help will be greatly appreciated.

Tigger9969

Boofo 07-04-2002 11:31 PM

The default value for PHP is 2 meg. You can change that limit size in the php.ini file on the server. You will probably have to talk to your ISP about that. :)

Quote:

Originally posted by Tigger9969
Here is my problem:

We're running vb2.2.6. We have no problem uploading files smaller than 2MB, other than it takes a REALLY long time.

We are not using safe mode.

When we try to upload a file larger, after a really long time the message is posted but the file attachement is not there.

Does anyone know why? Any help will be greatly appreciated.

Tigger9969


papoo 07-10-2002 06:52 PM

thanks i will try it

Darren Evans 07-21-2002 08:56 PM

If this is a dumb question... shoot me. ;)

Why do all the files that are exported from the database into the attachments folder have long names with .files as an extension? Is there any way to get them exported as their original file names? What did I overlook?

Thanks!

Boofo 07-21-2002 10:57 PM

You didn't overlook anything, the hack is supposed to do that. If you really want to export them as the original filename, just copy it over to wherever you want it copied and rename it to its original filename. :)

The naming convention is more for security reasons than anything else, I think.

Quote:

Originally posted by Darren Evans
If this is a dumb question... shoot me. ;)

Why do all the files that are exported from the database into the attachments folder have long names with .files as an extension? Is there any way to get them exported as their original file names? What did I overlook?

Thanks!


Renegade 07-22-2002 12:00 AM

After placing the installer in my /admin dir and run it from the browser, nothing happens and I get a blank screen in IE. If I place the installer in /forums then I get this error:

Fatal error: Call to undefined function: cpheader() in /home/pc-gurus/public_html/vbportal/forums/attachment_install.php on line 112\

Any ideas?

JJR512 07-22-2002 04:23 AM

I think another part of the reason for the filenames the way they are is that all the attachments are going into one directory, and if there were two attachments with the same filename, that'd be a problem.

Scott MacVicar 07-23-2002 11:24 AM

Renegade place the file in the admin directory.

Yeah Justin thats why that is implemented, attachments as files is already in v3 so I will need to create a script to change the naming conventions to match that of vB3.

memobug 07-26-2002 07:41 AM

I don't know a great deal about this hack, but I was wondering if it might be possible to use something like this as a basis for getting thumbnails into the forum.

If the threadid was included as a prefix in the attachment filename, and I created a cron job that would periodically create thumbnails, The forum could display some recently uploaded images, and a separate script could display them and link to the respective thread where they appear.

It would give you a visual preview of some recent uploads.

Also in lieu of the actual large attachment, the preview image could be displayed inline with the message.

Regards,

Matt

dreamhost 07-26-2002 10:29 AM

does this hack work with firefly's attachment viewer? I just installed that one, love it, but want to avoid conflicts.
thanks in advance

Oxygen 07-26-2002 05:54 PM

The hack works wonderfully, i just have an addtional question..


I am modifying my board to be AvantGo Friendly (PDA version)
I have it working properly, and just used the line:

http://www.yourboard.com/Forums/atta...p?s=&postid=##

to dermine if there is a attachment and display it.

While this works for the web, avantgo needs a actual JPG image.

I also see that the files are .FILE (encoded maybe, I am not sure)

is there a way to modify or actually display the image(.file) using its native name and a path?
(what it was uploaded with)


Regards,
Oxygen

Renegade 07-27-2002 09:15 PM

Very cool hack, This aleviates space and performance from the DB.

BillaBongUSA 07-27-2002 09:34 PM

Cool, so this works with vBulletin 2.2.6?

Deska 08-05-2002 10:33 AM

Quote:

Originally posted by BillaBongUSA
Cool, so this works with vBulletin 2.2.6?
I hope so...!

life is boost 08-05-2002 09:10 PM

hey guys im trying to install this hack on my test forums and when i edit the functions.php file i get this error on the site i try and try to reinstall but the same error.

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/300zxclu/public_html/test/forum/admin/functions.php on line 812

Fatal error: Call to undefined function: cachetemplates() in /home/300zxclu/public_html/test/forum/global.php on line 284


im on 2.2.6 :)

Maursheed 08-07-2002 04:55 AM

Great hack!!! It's working perfectly.

amykhar 08-07-2002 07:32 PM

I installed today, and everything seemed to go smoothly. However, I can view old attachments that used to be there before the hack, but new attachments are not showing up. I get broken images. I have tried with both new threads, and new replies. Same problem in both.

Using 2.2.6 and not getting any errors when I upload. I can also see that the attachment is uploading correctly to the attachment directory.

Amy

amykhar 08-07-2002 07:39 PM

OK. New clue. Once I drop the filedata column, no attachments show up.

Amy

amykhar 08-07-2002 08:01 PM

Never mind. Stupid user error. :D

Amy

ExAvIoUr 08-07-2002 09:28 PM

i get this

Warning: Unable to create 'home/thunder/public_html/gsu/att4chm3nt5/a17199ecde49d7c665962da50ee0de98.file': No such file or directory in /home/thunder/public_html/gsu/admin/functions.php on line 2403

Warning: Unable to move '/tmp/phpepNhQ9' to 'home/thunder/public_html/gsu/att4chm3nt5/a17199ecde49d7c665962da50ee0de98.file' in /home/thunder/public_html/gsu/admin/functions.php on line 2403

Warning: stat failed for home/thunder/public_html/gsu/att4chm3nt5/a17199ecde49d7c665962da50ee0de98.file (errno=2 - No such file or directory) in /home/thunder/public_html/gsu/admin/functions.php on line 2407

what does it mean?

Boofo 08-07-2002 11:25 PM

Check the path you have to the attachment directory. It can be tricky. I had the same problem when I first installed this and once I got the path right, everything was fine.

Quote:

Originally posted by ExAvIoUr
i get this

Warning: Unable to create 'home/thunder/public_html/gsu/att4chm3nt5/a17199ecde49d7c665962da50ee0de98.file': No such file or directory in /home/thunder/public_html/gsu/admin/functions.php on line 2403

Warning: Unable to move '/tmp/phpepNhQ9' to 'home/thunder/public_html/gsu/att4chm3nt5/a17199ecde49d7c665962da50ee0de98.file' in /home/thunder/public_html/gsu/admin/functions.php on line 2403

Warning: stat failed for home/thunder/public_html/gsu/att4chm3nt5/a17199ecde49d7c665962da50ee0de98.file (errno=2 - No such file or directory) in /home/thunder/public_html/gsu/admin/functions.php on line 2407

what does it mean?


Sadie Frost 08-07-2002 11:43 PM

Working perfectly on 2.2.6 : )

ExAvIoUr 08-08-2002 12:15 AM

Quote:

Originally posted by Boofo
Check the path you have to the attachment directory. It can be tricky. I had the same problem when I first installed this and once I got the path right, everything was fine.


i tried make the path work. but it never works. how exactly is the path suppose to look?

Deska 08-08-2002 03:45 AM

Quote:

Originally posted by ExAvIoUr


i tried make the path work. but it never works. how exactly is the path suppose to look?

What kind of CP in your hosting use?
Example in Ensim:

if you use command pwd, you got your path:

/home/yourname/mainwebsite_html/

that's not real path, the real path is:

/home/virtual/siteXX/var/www/html/

where siteXX is your site ID
I hope this would be help!

ExAvIoUr 08-08-2002 02:39 PM

well i am hosting on my friends server. i will have to talk to him.

JJR512 08-08-2002 03:00 PM

PPN, I have a question for you.

It's concerning vBulletin 3, and the features described in this thread: http://www.vbulletin.com/forum/showt...threadid=51821

John mentions that attachment images (.gif,.jpg.,etc) are no longer stored in the database. I'm assuming this means text files, .zips, and whatever other formats are allowed are still stored in the database. My personal opinion of this is that all formats should be stored outside the db. I can see that some formats, especially text files, might typically be so small that it doesn't make a big difference, but it seems like it would be unnecessarily complicated from a programming point of view to have two different attachment handling routines.

I don't know if you know the answer to this, but I'm curious to know if there will be an administrative way of controlling which attachment types get stored where. Some board admins may allow other file types that could be as large as, or larger, than image files, making them also be good candidates for storing outside the database.

But, PPN, what I'd really like to know from you, is when vBulletin 3 comes out, what's going to happen to those of us who have installed your hack? I know I've long ago gotten rid of the field in the attachments table that stored all the file data, and even if I still had a copy somewhere, there's plenty of new attachments since then that were never put into that field. Will you be able to adjust this hack pretty quickly to work with vB 3, so that those of us using your hack won't have to wait that long before we can start using vB 3 without losing attachments? Or can you make something to basically reverse your hack, something that will re-import all attachment files back as filedata into the database?

ExAvIoUr 08-08-2002 04:33 PM

nevermind i made it work. i forgot to replace something.

gj

Darren Evans 08-26-2002 05:33 AM

I manually deleted some files out of the attachments folder (per somone's suggestion) and now I have errors on thread pages. The links to the attachments still show up.

I take it I shouldn't have listened to the person who told me to delete the files. :paranoid:

Can someone help me fix this?

Tim Wheatley 09-01-2002 01:23 PM

Ok, I'm running 2.2.7, so I hope it works for this. ;)

I'm going through the install and it says:
Code:

admin/functions.php

Step 1 of 3 FIND:


function acceptupload($moderate=0) {

REPLACE from that point to the end of the function with

Well, because I'm stupid I don't know where the function ends. Is it just the one line I replace or all the way to above:

Code:

// ###################### Start getmodpermissions #######################

Boofo 09-01-2002 01:36 PM

Yes. :)

Tim Wheatley 09-01-2002 01:38 PM

Good, I commented the whole (what I thought was it anyway) function out just incase it didn't work. :)

Thanks.

Chris M 09-01-2002 02:25 PM

Great hack PPN...

I dont know why I never installed this before...

You have saved me from downloading 1.12 Mb whilst Backing up my vB Board!!!

My attachment table is now only 4.7Kb!:D

Satan

Darren Evans 09-01-2002 03:18 PM

<bump>

Can anyone help me with my question? ^^^^

Chris M 09-01-2002 05:36 PM

Sorry Darren...I dont know:(

I would like to know if you can delete the files, if there are no more attachments...

?

Hopefully I could avoid an error like Darren's...

Satan

Bison 09-08-2002 02:46 PM

I installed this hack and now I can't get images to show up in the threads after uploading them from the attachment window! :(


All times are GMT. The time now is 06:20 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.02304 seconds
  • Memory Usage 1,826KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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