2014-06-24, 06:42:42
polish language for this plugin by me ;-):
http://get-simple.info/extend/plugin-lan...-beta/831/
http://get-simple.info/extend/plugin-lan...-beta/831/
user plugin: scroll to top
Item Manager Extended (Beta)
|
2014-06-24, 06:42:42
polish language for this plugin by me ;-):
http://get-simple.info/extend/plugin-lan...-beta/831/
user plugin: scroll to top
2014-06-24, 08:00:53
sort_array_cat is a sorting comparison function, you need to use it with a sort function.
have you tried using subval_sort in core ?
2014-06-24, 08:17:04
nope... i'm not trying to do it... now its a 00:15 am in poland... tommorow i will try do it... and i write how is a progress in my case. Thank You shawn_a!
user plugin: scroll to top
(2014-06-24, 08:00:53)shawn_a Wrote: sort_array_cat is a sorting comparison function, you need to use it with a sort function. Or you can try to use strcmp. If the first argument to strcmp is lexographically smaller to the second, then the value returned will be negative. If both are equal, then it will return 0.And if the first is lexograpically greater than the second then a positive number will be returned. Or use strcasecmp() which ignores case. your sorting function PHP Code: function sort_cat($a, $b) then try follows PHP Code: $manager = new ImController();
2014-06-24, 10:28:18
you should use a natcasesort sort so that your mix of alpha and numerics sort properly.
1 before 10 etc, subval in core has this as default. PHP Code: /** Tthis does not preserve keys however unless you edit $c[] = $a[$key]; to $c[$key] = $a[$key] which will be fixed in 3.4
Hi people. I'm using a 3.3.2 of GS. Today I installed IM from the pugins on the site. There was a 0.5 version, but site writes that version is 0.6. Also It's not important.
When I activated IM and went to Item manager tab it created some files - ok. But after page reloading it writes me: PHP Code: Warning: sort() expects parameter 1 to be array, boolean given in /home/ppiczosn/public_html/ihrashky/plugins/imanager/class/im.model.class.php on line 502 And second, when I opened Categories tab, I got errors too: PHP Code: Warning: sort() expects parameter 1 to be array, boolean given in /home/ppiczosn/public_html/ihrashky/plugins/imanager/class/im.model.class.php on line 502 Please, men, say me how I can fix the errors? I forgot to add, I got same errors when I deleted 0.5 version from gs site and installed master version from github
Which PHP version are you runnig? Are you sure that config file have been created and is writable?
… /imanager/data/other/imanager.xml (2014-07-10, 01:20:09)ak40u Wrote: The method item_files() is never executed automatically after IM setup! It seems that something has gone wrong during installation/upgrade. If you upgrade or reinstall from a previous installation of IM, please delete your old installation files before installing the new one. …/data/other/imanager.xml …/data/uploads/imanager/ …/data/imanager/ and all of …/data/other/*.im.fields.xml files
2014-07-10, 06:09:53
warnings are not errors. Just saying, you can ignore them.
2014-07-10, 06:10:38
(2014-07-10, 05:44:41)Bigin Wrote: Which PHP version are you runnig? Are you sure that config file have been created and is writable? Hi, Bigin. Thank you for fast answer. I have used PHP 5.2, and after your answer I set it as 5.5 and plugin errors disappeared. Also, you wrote the best uninstall instruction, I recommend to add it to your plugin manuals, because there is no detailed instruction how to delete plugin clearly. And tomorrow I'm going to try install emubox - so see you soon
2014-07-10, 18:14:29
Hello.
Where I have to place a controller components, which described in main install manual? I created two components in theme in admin panel, but it seems that it was wrong place. And then I put a {% im_list_page_generator %} into theme page template. So, it gives me only blank page with h1 and {% im_list_page_generator %}
2014-07-10, 19:23:53
Hi ak40u,
if you are using your components within theme, then you should always use standard PHP tags Code: <?php get_component('your_component'); ?>
2014-07-11, 05:09:19
(2014-07-10, 19:23:53)Bigin Wrote: Hi ak40u, Hi, Bigin. Yes, I created "im_details_page_generator" and "im_list_page_generator" within theme. Then I paste php code that you write for plugin description. Then I put <?php get_component('im_details_page_generator'); ?> and <?php get_component('im_list_page_generator'); ?> into theme template. Then I created a new page from the template. But when I opened the page, I look only title and footer. When I saw an html code, I didn't find any code about plugin's items. Could you write a detailed instruction how to make items available for showing?
Describe for me your project, what are you plan to do and what you have already tried? What are your custom fields and categories and what sort of fields you want to display?
It should also be noted that I can only provide indications, no halfe day courses for php beginners. (2014-07-11, 16:35:49)Bigin Wrote: Describe for me your project, what are you plan to do and what you have already tried? What are your custom fields and categories and what sort of fields you want to display? It will be a grid of icons, which goes to item's page. Grid like this http://cs620519.vk.me/v620519381/dddd/PYOPrmxQ_es.jpg Item's page will be a simply with only one editable wisywyg field in the IM panel. I have already created 2 components with your code http://cs620519.vk.me/v620519381/dde6/f8x82wPFhJs.jpg I put "<?php get_component('im_list_page_generator'); ?>" into a template. I created a category in the Item Manager. I created fields for the category http://cs620519.vk.me/v620519381/ddf7/p8086eM1Mac.jpg I created items I created a page from the template. I opened the page I didn't see items.
Today I made a details page and a list of items. It works well, but pictures are not shown. As you see bellow, image src is empty. I checked it in itemName.xml file and in Item Manager interface and image src have to be.
Code: <div id="manager"><div class="im-resultwrap"><a class="im-itempic" href="item-manager-details-page?item=test-shop"><img alt="" class="im-pic" src=""><span class="im-hidden"></span></a></div>...<div class="paginator-wrapper"></div> The path of image is "/home/ppiczosn/public_html/ihrashky/data/uploads/imanager/pokupat-detskie-veschi-v-magazine-prosto.jpg" (I took this path from Item Manager => Edit Item => File select Field. Here is my php components: PHP Code: <?php PHP Code: <?php
Check your image field name in register. I could see that your field name is just image, why do you use loop-thumb-1 in register?
(2014-07-12, 16:48:49)ak40u Wrote: You cannot simply copy my components and paste them into your project. The component parameter need to be adjusted first. Here is a simple usage example: I see that you are using 3 custom fields: description, image and sequence. Your list_page_generator component could then look like this, for example (step by step): Create controller instance: PHP Code: $manager = new ImController(); Register category: PHP Code: ImCategory::setCategory('Stores'); Define any number of elements per page: PHP Code: ImModel::setPref('itemsperpage', 10); This is the sort field, how items are displayed on the list page (1, 2, 3, ...): PHP Code: ImModel::setPref('sortby', 'sequence'); You can put a slug for details page here, for example: PHP Code: // ImModel::setPref('page', 'item-manager-details-page'); Your custom fields (description, image, sequence) are registered here: PHP Code: $manager->runModelMethod('gen_register', array('description', 'image', 'sequence')); The method returns the item data object. For example, you could use var_dump($items) PHP-function to display what it contains: PHP Code: $items = $manager->getModelValue('items_ordered_struct'); The method returns the page data array to generate your pages: PHP Code: $pagedata = $manager->getModelValue('pagedata'); Next, you should create your templates HTML structure. There are two options: Either you create a template file and pass the path as parameter to register script, or script gets a template as a string. I use the second option for my example. Template containing the HTML for the regular row items (image and title are placeholder for your custom fields): PHP Code: $rowTpl = ' Wrapper template containing your row template above and pagination: PHP Code: $wrapperTpl = '<div id="my_wrapper">[[ row_tpl ]][[ paginator ]]</div>'; Register your templates now: PHP Code: $manager->tplRegister(array('row_tpl' => $rowTpl, 'wrapper_tpl' => $wrapperTpl)); You must loop through the items now and replace the template placeholders with the current item values: PHP Code: $rows = ''; If you want to split items across several pages, for instance, with 'Previous/Next' links: PHP Code: echo $manager->paint('wrapper_tpl', array('row_tpl' => $rows,
2014-07-13, 06:23:24
Hello,
Any reason this isn't outputting nothing? template.php PHP Code: <?php Or this also: some_component PHP Code: <?php template.php PHP Code: <?php get_component('some_component'); ?> This plugin is great, but to output the result is a pain.... -- Edit -- I've copied the exact same example you demonstrated on the first page, and still I get partial results. Using the "im_list_page_generator" component it outputs only the ring image. When I click it it leads to 404, because of lack of config. While using "im_details_page_generator" component, nothing shows up. I'm not using DynPages, I'm a newbie theme developer trying to embed some functions directly to my theme... ------ Edit 3 ------- Nevermind... Got it....!! Well, after a whole afternoon got it working, my final code looks something like this (not styled or anything yet, but works): template.php PHP Code: <?php I'm calling the PHP directly in template.php, not using components.
Also, the image upload script is really, really bad...
You can access it without even being logged as admin... I will leave the image upload form as a text input, and ask the user to upload it using Get-Simple built in uploader.... -- Edit -- Adding this code to plugins/imanager/uploadscript/upload.ini.php seems to solve the problem stated above: PHP Code: include('../../../admin/inc/common.php');
2014-07-15, 15:38:00
I am glad that you have worked it out. But you are right the „upload script“ was a poor quick solution and not really fit into the Item Manager concept, feel free to modify or change its settings.
2014-08-06, 09:07:00
it's possible to add a some fields/options to better and easier configure this plugin?
i write about: - change name of category (maybe add a unique id for this...) - when creating a new category / it should have a custom select list from "what category it should get a default field list...example: different fields / number of fields for jeverly... different fields for cars, different for bicycles - categories sort options to custom, asc, dsc, last added, - products list sort options to custom, asc, dsc, last added, - delete category or item.... have own backup's... and easy system to restore. - image upload from the default image uploader get simple.. or something else.. maybe better than this what is now used.. (example: pgrfilemanager)
user plugin: scroll to top
2014-08-07, 03:19:43
Hi xxdex,
(2014-08-06, 09:07:00)xxdex Wrote: - change name of category (maybe add a unique id for this...) Category name is a unique ID! – For your own purposes you can use a hidden field with label „my_custom_category_to_rename“ and as the default value „my_category_name“. So you can rename it as much as you like. (2014-08-06, 09:07:00)xxdex Wrote: - when creating a new category / it should have a custom select list from "what category it should get a default field list...example: different fields / number of fields for jeverly... different fields for cars, different for bicycles I fail to understand that. (2014-08-06, 09:07:00)xxdex Wrote: - categories sort options to custom, asc, dsc, last added, I believed we have already been found a solution: (2014-06-24, 09:01:45)Bigin Wrote:(2014-06-24, 08:00:53)shawn_a Wrote: sort_array_cat is a sorting comparison function, you need to use it with a sort function. (2014-08-06, 09:07:00)xxdex Wrote: - delete category or item.... have own backup's... and easy system to restore. I will consider it and may develop it in a future version (2014-08-06, 09:07:00)xxdex Wrote: - image upload from the default image uploader get simple.. or something else.. maybe better than this what is now used.. (example: pgrfilemanager) Just let me know what exactly you don't like about current file upload?
2014-08-10, 06:39:44
Bigin thank You for Your answer.. I hope you do not answer it wrong. plugin is great ... but I have a few comments .. comments that may help in its development. Plugin is great!
1................. Category name is a unique ID! – For your own purposes you can use a hidden field with label „my_custom_category_to_rename“ and as the default value „my_category_name“. So you can rename it as much as you like. ok.. i will test it.. but what when a products is allready inserted in this category? it should be a easier: get a url: localhost/offer?category=name&id=29 then a category name can be a ignore, and use for only a fancy urls..... and a real category get from unique id.. what when i want to change a category name from "name one" to "name two" then all items what is in this category will be not see in new one. 2................. - when creating a new category / it should have a custom select list from "what category it should get a default field list...example: different fields / number of fields for jeverly... different fields for cars, different for bicycles i'm was try to tell.. that all of another new category must have create always a new custom fields for it.. why it can't be used one template for all catalog system ? 3................. - categories sort options to custom, asc, dsc, last added, - products list sort options to custom, asc, dsc, last added, i will test it i'm so sorry, because the plugin is really great .. I want to contribute to its development..
user plugin: scroll to top
2014-08-21, 03:09:21
Hello, when I make a new item and click on the "visible" button I get the following error:
Code: FATAL ERROR: CLASS 'SELEF' NOT FOUND IN C:\UWAMP\WWW\PLUGINS\IMANAGER\CLASS\IM.MODEL.CLASS.PHP ON LINE 444 Btw. this is the first time I use this plugin.
2014-08-24, 18:02:35
Hi datiswous,
(2014-08-21, 03:09:21)datiswous Wrote: You're right, I've made a litle mistake with the last update. Please download the newest version of IM from extend, or simple change "selef" to "self" line 444 in "im.model.class.php" file. Thank you for your error reporting! |
« Next Oldest | Next Newest »
|