tpr

AdminOnSteroids

Recommended Posts

That's something I've already thought of but the way I tried to make it work failed and there were other things to do :) I'm not sure this module is the best place to make admin theme corrections, but for a temporary solution it could do.

  • Like 1

Share this post


Link to post
Share on other sites

...I'm not sure this module is the best place to make admin theme corrections, but for a temporary solution it could do.

Well, all your mods should be part of ProcessWire by default, so... :P

  • Like 1

Share this post


Link to post
Share on other sites

very cool tpr!

feature request: an option to show the save options instantly on button hover. i find it really annoying to have to click on this little chevron to show the popup and then have to click again on the right option. i'm still missing the very quick "save+new" and "save+close" from joomla  :-X

offtopic: also thanks for the hint to netteforms - my project needs more time than i thought but it is getting more and more awesome :)

post-2137-0-51778500-1464300856_thumb.pn

Share this post


Link to post
Share on other sites

Giving admin theme corrections a second thought I support the idea. I have a few other fixes in my mind besides your suggestions so stay tuned.

  • Like 1

Share this post


Link to post
Share on other sites

Movie time!

These are two tweaks: always visible sidebar items and fixed header/sidebar. There are still some details to polish but seems useful.

post-3156-0-91689400-1464336862_thumb.gi

  • Like 4

Share this post


Link to post
Share on other sites

Thanks soo much! Can't wait to try it out. Unfortunately I have to deal with a deadline, but I will manage to try it out on the weekend, I'm sure.

  • Like 1

Share this post


Link to post
Share on other sites

feature request: an option to show the save options instantly on button hover.

I would prefer these extra buttons always visible. Waiting for the hover will cause frustration sooner or later :) Perhaps adding them below the main button? 

  • Like 1

Share this post


Link to post
Share on other sites

what i've also came across several times is when on mobile and you have a pagetable and you want to scroll down, if you tap on a pagetable item it will trigger the pagetable sort. it would be great to disable table sorting on mobile. or show just a sort symbol and allow sorting only on this icon.

:)

Share this post


Link to post
Share on other sites

I would prefer these extra buttons always visible. Waiting for the hover will cause frustration sooner or later :) Perhaps adding them below the main button? 

in this case i would prefer them to be rendered beside in one row (inline)

Share this post


Link to post
Share on other sites

v003 is uploaded with some "before-the-weekend" Reno theme updates:

  • Make header sticky: stick the header to the top of the browser window so it stays in place when scrolling down
  • Make sidebar sticky: stick the sidebar to the top to make it always visible
  • Auto hide sidebar on left: auto hide the sidebar so it's accessible by moving the mouse to the left side of the screen
  • Always show sidebar items (disable accordion): make sidebar submenus more compact and do not hide them
  • Place header button next to the main title: moves the top (cloned) main button next to the title to make it easier to reach
  • Move notice close buttons to the left: put the close button of the notice message to the left for easier access
  • Like 3

Share this post


Link to post
Share on other sites

Didn't try the module (great name btw) yet, but how about making header sticky in the default admin theme? after-the-weekend, of course :-)

  • Like 1

Share this post


Link to post
Share on other sites

don't know how your module is organized (deadline coming), but throwing in an idea:

maybe we could have a "custom" folder, where we can put in our own code snippets and your module will make them visible for toggling on/off. 

for example:

/custom/makeButtonsBigger.js would result in some custom code that makes admin buttons bigger and a checkbox in your module. that way we could build our own repository of admin tweaks, put them on github or the like and on every new pw-install we would just have to do a git clone and tick some checkboxes.

what do you think?

this is quite similar to admincustomfiles but i never found it really easy to use so i don't really use it a lot. maybe we could have some kind of syntax in thos files to restrict it to a selector and show some better descriptions in your module/panel

/* custom admin tweak example
 * 
 * #summary
 * this is a great summary
 * with lots of content
 *
 * #pageselector
 * id>10
 *
 * #editedpageselector
 * template=example
 */

$(document).ready(...);

#editedpageselector would refer to the currently edited page in processpageedit, whereas #pageselector would refer to the current admin page

any thoughts on this?

  • Like 1

Share this post


Link to post
Share on other sites

Didn't try the module (great name btw) yet, but how about making header sticky in the default admin theme? after-the-weekend, of course :-)

Check the latest commit (v004). There are other fixes as well for the admin themes, eg. do not apply some changes to modal contents, plus only add body classes to the proper admin themes.

maybe we could have a "custom" folder, where we can put in our own code snippets and your module will make them visible for toggling on/off. 

