Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,754
    Plugin Contributions
    30

    Default Encapsulated plugin, observer class loading javascript

    I'm working on making Structured Data as an encapsulated plugin.

    Previously it was a jscript file that's autoloaded by the template head and gets most of its data from the various globals that are already in existence at that point.

    When in the encapsulated plugin, it is included by an observer watching the end of the head.

    In this scenario I find that the same jscript file does not have access to the same globals (e.g. $breadcrumbs): each one has to be declared as global prior to the include in the observer.

    Any way to avoid or simplify that/an alternative method?
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,331
    Plugin Contributions
    94

    Default Re: Encapsulated plugin, observer class loading javascript

    The current version, IIRC, requires that the plugin's jscript file be copied to the active template's /jscript directory, doesn't it?

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,754
    Plugin Contributions
    30

    Default Re: Encapsulated plugin, observer class loading javascript

    Correct.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. v210 pluginID of yet to be submitted encapsulated plugin?
    By retched in forum Contribution-Writing Guidelines
    Replies: 1
    Last Post: 6 Dec 2024, 08:24 PM
  2. Encapsulated plugin installer timeout
    By pilou2 in forum Code Collaboration
    Replies: 2
    Last Post: 2 Nov 2024, 05:50 PM
  3. v201 How to override/modify an encapsulated Plugin
    By torvista in forum Contribution-Writing Guidelines
    Replies: 3
    Last Post: 29 May 2024, 07:36 PM
  4. Accessing public class variables in observer class
    By Dave224 in forum Code Collaboration
    Replies: 1
    Last Post: 20 Mar 2019, 07:11 PM
  5. session objects in the observer class
    By wdrwc in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Jul 2006, 06:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR