Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/17/2019 in all areas

  1. Hi all, Stumbled upon this recently: https://frontendmasters.com/books/front-end-handbook/2019/ ( https://github.com/FrontendMasters/front-end-handbook-2019 ) Quote: "This is a guide that anyone could use to learn about the practice of front-end development. It broadly outlines and discusses the practice of front-end engineering: how to learn it and what tools are used when practicing it in 2019. It is specifically written with the intention of being a professional resource for potential and currently practicing front-end developers to equip themselves with learning materials and development tools. Secondarily, it can be used by managers, CTOs, instructors, and head hunters to gain insights into the practice of front-end development." Plenty to explore! I've warned you ?
    8 points
  2. Hi everyone, a year ago we had put online a first version of our website, which didn't satisfy me much and had several bugs. This year I started working on a complete restyling, both in terms of functionality and graphic. I am very happy with the result obtained. Finally, last week we put this version online that I am proud to show you! Site EU: https://www.playwood.it/ Site USA: https://www.us.playwood.it/ It is an eCommerce for a small StartUp, the PlayWood, based in Reggio Emilia, Italy. The site is multilingual, has two areas of purchase and has two levels of registration. Redirectory based on the source IP for the USA customer and preferred language in the browser for the others countries. It has systems for use registration and sending emails dependent on specific actions, like: registration, purchase, request for quotes, information request, etc. Through the API the site communicates with external platforms such as the management software, Mailchimp and other systems to support marketing and company operations. The site is constantly evolving, in the future we intend to add new features. The site was created with these modules: Padloper Login/register Media Library ProCache PayPal Checkout Subscribe to Mailchimp Tracy Debugger Cookie Management Banner Continent and country names ImagePicker Field Map Marker External libraries: Spectre, scss framework Swiper slideshow verlok/lazyload fancybox Creating this site with ProcessWire represented a moment of strong professional growth. When I started I had little knowledge of some types of language, but Processwire and its APIs give me the ability to easily build pages, manipulate data and integrate any external library easily. Thus, I was able to deepen my knowledge more and more. So I wanted to thank the creators of the cms, who keeps it and who implements it, obviously all the people in the forum for the help they gave me, was very important. Thank you!
    4 points
  3. To me site profiles are startpoints. I see it as bundle of dummy/base content + the necessary modules for letting the site work in its installed form. For keeping the profile itself up to date for future installs I‘d probably use git submodules, but distribute it as plain zip with everything in it (iirc github does that for the zip download). When things in a site should be managed after the initial installation as well I think it should be done by a module (can be installed by the profile as well). The module can handle all the necessary changes to content on update and has ways to setup dependencies to other modules. Sadly we‘re currently in a weird middle state of having kinda integrated composer, but also really just using is as a parallel universe, which means you either use composers dependency resolution or processwire‘s, which to me means skipping conposer is currently the better way if broad adoption is the goal.
    3 points
  4. So would caching be an (easy) option? At the moment this is how RockGrid works: It makes one query to get one row (so the query should have limit=0,1) so that it knows which columns to setup for the grid. Then the second request is to get all data (and this is also used for all subsequent requests when reloading the grid). This is not the best solution, but I have no plans to change that for RockGrid. I start working on RockTabulator today where it will load all the data at the first request and display it instantly ?
    3 points
  5. $fields->get("priduct_sku")->type
    2 points
  6. Just had a glance. German umlauts seem to not work:
    2 points
  7. Tasker is a module to handle and execute long-running jobs in Processwire. It provides a simple API to create tasks (stored as PW pages), to set and query their state (Active, Waiting, Suspended etc.), and to execute them via Cron, LazyCron or HTTP calls. Creating a task $task = wire('modules')->Tasker->createTask($class, $method, $page, 'Task title', $arguments); where $class and $method specify the function that performs the job, $page is the task's parent page and $arguments provide optional configuration for the task. Executing a task You need to activate a task first wire('modules')->Tasker->activateTask($task); then Tasker will automatically execute it using one of its schedulers: Unix cron, LazyCron or TaskerAdmin's REST API + JS client. Getting the job done Your method that performs the task looks like public function longTask($page, &$taskData, $params) { ... } where $taskData is a persistent storage and $params are run-time options for the task. Monitoring progress, management The TaskerAdmin module provides a Javascript-based front-end to list tasks, to change their state and to monitor their progress (using a JQuery progressbar and a debug log area). It also allows the on-line execution of tasks using periodic HTTP calls performed by Javascript. Monitoring task progress (and log messages if debug mode is active) Task data and log Detailed info (setup, task dependencies, time limits, REST API etc.) and examples can be found on GitHub. This is my first public PW module. I'm sure it needs improvement
    1 point
  8. I know from a trusted source that some of you use Laragon as their prefered Windows DEV solution. Due to a recent conversation I noticed that there might be a nice little feature some of you may not know about. Laragon offers the Quick app option with some tools already predefined. In order to have ProcessWire there as well you just have to add one (two with a comment) line to your Laragon configuration. # ProcessWire ProcessWire=composer create-project processwire/processwire %s Just in case you want to start your next project a little bit faster.
    1 point
  9. In the case of order numbers - for example - it is common not to start counting form 0 and not to increment by 1. This is a practice to make it harder for the customer to realize that a brand new webshop has just started selling... So as the comment says: @param int $change (optional) The amount to change the counter by. Must be non-zero integer. Defaults to 1. @param null|int $min (optional) If specified, the returned value will be greater or equal to this value. "If specified, the returned value will be greater or equal to this value." actually means: initial starting value.
    1 point
  10. If it's worth making the update, there is a new class PageNames with methods for this purpose. https://processwire.com/blog/posts/pw-3.0.111/
    1 point
  11. You could do the following in your template to delete pages: $jobs = $pages->find("template=your-template, parent.name=expired-jobs"); foreach($jobs as $job) { //$job->trash(); this will trash the page $job->delete(); } How are you currently creating the jobs? Are you creating them from a front end form and using the api to create the new page?
    1 point
  12. Thanks Benjamin! What you're saying makes sense, and I've also come to terms with the fact that the contents of the site profile itself (mainly what's within the templates directory) won't be easily updated. They are, after all, intended to be modified, and as such "updating" them doesn't make a whole lot of sense. I do also agree that we're in a bit of a strange place right now: on one hand there are native (to ProcessWire) ways to handle things like dependencies, but on the other hand we've also got certain level of built-in support for Composer. That's not necessarily a bad thing, though: just for an example, folks have been doing stuff like installing modules from within the Admin for quite some time now, while I still haven't enabled that on any of the sites I've built – and won't, unless it's for a site that someone else is going to manage. First of all I prefer not to give the site easy write access to executable code (security), and second of all I've had some trouble making that work with my version control and deployment practices. (There are other reasons too, but those have always been my "top two".) The way I see it, the tools and practices I prefer are quite likely not what the "mainstream user" prefers – and I'm OK with that. Same goes for the dependency management: in my case I'm thinking that whatever solution is used should be reliable, easy (comparatively: running a few commands from command-line is easy), automatable, and compatible with different workflows (including things like CI/CD tools). The fact that ProcessWire caters for these tools just as it does for the built-in alternatives is a strength in my books. Anyway, I guess this once again boils down to the rather well established point that there's more than one way to do it ? -- Sidenote: to my best knowledge GitHub download feature actually doesn't include submodules, so the only way to have everything as an easily downloaded package is to bundle it all together. This is part of the reason why I don't (currently) think that submodules are worth the hassle.
    1 point
  13. I'm struggling to understand this a bit. In the call to next(), what are 10 and 5000? And are the second and third arguments optional or required?
    1 point
  14. Exactly. And just to clarify: $page->field_name returns a value stored in the field, not a field object, so that's why you can't check the type of the field that way ?
    1 point
  15. Nice website done @MarcoPLY . The trad in french still show some menu in English. Another issue with the trad is the core phrase from the InputfieldPassword.
    1 point
  16. Same experience I got when I wanted to try it on mobile. I thought that was because it was too new when I tried first ?
    1 point
  17. Thanks @horst and @Robin S for the input! Those are some valuable insights right there. I do have to agree that #1 would be beneficial for the widest possible audience. As you pointed out, Robin, this is likely still the best approach for most site profiles out there, simply because it's the only solution that works right out of the box. Anything else would require either the use of somewhat developer-oriented tools (such as Git or Composer) or a totally different approach (ProcessWire Kickstart) – and as such would be a potential turn-off for some users. This is just me thinking out loud, but if site profiles were able to provide a list of dependencies that ProcessWire could then satisfy (or tell the user to handle manually if it couldn't), that could be nice. Or perhaps ProcessWire should provide some sort of built-in support for "recipes"... ? Anyway, in my case the site profile I'm working on is going to be rather developer-oriented, so if Composer is enough to scare someone away – well, that's probably for the best. Basically what Horst said above: it depends on the target group, and in this case my target group are developers, so going with a set of tools that are anyway considered essential in the business isn't necessarily a bad thing. I could also go with Kickstarter, but since I'm trying to reach for the "serious developer" territory here, I think using industry-wide best practices is actually going to be a benefit in itself ? (And yes, I'm currently leaning towards Composer approach. Though please let me know if you have better ideas – I'm all ears!)
    1 point
  18. @thibaultvdb In the module settings there is an input for "API Endpoint" — can you try to change the value there to "localhost/api" and report back if this works for you?
    1 point
  19. 1 point
  20. hey @schwarzdesign, so pleased to see you finally found your way to processwire! awesome work i enjoy frequently on my mobile.
    1 point
  21. I forgot to write some update here. We made some minor and one major release since 1.0.0 with this changes: fix some log warnings from some Repeater fields Module can now be installed via composer Add support for $config->elasticsearchFeederConnectionOverride Better support of own hosted ElasticSearch Servers Use of PW 3.0.133's new $page->meta() feature instead of creating a fields for indexed pages CI Tests via circleci.com and peridot-php Current Version is 1.2.0 and since we use $page-meta() the module requires now PW 3.0.133 And a live production demo will follow the next 1-2 weeks.
    1 point
  22. Done, thanks for the hint! ? I was thinking that ProcessWire would update this information regularly? ?
    1 point
  23. UPDATE 2019-06-15 The taxes repeater field in module config editor was updated: changed to a grid view for more flexibility added field validation prepared the taxes-repeater field code to become a standalone flexible Inputfield module for general use (Array/JSON repeater input field which stores its values in a single text field) The taxes handling is completed! SnipWire now acts as a full flexible taxes-provider for Snipcart (we use Webhooks for this). No configuration needed in Snipcart dashboard. SnipCart orders are now fully working (except shipping handling). The sample shop templates got an update: customer login/logout customer dashboard link/button to view orders history and subscriptions editing of customer profile Other updates and fixes: The SnipWire Dashboard was updated (Charts, Orders, Customers, ...) --> see screenshot below. The Dashboard fetches its data from Snipcart via CURL multi - the response time for a fresh load is now under 2 seconds The Webhooks handler now supports all Snipcart events via hookable methods. Snipwire now supports all major Admin themes (Uikit, Reno and Default) All module classes/files are more structured (e.g. separate helper and service classes) Under the hood many bugs are fixed and code is updated to prevent unexpected errors. Added a crispy SVG logo for all SnipCart back-end pages ? Screen-recording of updated taxes-repeater: Screenshot of SnipWire Dashboard:
    1 point
  24. Googlebot is clever these days. JS-content is no problem for indexing anymore (React, Angular, Vue etc.). Meta tags and page titles are adjusted for every page-view (something a lot of developers simply forget when building SPAs). Of course, you could always improve SEO, e.g. creating a sitemap.xml... https://www.smashingmagazine.com/2019/05/vue-js-seo-reactive-websites-search-engines-bots/ ^ a good read about the subject
    1 point
  25. Congrats, looks amazing and performs super fast. Just a short question. Did you have any concerns about SEO impact since everything is done through VUE and there is no real source coude there?
    1 point
  26. Well, you would first check if the IMDB fields (content) is identical to your already existing page content / fields. If not, skip the update. If one or more fields don't have matching values, update the PW page field(s) that have changed.
    1 point
  27. If i'm not missing any detail, you can just call this in you if clause: https://processwire.com/api/ref/page/delete/ if($exists->id) { echo $exists->delete(); } else { ... }
    1 point
  28. For the last couple months, I've been working on a module that does exactly this. It's not a site profile, it's not a theme. I don't know what term would accurately describe it, but its a ProcessWire module that's an opinionated, update-able starting point, oriented towards developers, and brings in a bunch of boilerplate like: an installer that will create fields, templates, pages, hannacodes; it runs through a thorough check before doing anything that may result in an error (module installation errors are aggravating; i'm testing it very thoroughly) the installer will rename your 'templates' dir to something temporary, and then copy a starting 'templates' folder that's prepped for the module (you should only do this on dev) if you try to add it to an existing site with a bunch of data, it will work as long as there are not collisions in some fields and templates; if there are, the module won't install and tell you what you need to change around to allow it to install establishes some new $config variables ('env', 'disableTemplateCache', a few others) built with UIkit 3 in mind, but not hardcoded to it a menu builder based on Repeaters with its own Process Module has its own seo+og+twitter+sitemap metadata fields and uses Profields FieldGroup since that is the best module for handling such a grouping has it's own templates inside the module which can be used, or overridden in /site/templates/; this includes blog sitemap.xml maintenance search in addition to template files being able to be overridden, partial files can be overridden too! some module configuration fields (site_name, maintenance, etc.) the module has documentation and other statistics built into it for easy reference takes full advantage of setting() and markup regions; applies attributes like UIkit 'uk-grid' and other data attributes without "touching" the html; keeps the module flexible and easily allows you to rip out UIkit and swap it for another CSS framework (Bootstrap 4); you'll never need to touch edit the _main.php file because of how regions has been set up has it's on RepeaterMatrix fields with boilerplate matrix-types (headline, text, slideshow, etc. etc.); if the user makes new custom matrix types and a later version of my module brings in a new matrix-type, it will update the RepeaterMatrix field and merge it correctly (tricky to do!); the matrix types use many of the same base fields, thereby allowing you to switch from one matrix type to another without data being destroyed (this was only possible as of 2 weeks ago with the new matrix update) to avoid creating a bunch of 1-off fields for the matrix field for block configuration, it uses the new and quite amazing Mystique fieldtype in a unique way (this was tricky to do); this module is critical to establishing a page-builder that is clean (this was only possible as of April 2019 since the module is brand new) brings in PW's debugger to the frontend (brings in jQuery UI); can be disabled all field and template names don't use any prefixes; this would allow you to dump the module one day in the future if you don't like it, without having a bunch of field and template names that sound too specific to the module Laravel Mix based asset compiler pre-configured with UIkit works with FormBuilder and other modules I often use; works and may require certain Pro modules; eliminates the need for any modules that do blogging, menu building, sitemap, maintenance or seo since this module does it using native ProcessWire login/logout/account/register templates it may include a 'collection' generator for common things like events, products, people, properties, along with some templates for those. don't like the templates my module provides? then just create your own template file in /site/templates/the-template-file.php which will override /site/modules/my-module-name/templates/the-template-file.php Right now I just started building a few sites with it (spent the last 2 months developing it) which will hammer it out further. I will release it late summer, early fall.
    1 point
  29. I did try this and it did not work, because getById returns a PageArray, not a Page object in spite of the get part in the method name. Using something like first() on the returned result seems to give you the cashed (changed) version of the page. But there is a getOne option that managed to do the trick. So I could only get it to work like this: $oldPage = $this->wire('pages')->getById($page->id, array( 'cache' => false, // don't let it write to cache 'getFromCache' => false, // don't let it read from cache 'getOne' => true, // return a Page instead of a PageArray ));
    1 point
  30. Same error here, after update from 2.4 client has reported problems with image uploads. These are images straight from their mobile phones (Lumia 830) and earlier (PW 2.4) uploading that kind of images has worked nicely. Error in question is: kuva1.0x100.jpg - not a recognized image Clicking the broken thumbnail does show the full image. Memory limit is already 256 and the image is rather small one (554 kb). Opening the image in Photoshop => save for web => reuploading => thumbnail creates just fine. I have the original file available, if someone wants to take a look?
    1 point
  31. Not tested but something simular would work I guess $this->addHookAfter('Pages::saveReady', $this, 'hookPagesSave'); public function hookPagesSave(HookEvent $event) { // Modified page, already contains changes in memory, not yet in DB $page = $event->arguments('page'); // If there is a change in your field if ($page->isChanged('name_of_you_field')) { // Page as it is in the DB $oldPage = $this->pages->get($page->id); // ... Now you could do your comparison old <-> new. } }
    1 point
×
×
  • Create New...