GetSimple Support Forum

Full Version: Items Manager - ver: 1.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
Items Manager - Ver. 1.4
Download From Extend
View GitHub Repos.

An items manager to manage products, services, and other related items.

Features:
  • Individual Customs Fields Manager
    Full control over every field for the manager, including wysiwyg editors and custom file uploaders.
  • Results Page, Can be narrowed down by category
  • Category Manager to create new categories of products or services
  • Easily include item data into your template

Instructions:
1. Drag Contents From Zip File To Plugins Folder
2. Browse To Pages->Items Manager->Settings Page (See Screenshot Below)
2a. Choose Title Of Items Manager, Page To Display Results On, & Choose The Page You Would Like The Individual Items To Be Displayed On
3. Browse To Pages->Items Manager->Custom Fields Page (See Screenshot Below)
3a. Choose Desired Custom Fields. Note you could choose an uploader to upload item specific images and retrieve them separate from content area.
4. Use Custom Fields In Items Detailed Page's Template
4a. Retreive the value of the item's custom fields by placing simple code snippets in the "Item Details Page" template file (See Code Example Below).

Below Is A Modified template.php File From Innovation Theme (Renamned to template_item.php
Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
/****************************************************
*
* @File:             tempate.php
* @Package:        GetSimple
* @Action:        Innovation theme for the GetSimple 3.0
*
*****************************************************/


# Get this theme's settings based on what was entered within it's plugin.
# This function is in functions.php
Innovation_Settings();

# Include the header template
include('header.php');
?>
    
    <div class="wrapper clearfix">
        <!-- page content -->
        <article>
            <section>
                
                <!-- title and content -->
                <div style="text-align:left;height:25px;float:left;margin-bottom:10px;"><a href="javascript:history.go(-1)">Back To Search Results</a></div><br/>
    <div style="clear:both">

    <div style="width:100%;">
    <div style="width:200px;float:left;">
        <img src="<?php getTheField('image1');  ?>" style="float:left;max-width:200px;height:auto;" />
    </div>
    <div style="width:380px;float:left;margin-left:20px;">
        <h2><strong><?php getTheField('title');  ?></strong></h2>
        <p style="text-align:left;"><?php getTheField('content');  ?></p>
    </div>
    <div style="clear:both;"></div>
    </div>
    <div style="width:100%;margin-top:20px;text-align:left;">
        <h2>Game Details</h2><br/>
        
        <div style="width:230px;float:left;">
            <strong>Players: </strong><?php getTheField('players');  ?><br/>
            <strong>Release Date </strong><?php getTheField('release_date');  ?>><br/>
            <strong>ESRB Rating: </strong><?php getTheField('rating');  ?><br/>
        </div>
        <div style="width:230px;float:left;margin-left:80px;">
            <strong>Genre(s): </strong><?php getTheField('genres');  ?><br/>
            <strong>Publisher: </strong><?php getTheField('publisher');  ?>><br/>
            <strong>Engine: </strong><?php getTheField('engine');  ?>
        </div>
            
    </div>
                <div style="clear:both">
                <!-- page footer -->
                <div class="footer">
                    <p>Published on <time datetime="<?php get_page_date('Y-m-d'); ?>" pubdate><?php get_page_date('F jS, Y'); ?></time></p>
                </div>
            </section>
            
        </article>
        
        <!-- include the sidebar template -->
        <?php include('sidebar.php'); ?>
    </div>

<!-- include the footer template -->
<?php include('footer.php'); ?>

This is, as of now, a rough draft of the plugin and will be expanded upon after feedback and suggestions are received. So please try it out and let me know how it works for you and what you would like to see included or changed.

Screenshots:


"View All Items" Page
[Image: 1-view-all.jpg]


"Add New Item" Page
[Image: 2-add-new.jpg]


"Manage Categories" Page
[Image: 3-categories.JPG]


"Custom Fields" Page
[Image: 4-custom-fields.jpg]


"Settings" Page
[Image: 4-settings.jpg]


Front-End - "All Results" Page
[Image: 6-front-end.JPG]


Note: Due to time constraints and ease of integration, for now, the custom fields portion is a modified version of Mvlcek's Custom Fields plugin. It works independent from the his plugin and will not conflict.
this looks very promising!

I did a first glance at the demo and your screenshots

1)
and I suggest to add one field: currency

because I see:

Price: 60

2)
and one suggestion: in the detail view, I would repeat the price as well

3)
on the detail page: the back link is titled: "Back to Search Resul", wouldn't it be better "Back to the list"?

4)
is there a language file?

5)
"view details" and "read more" is the same

6) is it possible to add an order form?

Cheers, Connie
Wow, Really impressed.

I was working on something similar but will give up now cannot compete with this.. 8)

Have a small addition you might be interested in for the customfields for an image selector, which allows you to select an image that has already been uploaded to the site.

