Zeka

Members
  • Content count

    407
  • Joined

  • Last visited

  • Days Won

    4

Zeka last won the day on February 7

Zeka had the most liked content!

Community Reputation

378 Excellent

About Zeka

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Kiev, Ukraine

Recent Profile Visitors

1,722 profile views
  1. Thanks for replies. @bernhard Great site, that's the perfect example of what I need. Several notices: I think that the cart page should contain <meta name="robots" content="noindex"> and if there are no items in the cart it would better to show something like "Your cart is empty" without form. IMHO.
  2. Hi @Juergen I'm not sure about $wire->addHookBefore("Pages::trash","Pages::delete", function($event) { .... run code }); But you can define function separately wire()->addHookAfter('Class::method', null, 'myHookFunctionName');
  3. Hi. I have a client request to implement simple shopping cart without registration and other basic shop features as order history etc., I was thinking to use sessions for it. Have somebody done something similar? What are pros and cons? Pitfalls that should be avoided? Thank in advance!
  4. Markup Cache for products cards, some static parts of pages and WireCache for searches. https://processwire.com/api/ref/cache/ Page cache and ProCache are options if you can implement ajax loading for dynamic parts, but definitely more work.
  5. @Macrura For example, I have this hook in module public function init() { $this->addHookAfter('TemplateFile::render', $this, 'hookAfterTemplateRender'); } public function hookAfterTemplateRender($event) { if ($this->wire('page')->template->name == 'admin') { return; } // some logic which I don't want in admin pages } You use WireRenderFIle which is the shortcut of TemplateFile class. In that way, my hook executes also for calls of WireRenderFile method in the module and I get mentioned notices as $thiss->wire('page') is null. So the issue is that I can't find the way how to check and prevent the execution of hook for calls of wireRenderFile. Hope it explains what I mean.
  6. @Macrura I have several hooks to before/after TemplateFile render method and typically I can exclude PW backend like $templateFile = $event->object; if ($templateFile->page->template == 'admin') { return; } or if ($this->wire('page')->template->name == 'admin') { return; } But these checks fail for rendering settings pages and hooks are executed also for those template files in the admin panel and I get "PHP Notice: Trying to get property of non-object" as $this->wire('page') = null and there is no $event->object->page->template. I'm not sure that it is directly relative to SettingsFactory, so I would ask you to check this behavior.
  7. Hi @WebMaster As far as I know, current only ImageExtra module adds support for additional fields for images. Native support for additional properties in image/files fields is on the roadmap for 2018. For now, the most flexible route for you is to create a page for every image, in that way you will get all PW features. There is module that can help with this approach https://github.com/mr-fan/AutoImagePages Do you mean that you can't sort and search by custom ImageExtra fields?
  8. Hi @Juergen SchedulePages module has similar functionality and it's done via hook to after page save https://github.com/formmailer/SchedulePages/blob/master/SchedulePages.module#L105 https://github.com/formmailer/SchedulePages/blob/master/SchedulePages.module#L138
  9. What I would really like to see is more expanded multilanguage support in the core as 95% of my sites is ML. Very often I need to have some pages available only in non-default languages and every time I have to reinvent the wheel with custom logic. Almost in all modern CMSs (Statamic, Craft, October ..) you can separately publish or unpublish pages for every language even default. There are @adrian's module and request which intended to solve this issue via a module, but as I said, I think that it should be in core.
  10. Hi @Peter Knight $thumb = $image->size($width, $height, $options); $width and $height are not optional arguments. https://processwire.com/api/ref/pageimage/size/
  11. So at least we have more than 8800 sites using Processwire https://publicwww.com/websites/"X-Powered-By%3A+ProcessWire"/ @jmartsch take a look at this link
  12. Take a look at these examples
  13. I think that it's normal behavior as fieldset and fieldset_end are separate fields, so you have to clone each of them.
  14. Hi @encho I've never used this module, but as far as I see there are comments.js and comments.css which you have to include on your page. Here is repo of this module https://github.com/processwire/processwire/tree/dev/wire/modules/Fieldtype/FieldtypeComments Hope it helps.
  15. There is also 'X-Powered-By: Processwire' in response headers. $config->usePoweredBy = false; // to prevent it output