Forums / Upgrading to 1.5.x / [BETA] Language key

[BETA] Language key

Locked
Results 1 to 7 of 7
This thread is locked. New replies are disabled.
02 Aug 2011, 16:51
#1
gob33 avatar

gob33

New Zenner

Join Date:
Jun 2008
Posts:
69
Plugin Contributions:
3

[BETA] Language key

ZENCART-1.5.0BETA-07262011b\admin\includes\languages\english\admin_page_registration.php

I dont if its a mistake but
define('TEXT_LANGUAGE_KEY', 'Page Name')
doesnt refer to a language key. Dont know what really is a language key in this page.
02 Aug 2011, 17:56
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: [BETA] Language key

The key to which it refers is that used to hold the constant that will be populated with the language-specific text for the page's name in each language pack. This is held in the admin_pages table in a column called language_key.
17 Aug 2011, 15:41
#3
gob33 avatar

gob33

New Zenner

Join Date:
Jun 2008
Posts:
69
Plugin Contributions:
3

Re: [BETA] Language key

After trying 1.5.0BETA, i think admin_page_registration.php is unclear for a newbie that discover that and unaware of past Kuroi's module. Think that page should be presented as a listing of table admin_pages with capabilities of Insert, Modify, Delete entries to have a full control in case of mistakes. Looking at table admin_pages with phpMyAdmin helps to understand things. A listing page will do the same.
17 Aug 2011, 15:51
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: [BETA] Language key

Sort of agree a bit. Sort of disagree a bit.

Yes. It's not clear. Though knowledge of my earlier mod won't help much though as this was completely new for 1.5.

The initial idea was that if a mod hadn't been updated to include admin page registration then this might be easier than giving users raw SQL to input.

Doesn't really work though. So my preference is to drop it completely.

It was only intended for exceptional use anyway. It's usage would have declined rapidly as mods were updated. And on those rare occasions when it might have been used, it probably is easier to offer a lump of SQL that can be cut and pasted in one go, than to explain how to enter the data here, or provide a mini-me phpMyAdmin clone.

Thoughts?
18 Aug 2011, 10:11
#5
gob33 avatar

gob33

New Zenner

Join Date:
Jun 2008
Posts:
69
Plugin Contributions:
3

Re: [BETA] Language key

Ive looked at PrestaShop to see how this part is done.
Profiles management is equivalent to ZC and per admin user.
A sort of admin page registration exists too (linked with classes not pages) but used also for rearrangement of menu items. This functionality permits to order menu items per admin user on 2 levels (horizontal and vertical menus items). Its an extra-gadget.
24 Aug 2011, 11:11
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: [BETA] Language key

I too looked at Prestashop, but wasn't impressed in this area. their approach seem to be constructed from a programmers perspective and didn't really reflect the sort of real-world restrictions that people have asked me how to achieve over years.

As an example, Prestashop would allow you to decide whether a user can view, edit, add or delete a product (i.e. what access to they have to the functions in the product class), but the sort of thing I'm asked would be "how can I restrict my designers to see and edit only the products that they added?".

Of course, you couldn't do that now with 1.5. But you could create a new page that restricted designers to their own products and give them access to that rather than the existing product pages. The class access based approach wouldn't support this, as access is determined at a more fundamental level.

The data structure for the new admin access also supports moving pages to other menus and re-ordering the menus. It's pretty easy to do by dibbling in the database tables now, and I'd like to think that at some stage in the future there might even be a UI to allow it to be done from the Admin.
25 Aug 2011, 16:55
#7
gob33 avatar

gob33

New Zenner

Join Date:
Jun 2008
Posts:
69
Plugin Contributions:
3

Re: [BETA] Language key

Yes, precisely that could be the functionnality of admin_page_registration.php to re-order menu items plus inserting, modifying, deleting pages. In that case, looks like a mini clone of phpAdmin effectively.