-
Posts
1,307 -
Joined
-
Last visited
-
Days Won
16
Everything posted by elabx
-
For what I can tell the tables use jquery table sorter for this task. Maybe you can check in their documentation how to restart the plugin with the format you require. Found this also, specific to date formats.
-
Inputfield: Repeater Matrix Item Duplicator
elabx replied to David Karich's topic in Modules/Plugins
Awesome!! I'm also interested in how you changed the Repeater Matrix labels to images ?- 33 replies
-
I can't teven find where that is defined in the source code haha I'd guess some $_SERVER value is not populated? That's what I hoped to find out searching: https://github.com/processwire/processwire/search?q=httpRoot&unscoped_q=httpRoot
-
If I understand correctly, something like this should work, let us know if you need more detail: wire()->addHookekAfter("Pages:saved", function($e){ $page = $e->arguments(0); if($page->template == "one"){ $pageTwo = $page->child("template=two"); if(!$pageTwo->id){ //create child page code and save! } } });
-
@jacmaes Thanks a lot for your answer! I was very excited about this, but then started to think of all the possible caveats and just decided to take it slower and ask here for experiences with it. I am also eagerly awaiting @horst 's module, think I'll just rather wait.
-
Hi! Has anyone tried this in their servers? If so, what's your experience with it? I am particularly interested in the auto webp conversion/ https://developers.google.com/speed/pagespeed/module/
-
I'll try to find time to write a simplified version of the module and share it here. (because the module I wrote is a bit quite messy code wise).
- 15 replies
-
- 1
-
- push
- notifications
-
(and 1 more)
Tagged with:
-
Truth is I would have also assumed ImageMagick as a requirement!
- 12 replies
-
- 1
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
Apparently not! This is the file for the GD engine, found it in the github issues where where this feature was being discussed and @horst published changes for both GD and imagemagick engines. https://github.com/horst-n/processwire/blob/f072a52ccec7ffadd6831b5002ebd0b569274216/wire/core/ImageSizerEngineGD.php#L286 But maybe GD needs something else (some config?) to support it??
- 12 replies
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
For what I have experienced, the interlace parameter should be enough. Also, be aware that any previously created image won't behave as progressive.
- 12 replies
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
I've made some development using OneSignal's API which has the caveat that if you use their free service they can use your data for their purposes. For the 'once sent on page publish' issue, I just put a checkbox on the pages that enable notifications and check them if I wan to actually send the notification. Why would you not be able to get the response? I don't remember having any trouble getting responses from the OneSignal API, all code ran through a hook in ProcessPageEdit. I then saved the response data and basically just checked on page load for the notification info with its ID, I see push alert has a similar API. (if it had been completed, and how many had received it,failed, clicked). In my case, I thought the API was really nice and offered an easy way to manage mulitple websites straight from the API. (that way i handle multiple website's notifications from one place) . Also the Js to actually display subscription buttons info frontend or call their API in an easier fashion from a custom button. I even configured some color fields and text fields in PW to customize every text/color that rendered from their Js UI passing a customization object. Also didn't have to build any reporting stuff which for my case, wasn't necessary.
- 15 replies
-
- 2
-
- push
- notifications
-
(and 1 more)
Tagged with:
-
Page class properties returned with different values
elabx replied to arizanov's topic in General Support
Did you tried to debug the property directly? I am getting a User object just fine. I know it shows as a string in the Page object, but if you debug that property it returns a user object (at least from what I can tell in my installations) -
Page class properties returned with different values
elabx replied to arizanov's topic in General Support
Thats the normal output of those variables. You can try for user this. The way you are outputting that value it just outputs the ID of the user. Try this to get the username: $post->createdUser->name And if createdDate is a Datetime field, you should have output formatting configured in your Details tab of the field configuration so that it actually formats the value as a string otherwise print the unix timestamp. -
If you have command line access, try: locale -a This lets you know the available locales in the server. There might also be a PHP way I guess. If the ones you need are missing, you are going to have to install them. Not an expert on this field but I've done it on a few servers and it's not very complicated googling a little bit (also asumming you're not on shared hosting and have shell access to the server to make this installation).
-
Dynamic parent for creating new page with page reference field
elabx replied to bbb's topic in General Support
Oh you are very right! I see that InputfieldPage has a $pagesAdded property that seems to be filled only when pages are added, WHAT IF, you check both fields for this property on a hook right before saving the page. This way you can see if a brand has been added in the request, and if any new created model also, change its parent accordingly. -
Dynamic parent for creating new page with page reference field
elabx replied to bbb's topic in General Support
Doesn't it work like that straight out of the box like that? I'd think it would, from the logic leading to this setAttribute. My first approach would be to try just that inside the hook: $event->object->setAttribute('value', $newCreatedPage); But honestly haven't tried! -
Woah nice! Have thought of doing this since using Less parsing on PHP in some projects, what Less parser are you using? I imagine something like this that lets you create an admin theme on the fly (with a UI), maybe you just want to change a couple colors, set through color pickers, save, preview and enable it. 10 min job!
-
Dynamic parent for creating new page with page reference field
elabx replied to bbb's topic in General Support
$wire->addHookBefore('InputfieldPage::processInputAddPages', function($event) { $field = $event->object; $page = $field->hasPage; if($field->name == "model"){ $brand = $page->brand; if($brand){ $dynamicParent = $page->brand; $field->set("parent_id", $dynamicParent->id); } } }); I think this should work! Let me know if it does ? -
I think if they exist as image variations they have to be rebuilt.
-
I think $event->arguments is a method not an Array/WireArray. EDIT: Also I think you might just want to set your hook before save not after and or you might get into a recursive loop with setAndSave, and just reassign the $page as an argument. $page->pad_discount = $discount; $event->arguments(0, $page);
-
Is it possible to enable to select the parent property as a subfield inside an InputfieldSelector? See? No parent ?
-
Could you give us a more concrete code example of what you are trying to do? Maybe you can reuse the module functions and you are rather trying to extract the functions from the module into your template files.
-
Is there a way to allow certain users to have a reduced session timeout? Maybe through a hook?
-
Working with PW located on remote server; git, etc.
elabx replied to John W.'s topic in General Support
I normally develop in a remote server and connect with my text editor through SSH. (using emacs, ironically haha) Normally on the dev server, I install the things needed to compile frontend stuff (if needed) and just run the tasks either on a background process or run them everytime I'm developing in a terminal window. If I need sync with live, I use git and manually push (have yet to look into fancy hooks integration) On this thread you can take a look at some comments that talk about a very nice VSCode extension that mounts remote file systems through SSH: -
Does anyone know if it' s possible for file field to show the uploaded files whole names, and not abbreviate it with three dots.