e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
320 stars 213 forks source link

Question: "Rebuild" categories admin interface, how? #1733

Closed rica-carv closed 6 years ago

rica-carv commented 8 years ago

I've decided to go another way with my current site, so i needed to write a simple plugin. I grabbed the download core plugin (besides news, this was the one near what i really needed...), and refited it to suit what i need. Just one thing is really annoying me: the categories UI admin area. I need to get more "icons" (in my case, images) for each category, but as far i see it, the html structure of it is nowhere on the download plugin, therefore it must be a core default structure for categories... What i'm asking is how can i "detach" that core default structure from my plugin, and use a custom categorie UI admin area? I've searched everywhere and i simply can't catch where on earth is that structure called.... Right now that code part is still the same as the download plugin.... Any help would be appreciated. Thanks

Jimmi08 commented 8 years ago

I don't understand what you are trying to do. Icons like Book/Chapters have?

CaMer0n commented 8 years ago

I wouldn't use the downloads plugin as a template. Its a hybrid of old and new code.

rica-carv commented 8 years ago

@Jimmi08 Someone said a image is worth 1000 words... so here goes a image to see if i can clarify my intents: untitled 1

Anyway, i might go and create a all new category admin UI for this, but i need to scavenge where it is called....

@CaMer0n Don't worry, plugin will be used only for me, and anyway, i'll do a massive clean up, since i don't need all the code from downloads... I'm even planning to do a "news" clone, to use on that site, instead of using news with all those custom changes.... Maybe this week i'll have it up & ready....

Jimmi08 commented 8 years ago

@rica-carv custom method function, like images (thumbnails field) in news. Just instead imagepicker() you will use iconpicker().

rica-carv commented 8 years ago

@Jimmi08 Sorry, but i seem to be lost somewhere....

Jimmi08 commented 8 years ago

@rica-carv I am not sure if I am right person for this, but for your field use type "method" and then in form part of UI create function with name of this field. Example is in news with field thumbnail.

Or now there is type "images" instead of "image" with data array and not text - you can see it in vstore plugin. And there is nice example how to use method for item preview too.

rica-carv commented 8 years ago

@Jimmi08 I've scavenged the downloads plugin allmost to the bone, and that category form or UI isn't there, it's a core UI called somewhere... So i can't really change anything in it, until i find it.... Of course, if could get it on the plugin, i would already change it, and therefore, would't ask this issue, but i'm lost in it....

Jimmi08 commented 8 years ago

Use download plugin is not good idea but admin UI in download plugin is in file:

includes/admin.php

there is download_category_icon in class download_cat_ui and class download_cat_form_ui too.

CaMer0n commented 8 years ago

@rica-carv type='images' will give you 5 image containers.

CaMer0n commented 8 years ago

@rica-carv download/includes/admin.php is the main configuration for the UI.

rica-carv commented 8 years ago

type='images' will give you 5 image containers.

@CaMer0n What if i need, let's say, 7 images????

CaMer0n commented 8 years ago

@rica-carv an option could be added. Is it working for you with 5?

rica-carv commented 8 years ago

@CaMer0n Err, sorry, but no.... Sometimes, it's enough, but i need more sometimes.... Sorry...

Moc commented 8 years ago

I'm just curious, what practically would require more than 5 icons in a category name?

rica-carv commented 8 years ago

@Moc A custom dynamic featurebox that will grab the category 7 or more images linked to that category, for instance....

Jimmi08 commented 8 years ago

@rica-carv but aren't these images featurebox items?

rica-carv commented 8 years ago

@Jimmi08 No, the images array are stored in the corresponding category image field, so that if i change those images via the categories editing admin ui, the featurebox is dinamically updated. Instead of going to create a new featurebox, with those same images, i fetch them directly from the category....

CaMer0n commented 8 years ago

@rica-carv I'm not asking if 5 is enough, I'm asking if the 5 display and function correctly for you?

rica-carv commented 8 years ago

@CaMer0n Err, sorry, misundertsand... :D I'll try and leave feedback as soon i try, ok? Thanks

Moc commented 6 years ago

@rica-carv Is this issue still relevant?