Jump to content
tpr

AdminOnSteroids

Recommended Posts

No, I haven't noticed this. I'll check it some day, I don't understand all of it atm 🙂

Share this post


Link to post
Share on other sites

Hey @tpr

I have been seeing this a bit lately:

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /site/modules/AdminOnSteroids/AdminOnSteroids.module on line 2622

 

  • Like 1

Share this post


Link to post
Share on other sites

@adrian Probably yes, I've changed that, thanks.

Yesterday I added a "translatorModal" tweak to Misc that allows editing translations in a modal, hope you find it useful.

translatorModal.gif.588a46196af89bab6521ea3f17782940.gif

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey @tpr - not sure what its purpose is, but:

html.aos {
    overflow: overlay;
}

does weird things to fixed position elements. For example, when Tracy is disabled, the icon that appears in place of the debug bar (to re-enable it) is positioned under the vertical scrollbar. If I remove this overflow rule, it is positioned as expected.

image.png.e71b3c8d00f12af1e15452edabdc171e.png

Thanks!

Share this post


Link to post
Share on other sites

hey @tpr, is there a way to disable the filterbox on some admindatatables, eg via adding "nofilterbox" class to the table?

Edit: Created a PR

Share this post


Link to post
Share on other sites

All done. @bernhard I had to modify return false to true to to keep processing other tables in the loop (if any).

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi @tpr,

I found an irritating behaviour when using the submodule ListerTweaks. If I make a custom selection of the Users lister columns,

Screenshot1.png

it will not be reflected in the columns selection on the Users page:
There the default selection is displayed, and trying to change it has no effect.

Screenshot2.png

Share this post


Link to post
Share on other sites

I remember seeing this bug earlier but couldn't fix it. I'll give it another try some day, thanks for bringing this up.

Share this post


Link to post
Share on other sites

Hi, @tpr and thanks you for adding this useful module.
After switching on AdminOnSteroids I noticed a small problem appearing when opening and closing the repeater, but only in Mozilla Firefox and Admi Theme Uikit. After opening the single repeater, it remains in the open position.
I'm not fluent in JS and I do not know where the error is, but the console shows me information as below.

Error: Permission denied to access property "apply"

Admin-on-steroids.thumb.gif.043b81476e905d2468529feb4f4967ba.gif

SERVER DETAILS
ProcessWire: 3.0.126
PHP: 7.3.1
Webserver: Apache/2.4.35 (Win64) OpenSSL/1.1.1a
MySQL: 5.7.24

MODULE DETAILS
AdminOnSteroids: 2.0.13
ProcessTracyAdminer: 1.0.6
TracyDebugger: 4.17.22

Share this post


Link to post
Share on other sites

I'm not sure but perhaps it's a cross-domain issue, perhaps caused by a Firefox addon, I got the idea from here:

Quote

This only happens with Firefox addons that try to insert a <script> tag that points to an external cross-domain script.

 

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for the answer ...
It seems that the LastPass plugin generate error ...
After turning off the add-on LastPass  everything has returned to normal ...

  • Like 2

Share this post


Link to post
Share on other sites

What do you think about appending the field type to the Fields asmSelect list options? I often don't remember the type by the name so it would come handy. However, since it's a plain select HTML element it cannot be styled and in the rendered asmSelect the type appears twice (also at the end of the bars).

asmfieldtypes.gif

  • Like 4

Share this post


Link to post
Share on other sites
8 hours ago, tpr said:

What do you think about appending the field type to the Fields asmSelect list options?

I like it 🙂 Not beautiful but does the trick.

  • Like 1

Share this post


Link to post
Share on other sites

Actually having the field type appended to the name is quite handy when used together with the "add search box to asmSelect" feature because field types can also be searched.

So for example you can easily find CroppableImage3 image o CKEditor fields, etc, which is a huge help when there are a lot of fields.

image.png.6476b86c88f263cdfc408b4cf3af351f.png

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

OK, due to the popular demand towards this feature it's been added to v2.0.14 🙂 

Some changes:

  • the new suffix contains the field type (eg. "Textarea"), and the inputfield class if it's different from it (eg. "CKEditor")
  • the optional inputfieldClass is not added if it's the language variant (to avoid situations like "excerpt - TextareaLanguage (Textarea)"
  • on the right side of the bars the original field type string is removed (before the percentage) not to display it twice

