Totally Zenned
- Join Date:
- Jun 2005
- Location:
- Kelowna, BC Canada
- Posts:
- 1,033
- Plugin Contributions:
- 4
Adding an editor... question about the documentation
--ignore--
Views: 1,894
Totally Zenned
--ignore--
Totally Zenned
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"):
/**
* 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.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Deceased
s_mack:
--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
Totally Zenned
s_mack:
--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...
Totally Zenned
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.
Deceased
s_mack:
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
Totally Zenned
s_mack:
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.
RodG:
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...
Totally Zenned
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.
Deceased
s_mack:
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 ;-)
s_mack:
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.
s_mack:
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.
s_mack:
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.
s_mack:
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.
s_mack:
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/quotes/m/mayaangelo101310.html
s_mack:
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
Totally Zenned
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.
Tell staff why this post should be reviewed.