Jump to content

matjazp

Members
  • Posts

    685
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by matjazp

  1. //$page->imge is PageImages with the total of 38 files $object = $page->imge; //total number of items, in this case total number of files in Images field $totalItems = count($object); //number of items to display per page $itemsPerPage = 5; //current page number, starting with 1, if no page specified, it defaults to 1 $pageNum = $input->pageNum; //start item, depending on the current page number $startItem = ($pageNum - 1) * $itemsPerPage; //current items $items = $object->slice($startItem, $itemsPerPage); //debug info echo "totalItems=" . $totalItems . "<br>"; echo "itemsPerPage=" . $itemsPerPage . "<br>"; echo "pageNum=" . $pageNum . "<br>"; echo "startItem=" . $startItem . "<br>"; echo "<br>"; //show info $start = $startItem + 1; $end = $start + count($items) - 1; $total = $totalItems; echo sprintf(__('%1$s %2$d to %3$d out of %4$d'), "Showing items ", $start, $end, $total); echo "<br><br>"; //render items foreach($items as $item) { echo $item->name . "<br>"; } echo "<br>"; //create a new pageArray to give MarkupPagerNav what it needs $a = new PageArray(); //tell the PageArray details it needs for pagination $a->setTotal($totalItems); $a->setLimit($itemsPerPage); $a->setStart($startItem); //show pager echo $a->renderPager(array('nextItemLabel' => ">",'previousItemLabel' => "<"));
  2. I use pagearray not paginatedarray
  3. I'm stil curious what is the output of 'locale -a' in the terminal window.
  4. Not tested, written in browser... $allcasts = $pages->find("template=cast, has_parent=$page, sort=$sort"); $casts = sortOutEmpty($allcasts, $decider); $limit = 6; $start = $limit * ($input->pageNum() - 1); $total = count($casts); $casts->setTotal($total); $casts->setLimit($limit); $casts->setStart($start); echo $casts->renderPager(); function sortOutEmpty($items, $decider) { $out = new PageArray(); foreach ($items as $item) : if ($item->$decider != '') : $out->add($item); endif; endforeach; return $out; }
  5. https://processwire.com/talk/topic/15691-warning-about-server-locale-after-update-from-3052-3053-help/?do=findComment&comment=141242
  6. Can you comment $(adminIframe).css('visibility', 'hidden'); so that popup is visible immediately, maybe there will be some clue? Any JavaScript errors in the console? Can you test on some other page, perhaps with just title field and with default options?
  7. Then you'll have to debug the javascript and figure why there is no form. Use Chrome dev tools and set a breakpoint at line 185, and examine iframeContent and editForm. FEEL is looking for a form element with the name of ProcessPageEdit or ProcessTemplateEdit. If there is no form or no iframeContent, the modal won't load. I just tried on latest PW dev and FEEL works, iframeContent.length is 1 and editForm.length is 1.
  8. I think tpr is not following this forum anymore and I forgot why we have this check... Try commenting the hook in .module file or adjust .js
  9. Thanks Pete. Is it somehow possible to try this app?
  10. Hey, the forum looks great! I love some fresh colours. However, it's one tiny thing that bothers me. I was used to browse the forum with javascript disabled, especially on the mobile. This has some drawbacks, but the page is loaded faster and, most importantly (for me), was that I could see the complete lists of last posts, without any text cut off, at a glance. In the previous forum version, text cut off was made with javascript, and now it's done on the server-side.
  11. What about $this->wire('apivar') in regards to hops?
  12. I think it's safe but check on dev installation first. I'm still using the old version on my few websites, with just a few fixes (although not sure which ones) - don't fix if ain't broken mantra :-). A colleague is running the new version, but he isn't using minimizing js/css functions; he uses just caching operations, no problems in last 2 months. But he just informed me that when he access the module settings in admin, it takes a long time to see the settings - I never had any problems, will report back if he finds what could be the problem.
  13. @MilenKo you should report this to the proper module support thread: https://processwire.com/talk/topic/25339-processfilemanager/
  14. Thx for reporting the warnings, I wasn't aware of them. I pushed an update.
  15. Perhaps you should change the module/class name to avoid a collision. Also, there is ProcessFileEdit.
  16. Yes and no. A large part of this module is not written by me, so I can't support any new features, I can only make it work as a Processwire module. That's why I didn't publish it in the module directory. It's also a powerful tool with the potential of wiping your site if it lands in the wrong hands, so I didn't want too much publicity. I don't work with PW so much anymore, and I'm becoming a bit rusty and can't afford to maintain too many modules. Nevertheless, I will do what I can to help if problems arise.
  17. The module was never published in the module directory :-)
  18. Nope. Now the first author is matjazp (https://processwire.com/modules/author/matjazp/) and the second author is also matjazp (https://processwire.com/modules/author/matjaz-potocnik/). Check the first link, I didn't know I'm the author of so many modules :-) Edit: I even changed authors to "tpr, matjazp" to be the same as here in the forum.
  19. I don't know where author names are pulled off...
  20. @ryan When there are more authors of the module, only one author name is shown, and it's shown twice, for example https://processwire.com/modules/auto-smush/ Roland Toth (tpr) is the coauthor.
  21. I can replicate here. There must be something wrong with the image, as it opens in FF and other deskop image viewers on windows. I recreated webp from your original jpg (using online jpg to webp converter) and this time Chronme shows the image. I have no idea what could be wrong, possible Chrome issue?
  22. Yes, it's on the dev branch. I applied fixes on the current master version until the next master. So far so good.
  23. https://github.com/processwire/processwire-issues/issues/1086
  24. If you ask me, searching by id should be made configurable in the module settings, but solution from Robin works, of course.
  25. Perhaps this: https://processwire.com/talk/topic/23613-search-for-page-id/ ?
×
×
  • Create New...