WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • General Help & Support »
  • what is difference between WB_VERSION and Version , WB_SP and SP..
  • Print
Pages: [1]   Go Down

Author Topic: what is difference between WB_VERSION and Version , WB_SP and SP..  (Read 6110 times)

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
what is difference between WB_VERSION and Version , WB_SP and SP..
« on: September 06, 2024, 01:31:56 PM »
Hello,
inside class.admin in print_header() I see folowing code

Code: [Select]
                    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);

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 ?
Logged
Web developer

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 601
Re: what is difference between WB_VERSION and Version , WB_SP and SP..
« Reply #1 on: September 07, 2024, 01:29:44 AM »
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
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: what is difference between WB_VERSION and Version , WB_SP and SP..
« Reply #2 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.

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 ?

Logged
Web developer

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 601
Re: what is difference between WB_VERSION and Version , WB_SP and SP..
« Reply #3 on: September 08, 2024, 01:05:03 AM »
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.
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 ?

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:
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • General Help & Support »
  • what is difference between WB_VERSION and Version , WB_SP and SP..
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2