Jump to content

Visual Page Selector (commercial page picker module for ProcessWire)


kongondo

Recommended Posts

51 minutes ago, kongondo said:

Are you implying that I don't care about the visual details of my modules as long as they work?

I didn't intend any insult - it's just that I've found from conversations with clients and colleagues that people differ in how much they notice design details. I've had conversations with clients where they literally cannot see the difference between typeface A and typeface B, or colour A and colour B. To them, it's just "a font" or "green", and no amount of discussion changes that. For people in our line of work perhaps it depends on what our background or "first love" is: a person who comes to development via design probably sees things differently to someone who comes to design via development.

51 minutes ago, kongondo said:

Given that this is a commercial product, it could be insinuated that I'm just after the buck?

I don't think that at all. But I do think that there is some significance to crossing from free module to commercial module. There's a greater responsibility to ensure that the product is reasonably mature, tested, and fit for purpose. It's only natural that consumers will have higher expectations if they are buying a product as opposed to receiving it for free.

Please don't take it that I'm bitterly disappointed in VPS or anything like that because I'm not. It's an awesome product, but one that I feel needs a bit more work in order to be production-ready. My only intention here was to give some constructive feedback.

  • Like 2
Link to comment
Share on other sites

Thanks for the clarification @Robin S. I appreciate the comments, they are helpful. The things that I was unsure about I have asked for clarification and you've provided this. I am passionate about all my modules, both commercial and free. I would never knowingly release a module that is half-finished :). In this regard though, I must apologise to all VPS users because there has been an oversight on my part. I'll explain in a minute. My workflow is that I develop my modules in ProcessWire 2.7 using Reno Theme. I then test in the default admin theme. When I have everything working and looking as it should (PHP, JS, CSS, inside repeaters, etc), I repeat the process in ProcessWire 3.x. There are some cases where I even have Reno Theme-specific CSS classes, to make sure everything works fine irrespective of the theme. In the case of the last version of VPS, I now realise, I forgot to test using default theme in ProcessWire 3.x and for this I apologise to all of you. I am glad Robin caught this. I am equally very curious why others didn't notice this. It can only mean, either you don't use the default theme, or mainly use ProcessWire 2.7 or etc? Either way, I will fix this.

7 hours ago, Robin S said:

My only intention here was to give some constructive feedback.

And it is Robin. Please don't hold back! Like I said, I was unsure about some statements and you've clarified them. 

To all, please, don't hold back on the feedback. Not wanting to repeat this statement everywhere, this goes not just for VPS, but for all my modules, free and commercial. However, I can't promise to implement every suggestion since I need to consider things like backward compatibility.

  • Like 4
Link to comment
Share on other sites

2 hours ago, Robin S said:
19 hours ago, kongondo said:

I have no empirical evidence, but it seems to me, PW 2.x users are still the majority.

I would have thought that nearly all new site developments use PW3. I know I have never contemplated building a new site with the old <= v2.7. And most buyers would be using VPS for new projects rather than retrofitting it into old projects that they are not willing to upgrade, wouldn't they?

@kongondo You could run a quick survey. Personally I agree that it is not likely that VPS customers want it for PW 2.7 but it is your decision, of course. I started with ProcessWire 3 so anything before that is history to me.

BTW: https://weekly.pw/polls/

see: Which versions of ProcessWire are you currently hosting or managing? (146 votes)

Edited by szabesz
added weekly polls
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I was wondering if the module was known to work inside of a Repeater field. It seems it doesn't. When used inside a Repeater field, it can't access the field configuration and ends up with default values and the Add button missing. Digging through the source code I've noticed that when used inside a Repeater field, the process doesn't get the correct (or any) $pageFieldID, as can be seen by the iFrame URL missing the pageFieldID.

Link to comment
Share on other sites

Found the culprit:

Line 113 in InputfieldVisualPageSelector.module:

$pageField = $this->wire('fields')->get($this->name);

When inside a Repeater field, the field name gets appended by _repeater plus some ID. I brute forced this problem by changing the line to this:

$pageField = $this->wire('fields')->get(preg_replace('/_repeater\d+/', '', $this->name));

It works for me, but it's probably not exactly a clean solution. There's probably a better way to get the "clean" field name via the API.

  • Like 1
Link to comment
Share on other sites

1 hour ago, kongondo said:

A while ago, I had a similar issue with Media Manager which I resolved using preg_match and str_replace.

A handy trick for dealing with the suffix added to inputfield names inside a repeater is to use the name of the associated field object instead, which you can get via the hasField property of an inputfield.

In this case it looks like you want the Field object anyway so it could be:

//$pageField = $this->wire('fields')->get($this->name);
$pageField = $this->hasField;

(not tested)

  • Like 2
Link to comment
Share on other sites

sorry for my confusion...

but how do i specify the columns on the lister that pops up for page select – i'll need to be able to configure the columns and then have those be set for all the other users, the other users won't be able self-configure the columns for the lister; right now when i create the page select field, i just get sort of a default lister setup with Title, Template, Modified, Mod By;

i'll also need to be able to setup/configure the available filters for the popup.

