|
Theme Uploader - Upload Themes Directly From Admin CP
|
|
01-05-2009, 06:55 PM
(This post was last modified: 01-11-2009 09:03 PM by Nick.)
Post: #1
|
|||
|
|||
|
Theme Uploader - Upload Themes Directly From Admin CP
This plugin allows you to upload and use themes directly from the admin CP without Backend access.
Instructions: 1. Upload and unzip the attached file to your THT includes directory. 2. ChMod your "themes" Directory to 0777 (or 777) 3: Edit your settings.php file in "yourthtadmindirectory/pages" with the following Find: PHP Code: echo $style->replaceVar("tpl/themesettings.tpl", $array); And After it add: PHP Code: include LINK."upload.php"; enjoy! Changelog for v1.2.2:
Changelog for v1.2:
Special Thanks to Jonny for bearing with me through the long and difficult process of getting this plugin to work with THT's security system. (as denoted by the posts below and all the pm's in my inbox, as well as the shoutbox conversations.) This plugin wouldn't be here without him. If you need support, have suggestions or feedback, please reply to this thread. Nick - TheHostingTool Staff Coordinator ![]() |
|||
|
01-05-2009, 07:26 PM
Post: #2
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
Download Unnaproved
Reason: Major security flaw, basically anyone could upload a zip with any contents in and put it on the server. The upload.php needs to check if the staff member is logged in. Jonny H - THT Main Developer & Founder |
|||
|
01-05-2009, 09:16 PM
(This post was last modified: 01-05-2009 09:35 PM by Nick.)
Post: #3
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
Thanks, I should remember that in the future. Will fix and release v1.2
Fixed. I added the following at the top of upgrade.php to check if the script was called by THT. I will wait for confirmation of scripts security before re-uploading. PHP Code: if(THT != 1){die();} 1.2 Release Delayed to to a slight error that causes in-operability of themes. Nick - TheHostingTool Staff Coordinator ![]() |
|||
|
01-05-2009, 09:39 PM
Post: #4
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
Still won't work, I don't think. You need to check that $_SESSION['logged'] exists.
Jonny H - THT Main Developer & Founder |
|||
|
01-05-2009, 09:42 PM
Post: #5
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
Okay, I came up with this:
PHP Code: if(!$_SESSION['logged']) {die();}; Nick - TheHostingTool Staff Coordinator ![]() |
|||
|
01-07-2009, 05:50 PM
Post: #6
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
That should work yeah. Raptor, instead of using a iframe do this:
PHP Code: include LINK."../upload.php"; Jonny H - THT Main Developer & Founder |
|||
|
01-07-2009, 07:19 PM
Post: #7
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
the if(!$_SESSION['logged']) is not working correctly. The script dies every time. I have tried if(!isset($SESSION['logged']) too with same results.
Nick - TheHostingTool Staff Coordinator ![]() |
|||
|
01-08-2009, 09:11 AM
Post: #8
|
|||
|
|||
RE: Theme Uploader - Upload Themes Directly From Admin CP
(01-07-2009 07:19 PM)TheRaptor Wrote: the if(!$_SESSION['logged']) is not working correctly. The script dies every time. I have tried if(!isset($SESSION['logged']) too with same results.Use the include as I quote, don't use a iframe.. Jonny H - THT Main Developer & Founder |
|||
|
01-08-2009, 08:25 PM
(This post was last modified: 01-08-2009 08:40 PM by Nick.)
Post: #9
|
|||
|
|||
RE: Theme Uploader - Upload Themes Directly From Admin CP
(01-08-2009 09:11 AM)Jonny Wrote:(01-07-2009 07:19 PM)TheRaptor Wrote: the if(!$_SESSION['logged']) is not working correctly. The script dies every time. I have tried if(!isset($SESSION['logged']) too with same results.Use the include as I quote, don't use a iframe.. Okay, here is what I get with that: I put upload.php and pclzip.lib.php in the includes folder. I inlcude the file like you mentioned. But for some reason, the form keeps trying to post to admin/upload.php. (action=upload.php)... hmmm. Maybe if i replace "action=upload.php" with "action=.../includes/upload.php" it might work. Will try that next chance I get. Okay... Changing the form "action" to "../upload.php" works. But the security thing is still dieing. The script works fine without the !_$SESSION['logged'], so i know that that is the problem. Nick - TheHostingTool Staff Coordinator ![]() |
|||
|
01-09-2009, 07:00 PM
Post: #10
|
|||
|
|||
|
RE: Theme Uploader - Upload Themes Directly From Admin CP
Just leave the action as ""
Jonny H - THT Main Developer & Founder |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread:


![[Image: standard.png]](http://twitstamp.com/thehostingtool/standard.png)


