-
Posts
991 -
Joined
-
Last visited
-
Days Won
3
Everything posted by PWaddict
-
Try to replace this: <?php foreach ($p->moments as $moments): ?> with this: <?php foreach ($p->moments->sort('month') as $moments): ?>
-
If you want to display them in the same order as they are on backend just add sort=sort.
-
You should add sort=your_month_field inside the selector.
-
How do I get summary of pagination like '11-20 of 200 results'?
PWaddict replied to Vigilante's topic in General Support
Actually check here how you can easily do it. -
How do I get summary of pagination like '11-20 of 200 results'?
PWaddict replied to Vigilante's topic in General Support
Check the demo page where it says "Skyscrapers 1 to 10 of 1236" and then you can check the files to find out how can be achieved. -
This is not good for the specific hook cause on the ajax update of pagetable it displays the original label header.
-
Yep that works perfect. Problem is gone Thank you very much.
-
Already tried that and the issue still happens.
-
Yes, 3.0.84.
-
I used your code and it does what I want BUT after editing a field value from the pagetable when the modal closes the pagetable doesn't ajax update the new values. I have to refresh the page see them. This happens on all pagetables even though I'm only targeting a specific one with a specific template. If I remove the code from the site/init.php the ajax update on all pagetables is working properly. $this->addHookAfter('InputfieldPageTable::render', function(HookEvent $event) { $page = $this->process->getPage(); $templateID = $page->template->childTemplates[0]; $table = $event->object; $content = $event->return; if($table->name == 'mypagetable' && $page->template->name == "mytemplate") { $fieldsarray = array ( 'myfield' => __('My New Header') ); foreach($fieldsarray as $key=>$value) { $label = wire('templates')->get($templateID)->fields->getFieldContext($key)->label; $content = str_replace($label, $value, $content); } $event->return = $content; } });
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
PWaddict replied to ryan's topic in Modules/Plugins
Then I'm 99.9% sure that the mod_security is causing the problem. The suggested fix will do the job. -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
PWaddict replied to ryan's topic in Modules/Plugins
@strandoo Add the following on top of your .htaccess file. Perhaps this will fix the problem. <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> -
Is it possible to change the Notes of a field with a Hook?
PWaddict replied to PWaddict's topic in General Support
I replaced Inputfield::render with InputfieldRepeater::render but it doesn't work. -
Is it possible to change the Notes of a field with a Hook?
PWaddict replied to PWaddict's topic in General Support
Now I cannot access Setup > Templates. I'm getting this error: ProcessWire: ProcessTemplate: Method ProcessTemplate::getPage does not exist or is not callable in this context. -
Is it possible to change the Notes of a field with a Hook?
PWaddict replied to PWaddict's topic in General Support
Here is the solution: $wire->addHookBefore('Inputfield::render', function(HookEvent $event) { $field = $event->object; $page = $this->process->getPage(); if($field->hasField == 'myfield' && $page->template->name == "mytemplate") { $field->entityEncodeText = false; $field->notes = 'My new notes!'; } }); Thanks for your tips. -
Is it possible to change the Notes of a field with a Hook?
PWaddict replied to PWaddict's topic in General Support
How can I do the same thing on a field that belongs to a repeater??? -
Is it possible to change the Notes of a field with a Hook?
PWaddict replied to PWaddict's topic in General Support
I figured how to do it: $wire->addHookBefore('Inputfield::render', function(HookEvent $event) { $field = $event->object; if($field->name != 'myfield') return; $page = $this->process->getPage(); $parent = $page->parent(); if ($parent->template->name == "mytemplate") { $field->entityEncodeText = false; $field->notes = 'My new notes!'; } }); Please correct me if I did something wrong. -
Is it possible to change the Notes of a field with a Hook?
PWaddict replied to PWaddict's topic in General Support
It works great. Thank you. I hope you can help me with 1 more thing: The field belongs to a PageTable. That PageTable is used under 2 different templates: template1 & template2. I want to change the field notes ONLY for template2. -
Any plans to support for processwire with php 7
PWaddict replied to Mirza's topic in General Support
I'm actually using the 7.0 version and it works great. I don't have any experience on the other 7+ versions.- 11 replies
-
- php 7
- processwire
-
(and 2 more)
Tagged with:
-
Any plans to support for processwire with php 7
PWaddict replied to Mirza's topic in General Support
ProcessWire is already supports php 7. That's the php version I'm using.- 11 replies
-
- 2
-
-
- php 7
- processwire
-
(and 2 more)
Tagged with:
-
No I'm using the 1.1.0 version on both. You haven't actually removed the padding. You have it like this: /* .InputfieldForm label.InputfieldHeader { padding-top: .4em; } .AdminThemeUikit .InputfieldForm label.InputfieldHeader { padding-top: 20px; } */ I don't understand why on localhost it reads that. Is that ok if you remove it completely? EDIT: It was a cache issue. Localhost was reading the previous version's css. I opened the AutoSmush.css link to refreshed it and problem fixed.
-
@matjazp The module's css is causing style issue on the entire admin at inputfield label headers. This happens only on localhost. This line causing the issue: .InputfieldForm label.InputfieldHeader { padding-top: .4em; } Localhost screenshot Server screenshot
-
403 - forbidden message when filling url field
PWaddict replied to fabjeck's topic in General Support
Go to your PW installation files. There you will find the .htaccess file among the site & wire folders etc. Open that file with an editor and paste the above code. -
@bernhard Here is the code I used on site/ready.php and it works great: if($this->page->template == 'admin') { $this->addHookAfter('Page::render', function($event) { $css = wire('config')->urls->templates . 'styles/AdminThemeUikit.css?v=1'; $js = wire('config')->urls->templates . 'scripts/AdminThemeUikit.js?v=1'; $event->return = str_replace("</head>", "\n<link type='text/css' href='{$css}' rel='stylesheet'/>\n</head>", $event->return); $event->return = str_replace("</body>", "\n<script type='text/javascript' src='{$js}'></script>\n</body>", $event->return); }); }; I've also uninstalled Admin Custom Files since I was only using it to inject theme files. Thank you.