Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/06/2024 in all areas

  1. Hi, I've created a very simple module, that displays the number of (PagesVersions) versions a page has in the Page List: https://github.com/eelke/ProcessPageListVersionsCounter I expect something like to become part of the PW core as the PagesVersions implementation matures, but in the meantime it could be useful to others. So I'm posting it here.
    4 points
  2. When searching a datetime field the PW PageFinder can use any string that the PHP strtotime() function understands. So the problem you're describing only relates to limitations on the input where you are putting your search value. InputfieldSelector uses the jQuery UI datepicker for the value input, and this has a constrainInput setting that's true by default. So if you set constrainInput to false you can enter free text into the input and it should just work. You have to set this option after the datepicker is initialised because PW doesn't provide any way of customising the datepicker options before initialisation (I've opened a request for that here: https://github.com/processwire/processwire-requests/issues/523). Here's how you might do it with some custom admin JS: $(document).on('focus', '.InputfieldSelector .InputfieldDatetimeDatepicker', function() { const $el = $(this); // Set constrainInput to false after a brief delay so that the datepicker has had time to initialise setTimeout(function() { if($el.datepicker('option', 'constrainInput')) { $el.datepicker('option', 'constrainInput', false); // Updating the option seems to cause the datepicker to hide so show it again $el.datepicker('show'); } }, 100); }); The result in Pages > Find as an example: Edit: you may know this already but you can add a custom row to InputfieldSelector where you can use any selector clause you like. So if you can trust your editors to get the field name right you could have a row like this: This is the better option if you want to save the value in a Lister bookmark for example, as it seems that InputfieldDatetime will convert a time string to the equivalent timestamp when it reloads so it then loses the "dynamic" aspect.
    4 points
  3. Hi Everyone! So I've been working with PW for over ten years now!!! Big thanks to @ryan and everyone in the community (genuinely such a warm community). I've made a few modules in my time as well as tutorials and this was the first that I thought might work as a commercial module: MembersMessaging This module enables you to easily setup a messaging system for your users through your site. Allow your website users to message other users on the site given a user name or similar information. Module uses the notions of threads, messages and users to describe the message relationship -> A thread is a page storing n messages including: time posted, created by user and message text, the user ids in that thread, which users have unread messages in that thread, whether messages are encrypted (and it's salt). User pages have a list of all threads they are apart. In your templates you can add: a compose message form, threads and their messages, thread reply forms, message and threads counts, as well as delete and delete all messages. You can view messages in the admin (unless encrypted set to True) and view message stats and module usage in admin page Members. Purchase here How to install? - Install Processwire - Add MembersMessagingModule folder to modules folder in processwire: /site/modules/ - Login to your site admin and navigate to Modules: yoursite.com/[admin]/module - Configure the module settings: yoursite.com/[admin]/module/edit?name=MembersMessaging` - Follow the instructions below to add messaging to your templates How to use Example usage: $mm = $modules->getModule("MembersMessaging"); echo $mm->execute(); echo $mm->js(); echo $mm->css(); Full api here. Configuration Module allows you to configure whether: to allow new threads to yourself to allow new threads to guest user role to trash or unpublish threads deleted from frontend to use select or textinput for username input to allow an All keyword to signal thread should include all users to change all keyword to something else to notify a user via email they have been sent a new message to set email sender address to change username output from user name field to some other field specified to change default max threads and messages to display to encrypt messages (using basic encrypt strategy that encrypts each message on server before DB save, and is decrypted on request) Roadmap: Available here. ------- I'm not really sure how much interest there would be in this module so I've posted it to GumRoad for now, but will be looking to work on a PW store front if theres any interest in it and other modules - I've got ideas for other modules such as deffered page publishing, image folder GUI, protected field, field dependencies, pages contraits. I'm also available for hire currently to work on sites or modules https://www.benbyford.com
    1 point
  4. Hi @elabx, thanks for your reply. Maybe, I did not yet understand the technique of "new image fields", and so it was not very helpful to mess around with the database. I will try to purge the relics of the old system from my templates and be happy. Thanks for your help, @elabx, also to @ngrmm, who's hint showed the key page.
    1 point
  5. [solved] And so it happened again but this time it was same but different. Two weeks ago, all worked perfectly according to the LRP recipes. Today the fe user wouldn't log in??? I could login to the protected pages as superuser. Checked all the advice given in above and other posts. I had not changed anything on the site and nothing recorded in the logs, Tracy Debugger etc. The only hint was in the Chrome browser dev tools that the LoginRegisterPro init() function wasn't loaded. I'm using MarkupRegions and on the latest versions of PW and LRP and PHP 8.1 My bad, I had in my template code: <region id="regHeadCSS" pw-append> <?php $loginRegister->renderStyles() ?> <?php $loginRegister->renderScripts() ?> </region> Should have been: <region id="regHeadCSS" pw-append> <?= $loginRegister->renderStyles() ?> <?= $loginRegister->renderScripts() ?> </region> OR: <region id="regHeadCSS" pw-append> <?php echo $loginRegister->renderStyles() ?> <?php echo $loginRegister->renderScripts() ?> </region> Still don't understand why it worked originally but all's well that ends well
    1 point
  6. That works @Robin S. Thanks a lot. However, as you say so it doesn't meet my need for the relative date to be used dynamically, which is why I was wondering if what is really needed is an extension or modification of InputfieldDatetime so that it can store a strtotime-comprehensible text field. Meanwhile the custom row is another option which is less user-friendly, but probably better than just allowing a selector input ion a plain text field.
    1 point
  7. I think you might have it backwards? The "new image fields" actually use the filedata column to save the individual fields value, the older modules used to alter the schema of the image field. Someone correct me if I'm wrong ?
    1 point
  8. @biber have a look here Since 3.0.142 there is a core option to have additional custom fields for image and file fields I guess they are stored separately.
    1 point
  9. I just added some structured data to website with blog posts. I used https://github.com/spatie/schema-org library, which covers all schema.org types and their properties. This library was very simple to use.
    1 point
  10. RockFrontend loads uikit.theme.less and default.less in /site/templates/_init.php via $rockfrontend->styles() Probably from installing the UiKit profile? I commented it all out and now it's fine. Took me long enough... sometimes you just have to wait a day or two and have a nice cup of tea(like the British do) ?
    1 point
  11. https://processwire.com/blog/posts/new-rte-for-pw/ (see Toolbar configuration) https://processwire.com/blog/posts/using-tinymce-6-in-processwire/
    1 point
×
×
  • Create New...