-
Posts
685 -
Joined
-
Last visited
-
Days Won
4
Everything posted by matjazp
-
//$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' => "<"));
-
I use pagearray not paginatedarray
-
Your current server locale setting does not work …
matjazp replied to kaz's topic in Multi-Language Support
I'm stil curious what is the output of 'locale -a' in the terminal window. -
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; }
-
Your current server locale setting does not work …
matjazp replied to kaz's topic in Multi-Language Support
https://processwire.com/talk/topic/15691-warning-about-server-locale-after-update-from-3052-3053-help/?do=findComment&comment=141242 -
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?
-
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.
-
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
-
Thanks Pete. Is it somehow possible to try this app?
-
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.
-
What about $this->wire('apivar') in regards to hops?
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
matjazp replied to David Karich's topic in Modules/Plugins
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. -
@MilenKo you should report this to the proper module support thread: https://processwire.com/talk/topic/25339-processfilemanager/
-
Thx for reporting the warnings, I wasn't aware of them. I pushed an update.
-
Perhaps you should change the module/class name to avoid a collision. Also, there is ProcessFileEdit.
-
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.
-
The module was never published in the module directory :-)
-
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.
-
I don't know where author names are pulled off...
-
@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.
-
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?
-
Yes, it's on the dev branch. I applied fixes on the current master version until the next master. So far so good.
- 4 replies
-
- 1
-
- fatal error
- images
-
(and 1 more)
Tagged with:
-
https://github.com/processwire/processwire-issues/issues/1086
- 4 replies
-
- 1
-
- fatal error
- images
-
(and 1 more)
Tagged with:
-
If you ask me, searching by id should be made configurable in the module settings, but solution from Robin works, of course.
-
Perhaps this: https://processwire.com/talk/topic/23613-search-for-page-id/ ?