Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/30/2024 in all areas

  1. Hey there fellow Angeleno, Let's assume you have a bunch of 'video' pages with a 'file' field where the single video gets uploaded and another field called 'file_transcoded' that contains the transcoded/sized-down version. You could create an external script that bootstraps into ProcessWire, loops through each page where 'file_transcoded' doesn't exist (meaning it hasn't been acted upon yet), run ffmpeg on it, take the transcoded file and add it to file_transcoded ($page->file_transcoded->add($transcoded_file)), save and repeat for all the other non transcoded pages. That external script could be run using a cronjob. I believe you can do a background process or queue however I don't have experience with that in the context of ProcessWire yet although it's been discussed. The approach I mentioned keeps all the files in the natural /site/assets/files/(page-id)/ directory. I think the main point here is that where the original video files precisely exist is irrelevant as long as you use the $pages API which will take care of that for you.
    3 points
  2. Recently updated, alpha channels were rounding to integer rather than a float - now fixed. With the right arrangement, stacked gradients are possible.
    2 points
  3. The module provides a list of PageTable based content elements. It enables the backend user to easily create, publish, move, delete, copy and paste content elements. The rendering logic of the module is detached from the ProcessWire backend scope via Shadow DOM and allows the elements rendering identical to the front end. It ships with some helper functions that simplify the handling of content elements. Download/Install Github: https://github.com/neuerituale/PageTableNext Module directory: https://processwire.com/modules/page-table-next/ Composer: composer require nr/pagetablenext
    1 point
  4. @protro I see, this is a particular case so you don't need most of the features of a video platform. Yes you can do that.
    1 point
  5. I would think that in ProcessWire, you would be able to do this natively: $users->get("name=bob")->logout(); Guess I'll write my own method in /site/classes/UserPage.php
    1 point
  6. Hey @ryan thx for the additions! And thx @Jan Romero for the PR! I think a download button is a must have on image fields, so for my taste it should be default, but until then I've added a tweak to RockMigrations (v2.15.0) so the download buttons are just a checkbox away ?
    1 point
  7. Eleven years later, but thanks for that, Ryan! It was exactly the explanation that I needed.
    1 point
  8. Nice one. Just another way to skin the cat... <?php $testimonials = $page->testimonials; $testimonials->shuffle(); $firstTestimonial = $testimonials->shift(); ?> <div class="jumbotron jumbotron-fluid bg-color"> <div class="container"> <h2><?= $firstTestimonial->title; ?></h2> <p><?= $firstTestimonial->testimonialBody; ?> - <i><?= $firstTestimonial->testimonialReviewee; ?></i></p> </div> </div> <div class='container'> <div class='row'> <div class='col-6'> <?php foreach($testimonials as $index => $testimonial): ?> <?php if($index == ceil(count($testimonials) / 2)): ?> </div> <div class='col-6'> <?php endif; ?> <h2 class='py-3'><?= $testimonial->title; ?></h2> <p><?= $testimonial->testimonialBody; ?></p> <p class="font-weight-bold text-muted">- <i><?= $testimonial->testimonialReviewee; ?></i></p> <?php endforeach; ?> </div> </div> </div>
    1 point
×
×
  • Create New...