Jump to content
horst

ALIF - Admin Links In Frontend

Recommended Posts

ALIF - Admin Links In Frontend
 

This module combines some of the admin links that we want to use on the frontpages sometimes. It is a comfortable and easy way to do so. After you have installed and configured the module, you can inject the links into the frontpage with code like this in a template file:

echo $modules->isInstalled('AdminLinksInFrontend') ? $modules->get('AdminLinksInFrontend')->render() : '';

.

Credits: The comfortable Javascript Color Picker in the Configpage comes from Jan Odvarko (http://jscolor.com). Many thanks for this!

* Toolbar
 
The toolbar can be positioned by css values for top/bottom and left/right. It can expand in vertical or horizontal direction. The buttons are links to the PW admin, for logout, or for editing the page in admin, or informational ones. All settings, including the colors, can be defined in the modules config page. This is available for all PW versions from PW 2.3 up to now.
 
pw_alif_01.jpg
 
Depending on how you configure this part, it can be used for authors and editors too, maybe.
 
 
* Import / Export Settings
 
It has the possibility to export and import its settings via two textarea fields. When importing settings, you get a second screen where you can select which settings you want to import.
 
post-1041-0-93467100-1450162787_thumb.jp
 
* One-click User Account Switcher
 
For PW versions 2.6.8+, there is one really nice function available, that I use when developing / testing sites with different user / roles. A fast User-Account-Switcher that lets you view the same page from different user accounts with only one click. To enter this mode, you need to login as a superuser one time, and the feature needs to be enabled in the module of course. After that, you can log out, login with different user roles, etc. At least the toolbar buttons for the User-Account-Switcher will stay visible for you. :)
 
This is session based. There is also an extra button with a trash can and the text "Session", that helps you to leave this mode once you are finished.

pw_alif_02.jpg
 
As you can see in the screenshot, after clicking "guest",  I was logged out, but a regular login button, a warning for debug mode and my three defined buttons for user accounts are available. When clicking another user button I login with this account. Very handy.
 
ATTENTION!
 
The use of the One-click User Account Switcher is mainly intended for dev sites, not for public sites! You should be aware that there is a huge security risc when using this feature on public reachable sites! We completly leave ProcessWires comfort zone in regard of security, - and the only thing between your site and potentially hackattacks is this module. (Oh mom, - what have I done?)
 
PW 2.6.8+ has a comfortable function for admin tasks, that let us log into different user accounts via API without using passwords. This module uses this function! All data that is needed during a User Account Switcher session is stored in the session data on the server. So, if someone steel your session cookie, there is potentially risc that he can login as a superuser, depending of the user account buttons you have in your admin links collection! To prevent SessionHijacking, the module can be bound to a single IP address, it uses a fingerprint depending of IP(s) and UserAgent string. And you need to define a max time to live in minutes between 2 and 60, a User Account Switcher session may run.
 
A User Account Switcher session only can be initialized by a Superuser who also explicitly has set a permission called 'alif-user-account-switcher', what is defined by the module, when installing it. So, the prefered way to use this module is, to enable and use the User Account Switcher while the site is unpublic, and before it goes public, remove the permission from the superuser role. This way, you can use its menu function, but not the UAS anymore.

On a sidenote, for those rare cases where multiple superusers simultaneous developing on a site and want to use the ALIF, but the UAS should be used only by one, you can leave the 'alif-user-account-switcher' permission removed from the superuser role, but need to assign the role 'alif-superuser' to the single user account. This way, only that single superuser has the permission for UAS, whereas all other superusers doesn't have it.
.
.

* The Configpage

pw_alif_04.jpg
 

 
* Online demo

I have pasted it into this old site and enabled it to be present every time (when the site is in demo mode only!). So, it is an earlier state, but the switcher is functional there: http://pwlaf.biriba.de/dbinfo/
 

* Download

From our modules directory or from github repo

Edited by horst
updated with link to modules directory
  • Like 31

Share this post


Link to post
Share on other sites

It's now on Github: https://github.com/horst-n/AdminLinksInFrontend

