Author: ralfbecker
New Revision: 33185
URL: http://www.egroupware.org/viewvc/egroupware?rev=33185&view=rev
Log:
removing empty infos in theme-info and allow styling
Modified:
trunk/sitemgr/inc/class.Theme_BO.inc.php
trunk/sitemgr/modules/class.module_template.inc.php
trunk/sitemgr/templates/default/theme_info.tpl
trunk/sitemgr/theme_info.php
Modified: trunk/sitemgr/inc/class.Theme_BO.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/sitemgr/inc/class.Theme_BO.inc.php?rev=33185&r1=33184&r2=33185&view=diff
— trunk/sitemgr/inc/class.Theme_BO.inc.php (original)
+++ trunk/sitemgr/inc/class.Theme_BO.inc.php Sun Nov 28 17:42:44 2010
@@ -75,6 +75,13 @@
$info = array(
‘value’ => $theme,
‘directory’ => $dir,
-
'version' => '', -
'author' => '', -
'creationDate' => '', -
'authorUrl' => '', -
'authorUrl2' => '', -
'copyright' => '', -
'license' => '', ); if (file_exists($dir . SEP . 'main.tpl')) {
@@ -107,9 +114,17 @@
{
if ($name == ‘description’) $name = ‘title’;
$info[$name] = (string)$value;
-
if ($name == 'authorUrl' && substr($info['authorUrl'],0,4) != 'http')
-
if ($name == 'authorUrl') {
-
$info['authorUrl'] = 'http://'.$info['authorUrl'];
-
if (substr($info['authorUrl'],0,4) != 'http') -
{ -
$info['authorUrl'] = 'http://'.$info['authorUrl']; -
} -
static $replace = array( -
'http://www.joomlart.com' => 'http://www.joomlart.com/affiliate/idevaffiliate.php?id=1520' -
); -
$info['authorUrl2'] = strtr($info['authorUrl'],$replace); -
$info['authorUrl'] = parse_url($info['authorUrl'],PHP_URL_HOST); } } elseif($name == 'params')
@@ -133,6 +148,10 @@
}
}
}
-
foreach(array('copyright','license','author','version') as $name) -
{ -
$info[$name.'_style'] = empty($info[$name]) ? ' style="display: none"' : ''; -
} if (file_exists($dir . SEP . 'template_thumbnail.png')) { $info['thumbnail'] = $GLOBALS['Common_BO']->sites->current_site['site_url']."templates/$theme/template_thumbnail.png";
Modified: trunk/sitemgr/modules/class.module_template.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/sitemgr/modules/class.module_template.inc.php?rev=33185&r1=33184&r2=33185&view=diff
— trunk/sitemgr/modules/class.module_template.inc.php (original)
+++ trunk/sitemgr/modules/class.module_template.inc.php Sun Nov 28 17:42:44 2010
@@ -62,8 +62,7 @@
{
$zip = @$arguments[‘zip’] ? $arguments[‘zip’] : ‘zip’;
ob_end_clean(); // discard all previous output
-
$browser =& CreateObject('phpgwapi.browser'); -
$browser->content_header($download.'.zip','application/zip');
-
html::content_header($download.'.zip','application/zip'); passthru('cd '.$GLOBALS['sitemgr_info']['site_dir'].'/templates; '.$zip.' -qr - '.$download); exit; }
@@ -103,13 +102,12 @@
}
if ($show & 2) // gallery
{
-
$t =& CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir('sitemgr'));
-
$t = new Template($GLOBALS['egw']->common->get_tpl_dir('sitemgr'),'remove'); $t->set_file('theme_info','theme_info.tpl'); $t->set_block('theme_info','info_block'); $content .= '<table>'."\n"; foreach ($this->themes as $name => $info) {
-//if ($name == ‘realss’ || $name == ‘peeklime’) echo “$name=
”.print_r($info,true)."\n";
if ($arguments[‘only_allowed’] && !in_array($name,$arguments[‘allowed’]))
{
continue;
@@ -127,14 +125,15 @@
if ($show & 4) // download
{
-
$info['copyright'] .= '<p style="font-size: 10pt;"><a href="'.
-
$info['license'] .= "</p>\n".'<p><a href="'. sitemgr_link(array('download'=>$name)+$_GET).'">'.'<img src="images/zip.gif" border="0" /> '.
-
lang('download as ZIP-archiv').'</a></p>'."\n";
-
lang('download as ZIP-archiv').'</a>'; } $t->set_var($info); $t->set_var(array( 'lang_author' => lang('Author'), 'lang_copyright' => lang('Copyright'), -
'lang_license' => lang('License'), )); $content .= $t->parse('out','info_block'); }
Modified: trunk/sitemgr/templates/default/theme_info.tpl
URL: http://www.egroupware.org/viewvc/egroupware/trunk/sitemgr/templates/default/theme_info.tpl?rev=33185&r1=33184&r2=33185&view=diff
— trunk/sitemgr/templates/default/theme_info.tpl (original)
+++ trunk/sitemgr/templates/default/theme_info.tpl Sun Nov 28 17:42:44 2010
@@ -3,19 +3,16 @@
{name}
| {thumbnail} |
- {name}: Version {version} ({creationDate}) {name}: Version {version} ({creationDate}) {lang_author}: {author}, {authorUrl} +{lang_copyright}: {copyright} +{lang_license}: {license} |