gingebaker
Members-
Posts
34 -
Joined
-
Last visited
Recent Profile Visitors
3,604 profile views
gingebaker's Achievements
Jr. Member (3/6)
44
Reputation
-
gingebaker started following Email New User , Processwire Powered German Website - Layout Adjustments - Searching for Developer / Freelancer , Padloper 2 Released and 2 others
-
Hello I´m searching for a Developer that can help us on one of our projects. Its a Hotel Website wich should get a redesign of the Startpage, Flyout Menu. We dont have enough ressources to handle it. Should be about a one or two day job. New Screendesign of how it should look is already here. The Website is Processwire / uikit powered. (standard markupRegion setup) The changes will be mostly CSS (uikit) / HTML based. Project Deadline would be about Mid of December at the latest. Cost estimate after I give you the full details would be needed. Please write me a personal message if you interested. Thank you, Best regards Tom
-
Hi. I had the same problem like @fliwire with changed resource property in template context not getting saved and outputted correctly. I changed the FieldtypeMystique::getBlankValue() method a bit: public function getBlankValue(Page $page, Field $field) { return new MystiqueValue($page, $page->template->fieldgroup->getField($field,true)); } API Ref: https://processwire.com/api/ref/fieldgroup/get-field/ With this change you are getting the field in context of the current page template. Then you have the correct resource filename in $field->resource. This works here in my setup, but I haven't been able to test much for now. Hope this does not break something else. Anyway, thanks for this module. Looks very promising!
-
Hi There is also an open issue for this problem on github with some possible fixes. https://github.com/processwire/processwire-issues/issues/704
-
Hello I am having an issue with hooking the SearchBox in the Admin Interface in PW >= 3.0.108 where the new Search Features are added. I hooked: $this->addHookAfter('ProcessPageSearch::executeFor',$this,'executeFor'); to change the title format of specific pages in the SearchBox of the Admin. This looked something like this: public function executeFor($event) { $return = json_decode($event->return); if($this->input->get->admin_search) { $return = json_decode($event->return); if(isset($return->matches)) { $didChange = false; foreach($return->matches as $key => $match) { if($match->template == "templateX" || $match->template == "templateY") { // add vorname and nachname to title $matchPage = $this->pages->get($match->id); $return->matches[$key]->title = $match->title.' - '.$matchPage->get('nachname').' '.$matchPage->get('vorname'); $didChange = true; } } if($didChange) { $event->return = json_encode($return); } } } } The reason I am doing this is that on some special templates I don´t want to show only the title field of this template in the Search Autocomplete but show some other fields to get a better usability. Now with the new ProcessPageSearchLive.php Module it seems that this is not possible anymore? There are the two hookable functions ___renderList and ___renderItem, but the are only called by viewAll Output. So the code where I should hook into is somewhere in the findPages() function of ProcessPageSearchLive.php, but I could not find a way to Hook into and modify it? https://github.com/processwire/processwire/blob/dev/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php#L736 Is there a way to get this done as it was with the old search? Perhaps i am overseeing something? Thanks for any help!
-
moved to:
-
Deleted Repeater and RepeaterMatrix Items to Trash
gingebaker replied to gingebaker's topic in General Support
@Robin S , thanks for your reply. I just filled a request for that: https://github.com/processwire/processwire-requests/issues/84 -
Hello. Just wanted to ask if there if there is a way to NOT delete Repeater (or Matrix) Items directly but move them to the Standard Trash if the Trash-Icon on the Edit Screen is clicked? This would be helpful when editors accidently delete some Repeater-Items. There is also no Confirm Message when deleting. Especially in Repeater matrix Items there can be a whole lotta Content wich is gone forever. Thanks for every Info...
-
Hi. I also needed a solution for Images Pagination and came up with this solution. It only works on PW 3 with the new PaginatedArray class. My Situation: I have a image field with about 150 images. I want to output these Images with a PagerNav. The same i use on $pages->find(). This is the function wich I wrote to get this working for PageImages. /** * Renders a pagination based on files using the PaginatedArray Class. Overrides the input parameter $files with the sliced result * and returns the rendered pagination. * @param $files ... the full Pageimages WireArray * @param int $perPage ... items per Page * @param $pagerOptions ... standard Pager Options as used in MarkupPagerNav.module * @return string ... rendered pagination */ public function renderFilePagination(&$files,$perPage=10,$pagerOptions) { $total = count($files); if($total <= $perPage) return ''; $pagerArray = new PaginatedArray(); $pagerArray->setLimit($perPage); $pagerArray->setTotal($total); $pagerArray->setStart(($this->input->pageNum - 1) * $perPage); $pagerArray->import($files->slice($pagerArray->getStart(), $pagerArray->getLimit())); $files = $pagerArray; // overwrite $files $ret = '<div class="paginationInfo uk-text-center uk-text-small uk-margin-top">'.$pagerArray->getPaginationString().'</div>'; $ret .= $this->modules->MarkupPagerNav->render($pagerArray,$pagerOptions); return $ret; } This function has to be available in your template files. Perhaps you need to remove the public. I am using it in in a custom module. Now in your template file you have your images field for ex.: $page->images (multiple Images). You can call the function like this: $pagination = $modules->KaTemplateHelper->renderFilePagination($page->images,$perPage=40,array( 'listMarkup' => '<ul class="uk-pagination">{out}</ul>', 'itemMarkup' => "\n\t<li class=\"{class}\">{out}</li>", 'linkMarkup' => '<a href="{url}"><span>{out}</span></a>', 'currentLinkMarkup' => '<span>{out}</span>', 'currentItemClass' => 'uk-active', 'nextItemLabel' => '»', 'previousItemLabel' => '«' )); The third array parameter is completely optional. I only use it for changing the standard page nav markup. If you use the standard markup then call: $pagination = $modules->KaTemplateHelper->renderFilePagination($page->images,40); ----------------------- After the call: $page->images only contains the subset wich will be display on this page. $pagination contains the rendered HTML Markup for $pagination. Perhaps this helps someone. I know this is not fully flexible implemented, but this is only a snipped for me that I change as i need it.
-
Hi. First of all, thanks for this great module! I do have one question: Is there a reason why this module is not "singular"? To be clearer: adding ""singular": true" to the jsonfile. I am having the automatic send option enabled, and use some custom api code to add new users in frontend-scope and backend. According to the json info file the module gets autoloaded on "template=admin". So in Frontend I have to use $this->modules->get("EmailNewUserPortal"); Because my custom code gets executed in frontend and admin, I would have to check where I am, because if I do $this->modules->get("EmailNewUserPortal"); in backend there are two instances of the module running. This results in sending the NewUser Mail twice. After adding the singular Option to your module, this issue has gone. Perhaps there is another need to be not singular here wich I didn´t see? Just wanted to ask... Thanks...
-
Another solution would be to hook to Inputfield::processInput and change the Input-Data to a full datestring that can be converted from php´s strtotime function. (for example YYYY-mm-dd). (I guess the Datepicker on focus option should be disabled) Here is what I am using in my custom module for DateTime Fields named "date" and "date_to": in init function $this->addHookAfter('Inputfield::processInput', $this, 'processInputDate'); the function public function processInputDate($event) { $inputfield = $event->object; $input = $event->arguments[0]; if($inputfield->name == "date" || $inputfield->name == "date_to") { if(isset($input[$inputfield->name])) { $value = $inputfield->value; if($value && ctype_digit($value) && strlen($value) == 4) { // seems to be only a year, so add 01-01 to it. $value = $this->sanitizer->int($value); $newValue = '01-01-'.$value; $inputfield->setAttribute('value',$newValue); $this->message("Converted ".$value." to a full date string: ".$newValue.")"); } } } } However, I think this makes only sense in certain cases. I need the possibilty to enter also a full date. In my case its okay that the 01. January is some kind of a "special day", where all the items are going wich have only a "year" but no month/day.
-
Inputfield::renderReady hook alternative?
gingebaker replied to gingebaker's topic in General Support
As soon as I make the Inputfield::renderReady function hookable in core, I can add the scripts and styles for my rendering there and it also works in ajax loaded fields or repeaters. @ryan: Is there a change to make this renderReady hookable in core? thx for any information... Tom