Jump to content
kongondo

Visual Page Selector (commercial page picker module for ProcessWire)

Recommended Posts

Hey guys, the current state of VPS is a great start, I think. Let's just be productive as always ;) Calling products "Pro" and "Professional" is just a marketing mambo-jumbo we started to use because we are following suit. I'm sure @kongondo is just as passionate about his modules as @Robin S.

  • Like 1

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Quick update. I have made very good progress.

Hi all. 

I am intending to ONLY support ProcessWire 3.x starting from the next version of this module. Please have a read here and let me know what you think. Thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Hey, I've tried to use VPS in a Repeater field and it's not working correctly at all. Same field is working fine stand-alone. Is that a known problem or did I do something wrong?

Share this post


Link to post
Share on other sites

Hi @mattgs,

Sorry for the problems you are experiencing. You'll need to be a bit more descriptive. What is not working correctly? What ProcessWire version?

Thanks.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Ah, I see. A while ago, I had a similar issue with Media Manager which I resolved using preg_match and str_replace. I must have forgotten to do the same for VPS. I'll do this in the next version of VPS. Thanks for catching this.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
On 11/28/2017 at 2:30 AM, Robin S said:

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

(not tested)

Yes, that works, thank you so much -- I knew there was nothing the Processwire API couldn't do :)

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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..

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Sounds like the defaultColumns is what i was looking for - thanks!

Share this post


Link to post
Share on other sites

I've sent a couple of you the latest VPS to beta test please before the official release. 

