View Issue Details

IDProjectCategoryView StatusLast Update
0008799mantisbtreportspublic2008-07-29 06:44
ReporterBorszczuk Assigned Tojreese  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.1.1 
Fixed in Version1.2.0a1 
Summary0008799: Top logo (mantis_logo.gif) and URL it points to shall be configurable
Description

Top logo (mantis_logo.gif) and URL it points to shall be configurable. I want to put a company logo here (or get rid of this log at all as it takes far too much pixels), but I'd like to do this in much cleaner why than by hacking core/html_api.php - a config for URL and logo path would be nice

TagsNo tags attached.
Attached Files
mantis-logo.patch (1,948 bytes)   
diff -r mantis-1.1.0/config_defaults_inc.php mantis-1.1.1/config_defaults_inc.php
143a144,163
> 	#############################
> 	# Look & Feel Customizations
> 	#############################
>
> 	# Parameters of the top logo. Set g_top_logo_enabled to OFF to get rid of the logo completely
> 	$g_logo_enabled		= ON;
> 	$g_logo_file		= 'images/mantis_logo.gif';
> 	$g_logo_width		= 242;
> 	$g_logo_height		= 102;
>
> 	# set to OFF if you do not want image to redirect to other location when clicked
> 	$g_logo_url_enabled	= ON;
> 	$g_logo_url		= 'http://www.mantisbt.org/';
>
> 	# position of the logo on the LOGIN page and the main page. These are HTML values of 'align'
> 	# http://www.w3.org/TR/html401/present/graphics.html#h-15.1.2
> 	# use either 'left', 'right' or 'center'
> 	$g_logo_main_align	= 'left';
> 	$g_logo_login_align	= 'center';
>
diff -r mantis-1.1.0/core/html_api.php mantis-1.1.1/core/html_api.php
310,314c310,315
< 			if ( is_page_name( 'login_page' ) ) {
< 				$t_align = 'center';
< 			} else {
< 				$t_align = 'left';
< 			}
---
> 			if( config_get('logo_enabled') == ON ) {
> 				if ( is_page_name( 'login_page' ) ) {
> 					$t_align = config_get('logo_login_align');
> 				} else {
> 					$t_align = config_get('logo_main_align');
> 				}
316,318c317,324
< 			echo '<div align="', $t_align, '">';
< 			echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img border="0" width="242" height="102" alt="Mantis Bugtracker" src="images/mantis_logo.gif" /></a>';
< 			echo '</div>';
---
> 				$image_tag = sprintf('<img border="0" width="%d" height="%d" src="%s">', config_get('logo_width'), config_get('logo_height'), config_get('logo_file'));
>
> 				if( config_get('logo_url_enabled') == ON ) {
> 					printf( '<div align="%s"><a href="%s">%s</a></div>', $t_align, config_get('logo_url'), $image_tag );
> 				} else {
> 					printf( '<div align="%s">%s</div>', $t_align, $image_tag );
> 				}
> 			}
mantis-logo.patch (1,948 bytes)   
mantis-logo-and-button.patch (3,944 bytes)   
diff -r mantis-1.1.0/config_defaults_inc.php mantis-1.1.1/config_defaults_inc.php
143a144,178
> 	#############################
> 	# Look & Feel Customizations
> 	#############################
>
> 	# Parameters of the top logo. Set g_logo_top_enabled to OFF to get rid of the logo completely
> 	# logo_file can be either local file or fully qualified URL to remote image
> 	$g_logo_top_enabled		= ON;
> 	$g_logo_top_file		= 'images/mantis_logo.gif';
> 	$g_logo_top_alt			= 'Mantis Bugtracker';
>
> 	# Set to OFF if you do not want image dimension to be specified in HTML tags
> 	$g_logo_top_size_enforce	= ON;
> 	$g_logo_top_size_width		= 242;
> 	$g_logo_top_size_height		= 102;
>
> 	# set to OFF if you do not want image to redirect to other location when clicked
> 	$g_logo_top_url_enabled		= ON;
> 	$g_logo_top_url			= 'http://www.mantisbt.org/';
>
> 	# position of the logo on the LOGIN page and the main page. These are HTML values of 'align'
> 	# http://www.w3.org/TR/html401/present/graphics.html#h-15.1.2
> 	# use either 'left', 'right' or 'center'
> 	$g_logo_top_main_align	= 'left';
> 	$g_logo_top_login_align	= 'center';
>
> 	# small bottom logo (button)
> 	$g_logo_button_enabled		= ON;
> 	$g_logo_button_file		= 'images/mantis_logo_button.gif';
> 	$g_logo_button_alt		= 'Powered by Mantis Bugtracker';
> 	$g_logo_button_size_enforce	= ON;
> 	$g_logo_button_size_width	= 88;
> 	$g_logo_button_size_height	= 35;
> 	$g_logo_button_url_enabled	= ON;
> 	$g_logo_button_url		= 'http://www.mantisbt.org/';
>
diff -r mantis-1.1.0/core/html_api.php mantis-1.1.1/core/html_api.php
310,314c310,315
< 			if ( is_page_name( 'login_page' ) ) {
< 				$t_align = 'center';
< 			} else {
< 				$t_align = 'left';
< 			}
---
> 			if( config_get('logo_top_enabled') == ON ) {
> 				if ( is_page_name( 'login_page' ) ) {
> 					$t_align = config_get('logo_top_login_align');
> 				} else {
> 					$t_align = config_get('logo_top_main_align');
> 				}
316,318c317,328
< 			echo '<div align="', $t_align, '">';
< 			echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img border="0" width="242" height="102" alt="Mantis Bugtracker" src="images/mantis_logo.gif" /></a>';
< 			echo '</div>';
---
> 				if( config_get('logo_top_size_enforce') == ON ) {
> 					$image_tag = sprintf('<img border="0" width="%1$d" height="%2$d" src="%3$s" alt="%4$s" title="%4$s">', config_get('logo_top_size_width'), config_get('logo_top_size_height'), config_get('logo_top_file'), config_get('logo_top_alt'));
> 				} else {
> 					 $image_tag = sprintf('<img border="0" src="%1$s" alt="%2$s" title="%2$s">', config_get('logo_top_file'), config_get('logo_top_alt'));
> 				}
>
> 				if( config_get('logo_top_url_enabled') == ON ) {
> 					printf( '<div align="%s"><a href="%s">%s</a></div>', $t_align, config_get('logo_top_url'), $image_tag );
> 				} else {
> 					printf( '<div align="%s">%s</div>', $t_align, $image_tag );
> 				}
> 			}
470c480,500

< 		echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="images/mantis_logo_button.gif" width="88" height="35" alt="Powered by Mantis Bugtracker" border="0" /></a>';
---
>
> 		# bottom logo (button)
> 		if( config_get('logo_button_enabled') == ON ) {
>
> 			if( config_get('logo_button_size_enforce') == ON ) {
> 				$image_tag = sprintf('<img border="0" width="%1$d" height="%2$d" src="%3$s" alt="%4$s" title="%4$s">',
> 							config_get('logo_button_size_width'), config_get('logo_button_size_height'), config_get('logo_button_file'), config_get('logo_button_alt') );
> 			} else {
> 				$image_tag = sprintf('<img border="0" src="%1$s" alt="%2$s" title="%2$s">', config_get('logo_button_file'), config_get('logo_button_alt') );
> 			}
>
> 			if( config_get('logo_button_url_enabled') == ON ) {
> 				printf('<a href="%s">%s</a>', config_get('logo_button_url'), $image_tag);
> 			} else {
> 				echo $image_tag;
> 			}
>
> 		} else {
> 			echo '&nbsp;';
> 		}
>
mantis-logo-and-button.patch (3,944 bytes)   
mantis-logo-and-button-and-favicon.patch (4,341 bytes)   
diff -r mantis-1.1.0/config_defaults_inc.php mantis-1.1.1/config_defaults_inc.php
143a144,183
> 	#############################
> 	# Look & Feel Customizations
> 	#############################
>
> 	# Parameters of the top logo. Set g_logo_top_enabled to OFF to get rid of the logo completely
> 	# logo_file can be either local file or fully qualified URL to remote image
> 	$g_logo_top_enabled		= ON;
> 	$g_logo_top_file		= 'images/mantis_logo.gif';
> 	$g_logo_top_alt			= 'Mantis Bugtracker';
>
> 	# Set to OFF if you do not want image dimension to be specified in HTML tags
> 	$g_logo_top_size_enforce	= ON;
> 	$g_logo_top_size_width		= 242;
> 	$g_logo_top_size_height		= 102;
>
> 	# set to OFF if you do not want image to redirect to other location when clicked
> 	$g_logo_top_url_enabled		= ON;
> 	$g_logo_top_url			= 'http://www.mantisbt.org/';
>
> 	# position of the logo on the LOGIN page and the main page. These are HTML values of 'align'
> 	# http://www.w3.org/TR/html401/present/graphics.html#h-15.1.2
> 	# use either 'left', 'right' or 'center'
> 	$g_logo_top_main_align	= 'left';
> 	$g_logo_top_login_align	= 'center';
>
> 	# small bottom logo (button)
> 	$g_logo_button_enabled		= ON;
> 	$g_logo_button_file		= 'images/mantis_logo_button.gif';
> 	$g_logo_button_alt		= 'Powered by Mantis Bugtracker';
> 	$g_logo_button_size_enforce	= ON;
> 	$g_logo_button_size_width	= 88;
> 	$g_logo_button_size_height	= 35;
> 	$g_logo_button_url_enabled	= ON;
> 	$g_logo_button_url		= 'http://www.mantisbt.org/';
>
>
> 	# favicon - "image/x-icon" - windows icon (.ico) file
> 	$g_favicon_enabled	= ON;
> 	$g_favicon_file		= 'images/favicon.ico';
>
diff -r mantis-1.1.0/core/html_api.php mantis-1.1.1/core/html_api.php
115c115,119
< 		echo '<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />';
---
>
> 		if( config_get('favicon_enabled') == ON ) {
> 			printf('<link rel="shortcut icon" href="%s" type="image/x-icon" />', config_get('favicon_file'));
> 		}
>
310,314c314,325
< 			if ( is_page_name( 'login_page' ) ) {
< 				$t_align = 'center';
< 			} else {
< 				$t_align = 'left';
< 			}
---
> 			if( config_get('logo_top_enabled') == ON ) {
> 				if ( is_page_name( 'login_page' ) ) {
> 					$t_align = config_get('logo_top_login_align');
> 				} else {
> 					$t_align = config_get('logo_top_main_align');
> 				}
>
> 				if( config_get('logo_top_size_enforce') == ON ) {
> 					$image_tag = sprintf('<img border="0" width="%1$d" height="%2$d" src="%3$s" alt="%4$s" title="%4$s">', config_get('logo_top_size_width'), config_get('logo_top_size_height'), config_get('logo_top_file'), config_get('logo_top_alt'));
> 				} else {
> 					 $image_tag = sprintf('<img border="0" src="%1$s" alt="%2$s" title="%2$s">', config_get('logo_top_file'), config_get('logo_top_alt'));
> 				}
316,318c327,332
< 			echo '<div align="', $t_align, '">';
< 			echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img border="0" width="242" height="102" alt="Mantis Bugtracker" src="images/mantis_logo.gif" /></a>';

< 			echo '</div>';
---
> 				if( config_get('logo_top_url_enabled') == ON ) {
> 					printf( '<div align="%s"><a href="%s">%s</a></div>', $t_align, config_get('logo_top_url'), $image_tag );
> 				} else {
> 					printf( '<div align="%s">%s</div>', $t_align, $image_tag );
> 				}
> 			}
470c484,504
< 		echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="images/mantis_logo_button.gif" width="88" height="35" alt="Powered by Mantis Bugtracker" border="0" /></a>';
---
>
> 		# bottom logo (button)
> 		if( config_get('logo_button_enabled') == ON ) {
>
> 			if( config_get('logo_button_size_enforce') == ON ) {
> 				$image_tag = sprintf('<img border="0" width="%1$d" height="%2$d" src="%3$s" alt="%4$s" title="%4$s">',
> 							config_get('logo_button_size_width'), config_get('logo_button_size_height'), config_get('logo_button_file'), config_get('logo_button_alt') );
> 			} else {
> 				$image_tag = sprintf('<img border="0" src="%1$s" alt="%2$s" title="%2$s">', config_get('logo_button_file'), config_get('logo_button_alt') );
> 			}
>
> 			if( config_get('logo_button_url_enabled') == ON ) {
> 				printf('<a href="%s">%s</a>', config_get('logo_button_url'), $image_tag);
> 			} else {
> 				echo $image_tag;
> 			}
>
> 		} else {
> 			echo '&nbsp;';
> 		}
>
mantis-logo-and-button-and-favicon-1.1.1.patch (4,278 bytes)   
diff -r mantis-1.1.1/config_defaults_inc.php mantis-1.1.1-borszczuk/config_defaults_inc.php
1275a1276,1311
> 	# Parameters of the top logo. Set g_logo_top_enabled to OFF to get rid of the logo completely
> 	# logo_file can be either local file or fully qualified URL to remote image
> 	$g_logo_top_enabled		= ON;
> 	$g_logo_top_file		= 'images/mantis_logo.gif';
> 	$g_logo_top_alt			= 'Mantis Bugtracker';
> 
> 	# Set to OFF if you do not want image dimension to be specified in HTML tags
> 	$g_logo_top_size_enforce	= ON;
> 	$g_logo_top_size_width		= 242;
> 	$g_logo_top_size_height		= 102;
> 
> 	# set to OFF if you do not want image to redirect to other location when clicked
> 	$g_logo_top_url_enabled		= ON;
> 	$g_logo_top_url			= 'http://www.mantisbt.org/';
> 
> 	# position of the logo on the LOGIN page and the main page. These are HTML values of 'align'
> 	# http://www.w3.org/TR/html401/present/graphics.html#h-15.1.2
> 	# use either 'left', 'right' or 'center'
> 	$g_logo_top_main_align	= 'left';
> 	$g_logo_top_login_align	= 'center';
> 
> 	# small bottom logo (button)
> 	$g_logo_button_enabled		= ON;
> 	$g_logo_button_file		= 'images/mantis_logo_button.gif';
> 	$g_logo_button_alt		= 'Powered by Mantis Bugtracker';
> 	$g_logo_button_size_enforce	= ON;
> 	$g_logo_button_size_width	= 88;
> 	$g_logo_button_size_height	= 35;
> 	$g_logo_button_url_enabled	= ON;
> 	$g_logo_button_url		= 'http://www.mantisbt.org/';
> 
> 
> 	# favicon - "image/x-icon" - windows icon (.ico) file
> 	$g_favicon_enabled	= ON;
> 	$g_favicon_file		= 'images/favicon.ico';
> 
diff -r mantis-1.1.1/core/html_api.php mantis-1.1.1-borszczuk/core/html_api.php
115c115,119
< 		echo '<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />';
---
> 
> 		if( config_get('favicon_enabled') == ON ) {
> 			printf('<link rel="shortcut icon" href="%s" type="image/x-icon" />', config_get('favicon_file'));
> 		}
> 
310,314c314,325
< 			if ( is_page_name( 'login_page' ) ) {
< 				$t_align = 'center';
< 			} else {
< 				$t_align = 'left';
< 			}
---
> 			if( config_get('logo_top_enabled') == ON ) {
> 				if ( is_page_name( 'login_page' ) ) {
> 					$t_align = config_get('logo_top_login_align');
> 				} else {
> 					$t_align = config_get('logo_top_main_align');
> 				}
> 
> 				if( config_get('logo_top_size_enforce') == ON ) {
> 					$image_tag = sprintf('<img border="0" width="%1$d" height="%2$d" src="%3$s" alt="%4$s" title="%4$s">', config_get('logo_top_size_width'), config_get('logo_top_size_height'), config_get('logo_top_file'), config_get('logo_top_alt'));
> 				} else {
> 					 $image_tag = sprintf('<img border="0" src="%1$s" alt="%2$s" title="%2$s">', config_get('logo_top_file'), config_get('logo_top_alt'));
> 				}
316,318c327,332
< 			echo '<div align="', $t_align, '">';
< 			echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img border="0" width="242" height="102" alt="Mantis Bugtracker" src="images/mantis_logo.gif" /></a>';
< 			echo '</div>';
---
> 				if( config_get('logo_top_url_enabled') == ON ) {
> 					printf( '<div align="%s"><a href="%s">%s</a></div>', $t_align, config_get('logo_top_url'), $image_tag );
> 				} else {
> 					printf( '<div align="%s">%s</div>', $t_align, $image_tag );
> 				}
> 			}
470c484,504
< 		echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="images/mantis_logo_button.gif" width="88" height="35" alt="Powered by Mantis Bugtracker" border="0" /></a>';
---
> 
> 		# bottom logo (button)
> 		if( config_get('logo_button_enabled') == ON ) {
> 
> 			if( config_get('logo_button_size_enforce') == ON ) {
> 				$image_tag = sprintf('<img border="0" width="%1$d" height="%2$d" src="%3$s" alt="%4$s" title="%4$s">',
> 							config_get('logo_button_size_width'), config_get('logo_button_size_height'), config_get('logo_button_file'), config_get('logo_button_alt') );
> 			} else {
> 				$image_tag = sprintf('<img border="0" src="%1$s" alt="%2$s" title="%2$s">', config_get('logo_button_file'), config_get('logo_button_alt') );
> 			}
> 
> 			if( config_get('logo_button_url_enabled') == ON ) {
> 				printf('<a href="%s">%s</a>', config_get('logo_button_url'), $image_tag);
> 			} else {
> 				echo $image_tag;
> 			}
> 
> 		} else {
> 			echo '&nbsp;';
> 		}
> 
mantis-branding-2008-01-27.patch (3,237 bytes)   
diff --git a/config_defaults_inc.php b/config_defaults_inc.php
index b62e08f..e0ba8f5 100644
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -471,6 +471,12 @@
 	$g_window_title			= 'Mantis';	 # browser window title
 	$g_page_title			= '';	 # title at top of html page (empty by default, since there is a logo now)
 
