Page 1 of 1

Logo by Project

Posted: 13 Feb 2013, 00:30
by michabbb
hi all,

at the moment i am not that familar with git so please excuse me that i share my little hack by this old school way.
but anyway, maybe it´s helpful for somebody.

changing the html_api.php in this way

Code: Select all

function html_top_banner() {
        $t_page = config_get( 'top_include_page' );
        $t_logo_image = config_get( 'logo_image' );
        if( auth_is_user_authenticated() ) {
                $t_project_id = helper_get_current_project();
                if ($t_project_id) {
                        if (config_is_set( 'logo_image'."_".$t_project_id )) {
                                $t_logo_image = config_get( 'logo_image'."_".$t_project_id);
                        } else {
                                $t_logo_image = config_get( 'logo_image' );
                        }
                }
        }
and adding several lines like this in your config_inc.php:

Code: Select all

$g_logo_image_13                = 'images/project_logo_13.png';
$g_logo_image_15                = 'images/project_logo_15.png';
$g_logo_image_30                = 'images/project_logo_30.png';
allow you to see individual logos by project (id)

regards,
micha

Re: Logo by Project

Posted: 13 Feb 2013, 07:49
by atrol
You don't have to change any source code to get this functionality.
Use page Manage > Manage Configuration > Configuration Report

At the bottom of the page you find "Set Configuration Option"
Choose Username "All Users"
Select the project you want
Set Configuration Option to logo_image
Set Type to String
Set value for example to images/dollars.gif
Click "Set Configuration Option"

Re: Logo by Project

Posted: 13 Feb 2013, 08:57
by michabbb
Perfect, thank you!!

Re: Logo by Project

Posted: 17 Nov 2025, 06:00
by amphetamine
atrol wrote: 13 Feb 2013, 07:49 You don't have to change any source code to get this functionality.
Use page Manage > Manage Configuration > Configuration Report

At the bottom of the page you find "Set Configuration Option"
Choose Username "All Users"
Select the project you want
Set Configuration Option to logo_image
Set Type to String
Set value for example to images/dollars.gif
Click "Set Configuration Option"

Code: Select all

APPLICATION ERROR #102

Configuration option "logo_image" cannot be set in the database. It must be defined in config_inc.php.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Test on 2.27.3
Any alternatives?