Logo by Project

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
michabbb
Posts: 10
Joined: 20 Jul 2009, 14:55

Logo by Project

Post 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
atrol
Site Admin
Posts: 8553
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Logo by Project

Post 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"
Please use Search before posting and read the Manual
michabbb
Posts: 10
Joined: 20 Jul 2009, 14:55

Re: Logo by Project

Post by michabbb »

Perfect, thank you!!
amphetamine
Posts: 125
Joined: 05 Jun 2019, 00:17

Re: Logo by Project

Post 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?
Post Reply