Thread: Admin Overrides

Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Admin Overrides

    Is it possible to override files contained in admin/includes/languages/english/images/buttons in admin/includes/languages/english/extra_definitions/images/buttons or place files for new buttons there so as not modify the admin core file(s)?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,541
    Plugin Contributions
    88

    Default Re: Admin Overrides

    Not in the /extra_definitions sub-directory, but you could add differently-named buttons to admin/includes/languages/english/images/buttons and then override the base language-file definitions via a lang.mysite_buttons.php file in admin/includes/languages/english/extra_definitions.

  3. #3
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Admin Overrides

    Expanding my question a bit...I'm late to the 1.5.8a party and hopelessly confused about where to place array-based language defines so that no admin core files are modified for the following three cases:
    (1) existing core defines I want to override for a specific page and an existing core admin/includes/languages/english/lang.PAGE.php file exists, and
    (2) existing core defines I want to override for a specific page and an existing core admin/includes/languages/english/lang.PAGE.php file does not exist, and
    (3) non-existing (custom) defines for one or more admin pages
    Also, I gather the substring matching capability on the store side does not exist in admin. Is that correct?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,541
    Plugin Contributions
    88

    Default Re: Admin Overrides

    Quote Originally Posted by Dave224 View Post
    Expanding my question a bit...I'm late to the 1.5.8a party and hopelessly confused about where to place array-based language defines so that no admin core files are modified for the following three cases:
    (1) existing core defines I want to override for a specific page and an existing core admin/includes/languages/english/lang.PAGE.php file exists, and
    (2) existing core defines I want to override for a specific page and an existing core admin/includes/languages/english/lang.PAGE.php file does not exist, and
    (3) non-existing (custom) defines for one or more admin pages
    Also, I gather the substring matching capability on the store side does not exist in admin. Is that correct?
    The admin-language overrides, as mentioned in a couple of other threads, are cumbersome.

    0. To override language definitions in the main language file, e.g. admin/includes/languages/lang.english.php, you can simply copy that file (renamed so you 'remember') to admin/includes/languages/extra_definitions and make your changes there. I'll recommend including only those definitions you're overriding.

    1. The cumbersome bit: There isn't a page-specific language-file override mechanism. The best I can offer is a admin/includes/languages/english/extra_definitions/lang.something.php that checks the $current_page (which needs to be a global since called from a class) and switch based on the page to do your page-specific overrides.

    2. This condition doesn't exist in the base Zen Cart distribution.

    3. For non-core admin pages, you can simply use admin/includes.languages/english/{lang.}new_page.php. For additional constants on in-core admin pages, see #1, above.

  5. #5
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Admin Overrides

    Thank you!

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

    Default Re: Admin Overrides

    This not in the docs?
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 

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