-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
I am not sure why you had issues uploading an SVG in one field. As for why there is no crop/variations - these really aren't that relevant to the a vector file. You could kind of crop by using a clipping mask, but an actual crop is a pretty complex thing that would require a powerful vector editor to achieve because it involves completely changing the paths that make up the Illustration.
-
@netcarver - what about taking this approach instead of those replacements? https://stackoverflow.com/a/22490902/1524576
-
Thanks for the suggestions @Pixrael - I wasn't planning on swapping editors, but I must admit that I do actually like AceEditor (use in Tracy's Console and Template Editor panels). The documentation and API are not great/consistent, but it seems to have the best PHP linting and code completion, at least compared with code mirror. Monaco might be another good option though.
-
Something unusual going on here. This is what I see. You can tell I am at Setup > Admin Actions and a bd($info) on line 552 definitely contains a "title". Any chance you could trace it back to find why it's not working at your end please?
-
How to populate an integer fieldtype via autoload module
adrian replied to Federico's topic in General Support
If I understand my math correctly, if it has a leading zero, then it's not an integer anymore. You could just use a text field though -
I see your point, and I use PYDIO (https://pydio.com) for that (and sharing files with clients), but my needs for your module are for editing a site when I am not at my dev machine and don't have FTP setup. I think it would be really helpful to be able to create a new file. I don't think I would really ever need a new directory, but it couldn't hurt Let me know if you're really against the idea - I might consider creating my own fork, because this could be really handy to get out of a bind every now and then.
-
Hi @Robin S - it's late here, so need to sleep, but quick questions - is this only a problem for custom "Site" actions? Is it fixed if you save the module config settings page? Let me know and I'll sort it out in the morning.
-
Small new feature that some of you may find useful. It is disabled by default so you will need to turn it on in the ProcessWire Info panel config settings section. Goto Page By ID which is available in the PW Info panel: It allows you to enter a page ID and click "View" or "Edit to be taken to the appropriate place. This was requested by a friend who is getting into PW development and I can see it being quite useful on sites where you reference key pages by ID in your template files and want quick access to view/edit them without browsing or typing a full URL, especially when you can't actually remember what pages they actually are
-
Of course, both new files and new folders should be set using the chmod values defined in the site/config.php file. wireMkDir() should take care of the folders, but file creation might have to be manually set?
-
Sorry - another request - what about the ability to create a new file in the current folder? Thanks for considering!
-
How to populate an integer fieldtype via autoload module
adrian replied to Federico's topic in General Support
Nice catch - for some reason in PHP methods are not case sensitive - very weird IMO -
How to populate an integer fieldtype via autoload module
adrian replied to Federico's topic in General Support
That should work fine. I just tested via the Tracy console (injecting into ready.php). There is certainly no need to save the page because you are populating at render(). I don't think it should have anything to do with the name of your function being renderField, but you could try something that doesn't match a core public function. The other thing I would suggest (which I didn't do in the example below, but will work) is to use InputfieldInteger::render just to improve the efficiency a little. Also, try like I have in your ready.php file. The other problem might be that your module isn't installed or isn't being loaded - did you do a Modules > Refresh? Does it show up under the "Modules Loaded" section of the Debug Mode panel in Tracy? -
Yeah, you have the page id correct. Did you try echoing: $settingsPage->id like I suggested? If that works, check other fields on that page and see if somehow it's just the store_hours field.
-
Actually, I do wonder about that - what version of PW is this? Maybe the behavior of get has changed since the early days, but I don't think so.
-
That won't matter because he is using $pages->get() rather than $pages->find() I think you do need to confirm 1006 and if that is correct, try $settingsPage->id to make sure that works - that way you can narrow down if it's a problem with the page or the store_hours field.
-
@matjazp - I am thinking about starting to use this, but was wondering your thoughts about maybe integrating https://github.com/spatie/image-optimizer instead or as well as https://github.com/psliwa/image-optimizer It uses a similar collection of tools for optimizing, but the main difference is that it also includes SVGO which of course adds support for "compressing" SVGs. I honestly haven't looked into the two libraries much more than that though, so there might be very valid reasons to stay with the one you have.
-
Thanks - I think that is much cleaner. The only thing I would suggest is adding a note to dotfiles checkbox to say that you can add htaccess and other extensions to the extensions filter to allow those.
-
Hi @Macrura - sorry for the confusion. I split the content of the PW Info panel into two panels - itself and the new Request Info panel. Discussion on this new panel starts here: https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=153033 You'll see that it has the page edit and template edit (if your code editor is configured for links) buttons at the bottom. The PW Info panel is now more about info and links for PW and the Request Info panel is about the current page/request. Be sure to check out the new options for both these panels in the module config settings as well - lots of great new tools. Let me know if you have any more questions about this.
-
Continuing on from yesterday's Console enhancements: 1) History stack now supports the state of text selection and the scroll position, so now much easier to run different versions without reselecting. 2) This selection and scroll position state is also recorded as you edit so it is also available if you reload your browser, etc so everything will be as you left it. 3) The editor window within the console should now always get focused when the panel itself is made visible (by hover or click). Previously this wasn't reliable. This makes running code much easier because the keyboard shortcuts for running will work without needing to click into the editor window to focus it. Unrelated to the Console panel - I have made the "Show debug bar in backend" checked by default on module install. Of course you can always uncheck this, but I find the debug bar just as useful in the backend, especially the Request Info panel when editing a page, template, field, or module settings. So consider this an attempt to enlighten new users to the benefits of it in the backend because I am sure many never bother to enable it. Please let me know if you find anything amiss with the new Console functionality.
-
I would go with the import option in BatchChildEditor (https://processwire.com/talk/topic/6102-batch-child-editor/) Batch Child Editor makes use of this library.
-
Really not sure either. It seems redundant to have to enter htaccess and then .htaccess in two different settings though. Maybe the Extensions filter should automatically allow files that are extension-only, like htaccess, gitignore, etc. Or maybe there is no need for the Dotfiles Whitelist and any extension that is listed in the Extensions filter should automatically be allowed? I think perhaps the latter makes most sense? Google seems a bit confused by that one
-
Thanks @matjazp - it works well! Just a few things: 1) You actually need to specify "htaccess" in the Extension filter setting as well as the dotfilesWhitelist. Not sure if this should be necessary or not? 2) Should the dotfilesWhitelist settings be labeled "Dotfiles Whitelist" ? 3) You have left in an unused "removeDotFiles()" method.
-
@Robin S - not sure what you think, but I actually don't think that "View site" really belongs under the user's name. Maybe it should be reserved for Profile and Logout and we should have a "Home" icon over on the left, just to the right of "Access"? Not sure what to do about the Debug option - I don't ever use it so maybe I am biased, but I think the link at the bottom right of the page is enough. I don't feel terribly strongly about this - just some quick late night thoughts , but I do think that some users may struggle to find the "View Site" link - I don't really think I would ever think to look under my username to find it.
-
What do you guys think about ignoring old backed up versions of modules? Currently the old versions of site modules that were created by Ryan's PW Upgrades module show up when browsing /site/modules. I am not sure there would ever be a reason to edit these via this module. It might clean things up a little to remove them. Same goes for .wire-x.x.x and .htaccess-x.x.x and .index-x.x.x PS I wouldn't want to remove all .* files though in case someone does want to use this to edit the active .htaccess file.
-
I cannot install the Blog profile as it doesn't show up in the installer
adrian replied to desbest's topic in Getting Started
Great idea - I forgot about the blog component to that profile.