Cannot change Theme

eworthington

New member
Good day -

We just purchased DadaBik and I am tasked with changing the theme for our version to Blue; however, reading through the forums and the manual as well as looking through the ccs files, I cannot figure out how to do this. I'm not a coder so any steps you could provide would be extremely helpful.


Version: 10.6
MS SQL Server 2012
IIS on Windows 2012 Server

Thank you - Ellyn
 

eworthington

New member
Hi Eugenio!

I'm so excited that you personally answered. I've watched so many of your videos that I feel I know you :)

Thank you for your help. I'll try that and let you know how it goes.

Saluti - Ellyn
 

eworthington

New member
Hi Eugenio -

Is there somewhere else that I need to change it or just that file? When I add the line, I receive a server error. When I revert the change, I can access our DadaBik without issue.

DaDaBik -> include -> config_custom.php -> add $graphic_theme = 'blue' as last parameter under $serial_number and before ?>

Ellyn
 

webmarco

New member
hi, when I change DaDaBik -> include -> config_custom.php -> add $graphic_theme = 'blue' into DaDaBik -> include -> config_custom.php -> add $graphic_theme = 'black' nothing happens, I see always the same graphic theme (I suppose it is classic but not blue or black)

Also editing title_application the title doesn't change in my browser tab
Same behaviour about languages menu

All these "things" seems following the config.php and not config_custom.php
If I change graphic_theme in config.php I have the right theme on my app.

Where is my error?


DaDaBIK version 11.2-Elba enterprise, installed on 22-01-2023

System info​

PHP Version: 7.3.27-1~deb10u1

mysql version: 5.5.5-10.3.27-MariaDB-0+deb10u1

Web server: Apache/2.4.38 (Raspbian)

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
 
Last edited:

eugenio

Administrator
Staff member
Hi,
paste here the content of your config_custom.php (remove secret key, serial, passwords and other sensible info first).
 

webmarco

