Jump to content

Leaderboard

Popular Content

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

  1. This week I've been focusing on the dev branch and some low level code optimization, especially as it relates to the PW boot process, translating URLs to pages and identifying the page, language, URL segments, page numbers, etc. from the request URL. I'm breaking down much of the logic (currently in the ProcessPageView module) into more focused parts that can become part of PW's $pages API, increasing reusability of related code. (Don't worry, this won't affect any existing hooks). At the same time, I'm looking for opportunities for optimization and performance improvement, and have already found a few. For instance, the LanguageSupportPageNames module introduces overhead into some page finding operations and there's good improvement potential there, among others. I'm pretty much still in the middle of it all though, so am going to hold off on committing any of this to the dev branch until it's further along. But since we've got a quiet commit log this week, I just wanted to keep you up-to-date. Hopefully some of these fairly significant updates will be stable enough to commit to the dev branch next week. By the way, these updates will also enable the SessionAllow module (from last week) to be configurable by page, as PW will now identify the requested page before starting the session. More soon. Have a great weekend!
    20 points
  2. I was curious and tested out the new Blocks + Layout feature of Kirby 3.5 and here is my brief experience: The interface of the Layout feature is really nice and its fun to add or drag & drop blocks. If the Repeater Matrix would have such an interface, it could be a nice layout builder in ProcessWire. Also it is possible to add custom settings for each row, which makes it possible to customize your layout more. But currently it is not possible to switch the layout (f. e. from 3 columns to 4 columns). If you want to do this, you have to add a new row and drag & drop the blocks there. Also you cannot add custom settings to each column. This feature is currently in development. As for the blocks: You have a default set of blocks (Text, Image, Video etc.) which is nice and covers most of the content needs. Each block has its own snippet, similar to field templates. So you are free to customize the default blocks. Or you can create custom blocks with own fields. But you cannot see all fields of the custom blocks in the layout interface. To edit custom blocks you have to click on the block, which I think is ok in my opinion. In my opinion the Blocks + Layout feature is cool, but has its limitations at the moment. It is a nice mix of layout builder and customization. I wish the Repeater Matrix could be enhanced in this way. But I know that layout builder are no easy task. ?
    2 points
  3. ProcessWire Email Obfuscation (EMO) Download | GitHub Email Obfuscation module for email addresses with 64 base crypting. This module finds all plaintext emails and email links from the document and replaces them with span elements including configurable replace text. All the addresses are encoded to 64 base strings and stored in spans data attributes. Then on client side we decode these strings back to their original state. Install Create new 'EmailObfuscation' folder into /site/modules/ and place the content of this repository into the directory. Login to processwire and go to Modules page and click 'Check for new modules'. Find 'EmailObfuscation' and click install. You can make optional configuration changes in the module admin page. Thanks This is a ProcessWire module fork from MODX Evolution plugin emo E-Mail Obfuscation. http://modx.com/extras/package/emoemailobfuscation EDITED ON: 2013-03-03 - Added description. 2020-04-16 - Fixed GitHub links and updated description. Hello all. Just found PW few days ago and it's already looking awesome! Here comes first contribute and some questions for developing it further. There was one existing email obfuscator on reposity that didn't use any crypting for addresses so I decided to do a little test run and port the one that we currenly use with MODX Evo to ProcessWire module. I'd like to make PageAutocomplete like gonfigure option to admin so that one could select and set templates to exclude module action. It looks like autocomplete is tied to pages and since templates are not set to system as pages this is option is no go, am I right?
    1 point
  4. @JacobParks. I have moved your 'non-serious' thread to the appropriate forum for it. I must say that your first post seems like a primer for spam. I hope I am wrong, in which case, please accept my apologies. We do take spam very seriously.
    1 point
  5. You're inside a function, so there's no global $datetime object. wire('datetime') should do the trick.
    1 point
  6. @d'Hinnisdaëlthat worked. I just removed the last line requiring controller.php and kept the one for admin.php there itself. Thanks a ton!
    1 point
  7. I would suggest using something like the great Dashboard (Dashboard) - ProcessWire Module. You can easily add a custom PHP file to render whatever you want on a separate "Dashboard" page. It even has nice predefined "panels" with can show something like a sum with an up or downtrend arrow. It is very easy to setup and comes with good examples.
    1 point
  8. Wow. I didn't even know this module existed ?. I have just had a quick look so cannot comment much. You should be able to create your own version of the module which ProcessWire will subsequently detect and ask which one to load (I think this applies to Process Modules too - anyone?). Maybe a hook would work too, but am not sure. Looks like the links are created in JavaScript, so, you would need to consider that too. Maybe your solution could be all at the JavaScript level, although in that case you would need access to the value for your data-attributes. Sorry I am not of much help. Just a few starter thoughts ?.
    1 point
  9. I think the correct way of doing it is a bit different with newer ProcessWire versions. Try this one: require $config->paths->core . 'admin.php';
    1 point
  10. Bizarrely disabling Tracy Debugger was what stopped the issue for us in the end. I probably just need to update the module. Thanks for your help ?
    1 point
  11. Hi @sodesign, Haven't found a workaround, but can confirm @Clarity's message above is correct. For us it happens on sites which are querying external APIs every so often and updating the site data based on the results. Cheers, Chris
    1 point
  12. You could try https://modules.processwire.com/modules/settings-factory/ Probably overkill if you only really need one single field, but really useful if the number of such global fields increase over time...
    1 point
  13. The fields are created from the template tags! It's been a long time so I don't remember the complete process for a complex field (e.g. repeater type), but I do remember that setting up a text field is done this way. You write the tag in your code and it shows up in the backend. Not really my goal here! haha. But just today I was thinking how I could leverage on tools like Webflow (which I like a lot) but allow for better maintainability if you update your design. Anyway, just ideas ? Maybe this belongs to Dev Talk now that I think about it?
    1 point
  14. Something like this should work... $t = $templates->get('basic-page');//get the template $f = $t->fieldgroup->getField('summary', true);//get the field in context of this template $f->description = "This should be the description";//value of the field $fields->saveFieldgroupContext($f, $t->fieldgroup);//save new setting in context Edited for clarity... In this example, we are changing the description of the field 'summary' in the context of the template 'basic-page'.
    1 point
  15. My bad - it is working in the current dev version (3.0.185), not the master.
    0 points
×
×
  • Create New...