This would be surely possible but I need some time to fully understand it :) At first I'll concentrate on the "basics".

  • Like 1

Share this post


Link to post
Share on other sites

v006 is up - there are some new Reno theme tweaks plus LoadCollapsedModuleInfos. This auto-collapses module info fields on module configuration pages, saving space. 

  • Like 3

Share this post


Link to post
Share on other sites

v007 is up, with a Reno tweak that removes perhaps the biggest frustration the sidebar causes - the inability to single-click on the header links to navigate.

The module is featured in PW Weekly Nr 107, thanks!

Since the module is under rapid development it's likely that new features will be added before you even get to this post, which is why we won't even try to include a full list of features here.

So true, there's a lot of things awaiting to be fixed :)

  • Like 1

Share this post


Link to post
Share on other sites

v008 is committed to GitHub and it enables showing the Save dropdown menu on hover instead of on click. The only way I found to achieve this is adding a CSS class to the dropwdown which seems to work fine with the exception of Module config pages. Anyway, it covers 99% of the usage scenarios I think.

More agressive modifications were dropped because the markup wasn't generated the way I initially thought and it would be hard to solve.

  • Like 1

Share this post


Link to post
Share on other sites

v009 comes with a small feature update: ctrl+click on a language tab will activate all the language tabs of the same language. This is great for switching the current admin page fields to another language, eg. for checking contents of multiple fields at once.

  • Like 2

Share this post


Link to post
Share on other sites

The latest update (v010) can remove the masthead from the Reno theme. This is available only if sticky header is on. In fact this feature uses another approach for the sticky header because only the main content is scrollable, which perhaps makes it easier to see whether the page is scrolled down or not.

For the Reno theme there is a new setting "AlwaysShowSearch".

Other dropdown buttons are now also supported in the HoverSaveDropdown tweak. Remind me next time not trying to modify a cloned button instance because it won't work :)

There were numerous tweaks made to the admin configuration screen. Nested checkboxes now can't be modified if their parents are not checked, and also some space were saved by playing with field/fieldset options.

post-3156-0-86629700-1464639714_thumb.pn

  • Like 4

Share this post


Link to post
Share on other sites

Hi @tpr,

thanks for making this fine tool for us. Is it for PW 2.7 too, or only for PW 3.x?

I cannot see a "required" property in the getModuleInfo. In the modules header comment it states ProcessWire 3.x, but then I cannnot see a namespace declaration in the file. This all makes me abit unsure, therefor I ask here. Sorry!

  • Like 2

Share this post


Link to post
Share on other sites

Good question. These are mainly front-end stuff so I think it won't have issues with PW 2.x. I'll try it on a 2.x install.

  • Like 1

Share this post


Link to post
Share on other sites

It seems that there are too many little thing changed from v3 which prevents certain features to work on PW v2, at least this is the case with 2.6. There are also some features that are missing from v2 that this module tries to modify, e.g long click duration.

I could breathe life into most of the submodules with little changes but I tend to support v3 only. There's a Hungarian saying "who looks backwards goes ass front to the future" and I believe in it :)

There are some unpublished updates to the module, eg fixed CKEditor toolbar and page preview link next to title. And also there are some bugs still awaiting to eliminate so I'll keep it in the shadows for a while :)

post-3156-0-95109300-1464728731_thumb.pn

  • Like 2

Share this post


Link to post
Share on other sites

i think that would be a perfect fit for your module: https://processwire.com/talk/topic/13419-delete-a-lot-of-pics-at-once

something like an additional trash icon that, when clicked sets all images to deleted-state:

post-2137-0-66957100-1464812800_thumb.pn

maybe you could also include this one into that update ;)

filesort.gif

https://processwire.com/talk/topic/13064-inputfieldfile-image-sorting-autosorting/