Add the following to line 62 of edit-2.php

Code:
case "imagebox";
                echo "<td>";
                echo "<b>".$label.":</b><br />";
                echo "<input onClick='window.open(\"../admin/filebrowser.php?CKEditorFuncNum=1&returnid=post-".strtolower($key)."&type=images\",\"mywindow\",\"width=600,height=500\")' class='text short' type='text' id='post-".strtolower($key)."' name='post-".strtolower($key)."' value='".$value."' /></td><td></td>";
            break;

Insert the follwoing around line 167 in configure-2.php

Code:
<option value="imagebox" <?php echo @$def['type']=='imagebox' ? 'selected="selected"' : ''; ?> >Image Selector</option>

Thats it. When you click on an imagebox customfield you will be presented with the normal filemanager and just select the image you want and it will be inserted into the field.


Also a couple of small bugs.

o - menu item shows up as "index manager" until you go to settings and save.
o - getting "Notice: Undefined index: post-content in xxx\item_manager.php on line 300"

Otherwise another great addition to GS

Mike.
Mike,

can you make the excerpt text display the first (configurable?) paragraph instead of cutting it off?
Hi Mike,

have an idea for the next release.

How about an option to allow you to assign your customfields to categories.

So this way setup all the Customfields you require for you site, then setup your categories.
then assign fields to categories.

When creating a new Item, you first give it a title, then select a category, then your presented with the fields for that category.

this way the plugin could be used for all sorts of things - galleries, blogs, events etc...

Mike....
Connie Wrote:this looks very promising!

I did a first glance at the demo and your screenshots

1)
and I suggest to add one field: currency

because I see:

Price: 60

2)
and one suggestion: in the detail view, I would repeat the price as well

3)
on the detail page: the back link is titled: "Back to Search Resul", wouldn't it be better "Back to the list"?

4)
is there a language file?

5)
"view details" and "read more" is the same

6) is it possible to add an order form?

Cheers, Connie

I will reply to each of your concerns Connie,

1: The reason I left price out was because I was not sure everyone would want that field.
If they did not need a price field, it might be difficult for them to go to the settings page and remove it.
Do you beleive I should add this in by default as well?

2: See Above

3: The Back To Search Results link is just a javascript back button that I put in my template, it is not part of the actual plugin.
I will put a help section page to the plugin and will add some tips and tricks including the back button coding

4: Not for everything. I will get started on making them

5: I will change "read more" to "view details"

6: An order form is going to be in the next update. I am debating how to integrate it with paypal.
Suggestions would be appreciated

Thanks for taking the time to test it out


n00dles101 Wrote:Wow, Really impressed.

I was working on something similar but will give up now cannot compete with this.. 8)

Have a small addition you might be interested in for the customfields for an image selector, which allows you to select an image that has already been uploaded to the site.

Add the following to line 62 of edit-2.php

Code:
case "imagebox";
                echo "<td>";
                echo "<b>".$label.":</b><br />";
                echo "<input onClick='window.open(\"../admin/filebrowser.php?CKEditorFuncNum=1&returnid=post-".strtolower($key)."&type=images\",\"mywindow\",\"width=600,height=500\")' class='text short' type='text' id='post-".strtolower($key)."' name='post-".strtolower($key)."' value='".$value."' /></td><td></td>";
            break;

Insert the follwoing around line 167 in configure-2.php

Code:
<option value="imagebox" <?php echo @$def['type']=='imagebox' ? 'selected="selected"' : ''; ?> >Image Selector</option>

Thats it. When you click on an imagebox customfield you will be presented with the normal filemanager and just select the image you want and it will be inserted into the field.


Also a couple of small bugs.

o - menu item shows up as "index manager" until you go to settings and save.
o - getting "Notice: Undefined index: post-content in xxx\item_manager.php on line 300"

Otherwise another great addition to GS

Mike.

Thanks for the image uploader addition (and bug reports)! I will add that into the next update.


n00dles101 Wrote:Hi Mike,

have an idea for the next release.

How about an option to allow you to assign your customfields to categories.

So this way setup all the Customfields you require for you site, then setup your categories.
then assign fields to categories.

When creating a new Item, you first give it a title, then select a category, then your presented with the fields for that category.

this way the plugin could be used for all sorts of things - galleries, blogs, events etc...

Mike....

Thats a great idea. Maybe it can even offer categories within categories.
I am definitely adding this to the roadmap.
polyfragmented Wrote:Mike,

can you make the excerpt text display the first (configurable?) paragraph instead of cutting it off?

What I can do is add the option on the settings page to choose either an excerpt (and choose character count), end of first paragraph, or full text.

Any further suggestions for your request?
I was actually looking for (end of) first paragrah which is enough as far as I'm concerned.. I add in the "configurable" out of habit to maybe squeeze a tiny bit more functionality out of the devs Big Grin