Also - note there may be some issue with the lister setup, when i set one up, the initial selector seems to have copied (from the field settings) itself into the Limit Selectable Fields/Columns field, rather than the initial selector field. I manually move that to the initial selector field and added some stuff to the lister columns;

next problem – there is an add new button on the popup, but that shouldn't be there (right?)

vps_add_new.jpg.1c4460c1c777531407b0ee361c6d84ad.jpg

Link to comment
Share on other sites

9 hours ago, Macrura said:

sorry for my confusion...

I'm even more confused than you :P.

 

9 hours ago, Macrura said:

but how do i specify the columns on the lister that pops up for page select – i'll need to be able to configure the columns and then have those be set for all the other users, the other users won't be able self-configure the columns for the lister; right now when i create the page select field, i just get sort of a default lister setup with Title, Template, Modified, Mod By;

That's the main source of my confusion. This was working before and I remember you asking this question previously. I have now checked, way back to VPS3 and it's not working! Not even in PW2.7. I don't know if it's a caching issue. 

 

9 hours ago, Macrura said:

i'll also need to be able to setup/configure the available filters for the popup.

Not currently supported but it can be done; we have this in Media Manager.

 

9 hours ago, Macrura said:

Also - note there may be some issue with the lister setup, when i set one up, the initial selector seems to have copied (from the field settings) itself into the Limit Selectable Fields/Columns field, rather than the initial selector field.

I haven't been able to reproduce this. I've just tested and initSelector works fine here (PW 3.0.84).

9 hours ago, Macrura said:

next problem – there is an add new button on the popup, but that shouldn't be there (right?)

Strange one. We have no add new button in VPS. Must be a CSS issue related to Bookmarks? When the modal loads (if using default theme), there's a brief flash of some button but then it disappears.

Sorry about this issues. However, I am afraid these Lister issues will now have to wait until after the next release of VPS which is quite close. I was going to request a number of you to beta test VPS5 (given the move to PW 3 + the other changes coming in RE Robin's suggestions). I hope you don't mind waiting till that is sorted. Thanks.

Edited by kongondo
  • Like 1
Link to comment
Share on other sites

Thanks - i can't recall how i solved the lister columns for other users; i will do some more testing; at worst case i will show the other users how to setup the lister on their own, and then it gets stored somewhere(?) or maybe i should enable the bookmarks and tell them to use that(?)

i see that basically when the lister comes up for page selection, that it does use the default columns; perhaps there could be some way to integrate lister pro, so that VPS doesn't need to take on the task of configuring the lister; in other words for users who don't have lister pro, then bookmarks seem to be the only way to store a 'view' for the popup, but if you have lister pro, then maybe you could specify the name of a lister to use and then the module could read those settings for the popup in that case, or even maybe there could be a way to export a lister pro setup into VPS popup screen..

  • Like 1
Link to comment
Share on other sites

On 28/11/2017 at 1:30 AM, Robin S said:

In this case it looks like you want the Field object anyway so it could be:


//$pageField = $this->wire('fields')->get($this->name);
$pageField = $this->hasField;

(not tested)

Thanks. I'll test this soon.

Link to comment
Share on other sites

I'm not able to create a bookmark, if i try to create one, it seems to break;

i also tried adding a bookmark to the regular lister but the popup doesn't show that bookmark in the bookmarks tab (i have enabled bookmarks)

Do you think it would be possible to hook into the VPS method that generates the popup and then setup the lister there?

Sorry for the continued posting on this, but this is somewhat urgent as the editors need to be able to use VPS to select from a complex listing of pages and these users are very limited in their abilities to use computers etc..

Link to comment
Share on other sites

On 29/11/2017 at 2:16 PM, Macrura said:

i can't recall how i solved the lister columns for other users;

I need my head to be examined! I was looking at the wrong setting. What we've always had is the limitFields setting. That limits selectable columns. We also currently have disallowColumns, for columns that should not be selectable/displayed. For the columns to display by default we need to set the properties columns and defaultColumns.  These two have been missing from VPS. I have added these to the latest version (5) that I am working on. The former is done programmatically. The latter is what you'll see as a setting in a VPS field. I hope to release this tomorrow to a limited number of users for beta testing. 

@Macrura, I will also add a setting to allow/disallow other users from seeing the columns filter when using the Lister. This means that they will only be able to work with the columns you've set if you wish. I think this was part of your request, no? I can't recall if this is the normal behaviour in Lister Pro. If it is not, please let me know.

On 29/11/2017 at 2:16 PM, Macrura said:

in other words for users who don't have lister pro, then bookmarks seem to be the only way to store a 'view' for the popup,

Bookmarks are not the only way, as per my explanation above. defaultColumns will sort this out.

On 29/11/2017 at 2:16 PM, Macrura said:

but if you have lister pro, then maybe you could specify the name of a lister to use and then the module could read those settings for the popup in that case, or even maybe there could be a way to export a lister pro setup into VPS popup screen..

Sounds like a good idea. I'll have to study this first. It will certainly not make it into the current version of VPS (5). 

 

On 01/12/2017 at 3:52 PM, Macrura said:

I'm not able to create a bookmark, if i try to create one, it seems to break;

i also tried adding a bookmark to the regular lister but the popup doesn't show that bookmark in the bookmarks tab (i have enabled bookmarks)

Something else I'll have to study, in this case since I've never used Bookmarks before :-X :).

