[cvs] [Wiki] changed: QuotaHack

Wiki Guest wiki at wiki.horde.org
Mon Nov 14 10:35:52 PST 2005


guest [203.145.159.37]  Mon, 14 Nov 2005 10:35:52 -0800

Modified page: http://wiki.horde.org/QuotaHack
New Revision:  1.2
Change log:  beautification

@@ -1,20 +1,25 @@
-To assign quota to a user
+Here is a hack that displays quota on a server not supporting quota, like dovecot or any mail server without using the built in quota feature(If you find this simpler).
 
-create a folder quota on your server '/' partition
+create a folder 'quota' on your server '/' partition
 
+<code type="bash">
 mkdir /quota
+</code>
 
 to assign quota to any user
 
+<code type="bash">
 echo "10000" > /quota/username
+</code>
 
 This would give 10MB quota to a user. Give whatever you wish to assign.
 
 Create the following file
 
 /var/www/html/horde/quota.php
 
+<code type="php">
 <?php
 {
 
     $user=Auth::getAuth();
@@ -44,14 +49,16 @@
 emails to avoid any inconvinience.")
 // -->
 </script>';}
 }
+</code>
 
 Change the above reflecting your mailserver's folder locations. Above is for dovecot on RHEL 3, with mails in /home/username/mail and /var/spool/mail/username.
 
 
 Add this in horde/imp/templates/common-headers.inc (line 27, 28,29)
 
+<code type="php">
 $page_title = $GLOBALS['registry']->get('name');
 if (!empty($title)) $page_title .= ' :: ' . $title;
 if (!empty($refresh_time) && !empty($refresh_url)) {
     echo "<meta http-equiv="refresh" content="$refresh_time;url=$refresh_url" />n";
@@ -59,19 +66,20 @@
 Horde::includeScriptFiles();
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
 
---->Add the following here <----
+//--->Add the following here <----
 
 <?php
 include_once HORDE_BASE . '/quota.php';
 ?>
 
----end---
+//---end---
 
 <link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
 <?php if (isset($mailbox_url)): ?>
+</code>
 
-This should give you quota information on any mail server regardless of the support of quota by the server or OS quota assignments. Do let me know if this was useful or any improvement suggestions.
+Do let me know if this was useful or send in any improvements/suggestions.
 
 jigish dot gohil at gmail dot com
 


More information about the cvs mailing list