Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/28/2021 in all areas

  1. ProcessWire 3.0.179 adds great new admin theme customization tools that put you in full control over the admin styles, thanks to PR #189 from @bernhard — https://processwire.com/blog/posts/pw-3.0.179/
    20 points
  2. Thx @ryan for all the additional effort you put into this and of course for providing me with all the necessary files and information to work on that PR. I'm really happy that everything worked out so well and I hope we see lots of great designs from some css ninjas in the community ? I've created a dedicated thread for discussion and issue reports related to the rock style that might be easier to find in the future: Happy styling ?
    9 points
  3. Here is another little tutorial about files structure in ProcessWire. https://www.spiria.com/en/blog/web-development/tutorial-the-file-structure-in-a-processwire-site/ Comments welcome as always.
    5 points
  4. Thank you @bernhard and @ryan This is really brilliant and exactly the type of skinning ability that I think we've been missing!
    5 points
  5. AdminStyleRock Easily style your ProcessWire backend with two simple settings: Or via RockMigrations: $rm->installModule("AdminStyleRock", [ 'rockprimary' => '#0069B4', 'logo' => '/site/templates/img/kollar.svg', ]); ----------- Background: As of PW 3.0.179 we have a new style in AdminThemeUikit called "rock" style. This thread is here to report issues or ideas for improvement. The goal of the rock style is to make it as easy as possible to adapt your backend to the CI of your client. That's why it uses only ONE single main color and keeps all other design elements in a neutral grey. Download & Docs: https://github.com/baumrock/AdminStyleRock Here is an example screenshot using default uikit colors and a custom base font:
    3 points
  6. I’m a nearly brand-new ProcessWire user, and I’ve got to say I’m really impressed — not just with this functionality, but with how easy @ryan and @bernhard have made everything. I installed the new version of PW on my cloud server, installed the Less module, updated config.php and put a few Less statements into admin.less — and had it all working perfectly within about 15 minutes. Nicely done!
    2 points
  7. $items = $pages->find("id>1"); $home = $pages->get("id=1"); $customPaginatedArray = new PaginatedArray; foreach ($items as $item) : if ($item->parent == $home) : $customPaginatedArray->add($item); endif; endforeach; // should return an array of pages that are direct children of the homepage $limit = 10; $start = ($input->pageNum-1)*$limit; $total = $customPaginatedArray->count(); foreach ($customPaginatedArray->filter("limit=$limit, start=$start") as $c) : echo $c->title . '<br>'; endforeach; $customPaginatedArray->setStart($start); $customPaginatedArray->setLimit($limit); $customPaginatedArray->setTotal($total); echo $customPaginatedArray->renderPager();
    2 points
  8. I thought this would be a nice job for a PW dev, so decided to advertise it to all of you: https://blog.documentfoundation.org/blog/2021/05/26/tender-to-implement-the-new-tdf-membership-committees-web-based-tooling-202105-01/ Deadline for applications is June 23, 2021. I was not involved in writing the specifications, but I will be reviewing the applications. The spec has some unfortunate language discrimination, but you can ignore it: "we strongly prefer Python/Django or Ruby on Rails over PHP". The spec also has very detailed definitions for database tables and configuration options, but I would treat them as inspiration rather than dogma. Plugging into our single sign on service would preferably be done with SAML 2.0 and fortunately there is a module for that. I have also been in the Membership Committee, so am able to answer questions about how it works.
    2 points
  9. Very cool, thanks @bernhard and @ryan! Any thoughts about supporting an SCSS version of AdminThemeUikit and customising via an admin.scss file? Uikit offers a Sass (SCSS) version and my impression is that SCSS is more popular than LESS. Google Trends: One person's opinion from 2015: https://www.telerik.com/blogs/why-bootstrap-4-means-sass-has-won It would be interesting to conduct a poll of PW users to see which is the more popular CSS pre-processor.
    1 point
  10. Rather than being nonsense, it actually tells you exactly what you need to do to fix the situation: But maybe you haven't learned about translations in PW yet so you don't understand. For each language in your site, navigate to Setup > Languages > [your language] and in the "Core Translation Files" field click the "Find Files To Translate" button. Then locate the LanguageSupport.module, click on it to highlight it, and click the "Submit" button. Then locate the "C" item and translate it to the value that should be set via setlocale(LC_ALL, [value]) for that language. Now click "Save".
    1 point
  11. @ryan and @bernhard, you rock! Could you please provide some screenshots of the Reno and Rock themes? Thanks!
    1 point
  12. $limit = 6; $items = $pages->find("template=basic-page, limit=$limit, body!=''"); //alternative /* $decider = "body"; $items = $pages->find("template=basic-page, limit=5); foreach($items as $item) { if($item->$decider != '') $items->remove($item); } */ $start = $items->getStart() + 1; $end = $start + count($items) - 1; $total = $items->getTotal(); if($total) echo sprintf(__('%1$s %2$d to %3$d out of %4$d'), "Showing items ", $start, $end, $total)."<br><br>"; foreach($items as $item) echo $item->title . "<br>"; echo "<br>"; if ($items->getLimit() < $total) echo $items->renderPager();
    1 point
  13. Have you read any of the linked posts from this thread:
    1 point
  14. //$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' => "<"));
    1 point
  15. For the 15th anniversary of my business, I gave myself and my website a present and relaunched it. ? Happy Birthday to me ? – www.flipzoom.de
    1 point
  16. I think the "correct" way to do it, is how you have it implemented now: for each portfolio, you query the related user to obtain the additional data. It's true that if you are constantly making queries of this type (ex: inside a loop), that performance is not optimal. Maybe if you use some kind of page/template cache you can solve it. Another way could be to keep a copy of the user's data in a "user" field of the portfolio template (using a textarea field and save all user data in JSON, or use the new ProFields Combo field) and implement a synchronization system based on hooks, then in the users' Page Save hook, find the related portfolio and updates that JSON field. ?‍♂️
    1 point
  17. I'm not sure what you're aiming at, but is it that you want to find pages based on both what is in the portfolio-detail page and in the user page? If so, one approach might be to do something like this (not tested): $userIDs = implode('|', $pages->findIDs("template=user, title%=sometext")); $profiles = $pages->find("template=portfolio-detail, user_id={$users}, another_field%=someothertext");
    1 point
  18. 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; }
    1 point
  19. Thanks @Robin S - I tested with all panels activated before posting my last comment, so I don't think it's a panel issue, although of course there are a lot of extra panel settings, so maybe there is something turned on for @Kiwi Chris that I don't have on. @Kiwi Chris - can you try with the minimal set of panels to see if that helps?
    1 point
  20. I just tested here and no problems with either of those things, but it might depend on what panels you have activated. Maybe some JS error in the browser console will give you a clue?
    1 point
  21. I'm not sure about using pagination in other situations, but with Lister Pro, it breaks when Tracy Debugger is enabled. Disabling Tracy Debugger causes pagination to work again with Lister Pro. I haven't tested with other scenarios, but if you have Tracy Debugger installed and enabled, and everything else with your pagination seems to be set up correctly, it might be worth disabling Tracy to see if that makes a difference.
    1 point
  22. Many thanks Horst, confirmed my thinking. After happily and messily playing around, a tiny voice deep in my memory whispered "sandbox" ...sheesh. Been a while since I played around with sandboxed iframes, but the little voice from the past was right. Simple addition of sandbox to the iframe automatically prevents get/set of cookies. So I could get it doing what I wanted by adding: <iframe sandbox="allow-same-origin" src="..."> Apologies for not remembering sooner, I will be busily head-desking over in the corner now ?
    1 point
×
×
  • Create New...