Leaderboard
Popular Content
Showing content with the highest reputation on 01/14/2024 in all areas
-
This is so great!! Thx @ryan and @Jonathan Lahijani and @thetuningspoon for suggesting this. I've just implemented first class support for this in RockMigrations and it comes in really handy for the development of RockCommerce. There I have a repeater where clients can add Accessories for every Product. Instead of being RepeaterPages they are now \RockCommerce\Accessory objects which is a lot nicer and makes the code a lot cleaner and I can get rid of many hooks and now my IDE actually understands my code ? For everybody using RockMigrations all you have to do to make that work is to place your file in /site/modules/YourModule/repeaterPageClasses/Accessory.php and add the field constant to that class so that RockMigrations knows which field to apply the pageclass to: <?php namespace RockCommerce; use ProcessWire\RepeaterPage; class Accessory extends RepeaterPage { const field = "rc_product_accessories"; } While working on this I have also improved autoloading of custom page classes and autoloading of regular PHP classes or traits: MyModule/classLoader will auto-load regular PHP classes or traits MyModule/pageClasses will auto-load PW custom pageclasses MyModule/repeaterPageClasses will auto-load PW custom repeater classes (and trigger init() and ready() for them) Extensive docs are already on the dev branch (https://github.com/baumrock/RockMigrations/tree/dev/docs/classloader) and will be merged to main begin of next month ? This is also the case when using $pages->newPage(...) - not sure if that's intentional @ryan ?3 points
-
2 points
-
@Jonathan Lahijani Good idea, I'll add an update to make it use it for that case (and the one Bernhard mentioned). It'll likely be the same location as what you've suggested, except it'll get it from FieldtypeRepeater::getCustomPageClass() instead, since that already has all the logic to determine what class to use.2 points
-
I want to show a new website that I made at the beginning of this year using @bernhard's RockPageBuilder module: https://www.kurrat-terrassendaecher.de/ The client: Kurrat Terrassendächer (which translates to "Kurrat Terrace Roofs") is a dealer from germany that is specialized in building custom made terrace roofings, awnings and solar protection. The goal: The customer had a old website that was used as a basis for the new design. The new website should offer a more "catalogue-like" look with lots of information for the customer. Fortunately the client had access to high quality images of the products that really make the whole website shine. The page features three main categories: 1. Terrace Roofs 3. Solar Protection 3. Winter Gardens Each category subpage is made of modular content blocks: The user is able to make custom page layouts using these blocks directly in the frontend. With the RockPageBuilder module it is super fun an super straight forward to work with these content blocks. If you don't know this module yet I highly recommend to check it out! If you like the RepaterMatrix you will love this module. It is far superior IMHO! Inserting a content block looks like this: It is also possible to edit content on-the-fly in the frontend: As with the RepeaterMatrix each content block an also be added end edited in the backend of the page: Here you see the list of content blocks used on the home page. To edit a block, just click on it and you can edit it just like using the RepaterMatrix. Screenshots from the website: Modules used for this page: - RockFrontend (for asset bundling, minifying, etc.) - RockPageBuilder (instead of RepeaterMatrix! For building and editing all content in the frontend) - WireMailSMTP - PageImageSource (for creating webp image variations) - PrivacyWire (for cookie consent banner) - SEO Maestro - Redirects The frontend framework is UIKit2 points
-
Media Lister Lists images and files from across the site in a sortable and filterable table. For images you can choose between table, small thumbnails and large thumbnails view modes. The module retrieves the data using SQL queries so is able to efficiently list media information for all but the largest of sites. Possible use cases: Check that a nice variety of banner images is used for top-level pages. Find duplicate files/images by sorting by filesize or filename. Find images without descriptions if this is important for use in alt tags. Find large PDF files that would benefit from optimisation. Check for "inappropriate" images, or images that are not "on-brand". Images in small thumbnails view mode Files saved as a bookmark Controls Media type: Choose between Images and Files. View mode: When listing images you can choose between small thumbnails, large thumbnails and table view modes. When in one of the thumbnail view modes you can see information about the image in a tooltip by clicking the "i" icon, or edit the page containing the image by clicking the pencil icon. From pages matching: This field allows you to add filters to limit the pages that the media will be listed for. Add bookmark: Superusers can add bookmarks for the current settings that will be available from the flyout menu for all users. See the bookmarks section below for more information. Column visibility: Choose the columns that appear in the table and in the information tooltip (when in thumbnails mode). Search: Quickly filters the results to show only items that have the search text in any column, whether the column is visible or not. Custom search builder: For more advanced searches where you can combine conditions for specific columns with AND/OR logic. Pagination: You can navigate through the results and set the number of results per page. Reset: Click the "Reset" button at the top right to return to the default settings for Media Lister (or for the current bookmark if applicable). Editing the page that contains the media For any media result click the link in the "Page" column to open the page that contains the media item in Page Edit. When in thumbnail view mode you can click the pencil icon to achieve the same thing. The field that contains the media item will be focused. When a media item is contained within a Repeater field this is indicated by an asterisk at the start of the page title. When opening Page Edit for a media item within a Repeater field the Repeater item will be automatically expanded, including for nested Repeaters. Limitations for values that are merged in the database The module has limited support for multi-language values and custom fields for images/files. In order to be efficient enough to handle large sets of results the module retrieves raw values from the database, and in the case of multi-language values and custom field values ProcessWire stores these in JSON format in a single database column. The module improves the display of this JSON data by extracting the uploadName value into a separate column, substituting custom field labels for field IDs, adding language names where possible, and by transforming the data into a quasi-YAML format for better readability. Some limitation remain though – for example, if you use Page Reference fields in the custom fields then only the page IDs are displayed. Bookmarks Superusers are able to create a bookmark for the current Media Lister settings by expanding the "Add bookmark" field, entering a title for the bookmark, and clicking the "Add bookmark" button. Bookmarks will be visible to all users from the flyout menu. You can delete a bookmark from the module config screen. Module config In the module config screen you can define defaults for controls such as media type, view mode, pagination limit and column visibility. You can also delete bookmarks from the module config screen. https://github.com/Toutouwai/ProcessMediaLister https://processwire.com/modules/process-media-lister/1 point
-
I asked it: "What language model are you based on?" It replied: "Hello! I'm based on the LLaMA model (LLaMA: Open and Efficient Foundation Language Models, Touvron et al. 2023), a neutral and respectful AI assistant developed by the company Brave. I'm here to help answer your questions to the best of my ability. How may I assist you today?" Next I asked: "Please describe what ProcessWire is." Replied: "ProcessWire is a powerful and flexible open-source content management system (CMS) that offers a unique and intuitive way of managing your website's content and structure. It is built with PHP and MySQL, and is designed to be lightweight, fast, and easy to use. With ProcessWire, you can create complex websites with ease, using a logical and intuitive page tree structure that makes it easy to organize and manage your content. Additionally, ProcessWire has a robust set of features, including support for templates, layouts, and modules, making it a great choice for building custom websites." Next I asked: "Where can I download ProcessWire?" Reply was: "ProcessWire is a free, open-source content management system (CMS) that you can download from the official ProcessWire website. To download ProcessWire, please visit the following link: <https://processwire.com/download/>. From there, you can select the version of ProcessWire that best suits your needs and download it to your computer. Once you have downloaded the software, you can install it on your web server and start using it to manage your website."1 point
-
Hi @Stefanowitsch You have done a great project. I too have found the modules from @bernhard to be very speedy. I am looking forward to your new projects.1 point
-
<?php $f->entityEncodeText = false; $f->notes = str_replace( "[icon]", "<i class='fa fa-check'></i>", $this->_("Some text [icon] Some more Text.") );1 point
-
First of all, the images field is inside a repeater. But I don't think that is a problem. In addition to the four different formats you show above, for some reason I have just the text in the description field, the last one. But I don't know why is that even possible, as it does not happen if I save a new description. It might be, that the language support was added later and the old descriptions are not converted to the JSON format. This is not a big issue for me. I just happend to notice that there is some weird behaviour. At least you could check that the empty description fields would not be shown as "array-0":1 point
-
Hi @ryan, Thanks for this update. One easy to overlook but important missing part of the repeater update that was made is what happens if you edit a repeater item directly. Assume we have a repeater field named 'books' and you edit the repeater item page by going to /admin/repeaters/books/(for-page)/repeater-item-page When editing it directly, the page to be edited simply gets the RepeaterPage class instead of BooksRepeaterPage class. I managed to hack-fix this by doing this in /wire/core/Templates.php: // determine if custom class available (3.0.152+) if($usePageClasses) { // generate a CamelCase name + 'Page' from template name, i.e. 'blog-post' => 'BlogPostPage' $className = ucwords(str_replace(array('-', '_', '.'), ' ', $template->name)); // *** *** hack fix: if we are editing a page with a template that starts with 'repeater_', assign the correct page class! *** *** if(str_starts_with($template->name, 'repeater_')) { $className = __NAMESPACE__ . "\\" . str_replace(' ', '', $className) . 'RepeaterPage'; $className = str_replace('ProcessWire\Repeater', 'ProcessWire\\', $className); } else { $className = __NAMESPACE__ . "\\" . str_replace(' ', '', $className) . 'Page'; } if(class_exists($className) && wireInstanceOf($className, $corePageClass)) { $pageClass = $className; } } Can what I described be supported as well?1 point
-
Great module, thank you! One small problem: I have a two language site. The description field having some text shows not the text, but this: array-0. The text of the description field is not found with the search-box or Custom Search Builder, but it can be search with the filter part above. Is this a limitation of the multilanguage fields or a bug?1 point
-
... well, more like the indented (conditional) dropdown in the setup menu, otherwise you still have lots of scrolling. TextTags also saves lots of scrolling, as @bernhardsays. Needs a bit more though before making a feature request. BTW @monollonom, I think your module should be in the core! Maybe the best quick solution is to install SelectizeAll by @Robin S1 point
-
Really nice module! Just tried it and it works great and really improves the UI/UX. Thx for sharing ?1 point
-
Hello, the last few weeks there were four new versions of ProcessWire on the master branch (3.0.226 - 3.0.229) and there seems to be the next one around the corner. I like to upgrade all my ProcessWire websites whenever a new master version is released. Currently I am upgrading around 50 websites, which takes a few hours for all of them. I have skipped a few of the master releases, but was wondering if it would be possible to provide an module for auto upgrades? I know that there is a certain risk involved with auto upgrades and it would not work for the .htaccess file, because this file has its own rules. But upgrading the wire folder and the index.php is usually unproblematic, so those could be auto upgraded. WordPress for example has auto upgrades enabled for patch versions (x.x.1 to x.x.2) if there is not Git present. Currently ProcessWire has no minor versions (x.1.x) and only patch versions (x.x.1), but maybe one could configure in the module settings which branch (dev or master) should be auto upgraded. Maybe this could be a setting in the ProcessWire Upgrade module or an extension: https://processwire.com/modules/process-wire-upgrade/ After the upgrade you could get an email, that your ProcessWire has been upgraded (similar to the Workflow in WordPress). There could also be an option for auto upgrading modules. (for example Tracy Debugger ?) What do you think? Is there some major issue speaking against the option for auto upgrades? Regards, Andreas1 point
-
Progress is going on well, as usual my choice for Development: TemplateEngineFactory + Twig {% for article in articles %} {% set divisor = 10 %} {% if loop.index0 == 0 %} <div class="flex-center flex-col aa-list"> <h4>Articles</h4> <ul> {% else %} <li> <a href="{{ article.url }}" target="_blank" >{{ article.title }}</a > <span> {{ article.publishedStr }}</span> </li> {% endif %} {% if loop.index % (divisor + 1) == 0 %} </ul> </div> <div class="flex-center flex-col aa-list"> <h4>Articles</h4> <ul> {% elseif loop.last %} </ul> </div> {% endif %} {% endfor %}1 point