TinyPortal

Development => Support => Topic started by: Metorks on March 01, 2008, 10:28:54 AM

Title: SMF File Manager Mod
Post by: Metorks on March 01, 2008, 10:28:54 AM
I've installed the SMF File Manager Mod (http://custom.simplemachines.org/mods/index.php?mod=477).

Whenever I view the File Manager, a function of the AdminCP, TP puts its panels up.

The author of the mod has this to say about the problem:

"That's because TinyPortal checks whether you're viewing an admin action, according to its own definitions. Since the File Manager isn't a default feature, TinyPortal doesn't know it belongs to the Admininistration Centre and thus expands shows its blocks again.

And no, I'm not going to edit this mod to make it 'TinyPortal compatible', sorry.
"

Any idea how we can edit TP's definition of Admin actions?

Thanks in advance!
Title: Re: SMF File Manager Mod
Post by: Metorks on March 01, 2008, 10:37:12 AM
Nevermind.  I figured it out myself.  Quite simple really.

In .../Sources/TPortal.php
Code (Find) Select
if (in_array($context['TPortal']['action'], array('theme','tpadmin','admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))

Simply add , 'filemanager' directly after 'viewmembers'.

Resulting code should look like this:
if (in_array($context['TPortal']['action'], array('theme','tpadmin','admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers', 'filemanager')))
Title: Re: SMF File Manager Mod
Post by: Ken. on March 01, 2008, 12:34:38 PM
Glad you found the fix, good job.  :up:

Marked as solved.