Share this post


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


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      Some introduction...
      This module is experimental and there are probably bugs - so treat it as alpha and don't use it on production websites.
      I started on this module because there have been quite a few requests for "fake" or "invisible" parent functionality and I was curious about what is possible given that the idea sort of goes against the PW page structure philosophy. I'm not sure that I will use this module myself, just because I don't really see a long list of pages under Home (or anywhere else) as untidy or cluttered. I would tend to use Lister Pro when I want to see some set of pages as a self-contained group. But maybe others will find it useful.
      At the moment this module does not manipulate the breadcrumb menu in admin. So when you are editing or adding a virtual child the real location of the page is revealed in the breadcrumb menu. That's because I don't see the point in trying to comprehensively fool users about the real location of pages - I think it's better that they have some understanding of where the pages really are. But I'm open to feedback on this and it is possible to alter the breadcrumbs if there's a consensus that it would be better that way.
       
      Virtual Parents
      Allows pages in Page List to be grouped under a virtual parent.
      This module manipulates the page list and the flyout tree menu to make it appear that one or more pages are children of another page when in fact they are siblings of that page.
      Why would you do that instead of actually putting the child pages inside the parent? Mainly if you want to avoid adding the parent name as part of the URL. For example, suppose you have some pages that you want to be accessed at URLs directly off the site root: yourdomain.com/some-page/. But in the page list you want them to be appear under a parent for the sake of visual grouping or to declutter the page list under Home.
      Example of how the page structure actually is

      Example of how the page structure appears with Virtual Parents activated

      How it works
      This module identifies the virtual parents and virtual children by way of template. You define a single template as the virtual parent template and one or more templates as the virtual child templates. Anytime pages using the child template(s) are siblings of a page using the parent template, those child pages will appear as children of the virtual parent in the page list and tree menu.
      You will want to create dedicated templates for identifying virtual parents and virtual children and reserve them just for use with this module.
      Features
      Adjusts both page list and tree flyout menu to show the virtual parent/child structure, including the count of child pages. Works everywhere page list is used: Page List Select / Page List Select Multiple (and therefore CKEditor link dialog). Intercepts the "Add page" process in admin, so that when an attempt is made to add a child to a virtual parent, the child is added where it belongs (the next level up) and the template selection is limited to virtual child templates. Intercepts moving and sorting pages in the page list, to ensure only virtual children may be moved/sorted under the virtual parent. Superusers have a toggle switch at the bottom of the page list to easily disable/enable Virtual Parents in order to get a view of what the real page structure is. Usage
      Install the Virtual Parents module.
      In the module config, enter pairs of parent/child template names in the form virtual_parent_template=virtual_child_template. If needed you can specify multiple pipe-separated child templates: virtual_parent_template=child_template_1|child_template_2. One pair of template names per line.
      There is a checkbox in the module config to toggle Virtual Pages on and off, but it's more convenient to use this from the page list.
      Notes
      It's important to keep in mind the real location of the virtual child pages. This module is only concerned with adjusting the appearance of page list and tree menu for the sake of visual grouping and tidiness. In all other respects the virtual children are not children of the virtual parent at all.
      It's recommended to select an icon for the virtual parent template (Advanced tab) so virtual parents are marked out in the page list as being different from normal parent pages.
      Do not place real children under a virtual parent. There is some protection against this when moving pages in the page list, but when it comes to changing a page's parent via the Settings tab the only protection is common sense.
       
      https://github.com/Toutouwai/VirtualParents
    • By horst
      Wire Mail SMTP

      An extension to the new WireMail base class that uses SMTP-transport

      This module integrates EmailMessage, SMTP and SASL php-libraries from Manuel Lemos into ProcessWire. I use this continously evolved libraries for about 10 years now and there was never a reason or occasion not to do so. I use it nearly every day in my office for automated composing and sending personalized messages with attachments, requests for Disposition Notifications, etc. Also I have used it for sending personalized Bulkmails many times.

      The WireMailSmtp module extends the new email-related WireMail base class introduced in ProcessWire 2.4.1 (while this writing, the dev-branch only).
       
      Here are Ryans announcement.



      Current Version 0.2.7
      get it from the Modules Directory Install and Configure

      Download the module into your site/modules/ directory and install it.

      In the config page you fill in settings for the SMTP server and optionaly the (default) sender, like email address, name and signature.
      You can test the smtp settings directly there. If it says "SUCCESS! SMTP settings appear to work correctly." you are ready to start using it in templates, modules or bootstrap scripts.


      Usage Examples
      The simplest way to use it:
      $numSent = wireMail($to, $from, $subject, $textBody); $numSent = wireMail($to, '', $subject, $textBody); // or with a default sender emailaddress on config page This will send a plain text message to each recipient.
       
      You may also use the object oriented style:
      $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $mail->to($toEmail, $toName); $mail->from = $yourEmailaddress; // if you don't have set a default sender in config // or if you want to override that $mail->subject($subject); $mail->body($textBody); $numSent = $mail->send(); Or chained, like everywhere in ProcessWire:
      $mail = wireMail(); $numSent = $mail->to($toEmail)->subject($subject)->body($textBody)->send(); Additionaly to the basics there are more options available with WireMailSmtp. The main difference compared to the WireMail BaseClass is the sendSingle option. With it you can set only one To-Recipient but additional CC-Recipients.
      $mail = wireMail(); $mail->sendSingle(true)->to($toEmail, $toName)->cc(array('person1@example.com', 'person2@example.com', 'person3@example.com')); $numSent = $mail->subject($subject)->body($textBody)->send(); The same as function call with options array:
      $options = array( 'sendSingle' => true, 'cc' => array('person1@example.com', 'person2@example.com', 'person3@example.com') ); $numSent = wireMail($to, '', $subject, $textBody, $options); There are methods to your disposal to check if you have the right WireMail-Class and if the SMTP-settings are working:
      $mail = wireMail(); if($mail->className != 'WireMailSmtp') { // Uups, wrong WireMail-Class: do something to inform the user and quit echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; return; } if(!$mail->testConnection()) { // Connection not working: echo "<p>Couldn't connect to the SMTP server. Please check the {$mail->className} modules config settings!</p>"; return; } Following are a ...


      List of all options and features


      testConnection () - returns true on success, false on failures


      sendSingle ( true | false ) - default is false

      sendBulk ( true | false ) - default is false, Set this to true if you have lots of recipients (50+)


      to ($recipients) - one emailaddress or array with multiple emailaddresses

      cc ($recipients) - only available with mode sendSingle, one emailaddress or array with multiple emailaddresses

      bcc ($recipients) - one emailaddress or array with multiple emailaddresses

       
      from = 'person@example.com' - emailaddress, can be set in module config (called Sender Emailaddress) but it can be overwritten here

      fromName = 'Name Surname' - optional, can be set in module config (called Sender Name) but it can be overwritten here


      priority (3) - 1 = Highest | 2 = High | 3 = Normal | 4 = Low | 5 = Lowest

      dispositionNotification () or notification () - request a Disposition Notification


      subject ($subject) - subject of the message

      body ($textBody) - use this one alone to create and send plainText emailmessages

      bodyHTML ($htmlBody) - use this to create a Multipart Alternative Emailmessage (containing a HTML-Part and a Plaintext-Part as fallback)

      addSignature ( true | false ) - the default-behave is selectable in config screen, this can be overridden here
      (only available if a signature is defined in the config screen)

      attachment ($filename, $alternativeBasename = "") - add attachment file, optionally alternative basename


      send () - send the message(s) and return number of successful sent messages


      getResult () - returns a dump (array) with all recipients (to, cc, bcc) and settings you have selected with the message, the message subject and body, and lists of successfull addresses and failed addresses,


      logActivity ($logmessage) - you may log success if you want

      logError ($logmessage) - you may log warnings, too. - Errors are logged automaticaly
       
       
      useSentLog (true | false) - intended for usage with e.g. third party newsletter modules - tells the send() method to make usage of the sentLog-methods - the following three sentLog methods are hookable, e.g. if you don't want log into files you may provide your own storage, or add additional functionality here

      sentLogReset ()  - starts a new LogSession - Best usage would be interactively once when setting up a new Newsletter

      sentLogGet ()  - is called automaticly within the send() method - returns an array containing all previously used emailaddresses

      sentLogAdd ($emailaddress)  - is called automaticly within the send() method
       
      Changelog: https://github.com/horst-n/WireMailSmtp/blob/master/CHANGELOG.md
       
    • By ukyo
      Call ProcessWire API Functions Inside STRING
      Github Repo
      Current status : BETA
      Each called method must return string value !
      I added all functions, but not tested all. I focused page(), page()->render and field properties (label, description and notes). I also tested some basic pages() api calls.
      Your API calls must start with { and must end with }. For use multiple arguments inside functions, separate arguments with ~ char.
      NOTE If you pass directly arguments to api {page(title)}, this call will check for requestedApiCall()->get(arguments).
      USAGE
      processString(string, page, language); Get page title <?php $str = "You are here : {page:title}"; echo processString($str); ?> Get page children render result <?php $str = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<hr>{page:render:children}"; echo processString($str); ?> Get homepage title <?php $str = "You can visit our <a hre='{pages(1):url}'>{pages:get(1):title}</a>"; echo processString($str); ?> Get title field label, description or notes <?php $str = "Our title field properties are : label: {label(title)} - description: {description(title)} - notes: {notes(title)}"; echo processString($str); ?> Multiple examples <?php $str = " <ul class='uk-list uk-list-striped'> <li><b>01: GET FIELD LABEL</b> <code>&#123;label(title)&#125;</code> <b>RESULT :</b> <code>{label(title)}</code></li> <li><b>02: GET FIELD LABEL WITH PREFIX</b> <code>&#123;label(title~=> )&#125;</code> <b>RESULT :</b> <code>{label(title~=> )}</code></li> <li><b>03: GET FIELD LABEL WITH SUFFIX</b> <code>&#123;label(title~~ <=)&#125;</code> <b>RESULT :</b> <code>{label(title~~ <=)}</code></li> <li><b>04: GET FIELD DESCRIPTION</b> <code>&#123;description(title)&#125;</code> <b>RESULT :</b> <code>{description(title)}</code><br> <li><b>05: GET FIELD DESCRIPTION WITH PREFIX</b> <code>&#123;description(title~=> )&#125;</code> <b>RESULT :</b> <code>{description(title~=> )}</code></li> <li><b>06: GET FIELD DESCRIPTION WITH SUFFIX</b> <code>&#123;description(title~~ <=)&#125;</code> <b>RESULT :</b> <code>{description(title~~ <=)}</code></li> <li><b>07: GET FIELD NOTES</b> <code>&#123;notes(title)&#125;</code> <b>RESULT :</b> <code>{notes(title)}</code><br> <li><b>08: GET FIELD NOTES WITH PREFIX</b> <code>&#123;notes(title~=> )&#125;</code> <b>RESULT :</b> <code>{notes(title~=> )}</code></li> <li><b>09: GET FIELD NOTES WITH SUFFIX</b> <code>&#123;notes(title~~ <=)&#125;</code> <b>RESULT :</b> <code>{notes(title~~ <=)}</code></li> <li><b>10: GET PAGE TITLE</b> <code>&#123;page(title)&#125;</code> <b>RESULT :</b> <code>{page(title)}</code></li> <li><b>11: GET PAGE TITLE</b> <code>&#123;page:title&#125;</code> <b>RESULT :</b> <code>{page:title}</code></li> <li><b>12: GET PAGE RENDER TITLE</b> <code>&#123;page:render:title&#125;</code> <b>RESULT :</b> <code>{page:render:title}</code></li> <li><b>12: GET HOMEPAGE TITLE</b> <code>&#123;pages:get(template=home):title&#125;</code> <b>RESULT :</b> <code>{pages:get(template=home):title}</code></li> <li><b>13: GET HOMEPAGE TEMPLATE ID</b> <code>&#123;pages:get(template=home):template:id&#125;</code> <b>RESULT :</b> <code>{pages:get(template=home):template:id}</code></li> </ul> "; echo processString($str); ?>
    • By Robin S
      This module corrects a few things that I find awkward about the "Add New Template" workflow in the PW admin. I opened a wishlist topic a while back because it would good to resolve some of these things in the core, but this module is a stopgap for now.
      Originally I was going to share these as a few standalone hooks, but decided to bundle them together in a configurable module instead. This module should be considered alpha until it has gone through some more testing.
      Add Template Enhancements
      Adds some efficiency enhancements when adding or cloning templates via admin.

      Features
      Derive template label from name: if you like to give each of your templates a label then this feature can save some time. When one or more new templates are added in admin a label is derived automatically from the name. There are options for underscore/hyphen replacement and capitalisation of the label. Edit template after add: when adding only a single template, the template is automatically opened for editing after it is added. Copy field contexts when cloning: this copies the field contexts (a.k.a. overrides such as column width, label and description) from the source template to the new template when using the "Duplicate/clone this template?" feature on the Advanced tab. Copy field contexts when duplicating fields: this copies the field contexts if you select the "Duplicate fields used by another template" option when adding a new template. Usage
      Install the Add Template Enhancements module.
      Configure the module settings according to what suits you.
       
      https://github.com/Toutouwai/AddTemplateEnhancements
    • By AAD Web Team
      Hi,
      I've put in a support request (as a followup on an existing one) for this but it's nearly 10pm Ryan's time, so I thought I'd ask on here just in case someone can help...
      Yesterday we purchased ProDrafts, but I couldn't get the key to validate. Every time I hit submit on the module settings screen the key would be removed from the field I entered it in, and then it would complain about the missing value. I put in a support request and Ryan responded last night. It turned out it was because we're behind a proxy/firewall. He gave me a fix to get around that issue - some code to go into admin.php. I put that code in and saved admin.php, but now I can't even get into our admin anymore!
      (Just to clarify, I took the code back out and saved admin.php but that made no difference. It's definitely not the new code causing the error.)
      The errors relate to a lack of permission on the ProDrafts module (see attached screenshot). We do have a key, but evidently the code Ryan gave me to add the key in via admin.php isn't taking effect before the error is thrown...?
      I tried removing the ProDrafts directory from the modules directory, but that hasn't helped.
      Is there a hook I can put in somewhere to tell it not to load ProDrafts at all, or not check the permissions? Or is there some way to manually uninstall it from the file system?
      Thanks!
      Margaret