Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/18/2016 in all areas

  1. Module: Auto Smush https://github.com/matjazpotocnik/AutoSmush Optimize/compress images. In Automatic mode images that are uploaded can be automatically optimized. Variations of images that are created on resize/crop and admin thumbnails can also be automatically optimized. In Manual mode "Optimize image" link/button will be present. This allows manual optimization of the individual image or variation. In Bulk mode all images, all variations or both can be optimized in one click. Will process images sitewide. Two optimization "engines" are avaialable. reShmush.it is a free (at the moment) tool that provides an online way to optimize images. This tool is based on several well-known algorithms such as pngquant, jpegoptim, optipng. Image is uploaded to the reSmush.it web server, then optimized image is downloaded. There is a 5 MB file upload limit and no limit on number of uploaded images. "Local tools" is set of executables on the server for optimizing images: optipng, pngquant, pngcrush, pngout, advpng, gifsicle, jpegoptim, jpegtran. Binaries for Windows are provided with this module in windows_binaries folder, copy them somewhere on the PATH environment variable eg. to C:\Windows. Similar modules: JpegOptimImage by Jonathan Dart: https://processwire.com/talk/topic/6667-jpegoptimimage/ TinyPNG Image Compression by Roope: https://github.com/BlowbackDesign/TinyPNG ProcessImageMinimize by conclurer: https://processwire.com/talk/topic/5404-processimageminimize-image-compression-service-commercial/ Forum discusion: https://processwire.com/talk/topic/12111-crowdfunded-tinypng-integration-module/ Module created by Roland Toth (@tpr).
    7 points
  2. This week we've got a new master version 3.0.41 and this post covers what's new. We also take a look at the API Explorer module from the ProDevTools set of modules, which will be released next week. https://processwire.com/blog/posts/processwire-3.0.41-and-a-look-at-api-explorer/
    7 points
  3. Yesterday I got frustrated that it's hard to rename existing link that I looked into ProcessPageEditLink module and pwlink CKEditor plugin and added a "Link text" feature. The modal window doesn't have a field for this that I've added now: Anyone knows why it's missing there? Judging from the code it seems it was intentionally left out.
    5 points
  4. Because we are searching for a turbo boost...
    4 points
  5. It's not compatible with CI3, but I think I know why and I think I know how to fix it Will report, stay tuned.
    3 points
  6. I have submited the Spanish es-ES for ProcessWire 3.0.x 100% Translated, if not, let me know. Pull requests, contributors,... are all welcome. http://modules.processwire.com/modules/pw_spanish/ Enjoy. .a
    3 points
  7. For one site I did this... Created two roles - member and pro-member (pro-member is user with active subscription, with permission to view certain pro-only pages). Added expiry field to user template, as adrian suggested. Users can register for free - they get the basic member role with permission to post comments, limited view permission, etc. If a member purchases a (non-renewing) subscription via PayPal: pro-member role is given to user expiry date is set according the duration they purchased and pro-member role is given to user Daily Lazy Cron job: checks for users with subscription expiring in next three days and emails a reminder to renew subscription removes pro-member role from users with expired subscription
    3 points
  8. You shouldn't get yourself in a situation where you have some children that are part of a menu and some that are part of a PageTable field - it will be a terrible mess. Avoid this by designating an alternate location for storing the pages for the PageTable field - somewhere under a hidden parent, or even under a dedicated parent under Admin.
    3 points
  9. ConnectPageFields Allows the connecting of two related Page fields so that changing one updates the other. Purpose of module An example: suppose your website is about movies. You have a template "movie" with Page field "actors". For each movie you add the actors that appear in the movie. All good, but what if you want to find results like... the 10 actors who have appeared in the most movies actors who haven't appeared in any movies since 1990 You cannot retrieve these pages with a single efficient $pages->find() query, and must load a large PageArray into memory in order to iterate or filter it. For the sake of making these types of queries more efficient you could structure your templates/fields so that movies are added to actors instead, but this may be a less comfortable workflow and can run into equivalent problems (e.g. "find the 10 movies with the largest cast"). The solution is to have a two-way relationship so that movie pages have an "actors" Page field and actor pages have a "movies" Page field. This module will keep these two Page fields in sync so that adding "Ryan Gosling" to "Drive" automatically adds "Drive" to "Ryan Gosling". Also, you can select the same Page field in both Page field A and Page field B. For example, create a "Related" Page field for related pages. Choose "Related" for both fields in a pair in the module config. Now when you add "Orange buffoon" to Related for "Donald Trump", "Donald Trump" is automatically added to Related for "Orange buffoon". Usage Install the ConnectPageFields module. If you haven't already done so, create the two Page fields you want to connect and add them to templates. In the module config select the two Page fields in a "Connected field pair" row as Page field A and Page field B. You can add rows as needed using the "Add another row" button. Troubleshooting Make sure you have set the "Selectable Pages" settings for each Page field correctly: The settings for Page field A should allow pages using the template(s) that Page field B has been added to. The settings for Page field B should allow pages using the template(s) that Page field A has been added to. http://modules.processwire.com/modules/connect-page-fields/ https://github.com/Toutouwai/ConnectPageFields Module config: Demo showing how changing one Page field updates the other:
    2 points
  10. A: They're both big in Germany Not a scientific measure for sure, but for forum members who choose to disclose their location Germany seems to be the most common country. I'm curious about why ProcessWire would be especially popular in Germany. Was PW featured in a popular German-language publication or something like that? For German members (or any members actually): how did you first hear about PW?
    2 points
  11. Read this for some insight https://processwire.com/talk/topic/12969-intermediate-template-structure-without-string-concatenation/
    2 points
  12. I just emptied the cache of the AIOM-module and the error disappeared once I visited every single template. Not sure what the problem is...
    2 points
  13. Sounds like a file permissions issue. Make sure the owner and permissions are correct for the /site/ folder and based on that error especially for the /site/assets/cache/FileCompiler/ folder.
    2 points
  14. I don't know about plans. The service is up for quite a time, sure more over a year, but it's not clear who is owner of site. Site is created by French Tech, the collective name for all those working in the French startup market. There is also no privacy policy available, so who knows what happen with your uploaded images. There are other services with "free" plans, but with limitations, like file size (100kB) or number of images (eg. 500 per month). I actually don't like web services, because first you upload the image to your server, then upload to web service and then download it. That's why I use local tools on the server, but that come with a price, cpu & memory usage, but I can aford it, since I'm the sysdamin Auto Smush is somehow different from other modules, since it does not add the method(s) to PageImage, thus you don't have to change your code and also you may uninstall (or disable) the module at any time without code modification in your templates.
    2 points
  15. Agreed Padloper is great if you need to keep it all in PW. There is also FoxyCart - great system, rock solid, flexible, easy to use, and a breeze to implement on Processwire.. (see katonahartcenter.com, ohmspeaker.com for examples)
    2 points
  16. if Padloper doesn't meet your needs, I would go the Shopify Button route.
    2 points
  17. I add it to the ToDo, but may take some time to get done.
    1 point
  18. you could use the wireRenderFile method. all $page properties could be used inside the html // templates/planets.php $content = wireRenderFile('views/planets'); // templates/views/planets.php <html> <body> <?php echo $page->title ?> </body> </html> see https://github.com/NinjasCL/wire-render-pattern
    1 point
  19. Hi @HerTha - thanks for the report. I am having trouble reproducing here at the moment. Any chance you could give me access to the site to test? If not, could you help me figure out why $np is not being set properly. Line 1311 is where that should be happening. Not sure your level of debugging skills, but any chance you could take a look and find out what $np is being set to there. And if nothing, check the $value of $x for me. This shouldn't be hard to fix, but until I can reproduce it might be tricky. Perhaps it also might help if you post your csv import settings.
    1 point
  20. Nice thanks for this great module! Don't have a use right now but I remember that I wished something like that some time ago, will for sure come in handy sooner or later
    1 point
  21. Thanks for all the help... I really have to evaluate this situation better.
    1 point
  22. glad you like it @szabesz Right now I'm not using it productively but I'm planning to use it for a small site, too as it simplifies a lot because you can still fully use processwire/php dynamically
    1 point
  23. 1 point
  24. but he also says; the search goes on, still cant't be found... so something is fishy... btw, the clip is a lot worse than the photo (even thought I have to agree that the photo is indeed horrendous), so so far you are the winner!
    1 point
  25. You say you you are using form-upload.php and form-process.php from Soma, ok, lets simplify a bit the code for our example. Also we are going to create a template and a page. First step: we create a new file form-xml.php in the templates folder and copypasta the following code into this file : Second step: we create another new file _form-process.php in our templates folder (note: the underscore is here to avoid the file being listed as template found) and again we copypasta the following code into this file : Third step: we go in the backend, create a new template and choose (check) form-xml.php from the template found listing. Then we go to the page tree, create a page under root page, give the new page a title and we assign form-xml as template. The final step is to create the folder which hold our XML generated files. I set as arbitrary path - site/assets/XMLFILES - so we go in site/assets and create a folder with the following name: XMLFILES Now we can open our new page in the browser and play with the form generating XML file. Result: <?xml version="1.0"?> <user_profil> <username>root</username> <email>root@foo.bar</email> </user_profil>
    1 point
  26. Sorry for the wrong topic. Yes, my goal is to create a PR, just wanted to know if there's something I should know before. This seems a trivial feature to me, wonder why it was not added so far.
    1 point
  27. If there really is a reason for this, I would seriously question it's sensibility. This should really be changed in the core. Care to create a pull request or feature suggestion at GitHub? Edit: I've just moved this topic to the Wishlist & Roadmap section of the forum. The Modules area is mainly intended for module release / support threads, and while this question is technically related to a module, it's a core module with no support board of it's own.
    1 point
  28. I will post you an example later, i am on mobile right now.
    1 point
  29. Only started it Then came @matjazp and fixed a number of issues, added local tools and so on. I kinda lost interest when I made it work on my sites and do not wanted to invest more time to improve and make it ready for public. So big thanks to matjazp, and hopefully after a few iterations it will be more stable.
    1 point
  30. I went with something relatively tame - a Google image search reveals some truly horrendous pics.
    1 point
  31. Interesting thread and nice picture. Maybe you should make a request for ProcessWire to include more breast hair. In my case, I was introduced to PW by an co-worker who saw, that it won the CMS Critic 2014 Award for Best Free PHP CMS. At this time he was looking for a flexible field based CMS similar to Contao, which we used before. I quickly became a fan, because I only used to know WordPress and enjoyed the freedom I had as an developer + the friendly community. Or like The Hoff used to say:
    1 point
  32. Thank you for clarifying. I never developed a module or tried the Smarty for the TemplateEngineFactory module, so I'm not very helpful. But here are some ways on how to bypass the file compiler. Maybe adding // FileCompiler=0 in your module files will do the trick. Also there is a core module File Compiler Tags which is maybe similar to Smarty. As to your question on how to develop modules using an IDE, the latest blog posts could be interesting for you: https://processwire.com/blog/posts/processwire-3.0.39-core-updates/ https://processwire.com/blog/posts/processwire-3.0.40-core-updates/
    1 point
  33. Should probably be noted that this depends a bit on whether you want to disable their entire account after the subscription is over (in which case you should follow Adrian's suggestion or take a closer look at Login Scheduler) or if you actually prefer to keep the account usable and only deny access to specific pages. In other words, is the subscription an "all-or-nothing thing" or can one user subscribe to different types of content? One solution to the latter need would be storing pairs of users + subscription lengths in a Repeater field attached to the page they are subscribed to. Instead of Repeater you could use a PageTable field – or Table, if you don't mind the commercial aspect of ProFields – and instead of the subscription target you could store said data on the user account. There are many solutions, and the best one depends on your specific needs
    1 point
  34. Add an expiry_date field to the "user" template and then check the user's expiry date against the current date before showing them the page.
    1 point
  35. Hello @floridaDev, if you try to find thousands of pages, have a closer look at the findMany-function. Also can PHP7 boost your performance significantly, if its available for you. Regards, Andreas
    1 point
  36. Welcome @LimeWub, that is what the module compiler is for. If you are using PW 3.x.x it adds the ProcessWire namespace to the module files to make them compatible with PW3. If you don't want to deal with namespaces there is also PW 2.8.x available. But it is only recommended to use for existing projects. For new projects PW 3.x.x is the way to go. If you want to disable the module compiler, you would have to add the namespace in the module files by yourself to resolve the issues you mentioned above. But do you want to debug modules or are you trying to debug your template files? If that is the case, you could try to disable the template compiler in your config or in your templates. Regards, Andreas
    1 point
  37. Your if-statement probably has not worked, because you don't have an input type submit in your form. Instead you have an button with the type submit. Then your original if-statement should work. if ($input->post->submit) { // Form was submitted } else { // Form wasn't submitted } Also I would recommend again to get and sanitize the input from code like mentioned above. Especially if you want to use it as a page name, the corresponding sanitizer is meant for this. You can set a new value for an existing field using the API like this: $p->of(false); // Shortcut for setOutputFormatting(false) $p->set("title", $sanitizer->text($input->post->title)); $p->save();
    1 point
  38. if you remove the two variables ($image and $thumb) + the if statement : if(count($post->blog_thumbnail)) { echo "<img src='{$thumb->url}' alt='{$album->title}' />"; } you should get what you need - your post without thumbnail. Sorry if I misunderstood your question.
    1 point
  39. I don't see where are you declaring $input->post->submit , from the form code, I would say that you need to add to the input inside the form (the one that is type="code") a name attribute which is what is actually passed as a post/get variable. And then you should rather be checking for $input->post->name (or maybe $input->post works?). Also, check your browser's Network log to see if it is actually a POST and not a GET.
    1 point
  40. Nope, if they exist they will be processed.
    1 point
  41. It's fine to use it or not. If a profile doesn't have it, just create it and use as your needs dictate.
    1 point
  42. Hi, in before better answer, check this small thread from yesterday :
    1 point
  43. a simple way of caching (nearly) everything using wirecache and 2 page render hooks in site/ready.php // the next ensures that the following code will only run on front end (otherwise back end would get cached, too which results in problems) // make sure to place anything you need in the backend before this line or change it to your needs.. if ((strpos($page->url, wire('config')->urls->admin) !== false) || ($page->id && $page->is('parent|has_parent=2'))) return; $cacheName = "prefix__$page->id-$page->template-{$user->language->name}"; if ($urlSegment1) $cacheName .= "-$urlSegment1"; if ($urlSegment2) $cacheName .= "-$urlSegment2"; if ($urlSegment3) $cacheName .= "-$urlSegment3"; if ($input->pageNum > 1) $cacheName .= "-page$input->pageNum"; // if already cached exit here printing cached content (only 1 db query) $wire->addHookBefore('Page::render', function() use($cache, $cacheName) { $cached = $cache->get($cacheName); if ($cached) { exit($cached); } }); // not cached so far, continue as usual but save generated content to cache $wire->addHookAfter('Page::render', function($event) use($cache, $cacheName) { $cached = $cache->get($cacheName); if (!$cached) { $cache->save($cacheName, $event->return); } unset($cached); }); of course not the same as a proper flat file cache like procache but at least saving many database queries make sure to adjust the $cacheName as needed, you can even cache query strings, almost everything you'd like and you could wrap everything in a condition to only run if no incoming post or query strings so form submits keep working example if (!count($input->get) && !count($input->post) && !$config->ajax) { // cache logic from above } have fun
    1 point
  44. I was not aware of this section's existence, and since I've submitted a number of sites to the site submission page, I thought it may be good to post them here, too. So, over the past couple of years I've been using ProcessWire, I've had the opportunity to build a decent number of ProcessWire websites. I initially didn't like the idea of using ProcessWire when I was first required to use it, but I soon came regret even thinking that - ProcessWire is now my favourite CMS! Here are some sites where I've been the primary/sole developer (I must say, I did not design these sites, I just turned the designer's visions into reality: PROGRESS: A Creative Agency This is the second iteration of the company I work for's website. it was built to reflect our amended brand identity and scope as an agency. Hilton Extraordinary F&B This website is access only, so you will be unable to see the site in action, however, I have linked to our case study on our website which has some screenshots. Note that the app is being discontinued, since they want a single sign on system. So for one, it just wasn't going to be simple to do the SSO system on the app. And two, the app was kind of pointless anyway, and they just fell for the old "we need an app for that", when a responsive website is just fine for their needs. The Extraordinary F&B site also protects many important static files by restricting access to them, and using Apache X-SendFile to allow access to them when the user is authorised. TY Logistics This website is four a courier company based in the UK. The animating lines was fairly challenging, but I got there in the end. The animating lines work by generating an SVG path string on the fly, using various elements as reference points, setting the stroke-dasharray and stroke-dashoffset to the path length, and then animating stroke-dashoffset to zero. It utilises ScrollMagic for managing the scroll-based animations. Guy Hollaway Architects This website was built for an architects based in London and Hythe, UK. Folkestone Harbour Arm This was created to list events and information about the newly refurbished and converted Harbour Arm in Folkestone, United Kingdom. Unfortunately, there are no events on the site right now, which makes some areas look rather bare. However, there is a screenshot available on the page for this site on the sites directory. Visit Romney Marsh This was a budget-wise project to promote the Romney Marsh in the south-east of England. It features a Google Maps integration for the listing of attractions and accommodation. And has another, very similar map for events on and around the Romney Marsh. Hythe Care Homes This has to be one of the coolest care home websites I've seen! We developed a site for Hythe Care Homes, a care business consisting of three separate homes for old-aged people. More to come soon when I have time. On my lunch break right now, you see.
    1 point
  45. @Pierre-Luc Thank you for your module! Please keep it going. Here are my wishes for the development roadmap. Make it possible to fully customize the markup. Maybe with some kind of template overrides or something. I think there is no need for anything default, rather an easy way to make it your own. Ajax would be a good option. A bit more docs would help. I did experience some bugs when using it with installation having users with multiple templates. It took some time to figure out that I should configure the passwordResetUser field to use multiple templates. And there should be a 1.0.0 version in the module directory, of course. I did check it on 3.x - seems to work fine.
    1 point
  46. @tpr: Hah, - you are more than welcome to contribute in this regard, Mr. AOS!
    1 point
  47. Pretty much anything is possible with PW. Make a start by yourself and if you have any specific problems just ask in the forums.
    1 point
  48. This module comes in handy when you need related pagefields that are dependant on each other. Example: you have a sports team and team members belonging to that team. you need 2 fields: one on the team-page, one on the member-profile. this module keeps both fields in synch. Other examples would be hierarchical company structure or any other kind of membership relation. Demo: settings in this example: Gitlab: https://gitlab.com/baumrock/PagefieldPairs Modules Directory: asap only tested on PW3 and reno theme. Please test it faithfully before using it. please report any issues
    1 point
  49. Hi Stan I just soft launched 3.0 support. There have been some nice additions to order management, but feature wise I am pretty happy where Padloper is currently. I will focus on improving code and documentation. I am avoiding "feature bloat", since I think 99% of webshops build are very simple with few unique aspects. Padloper tries to cover 0% of these unique things out of the box, but making it easy and possible to hook into. So things like discounts, public markup generation etc will never make it into Padloper core. What features you are missing?
    1 point
  50. Ryan, are there any plans to enable import for multi-language fields? Or may be there are other ways to import pages with multi-language fields in PW?
    1 point
×
×
  • Create New...