Attached is a patch to configure the "style" directory (default being the 
provided style). The rational behind this is that I deploy dl packaged as a RPM 
(BTW I can send send the spec file if someone is interested), so I don't want 
to edit files directly as it would be overwriten on next update.

With this patch, I can just copy the style dir (and call it style_custom for 
example) and modify all CSS, includes etc...

Regards, Daniel
--
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Web : http://www.firewall-services.com
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/config.php.dist mezzanine_patched_dl-0.12/htdocs/include/config.php.dist
--- dl-0.12/htdocs/include/config.php.dist	2013-11-24 14:41:55.401881978 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/config.php.dist	2013-11-24 14:35:52.376468688 +0100
@@ -89,4 +89,7 @@
 // scanMax: define the maximum file size to be scan (in bytes). Files above this
 //          limit won't be scanned. Should be under StreamMaxLength in clamd.conf
 //$scanMax = 20 * 1024 *1024;
+
+// style: specify the directory name which contains the theme. Default is "style"
+$style = 'style';
 ?>
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/grant.php mezzanine_patched_dl-0.12/htdocs/include/grant.php
--- dl-0.12/htdocs/include/grant.php	2013-11-24 14:41:55.402881979 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/grant.php	2013-11-24 14:38:46.253668237 +0100
@@ -117,7 +117,7 @@
 else
 {
   unset($ref);
-  includeTemplate("style/include/grantr.php");
+  includeTemplate("$style/include/grantr.php");
 
   // kill the session ASAP
   if($auth === false)
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/grantp.php mezzanine_patched_dl-0.12/htdocs/include/grantp.php
--- dl-0.12/htdocs/include/grantp.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/grantp.php	2013-11-24 14:40:37.701795468 +0100
@@ -1,6 +1,6 @@
 <?php
 $act = 'grantp';
-includeTemplate('style/include/header.php', array('title' => T_("Password required")));
+includeTemplate("$style/include/header.php", array('title' => T_("Password required")));
 
 echo "<p>";
 printf(T_("The grant %s is protected. Please enter the password to"
@@ -38,5 +38,5 @@
 </div>
 
 <?php
-includeTemplate('style/include/footer.php');
+includeTemplate("$style/include/footer.php");
 ?>
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/grants.php mezzanine_patched_dl-0.12/htdocs/include/grants.php
--- dl-0.12/htdocs/include/grants.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/grants.php	2013-11-24 14:39:21.848709499 +0100
@@ -1,6 +1,6 @@
 <?php
 $act = 'grants';
-includeTemplate('style/include/header.php', array('title' => T_("Upload grant")));
+includeTemplate("$style/include/header.php", array('title' => T_("Upload grant")));
 
 require_once("progress.php");
 $up = newUploadProgress();
@@ -45,5 +45,5 @@
 </div>
 
 <?php
-includeTemplate('style/include/footer.php');
+includeTemplate("$style/include/footer.php");
 ?>
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/login.php mezzanine_patched_dl-0.12/htdocs/include/login.php
--- dl-0.12/htdocs/include/login.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/login.php	2013-11-24 14:40:59.837818774 +0100
@@ -1,7 +1,7 @@
 <?php
 $act = 'login';
 $ref = "$masterPath?";
-includeTemplate('style/include/header.php', array('title' => T_("Login")));
+includeTemplate("$style/include/header.php", array('title' => T_("Login")));
 
 $error = ((@$_POST["submit"] === $act) && $auth === false);
 $class = "description required" . ($error? " error": "");
@@ -45,5 +45,5 @@
 </div>
 
 <?php
-includeTemplate('style/include/footer.php');
+includeTemplate("$style/include/footer.php");
 ?>
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/pages.php mezzanine_patched_dl-0.12/htdocs/include/pages.php
--- dl-0.12/htdocs/include/pages.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/pages.php	2013-11-24 14:41:37.965861710 +0100
@@ -31,7 +31,7 @@
 {
   global $act, $pages;
   if(empty($vars['title'])) $vars['title'] = $pages[$act];
-  includeTemplate('style/include/header.php', $vars);
+  includeTemplate("$style/include/header.php", $vars);
 }
 
 
@@ -57,7 +57,7 @@
 
   echo ", <a href=\"$adminPath?u\">" . T_("Logout") . "</a>"
     . ", <a href=\"$helpPath\" target=\"_blank\">" . T_("Help") . "</a></div>";
-  includeTemplate('style/include/footer.php', $vars);
+  includeTemplate("$style/include/footer.php", $vars);
 }
 
 ?>
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/sessauth.php mezzanine_patched_dl-0.12/htdocs/include/sessauth.php
--- dl-0.12/htdocs/include/sessauth.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/sessauth.php	2013-11-24 14:39:47.105740305 +0100
@@ -33,7 +33,7 @@
       // remote logout
       header('HTTP/1.0 401 Unauthorized');
       header('WWW-Authenticate: Basic realm="' . $authRealm . '"');
-      includeTemplate('style/include/rmtlogout.php');
+      includeTemplate("$style/include/rmtlogout.php");
       return null;
     }
 
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/ticket.php mezzanine_patched_dl-0.12/htdocs/include/ticket.php
--- dl-0.12/htdocs/include/ticket.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/ticket.php	2013-11-24 14:41:17.261839883 +0100
@@ -18,7 +18,7 @@
 $ref = "$masterPath?t=$id";
 if($DATA === false || isTicketExpired($DATA))
 {
-  includeTemplate("style/include/noticket.php", array('id' => $id));
+  includeTemplate("$style/include/noticket.php", array('id' => $id));
   exit();
 }
 
diff -Nur -x '*.orig' -x '*.rej' dl-0.12/htdocs/include/ticketp.php mezzanine_patched_dl-0.12/htdocs/include/ticketp.php
--- dl-0.12/htdocs/include/ticketp.php	2013-11-22 22:32:25.000000000 +0100
+++ mezzanine_patched_dl-0.12/htdocs/include/ticketp.php	2013-11-24 14:40:13.968768730 +0100
@@ -1,6 +1,6 @@
 <?php
 $act = 'ticketp';
-includeTemplate('style/include/header.php', array('title' => T_("Password required")));
+includeTemplate("$style/include/header.php", array('title' => T_("Password required")));
 
 echo "<p>";
 printf(T_("The ticket %s is protected. Please enter the password to"
@@ -38,5 +38,5 @@
 </div>
 
 <?php
-includeTemplate('style/include/footer.php');
+includeTemplate("$style/include/footer.php");
 ?>

Reply via email to