image.thumb.png.d05432f32b4e1fa2f5015653e464629e.png

  • Like 7

Share this post


Link to post
Share on other sites
12 hours ago, tpr said:

due to the popular demand

Thanks a lot for caring! I'm pretty sure that those who could not click the like button are just away for a long weekend 🙂

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

I've added data-attributes to field wrappers in v2.0.15 containing information about the included field. Unlike the info currently available it's not on the inputfield itself but on its wrapper, making admin CSS/JS customizations easier to apply.

https://github.com/rolandtoth/AdminOnSteroids/wiki/Misc

image.png.292388e43f5993178602837a16998464.png

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Hello!

I'm brand new to ProcessWire (having been a Joomla! guy for many years and then adding Wordpress to my toolkit more recently). I've taken on a new client and their site uses ProcessWire. Last night I got the joy (lol) of moving their site to my large VPS and learning the ins and outs of PW. They were running PHP 7.0 and I bumped them to PHP 7.3. After fixing a bunch of front end issues with their theme, everything looks good except that in the admin, AdminOnSteroids is throwing some notices:

PHP Notice: Trying to get property 'template' of non-object in .../AdminOnSteroids/AdminOnSteroids.module:2970   
PHP Notice: Trying to get property 'name' of non-object in .../AdminOnSteroids/AdminOnSteroids.module:2970

Does anyone know how to fix this? I can hack my way around some PHP, but I'm not a programmer, so this one is a bit beyond my understanding. Any help would be appreciated.

Share this post


Link to post
Share on other sites

@Brian Peat Hello Brian,

Welcome to the forum & thank you for your first post. I hope @tpr - the author of this module - picks this up quickly for you (he's usually very responsive.) Although I'm reluctant to suggest a fix for that line in the module (I'm not wholly familiar with TPR's intention there and simply suppressing the notice might be hiding a larger issue) I do hope you end up enjoying working with ProcessWire and interacting here in the forums!

Best wishes,
Steve

Share this post


Link to post
Share on other sites

@Brian Peat welcome. One thought regarding the module: what version is the AOS module?  When going in admin under modules site adminonsteroids, there is a feature to directly check for newer versions. Maybe you are not running the latest version, where these issues are already fixed? At least there is no harm with updating AOS to the latest.  

 

Share this post


Link to post
Share on other sites

@horst I'm up to date as far as I know. It's running 2.0.15.

I may edit my hosts file so I can see their old site again and check in there. It's possible they've been ignoring the errors for a while, but I'm not sure.

Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Hi @Brian Peat,

that line fails if a template doesn't have a name

I was wrong, it's the editedPage being null, will add a check.

  • Like 1

Share this post


Link to post
Share on other sites

@tpr No, I haven't fiddled in the database. I'm thinking this template is old though, and is likely missing some things. I had to add the name space to a few files and also fix a few things that wouldn't play nice with PHP 7.3.

Share this post


Link to post
Share on other sites

Hey there. This morning I upgraded AOS for a project to latest version 2.0.15 and started noticing some issue viewing the hidden/unpublished pages in the admin. Tried to uninstall the module and grabbed a fresh copy, however the same issue appeared.

image.png.bde7d15019041782c808cedf7d7b3d1d.png

If I move my mouse over those that are not showing but only ID's are listed, they all appear fine:

image.png.483693e33aa5f9976094218a237677bb.png

Started disabling options of AOS in order to check which one would be causing the issue and it appeared that it is the PageList tweaks and more specifically: Show page IDs (SuperUser only) . I did not set any other options, however if I remove this one, the list shows properly. The issue seems to appear on both themes - default and uikit. Any ideas how could I keep the page ID's showing but keeping the hidden pages visible? Is this a feature/option I've missed or else?

  • 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 eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild.  
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Steps (Read more) Manual override of the selected value (will still adhere to the rules above) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant If it's usable for others I'll add it to the Modules list  
      Changelog
      v002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional 
      v001
      - Initial release
       
      Thanks!
       
       
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

       
      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
    • By adrian
      This module allows you to automatically rename file (including image) uploads according to a configurable format
      This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs.   Github: https://github.com/adrianbj/CustomUploadNames
      Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/
      Renaming Rules
      The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files.
      $config->webpOptions = array(     'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments
      The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). 
       
       
      NOTE:
      This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like:
      Final ReportV6 web version for John Feb 23.PDF

×
×
  • Create New...