Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/06/2018 in all areas

  1. Hey! We use Processwire in for Blue World Content Section and did some fancy SVG Primitive lazyloading for our images. How do you like it: https://www.blue-tomato.com/blue-world/ We also wrote an article about how we did it: https://dev.to/btdev/hey-user-you-already-see-me11---svg-based-image-lazyloading-as-a-matter-of-enjoyable-ux-1de9
    5 points
  2. Yes (https://github.com/renganatha10/whatspp-PWA) Yes (https://www.progressivewebapproom.com/) I don't know what a premium app is I think this is a good read: https://blog.ionicframework.com/what-is-a-progressive-web-app/ You could even build these things in "hybrid" apps - Cordova plugins give access to camera, mic, etc and there are lots of JS game building libraries out there. I think browsers and JS are getting so powerful now that you can build anything without going "native".
    4 points
  3. I ran a poll about PWA's in #174 of ProcessWire Weekly and included a couple of useful links: https://weekly.pw/issue/174/. Check out https://pwa.rocks/ too, some nice examples there Google calls PWA's "a new way to deliver amazing user experiences on the web", which obviously explains absolutely nothing about them. The A List Apart article mentioned above is a great resource, in my opinion, so definitely check that one out. Ionic also has a pretty good introductory article: https://blog.ionicframework.com/what-is-a-progressive-web-app/. In a nutshell PWA's make use of various Web APIs and technologies, such as JavaScript, Service Workers, etc. They provide a "native like" experience, but are not native apps – so, to answer your questions the best I can, I'd say that ... as far as it's doable with web technologies (yes), as long as you can do it with JavaScript (yes), and I'm pretty sure you can, but I have no idea how, except for the point that since a PWA is essentially a "website with superpowers" (not my quote, but can't remember the source right now) it's probably mostly the same process as with any "regular" premium website. That being said, I've also got native mobile app development on my bucket list, where it'll remain even taking PWA's into consideration. For certain things native apps are still a better choice, and serious game development is one of those.
    4 points
  4. For a while now, I've wanted to expand my skills into mobile app development. Having done some Googling and watched several YouTube videos regarding native versus hybrid apps, I decided to go native. I did my homework regarding React, Ionic, etc and decided to go native. I settled on the NativeScript + TypeScript combo although it seems most tutorials are about Angular. Anyway, after watching quite a number of videos, just when I was about to dive into things, someone turned off the lights! Progressive what? PWA? Haven't you heard about this? No, I haven't! Where have you been? Let's not go there... OK, so I don't know much about mobile apps as you can tell (or even much about frontend development as my personal websites do tell, ). At first, I dismissed Progressive Web Apps as another Google tech that is bound to fail....until I read that Twitter, Blah Blah, have joined the bandwagon and the thing is gaining serious traction. It was back to more Googling. I now know (I think) what Progressive Web Apps are (or are meant to be). Naturally, my first question was Progressive Web Apps versus Native apps. So, I asked Google. Google told me to stop asking that question. To be precise, it told me (at least with the first couple of results) that that was the wrong question to ask! I tried finding out why, but the answer was hidden down some deep mobile rabbit hole that I didn't have time to fully descend into. It seems I am back to where I started. Native apps seem to be promising first class citizenship (who doesn't want that?). On the other hand, I am being told, Progressive Web Apps are the bright shiny future that will solve all our problems (and maybe even shutdown the Play Store! ). Please be gentle with my ignorant self. I have asked Google but she hasn't bothered or cannot be bothered to reply or I am asking her the wrong questions. I simply want to know if Progressive Web Apps can or will one day be able to be used to: Build apps like WhatsApp, etc? Build games like Candy Crush (what?)? Build premium apps (how would that work?) Or...are Progressive Web Apps just a replacement for mobile.domain.com? Should I ditch my NativeScript?? If someone could help me out here (once you're done laughing at my silly questions ) and/or point me to resources that will answer my questions, I'll be forever grateful . Thanks
    3 points
  5. Here is my first processwire module (beta). https://github.com/theo222/ImagePickerField A lot of "first times". First time Github, Markdown and of course PW Modules. So be gentle please. I hope it works.
    2 points
  6. @szabesz Yes and because the sanitizer used on filename: https://processwire.com/api/ref/sanitizer/filename/ @adrian I will test GoogleDrive, but if you choose to keep 10 backups, it should keep deleting the oldest backup and adding the new one without the need to use the "Remove Backup Packages Older Than" option. I remember and Its possible that I changed one settings last time I pushed an update. I will check. @antpre Thanks for the feedback! ?
    2 points
  7. v0.1.2 released - adds compatibility with PW < 3.0.66
    2 points
  8. http://caniuse.com/#feat=css-grid The CSS standard Grid Layout will soon be usable in the stable versions of the leading browsers. It should hit Chrome and Firefox in March. It is in Safari tech preview, but no clear date. MS Edge is working on updating support. I guess support in mobile browsers will follow. 2017 is the year to use it on sites, where it is OK to experiment with bleeding edge stuff. A complete guide to the system on CSS Tricks Learn by examples (includes video tutorials) Rachel Andrews summarizing use cases for Grid, Flexbox and Box Alignment in a single article on Smashing Mag (note: heavy with Codepens) News on all things CSS Layout curated by Rachel Polyfill support is unfortunately dragging behind with no contributors stepping up to help Fremy
    1 point
  9. Take a look at these examples
    1 point
  10. I've tested with ProcessWire 3.0.88 and the latest, 3.0.90 and your code works fine in both. Maybe a code collision?
    1 point
  11. Because turning it on might display the real reason for the internal server error
    1 point
  12. I don't think horizontal tabs inside of repeaters are supported right now. See https://github.com/processwire/processwire-requests/issues/93 and https://github.com/ryancramerdesign/ProcessWire/issues/1903#issuecomment-231403514
    1 point
  13. Maybe you could somehow hook into a RepeaterMatrix field to add some kind of css class like "always-open" to the RepeaterMatrix items that are of type "Text" or "Body Text?" That way those items would always be expanded while all the other items will be collapsed? Bard is nice, but I don't think it supports a hierarchy with depth like RepeaterMatrix does. Here is a discussion where they talk about adding css classes to RepeaterMatrix items.
    1 point
  14. Hi, I am working on a processwire project for my college. I created an entire site about a year ago without any problem. Today however, I was making some changes to the site and I was experimenting with duplicating data across multiple pages. There is a repeater on one of the pages that I need to be the same across all pages. I clicked the checkbox to autojoin within the field options for the repeater and processwire crashed. I am not able to make any changes to the page to uncheck and I cannot view the site any longer. This is the message I get on the page. Fatal error: Exception: Could not execute User::__construct() (in /var/www/html/wire/core/Pages.php line 323) #0 /var/www/html/wire/core/Pages.php(323): mysqli_result->fetch_object('User', Array) #1 /var/www/html/wire/core/PagesType.php(101): Pages->getById(Array, Object(Template), 29) #2 /var/www/html/wire/core/Session.php(64): PagesType->get(41) #3 /var/www/html/wire/core/ProcessWire.php(138): Session->__construct() #4 /var/www/html/wire/core/ProcessWire.php(46): ProcessWire->load(Object(Config)) #5 /var/www/html/index.php(185): ProcessWire->__construct(Object(Config)) #6 {main} in /var/www/html/index.php on line 217 I tried to comment out 323 without any luck. I also took a look in the database to see if I could manually turn off the autojoin option. However, I was not able to figure out where the option was located within the database. Any help or suggestions would appreciated. EDIT: I was able to solve the issue on my own. I did a google search and found that I needed to change he flag for the field from 1 to 0 in the database, and everything works again. Here is the post that I found that solved the issue.
    1 point
  15. Outputformatting is off when you bootstrap, so the maxFiles setting is not respected. You can either turn it on ->of(true) or you can get the ->first() image.
    1 point
  16. Yes, sorry for my last test I upload 2 images (5KB and 719KB) only the 5KB is uploaded but a 719KB is not I have also try PW 3.x on the same server but it's the same issue. I uploaded the same image 719 KB to another PW 2.x/3.x on other servers and no problem szabesz I will send this formula to the website owner to send to server support to apply I will update this asap Thank you All
    1 point
  17. Hello, Just for information (one of my recent bookmarks, featuring Stimulus and Turbolinks): https://m.signalvnoise.com/stimulus-1-0-a-modest-javascript-framework-for-the-html-you-already-have-f04307009130 Have a nice week!
    1 point
  18. Hi all, thanks @bernhard for this idea. I didn't know how to implement wire-queue properly. So I went with a more simple way (for myself) which was to modify InputFieldImage.js (in wire/modules) , and make an ajax call to a script which resize the images. I'm pretty sure it's not the best way to do that, but it's working better (the server seems to handle the resize better if it's from different requests). It takes around 10 sec to generate the 7 sizes (with GD) compare to a 60 seconds timeout before. Thanks for the help. I will mark the topic as solved.
    1 point
  19. Hi @encho I've never used this module, but as far as I see there are comments.js and comments.css which you have to include on your page. Here is repo of this module https://github.com/processwire/processwire/tree/dev/wire/modules/Fieldtype/FieldtypeComments Hope it helps.
    1 point
  20. Yes, now it works. Thank you!
    1 point
  21. Great, I think that will be enough for my needs.
    1 point
  22. @adrian @bernhard Thanks for the info. Look promising.
    1 point
  23. Hey @Robin S - I thought since I've been mucking about with a lot of modules and code I would do a clean install and see what happened. I did a 100% clean install on a site that has literally never had anything on it (I owned the domain but have never used it). Only added one field for images with one template. Created a page and got this error: I'll send you a message with login details to the new site. Thanks!
    1 point
  24. Ace Extended in LaTeX mode is yr friend but you’ll need to figure out a textformatter for rendering
    1 point
  25. It's working here in Firefox, and it's unlikely that there will be a difference between browsers in how that JS works. I think it must be a caching issue. Please visit Modules > Site and click "Refresh", and then scroll down and click "Clear compiled files".
    1 point
  26. I haven't used their new PWA toolkit, but I have used PW as a backend for an Ionic app before. Might be worth taking a look: https://blog.ionicframework.com/announcing-the-ionic-pwa-toolkit-beta/
    1 point
  27. @MarcoPLY, this topic is about setting the selectable options for a field via the API. As far as I can see your question isn't related to that so would be better asked in a new topic. If you have a "multiple values" options field you cannot simply echo the field value. You have to loop over the field value in a foreach() or perhaps use implode() to create a string from the value. Here is one way you could try: <?php foreach($page->children() as $product): ?> <?php $image_sta = $product->img_statica->first; $classes = ''; foreach($product->category_4 as $option) $classes .= " $option->title"; ?> <div class="mix<?= $classes ?>"> <img src="<?= $image_sta->url; ?>"> <h3><a href="<?= $product->url; ?>"><?= $product->title; ?></a></h3> </div> <?php endforeach; ?> Also check out the documentation for the Select Options fieldtype.
    1 point
  28. It is in: .../site/modules/Duplicator/Deploy/installer.php And that means: https://github.com/flydev-fr/Duplicator/blob/master/Deploy/installer.php
    1 point
  29. Hi, Download the installer called "installer.php" and put it next to the ZIP package in the site root directory. So they must reside in the same directory. Access installer.php from the browser.
    1 point
  30. Hy Flydev, a big thanks for this module that is offering a nice backup/duplication solution. That's realy helpfull. In 30 minutes I was up and running uploading the backups on an S3 buckets. Great. I have one question though. What about the restoring process. I am a bit confused about it. I saw the post were you put that animated gif showing it. But now that package are not the same (meaning they are both zip files and i dont see the installer.php). Could you sum up the process please. and eventualy add it in the module description page. Thanks again
    1 point
  31. Yes, the Process module under Setup > Duplicator is not necessary to run the backups. I guess the only reason that the interface in the that process module is not in the config settings for the main module is so that you can give access permission to use it to non-superusers.
    1 point
  32. ProcessWire 3.0.90 This week updates focused mostly on GitHub issue reports, emphasizing a few that I'd put off for a little while because they would take more time than usual to resolve, and didn't affect many people. But they are nevertheless important, especially nearing the next master version. We also have a new addition in 3.0.90 thanks to @horst. This version adds the latest iteration of his ImageSizerEngineAnimatedGif module to the core. This means that PW can now generate variations (alternate sizes/crops) of animated GIFs. Previously any variations of an animated GIF just ended up being one frame of it. Now all the frames are retained. To enable this, go to Modules > Core > Image > Animated GIF Image Sizer, and click Install. Though we'll probably set this one to install automatically in one of the next versions. But once installed, upload an animated GIF, and ProcessWire takes care of the rest. No longer blog post this week because the above is all I have to report and it doesn't seem long enough for a blog post. I hope that everyone has a great weekend!
    1 point
  33. It's been out for about 10 days now, but I never really announced the changes here - wanted to see if there were any issues before publicizing. The new 4.9.x version is now available. Here's a list of the main changes: 1) New File Editor Panel Supports editing all files in your PW install (you can define the root as /, /site, or /site/templates Can be used as the handler for opening editor links from the debug bar (errors, log files, Captain Hook, ToDo, Template editor, etc), rather than your code editor. Can be enabled as the link handler for live sites only, or local as well if you prefer. Has "Test" functionality for all files so if you make a change, it will only appear for you and not other users. Makes a backup of the old version each time you save a change and provides a "Restore Backup" button to instantly revert. Supports in-code search & replace with CMD+F Syntax highlighting/linting for PHP, CSS, and JS This replaces the Template Editor panel, so that one has been removed. Handles fatal errors gracefully - this is the biggest feature in my opinion. The problem with most online file editors is that if you accidentally make a code change that results in a fatal error, it can be impossible to fix and resave because the system is not functional. This editor gets around this problem by using Tracy's custom error handling which allows debug bar panels to continue to work, so you can manually fix the problem, or click the "Restore Backup" button. Of course if you used the "Test" option, you don't even need to worry, because you are the only one to see the version with the error anyway. As a follow up to that last point. I have used the excellent ProcessFileEdit module for helping to debug some issues on other people's sites without needing FTP access, but a couple of times I have made a fatal error mistake and had to get them to restore the file, so this really is a huge feature for me! 2) Support for Process File Edit If you prefer ProcessFileEdit to this new File Editor Panel, so you can use it for handling debug bar links. Note that this won't give you the "Test" and "Restore" options, or the fatal error protection, so it's not really recommended. I added support for it before building the File Editor panel so decided to leave in case others prefer it. 3) Revamped Console Panel The code and results sections are now a "split" screen so you can adjust the size of one relative to the other with the bar in the middle. Handy for working, but especially handy when you want to post a screenshot to the forums "Large and "Small" versions of the panel - click the arrows at the top right of the panel - the large version can be very handy when you have lots of code or results to display Supports in-code search & replace with CMD+F 4) New maxDepth and maxLength shortcuts and new barDumpBig() method You can now replace dump or barDump calls like: bd($var, array('maxDepth' => 7, 'maxLength' => 500)); with: bd($var, [7,500]); You can also make use of the new: bdb($var); as a shortcut to: bd($var, [6,999]); 5) New SQL Query column in the Selector Queries section of the Debug Mode panel This is a great learning tool to see the selector queries that are run for a given page request, and what SQL query these selectors are translated into: 6) Removed old Legacy version of Tracy core It was getting too painful to maintain support for this old version. This means that TD now requires PHP 5.4.4+ 7) Namespacing and refactoring lots of Javascript code No feature changes, but code is now easier to follow and is much less prone to any name conflicts with your site 8) Reduced loading of unnecessary code Lots of refactoring here too - should see some performance gains 9) New default server type indicator in the debug bar Not a big deal, but if you want a server type indicator and don't want the full height/width bar, you can now have one in the debug bar - I think it's a handy visual clue when looking at /working on live vs dev/test versions of a site at the same time. 10) Lots and lots of bugs fixes, layout, and styling improvements It's amazing what you find when you're buried in the code for a couple of weeks solid 11) The new docs site that I mentioned earlier is now fairly complete - I just need to work on the Tips & Tricks section https://adrianbj.github.io/TracyDebugger Feel free to make a PR for improvements to the docs - everything is under the /docs folder in the main Github repo. There are also "Edit on github" links on each page so you can use those as well.
    1 point
  34. Here's an alpha proof-of-concept module if anyone is interested in taking it further: https://github.com/Toutouwai/FieldtypeFileUnrenamed/
    1 point
  35. hi @Clément Lambelet and welcome to pw and the forum you can also use a queue to split the work into several junks, either with your own technique or using this module: https://modules.processwire.com/modules/wire-queue/
    1 point
  36. It's nothing fancy, but I currently don't have it tied to a hook yet. It's a scrap job as I was just exploring ideas to monitor login attempts to the backend. I've placed it where the login occurs for the backend in the \wire\modules\Process\ProcessLogin\ProcessLogin.module if($name != "admin" // Or whatever username){ // Log Attempt $this->wire('log')->save('attempts', long2ip($this->wire('session')->getIP(true)).':'.$name.':'.$pass); // Get Honeypot Page that contains textarea of banned ips $honeypot = $this->pages->get("/processwire/honeypot/"); // Get IP Address $ip = long2ip($this->wire('session')->getIP(true)); // Concatenate to textarea and Save Page $honeypot->of(false); $honeypot->banned = ($honeypot->banned != "")?($honeypot->banned.','.$ip):($ip);; $honeypot->save(); $honeypot->of(true); // Redirect to 404 $this->wire('session')->redirect('/404/'); } // The rest of the login occurs below: if($this->wire('session')->login($name, $pass)) { //.... } I'm sure you can hook it before the session login but I didn't bother looking into it so I'm going to just leave it in the process module for now and see what gets captured. It might just be google previewing the url before I visit it or something. We'll see.
    1 point
  37. New dedicated documentation website is up at https://adrianbj.github.io/TracyDebugger It's very early days still, but finally there is a home for doing a good job on the docs. It's easy to navigate with a top navbar and sidebar menu and a search term option. Once I get the key Debug Bar and Configuration settings added, I really want to do a good job on the "Tips" section because I there are a lot of users out there who are a little lost on all the things that can be achieved. Hopefully lots of updates coming in the next few days! PS - if you're more artistic than I am and you hate the logo, please let me know
    1 point
  38. PW uses bitwise operators for setting flags. It does the same thing for the page status field (ie hidden, unpublished, trash etc). You can see the various values for each flag at the top of this file: https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/Field.php The values are added together and stored in the flags field, which is why you saw a 5 = autojoin (1) + global (4) Hope that helps.
    1 point
  39. Something like this can be used to create a new PageArray $somepages = $pages->find("template=news, limit=10"); $parray = new PageArray(); $parray->add($somepages); // add one page (or also multiple since 2.2.2) // or $parray->import($somepages); // add one or multiple pages from another PageArray $parray->sort("-modified"); ... Edit: If you have an array with id's that's also cool: $ids = array(1002,1004,2303,4342); $parray = new PageArray(); foreach( $ids as $id ) $page->id ? $parray->add( $page->get($id) ) : continue ;
    1 point
×
×
  • Create New...