GetSimple Support Forum
Items Manager - ver: 1.4 - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Items Manager - ver: 1.4 (/showthread.php?tid=2119)

Pages: 1 2 3 4 5 6 7 8 9 10 11


Items Manager - ver: 1.4 - luchosar - 2011-09-15

anything, install plugin and get this message: Fatal error: Call to undefined function register_plugin () in / home/luchosar/public_html/wp7/wp-content/plugins/items_manager-0.9/item_manager.php on line 29


Items Manager - ver: 1.4 - mikeh - 2011-09-15

luchosar Wrote:anything, install plugin and get this message: Fatal error: Call to undefined function register_plugin () in / home/luchosar/public_html/wp7/wp-content/plugins/items_manager-0.9/item_manager.php on line 29

Your not trying to install on wordpress are you?


Items Manager - ver: 1.4 - Johonwayni - 2011-09-21

luchosar Wrote:anything, install plugin and get this message: Fatal error: Call to undefined function register_plugin () in / home/luchosar/public_html/wp7/wp-content/plugins/items_manager-0.9/item_manager.php on line 29

Only working on Getsimple..
also; mikeh, very good plugin. Thank you.


Items Manager - ver: 1.4 - grs84pl - 2011-09-27

Becouse Mikeh write me that he won't be able to relese new version of plugin i think I could post new Version with some bugfix and some new futures:

- bugfixes:
fix warnings about ITEMSFILE,
fix stripcslashes problem when subbmit settings
fix double slug name
fix problem with entities
fix warnings when getTheField('field_name') dosn't exist
fix warnings that $items_title wasn't defined.
and few more

- new futures:
Switch Visible - You can hide / unhide product
Switch Promo - You can make product promoted
Select list with all products and filter (in javascript)
section with 3 (or more) random promoted products

- also
change img dir to: /data/uploads/items


All this will be avaible to see whitin 3 days form now at wycieczkielka.pl . If someone want this plugin with those extra functions write mi PM.


Items Manager - ver: 1.4 - quantum - 2011-09-28

Thanks to mike for the original work on this plugin, and to grs84pl if you're able to move it on further - hopefully it won't be too long to wait, because I really need to find a CMS over the next week or so, one that offers repeatable blocks of information like this plugin (though I don't actually need the second detail page, just the first listings page). Apart from Concrete5 I've not yet found any other CMS's that offer this.

I was just about to post that i'm having problems getting it to work, but it looks like you're onto it with the second bug fix you mentioned? Basically, every time I'm in Pages -> index Manager -> Settings, and make a change and click the Submit Settings button, the code in the box at the bottom of the page ends up with more and more backslashes before quote marks... which affects the img src paths, preventing uploaded images from showing.


Items Manager - ver: 1.4 - quantum - 2011-09-28

One suggestion to add...

On Pages -> index Manager -> View All... can you make the list of items moveable up and down so we can specify the order that listings appear on the listing page? (in the same way that we can on the Custom Fields page)


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

quantum Wrote:One suggestion to add...

On Pages -> index Manager -> View All... can you make the list of items moveable up and down so we can specify the order that listings appear on the listing page? (in the same way that we can on the Custom Fields page)

I know what you thinking of.. Smile and it will be nice to have this future.. but right now I can't provide it.

I've made little mistake in earlier post. Mikeh wrote that he be able to relese new version soon. Sorry for that.

I'll correct some language mistakes in files and I'll commit this plugin here.
Give me an hour (or five Big Grin )


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

Items manger - 0.9-5

Code:
fix warnings about ITEMSFILE,
fix stripcslashes problem when subbmit settings
fix double slug name
fix problem with entities
fix warnings when getTheField('field_name') dosn't exist
fix warnings that $items_title wasn't defined.
change img dir to: /data/uploads/items

- new futures:
Code:
Switch Visible - You can hide / unhide product
Switch Promo - You can make product promoted
Select list with all products and filter (in javascript)
section with 3 (or more) random promoted products
list of all items are sorted alphabetical

Install:
1. copy all files (but functions.php) to /plugins/
a) copy content of functions.php to /theme/theme_name/functions.php
2. make your own custom fields
3. make your own list/table with your custom fields.
4. prepare your own template to print items details.