+	# --- site branding ---------------
+	$g_favicon_image		= 'images/favicon.ico';
+	$g_logo_image			= 'images/mantis_logo.gif';
+	$g_logo_url				= 'http://www.mantisbt.org';
+	$g_show_bottom_logo		= ON;
+
 	# --- advanced views --------------
 	# BOTH, SIMPLE_ONLY, ADVANCED_ONLY
 	$g_show_report			= BOTH;
diff --git a/core/html_api.php b/core/html_api.php
index 6b15e4c..2b358ec 100644
--- a/core/html_api.php
+++ b/core/html_api.php
@@ -112,7 +112,10 @@
 		html_content_type();
 		include( config_get( 'meta_include_file' ) );
 		html_rss_link();
-		echo '<link rel="shortcut icon" href="', helper_mantis_url( 'images/favicon.ico' ), '" type="image/x-icon" />';
+		$t_favicon_image = config_get( 'favicon_image' );
+		if ( !is_blank( $t_favicon_image ) ) {
+			echo '<link rel="shortcut icon" href="', helper_mantis_url( $t_favicon_image ), '" type="image/x-icon" />';
+		}
 		html_title( $p_page_title );
 		html_head_javascript();
 	}
@@ -316,10 +319,23 @@
 	# (10) Print a user-defined banner at the top of the page if there is one.
 	function html_top_banner() {
 		$t_page = config_get( 'top_include_page' );
+		$t_logo_image = config_get( 'logo_image' );
+		$t_logo_url = config_get( 'logo_url' );
+
+		if ( is_blank( $t_logo_image ) ) {
+			$t_show_logo = false;
+		} else {
+			$t_show_logo = true;
+			if ( is_blank( $t_logo_url ) ) {
+				$t_show_url = false;
+			} else {
+				$t_show_url = true;
+			}
+		}
 
 		if ( !is_blank( $t_page ) && file_exists( $t_page ) && !is_dir( $t_page ) ) {
 			include( $t_page );
-		} else {
+		} else if ( $t_show_logo ) {
 			if ( is_page_name( 'login_page' ) ) {
 				$t_align = 'center';
 			} else {
@@ -327,7 +343,11 @@
 			}
 
 			echo '<div align="', $t_align, '">';
-			echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img border="0" alt="Mantis Bugtracker" src="' . helper_mantis_url( 'images/mantis_logo.gif' ) . '" /></a>';
+			if ( $t_show_url )
+				echo '<a href="', config_get( 'logo_url' ), '">';
+			echo '<img border="0" alt="Mantis Bugtracker" src="' . helper_mantis_url( config_get( 'logo_image' ) ) . '" />';
+			if ( $t_show_url )
+				echo '</a>';
 			echo '</div>';
 		}
 
@@ -481,9 +501,11 @@
 			}
 		}
 
