torf
Members-
Posts
78 -
Joined
-
Last visited
Everything posted by torf
-
Thanks. Yes I've read this one and I already use it. But the SU has the right to empty the Trash completely, while any non superuser has to go the whole way edit->delete->confirm for every single page in trash. What I try to achieve is making this button available for users below superuser.
-
Maybe I'm missing a point here, but I could not get my users to empty the trash. In my site I've got a Couple of user roles with limited rights for different parts of my page. Above them all there is one role with access to the whole page, users and form entries but not superuser (due to the nature of my clients I do not want them to fiddle around with forms or modules). So some users have the right to delete pages, but cannot access the trash, while the "master role" is supposed to empty it from time to time. What rights do I need for this role to empty the trash without opening every page manually? Or is the "empty trash" button strictly for superusers?
-
I have a page that has frontend and backend users. So frontend users register themself via the old Login/Register module and get assigned a special guest role, while backend users are made by the site-admin in backend. My problem is that frontend users have a lot of required fields (from name, phone number and address up to specific company information), while backend only need login, email, password and their role. If I mark all those extra fields as required, the site admin would have to fill them out in the backend as well when adding a new user. Is there any hook for adding the required status of those extra fields only in the frontend? Or seperate frontend and backend users in another way?
-
I was trying to set up a workflow so a specific role receives an email when another role marks a page as "ready for publishing" via checkbox. Seems like this module does exactly that, but it's listed as not compatible with PW3.0. Has anybody tried it already or knows if it works?
-
Thanks a lot - both of you. It works, and again I am a bit nearer to understanding how processwire works.
-
Hi, I really got Stuck on a quite common Task, but cannot find the problem. The Idea was to have a checkbox in my backend, and set another integer field to 0 upon save if this checkbox is not checked. So I added the following code to my ready.php $wire->addHookBefore('Pages::saved', function($event){ $page = $event->arguments(0); if($page->hasField("my_checkbox")) { if($page->my_checkbox == 0) { $page->another_integer_field = 0; $this->message("This should have worked"); //for debugging only } } }); Everything works great, the debugging message shows up, but the value in "another__integer_field" does not change. Can anybody tell me where my mistake is?
-
find does not work as expected with autocomplete page reference field
torf replied to torf's topic in API & Templates
I see. Thanks for the clarification @Robin S I use a German backend translation and it seems the filter for showing only valid options does not show up in German... Sadly the selector is a bit more complicated in reality. Pages are chosen based on a value in another page selector field they hold. So the original selection is $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == "choose_page") { $page = $event->arguments(0); $zv = $page->parent->title; $event->return = $event->pages->find("template=my_Template, field_in_my_Template=$zv"); } }); I do not think that can be achieved without php. -
find does not work as expected with autocomplete page reference field
torf replied to torf's topic in API & Templates
Oh. I didn't know this one. I just tried $wire->addHookAfter('InputfieldPageAutocomple::findPagesSelector', function($event) { if($event->object->hasField == "choose_page") { $event->return = $event->pages->find("template=template_name_to_choose_from"); } }); but to no avail. I still get every page returned. Or maybe I have misunderstood how to use it. What puzzles me is that it works perfectly with Dropdwon or Select. How is Autocomplete different? -
Hi everybody, I tried to make only special pages accessible through a page reference field, but got a strange problem. In my ready.php I added $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == "choose_page") { $event->return = $event->pages->find("template=template_name_to_choose_from"); } }); But I keep getting all pages of my site back when I use autocomplete for my field. With select or radio it works as expected. Can anybody tell me why?
-
Getting all children template filenames without path
torf replied to torf's topic in General Support
basename($child->template->filename) does the job of course, thanks. But I still do not understand how the function in Processwire is used. The reference is not very clear. -
For onpager navigation I'm trying to get the name of all template php files so I can include them based on their status (hidden/shown). But I cannot get the names without the path. So foreach($page->children() as $child) { echo $child->template->filename()."<br/>"; } gives me the whole path for each file. In https://processwire.com/api/ref/template/filename/# it is stated, that the argument $filename can omit the path, but without examples I'm to dumb to find out how to use it... PS: of course I could strip it with vanilla php, but if there is already a function for that I'd rather use it.
-
Is there any workaround by now? I need to have my backend set to German as default (as the person using the page does not speak English), and cannot get the datefield to save a date.
-
I also confirm what digitex said: There is no header dropdown, and the map container shows nothing. Looks to me as JS execution is stopped because of the following error: Uncaught Error: Invalid LatLng object: (NaN, NaN) LatLng https://unpkg.com/leaflet@0.7.7/dist/leaflet.js:6 latLng https://unpkg.com/leaflet@0.7.7/dist/leaflet.js:6 setView https://unpkg.com/leaflet@0.7.7/dist/leaflet.js:9 init https://www.xxxxx.at/site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.js?v=3.0.3-1643876775:23 <anonymous> https://www.xxxxx.at/site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.js?v=3.0.3-1643876775:179 jQuery 2 each each <anonymous> https://www.xxxxx.at/site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.js?v=3.0.3-1643876775:177 jQuery 11 l fireWith ready A promise ready init v support <anonymous> <anonymous> leaflet.js:6:13622 Using ProcessWire 3.0.184 ---- Maybe to be more specific: the module works like a charm, but in the backend it shows up without initial marker, and therefore no map is rendered. As soon as you type in any lat / lon the map shows up and you can place the marker accordingly.
-
I really do like the plugin, but I could not figure out how the resizing in "Petersburger Hängung" works. Either it is buggy, or I am dumb. If I upload images to my site and have the preview images in the plugin set to size=500x500 upscaling=false cropping=false I get neat little images of different widths (like my originals are). But the moment I use cropping, or setting a focus point on one of the images the plugin shows this image in a brutal fixed size of 500x500. (funny thing is: resizing does not change the image aspect ratio and works as expected) Does anybody know how I can use at least the cropping of ProcessWire without destroying the gallery layout?
- 41 replies
-
- photoswipe
- module
-
(and 1 more)
Tagged with:
-
You can bypass that by just commenting the PHP required line in every .modules file. Like that 'requires' => [ 'ProcessWire>=3.0.0', //'PHP>=5.6', ], It may not be the best way but it works.
- 41 replies
-
- photoswipe
- module
-
(and 1 more)
Tagged with:
-
To post a conclusion if someone runs into the same requirements: At last I used repeater fields for the table. The Backend input may not be as nice as with Handsontable or Matrix Fieldtypes, but in this case it suited best, as it uses fields and is highly configurable at the frontend. With Handsontable data is stored in a JSON which makes it quite difficult to change columns if there is already data in the fields ans also the frontend JS messed up the processwire CSS somehow. Matrix Fieldest on the other hand did not give me an opportunity (or at least I could not find it) to add rows on a page basis. In my example the colours are defined by the companies and every company has there own very special colourset. Therefore I cannot predefine them.
-
Thanks for all of your help! Handsontable looked very promising (and was easy to set up) . The Filter and search options are what made me question the module, but as from MySQL 5.7 JSON should be searchable that drawback could maybe be bypassed. Matrix was on my list already, but I could not get it to work, as it needs a bit more understanding of processwire concepts for setup. It looks perfect but is clearly not a beginners module. But I really should give it another try...
-
Wow. That is in fact a lot of possibilities... I've already seen ProFields and thought it should do the job, but as I am still in evaluation I cannot buy a plugin for testing purposes. But I'll have a look at the others. As for the editing: I thought of giving them their own editing rights, but at the moment this will not be mandatory. Maybe not for my first project ? Thanks for your help.
-
As I am completely new to processWire I stumbled upon a question which may be easy to solve, but I don't see how it is possible: Among other things I'd need the possibility to add fields for tabular Data where the columns are predefined but the rows are free to add or edit. For an example we have a couple of companies who present data on pages. So they all produce the same products but in different amounts per month and different colours. As an Admin I'd like to define the products, but leave it to the backend-user to fill in their colours as needed. As those the given values are needed in a filter or search afterwards they have to be in fields as far as I understood the concept. Is there a possibility to set up fields that give an output like shown in the attached images?