WebsiteBaker Support (2.13.x) > General Help & Support

what is difference between WB_VERSION and Version , WB_SP and SP..

(1/1)

crnogorac081:
Hello,
inside class.admin in print_header() I see folowing code


--- Code: ---                    if ((\strtolower($this->section_name) == 'admintools') && (!$bCanShowInfoBlock))
                    {
                        $header_template->set_block('infoBasis', '');
                        $header_template->set_var( array(
                                        'VERSION'             => WB_VERSION,
                                        'SP'                  => (\defined('WB_SP') ? WB_SP : ''),
                                        'REVISION'            => WB_REVISION,
                                        'PHP_VERSION'         => \phpversion(),
                                        'TEXT_EXT_INFO'       => 'SQL Server:',
                                        'EXT_INFO'            => $this->mysqlVersion(),
                                        'EXT_INFO1'           => ( ($this->mysqlStrict())?'STRICT': 'NON STRICT' ),
                                    ) );
                        $header_template->parse('infoExented', 'infoBlockExented', true);
                    } else {
                        $header_template->set_block('infoExented', '');
                        $header_template->set_var([
                                            'VERSION'             => VERSION,
                                            'SP'                  => (\defined('SP') ? SP : ''),
                                            'REVISION'            => REVISION,
                                            'PHP_VERSION'         => \phpversion(),
                                            'SERVER_ADDR'         => ($this->getUserId() == 1
                                                                  ?  ($this->oRequest->getServerVar["SERVER_ADDR"] ?? '127.0.0.1')
                                                                  :  ''),
                                        ]);
                        $header_template->parse('infoBasis', 'infoBlockBasis', true);

--- End code ---

What is the difference between WB_VERSION and Version , WB_SP and SP, WB_revision and Revision (with and without "WB_" prefix) ? Because as far I see in general they are the same. It looks to me that both versions of constants (with and without WB_ are from /admin/interface/version.php)

Also what is the point to see php and sql version only if you are in admintools , and not when you are in other pages , is it to save space or what ?

sternchen8875:
there is no differents between the Constants with or without the WB_Prefix. All the variants are defined as Constants in WB, so it doesnt matter, what kind of variables you use.
First use of this code was in wb 2.8.4 and also in some other backend templates - i think, thats the background for different names here


the sense between the showed code in the header.htt was a additional information for registered users with permissions to the admin tools, means: its not the super admin, but maybe the administrator group. It was part of former wb-versions and is not longer in use now

crnogorac081:
Ok tnx because i AM working on a new backend template (bootstrap 5.3/scss / twig files/ so I find a lot of code taht i font know Is it needed ir not.

So regarding my question , for all other userds except group 1 it Is enough to see wb versio , and group 1 Can see revision, so pack, ip address, PhP and sql version, right ?

sternchen8875:

--- Quote from: crnogorac081 on September 07, 2024, 06:37:59 PM ---Ok tnx because i AM working on a new backend template (bootstrap 5.3/scss / twig files/ so I find a lot of code taht i font know Is it needed ir not.

--- End quote ---
a simple rule: Use, what ever you want from the core in your template-folder, but dont change anything from the core



--- Quote from: crnogorac081 on September 07, 2024, 06:37:59 PM ---So regarding my question , for all other userds except group 1 it Is enough to see wb versio , and group 1 Can see revision, so pack, ip address, PhP and sql version, right ?

--- End quote ---

today, the DefaultTheme has the infowindow with all the informations about the server, PHP & Mysql etc. from my personal view, infos like this are only important for the server administrator or for the support, if you have problems. Is it important for the authors? I dont think so...
But in the most cms, its standard, to show a little overview with informations like this and if you have a place for this like a popup or slide out, feel free, to use it. And if not, there are any addons or admintools, to bring this infos on the desk.
If i look into the infowindow, there are also some links to rebuild access-files or clear the translate-cache, some important tools, i think. if you've place for this, you can add there also the system-infos. but feel free, to do, what ever you need  :wink:

Navigation

[0] Message Index

Go to full version