Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/17/2024 in all areas

  1. hi, justa little word to say you can also do this in the module config have a nice day
    1 point
  2. @Alpine418 In PHP, classes are loaded with an autoloader that you can manage via composer (this is the common way). And ProcessWire comes with a composer.json file that you just have to edit, for example I edited mine like this: "autoload": { "files": [ "wire/core/ProcessWire.php" ], "psr-4": { "Rfro\\Rfrorga\\ProcessWire\\": "site/templates/", "ProcessWire\\": "site/classes/", "Rfro\\Rfrorga\\WebApi\\": "webApi/", "Rfro\\Rfrorga\\Cron\\": "cron/" } }, Now I can use any of this namespaces everywhere. In my custom classes I use base classes and traits located in site\templates\Php\CustomPage\Page\.
    1 point
  3. At first I used regions, then markup regions, and I found that I wasn't happy about performances. I did some benchmarks and noticed that the time consumed to render the page was growing faster than the amount of data to render. For example, if I double the data, rendering may take 3x the time (just a random number, I don't remember values, but I think I saved them in a text file). That's why I switched to Twig, Twig is slower for small content but is robust with big content. And I like how it's easy with Twig to write clean readable code, reuse twig fragments several times, import, extend, include, embed... there's a lot of choice, and no performance issue when including twigs into twigs. For very small html snippets that I use everywhere in the site, and are closely related to a page/template, I also have a method on my custom page classes, that calls a "Renderer" instance associated with this page and print some HTML. I use it for example for the user cards that are displayed on almost all pages of the previous site I did: <div>{{user.renderer('card')}}</div>
    1 point
  4. I ended up modifying the module (FieldtypeSecureFile) of Wanze to my needs. Wanze's module doesn't delete the files nor the sub-directories where the files are in. Also, the module didn't work in the latest version of PW. Now it does, but I don't know about the old versions (and I don't care). I left out the download part and the roles, because I don't need that. I'm sure there are some things that could be approved in the code, but it works for me. I can now safely upload and delete files in a directory outside the webroot. Example: /home/username/securedir The link to the module: FieldtypeSecureFile (GitHub)
    1 point
  5. I totally get where you’re coming from and appreciate your support for open-source values. Personally, I keep renewing my Pro module membership even when I don’t need the new features. For me, it’s a way to back Ryan for all the amazing work he does. Plus, having access to support has been a lifesaver a few times when the forum couldn’t help. Maybe reach out to Ryan directly through the ProcessWire website to see if there’s a way to donate. I’m sure any support would go a long way for the project! Another idea could be setting up something like a Patreon or similar platform where the community could collectively fund updates to specific modules or even new features that aren’t currently on the ProcessWire roadmap. That might be a cool way for everyone to contribute in a more focused way!
    1 point
  6. 2nd time this has happened this year, 2nd time I've been brought in to fix it. Two different websites, two different clients of a small marketing business I subcontract for. Directly contributing to loss of revenue due to online ordering being down. Currently managing ~4 WP websites for clients, they're all not a fan. Currently negotiating a contract for a website and an employee at the company said "I f****ing hate WordPress". Feel free to spread the WP love here <3
    1 point
  7. I'm quite sure you did, but just in case: Did you check if there is a plugin that can fix your issue? ?
    1 point
  8. Hey all. Currently getting an error message with later versions of ProcessWire, not sure when this started. When trying to edit a field: Fatal Error: Uncaught Error: Call to a member function getOptions() on null in site/modules/FieldtypeSecureFile/FieldtypeSecureFile.module:205 Guessing this crept in when the file/image fields were refactored. Uncommenting line 205 seems to work, not sure what effects it may have for now. Not sure if you are still maintaining this @Wanze but I use it on loads of sites.
    1 point
  9. DownloadGuard for ProcessWire About DownloadGuard This simple module was developed to give clients or users a unique download link to access file downloads you offer them. Installation & Usage 1. Place the module files in /site/modules/DownloadGuard/ 2. In your admin, click Modules > Check for new modules 3. Click "install" for __DownloadGuard__ 4. In the module Settings you can edit the default count for max downloads and the time, the download should be active. 5. During the installation a Page „Downloads“ is created in your PageTree. You can create children under this Page to make Downloads. In the children page you get your unique hash and the ability to upload your file. Todo - Let the system create the download links, for easy copy and paste. BitBucket Repository: https://bitbucket.org/m_knorr/downloadguard/overview Direct Download: https://bitbucket.org/m_knorr/downloadguard/get/master.zip
    1 point
×
×
  • Create New...