Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/2020 in all areas

  1. ProcessWire Dashboard Download You can find the latest release on Github. Documentation Check out the documentation to get started. This is where you'll find information about included panel types and configuration options. Custom Panels The goal was to make it simple to create custom panels. The easiest way to do that is to use the panel type template and have it render a file in your templates folder. This might be enough for 80% of all use cases. For anything more complex (FormBuilder submissions? Comments? Live chat?), you can add new panel types by creating modules that extend the DashboardPanel base class. Check out the documentation on custom panels or take a look at the HelloWorld panel to get started. I'm happy to merge any user-created modules into the main repo if they might be useful to more than a few people. Roadmap Panel types Google Analytics Draft At a glance / Page counter 404s Layout options Render multiple tabs per panel Chart panel load chart data from JS file (currently passed as PHP array)
    3 points
  2. The problem is, taxes handling needs to be bomb proof, otherwise the store merchant could get problems with the taxes authorities. Taxes is one of the last things which needs to be finished before the first release. I'm in contact with the Snipcart guys and I think this should be solved in short time.
    3 points
  3. UPDATE 2020-01-14 What's new - what has been added - what has changed: I had to completely remove the DateRangePicker.js library because of quirks on mobile devices and accessibility problems. The dashboard date range picker has been completely rebuilt with default ProcessWire fields - and I think it looks great + its now fully working on mobile devices + its more accessible! The orders detail panel is now also capable of changing order statuses and adding order comments (including customer notifications, tracking number and tracking url) Finalized the discount editor: create, edit, delete, archive, unarchive Snipcart discounts A lot of internal fixes and enhancements One of the greatest features of the current version is the dashboard performance. I was able to increase the REST API execution speed by the factor of 2 - 2.5 times What's next: I'm still struggling with taxes handling. Especially the handling of shipping taxes is a complex thing and drives me crazy... DONE! Finishing the remaining detail panels Implementing Subscriptions Implementing Digital Products (probably not in the first release) Implementing a more flexible product template handling (probably not in the first release) DONE! And of course - release! Here are some fresh screens:
    3 points
  4. This was due to $config->fileContentTypes not having up-to-date MIME types. I created an issue here and decided it would be better to make the MIME type > file extension mapping configurable in v0.2.2 rather than using $config->fileContentTypes. Please update the module and the problem should be fixed. P.S. This page is a useful resource if anyone wants to set additional MIME type mappings: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
    2 points
  5. I just implemented your feature request! ? Multiple product-templates are now allowed! Just get latest version on GitHub!
    2 points
  6. ..or if you mean by "folder" a parent container within the tree structure then yes, you need to create a blank template (without a template file) with just a "title" field (since it's the default and mandatory).
    2 points
  7. Here's some updated code to try: // Find IDs of users that have been active in the last $mins number of minutes function onlineUserIDs($mins, $limit = 500) { $table = SessionHandlerDB::dbTableName; $seconds = $mins * 60; $sql = "SELECT user_id " . "FROM `$table` " . "WHERE ts > DATE_SUB(NOW(), INTERVAL $seconds SECOND) " . "AND user_id!=40 " . // exclude guest "ORDER BY ts DESC LIMIT $limit"; $query = wire('database')->prepare($sql); $query->execute(); $results = $query->fetchAll(\PDO::FETCH_COLUMN); return $results; } // User IDs active in the last hour $online_user_ids = onlineUserIDs(60); // Convert to string for use in selector $online_user_ids = implode('|', $online_user_ids); // Online users $online_users = $users->find("id=$online_user_ids"); // Offline users excluding guest user $offline_users = $users->find("id!=$online_user_ids, roles.count>1");
    2 points
  8. It's also working on windows by now, pushing the update to the dev branch ?? Test version: v1.4.15
    2 points
  9. Hello all, sharing my new module FieldtypeImageReference. It provides a configurable input field for choosing any type of image from selectable sources. Sources can be: a predefined folder in site/templates/ and/or a page (and optionally its children) and/or the page being edited and/or any page on the site CAUTION: this module is under development and not quite yet in a production-ready state. So please test it carefully. UPDATE: the new version v2.0.0 introduces a breaking change due to renaming the module. If you have an older version already installed, you need to uninstall it and install the latest master version. Module and full description can be found on github https://github.com/gebeer/FieldtypeImageReference Install from URL: https://github.com/gebeer/FieldtypeImageReference/archive/master.zip Read on for features and use cases. Features Images can be loaded from a folder inside site/templates/ or site/assets Images in that folder can be uploaded and deleted from within the inputfield Images can be loaded from other pages defined in the field settings Images can be organized into categories. Child pages of the main 'image source page' serve as categories mages can be loaded from any page on the site From the API side, images can be manipulated like native ProcessWire images (resizing, cropping etc.), even the images from a folder Image thumbnails are loaded into inputfield by ajax on demand Source images on other pages can be edited from within this field. Markup of SVG images can be rendered inline with `echo $image->svgcontent` Image names are fully searchable through the API $pages->find('fieldname.filename=xyz.png'); $pages->find('fieldname.filename%=xy.png'); Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message with links to help you edit those pages and remove references there before you can finally delete the image. This field type can be used with marcrura's Settings Factory module to store images on settings pages, which was not possible with other image field types When to use ? If you want to let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site (e.g. icons, but not limited to that). Other than the native ProcessWire images field, the images here are not stored per page. Only references to images that live on other pages or inside a folder are stored. This has several advantages: one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Installation and setup instructions can be found on github. Here's how the input field looks like in the page editor: If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Install from URL: https://github.com/gebeer/FieldtypeImageReference/archive/master.zip Eventually this will go in the module directory, too. But it needs some more testing before I submit it. So I'd really appreciate your assistance. Thanks to all who contributed their feedback and suggestions which made this module what it is now.
    1 point
  10. @flydev ?? @adrian Thanks for all your had work on this invaluable module. I've updated a few sites to the latest Duplicator version. But have been running into an issue when I have AWS Backups enabled. When AWS Backups is enabled and going to Setup -> Duplicator, I get a Call to a member function getTimestamp() on bool Error. See attached screenshot. The site core and modules are all up to date as of today (Jan 14, 2020). Using php 7.3, got the same error w/ php 7.2. Amazon libraries installed w/ Composer.
    1 point
  11. @Jens Martsch - dotnetic @Macrura Correct. The problem here is that the config object is an array, and the outer array is also an array. There's no way of telling if it's a config array or a collection of config arrays without it getting ugly. Luckily, WireArray has an import() method for that exact purpose. I added a release on GitHub that supports adding an array of panels via $panels->import([]);
    1 point
  12. i agree here with this – i actually tried to add an array of panels first before I realized you had to do each panel on a different call..
    1 point
  13. @zoeck I implemented modal editing for the collection panels. See the latest release. You can set the mode to modal or blank for edit or view links. The modal auto-closes on page save and the panel reloads via AJAX when an edit modal closes. /* Open edit links in modal, view links in new tab */ $panels->add([ 'panel' => 'collection', 'data' => [ 'editMode' => 'modal', 'viewMode' => 'blank', ], ]);
    1 point
  14. I'm not sure I understand the question, but I guess by "folder" you mean "a URL structure that doesn't exist neither as physical folder on disk nor in the PW page-tree". If that's what you're after, you can enable URL segments in home (page id 1), and then go from there. There are plenty of forum threads with examples. It's really simple and straightforward (no need to mess around with .htaccess rewrite rules etc.) https://processwire.com/docs/front-end/how-to-use-url-segments/
    1 point
  15. Wow! Have just gone through the docs and this looks spectacular, congrats on the awesome work!
    1 point
  16. @flydev ?? Fantastic. Thank you so much. This is helping a lot.
    1 point
  17. Haven't tried out the module **yet**, but I love the look of these dashboards. One panel that could be useful is a content overview panel like in Wordpress. It would show the amount of pages for each type of page with a link to the built in pages lister that shows all pages filter for that page type. Another feature that might be useful would be the ability to create multiple dashboard pages, or tabs within dashboards like what is shown in the Drupal Workbench module? This could be a dashboard for the user? Maybe you could have a site dashboard(displayed when clicking on the main logo or the Processwire logo or visiting the main processwire admin page at /processwire) and a user dashboard(displayed when a user first logs into the Processwire Admin)? Here is what a "My dashboard"(from drupal.org) for users could look like If we had the ability to create multiple dashboard pages then while creating/editing each dashboard page, you can choose which roles are allowed to view the page. If you do not choose any roles, then only admins can view the dashboard page. For obvious reasons, anonymous users will not be able to save pages or add custom items. All of this might be too complex, but I thought would just get these thoughts out of my head in case anybody liked them. Here is another dashboard I found just to give others some ideas of what could probably be created with this module. Anyways, thanks for making this module. Look forward to trying it soon.
    1 point
  18. Hi @Robin S, just wanted to let you know that I tried out the latest version, but it didn't seem to work with the file/image files with no extension. Here are some examples that didn't work for me: Ex. pdf file with no extension: https://www.charleston-sc.gov/DocumentCenter/View/18787/Certificate-of-Construction-Completion-RES-Checklist?bidId= Ex. image file with no extension: https://www.charleston-sc.gov/ImageRepository/Document?documentID=23023 After saving the page with those urls, it shows the following error message: AddImageUrls: The remote file https://www.charleston-sc.gov/DocumentCenter/View/18787/Certificate-of-Construction-Completion-RES-Checklist?bidId= has no file extension and its MIME type does not correspond with a valid file extension for field "page_files". The file field is configured to allow pdf files and the image field is configured to allow png, jpg, jpeg, gif. Do these urls work for you?
    1 point
  19. What you said: closing the modal on save is a requirement for me. I'll have to have a look at how the core does it in the template field editor, for example. I was looking into having the PageList links open in a modal as well, but that can be a later release as well.
    1 point
  20. Problem solved – Ryan pushed a fix: https://github.com/processwire/processwire/commit/f5f83e814880c862b5bfd0ee935b8c9e7699bd74
    1 point
  21. Never commented on how this makes every default install I have, love it.
    1 point
  22. Thank you very much for your help! This works like a charm!!!
    1 point
  23. This works for me here: if ( count(page()->images) ) { echo "yay!"; } ProcessWire: 3.0.148 PHP: 7.3.13 Webserver: Apache/2.4.35 (Win64) OpenSSL/1.1.1b MySQL: 5.7.24 but you don't even need count... this works as well: if ( page()->images) { echo "yay!"; } and if you really need the number of images, this works too (always has): $imageCount = page()->images->count()
    1 point
  24. Just another thing, the next minor version will contain an encryption setting, trying to make Duplicator a bit GDPR compliant.
    1 point
  25. Thanks you very much for this report @adrian Already on the todo list. I will check the PR after this message, but this can depend on the user end database schema used. We will have on the next version multitude options to customize the behavior of mysqldump. I was thinking too to give a textbox to enter some custom swicth for the command-line before proceeding. Thanks, I will make some checks available to the destination dir of the script. I am sure this is because you have safe_mode enabled, if you can confirm me that, it would be awesome. Yes it's for debugging purpose and to avoid the page reloading - just set the var $debug to false in ProcessDuplicator.js, Thanks again, going to check the PR.
    1 point
  26. Thanks @flydev ?? for your hard work on this. I installed on a Debian server and had a few issues which I have managed to fix. I submitted a bit of a messed up PR - I think we were both working at the same time. All my tests were in native mode 1) The server must have the "zip" package installed - mine didn't which caused me some grief for a while. I suggest looking for this and warning if not installed. 2) I had to change the mysqldump command quite a bit - you can see in the PR, but key things were --single-transaction and specifying the DB and removing the --skip-lock-tables 3) Had to chmod the .sh script to 744 so it was executable, but obviously this may not work on all servers depending on the owner etc. 4) Had to change the directory and the exec call to actually execute the .sh file - it was failing to run otherwise. With those changes everything seems to work great, although I did notice that after running a duplication via the Process module, it no longer reloads the page when done so you don't see the new package unless you manually reload when it's finished. Thanks again!
    1 point
  27. Hi, You can add a variable which store the number of menu shown in your foreach() loop then add the class uk-hidden to the rest of items: <?php $nMenu = 0; // number of menu shown foreach(...) { // [...] // check the var, if > 5 then add uk-hidden class to the elem $hidden = ($nMenu < 5) ? '' : ' uk-hidden'; echo "<li class='someClass{$hidden}'>My Menu </li>"; // [...] $nMenu++; // increment } // end foreach
    1 point
  28. Nice site. Thanks for the insights about how it was built and what are the modules involved.
    1 point
  29. thanks @dragan just pushed a fix - sorry for the mistake.
    1 point
  30. Finally, I rebuilt the profile and updated it to the latest version of Bootstrap 4.4.1. I Also updated the bsRender* helpers functions, removed the Bower dependency and added the possibility (as example) to minify and bundle assets for releasing the website in production. With $config->debug set to true, you will want to work with asset files in site/assets/dev/src, and when ready, you will launch a terminal in this same directory and type yarn build to minify, concat and bundle assets, then set $config->debug to false to see the website with the assets minified.
    1 point
  31. v0.2.0 released, which makes the stubs directory path configurable and includes a checkbox in the module config to manually regenerate all stub files if needed (thanks @teppo).
    1 point
  32. I hope you all have had a good start to 2020! Last week's release of the new master ProcessWire version 3.0.148 has gone smoothly, and if you haven't yet upgraded, it's a good time to do so. This week I've been working to finish up the new front-end file upload field called InputfieldFrontendFile, which is part of the LoginRegisterPro module package. I've released beta version 1 of that module in the LoginRegisterPro support board in the downloads topic, so it's ready for download now, as is a new version of LoginRegisterPro to accompany it. Today, I've written up a lot about this module, as well as posted a few screenshots here: Front-end file uploads with InputfieldFrontendFile module I've also got some ProcessWire core updates in progress this week for the dev branch, but this week has gone by so quickly I think I'll have to save those for next week. Thanks for reading and have a great weekend!
    1 point
  33. I've added support for these sorts of remote files in v0.2.1.
    1 point
  34. I use page references heavily in my projects. Page Autocomplete has a field (Settings specific to ...) on the Input tab of the field settings page that can be used to specify what fields are used during the query. You can even select multiple fields, e.g. a category_ref_by_id field can specify multiple ID fields. This way you can merge individual data sets into a single one. Each source set can have its own ID, and the ...ref_by_id field can use all of them. I have no plans for the automatic creation of the missing referenced page but it can be achieved very easily. Just create another DataSet using the same CSV file and import the appropriate "category" columns for creating the missing pages. You can also try to use the location attribute in the DataSet config to make a reference to the file uploaded to the original DataSet (see the wiki) to avoid duplicate uploads. If you need to perform these imports automatically you can create two tasks (category import and the original one) and specify a dependency between them (first import categories then the full data set). See Tasker wiki.
    1 point
  35. thanks - and i guess the version file needs to be updated (?).. this is working well for me; I have my own dashboard module, but it uses templates, pages and fields, and is thus cumbersome for smaller/low budget sites. My dashboard module uses AdminLTE, so it has stuff like collapsible panels with state recall; For some of the more complex panels like Formbuilder entries, etc, i'll just build custom panels and hook into this module. Thanks again for building this! This is very extensible, looks and works great, and seems like it will be a very popular module! Here's the dashboard i just threw together...
    1 point
  36. OK. It was time to update the wiki ? I've uploaded a new DataSet version (0.9.5) to GitHub. It contains many improvements for data type conversions, page reference handling and several bug fixes. It also has a new profiler to optimize the import routines. Tasker is also updated.
    1 point
  37. By default DataSet will create a new PW page each time it imports a row. In the above example, two pages will be created with title "Orange" and one with "Banana". There is no option to change the title for the new page (2nd Orange) if it matches an already existing one (1st Orange). You can, however, combine several fields in the title making it unique. E.g. you can create the title like this (column #0 always contains the row's serial number): title: [1, ' (', 0, ')'] The result will be: Orange (1) Orange (2) Banana (3) You can also update (overwrite or merge) already existing pages. In the "pages" section of DS config you can specify a selector and add the overwrite or merge option. See the wiki for more details. (Which needs to be updated but it is probably still helpful ? )
    1 point
  38. The two “orange” pages have the same page title, but it probably gives them different page names. Look on the settings tab of each page.
    1 point
  39. A quick tutorial how to create file downloads using pages You will be able to create a new page using template "PDF" (or any you setup), upload a pdf file. You then can select this page using page fields, or links in Wysiwyg. The url will be to the page and NOT the file itself. This will allow to keep a readable permanent unique url (as you define it), unlike /site/assets/files/1239/download-1.pdf, and you'll be able to update/replace the uploaded file without worring about its filename. Further more the file will also have an id, the one of the page where it lives. Clicking those links will download or open the file (when target="_blank") like it would be a real file on server with a path like /downloads/project/yourfile.pdf. You'll be also able to use the "view" action directly in the page list tree to view the file. Further more you'll be able to esaily track downloads simply by adding a counter integer field to the template and increase it every time the page is viewed. Since the file is basicly a page. This all works very well and requires only minimal setup, no modules and best of it it works in the same way for multi-language fields: Just create the language alternative fields like "pdf, pdf_de, pdf_es" and it will work without modifying any code! Still with me? ok PW setup Download folder: Create a template "folder" or "download-folder" with only a title needed. Create pages in the root like /downloads/project/ using this template. Setup the template for the pdf files 1. Create a new template in PW. Name it pdf 2. Goto template -> URLs tab and set the URL end with slash to no. (So we can have /path/myfile.pdf as the URL) 3. Create a new custom file field, name it pdf. Set its maximal count to 1 under -> Details tab. 4. Add the pdf field created to the pdf template. Easy. 5. Create a new "pdf" page using the pdf template under a download folder you created earlier. 6. Give it the title and in the name field add ".pdf" to the end (could also leave as is) Template PHP file for the pdf files 1. Create the template file pdf.php in your /site/templates folder 2. add the following code: <?php // pdf.php if($page->pdf){ wireSendFile($page->pdf->filename); } Done. To see the options you have with PW's wireSendFile() you can also overwrite defaults <?php // pdf.php if($page->pdf){ $options = array( // boolean: halt program execution after file send 'exit' => true, // boolean|null: whether file should force download (null=let content-type header decide) 'forceDownload' => false, // string: filename you want the download to show on the user's computer, or blank to use existing. 'downloadFilename' => '', ); wireSendFile($page->pdf->filename, $options); } Simple and powerful isn't it? Try it out. Some thoughts advanced Create as many file types as you like. It might also be possible to use one "filedownload" template that isn't restricted to one field type but evaluate it when being output using $page->file->ext, or save the file extension to the page name after uploading using a hook. One last thing. You can add other meta fields or preview images to the template and use those to create lists or detail pages. It's all open to goodness. Again all without "coding" and third-party modules. Further more you can use the excellent TemplateDecorator to add icons per template and have a nice pdf icon for those pages. This as a base one could also easily create a simple admin page for mass uploading files in a simple manner, and create the pages for the files automaticly. ImagesManager work in the same way. Cheers
    1 point
  40. In case anyone else* (*so that would be the future me then, when I've forgotten o_O) wants to know how to do this, I worked it out, it's probably in the docs but for the life of me I could not find it (sorry doc writers). You have a hanna code called my_hanna_snippet and you want to output it from within a template, not from the Admin i/f. $hanna = $modules->get('TextformatterHannaCode'); echo $hanna->render("[[my_hanna_snippet]]"); Hope this helps someone/me in the future
    1 point
  41. Well if that is acceptable in some cases then I could probably make it possible to limit edit access to more than one branch - would just need to disable the visibility restriction to that use case. I'll take a look sometime in the next couple of days to see what I can do.
    1 point
  42. would be totally ok for me to have the whole tree visible yeah i know the numchildren issue... i set it to zero in one of my projects as i only need it on the root page and dont need pagination.
    1 point
  43. hi adrian, this is great! would it be very complicated to work not only with single pages but an array of branches that can be accessed by the user?
    1 point
  44. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Just for the record, you might want to consider the benefits of using www-subdomain before doing this, though.
    1 point
×
×
  • Create New...