Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Commit 1774e39

Browse files
committed
V2.4.5 0001
1 parent b7993b8 commit 1774e39

File tree

3 files changed

+84
-192
lines changed

3 files changed

+84
-192
lines changed

README.md

Lines changed: 80 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ItemManager 2
22

3-
ItemManager (IM) is a simple flat-file framework for GetSimple-CMS that allows you to develop completely customisable
3+
ItemManager (IM) is a simple flat-file framework for GetSimple-CMS that allows you to develop completely customizable
44
PHP applications bundled with GetSimple-CMS.
55

66
ItemManager offers you a XML data management in just as straightforward a manner as if you were working with a real
@@ -11,11 +11,11 @@ You can create a random set of categories and fields, each category is assigned
1111
assigned to one category, that represent the underlying data structure of ItemManager, which allows a countless design
1212
combinations.
1313

14-
If you want to create a new GetSimple plugin, no matter whether kind of processing logic and complexity:
15-
a blog, shopping cart, user management or just a simple script, be sure that ItemManager will help you realise your goals.
14+
If you are going to create a new GetSimple plugin, no matter how complex: a blog, shopping cart, user management or just
15+
a simple script, be sure that ItemManager will help you realise your goals.
1616
Stop wasting your effort re-inventing the wheel, ItemManager takes care of the
1717
basic data management, getter, setter methods and any XML data storage processes for your plugin properties, while you
18-
may continue to focus on more important things.
18+
may continue to focus on more important things, such as plugin architecture.
1919

2020
**What can be achieved with ItemManager?**
2121

@@ -35,205 +35,97 @@ plugins:
3535
- Substitutions for small databases
3636
- etc
3737