-		echo '</td><td><div align="right">';
-		echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="' . helper_mantis_url( 'images/mantis_logo_button.gif' ) . '" width="88" height="35" alt="Powered by Mantis Bugtracker" border="0" /></a>';
-		echo '</div></td></tr></table>';
+		if ( ON == config_get( 'show_bottom_logo' ) ) {
+			echo '</td><td><div align="right">';
+			echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="' . helper_mantis_url( 'images/mantis_logo_button.gif' ) . '" width="88" height="35" alt="Powered by Mantis Bugtracker" border="0" /></a>';
+			echo '</div></td></tr></table>';
+		}
 	}
 
 	# --------------------

Relationships

related to 0007130 closedjreese Unbranding Mantis 

Activities

giallu

giallu

2008-01-23 12:58

reporter   ~0016776

This was already proposed in 0007130. Are you able to provide a patch?

Borszczuk

Borszczuk

2008-01-23 19:51

reporter   ~0016780

Last edited: 2008-01-23 20:27

This patch (mantis-logo.patch) address 0008536 as well as 0007130 (partially). I may extend it to remove bottom header and other things as described in 0007130

Borszczuk

Borszczuk

2008-01-23 20:26

reporter   ~0016783

Last edited: 2008-01-23 20:27

Second patch attached (mantis-logo-and-button.patch). Controls also bottom logo-button image, so 0007130 seems to be addressed fully. Patches against stable 1.1.0