New things in backend /

- items list have V and P switchers
(V - hide / unhide item)
(P - promo / unpromo item)
- items list shows category of every item

Custom functions:
im_get_list_promoted($items_count) - im using it on index, but should also look nice in sidebar Smile
- im_get_list_promoted(4) - will print 4 (or less) random items that are marked as promoted,
change :
echo '<h3>'.$title.'</h3>';
echo '<a href="'.$url.$data->slug.'">read more</a>';
to everything You like. To call any field use $data->filed_name/custom_field;

im_get_list_for_select()
- makes select-list of all availbe (not hidden) items.
Functions im_get_list_for_select() provide:
<option value="item_slug_name">Item_title</option>
also You can add:
Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
  filtrowanie = new Object();
   filtrowanie.selectFilterData = new Object();
   filtrowanie.selectFilter = function(selectId, filter) {
     var list = document.getElementById(selectId);
     if(!filtrowanie.selectFilterData[selectId]) { //take all elements into array
       filtrowanie.selectFilterData[selectId] = new Array();
       for(var i = 0; i < list.options.length; i++) filtrowanie.selectFilterData[selectId][i] = list.options[i];
     }
     list.options.length = 0;   //clear all elements
     for(var i = 0; i < filtrowanie.selectFilterData[selectId].length; i++) { //print all matched elements
       var o = filtrowanie.selectFilterData[selectId][i];
       if(o.text.toLowerCase().indexOf(filter.toLowerCase()) >= 0) list.add(o, null);
     }
   }
</script>
and make form like this
Code:
<div class="section">
    <input type="text" onkeyup="filtrowanie.selectFilter('select-list', this.value)" />
    <FORM action="<?php echo find_url('slug_name_of_item_details_page',null); ?>" method="GET">
        <select id="select-list" size="18" name="item">
        <?php im_get_list_for_select();?>
        </select>
        <input type="submit" value="select">
    </FORM>

this provides select list with nice working filter.

Still TO DO:
- order of items / and switch between print list by alphabetical or order in list. /
- better way to get images / now if img don't exist this stuppid icon shows - maby default img for items list ?
- integrate with i18n / translations
- support for search,
- support for caching
- support for printing sitemaps / (!! verry important for me now - SEO - need help !!)
- prevent for overwriting if You click new item and make same item name.
- CODE CLEAN ! Its messy.


Items Manager - ver: 1.4 - quantum - 2011-09-28

WOW - that was super-quick!!!

I'll take a look Smile


Items Manager - ver: 1.4 - theNo - 2011-09-28

Fantastic !! Works great for my project. Will follow this thread.

Thanks to mike!


Items Manager - ver: 1.4 - quantum - 2011-09-28

I'm getting a blank page when I try to view the site since adding 0.9-5. It started the moment I finished copying the files into the plugins folder (I didn't copy the functions.php file into there - just took its contents and appended it to the theme folder's functions.php file.)

Tried reinstalling Get Simple from scratch and adding the plugin again - same thing. Sad

If it's any help, two things I'm noticing are different:

1) under Plugins, it says 5 plugins are installed, but the second entry is now completely blank, like it's incomplete. I can't remember what it said here before.

2) When I try to upload an image now, I'm getting 'Server error. Upload directory isn't writable.' Fairly certain nothing else has changed re. permissions.


Items Manager - ver: 1.4 - tazmandev - 2011-09-28

!!! WOOOOOW, I was waiting for this since day 1. This is the "sh..t" man. Haven't got the chance to install it yet but I can wait to. The concept is EXCELENT !

