Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/08/2024 in all areas

  1. I'm proud to share another module with you. Compared to other settings-modules this module has the benefit that it creates a real page, which means: You can access it via $settings or settings() from everywhere You can upload assets like a logo or global images or files You can add/hide/change all the fields of the settings page as you like It (optionally) adds a settings-icon to the main navbar of the backend It has a redirects feature to create short-links like yourdomain.com/example Download + Docs: https://www.baumrock.com/processwire/module/rocksettings/ If you have feedback or any suggestions for improvements let me know!
    2 points
  2. Hi @bernhard, Many thanks. Yes, the update to v5.0.0 has certainly fixed that issue. Yes, I definitely do ? I like the drag 'n' drop sorting too, although it can be a little difficult to know whether you're dropping in the right place when you have blocks that are quite long on the page. At least you can still do it the 'old' way as well, on the admin page edit screen. Many thanks for the quick response!
    2 points
  3. When working with the rock page builder if i know i want some markup untouched such as i want to do a array finding all children and putting and image, can i do this on a "template" as i normal would in ProcessWire or du i need to do it in the block? If doing it in the block the enduser could move it around (not a big problem for the case i am working ATM). But im quorious should everything go in the blocks now?
    1 point
  4. 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
  5. I an sorry. ? Usualy, I translate before posting but this Time y forgot.il a mistaque.
    1 point
  6. Well, that’s a nice answer! ? For the videos, I don't understand English well enough to follow them but I know where to find excellent tutorials within my reach because if I have a few basics and understand how they work I never had the courage to do so. 'study in a good way. Now, at 72, it's a little late to get started, especially since I'm very busy with my passion. A big thank you of course because you understood my needs and gave more than just hints to get where I want to go. I will show you the results
    1 point
  7. Glad to hear that. I do not know how much experience you have with PHP but here is a good and free series I can recommend: https://www.youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe- As the more "OOP PHP" you know the easier your path will be. In the FrontendForms module support topic you can find examples for saving to pages, look for PHP variables called $p and such. The easiest way to save any data is to save to dedicated pages. By dedicated, I mean that you first setup your templates with their fields and after that you can simply create new pages for your subscribers (by using the PW API, of course). While its readme sound hard to grasp at first, I can still recommend @adrian's Page Field Select Creator module to setup your subscribers/subscriber relationship: https://processwire.com/talk/topic/4523-page-field-select-creator/ What this does is that it automates the manual setup of parent/child relationships which is a common scenario and a subscribers/subscriber relationship is exactly like that. You can lear more about it (among other PW forum topics like @kongondo's excellent post) in this article where the car/car-brand or author-list/author is the same relationship: https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a4#.m9yquavll
    1 point
  8. Thank you for your answer szabesz which is in line with what I am trying to do. I need a tool that is as simple as possible to set up and facilitate the action of the visitor who, with one click, will be able to subscribe to notifications which tell them that there is something new on the site. site. A new chapter to a story for example. Usually, I inserted an email box where the visitor registers but that was before because now, I want to create my tool with the possibilities that PW offers internally. This allows me to learn ProcessWire which is the primary purpose of the operation. For FrontendForms, I have already downloaded it and will install it tonight. But for my notifications I have to go through email, to collect registrations, a simple email field should do the trick, but I don't know how to save the addresses on the page or elsewhere.
    1 point
  9. Hi, before we tackle with your 10 000 questions ?, in the situation you descibe i would the simplest way to do what you say would be to give all languages a name (the slug) that's to say fr for french, en for english and so on and have the domain aim at yourdomain.com/fr by default coming to the admin, nothing simplest than using the french language pask for the frenc language (no kidding :D) and then go in your user parameters and choose french as its language, the admin will be in french when logging with this user even if not the default one i personally don't use the multilanguage profile, always use the blank one but i'm sure it's well set as every thing in pw ? and yes, what a foot as you say ? and most of all, same as for the clients who love it when coming from shrink customer suppliers like drupal, joomla or even wordpress and discovering how simple it can be to manage a website, even a complex one... have a nice day
    1 point
  10. Hi @Webjack sorry, not here yesterday... i think you're not taking advantage of pw multilanguage abilities, processwire is language agnostic and let you do whatever you want i assume you are making a website with several languages and want the back-end tio be in french, the best way to do this is to consiider french as your default language and add the other ones, included english as other languages, this way your site will be youdomain.com for french and youdomain.com/en/ youdomain.com /de/ youdomain.com/fi/ for the other languages just for fun, let's imagine a simple situation, you want to make a website with only french as the front end and back end language, you will not add french as a new language but just, put your content in french and translate the admin in french for the one and only language you're using, french it's exactly the same thing here except that once this is done, you can add other languages (i've made websites in 7 an 9 languages with pw and the client didn't believe how simple they were to manage when they suddenly wanted to add another language ? ) coming to the back-end, just add the french translation files to your french default language, it will be the default language of the admin and of the users for whom the language is defined as default now, let's imagine you'll have different users for the admin, you can set their language chosing among those you've created and for each of those languages just use the language pack to have their interface translated, no need of course for english as without a language pack it will use pw native "wording" and now, about these front-end translations, of course, pw doesn't translate anything for you but, if you have fully installed all the multi language things pw proposes when installing the language support module, you can, for nearly every field chose a mono or a multi language version, in that last case, the fields will come with tabs that let you enter the content for each language cherry, i know, now people say icing but i'm an old guy..., ?, on top of the cake, pw lets you choose if you want or not to use the default one content for the other ones when not filled well, i stop this 1km long post here but if you want some help in french don't hesitate to write me an email using my pseudo @gmail.com and we will discuss all this in french and even, why not, use a share screen thing to show you some tricks that may help you save some time and liters of sweat ? hope it will help have a nice day
    1 point
  11. Have you tried https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory ? This seems to be the most popular one. Latest commits last year. The graph looks similar to git graph. There is a number of actions you can take on commits, like revert, create branch, cherry pick etc.
    1 point
  12. Great news ? I've just pushed v3.35 which adds auto-loading of pageclasses to RockMigrations! Now if you are developing a module that ships with custom pageclasses all you have to do is to add them in the /pageClasses folder of your module and add the proper namespace! ??? See the docs here: https://www.baumrock.com/en/processwire/modules/rockmigrations/docs/custom-pageclass/ What about PRs? Having a watch priority as class constant for example sounds like a good idea to have ?
    1 point
  13. Great to hear that ? Thx for marking the topic solved! I've pushed v5.0.3 yesterday which brings back the old sorting icon in the top right corner additionally to the new drag&drop sort handle at the top left. I think, as you said, it makes sense to have both options!
    1 point
  14. GitHub has recently changed something that now makes it much more difficult to host readme images at GitHub without making them a part of the repo. There has long been a gotcha for previously private repos where if you if you added images before making the repo public then those image URLs wouldn't get the public subdomain. But now it seems that if a public repo has ever been private then GitHub forces the "private-user-images" subdomain, even retrospectively changing image URLs that previously had the public "user-images" sudomain. I can observe this in some of my recent modules where the PW forum post has the public URLs that were copy/pasted from the readme at the time the post was created but the readme at GitHub now has the "private-user-images" subdomain, which is going to make it a real drag to update the forum post when the readme is updated. And GitHub tricks you into thinking the image URLs are publicly accessible (I double-checked in an incognito window to make sure after the previous attempt to fix), but as this post describes the private URLs contain an encoded token that causes the images to expire after 5 minutes, although I don't know how any mere mortal is expected to know that. Presumably GitHub checks the referrer so the expiry doesn't occur when viewing the readme on GitHub itself. So the only solution I can see is manually changing all image URLs from the private to the public subdomain before using them in the readme - you can no longer conveniently use the GitHub image markdown directly from the "issue". I wrote a little Tracy Console script to make the process a bit less painful - might be useful to anyone else who changes repos from private to public and likes to host readme images at GitHub. // Require Simple HTML Dom: https://sourceforge.net/projects/simplehtmldom/ require_once $config->paths->templates . 'TracyDebugger/snippets/simple_html_dom.php'; // Get HTML from issue where images are embedded $html = file_get_html('https://github.com/Toutouwai/ProcessMediaLister/issues/1'); // Process images foreach($html->find('.markdown-body img') as $img) { $alt = $img->alt; $src = $img->src; // Remove query string $pos = strpos($src, '?'); $src = substr($src, 0, $pos); // Replace private subdomain with public subdomain $src = str_replace('private-user-images', 'user-images', $src); // Echo image Markdown for copy/paste into readme echo "![$alt]($src)<br>"; }
    1 point
  15. Hello everyone, Good news since the other day, :) I've taken PHP more seriously and am starting to put the documentation into practice, or at least what I understand of it. I can say that my next site will be powered by ProcessWire, as I'm so comfortable with this tool, which promises many long, studious and rewarding hours (months, years) for a little tinkerer. I've left my past behind and entered another dimension. Thanks again to all of you. :) My signature site is now dedicated to this apprenticeship. All I have to do now is learn how to make it multilingual, but that will come ;)
    1 point
  16. Hey @iank I just pushed the new version v5.0.0 to my website ? https://www.baumrock.com/releases/rockpagebuilder/ Please note that in this version I have changed the way how sorting blocks works. In the older release we had this icon, which opened a modal to sort the elements: OLD way: The new way of sorting is Drag&Drop ?? I'll send out some more informations with the next Rock-Monthly soon! ? Thx for reporting the issue! I hope you like RockPageBuilder ? PS: Please make sure to also update RockMigrations + RockFrontend to the latest versions!
    1 point
  17. 1 point
  18. Hi Denis, thx. That's already fixed in the latest version on the dev branch ? Sorry for the trouble! I'll merge that soon!
    1 point
  19. With a bit of hooking it is possible to both dynamically control the selectable pages for a PageAutocomplete inputfield, and dynamically set the parent/template of new pages created from the inputfield. I have only played around with this and haven't used it in production, so use it at your own risk. Dynamic selectable pages for PageAutocomplete The idea is that in the field settings you define a broad selector that includes all of the pages you might want to select. It could be something really broad such as "has_parent!=2". Then you modify the selector in a hook according to the page being edited. In /site/ready.php... $wire->addHookAfter('Field::getInputfield', function(HookEvent $event) { $field = $event->object; $inputfield = $event->return; // Only for this one Page Reference field if($field->name !== 'test_page_field') return; // Only for ProcessPageEdit if($this->process != 'ProcessPageEdit') return; $page = $this->process->getPage(); // Get findPagesSelector (or findPagesSelect if you used that) $selector = $inputfield->findPagesSelector; /* Now append to or overwrite $selector however you like, depending on $page maybe. You can even define some $allowed PageArray like with the "Custom PHP code" option that is possible with other Page inputfields, and then use it in the selector as "id=$allowed". But note that there is a 500 character limit enforced on selectors. */ // Set the modified selector back to the property you got it from $inputfield->findPagesSelector = $selector; }); Dynamic parent and/or template for pages created from the inputfield The idea is that in the field settings you do not define a parent or template for allowed pages, but then set these properties in a couple of hooks according to the page being edited. In /site/ready.php... $wire->addHookBefore('InputfieldPage::renderAddable', null, 'dynamicParentandTemplate'); $wire->addHookBefore('InputfieldPage::processInputAddPages', null, 'dynamicParentandTemplate'); function dynamicParentandTemplate(HookEvent $event) { $inputfield = $event->object; // Only for this one Page Reference field if($inputfield->hasField->name !== 'test_page_field') return; // Only for ProcessPageEdit if(wire()->process != 'ProcessPageEdit') return; $page = wire()->process->getPage(); // Now set $parent_id and $template_id dynamically depending on $page $parent_id = 1234; // demo value $template_id = 56; // demo value $inputfield->parent_id = $parent_id; $inputfield->template_id = $template_id; } Have fun!
    1 point
  20. Here is an example - change the template name to suit. Assumes three integer fields: quantity, unit_price, order_total. In /site/ready.php... $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template->name !== 'your_template_name') return; if($page->quantity && $page->unit_price) { $page->order_total = $page->quantity * $page->unit_price; } });
    1 point
  21. You can create a new integer field, add it to your template, and update the value based on other values in the page with a hook to Pages::saveReady. No need for a new fieldtype I think because it would have to use a hook like this anyway, because by themselves fields don't know anything about other fields that might be in the same template.
    1 point
×
×
  • Create New...