-
Posts
1,523 -
Joined
-
Last visited
-
Days Won
16
Everything posted by Ivan Gretsky
-
LoginRegister: No Password Reset Email
Ivan Gretsky replied to creativejay's topic in General Support
Just to make it clear. You are talking about this module? I never used it myself though) -
Super cool stuff, @Robin S! Your modules are always the thing you wanted to, but never managed to do) I understand it is for all Repeaters not for Repeater Matrix only. But when used with Repeater Matrix it would be useful to: limit the RM types for the 0 level; limit the available children for a type. Maybe it is too much. And would probably require hooks to implement anyway, so not so useful for easy management. But just wanted to get those ideas out of my head)
-
Thanks! But that is obviously not the case for me) Do you think we should try to change the situation by asking Ryan to add similar hookable methods to PageFrontEdit? Or does it seem impossible to implement anyway?
-
Good day, @Robin S! I've just read through the whole forum thread and found out a lot of great things about this module. It is great and way more powerful than I could imagine! But the issue I was hoping to resolve wasn't there. I am trying to use the module in a frontend-edit context, but it doesn't seem to work. The Insert Hanna Code button isn't even in the toolbox. What am I doing wrong? Can I make it work here?
-
Hey @JeevanisM! You probably shouldn't override the core module, as all the good men stated above. But it's nice to know you can (and I actually did this before exactly with Comments field - hope it is easier to customize it now).
-
Go here and star the repo) P.S. And, of course, keep the love to ProcessWire always burning deep in you heart. But do star the repo too, to make your inner feelings make a a change in the world!
-
Module HelperFieldLinks - field and template edit shortcuts
Ivan Gretsky replied to Soma's topic in Modules/Plugins
Good day @Soma! Great module! I've been using it forever and can't live without it. When I login to any site without it installed, I feel kind of helpless for a while) My problem is it does not show the link for the RepeaterMatrix fields. Not an error like in the post above, but nothing at all. Could you please check? Created a github issue for this too. Edit: Sorry for incomplete report. The link is there, when all the items are collapsed. But if the "Remember, which repeater items are open?" option is checked, and one of the items is expanded on page load, the link is gone. -
Possibility of running a website/webapp inside Android Phone
Ivan Gretsky replied to JeevanisM's topic in Dev Talk
Good day! One way could be to include all videos in the mobile app installation package, so all the content is downloaded when the app is installed. I am not sure it is possible, or if there is a restriction on what you can put in the installation package and the size of the app, if distributed with the official stores. But that would be not a PWA thing, but rather a native app. The other would be to allow to download (cache) just the videos you need from the list in the app. So you install the app and then download the ones you need, while still "have the Internet". This should be available in PWAs as well as in native apps. But anyway, there must be problems with caching Youtube videos you're using. I would expect problems caching those. -
Resilienz-Kongress - an online summit / conference
Ivan Gretsky replied to joshua's topic in Showcase
I am using rsync to copy files between local and prod envs. Making an automation script was sitting in my todo list for way too long. So eagerly waiting for the sequel) -
Resilienz-Kongress - an online summit / conference
Ivan Gretsky replied to joshua's topic in Showcase
The read is as cool as the site @joshua! Could you share some more details (and maybe even code) about this: and this: -
Display list page references (Disable select)
Ivan Gretsky replied to flash's topic in General Support
As I get it, you just want to show a list of some pages in the page edit screen, without the need to interact with them. I think you need not use Page Reference field for that, but something like RuntimeMarkup.- 2 replies
-
- 2
-
-
- reference page
- list
-
(and 2 more)
Tagged with:
-
Great job! With the time you start appreciating such things as robust and maintainable core as much if not more than some shiny new features) And doing it little by little is surely better than a death by rewrite) Way to go, @ryan! And I'm sure you'll fix a lot of bugs by the way in addition to make a few new ones)
-
Wouldn't it also break complex fields frontend editing, which happens in popup iframes with admin pages loaded?
-
Hello! I need to show pages with date range publish limitation. I mean each page has date_start and date_end fields, that, if populated, should determine, whether the page is considered "published" today. But none of those fields is mandatory. You can fill one or the other or both. I have written a selector with OR-groups like this: $selector = "SOME-CONDITION-HERE, "; $selector .= "range=(date_start='', date_end=''), "; $selector .= "range=(date_start='', date_end>=today), "; $selector .= "range=(date_start<=today, date_end>=today), "; $selector .= "range=(date_start<=today, date_end='')"; But is seems a little ugly and over-complicated. I thought maybe someone could propose a better solution? If not, let it be a working example of how to deal with this)
-
solved Search in multilanguage site with multilang fields
Ivan Gretsky replied to seddass's topic in Multi-Language Support
Maybe it is worth rethinking this implementation? When checking is a field is empty or not, for example, fallback to default is a bug. The hack solution is kinda ugly and unintuitive. And one of PW's strongest points is multi-language support. What do you think, @ryan? P.S. I just tried it out one more time. It seems that if you check if the field is empty using just the field name, it checks only the default language. So if the field has text in user lang but not in default, the check is falsely false. So might be a real bug here.- 15 replies
-
Lots of useless stuff on Wordpress, coronavirus, and motivating yourself to effectively deal with those, but not enough on ProcessWire))
- 5 replies
-
- 2
-
-
-
- autoload
- namespaces
-
(and 2 more)
Tagged with:
-
Most of us know and use site/config-dev.php file. If present, it is used instead of site/config.php, so it is easy to set database connection and debug mode for local development, not touching the production config. It is also very useful when working with git. You can simply ignore it in the .gitignore file, so local settings won’t end up in the repo. But sometimes you need to add code to site/ready.php or site/init.php just for the dev environment. For example, to add ryan’s super cool on demand images mirrorer. I can’t live without it when working with big sites, which have more assets then I want to download to my desktop. It would be great if there was something like site/ready-dev.php for this. Not out-of-the-box, but it’s pretty easy to achieve. Unlike site/config-dev.php, site/ready.php is not hardcoded. It’s name is set with a special config setting: // wire/config.php $config->statusFiles = array( 'boot' => '', 'initBefore' => '', 'init' => 'init.php', 'readyBefore' => '', 'ready' => 'ready.php', 'readySite' => '', 'readyAdmin' => '', 'render' => '', 'download' => '', 'finished' => 'finished.php', 'failed' => '', ); As you can see, we can not only define, which files are loaded on init, ready and finished runtime states, but probably even add more if we need to. So we override this setting in site/config-dev.php like this: // site/config-dev.php // Change ready.php to ready-dev.php $temp = $config->statusFiles; $temp['ready'] = 'ready-dev.php'; $config->statusFiles = $temp; For some reason we can’t just do $config->statusFiles['ready'] = 'ready-dev.php'; and have to override the whole array. Maybe you PHP gurus can explain this in the comments. Now we can create the site/ready-dev.php file and place all the dev-only code there. Important thing is to include the main site/ready.php. // site/ready-dev.php include 'ready.php'; // DEV HOOK TO MIRROR ASSETS ON DEMAND $wire->addHookAfter('Pagefile::url, Pagefile::filename', function($event) { $config = $event->wire('config'); $file = $event->return; if($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if(!file_exists($file)) { // download file from source if it doesn't exist here $src = 'https://mysite.com/site/assets/files/'; $url = str_replace($config->paths->files, $src, $file); $http = new WireHttp(); try { $http->download($url, $file); } catch (\Exception $e) { bd($file, "Missing file"); } } }); Do not forget to replace "mysite.com" if you’re copypasting this)) Now, add the newly created file to the `.gitignore` and we’re done. # .gitignore # Ignore dev files site/config-dev.php site/ready-dev.php Thanks for reading!
-
Great read! Perfectly laid out! A ready Medium article in a post! And maybe it should be published elsewhere, as it provides a lot of useful info not only for PW devs (and would bring some attention to PW).
- 5 replies
-
- 3
-
-
- autoload
- namespaces
-
(and 2 more)
Tagged with:
-
Hey, @Hurme! Could you post a screenshot with comments? What exactly do you wanna change? Anyway, contents of those modals must be iframes with admin pages with admin theme in them. So the reasonable way to customize the modal contents must be to change the admin theme.
-
You need to handle 404 errors yourself. Look here for a working example.
-
Good day! This module looks super useful but also quite dated. Does it work with modern PW? Could anyone share their experience with it?
-
Good day everybody! Thanks for the module @ryan! Is there an easy way to integrate social login into this?
-
Could you please share a bit more. A simple gist would be perfect))
-
Good day, @Martijn Geerts! This module does not state PW3 support. Do you see any potential problems? If not, maybe update the description?