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)
-   -   Upload Hack (https://vborg.vbsupport.ru/showthread.php?t=37233)

Slynderdale 04-09-2002 10:00 PM

Upload Hack
 
Im a newbie at php, and this is my first hack, its a uploader i made that uses your vbulletin forum's accounts and pass to upload files into there private folder, it also lets people view what files they uploaded, it also logs when, who, what file was uploaded and the size of the forum to a text file. When some one uplaods it creates a sub folder thats the same as there username and a blank index.html file so no one can browse through there stuff and then uploads the image into there personal sub folder, you can also edit authvb to only alow certain usergroups to upload.

How to setup:
Open config.php and change the settings to how you want them
upload config.php,upload.php and authvb.php
chmod the folder where the log file will go and where the account sub folders will be places so there read and write, probily 0777

Thats it, now go to upload.php and use your vbulletin account and pass and upload a file

Coming soon:
Delete feature
File count limit

Slynderdale 04-09-2002 11:15 PM

Screen Shot:
Heres the Main Screen

Slynderdale 04-09-2002 11:16 PM

Heres after you upload a file:

Slynderdale 04-09-2002 11:16 PM

Heres the view menu screen:

Slynderdale 04-09-2002 11:19 PM

Heres how the log looks:

Dade 04-09-2002 11:39 PM

So this is like having a private folder full of your own pictures? Pretty cool.

Slynderdale 04-09-2002 11:42 PM

yea, you can also set what file types are allowed to be uploaded too, so if you want you could allow .html and let your memmbers create mini web pages, you can set what file types are allowed to be uploaded and the size and theres a couple other features, one way is to let users upload images to show on forums useing [ img ]

freakyshiat 04-09-2002 11:47 PM

Ok, can I upload to a different server? I am trying to separate attachments and have them uploaded to a server other than the one the forum is hosted on

Slynderdale 04-09-2002 11:48 PM

Heres what it looks like on ftp, each user has there own folder to upload to, the user folders automaticly get created

Slynderdale 04-09-2002 11:52 PM

mine only works on the server its located on at the moment

freakyshiat 04-09-2002 11:55 PM

Quote:

Originally posted by Slynderdale
mine only works on the server its located on at the moment
ok, then is it possible to have it uploaded without typing in the username/password?

Slynderdale 04-10-2002 12:03 AM

Quote:

Originally posted by Fazle

ok, then is it possible to have it uploaded without typing in the username/password?

yes, it can be edited so you dont need a pass and account uploaded, theres already a hack though that uploads attachemnets to the server instead to the mysql database

Aaow AnD wHiTe 04-10-2002 12:05 AM

Thank you, Slynderdale :) Is it possible to set a "disk quota" for each user?

Slynderdale 04-10-2002 12:13 AM

Quote:

Originally posted by Aaow AnD wHiTe
Thank you, Slynderdale :) Is it possible to set a "disk quota" for each user?
good idea, ill add it to my next version

Nemesis77 04-10-2002 12:18 AM

What versions of VB does this work on?

Slynderdale 04-10-2002 12:19 AM

hmm, i would say all versions because the only thing it checks vbulletin for is the user pass and account on the mysql database

Slynderdale 04-10-2002 12:24 AM

if your useing an older version of vbulletin that doesnt encryted the passes, in the config.php find $encryptedpw = "true"; and change it to $encryptedpw = "false";

Slynderdale 04-10-2002 12:31 AM

If you plan on useing this on your website, i only ask for one thing, dont say you made it, if you want to give me credit for it you can, you can edit it as you wish, also if you like it, please press install the hack so you get notices on any new updates on it, Thank You :)

LangTuDaTinh 04-10-2002 12:32 AM

Thanks...This hacks is cool.

would it be possible if you add image size (pixels) check or resize image (if possible???)

also add more upload boxes??? (example like 5 upload box.)

Thank You

Slynderdale 04-10-2002 12:40 AM

hmm, yea i could add that, ill add it for the next version i relase, you can customize it as you wish in the config file, i could add a limit on image sizes too

JulianD 04-10-2002 01:02 AM

And you say you are a newbie on php? :D:D:D

Great hack!

freakyshiat 04-10-2002 01:20 AM

its not working, says mkdir failed. I chmodded the directories

Slynderdale 04-10-2002 01:23 AM

Quote:

Originally posted by Fazle
its not working, says mkdir failed. I chmodded the directories
did you set the abosulute path in config.php then chmod the file it points at to 777?

Slynderdale 04-10-2002 01:23 AM

you just need to chmod that directory, the upload script does the rest

freakyshiat 04-10-2002 01:30 AM

Quote:

Originally posted by Slynderdale


did you set the abosulute path in config.php then chmod the file it pointsat to 777?

i set the absolute path to //public_html/upload
chmodded 777

it says:

Warning: MkDir failed (No such file or directory) in /home/otbackup/public_html/upload.php on line 114

Warning: fopen("//public_html/upload/guest/index.html", "a") - No such file or directory in /home/otbackup/public_html/upload.php on line 116

freakyshiat 04-10-2002 01:49 AM

ok, never mind, i got it to work, how can I edit it so it doesnt ask for username/password, just dumps it in guest directory?

MrLister 04-10-2002 02:19 AM

great hack. btw do you always need a password to download because there's probably some users that would use it as a leech directory.

Neo 04-10-2002 02:33 AM

Hey this looks cool. What a nice addon to my forum :)

Slynderdale 04-10-2002 02:36 AM

Quote:

Originally posted by Fazle
ok, never mind, i got it to work, how can I edit it so it doesnt ask for username/password, just dumps it in guest directory?
hmm could make a account called guest on your forums and make a user grop called Upload Guest or something and do it that way, ill add a guest option later to it for those who want guest uploads

Slynderdale 04-10-2002 02:57 AM

If any one uses this on there website, tell me how your members like it, and if you want, send me a link to your forums

Slynderdale 04-10-2002 03:21 AM

im working on a updated uploads and config, i never thought so many people would like it, heres what the update will have

PHP Code:

//**Email Configuration - use to control the uploading
$email=""Webmasters email
$email_notify 
"no" //If yes, it emails the email above if some one uploads and deletes a file
//Note: Web host must have email support

//**URL Configuration - change them to fit your site
$absolute_path "/home/your site/files"//Absolute path to where files are uploaded
$site_url "http://your site.com/files/"//the url to where files are uploaded
$log_path ""//the path to where the log file will go

//**File Configuration - use to control the uploading
$logging "no" //logs what people do to a text file
$size_limit "no"//do you want a size limit yes or no.
$limit_size "2000"//How big do you want size limit to be in bytes
//Note: 1 KB = 1024 bytes 1 MB = 1048576 bytes
$limit_ext "yes"//do you want to limit the extensions of files uploaded
$extensions = array(".gif"".jpg"".jpeg"".png"".bmp"); //List extensions you want files uploaded to be
$pixellimit "false";  //do you want to limit the pixel size of images?
$resizeimg "false";  //resize the image if its to big
$widthlimit "100";  //max width size in pixels
$lengthlimit "100";  //max length size in pixels
$allow_databaselimit "yes";  //limit members database size?
$database_quota_limit "5048576";  //database size limit in bytes

//**Account Configuration - use to add accounts and limit there access
$bannedaccounts = array();
$allow_guest_uploads "yes";

//**Site Configuration - use to change how the uploader looks
$show_img "yes"//do you want the image you uploaded to show on the screen after you upload
$show_link "yes"//do you want the link to the file you uploaded to show on the screen after you upload
$comment_mainpage ""//The comment that apears at the bottom of the main page
$comment_upload ""//The comment that apears at the bottom of the upload page
$comment_view ""//The comment that apears at the bottom of the view page
$comment_delete ""//The comment that apears at the bottom of the delete page
$link_url ""//The url of the link that apears at the bottom of every page
$link_name ""//The name of the link that apears below every page

//**Color and Text Configuration
$color_background "#18576F"//The background color
$color_title_table "#5E6A7B"//The title table color
$color_body_table "#818EA0"//The body table color
$color_text "#FFFFFF"//The text color
$color_link "#818EA0"//The link color
$color_vlink "#5C697A"//The visited link color
$color_alink "#818EA0"//The active link color
$text_font "Verdana"//The font the text uses
$text_size "8"//The text size
$text_size_title "8"//The title table text size
$text_size_body "8"//The body table text size

//**Database Configuration
$checkservername "localhost";            // hostname or ip of server
$dbcheckbase     "database name";        // name of database
$encryptedpw      "true";            // encrypted (md5) passwords on/off (true/false)
$dbcheckusername "database username";   //database user name
$dbcheckpassword "database password";   //database password 


Neo 04-10-2002 03:28 AM

Its a nice hack, I will wait for the update before I install

Slynderdale 04-10-2002 03:39 AM

the update will be out in a day or two, at the most, a week, when its done it should be highy customizable, you can install version 1.0 if you want but when 2.0 you can just edit the config and upload over the old files. Hmm, idea, maybe add some admin options like view a list of those who uploaded, there quota, and a view and delete ability.

Neo 04-10-2002 03:44 AM

I will use the current version and then update once it is ready. thanks for the info.

freakyshiat 04-10-2002 04:47 AM

keep up the good work, 2.0 looks promising

freakyshiat 04-10-2002 05:02 AM

oh and how about pics with spaces or illegal characters....can it pop an error saying unacceptable file name or something?

Slynderdale 04-10-2002 06:07 AM

hmm alright, ill add some customizable error messages that come up for errors, also in the new version im gonna fix the coding up so its esier to read and cleaner

WallStreat 04-10-2002 06:32 AM

The following code can help to generate thumbnails, provided your server is installed with imagemagick:


PHP Code:

if ($extension == "gif" or $extension == "png") { 



system("$galleryconvert -geometry '160x120>' $path GIF:$thumbname"); 



} elseif (
$extension == "jpg" or $extension == "jpeg" or $extension == "jpe" or $extension == "png" or $extension == "bmp") { 



system("$galleryconvert -geometry '600x120>' $path -flatten -quality '75' JPEG:$thumbname"); 





1. $path refers to the directory where u store the thumnails e.g.
$path = "/home/yoursite/public_html/images";

2. $thumbname refers to the name u give to your thumbnail

Modshack 04-11-2002 08:52 PM

Quote:

Originally posted by Slynderdale
If you plan on useing this on your website, i only ask for one thing, dont say you made it, if you want to give me credit for it you can, you can edit it as you wish, also if you like it, please press install the hack so you get notices on any new updates on it, Thank You :)
Does this include you adding a credit to CyberGaf who made the vbauth file here http://www.vbulletin.org/hacks/index...ack&hackid=282 ?
for the use of the script which you have edited that he created ?

camikazi2k 04-12-2002 01:02 AM

i am installing this now definitlly, hope it do fix my upload limit problem :)
well let ya know
thanks alot


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