38-
## Installation Instructions:
39-
40-
**Installing ItemManager 2.* from the ZIP file:**
41-
You can download the current version of the ItemManager on GitHub. Unzip the downloaded file and copy its
42-
contents to your plugins folder. The required data directories and configurations should be created automatically
43-
when you first access the plugin. Make sure that PHP-process has enough security permissions to access these files.
44-
45-
**Upgrading ItemManager 2.* from the ZIP file:**
46-
ItemManager upgrades are easy because everything important to your site is contained under the `/data/imanager/` and
47-
`/data/uploads/imanager/` directory. You should delete everything else in `/plugins/` directory that belongs to the
48-
ItemManager and leave the both directories above as it is.
49-
50-
**Upgrading ItemManager 2.* to 2.3.5:**
51-
Download the latest version of ItemManager GitHub
52-
Extract the ZIP file somewhere temporary.
53-
Delete the following file from your `/plugins/` directory:
54-
55-
Delete: `/plugins/imanager` folder
56-
Delete: `/plugins/imanager.php` file
57-
Upload the new version imanager folder to `/plugins/` directory
58-
Upload the new version `imanager.php` to `/plugins/` directory
59-
60-
> NOTE: Backup any files you replace or delete!
61-
62-
## Usage:
63-
64-
> First of, create an instance of the ItemManager core (It should be called at least once in your code):
65-
38+
## About
39+
ItemManager was born as a fork of Items Manager on May, 2013. IM was written out of the necessity to create a simple
40+
product list with images, and has been constantly developed ever since. As of version 2 ItemManager offers a powerful
41+
API, which allows you to perform all kinds of tasks very comfortably.
42+
43+
## Plugins Based On ItemManager
44+
ItemManager has already been used several times to create helpful plugins:
45+
46+
- [ImForms](http://get-simple.info/extend/plugin/imforms/1121/) ([More info](https://ehret-studio.com/articles/imforms-a-form-generator/))
47+
- [SimpleCatalog](http://get-simple.info/extend/plugin/simplecatalog/1091/) ([More info](https://ehret-studio.com/articles/simplecatalog-itemmanager-based-plugin/))
48+
- [User Management](https://ehret-studio.com/articles/itemmanager/creating-user-management/)
49+
- [IM Extra Fields Plugin](http://get-simple.info/extend/plugin/im-extra-fields/1057/) or [IM Extra Fields Plugin (GitHub repository)](https://github.com/bigin/ImExtraFields)
50+
- [IM Photogallery](http://get-simple.info/extend/theme/itemmanagers-photogallery/1043/) ([Gallery example](http://ehret-studio.com/gallery/))
51+
- [IM Simple Forum Theme](http://get-simple.info/extend/theme/simpleforum/1016/) ([Example](http://im.ehret-studio.com/forum/))
52+
- [Frontainer User Management plugin](http://get-simple.info/extend/plugin/frontainer/1015/) ([Sign up / Login / Logout / Password recovery](http://im.ehret-studio.com/login/))
53+
54+
## Usage:
55+
56+
> First, create an instance of the ItemManager core (It should be called at least once in your code):
57+
6658
```php
6759
$imanager = imanager();
6860
```
69-
61+
7062
Here's an example, should you want to save your data in order to be able
7163
to use it again later on, just do this:
72-
64+
7365
```php
7466
$item = new Item(1);
7567
$item->name = 'My item name';
7668
$item->setFieldValue('data', 'Hello world');
7769
$item->save();
7870
```
79-
71+
8072
In order to bring the data into display again do this:
81-
73+
8274
```php
8375
$item = imanager()->getItem(1, 'name=My item name');
8476
echo $item->fields->data->value; // Outputs: Hello world
8577
```
78+
79+
## Documentation Website
80+
More infos about ItemManager: [https://ehret-studio.com/articles/itemmanager/](https://ehret-studio.com/articles/itemmanager/)
81+
82+
## Other Tips & Examples
83+
- [Resizing images on the fly](https://bigin.github.io/ghpages/resizeimage/)
84+
- [How to make content of the GS components a little more page-based](https://bigin.github.io/ghpages/pagelayout/)
85+
- [ItemManager Simplify Field Value Access](https://bigin.github.io/ghpages/simplification/)
86+
- [How to add additional text under the GetSimple's page edit menu](http://get-simple.info/forums/showthread.php?tid=8664)
87+
- [MarkupSectionCache for ItemManager](http://get-simple.info/forums/showthread.php?tid=8016)
88+
- [CategoryJoins for ItemManager](http://get-simple.info/forums/showthread.php?tid=8017)
89+
90+
91+
## Installation Instructions:
92+
93+
**Installing ItemManager 2.+ from the ZIP file:**
94+
You can download the current version of the ItemManager on GitHub. Unzip the downloaded file and copy its
95+
contents to your plugins folder. The required data directories and configurations should be created automatically
96+
when you first access the plugin. Make sure that PHP-process has enough security permissions to access these files.
97+
98+
**Upgrading ItemManager 2.+ from the ZIP file:**
99+
ItemManager upgrades are easy because everything important to your site is contained under the `/data/imanager/` and
100+
`/data/uploads/imanager/` directory. You should delete everything else in `/plugins/` directory that belongs to the
101+
ItemManager and leave the both directories above as it is.
102+
103+
**Upgrading ItemManager 2.+ to 2.3.+:**
104+
Download the latest version of ItemManager GitHub
105+
Extract the ZIP file somewhere temporary.
106+
Delete the following file from your `/plugins/` directory:
107+
108+
Delete: `/plugins/imanager` folder
109+
Delete: `/plugins/imanager.php` file
110+
Upload the new version imanager folder to `/plugins/` directory
111+
Upload the new version `imanager.php` to `/plugins/` directory
112+
113+
> NOTE: Backup any files you replace or delete!
114+
115+
## Latest Changes V2.4.5:
116+
**:::New features**
117+
- This version adds new methods to format the output of the Money field [#10](https://github.com/bigin/ItemManager_2.0/issues/10).
118+
- A custom config file can now be used: The IM can run with different configuration options without having to exchange
119+
the default `config.php`. To accomplish this, just copy an existing `config.php` file from `/plugins/imanager/lib/inc/`
120+
to your `/data/imanager/settings/` directory and modify the relevant variables in it.
121+
- Minimal CSS adjustment for the rendering of fields in the admin.
122+
123+
**:::Bug fixes**
124+
- Money field error `Invalid value format for the Fieldtype NAME` has been fixed [#10](https://github.com/bigin/ItemManager_2.0/issues/10).
125+
- Type assignment for the config variables `thumbwidth` and `thumbheight` has been corrected.
126+
- Redundant Allocator code block `` has been removed
127+
128+
## Complete changelog
129+
[https://gist.github.com/bigin/7ec315c670b7009b55be901c1b448c94](https://gist.github.com/bigin/7ec315c670b7009b55be901c1b448c94)
86130

87-
The most quickest way to get a specific item is by using the item ID and category ID, here's an example:
88-
89-
```php
90-
$item = $imanager->getItem(1, 2)
91-
```
92-
where the first parameter is the category ID and the second an item ID.
93-
94-
To get a specific item via the field name you could do:
95-
```php
96-
$item = $imanager->getItem('slug=category-slug', 'fieldname=item_field_name');
97-
```
98-
99-
If the category is unknown, you can search for an item or multiple items using various find methods:
100-
```php
101-
$item = $imanager->getItemMapper()->findItem("name=$slug");
102-
```
103-
104-
```php
105-
$items = $imanager->getItemMapper()->findItems('created > '.strtotime('-2 day', time()));
106-
```
107-
108-
More infos about ItemManager's items: [Working with Items](https://ehret-studio.com/lab/itemmanager/itemmanager-2-api-reference-working-with-items/)
109-
110-
111-
Get a category:
112-
```php
113-
$category = $imanager->getCategory(1);
114-
```
115-
116-
Get the category matching the given attribute selector (like id, name, slug, position, created, updated) string. Returns a Category object, or null if not found.
117-
```php
118-
// via the category slug
119-
$category = $imanager->getCategory('slug=my-category-slug');
120-
// category name
121-
$category = $imanager->getCategory('name=My Category Name');
122-
// position
123-
$category = $imanager->getCategory('position=2');
124-
// ...
125-
```
126-
127-
More infos about ItemManager's categories: [Working with Categories](https://ehret-studio.com/lab/itemmanager/itemmanager-2-api-reference-working-with-categories/)
128-
129-
130-
For more information how to use ItemManager see also: https://ehret-studio.com/lab/itemmanager/
131-
132-
133-
## Tutorials, tips & experiments
134-
- [Resizing images on the fly](https://bigin.github.io/ghpages/resizeimage/)
135-
- [How to make content of the GS components a little more page-based](https://bigin.github.io/ghpages/pagelayout/)
136-
- [ItemManager Simplify Field Value Access](https://bigin.github.io/ghpages/simplification/)
137-
- [How to add additional text under the GetSimple's page edit menu](http://get-simple.info/forums/showthread.php?tid=8664)
138-
- [MarkupSectionCache for ItemManager](http://get-simple.info/forums/showthread.php?tid=8016)
139-
- [CategoryJoins for ItemManager](http://get-simple.info/forums/showthread.php?tid=8017)
140-
- [The use of SimpleItem objects](https://ehret-studio.com/lab/itemmanager/the-use-of-simpleitem-objects/)
141-
142-
## ItemManager extensions and plugins:
143-
- [SimpleCatalog](http://get-simple.info/extend/plugin/simplecatalog/1091/)
144-
- [IM Extra Fields Plugin](http://get-simple.info/extend/plugin/im-extra-fields/1057/) or [IM Extra Fields Plugin (GitHub repository)](https://github.com/bigin/ImExtraFields)
145-
- [IM Photogallery](http://get-simple.info/extend/theme/itemmanagers-photogallery/1043/)
146-
([Gallery example](http://ehret-studio.com/gallery/))
147-
- [IM Simple Forun theme](http://get-simple.info/extend/theme/simpleforum/1016/)
148-
([Example](http://im.ehret-studio.com/forum/))
149-
- [Frontainer User Management plugin](http://get-simple.info/extend/plugin/frontainer/1015/)
150-
([Sign up / Login / Logout / Password recovery](http://im.ehret-studio.com/login/))
151-
152-
## Changelog:
153-
154-
**2.4.3**
155-
156-
BUGFIX: Datepicker CSS included
157-
158-
**2.4.2**
159-
160-
MODIFICATION: Minimal style adjustments and GS 3.4-Alpha adaptations
161-
BUGFIX: in combination with IM Extra Fields usage
162-
163-
**2.4.1**
164-
165-
BUGFIX: Issue when rekursive selectig SimpleItem objects.
166-
167-
NEW: An `ItemMapper` method for selecting single SimpleItem objects: `ItemMapper::getSimpleItem((string|int) selector, (array) items (optional))`
168-
169-
**2.3.8**
170-
171-
NEW: Item Allocator class - makes easy and quickly work with a huge number of items (1000 >). Also, it simplifies the use of item object, as only the "light-weigth" objects will be loaded into the memory, therefore overhead will be significant reduced. Usage [example](https://ehret-studio.com/lab/itemmanager/the-use-of-simpleitem-objects/)
172-
> NOTE: You can deactivate this function at any time via the `$this->useAllocater = false` in `/plugins/imanager/lib/inc/config.php` file.
173-
174-
175-
NEW: FieldFilepicker - File picker field has been implemented, which makes it possible, using the functions of `i18n_customfields` plugin, the use of GetSimple native images and files from `uploads` directory - at this point many thanks to tomot for his help!
176-
> NOTE: This field is enabled only if "i18n_customfields" plugin is in the GS `/plugins/` directory (no installation is necessary).
177-
178-
179-
MODIFICATION: CSS changes - Minimal style changes of pagination and field width.
180-
181-
182-
MODIFICATION: FieldImageupload - Is deprecated and was replaced with newer FieldFileupload field. For compatibility reasons, the FieldImageupload's are still supported, though no longer available when selecting the fields in back-end.
183-
184-
185-
BUGFIX: FieldDatepicker - When selecting the date, when the date format was not specified.
186-
187-
188-
BUGFIX: FieldDatepicker - When you are use several date picker fields (thanks to tomot).
189-
190-
191-
BUGFIX: Check reserved field names when you save category fields.
192-
193-
194-
BUGFIX: Message Reporter - Multiple messages rendering.
195-
196-
197-
BUGFIX: Setup - The date format issue (thanks to morvy for reporting this bug).
198-
199-
200-
BUGFIX: Template Engine - fixed some minor bugs.
201-
202-
203-
BUGFIX: FontAwesome - Restrict include to back-end (thanks to morvy).
204-
205-
206-
**2.3.5**
207-
208-
BUGFIX: Chunk field bug is fixed
209-
NEW: findItem function -Allows search for items without knowing the category
210-
211-
**2.3.4**
212-
213-
Offers new features, that simplify the usage the plugin in combination with GetSimple native pages
214-
See IM Extra Fields plugin: [https://github.com/bigin/ImExtraFields](https://github.com/bigin/ImExtraFields)
215-
216-
**2.3.3**
217-
218-
Slightly API modifications have been made in order to ease the use even for non-programming developers.
219-
More infos: `http://get-simple.info/forums/showthread.php?tid=7293`
220-
221-
**2.3.0**
222-
223-
BUGFIX: Small cache bug fixed
224-
NEW: Expire cache method, can be used to automatically hooked to every `$item->save()` call
225-
NEW: Simple method to count the number of items, can be used to limiting files on the disk
226-
227-
**2.2.0**
228-
229-
BUGFIX: Category order in admin
230-
NEW: MarkupSectionCache
231-
NEW: Category Joins
232-
233-
**2.1.0**
234131

235-
BUGFIX: upload file order
236-
BUGFIX: category listing markup
237-
NEW: Field title for uploaded images
238-
NEW: Field money
239-
NEW: Field datepicker

imanager/css/im-styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ form a.deletefield:hover {
582582
margin: 10px;
583583
}
584584

585-
.manager-wrapper .fieldarea>label {
585+
.manager-wrapper .fieldarea>label:first-child {
586586
padding: 10px;
587587
background-color: #e4e9ec;
588588
border-bottom: solid 1px #dcdcdc;
@@ -606,7 +606,7 @@ form a.deletefield:hover {
606606
font-size: 11px;
607607
color: #999;
608608
margin: 0;
609-
padding: 10px;
609+
padding: 10px 10px 0;
610610
}
611611

612612
.manager-wrapper .fieldarea .field-info .info {

imanager/lib/inc/_def.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
define('IM_NAME', !empty($thisfile) ? $thisfile : '');
3-
define('IM_VERSION', 244);
4-
define('IM_VERSION_GS', '2.4.4');
3+
define('IM_VERSION', 245);
4+
define('IM_VERSION_GS', '2.4.5');
55
define('IM_SOURCE_DIR', GSPLUGINPATH.'imanager/lib/');
66
define('ITEMDATA', GSDATAPATH.'imanager/');
77
define('IM_CATEGORY_DIR', ITEMDATA.'categories/');

0 commit comments

Comments
 (0)