Jump to content

Leaderboard

Popular Content

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

  1. Thanks for the new updates @ryan! Do you think for the next week or two the focus could be on bringing the Selectors documentation up to date? This is a really important part of the documentation, especially for new users. New API methods get added to the API documentation automatically which is great, but that doesn't happen for new selector features because the documentation for Selectors isn't derived from code comments in the core. I went back through previous blog posts and compiled a list of things that it would be nice to have covered in the Selectors docs. has_parent now supports multiple values: https://processwire.com/blog/posts/processwire-core-and-profields-updates-2.5.22/#has_parent-selectors-now-support-multi-value The ~= operator now supports words with fewer than 4 characters: https://processwire.com/blog/posts/merry-christmas-heres-processwire-3.0.3-and-2.7.3-and-some-more/#improvements-to-the-operator-in-page-finding-operations Nested sub-selectors are now supported: http://processwire.com/blog/posts/processwire-3.0.6-brings-pages-upgrades-and-link-abstraction/#support-for-nested-sub-selectors It is now possible to sort by custom fields of a parent page: https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/#whats-new-in-3.0.7 New selector array syntax: https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#selector-engine-array-support It would be good to explain about the verbose option for selector arrays too and what circumstances that is needed in. And perhaps some mention of using the Selectors class to merge different types of selector together: https://processwire.com/talk/topic/16651-merge-selectors/?do=findComment&comment=146890 Multiple dot selectors: https://processwire.com/blog/posts/pw-3.0.25/#syntax-and-examples Negative start and limit, and matching by index: https://processwire.com/blog/posts/pw-3.0.46-stocking-stuffers/#support-for-negative-limit-and-start-values-in-selectors Use Fieldtype in selectors: https://processwire.com/blog/posts/processwire-3.0.91-core-updates/ Owner selectors: http://processwire.com/blog/posts/processwire-3.0.95-core-updates/ Use field tags in selectors: https://processwire.com/blog/posts/pw-3.0.106/#a-new-way-to-search-with-upgraded-tags-for-fields If anyone knows any other new selector features not included in the Selectors documentation maybe they could post a reminder about them here? Another thing it would be good to cover in the Selectors docs are the differences between what is supported in a PageFinder selector and what is supported in an in-memory selector. I mentioned a few differences that I know about in a comment here: https://processwire.com/talk/topic/18343-selector-filter-for-multiple-dates/?do=findComment&comment=160451 And perhaps there is a way to bring support for some of those things to in-memory selectors to reduce the differences between the two types of selector?
    15 points
  2. In the last blog post I told you about how two-factor authentication was coming to the core and what our plans were. This week it’s ready to use in ProcessWire 3.0.109, so we’ll take a closer look at all the details and how to use it: https://processwire.com/blog/posts/processwire-3.0.109-adds-two-factor-authentication/
    4 points
  3. There are various ways you can achieve this, including plain PHP and even plain HTML+CSS (depending on your use case you might be able to convert this to a list and add those delimiters as ::after pseudo-elements – it might even make more sense semantically), but probably the easiest way would be the implode() method of the WireArray class. Since $page->authors returns an instance of PageArray and PageArrays inherit the methods of the WireArray class, you can do something like this in your code: <!-- Query of the authors --> <?php if (count($page->authors)) { echo "<u>AUTOR/EN</u>:&nbsp"; echo $page->authors->implode("; ", function($item) { return "<a href='{$item->url}'>{$item->title}</a>"; }); echo "."; } ?> A plain PHP solution using a counter variable would look something like this – this is probably the easiest method to understand for a not-so-experienced developer: <!-- Query of the authors --> <?php $author_count = count($page->authors); if ($author_count) { $count = 0; echo "<u>AUTOR/EN</u>:&nbsp"; foreach ($page->authors as $author) { ++$count; echo "<a href='{$author->url}'>{$author->title}</a>"; echo $count < $author_count ? ";&nbsp" : "."; // note: this is a ternary operator, see http://php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary for details } } ?>
    3 points
  4. Totally missed this one. And this one. Thanks for wrapping this up!
    3 points
  5. This is now possible using owner selectors! http://processwire.com/blog/posts/processwire-3.0.95-core-updates/ $pages->find('template=repeater_collections_detail_images, your_repeater_field.owner.collections_detail_designer=123, include=hidden, sort=name');
    3 points
  6. Hey @horst n @pwired How could you forget @bernhard's blog post? https://processwire.com/blog/posts/building-custom-admin-pages-with-process-modules/? @TheProcessWireLearner Welcome to the forums! Regarding PHP itself: https://www.tutorialspoint.com/php/php_constants.htm I like recommending this, as reading these tutorial pages is enough for anyone to get started, you do not need to know too much more PHP in order to achieve a lot with ProcessWire. I also recommend keeping an eye on: https://processwire.com/talk/discover/unread/?&amp;view=condensed in order to learn from others.
    2 points
  7. Maybe, every PHP tutorial that you are able to understand and isn't boring, - plus reading small existing PW-modules, - and a idea what you want to build. ? https://processwire.com/docs/tutorials/ https://webdesign.tutsplus.com/tutorials/a-beginners-introduction-to-writing-modules-in-processwire--cms-26862
    2 points
  8. I’d like be able to show mine, but it is horribly out of date, so here’s one I did awhile ago for my (ahem, very talented) daughter: http://sarahstrandoo.com Also perhaps http://lynnmooredesign.com/ And although it’s not a portfolio, per se, this gallery goes into a bit more depth about their pieces and might provide some inspiration. http://ptfineart.co.uk/
    2 points
  9. 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
  10. Hi, check this: https://processwire.com/talk/topic/7096-module-for-beginners/ https://processwire.com/talk/topic/13797-writing-a-tutorial-on-module-development-in-processwire/ https://processwire.com/talk/topic/2318-create-your-first-module-with-configuration-settings-and-a-overview-page/ https://processwire.com/talk/topic/1641-learning-module-development/
    1 point
  11. Hello @Hajosch, you could also do something like this: <!-- Query of the authors --> <?php if (count($page->authors)) { echo "<u>AUTOR/EN</u>:&nbsp"; foreach($page->authors as $authors) { echo "<a href='{$authors->url}'>{$authors->title}</a>"; if ($authors === $page->authors->last) { echo "."; } else { echo "; "; } } } ?> Regards, Andreas
    1 point
  12. Hi Adrian, what do you think about adding a db() method/shortcut? So just like bdb() but for use (mainly) in the Tracy Console?
    1 point
  13. Agreed, that does look nice. I have committed a new version with the following changes. Now we just need to get people using it more regularly ? Each section is structured as a table and with the Server Details not collapsed. The plain text version is basically the same, just with section titles added for clarity. SERVER DETAILS ProcessWire: 3.0.108 PHP: 7.2.6 Webserver: Apache/2.4.33 (Unix) MySQL: 8.0.11 SERVER SETTINGS allow_url_fopen: 1 max_execution_time: 120 (changeable) max_input_nesting_level: 64 max_input_time: 60 max_input_vars: 1000 memory_limit: 128M post_max_size: 8M upload_max_filesize: 50M xdebug: xdebug.max_nesting_level: GD: bundled (2.1.0 compatible) GIF: 1 JPG: 1 PNG: 1 EXIF Support: 1 FreeType: 1 Imagick Extension: MODULE DETAILS AdminOnSteroids: 1.9.8 BatchChildEditor: 1.8.12 BreadcrumbDropdowns: 0.1.0 CookieManagementBanner: 0.2.1 FieldtypeStreetAddress: 0.5.1 FormBuilder: 0.3.4 InputfieldFormBuilderFile: 0.0.2 InputfieldStreetAddress: 0.5.1 JquerySelectize: 1.0.4 MarkupSEO: 0.8.7 MarkupSitemap: 0.4.1 ModuleReleaseNotes: 0.10.7 ModuleSettingsImportExport: 0.2.9 PageRenameOptions: 1.0.4 ProcessAdminActions: 0.6.12 ProcessChildrenCsvExport: 1.7.0 ProcessFormBuilder: 0.3.4 ProcessWireUpgrade: 0.0.7 ProcessWireUpgradeCheck: 0.0.7 RestrictTabView: 1.1.3 TextformatterTagParser: 2.2.0 TracyDebugger: 4.10.25
    1 point
  14. You could accomplish the above in various ways. I'll cover two: Option 1: Structure -people --john ---organization 1, ceo, 2010-2012 ---organization 2, board member, 2009-current --mike --etc. The above would have child pages of each person that represents their organization connections. The fields on that template would be: organization (single page select to /organizations/) position or title (text, their position at the organization) start_year (integer) end_year (integer) Option 2: Repeater This is the option I would use, and it's perfect for this sort of thing. It's basically doing the same thing as option 1, but making it simpler and disconnecting it from the structure. You'd create a new field using ProcessWire's repeater fieldtype, perhaps naming it 'organizations' or 'person_organizations'. Then add the same fields mentioned in the bulleted list above. Add this new 'person_organizations' field to your 'person' template. Now you can define as much meta information for that person<->organization relationship as you want to. More on how to use ProcessWire's Repeater fieldtype
    1 point
×
×
  • Create New...