Thanks!

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      A community member raised a question and I thought a new sanitizer method for the purpose would be useful, hence...
      Sanitizer Transliterate
      Adds a transliterate method to $sanitizer that performs character replacements as defined in the module config. The default character replacements are based on the defaults from InputfieldPageName, but with uppercase characters included too.
      Usage
      Install the Sanitizer Transliterate module.
      Customise the character replacements in the module config as needed.
      Use the sanitizer on strings like so:
      $transliterated_string = $sanitizer->transliterate($string);
       
      https://github.com/Toutouwai/SanitizerTransliterate
      https://modules.processwire.com/modules/sanitizer-transliterate/
       
    • By dimitrios
      Hello,
      this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.
      To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:
      Minimum Required Facebook App configuration:
      on Settings -> Basics, provide the App Domains, provide the Site URL, on Settings -> Advanced, set the API version to 2.10, add Product: Facebook Login, on Facebook Login -> Settings, set Client OAuth Login: Yes, set Web OAuth Login: Yes, set Enforce HTTPS: Yes, add "http://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs. This module is configurable as follows:
      Templates: posts can take place only for pages with the defined templates. On/Off switch: specify a checkbox field that will not allow the post if checked. Specify a message and/or an image for the post.
      Usage
      edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.
       
      Download
      PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost   Note: Facebook SDK for PHP is utilized.


    • By thomasaull
      I created a little helper module to trigger a CI pipeline when your website has been changed. It's quite simple and works like this: As soon as you save a page the module sets a Boolean via a pages save after hook. Once a day via LazyCron the module checks if the Boolean is set and sends a POST Request to a configurable Webhook URL.
      Some ideas to extend this:
      make request type configurable (GET, POST) make the module trigger at a specified time (probably only possible with a server cronjob) trigger manually Anything else? If there's interest, I might put in some more functionality. Let me know what you're interested in. Until then, maybe it is useful for a couple of people 🙂
      Github Repo: https://github.com/thomasaull/CiTrigger
    • By Robin S
      I created this module a while ago and never got around to publicising it, but it has been outed in the latest PW Weekly so here goes the support thread...
      Unique Image Variations
      Ensures that all ImageSizer options and focus settings affect image variation filenames.

      Background
      When using methods that produce image variations such as Pageimage::size(), ProcessWire includes some of the ImageSizer settings (height, width, cropping location, etc) in the variation filename. This is useful so that if you change these settings in your size() call a new variation is generated and you see this variation on the front-end.
      However, ProcessWire does not include several of the other ImageSizer settings in the variation filename:
      upscaling cropping, when set to false or a blank string interlace sharpening quality hidpi quality focus (whether any saved focus area for an image should affect cropping) focus data (the top/left/zoom data for the focus area) This means that if you change any of these settings, either in $config->imageSizerOptions or in an $options array passed to a method like size(), and you already have variations at the requested size/crop, then ProcessWire will not create new variations and will continue to serve the old variations. In other words you won't see the effect of your changed ImageSizer options on the front-end until you delete the old variations.
      Features
      The Unique Image Variations module ensures that any changes to ImageSizer options and any changes to the focus area made in Page Edit are reflected in the variation filename, so new variations will always be generated and displayed on the front-end.
      Installation
      Install the Unique Image Variations module.
      In the module config, set the ImageSizer options that you want to include in image variation filenames.
      Warnings
      Installing the module (and keeping one or more of the options selected in the module config) will cause all existing image variations to be regenerated the next time they are requested. If you have an existing website with a large number of images you may not want the performance impact of that. The module is perhaps best suited to new sites where image variations have not yet been generated.
      Similarly, if you change the module config settings on an existing site then all image variations will be regenerated the next time they are requested.
      If you think you might want to change an ImageSizer option in the future (I'm thinking here primarily of options such as interlace that are typically set in $config->imageSizerOptions) and would not want that change to cause existing image variations to be regenerated then best to not include that option in the module config after you first install the module.
       
      https://github.com/Toutouwai/UniqueImageVariations
      https://modules.processwire.com/modules/unique-image-variations/
    • By Sebi
      I've created a small module which lets you define a timestamp after which a page should be accessible. In addition you can define a timestamp when the release should end and the page should not be accessable any more.
      ProcessWire-Module: http://modules.processwire.com/modules/page-access-releasetime/
      Github: https://github.com/Sebiworld/PageAccessReleasetime
      Usage
      PageAccessReleasetime can be installed like every other module in ProcessWire. Check the following guide for detailed information: How-To Install or Uninstall Modules
      After that, you will find checkboxes for activating the releasetime-fields at the settings-tab of each page. You don't need to add the fields to your templates manually.
      Check e.g. the checkbox "Activate Releasetime from?" and fill in a date in the future. The page will not be accessable for your users until the given date is reached.
      If you have $config->pagefileSecure = true, the module will protect files of unreleased pages as well.
      How it works
      This module hooks into Page::viewable to prevent users to access unreleased pages:
      public function hookPageViewable($event) { $page = $event->object; $viewable = $event->return; if($viewable){ // If the page would be viewable, additionally check Releasetime and User-Permission $viewable = $this->canUserSee($page); } $event->return = $viewable; } To prevent access to the files of unreleased pages, we hook into Page::isPublic and ProcessPageView::sendFile.
      public function hookPageIsPublic($e) { $page = $e->object; if($e->return && $this->isReleaseTimeSet($page)) { $e->return = false; } } The site/assets/files/ directory of pages, which isPublic() returns false, will get a '-' as prefix. This indicates ProcessWire (with activated $config->pagefileSecure) to check the file's permissions via PHP before delivering it to the client.
      The check wether a not-public file should be accessable happens in ProcessPageView::sendFile. We throw an 404 Exception if the current user must not see the file.
      public function hookProcessPageViewSendFile($e) { $page = $e->arguments[0]; if(!$this->canUserSee($page)) { throw new Wire404Exception('File not found'); } } Additionally we hook into ProcessPageEdit::buildForm to add the PageAccessReleasetime fields to each page and move them to the settings tab.
      Limitations
      In the current version, releasetime-protected pages will appear in wire('pages')->find() queries. If you want to display a list of pages, where pages could be releasetime-protected, you should double-check with $page->viewable() wether the page can be accessed. $page->viewable() returns false, if the page is not released yet.
      If you have an idea how unreleased pages can be filtered out of ProcessWire selector queries, feel free to write an issue, comment or make a pull request!
×
×
  • Create New...