Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Adding an editor... question about the documentation

    --ignore--
    Last edited by s_mack; 23 Jul 2015 at 05:02 AM. Reason: stupid question, as it turns out.

  2. #22
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding an editor... question about the documentation

    Overall something of a catch-22... Languages need functions, functions needing language... One will load before the other and may be in some way co-dependent... And Rod's point of other extra_functions possibly needing language defines is a possibility to consider or somewhere to document that it isn't "allowed" or if needed some sort of override load. The above is somewhat unique in that it assigns data to a particular key of an array. A solution for this particular issue could be to modify the admin/includes/init_includes/init_html_editor.php file to contain the following (and to also correct the "typos"):


    Code:
    /**
    * List of potential editors apps
    *
    * CONSTANTS are used for language-specific display names, and are defined in /YOUR_ADMIN_FOLDER/includes/languages/english/extra_definitions/editor_EDITORNAME.php
    *
    * To add additional editors, add your own entries to the $editors_list array by creating a NEW FILE in /YOUR_ADMIN_FOLDER/includes/functions/extra_functions/editor_EDITORNAME.php containing just one line of PHP:
    * <?php $editors_list['NAME_OF_EDITOR'] = array('desc' => EDITOR_CONSTANT, 'handler' => 'editorhandlerfilename.php', 'special_needs' => '');
    *
    *
    * NOTE: THERE SHOULD BE NO NEED TO EDIT ANYTHING BELOW THIS LINE:
    */
    if (isset($editors_list) && is_array($editors_list)) {
      foreach ($editors_list as $key=>$value) {
        if (defined($editors_list[$key]['desc'])) {
          $editors_list[$key]['desc'] = constant($editors_list[$key]['desc']);
        }
      }
    }
    $editors_list['NONE'] = array('desc' => EDITOR_NONE, 'handler' => '', 'special_needs' => ''); // plain text
    The above is untested, but "appears" functional.
    Last edited by mc12345678; 23 Jul 2015 at 05:09 AM. Reason: Added a check to see if desc is a defined constant in case.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #23
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Adding an editor... question about the documentation

    Quote Originally Posted by s_mack View Post
    --ignore--
    Reason: stupid question, as it turns out
    LOL. It may have been a stupid question in your opinion, but I hit reply to the original message to give you a non stupid answer. :-)

    Anyway, my answer was to cast the CONSTANT into a $variable, and use php to 'echo' the variable to the script.

    Is/was that your solution?

    Cheers
    RodG

  4. #24
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding an editor... question about the documentation

    Quote Originally Posted by s_mack View Post
    --ignore--
    stupid question, as it turns out.
    Never... Only wish I had refreshed between the two posts so that I could have seen it. :) (Apparently Rod did see it.. :) )
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #25
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Adding an editor... question about the documentation

    No, it was a nonsense question that didn't need a solution. I thought I had a problem but realized I just had a typo.

  6. #26
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Adding an editor... question about the documentation

    Quote Originally Posted by s_mack View Post
    No, it was a nonsense question that didn't need a solution. I thought I had a problem but realized I just had a typo.
    Typo's are problems too :-)

    Cheers
    RodG

  7. #27
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Adding an editor... question about the documentation

    Quote Originally Posted by s_mack View Post
    No, it was a nonsense question that didn't need a solution. I thought I had a problem but realized I just had a typo.
    Quote Originally Posted by RodG View Post
    Typo's are problems too :-)

    Cheers
    RodG
    As evidenced in this thread (my own mistakes) they happen and sometimes takes a second set of eyes or a re-review to catch them.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #28
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Adding an editor... question about the documentation

    Are you guys subtly saying I should have left in my nonsense typo that I caught 10 seconds later? If so, sorry.


    So after fighting with this all day, I think maybe I'll leave it for now. I got it working... sort of. I see the potential, but with the old busted tired back end and its extraordinary use of poor html (using tables for positioning, for example), I'm not sure its really worth the effort. I almost think I'm better off taking the reins and just re-doing the whole back end. Big job, but its time the back office got brought into this millenium and judging from the 1.6 beta it isn't a priority for the devs.

    But it is a project for another day. I'll stuff this in my back pocket for now. Thanks for your help.

  9. #29
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Adding an editor... question about the documentation

    Quote Originally Posted by s_mack View Post
    Are you guys subtly saying I should have left in my nonsense typo that I caught 10 seconds later? If so, sorry.
    LOL, no not really. *I* was just poking a stick at the bear to watch the reaction ;-)

    Quote Originally Posted by s_mack View Post
    but with the old busted tired back end and its extraordinary use of poor html (using tables for positioning, for example),
    It was good in its day - back when tables were the only method to control layout.

    Quote Originally Posted by s_mack View Post
    I almost think I'm better off taking the reins and just re-doing the whole back end. Big job, but its time the back office got brought into this millenium
    So why don't you. I'm sure it'll be appreciated by many. Including myself.

    Quote Originally Posted by s_mack View Post
    and judging from the 1.6 beta it isn't a priority for the devs.
    So much to do, so little time to do it. I'd also be inclined to tackle this myself, in fact I've already made several changes to the backend for some of our clients, but as you say, it is going to be a big job to completely re-do it (using divs and css) so I settle on what my clients need, as and when they need it.

    Quote Originally Posted by s_mack View Post
    But it is a project for another day.
    That's what the devs say/think about it too. That's why it's still old and tired. An extra pair of hands from someone with the skills and motivation (such as yourself) will make all the difference in the world as to when this will actually get done.

    It's one thing for the average user to sit around and 'complain' that this hasn't progressed for many years, but it's a whole different ballgame when someone such as yourself comes along makes the same 'complaint' and does nothing about it.

    Quote Originally Posted by s_mack View Post
    I'll stuff this in my back pocket for now.
    Yup, just like myself, the dev team, and many others around here with the skills and know how.

    http://www.brainyquote.com/quotes/qu...elo101310.html

    Quote Originally Posted by s_mack View Post
    Thanks for your help.
    We do what we can, even if some of us (ie: Me) like to stir the pot a little while we do it.

    Cheers
    RodG

  10. #30
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Adding an editor... question about the documentation

    Now that I'm getting back into the swing of things with ZC, I'm sure I'll have some contribs again. I had a few popular ones back in the day. But right now the focus is on a different project and I'm just dabbling in this in my "spare" time. I almost went to the hospital earlier this month after putting in 990 hours in a 2 month stretch, so I really can't afford to take on miscellaneous things at the moment. That's what got me so frustrated earlier this week is I wanted to update my site and went from ZC to Prestashop (which I've in-affectionately started referring to as P(o)S instead of PS and I'm sure you can figure out why) because it seemed more polished. Anyway, I'm back now. I'll just put in the minimal work to get my site updated to 1.5.4 and then put it on cruise control until I get caught up.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 2
    Last Post: 23 Jul 2015, 04:47 AM
  2. Question about adding products to my cart from the shopping cart page
    By audleman in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 31 Aug 2010, 07:37 AM
  3. question about the language adding
    By bluetrack in forum General Questions
    Replies: 1
    Last Post: 20 May 2006, 08:48 AM

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