Leaderboard
Popular Content
Showing content with the highest reputation on 11/09/2018 in all areas
-
Most of what I've been working on this week is related to the new PW website. That's includes primarily continued copy writing and site development (about 50/50), and it's coming along very well, though a lot of work. I'm hoping to have it ready to post publicly for collaboration by the end of the year. I'll have screenshots to share well before that though. The content of the site (particularly documentation section) is so much improved from the current site that I'd like to get it online as soon as possible, even if design details and some features are still being worked on. In addition to continued work in the documentation section, this week I also worked on the sites directory. I'm going to keep working on that today rather than writing a longer blog post, so that's why I'm posting this update here in the forum instead. Next week I'll also have ProcessWire 3.0.119 ready. Though you can grab the current dev branch already to benefit from a couple of features that are already in it. These include two items from the processwire-requests GitHub repository, among some other minor updates. Here's a preview from next week's blog post about a couple of new features in 3.0.119: • Robin S. (@Toutouwai) suggested that collapsed file/image and CKEditor fields automatically open when a file is dragged into them. Toutouwai also wrote the code to make it happen. This addition is super convenient, and it works great. • @BitPoet suggested that our ajax file upload capture and write the uploaded file in ~8 megabyte chunks. This is preferable to loading all the file data into memory and then writing it, enabling it to support larger file uploads that might not have been possible before (depending on server memory). Presumably this also can help to reduce server load. Thanks to BitPoet for writing the code to make it happen. Also on the dev branch this week is a new WireArray::slices() method and support for created/modified page dates in pages export/import functions (I needed this to import the PW sites directory entries). I'll have more details on all of these updates and more, next week.9 points
-
Maybe this the hook ProcessPageView::pageNotFound you need.2 points
-
I remember doing it by hooking before ProcessPageView::pageNotFound(). Not sure if you can hook earlier... HTH ?2 points
-
To get the options title in current user language use $type_material->getTitle(); or enable outputformatting $type_material->of(true); $type_material->get('title');2 points
-
Field Descriptions Extended This module enables you to extend field descriptions by dividing short descriptions with a longer text that is revealed in a toggle. Modules Directory: http://modules.processwire.com/modules/field-descriptions-extended/ Github: https://github.com/outflux3/FieldDescriptionsExtended Extending your field descriptions using the standard field's description field. Once this module is installed, it will automatically search your description field for the presence of 5 dashes (-----). Any content above the 5 dashes will be visible and the content below the dashes will be hidden. A 'More...' link will appear at the end of the short description which when clicked will reveal the rest of the description. Using Simple Markdown Editor with the description field If you have Simple Markdown Editor (InputfieldSimpleMDE) installed, you can enable the field description to have that editor. *When using Simple MDE, you can use the button (Insert Horizontal Line) instead of typing 5 dashes. More about SimpleMDE. Extending your field descriptions using content from a ProcessWire Page for the field description. You may use the content from a ProcessWire page as a field description. This would allow you to easily insert images, links, and use hanna codes. To use page content for your field descriptions, please follow these instructions: Install Select Fields module (FieldtypeFields) http://modules.processwire.com/modules/fieldtype-fields/ Create a new field using this field type, e.g. field_select. Add the field to any template you will be using for your field descriptions. Setup your help pages (for example under a settings branch) where you will store the field description content,using the template containing the Field Select. Add content to a page and select the field where that content should show. To show a short text before the link to the longer content, separate them with 5 dashes Be sure to update your settings on this page, first enable page content descriptions,then specify the name of the Select Fields field, template to search, and content field. If you create a field description using this method, please note that the description field must be blank for contexts where you want the page content to appear. You can freely use template context for field descriptions, but the Page Content method is not context sensitive and will display under all contexts where the description is blank. ---- original post: This is a new module, hope to release soon, which allows extended field descriptions, in currently 2 ways. The main feature of the module is that you can have a short description and then a 'more...' link which drops down a longer block of text. This is achieved by separating the intro/visible text and the rest with 5 dashes. Example setup: the 2nd way is if you are using AdminThemeUiKit, you can show extended field instructions in a panel. The content of the panel is edited on a regular PW page. This use case would probably not be that common, but if you had a field that required some extended instructions for how to use, this could be useful; Also, since this allows you to target information and instructions down at the field level, it could reduce the amount of documentation needed on a global level, since it is a lot more context targeted.1 point
-
Attention: please don't install this module at the time being! It is not compatible with current PW versions, and it will be some time until I can work in all the changes. Due to a discussion here in the forums, I was inspired to finally have a take on datetime fields and see if I couldn't get them to be searched a little more conveniently. Here's a small module - still in alpha state, but I'd be happy to get some feedback - that allows searching for individual components of a date like year, month, day, hour or even day_of_week or day_of_year, and also returning them. Github repo: DatetimeAdvanced Current version: 0.0.5 Tested in: ProcessWire 2.8 + 3.0 Possible subfields: day month year hour minute second day_of_week day_of_year week_of_year Examples: // Database search: $pagelist = $pages->find("mydatefield.year=2016"); // Filtering PageArray in memory: $maypages = $pagelist->filter("mydatefield.month=5"); // Back to our starting point: $start = date('z'); $end = $start + 7; $sevendays = $pages->find("mydatefield.day_of_year>=$start, mydatefield.day_of_year<$end"); // Nice side effect: subfields are now directly accessible $blogentry = $pages->get('blog-entry-1'); echo $blogentry->title . "(" . $blogentry->publishdate->year . ")"; // New in 0.0.4: shorthand methods echo $blogentry->publishdate->strftime("%Y-%m-%d %H:%M:%S") . PHP_EOL; echo $blogentry->publishdate->date("Y-m-d H:i:s") . PHP_EOL; ToDos for the future: See if there's a possibility to specify ranges more conveniently Check if this can perhaps wiggle its way into the PW core Changes: example for direct subfield access and shorthand methods to strftime() and date() added.1 point
-
Creating a support topic for this action now that the new actions-as-modules feature has been added to Admin Actions. Unordered List to Pages An action for the Admin Actions module for ProcessWire CMS/CMF. Creates a structure of new pages from an unordered list entered into a CKEditor field. The nesting of further unordered lists within the list will determine the nesting of the created pages. Created pages get a default template that you select, and you can override this default template per list item by specifying a template name between [[ ]] delimiters. This action can be useful to quickly create a page structure; especially so if you are rebuilding an existing non-ProcessWire site that has a Sitemap page that you can copy and paste from. Usage Install the Unordered List to Pages module. Visit the Admin Actions config screen and enable the "Unordered List to Pages" action for the roles who are allowed to use it. Navigate to Admin Actions > Unordered List to Pages and fill out the config fields: Source Enter/paste an unordered list in the Source field. There is a "cheatsheet" field above that explains the syntax you can use to set some template options for each list item. If you want to override the default template for an item you can specify a template name after the page title between double square brackets. If the template doesn't already exist it will be created. Example: Page title [[staff_members]] You can also specify one or more allowed child templates for a template like so: [[staff_members > manager tech_support]]This would create the page using the staff_members template, and set the allowed child templates of staff_members to manager and tech_support. Alternatively you can specify one or more allowed parent templates for a template like so: [[manager < staff_members]] This would create the page using the manager template, and set the allowed parent templates of manager to staff_members. Parent page Select a parent page that the new pages will be created under. Default template Select the default template to use for the new pages. Screenshots Action config: Result: https://github.com/Toutouwai/AdminActionsUnorderedListToPages https://modules.processwire.com/modules/admin-actions-unordered-list-to-pages/1 point
-
UPDATE: I have published a stable version of this module! Discussion thread: Github: https://github.com/MoritzLost/TextformatterPageTitleLinks --- Hello there, I'm working on a tiny textformatter module that searches the text for titles of other pages on your site and creates hyperlinks to them. I'm not sure if something like this exists already, but I haven't found anything in the module directory, so I wrote my own solution ? It's not properly tested yet and is still missing some functionality I would like to implement, so at the moment it should be considered in BETA. Features include limiting the pages that will get searched by template, and adding a custom CSS class to the generated hyperlinks. As I'm writing this I noticed that it will probably include unpublished and hidden pages at the moment, so yeah ... it's still in development alright ? You can download the module from Github: https://github.com/MoritzLost/TextformatterPageTitleLinks There's some more information in the readme as well. Anyway, let me know what you think! I'm happy about any feedback, possible improvements or ideas on how to improve the module. Cheers.1 point
-
Users in PW are also pages, so they also have a template. As that is a system template, it is normally not shown in the list of templates. However, if you go to "setup" -> "templates", there is an option when you expand the filters where you can check "Show system templates". Once you do that, you will see a new section labeled "System" with a template named "user". That is where you need to add these additional fields.1 point
-
Just came here to say that this stuff rocks, @Robin S and @adrian! And looks so awesome in the new admin theme. I know it's nothing really special (for a person spoiled by using PW for a long time), just an import with a UI... But it feels like magic and even cheating)) The new way to add actions to Admin Actions module - a super feature - just a byproduct of this...??!! ?1 point
-
What namespace is your module file in? If you're using the Processwire namespace (or your own namespace, for that matter), the catch block can't catch the SoapFault because it's looking in the wrong namespace. If you module file uses the Processwire namespace, all type-hints (including those in catch-blocks) will be relative to that namespace. So your block catch (SoapFault $e) will only catch \Processwire\SoapFault exceptions, instead of \SoapFault (the SoapFault class in the global namespace, as provided by the SOAP PHP extension). That would explain why it's working in your test file which doesn't have a namespace, but not in your module. In this case, you can fix it by type-hinting the global object: catch (\SoapFault $e).1 point
-
Yep! Here it is! I linked to the very beginning of the blog where all the tasty bits are (all the newer pages are filled with ProcessWire Weekly issues, which are still available on a dedicated site). If you want to read something [dated, but still very] interesting about ProcesWire nuts and bolts, this is the place for you!1 point
-
Hi, I use a slightly modified version of http://modules.processwire.com/modules/textformatter-glossary/ to achieve this task. I'm not sure if it's exactly the same mechanism, though. I will eventually test yours and see if it suits my needs. Mel1 point
-
@Ivan Gretsky You still can access the site via https://archive.org/web/1 point
-
There's (I think) no direct method to access language specific properties yet, but you can do this: <?php $lang = $languages->get('name-of-your-language'); $langTitle = $type_material->get('title' . $lang->id); Or, if you know the language id (e.g. 1060), you could do: <?php $langTitle = $type_material->title1060;1 point
-
1 point
-
Something similar is now built into the core: https://processwire.com/blog/posts/processwire-3.0.118-core-updates/1 point
-
I wasn't clear. I meant customer addresses, emails etc should not be editable in the order. However, I now see your point about the need to edit an address, e.g. a customer entered the wrong details and phoned in to amend. If I get you correctly, as for order states, yes, we have that. I posted a few details in this post. Yes, manual order creation is already available. The API is finished. I'll post details soon, hopefully by tomorrow. I just need to finish testing a few other things first. So, manual order creation will be possible for whoever you want. You can take orders over the phone, at the POS, accept cash payments, invoices for goods delivered, etc. The interface is not ready but the API is. This means you can even use the API directly to create orders, not that you would want to do that if you have a GUI ?1 point
-
Awesome work Robin - I can see this being my goto approach for quickly getting new site structures up and running!1 point
-
Another new site only recently finished (so there still might be bugs :) http://www.ethicalby.design/ Ethical by Design is my new personal project. I've been running a podcast called the Machine Ethics Podcast: about the social impact of AI. Over the last few years I've learnt alot and I'm now hoping to help businesses learn about or implemented AI responsibly. Branding done by Nick Willsher, and the site was designed and coded by myself. Hoping to spin this one out into a more configurable site profile for the community soon.1 point
-
If you are using cloudflare.com you might also want to create a page rule like: *mydomain.com/processwire/* Security Level = High Cache Level = Bypass Disable Apps Disable Performance This should prevent any of the Processwire admin from being proxied by cloudflare.1 point