Jump to content

Alpine418

Members
  • Posts

    97
  • Joined

  • Last visited

  • Days Won

    1

Alpine418 last won the day on November 25 2024

Alpine418 had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Alpine418's Achievements

Full Member

Full Member (4/6)

26

Reputation

  1. How do you back up your database dumps? For regular backups of your dev environment? I was thinking of something like a git hock and mysql command to dump the DB first into the root dir of the webproject and then make a commit aka push request.
  2. I found the issue. When a textarea is initial created with TinyMCE and you will switch afterwards to CKEditor, the menubar settings of TinyMCE keeps staying and won't get replaced by the default CKEditor menubar settings. That's the reason I could see the editor but no menubar buttons of CKEditor on my issue.
  3. Any chance to get trial access to the RockCommerce module?
  4. Latest update was 4 years ago. Is the module still working and up to date?
  5. Got it! Thank you for the hint with PSR-4 to autoload every non-page-class in site/classes/
  6. Hi guys. I've the same issue. My trait classes in sites/classes won't get loaded. I'm getting a not found fatal error. What is the solution to get traits outloaded by ProcessWire itself?
  7. Unfortunately there is no error log in the browser dev tools. Only some warnings. Really strange...
  8. Good evening, I've installed InputfieldCKEditor a few minutes ago and switched my textarea from TinyMCE to CKEditor. Unfortunately the menu of CKEditor does not get loaded and looks like this when I'm editing a page: Any hints what the issue could be? Thanks.
  9. I solved it myself by the following code. 1. Create a custom RepeaterPage class for my tracks and add a specific method to create a session-based URL for streaming. <?php namespace ProcessWire; /** * @property Pagefile $audio */ class TracksRepeaterPage extends RepeaterPage { /** * @param string $streamUrl Default stream URL when audio file does not exist * * @return string */ public function getStreamUrl(string $streamUrl = ''): string { // Check whether audio file exists and if it does create a session-based stream URL if ($this->audio) { // Create the file hash and add it to the session as key for the audio file path $audioPath = $this->audio->filename(); $fileHash = hash('sha1', $audioPath . session_id()); session()->setFor('stream', $fileHash, $audioPath); // Create the stream URL with the file hash $streamUrl = '/stream/' . $fileHash . '.mp3'; } return $streamUrl; } } 2. Create a custom hook to watch for the stream URL in the ready.php: <?php namespace ProcessWire; if (!defined("PROCESSWIRE")) { die(); } wire()->addHook('/stream/([\w\d]+).mp3', function ($event) { // Get the audio file path by file hash $fileHash = $event->arguments(1); $audioPath = session()->getFor('stream', $fileHash); // Check whether audio file exists and stream it when it does or throw 404 if (file_exists($audioPath)) { wireSendFile($audioPath, [], [ 'content-transfer-encoding' => 'chunked', 'accept-ranges' => 'bytes', 'cache-control' => 'no-cache' ]); } throw new Wire404Exception(); }); Ta da! 🙂 When the session expires, the session-based file hashes are destroyed and the stream URL no longer work. So every time the session is renewed with a new session ID, a new unique session-based stream URL is generated for each tracks. Have I missed anything or are there any security issues?
  10. Hi guys, I want to publish some mp3 files on my website. But I want to prevent users from linking directly to the mp3 file. Instead of using some .htaccess request hacks I want to handle it with proper session based links. Something like https://foo.bar/site/assets /[session id]/[page id]/my-fancy-song.mp3 Once the session expires, the link to the mp3 file won't work. Does ProcessWire already provide such a solution or do I have to create it myself? Does anyone have any experience with this? Thank you for your support!
  11. Yes, this is my current workaround. But there is still the fieldset in the tab.
  12. Hi guys. I love FieldtypeFieldset and use it in all of my templates. Especially to add meta informations for each page. But I miss one simple feature: It would be cool if FieldtypeFieldsetPage would also offer a solution to make it accessible as tab instead of only a fieldset. Because FieldtypeFieldsetTabOpen has no page reference. Best way would be to make another module called FieldtypeFieldsetPageTab or even better, make FieldtypeFieldsetPage configurable to set the access as tab or fieldset. What you guys think? Any chance for an version 0.0.2 of FieldtypeFieldset with a feature upgrade? Best regards.
  13. Thank you very much! I already thought this is the way, but it is good to hear an approval from a professional.
  14. Hi. Can anybody explain why I can add the system field "admin_theme" to a new custom template? And for example why not the system field "pass"? Is there a setting to define what system fields are addable to new custom templates? Thanks.
  15. Hi. I've stopped using PW end of last year and shut off all my websites. Until then I could add a custom composer.json in the root dir of my PW installations. But now I'm building a new website with PW and just saw in the root dir of the latest blank installation a composer.json of @ryan. How should I handle my custom composer settings like PSR-4 autoloading? Can I just customize and add my custom setting in the already existing composer.json like this (check the few latest lines in code below) or are there better practises? { "name": "processwire/processwire", "type": "library", "description": "ProcessWire CMS/CMF", "keywords": [ "processwire", "cms","cmf", "content management system" ], "license": "MPL-2.0", "homepage": "https://processwire.com", "authors": [ { "name": "Ryan Cramer", "email": "ryan@processwire.com", "homepage": "https://processwire.com", "role": "Developer" } ], "require": { "php": ">=5.5", "ext-gd": "*" }, "autoload": { "files": [ "wire/core/ProcessWire.php" "site/my-custom-functions.php" ], "psr-4": { "My\\Custom\\": "site/classes" }, } } Thanks for your support!
×
×
  • Create New...