News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

File Manager

Started by Aaron, September 20, 2006, 11:21:30 AM

Previous topic - Next topic

Metorks

I should have prefaced that by stating that I am a complete novice at coding, so I suppose I wouldn't know about any hidden difficulties.  I would think you could add an IF ELSE statement to check for a TP installation.  But, I've discovered that this isn't the only mod with this problem, so I'm content to add in the code by hand.

Thanks for your work on the File Manager mod by the way.  I absolutely love it and use it quite a bit.  It beats opening up my FTP client and logging in when all I need to do is upload or download a file or two.  Superb Mod!

Aaron

Quote from: Metorks on March 01, 2008, 12:53:49 PM
I should have prefaced that by stating that I am a complete novice at coding, so I suppose I wouldn't know about any hidden difficulties.  I would think you could add an IF ELSE statement to check for a TP installation.

That's what I meant by adding error="skip". I could include a path for $sourcedir/TPortal.php, but I don't like having to do that. Most users won't have TinyPortal installed anyway.

Quote from: Metorks on March 01, 2008, 12:53:49 PM
Thanks for your work on the File Manager mod by the way.  I absolutely love it and use it quite a bit.  It beats opening up my FTP client and logging in when all I need to do is upload or download a file or two.  Superb Mod!

Thanks for the kind words! :)

NHWD

TO:Aäron
IM USING VERSION 1.1.5
AND I CANT UPLOAD SO DO U THINK U CAN UPDATE IT?

Aaron

Will do so in just a few minutes. :)

NHWD


Larathiel

Aäron, what user permissions cause the File Manager to become visible for someone? While I may trust others to moderate my forums, I would prefer to limit access to this [wonderful] tool to just myself, not everyone who has an Admin menu.

BTW, this is a really handy tool. I liked it so much that I've moved my forum to the top level of my site so that I can use it as an FTP client if needed! The only suggestion I have is to add check-boxes to the contents list so that a user can select multiple files/folders for deletion or CHMODing.

Aaron

Thanks for your kind words, Larathiel. :)

Quote from: Larathiel on June 28, 2008, 07:51:54 PM
what user permissions cause the File Manager to become visible for someone? While I may trust others to moderate my forums, I would prefer to limit access to this [wonderful] tool to just myself, not everyone who has an Admin menu.

Basically everyone who has the 'Administrate forum and database' permission ('admin_forum') has access to it.

Quote from: Larathiel on June 28, 2008, 07:51:54 PM
The only suggestion I have is to add check-boxes to the contents list so that a user can select multiple files/folders for deletion or CHMODing.

Thanks for the suggestion. I might add that in a next version. :)

Larathiel

Quote from: Aäron on June 28, 2008, 08:04:59 PM
Quote from: Larathiel on June 28, 2008, 07:51:54 PM
what user permissions cause the File Manager to become visible for someone? While I may trust others to moderate my forums, I would prefer to limit access to this [wonderful] tool to just myself, not everyone who has an Admin menu.

Basically everyone who has the 'Administrate forum and database' permission ('admin_forum') has access to it.
Ah great, that's all I needed to know. Thanks again, and I look forward to any future versions!

@L3


Kylezz

Why do i post alot? I am not a leecher.

busterone

I recently started to admin an already existing forum. A few months ago, the host was hacked and the site was hacked as well. The site stayed down more than up until I obtained a better host and migrated it. Since migration, everything has worked fantastic until i installed the Filemanager mod. According to the package manager the installation was successful, and the file manager option is available in the admin control panel. Upon clicking the file manager button, it opens as it should but the area where the directory tree structure should be is blank. There are now 2 errors that show up in tandem in the error log each time I attempt to access file manager. I am not very proficient in php coding myself, so attempting to trace the problem has been quite a task. Here are the two errors that always come at the same time.

2: Invalid argument supplied for foreach()
File: /homepages/31/d250717583/htdocs/Themes/default/Admin.template.php (eval?)
Line: 25

2: Wrong parameter count for array_slice()
File: /homepages/31/d250717583/htdocs/Sources/FileManager.php
Line: 199

Any help in pointing me in the right direction would be greatly appreciated.

Aaron

Are you sure the $boarddir set in Settings.php is correct?

busterone

#92
I had to logoff awhile. I will check now.

Ok- i was certain that it was but took another look to be sure. I have 7 other mods and 2 extra themes that are all working correctly.
1.     GoogleTagged      1.2      
2.    vBulletin Style Meta Tags    
3.    Pretty URLs - Base    0.8.4    
4.    SMFChess    1.0    
5.    SMF Sitemap    1.2.2    
6.    Add Domaintools to TrackIP    
7.    Pm_Informer    1.0    
8.    SMF File Manager    2.1
I am at a loss on what could do it. I have uninstalled File manager ands reinstalled twice. Same results each time.

busterone

I just realized that I left part of the error code off, I am not sure if it matters or not.

http://thedemonsden.com/index.php?action=filemanager
2: Invalid argument supplied for foreach()
File: /homepages/31/d250717583/htdocs/Themes/default/Admin.template.php (eval?)
Line: 25

http://thedemonsden.com/index.php?action=filemanager
2: Wrong parameter count for array_slice()
File: /homepages/31/d250717583/htdocs/Sources/FileManager.php
Line: 199

I left out the username and ip address info.

Sorry about the double post.


Aaron

Doesn't matter much, really. You haven't answered my question, though, and I really need an answer to that.

Is $boarddir in Settings.php set to '/homepages/31/d250717583/htdocs' or not?

busterone

Quote from: busterone on August 10, 2008, 02:22:03 PM
snip-  Ok- i was certain that it was but took another look to be sure. -snip
I apologize, I possibly wasn't very clear in the earlier post.  Yes, it is correct.

ITA003

Quote from: Aäron on August 10, 2008, 03:22:21 PM
Doesn't matter much, really. You haven't answered my question, though, and I really need an answer to that.

Is $boarddir in Settings.php set to '/homepages/31/d250717583/htdocs' or not?

I've the same problem... and the $boarddir are set correctly.

Aaron

Looks like this is a problem for PHP versions older than version 5.0.2. If I were in your position, I'd ask my host to upgrade the PHP software on their servers asap, as PHP 4 isn't supported anymore.

Aside from that, it's an easy fix. I'll upload a fixed package in a few minutes, but in case you're curious as to what the culprit was:
Code (FileManager.php, line 199) Select

$files = array_slice($files, $fileStart, $filesPerPage, true);


If you remove the fourth parameter (", true"), that should solve the problem.

busterone

Worked like a charm! Thank you very much.  Fantastic mod too. I use it on another forum and love it.  :)

Aaron

No problem at all. Sorry it took me so long to get back to you, though!

Advertisement: