Here's a WYSIWYG CMS with disk space allocation
For those wanting to offer a friend/client/themselves a simple CMS to manage the content of a website you have made and are hosting for them:
The complete package - Here's my CMS all set up as a test: http://temp.jemcon.org/cms/
Please excuse all the pink! It's not perfect by all means, and the interface needs some work to display properly in all browsers, but its good enough for my own use.
Lil' CMS 2: http://www.lilcms.com/ (installs the same way as version 1 but has TinyMCE integrated - scroll down for the version 2 upgrade)
You can define editable blocks so your friend/client can only edit the bits you specify. They cant mash up any important code outside the blocks.
Has a WYSIWYG web page editor so its easy to edit content (like using Word) and can backup/restore web pages.
Allow them to upload and manage their own content (images, docs, media files) with TinyBrowser: http://www.lunarvis.com/products/tin...withupload.php
(very easy to integrate into TinyMCE)
Password protect the Lil' CMS 2 index page, and important upload scripts in the TinyBrowser folder, with this password protect script from Zubrag: http://www.zubrag.com/scripts/password-protect.php
(can have multiple users and uses session cookies) Aswell as the Lil' CMS 2 interface, the following files should be password protected in the TinyBrowser folder:
- edit.php
- folders.php
- tinybrowser.php
- upload.php
A folder space allocation script and pie chart to display disk space usage: http://www2.aj-services.com/downloads/spacegraph.zip
It can't actually limit the folder space used, and your client will be able to overstep their limit, but you can use some IF statements and an auto-email script to alert you if they do, then you can take action if needs be (delete files or change their password in the Zubrag script).
Here's the one I wrote - just insert it into the spacegraph "1.php" file, right above the echo that displays the pie chart image, at the bottom of the file:
Code:
//if disk space allocation has been exceeded show critical message and send auto-email to webmaster
if ($spaceuseda > $spacea) {
function criticalalert()
{
//change below to your preferred email address - seperate multiple with a comma
$to = "webmaster@yourwebsite.com";
$subject = "WEBHOSTING - Disk usage limit exceeded!";
$email = $_REQUEST['email'] ;
$message = "Hi Webmaster,\n\nDomain http://friend.yourwebsite.com has exceeded its disk usage limit of 50MB.\n\nPlease review the account and delete resources as necessary.";
// below should use an email account on your domain to send the email
$headers = "From: admin@yourwebsite.com";
$sent = mail($to, $subject, $message, $headers) ;
}
criticalalert();
echo "<div style='color:red'><b>CRITICAL!</b> You have exceeded your disk usage limit! The webmaster has been notified of this by email and will take further action as necessary. To avoid seeing this message again, please delete some resources immediately!</div>";
}
//if less than 5MB of disk space allowance is free show warning message
else if ($spacefree < 5) {
echo "<div style='color:red'><b>WARNING!</b> You are approaching your disk usage limit. Please consider deleting some resources to free-up space.</div>";
}
BTW - I inserted the pie chart into the Lil' CMS 2 index page using DD's Ajax include script: http://www.dynamicdrive.com/dynamici...axincludes.htm
You can pass the username and password variables from the spacegraph "1.csv" file to the ajax include, so you dont have to login to see the piechart, like so (username:"Gloria" / password:"lovesick"):
<script type="text/javascript">ajaxinclude("1.php?username=Gloria&password=lovesick")</script>
Hope this helps somebody!
I can't find lilcms 2 either...
Hello. Is it possible to get that emailed to me as well? I could really use that script right now. Thank you very much in advance!! :)
Looking for the Lil' CMS 2 script
I need the Lil' CMS 2 scipt. Could you send me a copy please?