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)
-   -   [RELEASE vb2.0+] vB Photo Upload (https://vborg.vbsupport.ru/showthread.php?t=27475)

webhost 09-25-2001 05:49 PM

mind uploades gif files, you need to make a change in the upload.php file I believe

PHP Code:

/* File Type Restrictions Variables                                */
/*-----------------------------------------------------------------*/
$max_height "200";         /* Max Image Height                   */
$max_width "200";          /* Max Image Width                    */
$Size_Restrictions "2000000";       /* image size limit in bytes */
$Width_Restrictions "200";          /* your width limit          */
$Height_Restrictions "200";         /* your height limit         */
/*-----------------------------------------------------------------*/
/* If you want to have it chosen where you can enable users to be  */
/* able to upload gif formated pictures to... then use this next   */
/* line that is commented out, instead of the other one.           */
$Type_Restrictions "jpg,gif,jpeg";    /* your upload file types    */
/* $Type_Restrictions = "";           /* your upload file types    */
//*---------------------------------------------------------------*//
/* This is where you fill in your server information so that it    */
/* knows where and what to connect to.                             */
//*---------------------------------------------------------------*// 

PHP Code:

    $error_msg .= "<font color=\"$errortext\" face=\"$font\" size=\"$smallerfontsize\">You Did Not Specify a ""Photo to Upload! Please Re-Submit!!</font>";
       }
       
/* again if you are giving the users the ability to upload gif formated pictures use the commented out line */
    /* else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg") && ($picture_type != "image/gif")) */
    
else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg"))
    {
        
$error_msg .= "<font color=\"$errortext\" face=\"$font\" size=\"$smallerfontsize\">Your file is not a $Type_Restrictions type, please only try to upload: $Type_Restrictions formated images.</font></font></td></tr></table></td></tr></table>";
    }
    else if ( 
$picture_size $Size_Restrictions 


BradC 09-27-2001 03:27 PM

Here in a week or so.. I might start on version 2.0 of this, where it will be more closely intergrated into vb... and hopefully stop and fix all the little problems in my first release version.

I will try to make it where, if you are still running the first version... the changes for the new one can be easily updated or changed to be the new version :)

and I might make it where you can have up to 2 or 3.. uploads .. but that is just a thought, not for sure.. really.

maverick1236 09-27-2001 10:41 PM

your not gonna believe this!!......

I just Installed the "store custom avatars as files" hack-and its working perfect!!!

It uploads the avatar to the server and renames it according to UserID!!!

Not a single problem!!!

My paths are correct-ive confirmed that numerous ways-and the DB IS updating!!-But with your hack the files wont upload!!??

what do u think of this?

tx :)

BradC 09-27-2001 11:55 PM

I already knew about this... but I can't explain it... because I am a complete moron :p

Besides installing it myself on your server, I have no way of knowing why it won't.. I mean the way it seems.. it should work just fine with the amount of help that has been given to ya.. so I dunno.

rez 09-29-2001 10:50 AM

In the getinfo you made a mistake.

PHP Code:

    <td bgcolor="#DFDFDF"><normalfont></normalfont><b>$userinfo[username]'s
      Photo</b></td>
    <td bgcolor="#DFDFDF"><normalfont>$picture_name<br><br>$userinfo[photodesc]</normalfont></td>
</tr>
<tr> 

It should be:

PHP Code:

    <td bgcolor="#DFDFDF"><normalfont><b>$userinfo[username]'s
      Photo</b></normalfont></td>
    <td bgcolor="#DFDFDF"><normalfont>$picture_name<br><br>$userinfo[photodesc]</normalfont></td>
</tr>
<tr> 

Im not sure if this has been mentioned already but anyway..

SirSteve 10-01-2001 01:44 AM

When viewing Who's online and a visitor is on the upload.php page, it displays "Unknown Location", to fix this:

Look in online.php:

Around the 200 lines mark your see lots of "case" statements

You need to add this:

PHP:
--------------------------------------------------------------------------------
case 'upload':
$userinfo[where] = "Viewing the <a href='upload.php?s=$session[sessionhash]'>Photo Upload</a>";
break;
--------------------------------------------------------------------------------

Also around the 500 lines mark you see more "case" statements

You need to add this:

PHP:
--------------------------------------------------------------------------------
case 'upload.php':
$userinfo[activity] = 'upload';
break;
--------------------------------------------------------------------------------

Now, can someone tell me how to pull in the photo when viewing your "Edit Options" page via User CP?

I also would like to add the vB header and footer to my upload.php page, anyone done this yet?

VirtueTech 10-01-2001 02:00 AM

Version 2.0 should use ImageMagick to resize the photo into a thumbnail. That would rule.

Nice hack. :)

BradC 10-01-2001 02:47 PM

Quote:

Originally posted by VirtueTech
Version 2.0 should use ImageMagick to resize the photo into a thumbnail. That would rule.

Nice hack. :)

Not a bad idea, but most likely I will not be adding it .. in my release.. reason being that some people if not a lot of people may not have the access to imagemagik.. so it would do them no good.. and then there is.. what would the thumbnail be used for? Cause I have other methods I use.. to make thumbnails..

as for the header and fooder SirSteve... I will most likely make it more intergrated into the user control panel.. so that part might be taken care of easily :)

topgun 10-10-2001 03:19 AM

It can run on win2000?

BradC 10-10-2001 04:52 AM

I am not actually for sure, I think it does for a lot of people certain people have messed up servers, so it will not work... and lucky anything else does..

But I only test my stuff on linux right now till I setup another win2k server to play with at my house :)


All times are GMT. The time now is 03:24 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.01207 seconds
  • Memory Usage 1,763KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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