# R33185 - in /trunk/sitemgr: ./ inc/ modules/ templates/default/

**URL:** <https://help.egroupware.org/t/r33185-in-trunk-sitemgr-inc-modules-templates-default/42488>\
**Category:** eGW-svn\
**Created:** [November 28, 2010, 4:42pm UTC](https://help.egroupware.org/t/r33185-in-trunk-sitemgr-inc-modules-templates-default/42488 "2010-11-28T16:42:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralfbecker\_sf](https://help.egroupware.org/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@ralfbecker\_sf](https://help.egroupware.org/u/ralfbecker_sf)\
**Post date:** [November 28, 2010, 4:42pm UTC](https://help.egroupware.org/t/r33185-in-trunk-sitemgr-inc-modules-templates-default/42488/1 "2010-11-28T16:42:44Z")

</div>

Author: ralfbecker  
New Revision: 33185

URL: [http://www.egroupware.org/viewvc/egroupware?rev=33185&view=rev](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](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](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](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}

 - + 

# Modified: trunk/sitemgr/theme\_info.php URL: [http://www.egroupware.org/viewvc/egroupware/trunk/sitemgr/theme\_info.php?rev=33185&r1=33184&r2=33185&view=diff](http://www.egroupware.org/viewvc/egroupware/trunk/sitemgr/theme_info.php?rev=33185&r1=33184&r2=33185&view=diff)

— trunk/sitemgr/theme\_info.php (original)  
+++ trunk/sitemgr/theme\_info.php Sun Nov 28 17:42:44 2010  
@@ -23,10 +23,6 @@  
$GLOBALS[‘Common\_BO’] = CreateObject(‘sitemgr.Common\_BO’);  
$GLOBALS[‘Common\_BO’]-\>sites-\>set\_currentsite(False,‘Administration’);

-$replace = array(

- ‘[http://www.joomlart.com](http://www.joomlart.com)’ =\> ‘[http://www.joomlart.com/affiliate/idevaffiliate.php?id=1520](http://www.joomlart.com/affiliate/idevaffiliate.php?id=1520)’  
-);
- 

$GLOBALS[‘egw’]-\>template-\>set\_file(‘theme\_info’,‘theme\_info.tpl’);  
if ($\_GET[‘theme’] && ($info = $GLOBALS[‘Common\_BO’]-\>theme-\>getThemeInfos($\_GET[‘theme’])))  
{  
@@ -36,7 +32,6 @@  
‘lang\_author’ =\> lang(‘Author’),  
‘lang\_copyright’ =\> lang(‘Copyright’),  
‘lang\_license’ =\> lang(‘License’),

- 

```
  'authorUrl2' => strtr($info['authorUrl'], $replace),

```

));  
}  
$GLOBALS[‘egw’]-\>template-\>pfp(‘out’,‘theme\_info’);

* * *

Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!  
Tap into the largest installed PC base & get more eyes on your game by  
optimizing for Intel® Graphics Technology. Get started today with the  
Intel® Software Partner Program. Five $500 cash prizes are up for grabs.  
[http://p.sf.net/sfu/intelisp-dev2dev](http://p.sf.net/sfu/intelisp-dev2dev)

* * *

eGroupWare-cvs mailing list  
[eGroupWare-cvs@lists.sourceforge.net](mailto:eGroupWare-cvs@lists.sourceforge.net)  
[https://lists.sourceforge.net/lists/listinfo/egroupware-cvs](https://lists.sourceforge.net/lists/listinfo/egroupware-cvs)

| {thumbnail} | - 

**{name}** : Version {version} ({creationDate})  
- {title}  
-   
- **{lang\_author}** : {author}, {authorUrl}  
-   
- **{lang\_copyright}** :  
{copyright}  
-   
- **{lang\_license}** : {license}

+ 

**{name}** : Version {version} ({creationDate})  
+ {title}

+ 

**{lang\_author}** : {author}, {authorUrl}

+ 

**{lang\_copyright}** : {copyright}

+ 

**{lang\_license}** : {license}

 |
