Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/24/2021 in all areas

  1. AppApiFile adds the /file endpoint to the AppApi routes definition. Makes it possible to query files via the api. This module relies on the base module AppApi, which must be installed before AppApiFile can do its work. Features You can access all files that are uploaded at any ProcessWire page. Call api/file/route/in/pagetree?file=test.jpg to access a page via its route in the page tree. Alternatively you can call api/file/4242?file=test.jpg (e.g.,) to access a page by its id. The module will make sure that the page is accessible by the active user. The GET-param "file" defines the basename of the file which you want to get. The following GET-params (optional) can be used to manipulate an image: width height maxwidth maxheight cropX cropY Use GET-Param format=base64 to receive the file in base64 format.
    3 points
  2. Great news! Version 1.2.0 is here! The changes in the code are actually not huge, but all the bigger are the additional possibilities we have now: With the new version, modules can register their own endpoints. These endpoints are then merged with the traditional definition in Routes.php. You may ask: But @Sebi, why are you so excited about this? Well. This means that endpoints can now be easily installed and updated. And we can now easily share our great and useful endpoints with the ProcessWire community! I'll get started then: My first AppApi module is AppApiFile. This module provides the /file endpoint for retrieving files uploaded to ProcessWire pages. I have extended the wiki with a small tutorial and sample code for creating an AppApi module: https://github.com/Sebiworld/AppApi/wiki/4.0:-AppApi-Modules I can't wait to see what you people will do with it! ?
    3 points
  3. This week we have some very useful new additions to both the core Repeater Fieldtype and the ProFields Repeater Matrix Fieldtype. This post covers all the details along with a couple of brief demonstration videos— https://processwire.com/blog/posts/new-repeater-and-repeater-matrix-features/
    2 points
  4. Also worth to mention 'owner' selector https://processwire.com/blog/posts/processwire-3.0.95-core-updates/
    2 points
  5. Great additions! Have not tried'em yet, but my next week will be full of fun) Thanx, @ryan! I was amazed to see my name in the blog post, but I need to say that all the credits for those images should go to @David Karichas they were taken from his fundamental video. By the way, everybody caring about the future of PW and its infrastructure please ??? donate to David as a creator, who shapes the things we use (and dream of), so he feels even more motivation to keep doing his thing. He asked for the support. And of course, go get your copy of ProFields if you have not already, as that is one of the coolest ? things you can get for your PW site and supports PW development as a whole. Sorry for the emojis, but it is late friday night here where I am at and I feel exited)))
    2 points
  6. Hello again, be careful, you may end with a fky rink like me on top of your head ? being intrigued by your issue, i've had a look at this https://processwire.com/api/ref/pages/uncache-all/ and it sounds like an explanation that's good to know (i often use pagination without having ran into the same issue as yours... so far) have a nice day bye
    1 point
  7. Hi again ? wow, funny behavior you describe here!!! in this kind of situation, first thing i would check is if this $teamPlayers var doesn't appear in another place it should not and where it stores something causing this surprising thing... of course, be sure not to use any cache as it could be your enemy here ? hope you'll figure this out have a nice day
    1 point
  8. Welcome to the forums! I'd start by checking the search form, particularly as rendered in a browser. Does everything seem OK, and in particular, is the value of the 'action' attribute as expected for the search page? Another possible cause might be caching, so if caching is on for the search page I'd turn it off (Templates > name-of-search-template > Cache). And if you have any other sort of caching running, you could try with that turned off too.
    1 point
  9. For anyone with the same problem here is my code for generating custom and multiple pdf´s on the same page with different content and styling. <?php $pdf = $modules->get('WirePDF'); $pdf->markupMain = $config->paths->templates . '/pages2pdf/custom.php'; $pdf->markupFooter = $config->paths->templates . '/pages2pdf/custom_footer.php'; $pdf->cssFile = $this->config->paths->templates . '/pages2pdf/custom_style.css'; $pdf->pageOrientation = 'P'; $pdf->pageFormat = 'A4'; $pdf->bottomMargin = 10; $pdf->save('pages2pdf/custom.pdf'); echo "<a href='{$config->urls->templates}pages2pdf/custom.pdf' download>Download PDF</a>"; ?>
    1 point
  10. Hi @Flashmaster82 In this case you need to use the module "WirePDF" bundled in the Pages2Pdf module. You can use WirePDF to generate PDFs with custom content and styling. The readme has some examples how to do this: https://github.com/wanze/Pages2Pdf#wirepdf I suggest to also take a look at other existing ProcessWire PDF modules, as this one is really old and not maintained actively - it still works though ? Cheers
    1 point
  11. It took a little more time this week to wrap up what I was finishing last week (and the week[s] before). But I think it's now at a good spot to move on to something else, and so I started with some Repeater and RepeaterMatrix updates. In Repeater, a new feature was added that's been requested for awhile: the ability to add items anywhere you choose. Previously you could do it only by adding items to the bottom, and then drag them in place. Now you can click insert before/after [icons] in each repeater item header and it will add the new item in place. It is also depth-aware. This is something that I think will also be useful especially for people using repeaters for page builder type contexts. (Note: the feature does not [yet] work if you have all Ajax features turned OFF in your repeater settings). There's a GIF screencast below that shows you how it works. You can click the "insert before" or "insert after" actions and it inserts a new item in place. Alternatively, if you hover either action for a second, it'll show you where it's going to insert an item and you can click either the the item, or the action, to complete the insertion. There's still likely some optimizations and improvements to make in the JS here but so far it seems to be working well. (I made this as a GIF but for some reason IP.Board won't accept it, so here's a YouTube embed instead): Everything in Repeater also gets inherited by RepeaterMatrix, so you'll find this feature there too. But it's not fully functional there just yet. That's because RepeaterMatrix items also have a "type", so I'm working on a new version of RepeaterMatrix that lets you select a type once you've chosen where to insert the item. Another related feature in progress in RepeaterMatrix at the same time is a dropdown/select option for choosing what matrix type you want to add for items. This is an alternative to the current list of links that appears at the bottom. The dropdown also gives you the option of having groups of related types. More on that soon, potentially next week. Thanks for reading and have a great weekend.
    1 point
  12. sorry too big fingers... let's resume ? there you assign a value to $teamPlayers when afterwards you apply a method to this var, well, you apply a method but don't store the result of this method in a var which is exactly what you eventually do with your $teamMates = $teamPlayers->find("bestTime>0")->sort("bestTime"); return $teamMates; there you apply a method on $teamPlayers and store the result in $teamMates ? hope it helps have a nice day
    1 point
×
×
  • Create New...