General items that can be configured ( gives somehow the flexibility of Drupal, but with much less resources involved.

This will turn GetSimple into a very , very powerful CMS!


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

quantum Wrote:I'm getting a blank page when I try to view the site since adding 0.9-5. It started the moment I finished copying
ok. I'll check with clean install. give me a moment.


Items Manager - ver: 1.4 - tazmandev - 2011-09-28

Hey, what Items Manager 0.9.5 is a branch or just the continue of original plugin ?
What is the most stable version at this point ?


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

I don't know what was quantum's problem, but for me, plugin works off the box
one thing
create /data/uploads/items - if dosn't exist

site wiht working plugin:
http://test.silesia-studio.pl

made in 5 min, dosn't have much items on it Big Grin


Items Manager - ver: 1.4 - quantum - 2011-09-28

I'll try afresh tomorrow. In the meantime, thanks for looking into it.


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

quantum Wrote:I'll try afresh tomorrow. In the meantime, thanks for looking into it.
turn on debug and tell me what You see.

BTW.
http://test.silesia-studio.pl/index.php?id=items-list
i've create 4 Items and hide third, for now, everything works fine.


Items Manager - ver: 1.4 - daniel.affonso - 2011-09-28

quantum Wrote:I'm getting a blank page when I try to view the site since adding 0.9-5. It started the moment I finished copying the files into the plugins folder (I didn't copy the functions.php file into there - just took its contents and appended it to the theme folder's functions.php file.)

Tried reinstalling Get Simple from scratch and adding the plugin again - same thing. Sad

If it's any help, two things I'm noticing are different:

1) under Plugins, it says 5 plugins are installed, but the second entry is now completely blank, like it's incomplete. I can't remember what it said here before.

2) When I try to upload an image now, I'm getting 'Server error. Upload directory isn't writable.' Fairly certain nothing else has changed re. permissions.

Me 2, man.

I'm trying to fix... but, in advance: one problem is in the functions.php file, missing open and close PHP tags.
With the other(s) I'm still trying to understand what happens until it "normalizes".


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

daniel.affonso Wrote:Me 2, man.

I'm trying to fix... but, in advance: one problem is in the functions.php file, missing open and close PHP tags.
With the other(s) I'm still trying to understand what happens until it "normalizes".

Turn on debug mode and tell me whats happening.

Probably
1. You don't have folder /data/uploads/items
2. You have old data, witch can be problem (but shuldn't be). try to clear folder /data/items/
Copy those files somwhere else and try to add new item.

3. Most of all give me data to work.. DEBUG => errors, warnings... something


daniel.affonso Wrote:one problem is in the functions.php file, missing open and close PHP tags.
my bad.. sorry, I think that You'll copy content to existed file.


Items Manager - ver: 1.4 - superyms - 2011-09-28

hi,

thank you for this plugin.
do you think we could associate other files to the items, i mean PDF or Videos ? not replacing images..but in addition with them ?
i mean adding a pdf file will be very intersting....useful !

thank you for all.


Items Manager - ver: 1.4 - quantum - 2011-09-28

Ok grs84pl, I've logged everything from scratch.


I downloaded a fresh copy of GetSimple_3.0 and FTP'd the folder contents into a brand new subfolder on my server. For the sake of security I'll refer to it here as www.mysite.com/subfolder/

From a web browser, I navigated to the folder where I just uploaded GetSimple to.
(All elements green ticked as ok.)

Clicked 'Continue with Setup' button. Entered setup details and clicked 'Install Now' button.
(Ok.)

Clicked 'change your password' link, and entered new password and did NOT check 'Use Fancy URLs. Clicked Save Settings button.
(Ok.)

Went to Support > Website Health Check.
(All green/ok.)

Refreshed FTP window.
(Ok... temp.gsconfig.php changes to gsconfig.php, and temp.htaccess changes to .htaccess)

Via FTP, I opened gsconfig.php and turned on (uncommented) GSDONOTPING and GSDEBUG. Saved.
(Ok)

Viewed/refreshed default Welcome page in a browser.
(Ok)

Downloaded a fresh copy of items_manager-0.9-5 from your post attachment. Unzipped it and FTP'd all folder contents (except functions.php) to /plugins/

Copied the code from your plugin's functions.php file and pasted it at the very end of /theme/Innovation/functions.php (with some line breaks separating them).
Refreshed Welcome page in browser.

Welcome page in browser is replaced by the following error message:

Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /path/to/mysite/subfolder/plugins/item_manager.php on line 14

Fatal error: Cannot redeclare im_get_list_for_select() (previously declared in /path/to/mysite/subfolder/plugins/im_get_list_for_select.php:49) in /path/to/mysite/subfolder/theme/Innovation/functions.php on line 62


If I go back into the Admin panel and click on the Pages tab, I get this above the page:

Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /path/to/mysite/subfolder/plugins/item_manager.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /path/to/mysite/subfolder/plugins/item_manager.php:14) in /path/to/mysite/subfolder/admin/inc/cookie_functions.php on line 30