After aproval in the modules directory, I will update the post here. :-)

Please, re-read the first post. It is updated with the release announcement and a more detailed explanation of all features.

Edited by horst
  • Like 3

Share this post


Link to post
Share on other sites

Have seen that it was mentioned in last ProcessWire Weekly. (sighh, have hurried up with it)

I have tested it with PW versions 2.3, 2.4, 2.5, 2.6, 2.7 and with PHP 5.3 and 5.4. It works good from PW 2.4+ up! With PW 2.3, the Javascript Color Picker doesn't function. But 2.3 is really old and if someone has maintained a site until now without ALIF, he will do it fine in future too. :lol:

Only thing I want to know is: in wich PW version was "showIf" introduced to show / hide Inputfields in the admin? Would be nice if someone can point me to that.

So, it is ready for the masses now! ;)

Edited by horst
  • Like 5

Share this post


Link to post
Share on other sites

Added another little tool to the box that I sometimes use to detect best breakpoints for mediaqueries. A little Javascriptbox that displays the dimensions of body and a configurable custom container (by ID). What dimensions are shown, offsetWidth, ClientWidth, ScrollWidth, is dynamically configurable in the Top of the JSbox:

 

pw_alif_07.jpgpw_alif_08.jpg

 

To enable / disable it, select or drop the button in the config page, and, optionally, type in the id of a custom container.

  • Like 5

Share this post


Link to post
Share on other sites

One more Button, :) for: OpCache status

pw_alif_opc_01.jpg

pw_alif_opc_02.jpg

If OpCache is enabled on a site, it includes a new button and add an admin page for viewing the opcache status. The script for showing this is taken from, and credits go to: Rasmus Lerdorfs. See github repo: https://github.com/rlerdorf/opcache-status

Share this post


Link to post
Share on other sites

Successfully tested ALIF with PW 3.0 and set the version to 1.0.0 stable now.

  • Like 6

Share this post


Link to post
Share on other sites
Hi,

First time I have installed it, mainly to see what the button "Debugmode" does. It does not do anything: href='javascript:;'

Am I missing something?

Share this post


Link to post
Share on other sites

This is a pure info icon. It (only) recommends you that you have $config->debug set to true! So, maybe not that useful in develoment mode, but later, if you use a small set of admin links for editors too, it is useful to be rmembered to turn out debug mode when finished something on a production site.

Share this post


Link to post
Share on other sites

This morning, I finally had time to install this module. I am blown away to it's usefulness and wish I had made time to look at this a whole lot earlier. Great work, @horst!

  • Like 3

Share this post


Link to post
Share on other sites

hi horst,

i can't seem to get the user switcher working... after some setup problems i finally got the user-buttons to display. but when i click on "guest" i am logged out and don't see the user buttons any more. also the "enable login-button" seems to have no effect.

can you please help me how i can debug this? thanks!

Share this post


Link to post
Share on other sites

This morning, I finally had time to install this module. I am blown away to it's usefulness and wish I had made time to look at this a whole lot earlier. Great work, @horst!

Thanks Charles!

hi horst,

i can't seem to get the user switcher working... after some setup problems i finally got the user-buttons to display. but when i click on "guest" i am logged out and don't see the user buttons any more. also the "enable login-button" seems to have no effect.

can you please help me how i can debug this? thanks!

Bernhard, I'm not sure, but best thing would be, if you can run this locally and use an IDE with debugger. Everything in this regard is Sessionbased. You need to check / debug those functions in the module:

  •     public function hookBeforeProcessLogin(HookEvent $event) {
  •     public function hookBeforeProcessLogout(HookEvent $event) {
  •     public function hookAfterSessionLogout(HookEvent $event) {
  •     public function hookAfterSessionLogin(HookEvent $event) {

Also I don't know what you mean with: "after some setup problems"?

Share this post


Link to post
Share on other sites

hi horst,

i tried it on a fresh install today and got it working. don't know what was the reason but i'm too busy right now to investigate further :(

Also I don't know what you mean with: "after some setup problems"?

i was not sure what all the fields where doing

post-2137-0-30370400-1456420160_thumb.pn

my questions where like this:

"select users"

what is this doing? is this controlling access? will only users selected here see the switcher?

"start UAS session"

what is an UAS session?? ok got it now... user account switcher, but i thought that was a technical word i didn't know. and therefore i didn't know what this checkbox is doing at all.

i think step by step instructions would be good, like:

if you want to show the user switcher proceed as follows:

  • check the box "enable user account switcher
  • select users that should be shown in the switcher-panel
  • check the box to start the user account switcher (UAS) session
  • select the time, how long the UAS should be active (no good english i think)
  • click on "submit" button and go to frontend. the UAS-Panel should show up

edit: i think it would help to change the field label from

Configure and start the fast User Account Switcher

to

Configure and start the fast User Account Switcher (UAS)
 
maybe that sounds too much to you, but it was really not clear for me as i did not know anything about the workflow.
 
edit2: maybe a screencast with licecap would have also solved those questions ;)

Share this post


Link to post
Share on other sites

On module install there's a PHP error:

Trying to get property of non-object in .../ProcessAdminLinksInFrontend.module:52

Share this post


Link to post
Share on other sites

Sorry it's me again, 'Warm up opcache with PW files' throws an error here (Tracy):

Cannot declare class ProcessWire\InputfieldForm, because the name is already in use
5×	
PHP Notice: Undefined index: dirname in .../AdminLinksInFrontend/libs/hn_basic.class.php:1748
21×	
PHP Notice: Use of undefined constant THOUSAND_SEPARATOR - assumed 'THOUSAND_SEPARATOR' in .../site/modules/AdminLinksInFrontend/libs/opcache.php:60
634×	
PHP Notice: Use of undefined constant THOUSAND_SEPARATOR - assumed 'THOUSAND_SEPARATOR' in .../site/modules/AdminLinksInFrontend/libs/opcache.php:249
1×	
PHP Notice: Use of undefined constant THOUSAND_SEPARATOR - assumed 'THOUSAND_SEPARATOR' in .../site/modules/AdminLinksInFrontend/libs/opcache.php:183

Share this post


Link to post
Share on other sites

Hhm, looks like the OPCache class is not ready to use with PW3 namespaces. Unfortunately I have no PW3 installl with OPCache installed where I can test it. :(

To the first error, I can say this sounds a bit weird, because I try to get the Page of Admin -> Setup (what is 22) and than checks if it has a children Page with the name of the OP-Cache Viewer. So this should return A) the page if existing, or B) a NullPage object. Both possible returns are objects. So, without able to test, it looks weird.

What ID does your Admin Setup Page have?

---

I suggest to uninstall the OPCache Viewer and only use the Admin Links In Frontend module until I got solved this. (What may take a while, :( )

Share this post


Link to post
Share on other sites

Ok, thanks. Don't worry about the errors, I use this module only occassionally, and I just took a look on the opcache viewer as there's opcache on the server.

As for issue No1, maybe there's an extra "children('include=hidden')" that doesn't needed?

// original - throws error
$p = $this->pages->get(22)->children('include=hidden')->get('name=' . AdminLinksInFrontend::opcPageName);

// works
$p = $this->pages->get(22)->get('name=' . AdminLinksInFrontend::opcPageName);

// in one go
$p = $this->pages->get('parent=22, name=' . AdminLinksInFrontend::opcPageName);
Admin->Setup has the id of 22 here too. I forgot to mention that it's PW 3.021 here but it seems you figured this out :)
  • Like 1

Share this post


Link to post
Share on other sites

Hi, Horst,

I just tried to install the module, but got 2 error messages right after downloading, regarding:

AdminLinksInFrontend.module, line 153
and
ProcessAdminLinksInFrontend.module, line 45

In both cases I had to remove the [...] part to get it working: 

self::$opcEnabled = opcache_get_status();//['opcache_enabled'];

I am running PW 3.0.23 in this particular case.

 

EDIT: Ok, now PW tells me why: I need to install PHP 5.4 or greater...

Sorry for bothering you!

  • Like 1

Share this post


Link to post
Share on other sites

Have made some updates to ALIF:

  • 1.1.0 fixed a bug in method sanitizeColor()
  • 1.1.1 added detection and a toggle button for TracyDebugger (enable/disable)
  • 1.1.2 more security for User-Switcher, (stays in for cases, where TracyDebugger isn't available)

pw-alif-tracy-toggler.png

http://modules.processwire.com/modules/admin-links-in-frontend/

  • Like 6

Share this post


Link to post
Share on other sites
On 12/10/2015 at 12:35 PM, horst said:

A User Account Switcher session only can be initialized by a Superuser who also explicitly has set a permission called 'alif-user-account-switcher', what is defined by the module, when installing it.

Just an FYI, that a recent change to the core might make this impossible to do via the admin:
https://github.com/processwire/processwire/commit/7943aa1064204db5415d661312037f1dd4199249

  • Like 1

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 teppo
      Hey folks!
      Took a couple of late nights, but managed to turn this old gist of mine into a proper module. The name is SearchEngine, and currently it provides support for indexing page contents (into a hidden textarea field created automatically), and also includes a helper feature ("Finder") for querying said contents. No fancy features like stemming here yet, but something along those lines might be added later if it seems useful (and if I find a decent implementation to integrate).
      Though the API and selector engine make it really easy to create site search pages, I pretty much always end up duplicating the same features from site to site. Also – since it takes a bit of extra time – it's tempting to skip over some accessibility related things, and leave features like text highlighting out. Overall I think it makes sense to bundle all that into a module, which can then be reused over and over again 🙂
      Note: markup generation is not yet built into the module, which is why the examples below use PageArray::render() method to produce a simple list of results. This will be added later on, as a part of the same module or a separate Markup module. There's also no fancy JS API or anything like that (yet).
      This is an early release, so be kind – I got the find feature working last night (or perhaps this morning), and some final tweaks and updates were made just an hour ago 😅
      GitHub repository: https://github.com/teppokoivula/SearchEngine Modules directory: https://modules.processwire.com/modules/search-engine/ Usage
      Install SearchEngine module. Note: the module will automatically create an index field install time, so be sure to define a custom field (via site config) before installation if you don't want it to be called "search_index". You can change the field name later as well, but you'll have to update the "index_field" option in site config or module settings (in Admin) after renaming it.
      Add the site search index field to templates you want to make searchable. Use selectors to query values in site search index. Note: you can use any operator for your selectors, you will likely find the '=' and '%=' operators most useful here. You can read more about selector operators from ProcessWire's documentation.
      Options
      By default the module will create a search index field called 'search_index' and store values from Page fields title, headline, summary, and body to said index field when a page is saved. You can modify this behaviour (field name and/or indexed page fields) either via the Module config screen in the PocessWire Admin, or by defining $config->SearchEngine array in your site config file or other applicable location:
      $config->SearchEngine = [ 'index_field' => 'search_index', 'indexed_fields' => [ 'title', 'headline', 'summary', 'body', ], 'prefixes' => [ 'link' => 'link:', ], 'find_args' => [ 'limit' => 25, 'sort' => 'sort', 'operator' => '%=', 'query_param' => null, 'selector_extra' => '', ], ]; You can access the search index field just like any other ProcessWire field with selectors:
      if ($q = $sanitizer->selectorValue($input->get->q)) { $results = $pages->find('search_index%=' . $query_string . ', limit=25'); echo $results->render(); echo $results->renderPager(); } Alternatively you can delegate the find operation to the SearchEngine module as well:
      $query = $modules->get('SearchEngine')->find($input->get->q); echo $query->resultsString; // alias for $query->results->render() echo $query->pager; // alias for $query->results->renderPager() Requirements
      ProcessWire >= 3.0.112 PHP >= 7.1.0 Note: later versions of the module may require Composer, or alternatively some additional features may require installing via Composer. This is still under consideration – so far there's nothing here that would really depend on it, but advanced features like stemming most likely would.
      Installing
      It's the usual thing: download or clone the SearchEngine directory into your /site/modules/ directory and install via Admin. Alternatively you can install SearchEngine with Composer by executing composer require teppokoivula/search-engine in your site directory.
    • By teppo
      MarkupMenu is a markup module for generating menu trees. When provided a root page as a starting point, it generates a navigation tree (by default as a HTML "<ul>" element wrapped by a "<nav>" element) from that point onwards. If you've also provided it with current (active) page, the menu will be rendered accordingly, with current item highlighted and items rendered up to that item and its children (unless you disable the "collapsed" option, in which case the full page tree will be rendered instead).
      Modules directory: https://modules.processwire.com/modules/markup-menu/ GitHub repository: https://github.com/teppokoivula/MarkupMenu Usage
      As a markup module, MarkupMenu is intended for front-end use, but you can of course use it in a module as well. Typically you'll only need the render() method, which takes an array of options as its only argument:
      echo $modules->get('MarkupMenu')->render([ 'root_page' => $pages->get(1), 'current_page' => $page, ]); Note: if you omit root_page, site root page is used by default. If you omit current_page, the menu will be rendered, but current (active) page won't be highlighted etc.
      A slightly more complex example, based on what I'm using on one of my own sites to render a (single-level) top menu:
      echo $modules->get('MarkupMenu')->render([ 'current_page' => $page, 'templates' => [ 'nav' => '<nav class="{classes} menu--{menu_class_modifier}" aria-label="{aria_label}">%s</nav>', 'item_current' => '<a class="menu__item menu__item--current" href="{item.url}" tabindex="0" aria-label="Current page: {item.title}">{item.title}</a>', ], 'placeholders' => [ 'menu_class_modifier' => 'top', 'aria_label' => 'Main navigation', ], 'include' => [ 'root_page' => true, ], 'exclude' => [ 'level_greater_than' => 1, ], ]); Note: some things you see above may not be entirely sensible, such as the use of {menu_class_modifier} and {aria_label} placeholders. On the actual site the "nav" template is defined in site config, so I can define just these parts on a case-by-case basis while actual nav markup is maintained in one place.
      Please check out the README file for available render options. I'd very much prefer not to keep this list up to date in multiple places. Basically there are settings for defining "templates" for different parts of the menu (list, item, etc.), include array for defining rules for including in the menu and exclude array for the opposite effect, classes and placeholders arrays for overriding default classes and injecting custom placeholders, etc. 🙂
      MarkupMenu vs. MarkupSimpleNavigation
      TL;DR: this is another take on the same concept. There are many similarities, but also some differences – especially when it comes to the supported options and syntax. If you're currently using MarkupSimpleNavigation then there's probably no reason to switch over.
      I'd be surprised if someone didn't draw lines between this module and Soma's awesome MarkupSimpleNavigation. Simply put I've been using MSN (...) for years, and it's been great – but there are some issues with it, particularly in the markup generation area, and it also does some things in a way that doesn't quite work for me – the xtemplates thing being one of these. In some ways less about features, and more about style, I guess 🙂
      Anyhow, in MarkupMenu I've tried to correct those little hiccups, modernise the default markup, and allow for more flexibility with placeholder variables and additional / different options. MarkupMenu was built for ProcessWire 3.0.112+ and with PHP 7.1+ in mind, it's installable with Composer, and I have a few additional ideas (such as conditional placeholders) still on my todo list.
      One more small(ish) difference is that MarkupMenu supports overriding default options via $config->MarkupMenu. I find myself redefining the default markup for every site, which until now meant that each site had a wrapper function for MarkupSimpleNavigation (to avoid code / config repetition), and this way I've been able to leave that out 🙂
      Requirements
      ProcessWire >= 3.0.112 PHP >= 7.1.0 If you're working on an earlier version of ProcessWire or PHP, use MarkupSimpleNavigation instead.
    • By teppo
      Hey folks!
      I'm happy to finally introduce a project I've been working on for quite a while now: it's called Wireframe, and it is an output framework for ProcessWire.
      Note that I'm posting this in the module development area, maily because this project is still in rather early stage. I've built a couple of sites with it myself, and parts of the codebase have been powering some pretty big and complex sites for many years now, but this should still be considered a soft launch 🙂
      --
      Long story short, Wireframe is a module that provides the "backbone" for building sites (and apps) with ProcessWire using an MVC (or perhaps MVVM – one of those three or four letter abbreviations anyway) inspired methodology. You could say that it's an output strategy, but I prefer the term "output framework" since in my mind the word "strategy" means something less tangible. A way of doing things, rather than a tool that actually does things.
      Wireframe (the module) provides a basic implementation for some familiar MVC concepts, such as Controllers and a View layer – the latter of which consists of layouts, partials, and template-specific views. There's no "model" layer, since in this context ProcessWire is the model. As a module Wireframe is actually quite simple – not even nearly the biggest one I've built – but there's still quite a bit of stuff to "get", so I've put together a demo & documentation site for it at https://wireframe-framework.com/.
      In addition to the core module, I'm also working on a couple of site profiles based on it. My current idea is actually to keep the module very light-weight, and implement most of the "opinionated" stuff in site profiles and/or companion modules. For an example MarkupMenu (which I released a while ago) was developed as one of those "companion modules" when I needed a menu module to use on the site profiles.
      Currently there are two public site profiles based on Wireframe:
      site-wireframe-docs is the demo&docs site mentioned above, just with placeholder content replaced with placeholder content. It's not a particularly complex site, but I believe it's still a pretty nice way to dig into the Wireframe module. site-wireframe-boilerplate is a boilerplate (or starter) site profile based on the docs site. This is still very much a work in progress, but essentially I'm trying to build a flexible yet full-featured starter profile you can just grab and start building upon. There will be a proper build process for resources, it will include most of the basic features one tends to need from site to site, etc. --
      Requirements and getting started:
      Wireframe can be installed just like any ProcessWire module. Just clone or download it to your site/modules/ directory and install. It doesn't, though, do a whole lot of stuff on itself – please check out the documentation site for a step-by-step guide on setting up the directory structure, adding the "bootstrap file", etc. You may find it easier to install one of the site profiles mentioned above, but note that this process involves the use of Composer. In the case of the site profiles you can install ProcessWire as usual and download or clone the site profile directory into your setup, but after that you should run "composer install" to get all the dependencies – including the Wireframe module – in place. Hard requirements for Wireframe are ProcessWire 3.0.112 and PHP 7.1+. The codebase is authored with current PHP versions in mind, and while running it on 7.0 may be possible, anything below that definitely won't work. A feature I added just today to the Wireframe module is that in case ProcessWire has write access to your site/templates/ directory, you can use the module settings screen to create the expected directories automatically. Currently that's all, and the module won't – for an example – create Controllers or layouts for you, so you should check out the site profiles for examples on these. (I'm probably going to include some additional helper features in the near future.)
      --
      This project is loosely based on an earlier project called pw-mvc, i.e. the main concepts (such as Controllers and the View layer) are very similar. That being said, Wireframe is a major upgrade in terms of both functionality and architecture: namespaces and autoloader support are now baked in, the codebase requires PHP 7, Controllers are classes extending \Wireframe\Controller (instead of regular "flat" PHP files), implementation based on a module instead of a collection of drop-in files, etc.
      While Wireframe is indeed still in a relatively early stage (0.3.0 was launched today, in case version numbers matter) for the most part I'm happy with the way it works, and likely won't change it too drastically anytime soon – so feel free to give it a try, and if you do, please let me know how it went. I will continue building upon this project, and I am also constantly working on various side projects, such as the site profiles and a few unannounced helper modules.
      I should probably add that while Wireframe is not hard to use, it is more geared towards those interested in "software development" type methodology. With future updates to the module, the site profiles, and the docs I hope to lower the learning curve, but certain level of "developer focus" will remain. Although of course the optimal outcome would be if I could use this project to lure more folks towards that end of the spectrum... 🙂
      --
      Please let me know what you think – and thanks in advance!
    • By Robin S
      After forgetting the class name of the wonderful AdminPageFieldEditLinks module for what feels like the 100th time I decided I needed to give my failing memory a helping hand...
      Autocomplete Module Class Name
      Provides class name autocomplete suggestions for the "Add Module From Directory" and "Add Module From URL" fields at Modules > New.
      Requires ProcessWire >= v3.0.16.
      Screencast

      Installation
      Install the Autocomplete Module Class Name module.
      Configuration
      Add Module From Directory
      Choose the type of autocomplete suggestions list: "Module class names from directory" or "Custom list of module class names". The latter could be useful if you regularly install some modules and would prefer a shorter list of autocomplete suggestions. The list of class names in the modules directory is generated when the Autocomplete Module Class Name module is installed. It doesn't update automatically (because the retrieval of the class names is quite slow), but you can use the button underneath when you want to retrieve an updated list of class names from the directory. Add Module From URL
      If you want to see autocomplete suggestions for the "Add Module From URL" field then enter them in the following format:
      [autocomplete suggestion] > [module ZIP url]
      Example: RepeaterImages > https://github.com/Toutouwai/RepeaterImages/archive/master.zip Awesomplete options
      The "fuzzy search" option uses custom filter and item functions for Awesomplete so that the characters you type just have to exist in the autocomplete suggestion item and occur after preceding matches but do not need to be contiguous. Uncheck this option if you prefer the standard Awesomplete matching. Custom settings for Awesomplete can be entered in the "Awesomplete options" field if needed. See the Awesomplete documentation for more information.  
      https://github.com/Toutouwai/AutocompleteModuleClassName
      https://modules.processwire.com/modules/autocomplete-module-class-name/
    • By Robin S
      Repeater Images
      Adds options to modify Repeater fields to make them convenient for "page-per-image" usage. Using a page-per-image approach allows for additional fields to be associated with each image, to record things such as photographer, date, license, links, etc.
      When Repeater Images is enabled for a Repeater field the module changes the appearance of the Repeater inputfield to be similar (but not identical) to an Images field. The collapsed view shows a thumbnail for each Repeater item, and items can be expanded for field editing.
      Screencast

      Installation
      Install the Repeater Images module.
      Setup
      Create an image field to use in the Repeater field. Recommended settings for the image field are "Maximum files allowed" set to 1 and "Formatted value" set to "Single item (null if empty)". Create a Repeater field. Add the image field to the Repeater. If you want additional fields in the Repeater create and add these also. Repeater Images configuration
      Tick the "Activate Repeater Images for this Repeater field" checkbox. In the "Image field within Repeater" dropdown select the single image field. You must save the Repeater field settings to see any newly added Image fields in the dropdown. Adjust the image thumbnail height if you want (unlike the core Images field there is no slider to change thumbnail height within Page Edit). Note: the depth option for Repeater fields is not compatible with the Repeater Images module.
      Image uploads feature
      There is a checkbox to activate image uploads. This feature allows users to quickly and easily add images to the Repeater Images field by uploading them to an adjacent "upload" field.
      To use this feature you must add the image field selected in the Repeater Images config to the template of the page containing the Repeater Images field - immediately above or below the Repeater Images field would be a good position.
      It's recommended to set the label for this field in template context to "Upload images" or similar, and set the visibility of the field to "Closed" so that it takes up less room when it's not being used. Note that when you drag images to a closed Images field it will automatically open. You don't need to worry about the "Maximum files allowed" setting because the Repeater Images module overrides this for the upload field.
      New Repeater items will be created from the images uploaded to the upload field when the page is saved. The user can add descriptions and tags to the images while they are still in the upload field and these will be retained in the Repeater items. Images are automatically deleted from the upload field when the page is saved.
      Tips
      The "Use accordion mode?" option in the Repeater field settings is useful for keeping the inputfield compact, with only one image item open for editing at a time. The "Repeater item labels" setting determines what is shown in the thumbnail overlay on hover. Example for an image field named "image": {image.basename} ({image.width}x{image.height})  
      https://github.com/Toutouwai/RepeaterImages
      https://modules.processwire.com/modules/repeater-images/
×
×
  • Create New...