Borszczuk

Borszczuk

2008-01-24 12:03

reporter   ~0016795

Last edited: 2008-01-24 12:03

3rd patch - brings options to customize favicon too

Borszczuk

Borszczuk

2008-01-25 05:38

reporter   ~0016812

added patch generated against v1.1.1

giallu

giallu

2008-01-25 06:11

reporter   ~0016813

Are you done with the code? I'd rather review a finished patch than a moving target :)

BTW, I think this needs to be ported to SVN trunk, since the 1.1 branch is in "maintenance mode" now. For more info, see http://www.mantisbt.org/wiki/doku.php/mantisbt:development_scheme

Borszczuk

Borszczuk

2008-01-25 06:14

reporter   ~0016814

Yes, I am done with this. I believe patch will apply to HEAD w/o problems.

jreese

jreese

2008-01-25 10:16

reporter   ~0016815

I would really like to see this committed to both 1.1 and 1.2. My company is looking to use 1.1 for another department during my continued development on 1.2, and the ability to remove the logos and such is important, and we'd rather not need to redo efforts at each release.

giallu

giallu

2008-01-27 08:36

reporter   ~0016835

Well. the point is to decide if the procedure we drafted in the above wiki page is just a guideline or a policy.

In the latter case, this patch looks like it does not fits any of the requirements to enter the stable branch, so we either change the rules or we commit just in trunk.