I couldn't test the plugin yet, so I've got to ask: does it support downloadable items?
polyfragmented Wrote:does it support downloadable items?
Can you clarify your question?

I assume you mean having the "view details" link be a link to a downloadable file?
Yeah, I mean that one can offer mp3s, images, videos, digital media for download. Either from within the details (at the end/beginning of the detailed description) or right from the listed excerpted item. Or maybe both.
polyfragmented Wrote:Yeah, I mean that one can offer mp3s, images, videos, digital media for download. Either from within the details (at the end/beginning of the detailed description) or right from the listed excerpted item. Or maybe both.

This could be easily done by creating a custom field to put the url to the download in, and including that custom field in your template.. Or including that custom field in the search results (You can change the search results coding from the plugins settings page).

The next version of the plugin will include a "Browse Server" option as a custom field, so that would make it even easier..

Are you looking for a more integrated solution?
awesome work many thanks for releasing it Smile
mikeh Wrote:Are you looking for a more integrated solution?
Using a custom field sounds good to me!
polyfragmented Wrote:
mikeh Wrote:Are you looking for a more integrated solution?
Using a custom field sounds good to me!

What do you all think is the best way to allow easy modification of the search results page?
Right now, with the way its set up on the settings page, I imagine it can a bit difficult for the less experienced.

Also, in relation to the custom 'image uploader' field portion of the script. It works by uploading the temporary image, checking the data/uploads folder for an image with the same name, renaming the image if necessarily by appending a couple random numbers. and saving it at that location. It then prints the filename to a hidden field on the edit page.

- I was thinking of allowing people to change the location of the saved images, via the settings page? Would this be necessary?
n00dles101 Wrote:Wow, Really impressed.

I was working on something similar but will give up now cannot compete with this.. 8)

Have a small addition you might be interested in for the customfields for an image selector, which allows you to select an image that has already been uploaded to the site.

Add the following to line 62 of edit-2.php

Code:
case "imagebox";
                echo "<td>";
                echo "<b>".$label.":</b><br />";
                echo "<input onClick='window.open(\"../admin/filebrowser.php?CKEditorFuncNum=1&returnid=post-".strtolower($key)."&type=images\",\"mywindow\",\"width=600,height=500\")' class='text short' type='text' id='post-".strtolower($key)."' name='post-".strtolower($key)."' value='".$value."' /></td><td></td>";
            break;

Insert the follwoing around line 167 in configure-2.php

Code:
<option value="imagebox" <?php echo @$def['type']=='imagebox' ? 'selected="selected"' : ''; ?> >Image Selector</option>

Thats it. When you click on an imagebox customfield you will be presented with the normal filemanager and just select the image you want and it will be inserted into the field.


Also a couple of small bugs.

o - menu item shows up as "index manager" until you go to settings and save.
o - getting "Notice: Undefined index: post-content in xxx\item_manager.php on line 300"

Otherwise another great addition to GS

Mike.

The cannot seem to get the coding you supplied for the image selecter to work properly.. Everything works great until you try to click on an image in the file browser. I cannot seem to select any images.
mikeh Wrote:What do you all think is the best way to allow easy modification of the search results page?
Right now, with the way its set up on the settings page, I imagine it can a bit difficult for the less experienced.

I'm currently modifying the I18N Search plugin to allow users to specify how the search result items are displayed. The user can supply a component to render one search result item. All fields will be available in the component - probably as variables, e.g. $title, $content, ... and $fields['my-name'] for custom fields.
To specify the component only an additional parameter to the search results call is needed, e.g.
Code:
(% searchresults tags=product component=my-comp-name %)

I suppose you can use a similar approach in your plugin.
(And a future version of the I18N plugin will probably allow you to index and search your items, too)

P.S.: I was and am still planning on creating a similar plugin, but using standard GetSimple pages and supporting multiple languages and search plugin integration. Like a custom fields on steroids plugin where you can define different custom fields for different types of pages. But so far you have been faster and are definitely leading in regards to a generalized items plugin :-)
mvlcek Wrote:
mikeh Wrote:What do you all think is the best way to allow easy modification of the search results page?
Right now, with the way its set up on the settings page, I imagine it can a bit difficult for the less experienced.

I'm currently modifying the I18N Search plugin to allow users to specify how the search result items are displayed. The user can supply a component to render one search result item. All fields will be available in the component - probably as variables, e.g. $title, $content, ... and $fields['my-name'] for custom fields.
To specify the component only an additional parameter to the search results call is needed, e.g.
Code:
(% searchresults tags=product component=my-comp-name %)

I suppose you can use a similar approach in your plugin.
(And a future version of the I18N plugin will probably allow you to index and search your items, too)