If I go to the Plugins tab, I get five plugin entries, the second of which is completely blank (no version, no author, no title, no description)

1) Item Manager
2)
3) Display Rentals
4) Innovation Theme Settings
5) Custom Fields for Items

...and the following debugging errors above the Plugins page:

Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /path/to/mysite/subfolder/plugins/item_manager.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /path/to/mysite/subfolder/plugins/item_manager.php:14) in /path/to/mysite/subfolder/admin/inc/cookie_functions.php on line 30

Notice: Undefined index: im_get_list_for_select in /path/to/mysite/subfolder/admin/plugins.php on line 31

Notice: Undefined index: im_get_list_for_select in /path/to/mysite/subfolder/admin/plugins.php on line 32

Notice: Undefined index: im_get_list_for_select in /path/to/mysite/subfolder/admin/plugins.php on line 33

Notice: Undefined index: im_get_list_for_select in /path/to/mysite/subfolder/admin/plugins.php on line 33

Notice: Undefined index: im_get_list_for_select in /path/to/mysite/subfolder/admin/plugins.php on line 33

After this, I have tried adding a new folder called 'items' inside /data/uploads/ but this didn't change anything.

When I tried this yesterday, I used a different-named subfolder, and had the same errors. Yesterday I tried to go further by creating item listing page and detail page, and setting up custom fields - but it made no difference, so this time I have stopped at the above stage.

I have completely cleared browser cache/history, tried a different browser, and tried with the entire CMS installed in a different location/subfolder. Not sure if the problem is related to my hosting setup but the original plugin (version 0.9) was almost working before (apart from the image problem/backslashes!)

Hope this gives you something to go on grs84pl. If not, then don't worry, and thanks for your work so far. I looked at it on the link you sent me, and it's definitely cool. Smile


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

Owww F***

I've put im_get_list_for_select.php to zip file... - delete that! this is not a part of plugin...

Lets hope that's all.


Items Manager - ver: 1.4 - quantum - 2011-09-28

Bit better - the welcome page is at least showing up now, but I'm still getting an error above it...

Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /path/to/mysite/subfolder/plugins/item_manager.php on line 14

The admin panel's plugins page also has this above it:

Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /path/to/mysite/subfolder/plugins/item_manager.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /path/to/mysite/subfolder/plugins/item_manager.php:14) in /path/to/mysite/subfolder/admin/inc/cookie_functions.php on line 30
...but at least that dodgy blank second plugin has gone!

Just to be clear - do I still need to copy the contents of functions.php and paste it in the file at /theme/Innovation/functions.php ?

Also, I notice the normal Innovation theme's default functions.php file only has an opening php tag, not a closing php tag. Is that normal?


Items Manager - ver: 1.4 - grs84pl - 2011-09-28

quantum Wrote:
Code:
Notice: Use of undefined constant ITEMSFILE - assumed 'ITEMSFILE' in /path/to/mysite/subfolder/plugins/item_manager.php on line 14
You get this notice, because plugin didn't define ITEMSFILE
Code:
define ('ITEMSFILE', GSDATAOTHERPATH.'item_manager.xml');
In version 0.9 this code was placed in display-items.php but when you in backend, you don't include this file at any moment... so I've change place of this definition to /items/common.php
I really don't know why this solution works for me, bu screw things in yours installation.
try to undo this (copy code back to display_items.php

quantum Wrote:Just to be clear - do I still need to copy the contents of functions.php and paste it in the file at /theme/Innovation/functions.php ?

Also, I notice the normal Innovation theme's default functions.php file only has an opening php tag, not a closing php tag. Is that normal?

those are custom functions - If you don't using them. you don't need to copy them.
And, I don't have closing tag to, so I thin it should be like that.


Items Manager - ver: 1.4 - daniel.affonso - 2011-09-28

Same steps of quantum and same problems with me...

quantum Wrote:Also, I notice the normal Innovation theme's default functions.php file only has an opening php tag, not a closing php tag. Is that normal?

Yes, it is normal. From PHP manual: "The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful..." (at first Note section)
http://php.net/manual/en/language.basic-syntax.instruction-separation.php