PWaddict

Members
  • Content count

    336
  • Joined

  • Last visited

Community Reputation

123 Excellent

About PWaddict

  • Rank
    Sr. Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,260 profile views
  1. Yep @ryan's method working perfect. $config->imageSizerOptions('cropping', 'north'); $config->imageSizerOptions('sharpening', 'none'); $config->imageSizerOptions('quality', 80); $config->imageSizerOptions('defaultGamma', -1);
  2. I just test it too and it doesn't work. I will try Ryan's method.
  3. That's 100% correct!
  4. @horst Actually this is how I have it. Is this really bad? $config->imageSizerOptions = array( 'cropping' => 'north', // Crop North (top), may also be just "n". 'sharpening' => 'none', // sharpening: none | soft | medium | strong 'quality' => 80, // quality: 1-100 where higher is better but bigger 'defaultGamma' => -1, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) ); On my previous post I left only defaultGamma just to see @dreerr the actual value I used to fix the problem.
  5. @dreerr I had a similar problem in the past and I fixed it by disabling the gamma correction. On your site/config.php add this: $config->imageSizerOptions = array( 'defaultGamma' => -1, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) );
  6. Try to replace this: <?php foreach ($p->moments as $moments): ?> with this: <?php foreach ($p->moments->sort('month') as $moments): ?>
  7. If you want to display them in the same order as they are on backend just add sort=sort.
  8. You should add sort=your_month_field inside the selector.
  9. Actually check here how you can easily do it.
  10. 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.
  11. This is not good for the specific hook cause on the ajax update of pagetable it displays the original label header.
  12. Yep that works perfect. Problem is gone Thank you very much.
  13. Already tried that and the issue still happens.
  14. 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; } });