New member
Here the first part with parameters involved in my question (the whole file is not accepted here as post, I deleted some parts I didn't modify):
<?php
/*
***********************************************************************************
DaDaBIK (DaDaBIK is a DataBase Interfaces Kreator) https://dadabik.com/
..Copyright (C) 2001-2021 Eugenio Tacchini
.
This program is distributed "as is" and WITHOUT ANY WARRANTY, either expressed or implied, without even the implied warranties of merchantability or fitness for a particular purpose.

This program is distributed under the terms of the DaDaBIK license, which is included in this package (see dadabik_license.txt). For all the details see dadabik_license.txt.

If you are unsure about what you are allowed to do with this license, feel free to contact info@dadabik.com
***********************************************************************************
*/
?>
<?php


// this is the configuration file
// to install DaDaBIK you have to specify AT LEAST $serial_number, $dbms_type, $host, $db_name, $user, $pass, $timezone, $secret_key, $dadabik_session_name

/* IT'S A GOOD PRACTICE TO LEAVE THIS CONFIG.PHP FILE "CLEAN" AND WORK ON config_custom.php (open inclue/config_custom.php for additional details), THIS WILL MAKE YOUR DADABIK UPGRADES EASIER */

///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
// required installation parameters: please specify at least the following parameters

// your license serial number, you can find it in the email you received from mailer@fastspring.com, containing the download link
// and having as a subject something like "Your DaDaBIK 10.2 Manarola ENTERPRISE File Download"
// the serial number is 8 characters long
//$cfg_default['serial_number'] = 'xxxxxxx';
//$serial_number='xxxxxxx';
$serial_number='xxxxxxx';
//$serial_number='xxxxxxx';

// dbms type ('mysql' or 'postgres' or 'sqlite' or 'sqlserver'); sqlserver is for Microsoft SQL Server; if you are using sqlserver be sure to have the TCP/IP protocol enabled, if you are using SQL Server on Azure please also check the parameter $tables_to_exclude.
//$cfg_default['dbms_type'] = 'mysql';
$dbms_type='mysql';

// DBMS server host
//$cfg_default['host'] = 'localhost:3306'; // the name or the IP of the host (computer) where the DBMS is running (e.g. '127.0.0.1' if the DBMS is running locally); please try 'localhost' instead of '127.0.0.1' if '127.0.0.1' is not working; some Web Hosting providers can require a full name e.g. mysql.yourdomain.com; for SQLite this parameter is not needed. For mysql and postgres you can also specify the port (if it's not the default one) separated from the host by a ":", e.g. "127.0.0.1:5431" to use the port 5431
$host = 'localhost';

// database name
//$cfg_default['db_name'] = 'PIANO_TRASPORTI'; // for SQLite not only the name but 1) the full path is also needed (e.g. '/my_databases/music_databases/songs.db') and 2) you need to grant to the Web server write permissions on the database file
$db_name = 'PIANO_TRASPORTI';

// database user
//$cfg_default['user'] = 'xxxxxxx'; // this user must have select, insert, update, delete permissions, create and drop permissions are also needed for installation, upgrade and administration area e.g. 'root'; for SQLite this parameter is not needed
// for better security, you should choose a user who has privileges ONLY on the database used by this application ($db_name parameter)
$user = 'xxxxxx';


// database password
//$cfg_default['pass'] = 'xxxxxxx'; // for sqlite this parameter is not needed
$pass = 'xxxxxxx';

// database schema (only needed for postgres, not needed for mysql and sqlite, if you don't know the schema, leave "public")
$cfg_default['db_schema'] = 'public';

// timezone, specify here your timezone (a list of available timezone here: http://php.net/manual/en/timezones.php)
//$cfg_default['timezone'] = 'Europe/Rome';
$timezone = 'Europe/Rome';

// secret_key: a long (60+ characters), random and complicated phrase which is used to sign authentication cookies for this application and therefore improve authentication security; you don't need to remember this phrase
// please note that in order to benefit from this security mechanism you must choose a different secret_key for each DaDaBIK application you create and you must keep this value secret
//$cfg_default['secret_key'] = 'yyyyyyyyyyyyyyyyyyyyyyyyyy';
$secret_key = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy';


// dadabik_session_name: the name of the session for this DaDaBIK application, used to avoid unexpected and risky effects if other applications installed in the same domain make use of the same session variable names that this application uses
// it must contain only ASCII letters and numbers, with at least one letter and no blank spaces; its length must be less than 100 characters and must be different than $secret_key; you don't need to remember this name
// please note that in order to benefit from this security mechanism you must choose a name which is unique among session names used by other applications installed in the same domain
//$cfg_default['dadabik_session_name'] = 'xxxxxx';
$dadabik_session_name = 'xxxxx';


// DaDaBIK complete url (e.g. http://www.mysite.com/john/dadabik/, REMEMBER the trailing slash)
// YOU CAN SAFELY LEAVE THIS PARAMETER EMPTY (''), you should try to set it only in two cases:
// 1) IF DADABIK REDIRECTS YOU TO THE WRONG URL AFTER LOGIN
// 2) IF YOU ARE HAVING ISSUES DISPLAYING IMAGES IN PDF
$cfg_default['site_url'] = '';


// DaDaBIK site path is the path your session cookies are valid for
// YOU CAN LEAVE THIS OPTION EMPTY (''), NORMALLY IT IS CORRECTLY GUESSED BY DADABIK
// If you want extra security, you can set it manually: if you execute DaDaBIK from e.g. http://www.mysite.com/john/dadabik/ the site path must be /john/dadabik/, remember to put slashes at the beginning and at the end; put just one slash '/' if DaDaBIK is installed in the root of a Website, (e.g. http://www.mysite.com/)

$cfg_default['site_path'] = '';


// chosose your graphic theme: 'classic', 'black', 'blue' or 'green'
$cfg_default['graphic_theme'] = 'blue';


$cfg_default['grid_layout_scrolling'] = 'grid_scroll';

// choose the type of menu you want to use for page selection: 'left_side_menu' or 'drop_down_menu'
$cfg_default['menu_type'] = 'left_side_menu';

// don't show the menu if there is only one menu item (0|1)
$cfg_default['dont_show_menu_if_only_one_item'] = 0;

// display mode for the results grid ('both','classic_grid','list'), the default is 'both', which allows the user to choose through a drop-down menu, 'classic_grid' and 'list' don't show the drop-down menu.
$cfg_default['results_display_mode_menu'] = 'both';

// define the logo (by default it's the DaDaBIK logo)
$cfg_default['logo_img'] = 'images/logo.png';

// define the title of the application (<title> html tag)
$cfg_default['title_application'] = 'PIANO TRASPORTI';


// additional installation parameters

$cfg_default['prefix_internal_table'] = 'dadabik_'; // you can safety leave this option as is, you *must* leave this option as is after the installation


$cfg_default['tables_to_exclude'][0]='';



$cfg_default['prefixes_to_exclude'][0]='';

// maintenance parameters
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////

....

// if $maintenance_page is not empty, instead of showing $maintenance_message, DaDaBIK will redirected users to a maintenance HTML or PHP page of your choice. The page must be in the DaDaBIK folder, set here the page filename (e.g. maintenance.html)
$cfg_default['maintenance_page'] = '';

// language parameters
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////

...

$cfg_default['languages_ar'] = array ('italian','english');

// set to 1 if you want to specify, in form configurator, different labels, hints and tooltips for different languages, the correct label will be used according to the language the user chooses
$cfg_default['enable_multilanguage_labels'] = 0;

// if $enable_multilanguage_labels is set to 1, which language should DaDaBIK use in case of a missing translation?
$cfg_default['default_language_missing_translation'] = 'english';
 

eugenio

Administrator
Staff member
Hello,
I see $cfg_default['graphic_theme'] = 'blue';
and not
$graphic_theme = 'blue';
this is the problem. Not sure why you used $cfg_default.
I also see a lot of text copied from config.php; you can just add in config_custom the few settings you want to override.

PS please hide also $dadabik_session_name next time you post
 

webmarco

New member
Hello,
I see $cfg_default['graphic_theme'] = 'blue';
and not
$graphic_theme = 'blue';
this is the problem. Not sure why you used $cfg_default.
I also see a lot of text copied from config.php; you can just add in config_custom the few settings you want to override.

PS please hide also $dadabik_session_name next time you post
Thank you, of course my fault but not able in finding it!
 
Top