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.8 is now available!


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

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Development 2.10.x »
  • 2.13
  • Print
Pages: [1]   Go Down

Author Topic: 2.13  (Read 99511 times)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
2.13
« on: June 04, 2020, 03:41:40 PM »
Hello,

I saw this post on FB  https://www.facebook.com/254526557891443/posts/3576272312383501/

I need core modification to be able to to inject backend.js into body, instead in head. I am creating bootstrap backend theme. I know there is backend_body.js , but most modules use code from backend.js. Nowdays BS4 themes have js at the end of body tag in order jq.js, , bs.js, then js scripts, so placing backend.js into head will cause errors and it will not work.
Logged
Web developer

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: 2.13
« Reply #1 on: June 04, 2020, 03:53:19 PM »
Hi, do you have tried the {BACKEND_MODULE_JS} and the other JS calls
from templates/DefaultTheme/templates/header.htt
put to footer.htt, next to {BACKEND_BODY_MODULE_JS} ?
Logged
https://onkel-franky.de

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13
« Reply #2 on: June 04, 2020, 05:36:34 PM »
I know this, but most modules has js put in backend.js amd not in backend_body.js , so if someone use my backend theme ,modules will not work.. thats why i need backend.js placeholder inside footer.htt
Logged
Web developer

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: 2.13
« Reply #3 on: June 04, 2020, 06:02:12 PM »
I thought the {BACKEND_MODULE_JS} calls the backend.js and if you put it into footer.htt it will there executed.
If both are in footer.htt it should call both there.
Maybe Dietmar have a look here.
Logged
https://onkel-franky.de

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13
« Reply #4 on: June 04, 2020, 07:06:22 PM »
I belive BACKEND_MODULE_JS  in footer.htt calls  backend_body.js file and not backend.js
Logged
Web developer

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: 2.13
« Reply #5 on: June 04, 2020, 07:12:44 PM »
Ok, and what do you think about the other thing named {BACKEND_BODY_MODULE_JS}?
But i have nothing tested.
Logged
https://onkel-franky.de

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13
« Reply #6 on: June 05, 2020, 10:38:53 AM »
inside class.admin.php , line 375 inside print_footer() there are only replacements for:

Code: [Select]

        public function print_footer($activateJsAdmin = false) {
        ...
        $footer_template->set_var(array(
                        'IS_ADMIN'  => ($this->get_user_id()==1),
                        'BACKEND_BODY_MODULE_JS' => $this->register_backend_modfiles_body('js'),
                        'WB_URL' => WB_URL,
                        'ADMIN_URL' => ADMIN_URL,
                        'THEME_URL' => THEME_URL,
                        'HELPER_URL' =>  WB_URL.'/framework/helpers',
             ) );
             ....
    }


So the BACKEND_BODY_MODULE _JS  only displays backend_body.js and there is no placeholder to display backend.js
Logged
Web developer

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: 2.13
« Reply #7 on: June 05, 2020, 11:14:11 AM »
Understand.
A test with additionally 'BACKEND_MODULE_JS' => $this->register_backend_mo dfiles('js'), works.
Code: [Select]
$footer_template->set_var([
                        'IS_ADMIN'  => ($this->get_user_id()==1),
                        'BACKEND_MODULE_JS' => $this->register_backend_modfiles('js'),
                        'BACKEND_BODY_MODULE_JS' => $this->register_backend_modfiles_body('js'),
                        ..........
backend.js will loaded in the footer.
But seems some modules need the JS before (e.g. module Hints).

So i think it is not needed to do all JS in the footer.
Logged
https://onkel-franky.de

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13
« Reply #8 on: June 05, 2020, 06:26:38 PM »
I know I can add this manualy, but this is a request to add this to stock 2.13 version
Logged
Web developer

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Development 2.10.x »
  • 2.13
 

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