If you think the rules are too strict (BTW, I think they are...) feel free to propose on the devel list how to amend them.

jreese

jreese

2008-01-27 10:10

reporter   ~0016842

I hadn't looked at the provided patches yet; I'll take a look at providing a simpler patch to do the same thing. I don't think this type of change should really be so complex, and certainly shouldn't be an issue for providing it to the maintenance releases.

Borszczuk

Borszczuk

2008-01-27 10:20

reporter   ~0016843

Last edited: 2008-01-27 10:22

"I hadn't looked at the provided patches yet;"

There's just one patch. The last one counts only. Former are earlier incarnations I am unable to remove.

" I'll take a look at providing a simpler patch to do the same thing."

Complex? You must be kidding me. And just curious: how do you know it's complex if you hadn't looked at it?

jreese

jreese

2008-01-27 12:09

reporter   ~0016844

Because I looked at the patch after Giallu mentioned that it wouldn't be viable for input to the 1.1.x branch. And I say it's complex because there are 20 (!) configuration variables, many of which are unnecessary or superfluous.

At first glance, 90% of the functionality could be reproduced using only three configuration variables.

Borszczuk

Borszczuk

2008-01-27 12:26

reporter   ~0016845

This is called flexibility, if you ask me. You can control the whole thing just with *_enabled options (which are just 4). But if you want to tune this up - you can use other options w/o digging into the code and that's what my intention (as well as I intentionally introduced _enabled even I could switch feature on/off whenever i.e. g_logo_top_file is just empty. But such approach sucks - why I have to remove anything if I just want to just disable it).

