Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/08/2018 in all areas

  1. It's coming along quite nicely. I do not have a firm release/completion date yet, although working towards it as fast as possible. As soon as I can I will answer all your questions about Designme. Hopefully by the end of this week I will be able to show you guys some more features that I didn't include in the preview video. ?
    4 points
  2. Wow, I waited so long for something like this. I think this could push ProcessWire really forward. When do you plan to release? And will it be a paid module or a free one? Thank you for creating this.
    3 points
  3. echo $results->renderPager(array( 'linkMarkup' => "<a href='{url}#YOURANCHOR'><span>{out}</span></a>" ));
    3 points
  4. For some inputfield visibility constants it is too late to set them at inputfield render. For Inputfield::collapsedHidden, Inputfield::collapsedNoLocked and Inputfield::collapsedYesLocked these are handled by the InputfieldWrapper class. I've found that a good method to hook for setting the visibility of fields in Page Edit is Field::getInputfield. This example is for /site/ready.php but easy to adapt to a module context: $wire->addHookAfter('Field::getInputfield', function(HookEvent $event) { // Only for ProcessPageEdit if($this->page->process !== 'ProcessPageEdit') return; $field = $event->object; $inputfield = $event->return; if($field->name == 'proj_code_folder') { $inputfield->collapsed = Inputfield::collapsedNoLocked; } });
    3 points
  5. Hey guys, Thought I would share a quick preview of Designme. A module we (Eduardo @elabx and I) are building for visually laying out your templates/edit screens. ? This is a really quick, zero polish screen grab. FYI. Video #2 - UPDATE This new video shows the following features in Designme: Re-arranging fields via Drag & Drop Re-sizing fields via Dragging. Adjusting field settings - with live refresh. Working on "hidden" fields while Designme is active. Creating New fields. Deleting fields. Creating/Deleting Tabs. Dragging fields between tabs. Creating fieldsets. Tagging/Un-tagging fields. Fields without headers expand when hovered (like checkboxes). Live filtering of fields in the sidebar. Ability to adjust (all) Template settings without leaving Designme. Template File Tree Editing Template files source code with ACE Editor. Editing Multiple files with ACE Editor. (New Tabs) Saving files. Techie stuff Fields load their own js/css dependancies. *ready to use on creation (*most fields) Everything happens via Ajax to ProcessPageEdit (via module + hooks). Designme has a JS api that you can use. All actions trigger events. We would love any detailed feedback on what you see so far. If you are interested in testing Designme. Let me know below. ? Video #1.
    2 points
  6. That's just the collation, but not the charset. You need to change at least the latter one. https://dev.mysql.com/doc/refman/8.0/en/charset-general.html Edit: I'm also kinda wondering about the "but for title and descriptions" part. Why not use utf8mb4 for everything, which is the way to actually use utf8 text in mysql. The "utf8" charset is just plain not utf8 at all, but rather a mysql abomination.
    2 points
  7. Hi Everyone, Today I am delighted to share my new product that we have created with Processwire. It's a verification system, that binds together a physical address with website. I’m using Processwire nearly from the beginning and I still believe that it is one of the greatest open-source platforms that exist. Being thankful I’m pleased to provide the service of Verikey verification to the Processwire community (and websites that you did) for free. Forever. Visit verikey.com Gift code: ###### (please, request by direct message) Feedback and questions are really appreciated. Many thanks my Mom, @ryan, @soma, @adrian and all Processwire contributors. Cheers, Alexander UPD: While subscription Stripe requires a valid bank card details. It’s a formality by Stripe for all subscriptions. The Verikey service remains 100% free and out of charge with the provided voucher code.
    2 points
  8. I use one, but haven't released it yet; started documenting it here... https://outflux3.gitbooks.io/markup-theme-engine/content/
    2 points
  9. Hi, ProcessWire does not compete with the WordPress market... Thank the lord. ProcessWire is for developers with basic to advanced knowladge who need a tool to make their vision a reality, easier. A framework. Much like jQuery. You must have some knowledge of JavaScript to fully understand jQuery. Just like if you were to develop for WordPress, you'll need PHP knowledge. Well, unless you are looking to sell themes. I don't know why a PHP developer would touch WordPress. ProcessWire's API is so much easier. So to answer your question, in ProcessWire you start here - http://php.net/docs.php then here - https://processwire.com/docs/ In WordPress you start here - https://wordpress.org/plugins/ then here - https://codex.wordpress.org/FAQ_My_site_was_hacked Edit: Notice how the 'My site was hacked' question was in the Frequently Asked Question section... Should it really be a frequently asked question? Because I don't think I've seen it asked once on the ProcessWire forum. Edit2: Most people here just use the blank profile and see the other profiles as bloat.
    2 points
  10. Page Query Boss Build complex nested queries containing multiple fields and pages and return an array or JSON. This is useful to fetch data for SPA and PWA. You can use the Module to transform a ProcessWire Page or PageArray – even RepeaterMatrixPageArrays – into an array or JSON. Queries can be nested and contain closures as callback functions. Some field-types are transformed automatically, like Pageimages or MapMarker. Installation Via ProcessWire Backend It is recommended to install the Module via the ProcessWire admin "Modules" > "Site" > "Add New" > "Add Module from Directory" using the PageQueryBoss class name. Manually Download the files from Github or the ProcessWire repository: https://modules.processwire.com/modules/page-query-builder/ Copy all of the files for this module into /site/modules/PageQueryBoss/ Go to “Modules > Refresh” in your admin, and then click “install” for the this module. Module Methods There are two main methods: Return query as JSON $page->pageQueryJson($query); Return query as Array $page->pageQueryArray($query); Building the query The query can contain key and value pairs, or only keys. It can be nested and contain closures for dynamic values. To illustrate a short example: // simple query: $query = [ 'height', 'floors', ]; $pages->find('template=skyscraper')->pageQueryJson($query); Queries can be nested, contain page names, template names or contain functions and ProcessWire selectors: // simple query: $query = [ 'height', 'floors', 'images', // < some fileds contain default sub-queries to return data 'files' => [ // but you can also overrdide these defaults: 'filename' 'ext', 'url', ], // Assuming there are child pages with the architec template, or a // field name with a page relation to architects 'architect' => [ // sub-query 'name', 'email' ], // queries can contain closure functions that return dynamic content 'querytime' => function($parent){ return "Query for $parent->title was built ".time(); } ]; $pages->find('template=skyscraper')->pageQueryJson($query); Keys: A single fieldname; height or floors or architects The Module can handle the following fields: Strings, Dates, Integer… any default one-dimensional value Page references Pageimages Pagefiles PageArray MapMarker FieldtypeFunctional A template name; skyscraper or city Name of a child page (page.child.name=pagename); my-page-name A ProcessWire selector; template=building, floors>=25 A new name for the returned index passed by a # delimiter: // the field skyscraper will be renamed to "building": $query = ["skyscraper`#building`"] Key value pars: Any of the keys above (1-5) with an new nested sub-query array: $query = [ 'skyscraper' => [ 'height', 'floors' ], 'architect' => [ 'title', 'email' ], ] A named key and a closure function to process and return a query. The closure gets the parent object as argument: $query = [ 'architecs' => function($parent) { $architects = $parent->find('template=architect'); return $architects->arrayQuery(['name', 'email']); // or return $architects->explode('name, email'); } ] Real life example: $query = [ 'title', 'subtitle', // naming the key invitation 'template=Invitation, limit=1#invitation' => [ 'title', 'subtitle', 'body', ], // returns global speakers and local ones... 'speakers' => function($page){ $speakers = $page->speaker_relation; $speakers = $speakers->prepend(wire('pages')->find('template=Speaker, global=1, sort=-id')); // build a query of the speakers with return $speakers->arrayQuery([ 'title#name', // rename title field to name 'subtitle#ministry', // rename subtitle field to ministry 'links' => [ 'linklabel#label', // rename linklabel field to minlabelistry 'link' ], ]); }, 'Program' => [ // Child Pages with template=Program 'title', 'summary', 'start' => function($parent){ // calculate the startdate from timetables return $parent->children->first->date; }, 'end' => function($parent){ // calculate the endate from timetables return $parent->children->last->date; }, 'Timetable' => [ 'date', // date 'timetable#entry'=> [ 'time#start', // time 'time_until#end', // time 'subtitle#description', // entry title ], ], ], // ProcessWire selector, selecting children > name result "location" 'template=Location, limit=1#location' => [ 'title#city', // summary title field to city 'body', 'country', 'venue', 'summary#address', // rename summary field to address 'link#tickets', // rename ticket link 'map', // Mapmarker field, automatically transformed 'images', 'infos#categories' => [ // repeater matrix! > rename to categories 'title#name', // rename title field to name 'entries' => [ // nested repeater matrix! 'title', 'body' ] ], ], ]; if ($input->urlSegment1 === 'json') { header('Content-type: application/json'); echo $page->pageQueryJson($query); exit(); } Module default settings The modules settings are public. They can be directly modified, for example: $modules->get('PageQueryBoss')->debug = true; $modules->get('PageQueryBoss')->defaults = []; // reset all defaults Default queries for fields: Some field-types or templates come with default selectors, like Pageimages etc. These are the default queries: // Access and modify default queries: $modules->get('PageQueryBoss')->defaults['queries'] … public $defaults = [ 'queries' => [ 'Pageimages' => [ 'basename', 'url', 'httpUrl', 'description', 'ext', 'focus', ], 'Pagefiles' => [ 'basename', 'url', 'httpUrl', 'description', 'ext', 'filesize', 'filesizeStr', 'hash', ], 'MapMarker' => [ 'lat', 'lng', 'zoom', 'address', ], 'User' => [ 'name', 'email', ], ], ]; These defaults will only be used if there is no nested sub-query for the respective type. If you query a field with complex data and do not provide a sub-query, it will be transformed accordingly: $page->pageQueryArry(['images']); // returns something like this 'images' => [ 'basename', 'url', 'httpUrl', 'description', 'ext', 'focus'=> [ 'top', 'left', 'zoom', 'default', 'str', ] ]; You can always provide your own sub-query, so the defaults will not be used: $page->pageQueryArry([ 'images' => [ 'filename', 'description' ], ]); Overriding default queries: You can also override the defaults, for example $modules->get('PageQueryBoss')->defaults['queries']['Pageimages'] = [ 'basename', 'url', 'description', ]; Index of nested elements The index for nested elements can be adjusted. This is also done with defaults. There are 3 possibilities: Nested by name (default) Nested by ID Nested by numerical index Named index (default): This is the default setting. If you have a field that contains sub-items, the name will be the key in the results: // example $pagesByName = [ 'page-1-name' => [ 'title' => "Page one title", 'name' => 'page-1-name', ], 'page-2-name' => [ 'title' => "Page two title", 'name' => 'page-2-name', ] ] ID based index: If an object is listed in $defaults['index-id'] the id will be the key in the results. Currently, no items are listed as defaults for id-based index: // Set pages to get ID based index: $modules->get('PageQueryBoss')->defaults['index-id']['Page']; // Example return array: $pagesById = [ 123 => [ 'title' => "Page one title", 'name' => 123, ], 124 => [ 'title' => "Page two title", 'name' => 124, ] ] Number based index By default, a couple of fields are transformed automatically to contain numbered indexes: // objects or template names that should use numerical indexes for children instead of names $defaults['index-n'] => [ 'Pageimage', 'Pagefile', 'RepeaterMatrixPage', ]; // example $images = [ 0 => [ 'filename' => "image1.jpg", ], 1 => [ 'filename' => "image2.jpg", ] ] Tipp: When you remove the key 'Pageimage' from $defaults['index-n'], the index will again be name-based. Help-fill closures & tipps: These are few helpfill closure functions you might want to use or could help as a starting point for your own (let me know if you have your own): Get an overview of languages: $query = ['languages' => function($page){ $ar = []; $l=0; foreach (wire('languages') as $language) { // build the json url with segment 1 $ar[$l]['url']= $page->localHttpUrl($language).wire('input')->urlSegment1; $ar[$l]['name'] = $language->name == 'default' ? 'en' : $language->name; $ar[$l]['title'] = $language->getLanguageValue($language, 'title'); $ar[$l]['active'] = $language->id == wire('user')->language->id; $l++; } return $ar; }]; Get county info from ContinentsAndCountries Module Using the [ContinentsAndCountries Module](https://modules.processwire.com/modules/continents-and-countries/) you can extract iso code and names for countries: $query = ['country' => function($page){ $c = wire('modules')->get('ContinentsAndCountries')->findBy('countries', array('name', 'iso', 'code'),['code' =>$page->country]); return count($c) ? (array) $c[count($c)-1] : null; }]; Custom strings from a RepeaterTable for interface Using a RepeaterMatrix you can create template string for your frontend. This is usefull for buttons, labels etc. The following code uses a repeater with the name `strings` has a `key` and a `body` field, the returned array contains the `key` field as, you guess, keys and the `body` field as values: // build custom translations $query = ['strings' => function($page){ return array_column($page->get('strings')->each(['key', 'body']), 'body', 'key'); }]; Multilanguage with default language fallback Using the following setup you can handle multilanguage and return your default language if the requested language does not exist. The url is composed like so: `page/path/{language}/{content-type}` for example: `api/icf/zurich/conference/2019/de/json` // get contenttype and language (or default language if not exists) $lang = wire('languages')->get($input->urlSegment1); if(!$lang instanceof Nullpage){ $user->language = $lang; } else { $lang = $user->language; } // contenttype segment 2 or 1 if language not present $contenttype = $input->urlSegment2 ? $input->urlSegment2 : $input->urlSegment1; if ($contenttype === 'json') { header('Content-type: application/json'); echo $page->pageQueryJson($query); exit(); } Debug The module respects wire('config')->debug. It integrates with TracyDebug. You can override it like so: // turns on debug output no mather what: $modules->get('PageQueryBoss')->debug = true; Todos Make defaults configurable via Backend. How could that be done in style with the default queries? Module in alpha Stage: Subject to change This module is in alpha stage … Query behaviour (especially selecting child-templates, renaming, naming etc) could change
    1 point
  11. I'm proud to share this newly released custom-made website with you. Musikschule Neumünster https://www.musikschule-neumuenster.de/ Design details The design was built from ground up to give every aspect and every detail of the website its very own unique look. We faced the demand to create a visual experience that is up to date but kind of classic at the same time. A fact you can't describe but you will feel and see it when visiting the website. ? Technical details From top to bottom every detail can be managed in the backend - all instruments, tutors, events, and content pages. In order to make life easier some things are automated (for example: archiving older events or managing the relationship between tutor and instrument). Modules and time-savers ProCache Croppable Image 3 PagefieldPairs MarkupSitemap Hanna Code Jumplinks I hope you enjoy the result as much as we* do. * A little side note to reduce confusion: I'm partner and the developer of Muskaat (design and development bureau based in Neumünster, Germany).
    1 point
  12. Thanks a lot for this. I was struggling with this exact problem... trying to use before ::render ?. Man I love this community. ❤️
    1 point
  13. The subfolder will be created, and you most likely are saving your file to the temp directory. You can check this with file_exists() after the file is saved in your script. But I believe what is happening is that subfolder and temp file are removed by the destruct() method of WireTmpDir during PHP shutdown. http://php.net/manual/en/language.oop5.decon.php#language.oop5.decon.destructor If you want the file to persist after the destruction of the WireTmpDir object then it looks like the WireTmpDir::setRemove() method is what you want. $wireTempDir->setRemove(false);
    1 point
  14. If all you want the edit page to show is a list of children then maybe you would be better off replacing ProcessPageEdit::execute() entirely. E.g. $wire->addHookBefore('ProcessPageEdit::execute', function(HookEvent $event) { /* @var ProcessPageEdit $ppe */ $ppe = $event->object; $page = $ppe->getPage(); if($page->template != 'my-template') return; $event->replace = true; /* @var InputfieldForm $form */ $form = $this->modules->InputfieldForm; /* @var InputfieldMarkup $f */ $f = $this->modules->InputfieldMarkup; $f->name = 'ChildrenPageList'; $f->label = 'Children / Subpages'; if($page->numChildren) { /* @var ProcessPageList $ppl */ $ppl = $this->modules->ProcessPageList; $ppl->id = $page->id; $ppl->showRootPage = false; $f->value = $ppl->execute(); $template_sortfield = $page->template->sortfield; if($template_sortfield && $template_sortfield != 'sort') { $f->notes = sprintf('Children are sorted by "%s", per the template setting.', $template_sortfield); } } else { $f->description = 'There are currently no children/subpages below this page.'; } $form->add($f); $event->return = $form->render(); }); If you wanted the "Add New Page Here" button and "Sort Settings" fieldset too then you could add those by borrowing from the code in ProcessPageEdit::buildFormChildren().
    1 point
  15. Yeah, that doesn't come through on the $input variable, so you'd have to grab it yourself. I've pushed a PR to include it in the $input variable as it makes sense for ProcessWire to support that out of the box. @ryan
    1 point
  16. Hey @adrian - thanks for pointing this out. Both are valid points, so I'll try look into it this weekend.
    1 point
  17. WOW. Amazing. Impressive. This community is incredibly talented. Gideon
    1 point
  18. @Alexander Just in case you are not aware of it: PW utf8 Normalisation Textformatter (but I suspect you are.)
    1 point
  19. A web page is working, the address is not.
    1 point
  20. This looks really interesting, thanks for taking the time to write it up, and provide that module! Can anyone give a pointer where someone... you know... lets say a friend... who has maybe fallen way behind in terms of front-end technologies and has never touched vue.js or any of its kin, where they might start learning how to implement this PageQueryBoss module and turn it into a complete front-end?
    1 point
  21. Please take this suggestion, based from the view of a decision maker which framework to use: I hear you saying: "Processwire can do everything. It is not limited to web sites." Sure, it's true and we all got it. However, you canot target "everything". You have to market to specific demand. The success of WP and Bootstrap is their totally overwhelming "out-of-the-box" instant gratification. Click.. Click.. AWESOME website. "Done!" Of course, it is not done. However, users are hooked enough to dig deeper, study, try thing out, extend. And bam, they invested additional time and are captured in that ecosystem. While the Processwire installation technically is flawless, it spits out newbies into the desert (or alternatively into nah sort of website template). The gap between the Processwire post-installation situation and something WP provides with their modern templates is too high. We almost skipped Processwire, because we just didn't know how to get to a first success. It is only, that WP exploded after installing two incompatible plugins, that we came back. We now work with a Processwire Pro to do the website for us but not everybody is willing to invest into the blind. Processwire is totally awesome - I felt that with my very first look. It is so clean, fast, tight, professional, secure and flexible, that I want to see it thriving. Please get users hooked with an awesome general startup experience, people can start working on. it doesn't take more than a beautiful modern website template and ideally with a page builder module preset.
    1 point
  22. I've send you a PM. Thanks.
    1 point
  23. Hi @Alexander I like the idea and hope the business goes well for you. Thanks for the offer code too!
    1 point
  24. I'm having the same problem - URL is wrong. After clicking Apply, it says "Can not recognize the mailing address. Please check and try again."
    1 point
  25. Interesting! So you're saying that's your own business venture, not working for a client-project? Good luck with that project. I can surely see potential for such a verification process. Gonna read more about it when I have more time. I tried to verify one of my sites and came across a bug(?). When I entered my site URL, there was an error message showing up: Wrong URL. (white text on red background, beneath the input field). The URL is most definitely correct though. What's strange: I could actually proceed to the last screen, where I have to enter a password etc.
    1 point
  26. Make sure you have a filter form that action url is the $page->url. I don't know what the problem is really but it's all getting too complicated for what it really can be (dead simple). Example filter form for a paginated result list : <?php namespace ProcessWire; $filter = ""; $form = $modules->InputfieldForm; $form->attr("action", $page->url); $form->attr("method", "get"); // select with sort options $f = $modules->InputfieldSelect; $f->attr("name", "sort"); $f->label = "Sort"; $f->addOptions(array( "-title" => "descending", "title" => "ascending" )); $form->add($f); // submit button $f = $modules->InputfieldSubmit; $f->attr("name", "filter"); $form->add($f); // process form if(count($input->get)){ // processes and populates form fields $form->processInput($input->get); // if sort is not empty if($form->get("sort")->value) { // build filter and add to whitelist so it gets picked up by pagination $input->whitelist("sort", $sanitizer->selectorValue($form->get("sort")->value)); $filter .= ",sort=" . $input->whitelist("sort"); } } $result = $pages->find("template=basic-page, limit=2{$filter}"); $content .= "<h2>Show Results</h2>"; if(!$result->count) { $content .= "<p>no results</p>"; } else { foreach($result as $res){ $content .= "<p>$res->title<br>$res->url</p>"; } $content .= $result->renderPager(); } $content .= $form->render();
    1 point
  27. Sorry @Mike Rockett - another question for you. What do you think about supporting the finding of pages that are children of hidden / unpublished pages? Just because a parent isn't viewable doesn't mean the children aren't. Thanks!
    1 point
  28. Wordpress has one thing different than ProcessWire, which enables them to have such a high quality default theme: Just three types of data, where two are quite similar. It‘s post, pages and comments. The rest is wysiwyg content all the way. In Processwire we don‘t have that and the power of it comes from not having that. Wordpress themes are just pretty frontends for a nearly non changing backend structure, which it had for years. In ProcessWire the first thing you probably do is creating your own content types (templates) and that‘s what no default theme can cater for. How should it know how to display that random blob of data you decided is a entity in websites domain? So there‘s not much incentive to spend a great amount of money on a high quality theme, which is unusable for just about any reasonable usage of processwire beyond „first impression“ after installation.
    1 point
  29. No doubt. What I mean is, that the gap to get there is too wide for newbies. My apologies for any offense created. I am just enthusiastic and wanted to share my thoughts as someone who had a first contact to PW.
    1 point
  30. https://www.baumrock.com/portfolio/individuelles-crm-und-controlling-tool/ I'm happy to share my biggest and most interesting ProcessWire project so far with you It's a 100% custom office-management solution that helps my client to keep track of all their contacts, projects and finance/controlling stuff. Conception was done back in 2016 and the software is productive since begin of this year. My client is very happy with the result and so am I. Some technical insights: Everything is done inside the PW Admin. I'm using the Reno Theme with some custom colors. In the beginning I was not sure if I should stay with the pw admin or build my own admin-framework but now I'm VERY happy that I went with PW Almost all of my custom Process Pages use my RockDatatables module - there are still some limitations but without it, this project would not have been possible For the charts I used Google Charts and chartjs - both play well together with the datatables and make it possible to display filtered data instantly: also my handsontable module was created for this project to have a nice and quick option for matrix data inputs: Lister and ListerPro were no options as i needed much more flexibility regarding data presentation (like colorization, filtering and building sums of selected rows): invoices are highly customisable as well and easy to create. PDFs are created by php and mPDF by the way: all data is dummy data populated via my Module RockDummyData have a nice weekend everybody
    1 point
  31. https://www.baumrock.com/portfolio/hrdiamonds-360-feedback-tool/ This tool was developed for the vienna based HR company hrdiamonds.com. They can create projects for their clients, setup the feedback architecture, choose from a library of competences and create their very own surveys and provide highly customized services for their clients. Highlights: Everything multilingual (EN/DE) PDF reports with custom designs, table of contents, page numbers, importable custom pdfs (annex, written in MS Word, so they have perfect freedom and ease of use) and of course: pretty charts (done by chart.js): Scalable and nice UI by RockGrid+batcher in several custom process modules: Automatic multilingual e-mails with several variables: Another example of RockGrid: Customizable groupings of feedback-roles (there have to be at least 3 feedbacks per role so they need to have the possibility of aggregating different feedbacks-roles). This project was online for some time already but I ported it from RockDatatables to RockGrid which I plan to release in the next days. If anybody is interested in using/reselling this tool feel free to contact me via PM ?
    1 point
×
×
  • Create New...