Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/11/2019 in all areas

  1. Hi Folks, this is a bit older project but i thought that I will share it with you - https://icapturemylife.pl/ About 2 years ago one of my friends and clients asked me to build a personal photography blog for himslef. In a day life Mariusz is a professional volleyball player, but in his spare time as an amateur photographer he loves taking pictures and learning about photography. Technically, the site was built from scratch with core PW functionalities, the only module used here is Ryan's "login - register" module - to avoid time-consuming comment moderation, we decided to allow comments only for registered users. In general, the blog is quite simple, but it was real fun to build it with PW! I hope you like it ?
    5 points
  2. @neophron A solution about using filename as image alt info. You can try code below : <?php foreach($page->images_slider as $image) { $slide = $image->size(0,700); $alt = $image->description ?: str_replace('.' . $image->ext, '', $image->basename); echo "<li class='uk-width-3-4'>"; echo "<img class='photo' src='{$slide->url}' alt='{$alt}' width='{$slide->width}' height='{$slide->height}' />"; echo "</li>"; } ?>
    4 points
  3. @neophron Always using this method may cause headache for you. What about add this method as property for each image field and use it like $imageField->alt. We need to add a hook method. Add hook method to existing /site/ready.php or create new /site/ready.php, copy below code and paste it in to /site/ready.php : /site/ready.php <?php namespace ProcessWire; wire()->addHookProperty('Pageimage::alt', function(HookEvent $event) { /* @var $image Pageimage */ $image = $event->object; $event->return = $image->description ?: str_replace('.' . $image->ext, '', $image->basename); }); Usage ($imageField->alt) : <?php foreach($page->images_slider as $image) { $slide = $image->size(0,700); echo "<li class='uk-width-3-4'>"; echo "<img class='photo' src='{$slide->url}' alt='{$image->alt}' width='{$slide->width}' height='{$slide->height}' />"; echo "</li>"; } ?>
    3 points
  4. I think this is probably just a side-effect of this recently introduced core bug: https://github.com/processwire/processwire-issues/issues/979
    2 points
  5. Hallo everyone ? I have just release AdminThemeBoss 0.6.0: Introducing, a refined, more colorfull and streamlined expirience: Added: more colors ? Added: improved notifications ? Added: improved dropdows ⬇️ Added: improved integration with third party modules like ProDrafts, AOS and ASM… ? Under the hood improvements on how settings are saved and applied Fixed: Some minor bugs ??
    2 points
  6. You don't need to mess around gulp etc anymore if you don't wanna. Give https://prepros.io/ a try. After I switched from Mac to Windows, I missed Codekit and Prepros is a good alternative. :) Also runs on Linux (as it's an Electron app).
    2 points
  7. Just replace in FieldtypeSeoMaestro.module.php, line 119: // return null; return $this->wire(new Fieldtypes()); This works for me...
    2 points
  8. I'm using this: https://github.com/dragan1700/site-backup One script creates a ZIP of the entire site, the other creates a DB-dump. They can be also used with Cron, if you just put in the shebang (may vary in your server setup). Since normally I'm not working with huge databases, I didn't do an option to zip the .sql as well, but I might add that later if the need arises.
    2 points
  9. DEPRECATED! I'll release a commercial module "RockGrid" in 2023/2024. If you are interested please write me a PM 🙂 ---------------------------------------- This module is (or will be) the successor of RockGrid. It uses http://tabulator.info/ as grid library that is completely open sourced (MIT, no commercial extensions) and as far as I've seen so far at least as powerful as ag-grid, which RockGrid is using. GOALS: Support various data sources (RockFinder, JS, PHP, SQL) Supported only in PW Backend + Uikit Easy setup of new fields DOCS: Currently the readme is terrible, sorry for that. But you get lots of examples after installing the module! From simple tabulators to more complex ones. INSTALLATION: Just install the main module. RockMarkup is a required dependency. Please also have a look at the RockMarkup examples before jumping into RockTabulator! STATUS: The module is early alpha and can be downloaded from github: https://github.com/BernhardBaumrock/RockTabulator It took me two weeks of rewriting RockMarkup/RockTabulator to get where I am now and I think I'm quite happy with the setup. There might be some breaking changes though in the near future. At the moment the main features that should be working properly are: Data sources: SQL, PHP, JS Sandbox for easy setup Multilang This means basically everything that is possible with Tabulator is also possible with RockTabulator. Though, there are no custom helpers/plugins yet. That's the next step and whoever is willing to help, please give me a shout ? If you have any questions or ideas please let me know ?
    1 point
  10. I've not coded a website in a few years and recently am taking on the task of rebuilding my church website. It's currently on Concrete CMS and of course, I will be redesigning & rebuilding entirely on ? ? ? in the past I had used Gulp to assist in my workflow: minify js, parse SCSS to CSS, and most importantly was the Live Reloading. However the reloading was always buggy and I spent more time trying to fix it than making actual progress ? So today I was searching for alternatives and I came across blisk.io. Currently working on this little project and knowing the live reloading is handled without any scripting on my part is a dream come true.
    1 point
  11. There’s a PW directory and also contact @psy
    1 point
  12. That's great! ? Have you thought about using .webp support to speed the site up even more?
    1 point
  13. Hello Bernhard, hello Horst, many thanks for your hints and the big code chunk sent by Horst. I'm still testing and will update this comment, when I am done or if there are more questions. Thank you very much. ?
    1 point
  14. @cosmo @wbmnfktr I updated module, i tested it with fresh pw 140 dev installation and i see there is problem on https://github.com/trk/Mystique/commit/b16fdba23f508c4901aeed56e71041ad34cf8c8b and removed this function. Let me know if you still have problem ?
    1 point
  15. Not sure if there's a better way but this should work: $wire->addHookAfter("Inputfield::render", function($event) { $field = $event->object; $id = (int)str_replace('repeater_item_', '', $field->name); $page = $this->pages->get($id); });
    1 point
  16. Sorry, I had Use parent's values if empty checked previously and those fields didn't show until I unchecked it. All good now. ?
    1 point
  17. Well, I had it for ages, but only today made a Github repo and thought I could just as well share it. And yes, it's similar because we apparently use the same core class ifsnop :-) It's especially useful if you have to work on a site where you can't quickly create a files-backup as ZIP, nor un-zip easily via control panel (which is standard in Plesk et al). Or if you can't run system commands, because the hosting company doesn't allow it. On some sites, I have it running with a hook and/or PW lazycron. And before any major changes (dev/prod), I just trigger it manually.
    1 point
  18. See here: https://github.com/BernhardBaumrock/tabulator.test/blob/837d509f1ef6816fe3629c163bd66d53c5e39209/site/ready.php#L31-L73 That's exactly doing what you are looking for but also creates a ZIP of the sql (which reduces size drastically). It also comes with a restore script: https://github.com/BernhardBaumrock/tabulator.test/blob/master/site/assets/mysqldump/restore.php This is the first time I'm using it, so it's not well tested and some parts are hardcoded (eg tabulator.sql / tabulator.zip). But it should get you going. I created this because the pw internal dump takes ages to restore ( for @dragan it took several hours? ). My workflow: logout commit changes push changes
    1 point
  19. This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140— https://processwire.com/blog/posts/pw-3.0.140-and-formbuilder-v40/
    1 point
  20. Hi everyone, wireshell currently conflicts with newer versions of symfony/console – to workaround this, you cam use cgr to install wireshell. $ composer global require consolidation/cgr Make sure to add the correct bin directory to your PATH: PATH="$(composer config -g home)/vendor/bin:$PATH" Then add wireshell: $ cgr wireshell/wireshell Reload the console, voila – wireshell again.
    1 point
  21. Hi @Marc Thx for that interesting question! I've pushed a little update so that RockFinder takes a DatabaseQuerySelect object as find() parameter. You can then add your find as a relation to your finder: Relations can be great for options fields or 1:n relationships. In this case we have 1:1 so a join would maybe make more sense (though have in mind that this creates one more row in the main resultset, so if you had 1000 rows that would mean 1000 more data items whereas in the relation it would be only the number of the templates). You can join ANY sql to your initial finder quite easily. First analyze the query and resulting SQL: We need two things: 1) LEFT JOIN the data 2) SELECT the column we need in the base query Voila ?
    1 point
  22. News Update - 3 May 2019 - Part One The little speckled fella has been very busy on the trail. Despite being the smallest of its kind, she has lofty dreams. We've been working on the API and the Products GUI. In the next post, I'll tell you more about the API. Products Features and GUI Though there are a few issues still pending (aren't there always? sigh), I am relatively pleased with the results. Of course, during beta testing we'll received and incorporate feedback as best as we can. Only UI-Kit theme will be officially supported. Multilingual fields if site is multilingual Ajax powered inputs for fast and convenient editing Four types of products Physical product requiring shipping Physical product not requiring shipping (for collection) Digital product Service/Event (etc) products - e.g. Swimming lessons, Consultancy services, Hotel booking, etc Product Classification (ajax powered) by: Type: e.g. Belt, trousers, etc Brand: Puma, Sanyo, whatever (editors can type in or import brand names + planning to support logos) Categories (aka Collections): Multiple categories, e.g. Men, Girls, Hospitality Tags: Multiple tags can be entered, e.g. sale, amazing, etc Product Variants (consists of an Option (e.g. Colour) and an Option Value (e.g. Red) Add zero or n variants as you wish Live preview as you build variants Each created product variant can be enabled/disabled. Devs can then decide to either show that variant as unavailable or not show them at all. That's up to you :-). Apart from classifications, shipping class, inventory policy, weight and dimensions units, title and description (and this latter one may change), almost all product properties will vary by variant if variants are used Product properties include: Images Colour (more on this below) Downloads (centralised and reusable) Price and Compare Price (aka former price) Inventory policy (whether to track or not) Charge taxes SKU (stock keeping unit) Inventory (quantity) Allow back orders (aka overselling) - @note: this can be set per variant. This is useful if one variant can be restocked faster than others Weight Length Width Height Weight Unit (mg, g, kg, oz, lb, t) Dimensions Unit (mm, cm, m, in, ft ) Shipping Class - can be used for product-based shipping if needed (e.g. bulky goods, light, fragile, small items, perishable, etc) Images (more on this below) Downloads (more on this below) Images Multiple images can be added to both a product and its variants (in case its has some). Images add to the product itself can be used with all variants Images added to a variant are tracked/tagged as belonging to only that variant In some cases, it may not make much sense to add different images for similar variants. For instance, a small red hat and a large red hat could probably share the same images. Although we do not currently support specifying an already uploaded image as belonging to a group of variants, this may change in the future Colour Similar to images, can be set at both product and its variants level Colour saved in RGBA format Downloads Also similar to images, can be populated for both both product and/or its variants Multiple files can be added to a product A file designated for 'whole' product will be available to download irrespective which variant of the product was purchased Conversely, a file or files saved for a variant will only be available to the buyer if they buy that variant of the product The above is useful if you want buyers to be able to download different files of the same product. For instance, recently someone needed to sell two versions of a font as part of one product. This is a solution for such cases. TODO List Lots! e.g. default settings for some properties, e.g. weight unit, shop currency, etc. For the frontend, we are creating a rich language-aware API that you can use to build your shop however you want. There will be no rendering of markup (but see first post in this thread about a separate fully functional frontend shop). In the next post, we talk a bit about the API. Before that, here are some screenshots and a video demo (if you can spare some 20 minutes away from watching, er..., cat videos? ?) Screenshots Video Demo Thanks ?
    1 point
  23. RockFinder now supports array-syntax, which makes the code a lot cleaner:
    1 point
  24. Thanks a million, @kongondo ! You pointed me to the right direction. In the end I had to loop through the $all_options as you anticipated. The following works: // get the Select Options Field $field = $fields->get('licences'); // get all the defined options $all_options = $field->type->getOptions($field); foreach($all_options as $licence) { // check 'checked' status $checked = $user->licences->get("id={$licence->id}") ? ' checked': ''; $my_form .= "<label for='$licence->id'> <input name='carnet_de_conducir[]' type='checkbox' id='$licence->id' value='$licence->id' $checked>$licence->title</label>"; } After hours of wasted sleep and overengineered failed attempts, here you come to save the day with this classically elegant and readable PW snippet. I'm so grateful ! Gottta love this forum.
    1 point
  25. @Karl_T I fixed this too but without publishing here. Sorry for this Furthermore I added options for the label etc. In the environments I use it (latest PW) everything works as expected, even single select. I forked now the original module and pushed my latest version on github. https://github.com/kixe/Processwire_FieldType_Templates
    1 point
  26. You can't do that (getUnformatted is method of Page object, tableRow doesn't have that), but you can do: $raw = $page->getUnformatted("draw"); var_dump($raw); But in your case it might be easier just to convert your field into timestamp: $timestamp = strtotime("pretty much any date format");
    1 point
×
×
  • Create New...