But of course, if you got some spare time you want to waste, reinventing the wheel may look as a good option. There's no other bugs awaiting patch but this one, though ;)

jreese

jreese

2008-01-27 13:02

reporter   ~0016846

I've just attached a much simpler solution. Four configuration variables. You can turn off the top logo by setting $g_logo_image = '', turn off the logo link by setting $g_logo_url = '', turn off favicons by setting $g_favicon_image ='', and disable the bottom logo by setting $g_show_bottom_logo = OFF.

Get rid of the calls to helper_mantis_url(), and it's instantly 1.1.x compatible.

vboctor

vboctor

2008-01-27 15:23

manager   ~0016847

I can understand what people would want to change the favicon and top logo and I believe we should provide an out-of-the-box way of doing that without having to change the core code. However, I believe that the bottom logo should remain as a "powered by Mantis" thing, which gives some credit to the project and refers others to use it. In other words, I've suggesting that we remove the configuration option which removes the logo at the bottom. If others would like to remove it or provide patches that do so, then fine. However, I don't think it should be part of the standard Mantis code.

jreese

jreese

2008-01-27 15:36

reporter   ~0016850

Last edited: 2008-01-27 15:36

I agree. Victor, would you be OK with me going ahead to push this into both trunk and the 1.1.x branch, without the ability to remove the bottom logo?

vboctor

vboctor

2008-01-27 16:18

manager   ~0016851

I don't think this qualifies for 1.1 branch. Hence, it should eventually go into the 1.2 branch only.

The control provided by Borszczuk makes sense, however, if the admin needs so much control why not use the top include page to include the custom header? Note that if top include page is used, then the Mantis logo is disabled automatically. This is the way I used to customize such headers when necessary.

In the future, this kind of work should be done using templates. Hence, I am not super excited about too much configuration options around such features that really is more suitable to be done via templates.

jreese

jreese

2008-01-27 21:15

reporter   ~0016856

Changes has been committed to 1.2.x development trunk.