If you can get VPS5 by tomorrow, defaultColumns should be able to partly solve your issue I think.

  • Like 1
Link to comment
Share on other sites

Visual Page Selector version 005  (released (04/01/2018)

Happy to announce that the latest release of Visual Page Selector is now available for Download/Purchase.

Documentation has mostly been updated but the screenshots are not all up to date.

This is a major update. 

As of today and this version onward, ONLY ProcessWire 3.x is supported.

Changelog

  1. Support for namespaced ProcessWire only (ProcessWire 3.x).
  2. New UI.
  3. Thumbs view resemble normal ProcessWire 3.x image field.
  4. Thumbs now displayed in their natural proportions based on the ProcessWire-generated 260px high thumbs.
  5. Improved fields selection in the VPS field settings (image fields selection, etc).
  6. Display custom columns in Thumbs view (i.e. other fields in the page in the VPS pagefield).
  7. New Lister settings (e.g. disable columns, default columns).
  8. Improved support for Page Table and Repeaters.
  9. Lots of stylistic bug fixes.

Notes

  1. pocketgrid.css dependency has been removed. Please delete the file if upgrading from VPS versions < 5
  2. The UI has had a major update. We are now using icons only for all actions.
  3. In the modal, you first need to select items in order for add/remove icons to appear.
  4. If upgrading and using Thumbs view, 260px high thumbs may have to be generated once. May cause an initial slow down.

Credits

  1. Many thanks to all beta testers - @Macrura, @szabesz and @Robin S.
  2. Special thanks to @Robin S for his critical review and ideas to improve the module.
  3. InputfieldImage JS/CSS/HTML code used in the VPS thumbs UI.

Potential Bugs/Issues

  1. In some environments, if using Modal Lister and showing an image column in the Lister, if the image field has the setting Vertical List in image grid mode, the images in the field may fail to display in the Lister. Please use either a Square or Proportional grid images setting.
  2. There are a few stylistic issues when using the module in a repeater and using the (original) default admin theme.

Screenshots

1. Thumbs View Grid: Page Edit

vps-version-005-new-ui-1.thumb.png.e908373cbcd707943920cb5dd2156863.png

 

2. Thumbs View Table: Page Edit

vps-version-005-new-ui-2.thumb.png.7e8ea1561fa0c841debc1b0f57d8452f.png

 

3. Thumbs View Table: Modal

vps-version-005-new-ui-3.thumb.png.7a43f0221dd436444410fa0f89d7f8cc.png

 

4. Thumbs View Grid: Thumb hover

vps-version-005-new-ui-4.thumb.png.b6328cfc48f69116e94ab62526158405.png

5. Thumbs View Grid:  Thumb selection

vps-version-005-new-ui-5.thumb.png.4fdae9bdd08b01554a55f14d6308229b.png

 

6. Field settings:  Image settings

vps-version-005-new-ui-6.thumb.png.bda8d17e8a4e83b0100f239134041394.png

Edited by kongondo
  • Like 3
Link to comment
Share on other sites

  • 5 weeks later...

Hello,

I have purchased, downloaded and installed VPS but the VPS option does not show up under the input "Type" menu when creating a new field?

Other aspects of VPS are present such as: "Access->Permissions->VPS". I have set permissions for "Guest" to be able to utilize VPS role, but I am operating as superuser anyway.

My PW version is 3.0.88

Link to comment
Share on other sites

ok, I have figured this out now, and it is working.

I think the VPS documentation should make it more apparent that one must create a field of type "Page Reference" and *then* after doing so, change the input type to "Visual Page Selector". I was very much expecting the "Visual Page Selector" field type to be in the first menu of "types".

Pardon my confusion!

Link to comment
Share on other sites

Hi @mikhail,

Thanks for the purchase. Sorry for the confusion. We have the following in the docs about setting up here:

Quote

Going forward, it is assumed you have already set up a page field ready for use with Visual Page Selector as described earlier.

Remember that you will need to select VisualPageSelector* as the Input field type in your page field's Input Tab.

If you read that but was still unsure how to proceed then we need to tweak it. Please let me know, thanks. 

Edit

I've gone ahead and tweaked the docs a bit. I hope it is clearer now. Thanks for the  suggestion.

Edited by kongondo
more info
  • Like 1
Link to comment
Share on other sites

Thanks, yes I think that clarification in your edit to your instructions could indeed help others like myself (a new PW user).

Looking forward to putting this module to use. Though I can see already that I will need to make adjustments to how large you are showing the thumbnail images in listing view, in addition to the width of the additional column.

There is also a bit of a weird UI thing happening with a line showing through the title field (Firefox, Win10) in the following non-listing view-

line.JPG.2692f4c7037ab47421807d09ed46753f.JPG

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...