P.S.: I was and am still planning on creating a similar plugin, but using standard GetSimple pages and supporting multiple languages and search plugin integration. Like a custom fields on steroids plugin where you can define different custom fields for different types of pages. But so far you have been faster and are definitely leading in regards to a generalized items plugin :-)

Great idea on the search results.. I was thinking of something similar, but allowing it to be done through a template file, but a component type deal is better.

P.S: If you are developing something similar, I would be more than happy to team up Smile I surely don't mind sharing the work and credit.

I was also thinking about using regular GS pages for this plugin, and originally (on my own websites before I made this into a plugin) that is how this script worked.. However, I found significant performance issues when the sites got very large and clients were putting in dozens-hundreds of rentals (items).

I was thinking about maybe separate folders inside the pages folder for plugins like these. That way it would be easier to work with for a search plugin. You would know that any folder inside the pages folder also need to be searchable.

What are opinions on this?
mvlcek Wrote:...Like a custom fields on steroids plugin where you can define different custom fields for different types of pages. But so far you have been faster and are definitely leading in regards to a generalized items plugin :-)

You guys are both awesome. Page specific custom fields are probably the number one thing on my wish list for GetSimple. I've been looking at Concrete5 just because of the Designer Content plugin that enables something similar but I have no real wish to use Concrete5. It's complete overkill for the size and complexity of projects I usually work on. GetSimple is perfect that way.

I was thinking just the other day while setting up some custom fields using mvlcek's plugin to allow a client to change the content of some highly structured text on one page without messing up the styling, that it will probably be confusing at first for them to see the same custom fields when editing every page, and yet they do nothing on all but the one.

-Cary
Cary Wrote:
mvlcek Wrote:...Like a custom fields on steroids plugin where you can define different custom fields for different types of pages. But so far you have been faster and are definitely leading in regards to a generalized items plugin :-)

You guys are both awesome. Page specific custom fields are probably the number one thing on my wish list for GetSimple. I've been looking at Concrete5 just because of the Designer Content plugin that enables something similar but I have no real wish to use Concrete5. It's complete overkill for the size and complexity of projects I usually work on. GetSimple is perfect that way.

I was thinking just the other day while setting up some custom fields using mvlcek's plugin to allow a client to change the content of some highly structured text on one page without messing up the styling, that it will probably be confusing at first for them to see the same custom fields when editing every page, and yet they do nothing on all but the one.

-Cary

Hmm, page specific custom fields.. That would not be too difficult at all
Those are my bugfixes:

1. define ITEMSFILE -> from display-items.php to common.php
explanation: menu item shows up as "index manager"
& I've got Notice:
Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /xxxx/plugins/item_manager.php on line 14


2. echo $file_results_page; ==> echo stripcslashes($file_results_page); (item_manager.php line 651) explanation: there is addslashes function used so.... Smile


ideas:
a lot of them... but I'll wrote them in other time.
For now:
- translations
- Custom Fileds assigned to categories. + global (as in plugin) Custom Fields
- keywords (BTW. Is there plugin that can make global keywords, and add them to keywords from specific page?)

- in items list: checkbox that can make Item: promoted | new | off (off - not visible)
- in items list: items order

- in display mode: search engine.
and that would be all for now. Smile

as I told, when I'll finish some functions I'll post them here..
BR
Installing the plugin results in the homepage content being replaced by "Sorry, your search returned no hits." here (GS 3.1 b). This is due to the fact that in the plugin settings, the index page is being pre-selected. roog's News Manager does this similarly with the blog page which, in my opinion, is undesirable.

Users might be confused if they just uploaded a batch of plugins and suddenly their homepage content "is gone". In my opinion it would be better to not have it pre-selected to anything. Installing a plugin should not make content "disappear" without any user action. Even if the docs say so.

2. Browse To Pages->Items Manager->Settings Page (See Screenshot Below)
2a. Choose Title Of Items Manager, Page To Display Results On, & Choose The Page You Would Like The Individual Items To Be Displayed On


Additionally, would you please consider putting your plugin folders (items, uploader) within a containing folder so that the main plugins folder isn't populated with folders without immediate context.

Maybe something like

items manager
|_items
|_ upload

Having a closer look at the plugin features now, thanks for making this plugin available!
Very nice, exactly what was needed for!!! (need this for managing an ebook library...)

I will test it and come back soon with requests/remarks.

I will also translate your plugins into French and Arabic...and let you share them with the community.

Thank you.
it seems the image uploader do not allow to upload pdf files ?
so do you have a field that allow to associate a file from files uploaded in GS ??

thank you.
i think it will be preferable to :

- use plugin i18n_Custom_Fields instead of cutom_fields.
- make support of i18n_seardh plugin
- make your plugin support multilinguage (to be i18n).

thank you.
And, is it possible to create a category pages.
Pages: 1 2 3 4 5 6 7 8 9 10 11