Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/01/2025 in all areas

  1. @bernhard Sure thing when I can get a chance. Maybe this weekend. In the meantime, if you're importing an svg you may have some success taking a look at the markup and seeing if there's anything extra that may be added by Affinity. I had a graphics program that liked to create a lot of attributes and stuff that wasn't needed. No guarantee that's the cause but it may help. Think the List.svg button in the repo is an example of one that has good markup with no extras. That's the best guess off the top of my head.
    1 point
  2. Hey @bernhard & @monollonom I didn't forget about you, just hammering out some work. Taking notes from your great input. I appreciate it! Will be back when I escape from programming prison 🤣
    1 point
  3. Hey @bernhard, I did some further research and at least came up with a workaround. As title is a global field, I added the following config migration: <?php // site/RockMigrations/templates/field-images.php return [ 'fields' => [ 'image_credit' => [], ], 'noGlobal' => 1, // prevent global fields like title from being added to the template during migrations ]; After manually removing the title field from field-images in the GUI this prevents RM from automatically adding it.
    1 point
  4. Hi @snck thx for the report. Can not think of any. Could you please try to reproduce this issue on a fresh installation and then provide the exact steps to reproduce it? Thx!
    1 point
  5. Reviving this for a slightly different use case. I need to serve a different templates folder based on a certain URL segment. My code goes in site/config.php. In there $input is not available yet. So the logic uses $_SERVER['REQUEST_URI'] /** * Switch ProcessWire templates directory based on the second URL segment. * Type the second URL segment as key and the name of the new templates folder as value. * Example: '/imaging/' maps to 'templates-magazine' folder. * We use the second segment because the first segment is always the language (en, de, etc.) */ $config->templateSegments = array( 'imaging' => 'templates-magazine', // first url segment => templates folder name // Add other segment => folder mappings here ); // Check the second URL segment directly from REQUEST_URI $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/'; $path = parse_url($requestUri, PHP_URL_PATH); $segments = explode('/', trim($path ?: '', '/')); $firstSegment = $segments[1] ?? null; if ($firstSegment && isset($config->templateSegments[$firstSegment])) { $folder = $config->templateSegments[$firstSegment]; $config->urls->templates = "/site/" . $folder . "/"; $config->paths->templates = $config->paths->site . $folder . "/"; } Works well. in site/init.php I have a ProcessPageView::execute hook so that PW can find the template file and offer the "View" link in the page edit screen in admin. $wire->addHookBefore("ProcessPageView::execute", function (HookEvent $event) { // set templates dir for magazine pages in admin /** @var Pages $pages */ $pages = wire()->pages; /** @var PagesRequest $request */ $request = $pages->request(); /** @var Page $page */ $page = $request->getPage(); $editPage = $pages->get(input()->get('id')); if($page->template == 'admin' && $editPage->template == 'magazine-page') { /** @var Config $config */ $config = wire()->config; $folder = 'templates-magazine'; $config->urls->templates = "/site/" . $folder . "/"; $config->paths->templates = $config->paths->site . $folder . "/"; } }); Not the most elegant implementation, but works. Could have put this in site/templates/admin.php but decided against for separation of concerns reasons.
    1 point
  6. Hi Roych, a nice module, well done! Just one suggestion: In your display the seats are looking downwards (the stage is at the bottom). Wouldn't it be more intuitive to make it all upside down? (That's usually the case in seating displays of airline services during the reservation process.) The advantage is a more natural orientation when booking : The seat to the left of yours also appears to the left in the display. Best wishes ottogal
    1 point
  7. Padloper 011 Padloper 011 (aka Padloper 2 version 011) is ready for download. Requirements PHP>= 8.2.0 ProcessWire>=3.0.200 New Features The main new feature is webhooks for order payments. This should work with any payment provider that supports webhooks. In Padloper, this is currently implemented for Stripe. Documentation to follow. Maintenance Lots of bug fixes related to language and variants. I'll add list here later. Upgrading Replace all files (not overwrite!). This is because some files have been deprecated, renamed or moved. Safest way to upgrade is to get rid of all existing Padloper files and folders under /site/modules/Padloper/ and then copy over the new 011 files and folders then do a module refresh. Any questions or issues, please let me know. Thanks.
    1 point
  8. Both client-side and server-side resizing strip the EXIF data. If you are able to get the EXIF data with the server-side option then possibly you are hooking before the resize and might be able to access and save the EXIF data then. But in my opinion PW shouldn't be stripping any data from an uploaded image that is to be the "original" from which variations are derived. There's an open issue about this, with fixes for both client-side and server-side resizing (ImageMagick only): https://github.com/processwire/processwire-issues/issues/1055 Just hoping and waiting for it to be applied to the core...
    1 point
×
×
  • Create New...