Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/28/2015 in all areas

  1. 3 points
    I just published a pre-release of my new password reset module. It will enable identification from any field of your choice, and is fully translatable. Integration is just 2 lines of code, the first is calling the controller, the second is loading a script (no dependencies). You can download the code on GitHub at https://github.com/plauclair/PasswordReset. Also, have a look at the reset process in this video https://vid.me/eEVY. This exemple is not styled, but there should be all you need in there to style it. Comments and feature requests very welcome!
  2. 2 points
    Admin Page Tree Multiple Sorting ClassName: ProcessPageListMultipleSorting Extend the ordinary sort of children of a template in the admin page tree with multiple properties. For each template, you can define your own rule. Write each template (template-name) in a row, followed by a colon and then the additional field names for sorting. Example: All children of the template "blog" to be sorted in descending order according to the date of creation, then descending by modification date, and then by title. Type: blog: -created, -modified, title Installation Copy the files for this module to /site/modules/ProcessPageListMultipleSorting/ In admin: Modules > Check for new modules. Install Module "Admin Page Tree Multible Sorting". Alternative in ProcessWire 2.4+ Login to ProcessWire backend and go to Modules Click tab "New" and enter Module Class Name: "ProcessPageListMultipleSorting" Click "Download and Install" Compatibility I have currently tested the module only under PW 2.6+, but think that it works on older versions too. Maybe someone can give a feedback. Download PW-Repo: http://modules.processwire.com/modules/process-page-list-multiple-sorting/ GitHub: https://github.com/FlipZoomMedia/Processwire-ProcessPageListMultipleSorting I hope someone can use the module. Have fun and best regards, David
  3. 2 points
    On GitHub: https://github.com/plauclair/AutodetectLanguage PW's Modules repo: http://modules.processwire.com/modules/autodetect-language/ This ProcessWire 2.x module tries finds a best match between HTTP_ACCEPT_LANGUAGE and currently installed languages. If a match is found, the user will be redirected from the requested page to the same page in his preferred language. This match occurs only on the first page load, and will work with default caching on. If no match is found, the website will revert back to the "default" language. Installation info and more details on GitHub. Please submit any bug on the bug tracker, as it is easier to track different issues.
  4. 2 points
    I'll try to check this tomorrow. I'm currently pretty swamped between my holiday and another vacation coming up.
  5. 1 point
    ProCache bypasses PHP all together, so there cannot be any dynamic functionality.
  6. 1 point
    @MatthewSchenker, how things are going with the book? Would you consider put it on LeanPub? Even if it's not finished, there you can see how many people are interested and receive feedback. I'm planning to write one book for absolute beginners, in Brazilian Portuguese and maybe in English (if I may be bold to write both at the same time) from a front end developer/designer point of view, so it will not compete directly with yours.
  7. 1 point
    sorry - i meant PW reset has hardcoded message that sends plaintext; the url was breaking in Outlook for Mac, i think some newer email clients don't break the URL
  8. 1 point
    Thank you very much Sérgio and Adrian for your fast and useful answers!
  9. 1 point
    Hi @hyldig and welcome to PW. To upload other file types, make a new field for your template that has type "File". You can control the file extensions that are allowed on the Details tab. EDIT: beaten by @sergio
  10. 1 point
    It's pretty easy, just create a new "File" field and assign it to your template (for instance, the Basic Page template). To create a field, go to Settings > Fields on the admin.
  11. 1 point
    It just came to me, that I don't need to reassemble the url chooser dialog, but only the button that opens the dialog and a little bit of js surroundings. I think, I ready-to-use module will be available in the repository soon .
  12. 1 point
    Hi all I wonder on how to handle best multi lingual downloads. FieldType File has Multi Lingual descriptions for one and the same file. Maybe it would be a good idea to have a real FieldType File, where per language files could be uploaded. Thanks for your advice
  13. 1 point
    Ok, glad everything has worked out. Welcome to Processwire.
  14. 1 point
    I just experience something else. In backend when I have single value select, once I have selected an option I can't go back and select the first bank value to "remove", it just doesn't save it and it's still previous value selected. Why is there a blank value if I can't save it?
  15. 1 point
    I posted an PR which fixes the issue. Currently the core doesn't save the string value before checking by "title" and overwriting the string. The next check for possible "value" matches failed therefore. https://github.com/ryancramerdesign/ProcessWire/pull/1226
  16. 1 point
  17. 1 point
    @gebeer I'm starting to play with adding clockpicker (which I find really intuitive) to the inputfield. Here's a screenshot... ...what do you think? Of course, this is only valid for HH24MM format times.
  18. 1 point
    Thanks Charles - glad to hear it is working well for you. I have another brand new version for you with a LOT of new features. You can prevent creation of pages from email addresses with host names that are not in the whitelist - great antispam option You can limit creation of pages to email addresses that match registered PW users - in this case, the ability to add the page will also be determined by the user's permissions for creating pages on the selected template You can determine whether the page should be published based on the user's page-publish/edit permissions You can set up customized email notification messages when a new pages is created, including choosing who they should be sent to. The config settings should also help to see all the new changes. Please let me know if you find any problems with this new version - quite a bit changed. Also please let me know if you think of improvements to the logic of the way things are set up.
  19. 1 point
    I always do it like Soma described.
  20. 1 point
    Here's my way of organizing AJAX. It's just another way of doing it. There's a module with some functions for handling AJAX requests. Mine's called 'fjax' and has some extra code for optionally sanitizing arguments to the functions. There's a 'fjax' template too. The fjax page (using fjax template) can be very minimal. I suggest putting it in /tools/fjax/ and setting tools as hidden. Having a Page gives us a handy URL to send requests to and the template file becomes the place to put the application's server-side AJAX code. The fjax template doesn't need anything more than the required title field. On the client side we use jQuery's AJAX tools. If you POST the data, use the query string on the URL to indicate the function you want to call (tools/fjax/?fn=function) and the module will simply pass the POST array to the function and return the result JSON encoded. If you use GET you pass the arguments on the query string too (tools/fjax/?fn=function&arg1=foo). In the template file you have 5 lines of code plus your function definitions. It's a simple PHP file so you can easily pull in code from reusable files etc. The fact that it's used with a Page means you can use Page fields as easily configurable data for your server-side AJAX functions.
  21. 1 point
    I perform a form submission via jquery. This form create a page and than i display the results below the form. I can display all my fields (after $page->save()) but not the $page->created property. I need to refresh the page to see the correct date
  22. 1 point
    Some properties are only populated at page load time. When you create a new page in memory and save it, that page has still never been loaded from the database. As a result, it won't have created/modified properties since those are DB generated. PW doesn't automatically reload a page from the DB when you save it. But you can reload it yourself: $page = $pages->get($page->id); However, I think an even better strategy is to perform a redirect after you've committed any kind of major changes. That ensures that you are dealing with a fresh copy of everything and prevents a browser reload/refresh from re-posting your form and potentially creating a duplicate. So I would do something like this: <?php $template = $templates->get('new_page_template'); $parent = $pages->get('/path/to/parent/'); if($input->post->submit == 'save') { $p = new Page(); $p->parent = $parent; $p->template = $template; // ...populate the page... if($p->save()) { $session->newPageID = $p->id; $session->redirect('./'); } else { echo "error saving page"; } } else if($session->newPageID) { $p = $pages->get($session->newPageID); // a little security check, that may not be necessary since we're using $session // but i always veer on the side of more security. if($p->parent->id == $parent->id && $p->template === $template) { // display the results } }
×
×
  • Create New...