vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Upload Form problem (https://vborg.vbsupport.ru/showthread.php?t=249540)

Twilkey 08-29-2010 02:35 PM

Upload Form problem
 
I am adding the ability to upload an image to a product. I have looked around in the vB files and I am using some code I found, but it doesnt want to work.

This part works fine.
PHP Code:

print_upload_row($vbphrase['filename'], 'upload'); 

This is the code I am not fully sure about.
PHP Code:

    $vbulletin->input->clean_array_gpc('f', array(
        
'upload'  => TYPE_FILE,
    ));

    
$imagespath "images/shop";    

    
$upload = new vB_Upload_Image($vbulletin);
    
$upload->image =& vB_Image::fetch_library($vbulletin);
    
$upload->path $imagespath;

    
$imgurl $vbulletin->options['bburl'] . $imagespath $vbulletin->GPC['upload']['name'] . ".jpg"

Then I have it set to add $imgurl to my database which works fine except the file name isn't there. That and I am not sure if I am missing any code cause the file doesnt actually get put into the folder. This code is in an admincp file, but the images should be save to the shop folder within the default vB images folder, so.

When I use this, it is just blank.
PHP Code:

$vbulletin->GPC['upload']['name'

Also, I do not get any errors with this code. The entry gets added to the database just fine, just not all the info is there.

--------------- Added [DATE]1283173031[/DATE] at [TIME]1283173031[/TIME] ---------------

No help at all?

Twilkey 08-31-2010 03:00 PM

48 views and no one can help?


All times are GMT. The time now is 04:58 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.00957 seconds
  • Memory Usage 1,718KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete