Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/28/2021 in all areas

  1. The core dev branch commits this week continue to work on feature requests, and the plan is that the version in progress (3.0.173) is and will be focused entirely on added feature requests. While a few requested small features have been committed to the dev branch this week, there are also still two more in progress that aren't quite ready to commit, so those will likely be in next week's commits. Once they are in place, we'll also bump the version to 3.0.173. Following that, I'd like to have 3.0.174 focused on resolutions from the processwire-issues repo, and 3.0.175 focus on PRs. That's the plan for now anyway. It might be a good rotation to keep going. In the next couple of weeks I'm also likely to wrap up the client project that's kept me pretty busy recently, though it's all been ProcessWire-related and fun work thankfully. If you've also been busy building new sites in ProcessWire any time recently, please add them to our sites directory if you get a chance. I hope you all have had a great week and likewise have a great weekend!
    3 points
  2. Looks fine to me ? Hi @wwwouter, welcome to the forums. To your question about generating a dynamic CSS file via PHP, I would do it like this: 1) create a php file for example called "dyncss.php" and copy it under site/templates/ (look that it starts with a namespace signature "<?php namespace ProcessWire;" 2) in pw admin under setup > templates > addNew create a new template and select dyncss as its template file 3) in your site/config.php create a appropriate content header for css files, according to the advice "To add more content types see contentTypes in /wire/config.php (and add them in /site/config.php)." // in site/config.php merge our custom types into the existing core ones $config->contentTypes = array_merge($config->contentTypes, array( 'css' => 'text/css' ) ); 4) now open the template in backend under setup > templates > dyncss and adjust some settings: a) under family tab set "no, may not have children" and for example "can be used for new pages = one", if you only want to have one unique page of this type b) under the files tab disable the compiler, under content type select css, and if you use delayed output with prepend and append files you have to disable this here for this content type c) adjust others as you may like or need and save and close the template 5) create a page in your page tree that has this template, give the page a page name that you want to call as url for your dynamic css file for example "mycss" 6) put all your php/css magic into the php file under site/templates and add the URL of your generated page where ever you need it in your generated html If you later on want to use more than one dynamic css file, you can decide to allow more than one page with that template, or go the root with url-segments and a single page what I would prefer. But first I hope this can be a good starting point to get you going. If questions arise, come back here into this thread again and ask. ? Happy exploring and coding.
    2 points
  3. SnipWire integrates the Snipcart dashboard into your ProcessWire backend SnipWire installs all necessary fields for setting up your products editor (> 22 different fields) it automatically generates the necessary Snipcart anchor markup based on those fields SnipWire provides an easy way to integrate the Snipcart shopping cart into your project (including cart button, customer profile, login, logout, ...) provides sample templates to setup your online shop. handles and calculates all of the different VAT handlings worldwide handles multi currency process refunds right from your ProcessWire back-end process abandoned carts and send messages to customers right from the ProcessWire back-end provides hookable ProcessWire events for orders, customer registration, ... ... How would you handle the custom data attributes markup without an engine generating it? If you only have a handful products this might be possible by writing the markup by hand but if your client should be able to manage a shop, SnipWire is the best way to do it. As a sample - how would you do this manually? <button class="snipcart-add-item uk-button uk-button-primary" title="Add to cart" aria-label="Add item to cart" data-item-name="Festish Wet Warmer" data-item-id="1713" data-item-price='{"usd":"22.20","eur":"19.90"}' data-item-url="http://domain.com/snipcart-shop/festish-wet-warmer/" data-item-description="A short product description..." data-item-image="http://domain.com/site/assets/files/1713/beer2.65x65-hidpi.jpg" data-item-categories="Beer" data-item-metadata='{"id":1713,"created":1563363120,"modified":1580402487,"published":1563363120,"created_users_id":41,"modified_users_id":41}' data-item-quantity="1" data-item-quantity-step="1" data-item-stackable="true" data-item-taxable="true" data-item-taxes="10% VAT" data-item-has-taxes-included="true" data-item-shippable="true"> <span uk-icon="icon: cart"></span> Add to cart </button> I probably don’t get your message, but as an experienced developer you should get the benefit.
    2 points
  4. Thanks for all your work on the community requests. I would recommend to close issues/requests instead of adding the completed label for them (or does this label has some automation behind it?). The advantage of this is, that the list of issues get smaller and the issuer knows that the issue/request is fixed. Are you waiting for feedback for "completed" requests? If not, it's just fine to close the issue. If the OP has something to add he can still add a comment or reopen the issue. But thanks again for your efforts on this. I really feel like involving the community more, like you do now, can take take ProcessWire to new heights and make it even more one of the best CMS out there. Keep up the good work.
    2 points
  5. Hi @adrian ? first, many thanks for your module ! it help me a lot. Unfortunately, I'm facing with a bug/problem. I have a store pages with a mapMArker field, all fine when I export, the data are well inside de CSV but when I try to import this CSV the mapMarker field is not filled ans display the default value. Any idea ? Thanks Note: I created a hook function (Pages::saveReady) who copy/paste address in the address field of the mapMarker and use your module to resave all entries and then all is fine
    1 point
  6. Hi Tobias, welcome to the forum! Sorry, I have no answer for you, but I can just tell you that I've never had any problems using $page->trash() in any of my projects. So your tricky part should really not be tricky at all ? Maybe there's something else going on...
    1 point
  7. I don't understand your question. Examples are always a good idea ?
    1 point
  8. PRs to the readme always welcome! Agreed. I've mentioned that I'd vote for an API first approach. Build UI for beginners, but building it upon a solid API (something similar to RockMigrations) so that experts can just as easily (or even easier) use that tools for automation or advanced needs. PW goes that route very often. I hope that one day migrations adopt that approach as well.
    1 point
  9. Good day, @ryan! I'm in! As for now I always used Repeater Matrix for content builders as @Jonathan Lahijani, my first approach would be to develop additional features on that side first. So lots of us already using this pro module could do it even better. I started a topic in Repeater Matrix forum to gather wishes you could help us with. Everyone else interested, please contribute!
    1 point
  10. Long time no post. Here's my latest: https://maisliberdade.pt/ Mais Liberdade is a liberal think-tank in Portugal, promoting the values of liberal-democracy, individual freedom and free market economy. It's a non profit that gathers collaboration from people from multiple portuguese political parties, members of the european parliament, economists, professors, etc. During development, an announcement page was set up with a registration form for founding members. In that period of about a month, around 200 subscriptions were expected, but in the end we got over 6000 subscribers. This website features essays, events, videos and a free library that, at the time of this post is counting 400 books. The frontend was built using web components (Stencil js). Basic pages are built with a modular approach, I'm attaching a video of how they are created. The approach is a simple repeater with a custom block type selector interface. That selector is basically a modified version of FieldtypeSelectFile. I've hacked that module to expect a PNG to be available for each PHP file in the blocks folder, and modified the input field to generate a button grid after the select. This is lovely to use from the editor's perspective, but it's something to improve for the developer experience, because in the end this is a repeater, that has to contain all fields that each type of block needs, and for each of those fields I have to set it to show only if the blockType field equals X, Y or Z. With a lot of different block types this takes some planning and easily becomes hard to manage, but it's the best approach I found yet and the benefit for the editor's experience is well worth it. covered-compressed.mp4
    1 point
  11. Another quick and easy one ? Place this in /site/templates/admin.php before the require(...) statement: $this->warning('Attention: We have planned maintenance starting 2021/02/11 from 10:00 AM - log out before that date to prevent data loss.');
    1 point
  12. Maybe a file and directories ownership issue since you state that: I am assuming you have also tested with 'small sized' images. I would look into file and directories ownership first. The usual scenario is there is a www-data user and group. ProcessWire would belong to that group and will be able to write to /site/assets/files/. Have a look at this page to troubleshoot permission issues: https://processwire.com/docs/security/file-permissions/ Regarding this: It usually means PHP responded with a fatal (or other) error. If you have $config->debug = true, or better, have TracyDebugger installed, you will see the exact error the server returned. You can also see these in your sites error logs. The text of the the response breaks the JSON (malformed), hence the Unrecognized token.... This is the so-called 418 I'm a teapot response! ?.Basically, the server is saying you are asking it to do the impossible; brew coffee but it is a teapot! You can read more about it here https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418 and how an April Fool's joke turned into this status by reading here https://sitesdoneright.com/blog/2013/03/what-is-418-im-a-teapot-status-code-error .
    1 point
  13. I use AIOM+ and then regular php to manage the array before the AIOM+ is called.. im usually setting the scripts array in the init, like $minifyCSS = true; $minifyJS = true; $stylesheets = array( 'assets/bootstrap/css/bootstrap.min.css', 'assets/css/font-awesome.min.css', 'assets/css/style.css', 'assets/css/custom.css', ); $jsfiles = array( 'assets/js/jquery-2.1.3.min.js', 'assets/js/imagesloaded.pkgd.js', 'assets/js/custom.js', ); in templates i sometimes do this (if styles/scripts need to be before last one, e.g. if last style is custom/override) $jsOffset = -1; $cssOffset = -1; //1.) Event Calendar array_splice($jsfiles, $jsOffset, 0, 'plugins/eventCalendar/js/jquery.event.calendar.js'); array_splice($jsfiles, $jsOffset, 0, 'plugins/eventCalendar/js/languages/jquery.event.calendar.en.js'); array_splice($stylesheets, $cssOffset, 0, 'plugins/eventCalendar/css/jquery.event.calendar.css'); or simple: $jsfiles[] = 'plugins/soundManager/js/soundmanager2-nodebug-jsmin.js'; $jsfiles[] = 'plugins/soundManager/page-player/script/page-player.js'; $stylesheets[] = 'plugins/soundManager/page-player/css/page-player.css'; then outputting: if($minifyCSS == true) { echo "\t" . '<link rel="stylesheet" type="text/css" href="' . AllInOneMinify::CSS($stylesheets) . '" />' . "\n"; } else { foreach($stylesheets as $stylesheet) { echo "\t<link href='{$templates}{$stylesheet}' rel='stylesheet'>\n"; } } // END IF MINIFY this lets you toggle AIOM and good for development and troubleshooting stuff.. i should also clarify that for brevity, i setup a lot of aliases in the init, like: $templates = $config->urls->templates;
    1 point
×
×
  • Create New...