Leaderboard
Popular Content
Showing content with the highest reputation on 04/27/2020 in all areas
-
Just a quick update to you all know that there is a new keyboard shortcut for reloading a snippet from disk, clearing previous output, and running the code which should be a nice time saver and also prevent you from accidentally running old code in the console that hasn't been updated from the disk version when you are using an external editor. I have also rejigged the execution of code when "Run" is called vs injecting. Hopefully the visual cues of the button changing from "Run" to "Inject" and the status in the header showing "Inject @ Ready" makes it more obvious what is going to happen when. Another update is that the Dumps Recorder panel now stores its data in a file so that it will survive across sessions which may be useful if you are hooking certain session methods and other scenarios where the normal Dumps panel is not showing your bd() calls.2 points
-
2 points
-
Hi everyone, I know we'd all like to see ProcessWire grow in popularity (maybe not hugely, but just enough that more people know about it which can help to convince clients to go with it). It strikes me as strange that the ProcessWire Github repo still has less than 300 stars - I'd like to see us well over a thousand which should be an easy task for the forum members to achieve. I see so many other projects with lots of stars but for some reason it doesn't seem like it is something we tend to do around here, despite being a very active, friendly, and supportive environment. I also think that starring your favorite modules doesn't hurt either - I think that will also help to increase the visibility from PW and also help out module authors a little as well. If you can show your Github project has a decent number of stars it shows that you are building things that people want which can help you land a job and helps you to convince the client that you and ProcessWire are a good mix. Anyway, if you have a minute to do some starring of PW and your favorite modules, hopefully it will benefit us all a little. Thanks!1 point
-
Is my 100th post I wanted to do something special. I edited a video, hope you like it Just for fun Edited: Now with subtitles1 point
-
A bug report was filed a week ago. Ryan will get to it and sort it out, I'm sure. Meanwhile, your choices are: Downgrade your ProcessWire version. Make the manual db column type change if you can live with it. Write a hook to convert the value before it is saved (using a period for decimals) and another hook for display (using comma for decimals) during render. If you really have to (usually not recommended), change the code in the core knowing full well this will be overwritten when you upgrade.1 point
-
@Robin S thank you you are lifesaver - I missed this completely. With the addition to the hook it's working perfectly now!1 point
-
I think this is what you need: https://processwire.com/blog/posts/multi-instance-pw3/1 point
-
You want browsers to reload the CSS any time that it changes, instead of going to the browser cache. Appending a query string to the CSS URL that changes every time the CSS changes is a reliable way to achieve this. You can see an example of this approach in the PW admin, where the file modified timestamp is used in the query string:1 point
-
I see three different approaches for this: You can already build footnotes using superscript, anchors and links inside the CK Editor without any additional programming or plugins. You need to write the footnotes manually (possibly in a seperate CK Editor field if you want to output them in a different place than the main content), create anchors on them, and then link to those anchors from within your text. For the link inside the text you can just use a numbers in superscript. This becomes very tedious to maintain though, especially if you have lots of footnotes. So this only works well for a couple of footnotes here and there. You could do this with Hanna Code, which is very similar to WordPress's shortcodes, only you create shortcuts through the GUI instead of code. One [[ref]] shortcode that gets replaced with a link to the footnotes and collects all footnotes in a global variable, and another [[footnotes]] shortcode that outputs the collected list of footnotes. You can get very fancy with additional parameters for different lists of footnotes etc. Write your own Textformatter module that works in a similar way to the shortcode approach mentioned above. Might be more flexible in the long run, though it's definitely more work than using Hanna Code. You can look at the source code of Hanna Code which you can adapt to your specific use-case. If you want a more current example of a textformatter, take a look at my TextformatterPageTitleLinks module which is written for PHP 7 exclusively. Not completely sure what the script does, but this is something that I would never do in a JavaScript. You can probably do the same thing or something better in CSS with flex or grid.1 point
-
Textformatter module that parses image tags and, maybe according to class names, process and replace them with what you want them to be.1 point
-
It always depends on what you want to do with the system. If you only want to create single pages with text and a blog, then Wordpress might be the right choice. However, if you want to create customized pages with specific functions, tailored to a customer or a project, Wordpress gets very complicated. This is where Processwire can make the most of its advantages: - easily extendable - the edit surfaces are almost perfectly adapted to the pages - high-level flexibility But to use Processwire, you need to know HTML and PHP. But if you want to use Wordpress not only with ready-made themes and modules, you need the same knowledge. In my opinion Processwire is even easier.1 point
-
I am not a web developer pro, but I understand that a (piece of) code or a (programming) concept can be "beautiful". If you make yourself familiar with Processwire, you will find such very often.1 point
-
It would be interesting to know more than "everything crashed" ? Different strokes for different folks. PW is not designed for the same developers as Wordpress. Wordpress works easily to a point, then it's really painful. PW is maybe a little too techie for some folks initially, but has so much more flexibility than WP. So "not user friendly" really depends on who the user is - wouldn't you agree ?1 point
-
Yes, it happened to me too, and twice!! ... but the third time I started to understand ... I'm a graphic designer, but I knew something about php, however you need to understand how PW is going first, if not, you are shooting blindly . When you reach that stage, then you discover how easy it was! I must admit that for me the selection of the names for the components of the system does not help at all in the learning curve. Because we arrives here with names learned elsewhere and here it's not used for the same thing (Pages, Templates, Template files, etc.) For me the new concepts was the most difficult side.1 point
-
Yep, there is a difference between following and choosing a cms. Wordpress is followed, Processwire is chosen. The forum history is your friend. You can find a lot of answers and solved problems for non coders in the forum history.1 point
-
MY OPINION here: While we wait for Padloper v2, using Shopify is the best option. You will pay $29/mo plus the common fees for payment gateways 2.9% + $0.30 per transaction. This includes unlimited "managed" high-speed hosting, several free front-end themes and the easiest to use back-end you can imagine, including statistics, marketing tools, selling on multiple channels (facebook, messenger, instagram, amazon, ebay). Also you can stop your subscription at any time, and jump to Padloper v2 when it's out. But.. if what you want is to use Processwire for content and implement only the shopping cart and the payment gateway inside: Your best option is Shopify.. again. There is a plan for $9/mo that does not include the front-end store, only the admin part in which you can enable the "Buy Button" sales channel and with a small javacript code you have the cart on your website. It's very similar to what Snipcart does, but muuuuch cheaper, because Snipcart charges 2% plus 2.9% of the payment gateway in each order. In my company (we sell Air Conditioners) the AOV is between $2000 - $4000 that total fees represent a maximum of $192 per order, where Snipcart will get $80 for each order. We are in the low season, and today we start the day with 108 orders, make the numbers.. ~$8000 in one day for Snipcart plus the CC fees! I know this also depends on the type of store you have, but my advice --> never EVER go with a solution that charges you a percentage of the sale. PS: Shopify also comes with a very VERY very easy to use API (REST and GraphQL too) ..maybe one day we can have our Shopiwire LOL PPS: None of this is a Shopify affiliate program, it's just a personal experience after a lot of research. https://www.shopify.com/lite1 point
-
Hello all, wasn't sure where to put this, so it goes in General section. Ryan shows a hook that we can use to mirror files on demand from live server to development environment to be up to date with the files on the server without having to download complete site/assets/files folder. I just implemented this but had problems getting files to load from a site in development that is secured with user/password via htaccess. First I tried to use WireHttp setHeader method for basic authentication like this function mirrorFilesfromLiveServer(HookEvent $event) { $config = $event->wire('config'); $file = $event->return; if ($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if (!file_exists($file)) { // download file from source if it doesn't exist here $src = 'http://mydomain.com/site/assets/files/'; $url = str_replace($config->paths->files, $src, $file); $http = new WireHttp(); // basic authentication $u = 'myuser'; $pw = 'mypassword'; $http->setHeader('Authorization: Basic', base64_encode("$u:$pw")); $http->download($url, $file); } } But, unfortunately this didn't work. So now I am using curl to do the download. My hook function now looks like this function mirrorFilesfromLiveServer(HookEvent $event) { $config = $event->wire('config'); $file = $event->return; if ($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if (!file_exists($file)) { // download file from source if it doesn't exist here $src = 'http://mydomain.com/site/assets/files/'; $fp = fopen($file, 'w+'); // init file pointer $url = str_replace($config->paths->files, $src, $file); $u = 'myuser'; $pw = 'mypassword'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 50); // crazy high timeout just in case there are very large files curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, "$u:$pw"); // authentication curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); // authentication curl_setopt($ch, CURLOPT_FILE, $fp); // give curl the file pointer so that it can write to it curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); curl_close($ch); } } Now I can load files and images from the htaccess protected development server ? If anyone knows how to get this to work with WireHttp, please let me know. Thank you.1 point
-
I used Canvas HTML theme which overlaid Bootstrap then added my own customisations which often overrode the Canvas theme CSS which overrode Bootstrap. The code bloat was stupid. Going back to pure SCSS/CSS with smarter use of CSS Grid, Flex & media queries. Can now place things where I want depending on screen size/device without unnecessary HTML for purely structural purposes, eg floated divs etc and much less CSS download. The page file size difference is incredible. Also trying to wean self off jQuery. That may take a little longer especially as PW is so dependent on it.1 point
-
I only ever use BS or Foundation just for the grid, mixins and helper / utility classes (.visuallyhidden et al) + normalize (S)CSS. There's nothing wrong with it, and I don't understand people who claim that "every site built with BS looks the same" (or that is has to). It's just a tool. It doesn't dictate anything. As for components, I'm cherry-picking and choose the "best in class" (e.g. PhotoSwipe for lightboxes, Flying Focus) or build my own. An accordion or tab component is a trivial thing to build, and at some point (if you have a very custom design) it's easier than tweaking an existing solution. But of course - it all depends... on budget, deadlines etc.1 point
-
I use BS all the time and my websites never look the same. I change everything I need, it's very easy to use SASS, and its grid and utilities classes are great. Maybe the sites look the same because you/they leave it with the "out of the box" style and layouts. You simply adjust colors, borders, sizes, spaces, fonts, icons, shadows, pictures, backgrounds, etc. and create designs/layouts in a creative/useful way and that's it. But never ever copy and paste the examples and start throwing code on it... and this will happen with any framework you use. You should always start with a good (useful) design of the page, without thinking about its implementation and then use BS or any other tool to do it as it was designed, as simple as that. PS: Ah.. I forgot.. I'm a graphic designer LOL1 point
-
A former experienced colleague of mine put it right (regarding Bootstrap, but applicable here as well): If you don't know coding, it's a bless, if you do, it's a curse ?1 point
-
A few months back I gave Linux another chance. I was looking for something that could improve my workflow in some kind or the other and yes... I'm still on Linux. Tried a lot of distros and windows managers since then - right now I'm super happy with Manjaro and the i3 (i3-gaps) window manager. Works pretty pretty well so far.1 point
-
Pia - Pageimage Assistant Hello, today I can tell you that Pia Ballerina want to assist you with Pageimages and that can become really helpful! . . . Pia, in its current state, version 1.0.0, provides: a GUI (the module config screen) for quick and easy changes to the sitewide Pageimage default options an alternative way for calling the Pageimage resizing methods with PW selector strings three new methods as shortcuts to the resizing functions a new method called retinafy and its alias hiDPI, (introduced in version 0.2.0) . . . 2) Instead of ->width(), ->height(), ->size() you can call ->pia() now. With a PW selector string you tell Pia what image variation you want to have : . $image->pia("width=100, quality=80, sharpening=medium")->url; . If you want process ->width() just define width. If you want process ->height() only define height. If you want process ->size() just define width and height. If you want process ->size() with equal values for width and height, just define only size, or use the alias square: . $image->pia("width=480")->url; $image->pia("height=320")->url; $image->pia("width=400, height=300")->url; $image->pia("size=350")->url; $image->pia("square=350")->url; . So, yes, - I see. Now you may think: "Ok, nice looking girl, - and she can dance very well, - but for what should it be good that she is involved here? My very old buddies width, height and size - and me, - we don't need any Ballerinas between us!" . Yeah, I see what you mean. But this above is not what Pia is good for, this is just a little warming up for you. . In some cases one need to specify more than just width and / or height. If it comes to that you need explicitly populated options with the individual pageimages, Pia will become faster and more comfortable at some point. Also the code is looking more readable with Pia, at least to me: . // regular style #1: $image->width(800, array("upscaling" => false, "cropping" => true, "quality" => 80, "sharpening" => "strong")); // or regular style #2: $options = array("upscaling" => false, "cropping" => true, "quality" => 80, "sharpening" => "strong"); $image->width(800, $options); // now lets Pia dance: $image->pia('width=800, upscaling=0, cropping=1, quality=80, sharpening=strong'); $image->pia('width=800, upscaling=off, cropping=on, quality=80, sharpening=strong'); . For me it is that not only Pia begin to dance, my fingers do so too when writing selector strings instead of the regular array code. . Ok, last thing before we can go to stage: "You already may have noticed that Pia accepts few different values for boolean expression, yes?" for TRUE you can write these strings: "1, on, ON, true, TRUE, -1" for FALSE you may use one out of "0, off, OFF, false, FALSE" Ready? Ok, lets go to stage. . . . 3) Pia provide three new methods as shortcuts. This means that when using one of the shortcuts you have pre-populated options, regardless of the sitewide default settings: crop :: does what the name says contain :: is equal to the regular method: ->size($width, $height, array("cropping" => false)) cover :: this, Pias third child, is a new kid on the block . Let's have a closer look and compare it. We use Pias image from above as source for this example. (It's dimensions are 289 x 400 px) . . * crop $image->crop('square=100'); . it is 100 x 100 px and the name is: pia-ballerina_titel.100x100-piacrop.jpg . . . * contain $image->contain('square=100'); . it is 73 x 100 px and the name is: pia-ballerina_titel.100x100-piacontain.jpg . . . * cover $image->cover('square=100'); . it is 100 x 139 px and the name is: pia-ballerina_titel.100x139-piacover.jpg . . . Ok, you got it? . "Crop" crop out the area, "Contain" fits the image into the area, and "Cover" calculates the needed dimensions for the image so that the area is completly covered by it. . Following is a link with lots of those crop-, contain-, cover- variations. I have stress-tested it a bit: much variations . ---------- . . Later Additions: . * contain with option weighten Since version 0.0.6 contain can take an additional param called "weighten". (read more here) . . . * retinafy Since version 0.2.0 retinafy is added. It returns a markup string, e.g. a HTML img tag, where placeholders are populated with property values from the pageimage. Default properties are: URL, WIDTH, HEIGHT, DESCRIPTION. The method also can take an optional array with CustomPropertyNames. You also can use the alias HiDPI if you like. (read more here) . . ---------- . . You can get the module from the modules directory or from the repo on Github: . git clone https://github.com/horst-n/PageimageAssistant.git your/path/site/modules/PageimageAssistant . . Bye! . Classical ballet performance at the Aalto Theatre in Essen, in the context of the Red Dot Award ceremony 26 June 2007, Act III, Sleeping Beauty, the wedding reception Photos: Horst Nogajski - www.nogajski.de1 point
-
Just wanted to throw in my two cents. If you come at it as a front-end developer that's a complete beginner to CMSs, then PW should be very easy to get going. It's built around working the same way that existing web technologies work… Pages map in the same way that URLs do… Template files are just plain HTML/PHP files… the API is largely the same as a front-end API (jQuery)… and so on. So if you know your basic web technologies outside of CMSs, then you won't find a simpler system than ProcessWire. The problem is most other CMSs don't work that way. So the line gets more blurry when you've become used to the terminology and approach of another CMS, because PW can be quite different. Sometimes you have to unlearn what you know from elsewhere in order to appreciate the simplicity of PW. People are always trying to find complexity that isn't there, especially those that grew up on other platforms. PW is a system that rewards you by being curious. We aim to show you how to fish so that you can catch the big fish. We're not here to catch the fish for you. You don't have to know anything about fishing, but you should know how to yell for help if you fall in the water. And you should be willing to learn by example. I learn best by example, so this is the way I tend to teach too (and I recognize not everyone learns the same way). PW is a CMS and CMF, not a website builder. If you are curious and willing to explore, you'll find it is very simple indeed. Certainly far simpler than even WordPress in creating a custom website. You do have to come from the point of view of "I want to create and have the system adapt to me" rather than "I will create something based on what the system provides." If you already know what you want to create and it's something unique, you won't find a simpler path to get there than PW. WordPress is a different beast, in that it's basically saying "YOU WILL CREATE A BLOG or modify this blog and call it something else." Some people like that underlying structure… "okay, we're starting with a blog, what can we do with it?" Others do not like that underlying structure. Our audience consists of those that want to have a system support their original creation rather than mash up an existing creation. There was a PDF posted earlier that I think hit upon some good points, and I appreciate the effort that went into putting it together. The fictional character being scripted in the dialog is not our target. I can go into specifics if anyone wants me to, but I was definitely left feeling at the end of it that we have to be careful about hand-feeding too much or else we'll start attracting people beyond our support resources. Folks that want the fish cooked and filleted rather than folks learning to fish. Perhaps in time we will want to attract more of the consumer-type audience, but currently I don't know how to support users looking to find all the answers in a sitemap file. Keep in mind that unbridled growth is not necessarily desirable. Most of us don't get paid for most of the work we do here and we do best if we grow in a more healthy manner, attracting more thoughtful designer/developers that are here to learn and also contribute. Obviously the author of the PDF is one of the thoughtful ones (and the PDF is a great contribution), even if his fictional character isn't necessarily, but we'll welcome him anyway. But we will definitely be going through the PDF in more detail to learn and improve from it where appropriate, while keeping our audience in mind. I think we're doing something right, because our audience is growing rapidly. I'm nearly full time on ProcessWire now, and it's still difficult to keep up with everyone. At present, I like that our audience is largely open-minded, curious and thoughtful designers and developers. Somehow we've attracted an incredible quality of people and that's what makes this place great. We could not ask for a better group of people here. I'm reluctant to lead PW towards a website builder direction because I think that's when the quality of the community could go down, as people come looking to eat fish rather than learn, catch some fish, and throw some back. The reality is that part of our long term goals include converting the rather large audience that has outgrown WordPress into ProcessWire users. I'm convinced that we do that by giving them more ProcessWire, and not more WordPress. But at the same time, we always have to keep an eye on WordPress and learn. They've been lucky no doubt, but they are also doing many things right. So we have been and always will be working to make the WP-side of users more comfortable in ProcessWire, while also trying to help them grow by distancing them from the limited WP mindset.1 point
-
Wow–I'm speechless. This is truly amazing blad. You've got some serious video editing skills. Thank you, this really made my day!1 point