Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 05-17-2003, 08:29 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why is it going into dwipfiles table? it should be put in the attachments table..

this is why ur getting probs as attachments.php isnt coded to remove file from any table, more the actual attachments table in the database..

well thats my hunch on looking at the code
Reply With Quote
  #12  
Old 05-17-2003, 08:30 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you cant understand that code as its not ascii format its the format that the file uses.. diff for jpeg giff etc
Reply With Quote
  #13  
Old 05-17-2003, 08:33 PM
mADmAX` mADmAX` is offline
 
Join Date: Dec 2001
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its going into another table for a reason that is very complicated to explain (short form, be used for something totally different). I have renamed attachment.php to attachments.php. I have also edited the code to what is above when I first posted. As you can see it looks in dwipfiles now.

Either way, it doesnt explain the issue because only images are the probs I am having.
Reply With Quote
  #14  
Old 05-17-2003, 08:38 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it could as if your calling these files back tru attachments.php then its set to be able to work with this table and there may be additional code for handling images , that isnt being parsed due to you using the data from a differemt table..

i say this as i know that there is all the stuff for showing images in threads etc.. tho im not sure if it in attachments.php..

but anyway if i am wrong then soz im stumped but the new table would maybe be it, as if attachments was able to take any data from anytable you might end up with some probs in theory..

anyway just an idea.. probs wrong lol
Reply With Quote
  #15  
Old 05-17-2003, 08:41 PM
mADmAX` mADmAX` is offline
 
Join Date: Dec 2001
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may be right, I have looked through any of the function calls and havent seen anything pointing there, but doesnt mean I haven't overlooked it. Just found it strange that ZIP and TXT files work fine, just images =\

Got me stumped bad ... lol
Reply With Quote
  #16  
Old 05-17-2003, 08:44 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its also worth knowing that vb`d attachments work by having an attachment on every post, its just wether or not theres anything in the table

found this out when making a gallery hack and kept getting lots of attachments with ids but no filedata or names etc

( i echod the id to make sure of this)
Reply With Quote
  #17  
Old 05-17-2003, 08:50 PM
mADmAX` mADmAX` is offline
 
Join Date: Dec 2001
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I took all the verifyid out and all the checks to ensure it wasnt it, calling it like this.

/attachments.php?filesid=33

I did something for the hell of it.

I uploaded through my script an attachment, then uploaded that same image through a post. So now both should hold the same filedata. The one shows up in a post. To see if it was getting corrupted in my upload script, I copied from dwipfiles (just that attachment filedata) over the one in attachment. Attachment still shows up fine and everything. So it appears its just the attachments.php file (my hacked one) to display images without the function call. I must be missing something =\
Reply With Quote
  #18  
Old 05-17-2003, 10:19 PM
mADmAX` mADmAX` is offline
 
Join Date: Dec 2001
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed it, for some reason I guess it dont like spaces to much and also needs an @ on a few...

Dunno why it only happened with images though /shrug

PHP Code:
$filesize=@filesize($getfile);
$filenum fopen($getfile,"rb");
$filestuff fread($filenum,$filesize);
fclose($filenum); 
Needed to be:

PHP Code:
$filesize=@filesize($filename);
$filenum=@fopen($getfile,"rb");
$filestuff=@fread($filenum,$filesize);
@
fclose($filenum); 
Reply With Quote
  #19  
Old 05-17-2003, 10:28 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the exact finished file then? And how do we use it from the Admin CP?
Reply With Quote
  #20  
Old 05-17-2003, 10:37 PM
mADmAX` mADmAX` is offline
 
Join Date: Dec 2001
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me work a few bugs out to where you can edit afterwards, etc. and I will zip it up for you...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04300 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete