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)
-   -   Download, Upload, Edit, Rename, Delete, CHMOD Files or Dirs in Admin CP (https://vborg.vbsupport.ru/showthread.php?t=44197)

Erwin 10-01-2002 10:00 PM

Download, Upload, Edit, Rename, Delete, CHMOD Files or Dirs in Admin CP
 
vB FTP 2.1 - a FTP client for vBulletin
vB Admin CP Integration by Erwin Loh


Have you ever wanted to edit, download or upload files to your server or edit one of your forum PHP files, but have no access to an FTP client?

Well, this is the hack for you. It basically adds a secure FTP interface to your vB Admin CP. You can edit, delete, download, upload, create, or rename files, OR do the same for directories, all from within the comfort of your Admin CP through your browser.

Version 2 update
1) Ability to SEARCH while editing a file (similar to the search feature when editing templates)
2) Ability to view and change CHMOD of files and directories

Version 2.1 update
1) Fixed a view IMAGE cache bug
2) Fixed version number bug


- features as requested!

NOTE: The CHMOD feature can only work if you have set up your server to allow file permission changes - most servers will NOT allow you to CHMOD files or directories through your browser for security reasons.

Features
--------------

1) Integrated into vB Admin CP - uses Admin CP cp.css style
2) Create, delete, rename directories
3) Create, delete, rename, edit, upload or download files
4) Ability to view and change CHMOD of files and directories (if this is set up on your server!)
5) View, Zoom In/ Zoom Out with GIF/ JPG files
6) Different icons for different types of file (configurable)
7) Ability to password protect the vB FTP file (configurable)
8) FTP functions straight from within your Admin CP!!!

Installation
-----------------

YOU MUST FOLLOW ALL THESE STEPS FOR THIS TO WORK PROPERLY! NOTE: This hack requires PHP 4.1.2 installed or better.

Instructions in the "Installation.txt" file of the attachment. It's easy - uploading 1 file to your admin directory, and uploading images to the images/ftp subdirectory, and then editing your admin/index.php file so you can link to the ftp.php file. :)

Once this is installed, you can just click on the "vBFTP" link in your Admin CP on the left column underneath your "Control Panel Home" to access this.

Additional Features (already inbuilt)
----------------------------------------------

1. Password Protect vB FTP.
2. Toggle functions of FTP on or off.
3. Type of files you can edit.
4. Hide files or directories.
5. Changing the timeout (if you have trouble downloading or uploading large files).
6. Going higher in the directory structure, all the way up to ROOT


Click on this link to read instructions on how to use these in-built features now:
https://vborg.vbsupport.ru/showthrea...466#post305466

I have added a textfile to the ZIP called "ExtraFeatures" with the same instructions.

If you like this, please click the INSTALL link at the bottom of the thread, so that I can send you updates! :)

Enjoy!

Dr. Erwin Loh

Erwin 10-02-2002 01:21 PM

Screenshot: Main Page
--------------------------------

NOTE: The screenshots say "Version 1.0" but it's actually the screenshots for "Version 2.0" - I forgot to change the version number when I made them, and I'm too lazy to make new screenshots. ;)

What you see in your Admin CP (this screenshot uses the standard Admin CP cp.css - the hack will be customized to your own Admin CP colors).

NEW SCREENSHOT:

Added: CHMOD values for files and directories

Erwin 10-02-2002 01:39 PM

Screenshot: Editing PHP File
--------------------------------------

This is what you see when you are editing a PHP file. It's similar to the template system, isn't it. :) Who needs FTP anymore?

NEW SCREENSHOT:

Added: Ability to search the code in the file

Erwin 10-02-2002 01:40 PM

Screenshot: Viewing GIF/ JPG file
--------------------------------------------

You can view GIF/ JPG files in your Admin CP, and ZOOM IN or ZOOM OUT... the page will also tell you the size of the image file and the scale of the zoom...

Erwin 10-02-2002 01:40 PM

Screenshot: Downloading file
----------------------------------------

Click on the "Disk" icon to instantly download any file from your server to your local hard disk if you want to backup your files or edit it on your local drive.

Erwin 10-02-2002 01:41 PM

Screenshot:Uploading file
-------------------------------------

You can upload up to 4 files at once to any directory on your server.

Erwin 10-02-2002 01:41 PM

Screenshot: CHMOD change
--------------------------------------

Changing the CHMOD file permissions of files or directories cannot be easier.

You use drop down menus with descriptions to do this.

NEW SCREENSHOT:

Added: Ability to CHMOD files and directories using dropdown menus!!!

Dan Flynn 10-02-2002 02:17 PM

Very cool,


I think this would be good for anyone regardless of there ftp access to a client.

I think it's just more convient to do it all right in the cp sometimes. I know this is your first version and I will install later today.

How about adding a find feature to this hack. that would really top it off. :)

Great Job

Erwin 10-02-2002 02:20 PM

[explanation removed since it is no longer needed]

Erwin 10-02-2002 02:24 PM

Edit: I've added the find feature already in Version 2.0 :)

Dan Flynn 10-02-2002 02:31 PM

Thanks,

That's good to know. I do mean like the feature that's in the template mod area. Screen attached :)

N9ne 10-02-2002 03:17 PM

You say to CHMOD 777 all the directories you may want to edit via adminCP, isn't this extremely dangerous?

Dean C 10-02-2002 03:40 PM

good god... this is an amazing idea doctor :D

Hack rating: 9/10

- miSt

zachb 10-02-2002 03:42 PM

10/10! this is such a great hack. thanks a lot erwin!

installed. :D


*my vote for hack of the month if it ever comes back.

Velocd 10-02-2002 04:04 PM

Hey pretty neat, although I'll stick with CuteFTP Pro ;)

Defiantly nice for those without FTP agents.

Dark Shogun 10-02-2002 05:04 PM

Dang good hack Erwin. I have CuteFTP Pro also but I am going to try this out for awhile.

/me clicks install

Dark Shogun

Buddha 10-02-2002 06:12 PM

installed it.
thank you very much, good doctor.

i prefer using smartFTP, but from work, i'm behind a firewall that prevents ftp access... but it allows http access. so i've been editing files using the engine hack, which is great, but limited. this will really help from work.
is there a way you can set it up so that you can change the chmod through this ftp?
that would be fantastic.

Brad 10-02-2002 06:47 PM

I use Cute ftp pro myself, im installing this one anyone, can come in handy :)

Link14716 10-02-2002 07:12 PM

yeah, CuteFTP Pro has CuteHTML integrated, works kickass because you get a huge find/replace box :) I think I'll stick with it.

Nice job on this hack. I think a lot of people have been wanting something like this for a while ;)

Erwin 10-02-2002 08:13 PM

Quote:

Originally posted by Tha Rock
You say to CHMOD 777 all the directories you may want to edit via adminCP, isn't this extremely dangerous?
It's not extremely dangerous. But there are some risks if someone can get access to your server, which should not be possible. There is no other way to edit or change files and directories in PHP.

Bear in mind that you only have to CHMOD 777 the directory and file you want editable. And if you don't want to CHMOD 777 anything, you don't have to.

Without CHMOD 777 (ie. just installing the hack as is), you can still:

1) Browse your site directories
2) Look at all your files
3) Open and view contents of all your files
4) Download files to your local hard disk
5) View, zoom in or out with image files
6) Upload files into tmp directory
7) Edit files in tmp directory
8) Create files in tmp directory
9) Delete files in tmp directory
10) Rename files in tmp directory


With CHMOD 777, you have the additional ability to:

11) Upload files in all directories
12) Edit files in all directories
13) Rename files/ directories in all directories
14) Delete files/ directories in all directories
15) Create files/ directories in all directories

But this hack is useful in itself even without CHMOD 777 anything. :)

This is also why there is a "tmp" directory that you make CHMOD 777. It stores image files temporarily to be viewed, but you can also upload files into it and edit them there.

Erwin 10-02-2002 08:24 PM

Quote:

Originally posted by Dan Flynn
Thanks,

That's good to know. I do mean like the feature that's in the template mod area. Screen attached :)

It's possible, but I won't do it, because it works the same as the CTRL-F button in your browser, so there's not much point bulking up the file for no real reason. :)

DrkFusion 10-02-2002 09:44 PM

I use CuteFTP Pro too :) ITs the best especially the html editer built within.

Also Tha Rock it is not completly dangerous only people whom are on your server, and know your absolute path can upload files to your site, as long as you have your site# used in your path then its basically impossible. But i am sure there are other ways which I do not know, the average person does not know how, or doesn't have intentions to cause harm.

Anyways good hack Erwin

Regards
-Arunan

Unknown553 10-02-2002 11:03 PM

Doesn't work for me, when I load ftp.php it's just a blank page, all white. I edited the file to try both OSes, still nothing. Ideas?

Server running on FreeBSD / PHP v4.0.6 Safe Mode

Henry-RS 10-02-2002 11:03 PM

This is literally useless for editing files without a find feature.

Velocd 10-03-2002 12:04 AM

Can't you just go to "edit -> find" in the Internet Explorer menu bar at the top? As for a FIND & REPLACE feature, just download TEXTpad (best free text editor out there) and use it's powerful FIND & REPLACE feature.

mewgood 10-03-2002 12:29 AM

This is a great hack 100% will use it but will wait awhile for ppl to find bugs...

Erwin 10-03-2002 02:38 AM

Quote:

Originally posted by Henry-RS
This is literally useless for editing files without a find feature.
I've added the FIND feature for editing files in Version 2.0 as requested. :)

Erwin 10-03-2002 02:38 AM

Quote:

Originally posted by Unknown553
Doesn't work for me, when I load ftp.php it's just a blank page, all white. I edited the file to try both OSes, still nothing. Ideas?

Server running on FreeBSD / PHP v4.0.6 Safe Mode

This needs PHP 4.1.2 or higher. Sorry. You should get your host to upgrade, since 4.0.6 is fairly old.

Neo 10-03-2002 05:19 AM

I currently have something like this in development but its ment for hacking.

iJason 10-03-2002 06:33 AM

OMFG this hack is so perfect for me! I have been looking for something like this for a long time! Thank you so much! You see at school I don't have access to get through the proxy so I can't use an FTP program but with this I don't need to! Thanks alot!

iJason 10-03-2002 06:53 AM

Hey is it possible to make it so that only certain people can access it? Not everyone with access to the admin cp. Maybe make it require 1 user name and password of my choice?

Also I can't seem to go up any higher then the forum directory..?

Erwin 10-03-2002 08:30 AM

Additional Features (already inbuilt)

1. Password Protect vB FTP.

In "ftp.php", find:

PHP Code:

$use_login    =    true;            // Toggle login system (true/false).
$auto_login    =    true;            // Toggle auto login (true/false).
$username    =    "";    // Set a username
$password    =    "";    // Set a password. 

Enter a username and password in the blank space - it can be ANYTHING you like, it doesn't have to be your real FTP username and password.

This will password protect your vB FTP. You will have to enter that username and password to access this function. This will prevent other admins from accessing your site. :)

You can set auto login as well using the variables - basically this means that once you log in with this additional username and password, a cookie will be made, so that you will automatic login the next time. By default this is switched on.


2. Toggle functions of FTP on or off.

You can switch on or off each function of vB FTP.

In "ftp.php", find:

PHP Code:

$allow_view    =    true;
$allow_create    =    true;
$allow_edit    =    true;
$allow_rename    =    true;
$allow_delete    =    true;
$allow_download    =    true;
$allow_upload    =    true

It's self explanatory. Change it to "false" if you want to switch that function off.


3. Type of files you can edit.

You can set the filename extension of files you want to be able to edit.

In "ftp.php", find:

PHP Code:

$text_files    =    array(            // Editable files
                               
"txt",
                               
"php",
                               
"phtml",
                               
"php4",
                               
"php3",
                               
"html",
                               
"htm",
                               
"css",
                               
"xml",
                               
"xsl",
                               
"bat",
                               
"log",
                               
"ini",
                               
"inf",
                               
"cfg",
                             ); 

Just add any extension you like to that list. There are other lists as well underneath this that you can customize.

4. Hide files or directories.

You can set files or directories to be hidden.

In "ftp.php", find:

PHP Code:

$ignore_file_strings        =    array(
                                               
".htaccess",
                                             );
$ignore_file_extensions        =    array(
                                               
"foo",
                                               
"bar",
                                             );
$ignore_directory_strings    =    array(
                                               
"secret dir",
                                             ); 

Just add it to the list. It's self-explanatory.


5. Changing the timeout (if you have trouble downloading or uploading large files).

In "ftp.php", find:

PHP Code:

$use_timeout    =    false;
$timeout    =    30

By default, this is switched off. You can turn it on by changing "false" to "true", and entering the timeout figure in seconds.


6. Changing the default directory, and ability to go higher up in directory structure all the way to ROOT directory.

I made the forum directory the highest directory you can access by default. To change the highest directory you can access-

In "ftp.php", find:

PHP Code:


$home_dir    
=    "../"

Change "../" to the default directory you want to open vB FTP in - put in the full path.

For example:

PHP Code:


$home_dir    
=    "/home/site/var/www/html/forums"

To go to the ROOT directory, replace it with this:

PHP Code:


$home_dir    
=    "/"

There you go! :) Whatever you put as the default directory is the HIGHEST directory you can go up to.

It works. So you can go as high as you want changing that variable.

Enjoy these extra features! They are already in-built in the hack. :)

Erwin 10-03-2002 09:12 AM

Quote:

Originally posted by dreamer
Hey is it possible to make it so that only certain people can access it? Not everyone with access to the admin cp. Maybe make it require 1 user name and password of my choice?

My previous post should clarify this. Yes, you can password protect vB FTP. Follow the instructions in my previous post. :)


Quote:


Also I can't seem to go up any higher then the forum directory..?


I did that intentionally. You can go higher easily, all the way to the ROOT directory. Read my previous post for the instructions.

:)

Enjoy!

Neo 10-03-2002 11:18 AM

I also have one comment.. why is this a FTP? Wouldnt it more so be a browser based file editor since it does not connect to a FTP? or does it?

Erwin 10-03-2002 11:20 AM

Quote:

Originally posted by Neo
I also have one comment.. why is this a FTP? Wouldnt it more so be a browser based file editor since it does not connect to a FTP? or does it?
It is a browser-based FTP client integrated into vB. You can upload and download files, something a simple file editor cannot do. It does everything an FTP client does, except CHMODding files, which I can also add, but would need changing of the server PHP permissions, which is not feasible for most servers.

Neo 10-03-2002 11:35 AM

Thats not really want I was asking. Do you us FTP connection in the PHP files since hence PHP has functions that will connect through FTP?

Erwin 10-03-2002 11:38 AM

Why would I want to do that? PHP has an FTP function built-in but that needs to be enabled at a server-level, and most servers don't have this set up. So this hack acts like an FTP client, without using the "File Transfer Protocol" based on PHP. In fact, this hack is based on a PHP FTP client.

Why do you ask? Do you want me to change the name for some reason?

Erwin 10-03-2002 11:43 AM

In fact, some PHP FTP clients require the FTP feature of PHP installed on your server to be enabled. My hack does NOT require this. I use code that bypasses this requirment. Either way, the outcome is the same.

Also, some firewalls block FTP connections - this hack bypasses this. :) Which is why I use it at work, and others who don't have access to FTP or can't use it would benefit too.

Dean C 10-03-2002 03:47 PM

you should put the useful things in the first post ;)

- miSt

GoTTi 10-03-2002 05:21 PM

wow this is a very interesting hack..

can there be user access on it?

Whatif you dont want certain admins touching things?


All times are GMT. The time now is 12:06 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.01575 seconds
  • Memory Usage 1,867KB
  • 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
  • (8)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