4 echo Usage: $0 PluginName
7 echo "Theme template creator"
13 minus=`echo $1 | tr '[A-Z]' '[a-z]'`
14 themedir=gforge-theme-$minus
15 echo "Creating $1 theme"
16 echo "Creating directory $themedir"
20 mkdir $themedir/debian
22 mkdir $themedir/www/themes
23 mkdir $themedir/www/themes/$minus
25 echo Creating $themedir/debian/dirs
26 cat > $themedir/debian/dirs <<FIN
30 echo Creating $themedir/debian/README.Debian
31 cat > $themedir/debian/README.Debian <<FIN
32 GForge Theme Package for Debian
33 ===============================
35 This is a package installing a theme in the main gforge package.
36 See more documentation in the main package.
37 The purpose is essentially to customize your gforge installation.
40 echo Creating $themedir/debian/changelog
41 cat > $themedir/debian/changelog <<FIN
42 $themedir (3rc2-1) unstable; urgency=low
44 * [Christian] $fullname theme first release
46 -- Christian Bayle <bayle@debian.org> Tue, 13 May 2003 23:31:59 +0200
49 echo Creating $themedir/debian/control
50 cat > $themedir/debian/control <<FIN
54 Maintainer: Christian Bayle <bayle@debian.org>
55 Build-Depends-Indep: debhelper (>= 4.0), sharutils, docbook-to-man
56 Standards-Version: 3.5.8
60 Depends: debconf (>= 0.5.00), gforge-common, gforge-web-apache | gforge-web, gforge-db-postgresql | gforge-db
61 Description: Collaborative development tool - theme package
62 GForge provides many tools to help collaboration in a
63 development project, such as bug-tracking, task management,
64 mailing-lists, CVS repository, forums, support request helper, web
65 page / FTP hosting, release management, etc. All these services are
66 integrated into one web site and managed via a nice web interface.
68 This meta-package installs a gforge theme
71 echo Creating $themedir/debian/copyright
72 cat > $themedir/debian/copyright <<FIN
73 This package was first debianised on Wed, 22 Nov 2000 22:06:35 +0100
74 by Roland Mas <lolando@debian.org>. Work has been constant since
75 then, and the package evolved a great deal. It began to work, for a
78 Copyright info for the GForge software:
80 | The original sources were downloaded from http://www.sourceforge.net/
82 | Authors: The Sourceforge crew at VA Linux. They are many, they
83 | change as time goes by, and they are listed on the Sourceforge
84 | website. Let them be thanked for their work.
88 | This software is copyright (c) 1999-2000 by VA Linux.
90 | You are free to distribute this software under the terms of the GNU
91 | General Public License.
94 The packaging and installing scripts (in the debian/ and deb-specific/
95 directories amongst others) are copyright (c) 2000-2002 by Christian
96 Bayle <bayle@aist.enst.fr> and Roland Mas <lolando@debian.org>. You
97 are free to use and redistribute them under the terms of the GNU
98 General Public License.
100 The themes are copyright (c) 1999-2000 by VA Linux. The Savannah
101 themes are modified versions, and are copyright (c) 2000-2001 by the
102 Free Software Foundation. They all are free software, and you can
103 redistribute them and/or modify them under the terms of the GNU
104 General Public License.
106 On Debian systems, the complete text of the GNU General Public License
107 can be found in the /usr/share/common-licenses directory.
110 echo Creating $themedir/debian/postinst
111 cat > $themedir/debian/postinst <<FIN
113 # postinst script for gforge
117 # set -x # Be verbose, be very verbose.
119 # summary of how this script can be called:
120 # * <postinst> 'configure' <most-recently-configured-version>
121 # * <old-postinst> 'abort-upgrade' <new version>
122 # * <conflictor's-postinst> 'abort-remove' 'in-favour' <package>
124 # * <deconfigured's-postinst> 'abort-deconfigure' 'in-favour'
125 # <failed-install-package> <version> 'removing'
126 # <conflicting-package> <version>
127 # for details, see /usr/share/doc/packaging-manual/
129 # quoting from the policy:
130 # Any necessary prompting should almost always be confined to the
131 # post-installation script, and should be protected with a conditional
132 # so that unnecessary prompting doesn't happen if a package's
133 # installation fails and the 'postinst' is called with 'abort-upgrade',
134 # 'abort-remove' or 'abort-deconfigure'.
136 . /usr/share/debconf/confmodule
141 /usr/lib/gforge/bin/register-theme "$minus" "$fullname"
144 abort-upgrade|abort-remove|abort-deconfigure)
148 echo "postinst called with unknown argument \'\$1'" >&2
153 # dh_installdeb will replace this with shell code automatically
154 # generated by other debhelper scripts.
161 echo Creating $themedir/debian/rules
162 cat > $themedir/debian/rules <<FIN
164 # debian/rules that uses debhelper.
165 # GNU copyright 1997 to 1999 by Joey Hess (sample file)
166 # Copyright 2000 to 2002 by Roland Mas and Christian Bayle for the GForge package
168 # Uncomment this to turn on verbose mode.
171 # This is the debhelper compatability version to use.
174 configure: configure-stamp
178 touch configure-stamp
180 build: configure-stamp build-stamp
188 rm -f build-stamp configure-stamp
198 cp -r www \$(CURDIR)/debian/$themedir/usr/share/gforge/
199 find \$(CURDIR)/debian/$themedir/usr/share/gforge/ -name CVS -type d | xargs rm -rf
200 find \$(CURDIR)/debian/$themedir/usr/share/gforge/www -type d -exec chmod 0755 {} \;
201 find \$(CURDIR)/debian/$themedir/usr/share/gforge/www -type f -exec chmod 0644 {} \;
202 mkdir -p \$(CURDIR)/debian/$themedir/usr/lib/gforge/bin
204 binary-indep: build install
231 binary-arch: build install
232 # (No architecture-dependent files for GForge, doing nothing here)
234 binary: binary-indep binary-arch
235 .PHONY: build clean binary-indep binary-arch binary install configure
238 echo Creating $themedir/debian/prerm
239 cat > $themedir/debian/prerm <<FIN
241 # prerm script for gforge-theme
243 # see: dh_installdeb(1)
247 # summary of how this script can be called:
249 # * <old-prerm> 'upgrade' <new-version>
250 # * <new-prerm> 'failed-upgrade' <old-version>
251 # * <conflictor's-prerm> 'remove' 'in-favour' <package> <new-version>
252 # * <deconfigured's-prerm> 'deconfigure' 'in-favour'
253 # <package-being-installed> <version> 'removing'
254 # <conflicting-package> <version>
255 # for details, see http://www.debian.org/doc/debian-policy/ or
256 # the debian-policy package
261 /usr/lib/gforge/bin/unregister-theme $minus
263 upgrade|failed-upgrade)
266 echo "prerm called with unknown argument \'\$1'" >&2
271 # dh_installdeb will replace this with shell code automatically
272 # generated by other debhelper scripts.
281 echo Creating $themedir/www/themes/$minus/Theme.class
282 cat > $themedir/www/themes/$minus/Theme.class <<FIN
287 * SourceForge: Breaking Down the Barriers to Open Source Development
288 * Copyright 1999-2001 (c) VA Linux Systems
289 * http://sourceforge.net
294 class Theme extends Layout {
297 * Theme() - Constructor
300 // Parent constructor
303 // The root location for images
304 \$this->imgroot = '/themes/gforge/images/';
306 // The content background color
308 \$this->COLOR_CONTENT_BACK= '#BBDDFF';
310 // The background color
311 \$this->COLOR_BACK= '#FFFFFF';
313 // The primary light background color
315 \$this->COLOR_LTBACK1= '#C79FA9';
317 // The secondary light background color
318 \$this->COLOR_LTBACK2= '#E0E0E0';
320 // The HTML box title color
321 \$this->COLOR_HTMLBOX_TITLE = '#C70036';
323 // The HTML box background color
324 \$this->COLOR_HTMLBOX_BACK = '#C79FA9';
326 // Font Face Constants
328 \$this->FONT_CONTENT = 'Helvetica';
329 // The HTML box title font
330 \$this->FONT_HTMLBOX_TITLE = 'Helvetica';
331 // The HTML box title font color
332 \$this->FONTCOLOR_HTMLBOX_TITLE = '#C6BCBF';
333 // The content font color
334 \$this->FONTCOLOR_CONTENT = '#000000';
335 //The smaller font size
336 \$this->FONTSIZE_SMALLER='x-small';
337 //The smallest font size
338 \$this->FONTSIZE_SMALLEST='xx-small';
339 //The HTML box title font size
340 \$this->FONTSIZE_HTMLBOX_TITLE = 'small';
345 * header() - "steel theme" top of page
347 * @param array Header parameters array
349 function header(\$params) {
352 if (!\$params['title']) {
353 \$params['title'] = "GForge";
355 \$params['title'] = "GForge: " . \$params['title'];
358 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
360 <html lang="<?php echo \$Language->getLanguageCode(); ?>">
362 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo \$Language->getEncoding(); ?>">
363 <TITLE><?php echo \$params['title']; ?></TITLE>
364 <SCRIPT language="JavaScript">
366 function help_window(helpurl) {
367 HelpWin = window.open( '<?php echo ((session_issecure()) ? 'https://'.
368 \$GLOBALS['sys_default_domain'] : 'http://'.\$GLOBALS['sys_default_domain']); ?>' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
371 <?php plugin_hook ("javascript",false) ; ?>
378 WARNING - changing this font call can affect
385 //gets font from Language Object
386 \$site_fonts=\$GLOBALS['Language']->getFont();
390 <style type="text/css">
392 OL,UL,P,BODY,TD,TR,TH,FORM { font-family: <?php echo \$site_fonts; ?>; font-size:<?php echo \$this->FONTSIZE; ?>; color: <?php echo \$this->FONTCOLOR_CONTENT ?>; }
394 H1 { font-size: x-large; font-family: <?php echo \$site_fonts; ?>; }
395 H2 { font-size: large; font-family: <?php echo \$site_fonts; ?>; }
396 H3 { font-size: medium; font-family: <?php echo \$site_fonts; ?>; }
397 H4 { font-size: small; font-family: <?php echo \$site_fonts; ?>; }
398 H5 { font-size: x-small; font-family: <?php echo \$site_fonts; ?>; }
399 H6 { font-size: xx-small; font-family: <?php echo \$site_fonts; ?>; }
401 PRE,TT { font-family: courier,sans-serif }
403 A:link { text-decoration:none }
404 A:visited { text-decoration:none }
405 A:active { text-decoration:none }
406 A:hover { text-decoration:underline; color:#FF0000 }
408 .titlebar { color: #000000; text-decoration: none; font-weight: bold; }
409 A.tablink { color: #000000; text-decoration: none; font-weight: bold; font-size: <?php echo \$this->FONTSIZE_SMALLER; ?>; }
410 A.tablink:visited { color: #000000; text-decoration: none; font-weight: bold; font-size: <?php
411 echo \$this->FONTSIZE_SMALLER; ?>; }
412 A.tablink:hover { text-decoration: none; color: #000000; font-weight: bold; font-size: <?php
413 echo \$this->FONTSIZE_SMALLER; ?>; }
414 A.tabsellink { color: #000000; text-decoration: none; font-weight: bold; font-size: <?php
415 echo \$this->FONTSIZE_SMALLER; ?>; }
416 A.tabsellink:visited { color: #000000; text-decoration: none; font-weight: bold; font-size: <?php
417 echo \$this->FONTSIZE_SMALLER; ?>; }
418 A.tabsellink:hover { text-decoration: none; color: #000000; font-weight: bold; font-size: <?php
419 echo \$this->FONTSIZE_SMALLER; ?>; }
425 <BODY TOPMARGIN="3" MARGINHEIGHT="3" MARGINWIDTH="3" LEFTMARGIN="3" RIGHTMARGIN="3" bgcolor="<?php echo \$this->COLOR_CONTENT_BACK; ?>">
427 <table border=0 width="100%" cellspacing="0" cellpadding=0>
430 <td><a href="/"><?php echo html_image('logo.png',275,75,array('border'=>'0')); ?></a></td>
431 <td><?php echo \$this->searchBox(); ?></td>
432 <td align="RIGHT"><?php
433 if (session_loggedin()) {
435 <a href="/account/logout.php">Logout</a><br />
436 <a href="/account/">My Account</a>
440 <a href="/account/login.php">Login</a><br />
441 <a href="/account/register.php">New Account</a>
446 <td> </td>
451 <table border=0 width="100%" cellspacing="0" cellpadding=0>
457 <?php echo \$this->outerTabs(\$params); ?>
464 <td align=LEFT bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/topleft.png" height=9 width=9></td>
465 <td bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=30><img src="<?php echo \$this->imgroot; ?>clear.png" width=30 height=1></td>
466 <td bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width=1 height=1></td>
467 <td bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=30><img src="<?php echo \$this->imgroot; ?>clear.png" width=30 height=1></td>
468 <td align=RIGHT bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/topright.png" height=9 width=9></td>
473 <!-- Outer body row -->
475 <td bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width=10 height=1></td>
476 <td valign=TOP width="99%" bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" colspan=3>
478 <!-- Inner Tabs / Shell -->
480 <table border=0 width="100%" cellspacing="0" cellpadding=0>
484 if (\$params['group']) {
492 echo \$this->projectTabs(\$params['toptab'],\$params['group']);
504 <td align=LEFT bgcolor="<?php echo \$this->COLOR_BACK; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/topleft-inner.png" height=9 width=9></td>
505 <td bgcolor="<?php echo \$this->COLOR_BACK; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width=1 height=1></td>
506 <td align=RIGHT bgcolor="<?php echo \$this->COLOR_BACK; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/topright-inner.png" height=9 width=9></td>
510 <td bgcolor="<?php echo \$this->COLOR_BACK; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width=10 height=1></td>
511 <td valign=TOP width="99%" bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>">
517 function footer(\$params) {
521 <!-- end main body row -->
525 <td width=10 bgcolor="<?php echo \$this->COLOR_BACK; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width=2 height=1></td>
528 <td align=LEFT bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=10"><img src="<?php echo \$this->imgroot; ?>tabs/bottomleft-inner.png" height=11 width=11></td>
529 <td bgcolor="<?php echo \$this->COLOR_BACK; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width="1" height=1></td>
530 <td align=RIGHT bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/bottomright-inner.png" height=11 width=11></td>
534 <!-- end inner body row -->
537 <td width=10 bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>"><img src="<?php echo \$this->imgroot; ?>clear.png" width=2 height=1></td>
540 <td align=LEFT bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/bottomleft.png" height=9 width=9></td>
541 <td bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" colspan=3><img src="<?php echo \$this->imgroot; ?>clear.png" width="1" height=1></td>
542 <td align=RIGHT bgcolor="<?php echo \$this->COLOR_LTBACK2; ?>" width=10><img src="<?php echo \$this->imgroot; ?>tabs/bottomright.png" height=9 width=9></td>
553 * boxTop() - Top HTML box
555 * @param string Box title
556 * @param bool Whether to echo or return the results
557 * @param string The box background color
559 function boxTop(\$title) {
561 <table cellspacing="0" cellpadding="1" width="100%" border="0" bgcolor="' .\$this->COLOR_HTMLBOX_TITLE.'">
563 <table cellspacing="0" cellpadding="2" width="100%" border="0" bgcolor="'. \$this->COLOR_HTMLBOX_BACK.'">
564 <tr bgcolor="'.\$this->COLOR_HTMLBOX_TITLE.'" align="center">
565 <td colspan=2><SPAN class=titlebar>'.\$title.'</SPAN></td>
572 * boxMiddle() - Middle HTML box
574 * @param string Box title
575 * @param string The box background color
577 function boxMiddle(\$title) {
581 <tr bgcolor="'.\$this->COLOR_HTMLBOX_TITLE.'" align="center">
582 <td colspan=2><SPAN class=titlebar>'.\$title.'</SPAN></td>
584 <tr align=left bgcolor="'. \$this->COLOR_HTMLBOX_BACK .'">
589 * boxGetAltRowStyle() - Get an alternating row style for tables
591 * @param int Row number
593 function boxGetAltRowStyle(\$i) {
595 return 'BGCOLOR="#FFFFFF"';
597 return 'BGCOLOR="' . \$this->COLOR_LTBACK1 . '"';
602 * boxBottom() - Bottom HTML box
604 * @param bool Whether to echo or return the results
606 function boxBottom() {
619 // c-file-style: "bsd"