I Need To Override A Variable Inside A Popover.js - It's An Addon Of Pagebuilder - Question | JoomShaper

I Need To Override A Variable Inside A Popover.js - It's An Addon Of Pagebuilder

Miguel

Miguel

SP Page Builder 1 year ago

Hi there! how are you? just a little question. I need to modify the variable DELAY_TIME inside a popover.js (it's an addon of pagebuilder)

So, I'm trying to make an override of the script, but I'm not sure about the right path.

Is there a way to override only the variable instead of the entire script?

If not, I need to know who to override the enterely script. Thank you for your help!

0
7 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #145995

2nd option would be to change file permission from 644 to 444 - that should protect that file from override during update.

...but backup (just in case is always recommended)

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 year ago #145989

Hi there,

Thank you for reaching out. Here is the file location of Popover JS. If you override the code you need to keep a backup before update of the Page Builder every release.

components/com_sppagebuilder/assets/js/addons/popover.js

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
Miguel
Miguel
Accepted Answer
1 year ago #146068

Thanks Toufiq and Paul. Perhaps I didn't explained well .

I've already harcoded the popover.js script in the original location. What I'm trying to do is create an override of the script following this method https://docs.joomla.org/J4.x:Template_Overrides https://docs.joomla.org/Understanding_Output_Overrides

Is it possible to do with this script?

Thanks for your help.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 year ago #146072

Please check this path. You need to create some directory and file.

templates/your_template/sppagebuilder(new directory)/addons(new directory)/popover(new directory)/site.php and admin.php (new file)
0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #146071

No. Becuase this is NOT a component page view, or module view or single addon.

0
Miguel
Miguel
Accepted Answer
1 year ago #146102

Ok, thank you Toufiq and Paul. I'll try your methods. Thanks a lot

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 year ago #146119

You are most welcome & Thanks

0