-
Posts
2,922 -
Joined
-
Last visited
-
Days Won
18
Everything posted by szabesz
-
For not so complex ajaxified pages this is what I do. Something like: <?php if ($config->ajax) { echo wireRenderFile("./rendered-ajax-call-result.php", array('page' => $page)); return $this->halt(); } Page is the only variable passed to the template partial and if something else is needed I make sure it is already part of page so that I can access it in the partial. The halt method is the recommended way so that ProcessWire can tidy up before exiting the process.
-
Do not create default image variation on image upload
szabesz replied to happywire's topic in Getting Started
Let's ping @horst It would be great to be able to set the exact size of the thumbnails. Yeah, if we can use the same image on the frontend then no unnecessary image variaton is created for sure. -
Thanks @Macrura Taking a peek under the hood: These look like UIkit3 themes: https://themeforest.net/item/lovely-corporate-creative-multipurpose-html-template/19515847?s_rank=11 http://themedemo.indonez.com/?theme=Fina http://torbara.com/demo/?theme=HTML-GB Looks like UIkit2: http://demo.42theme.com/?theme=Acamar.HTML Looks like this one is custom css based: https://themeforest.net/item/omio-html-portfolio-template/22846488?s_rank=1
-
@FrancisChung Sure, we quite understand the situation, technology moving forward has ups-and-downs and if someone wants to work in a team then there is no choice but to follow the requirements. A team of good developers and a nice salary is worth the effort, of course. It is just that most active ProcessWire forum members work solo or in a tiny team of a few devs, and while some of them has already posted about using Vue (for example), most of us do not use these frameworks. By the way, Vue.js looks to be the sanest of all but for most sites – developed by a freelancer or a small team even – Vue can still be a bit of an overkill. That is why I started using jsViews instead, as it is very versatile and requires only one JS file which covers all the "technical requirements". But this is off-topic because jsViews is not a CMS anyway, I know. Sorry for that.
-
Looks like ProcessWire 0.5 so it must be a good system currently being born! ? Speaking of learning JavaScript, I am not a fun of over-engineering common websites (which I solely deal with) so personally I have no incentive to learn any of these hype frameworks, instead I started to dive in into this mature gem: https://www.jsviews.com/ Anyway, I know that it is quite ok to earn a good living by developing in Angular, React, etc... if one has the nerve to survive the hell.js method, then why not? Sorry for not being helpful, probably others have a better understanding of "modern" JS development.
-
Nope, but: https://www.google.com/search?q=JavaScript based CMS be prepared to use Node.js ?
-
Detecting invalid, invisible characters in your editor
szabesz replied to Jonathan Lahijani's topic in Dev Talk
My strategy is to get rid of those characters right off the bat, instead of detecting them. Here is a previous post of mine: https://processwire.com/talk/topic/20865-permissions-for-page-reference-field-linked-to-users/?do=findComment&comment=180797 By having a system wide tool, one can even use it anywhere not just in a favorite editor. I also use little tools like turning strings into "url friendly string", "lowercase/UPPERCASE/CamelCase". BTW, the new forum update is very aggressively turns forum ULRs into those big preview boxes. Previous version transformed the link right after pasting it in but not later on. This new forum versions keeps converting the links – on seemingly random occasions – even after I have opted for the "plain text" version . Very annoying. -
@Gideon So is right, docs reads: "URLs retrieved from $config->urls always end with a trailing slash." https://processwire.com/api/ref/config/#api-urls
- 6 replies
-
- favicon
- file permissions
-
(and 2 more)
Tagged with:
-
I'm glad lots of you like this tip. In the meantime I found more to read: https://codequs.com/ has lost of recent articles on web development. About pure JavaScript I found these one to be interesting: Do we still need JavaScript frameworks? Quote: "That said, much of what frameworks do will probably become easier to do with smaller libraries and/or native code as time goes on. Take my application as an example. At the same time, if the large frameworks and libraries remain versatile they may morph, adapt, and stick around. If not, they may end up like jQuery — a tool of the past for the most part." https://codequs.com/p/r1Jzty4S4/do-we-still-need-javascript-frameworks Design Patterns: The Comprehensive Guide to JavaScript Design Patterns https://codequs.com/p/B1lboCPS4/the-comprehensive-guide-to-javascript-design-patterns A guide to prototype-based class inheritance in JavaScript https://codequs.com/p/HyiztJFH4/a-guide-to-prototype-based-class-inheritance-in-javascript Prototype-based Inheritance and Prototype chain in JavaScript (ES5) https://codequs.com/p/Hy6_WgCI4/prototype-based-inheritance-and-prototype-chain-in-javascript-es5 JavaScript ES6 Classes https://codequs.com/p/H1poPtiS4/javascript-es6-classes Javascript and Functional Programming: An Introduction https://codequs.com/p/BJL08ThSV/javascript-and-functional-programming-an-introduction State management patterns in JavaScript: Sharing data across components https://codequs.com/p/HkD3mZ9LE/state-management-patterns-in-javascript-sharing-data-across-components "Tips" JavaScript naming conventions: do’s and don’ts https://codequs.com/p/B1-VWxRIN/javascript-naming-conventions-do-s-and-don-ts 12 Concepts That Will Level Up Your JavaScript Skills https://codequs.com/p/BkdaLTnS4/12-concepts-that-will-level-up-your-javascript-skills Understanding the Spread Operator in JavaScript https://codequs.com/p/ByL0qvXUV/understanding-the-spread-operator-in-javascript The Complete Guide to Loops in JavaScript https://codequs.com/p/S1dZcv7LN/the-complete-guide-to-loops-in-javascript Memoization is an optimization technique that speeds up applications by cached result https://codequs.com/p/H1XlyssUE/understanding-memoization-in-javascript Arrays: How to Sort an Array of Objects in JavaScript https://codequs.com/p/BysEP63SV/how-to-sort-an-array-of-objects-in-javascript 2 Ways to Merge Arrays in JavaScript https://codequs.com/p/H1jReV-IN/2-ways-to-merge-arrays-in-javascript How to Deep Clone an Array in JavaScript https://codequs.com/p/rynJIss84/how-to-deep-clone-an-array-in-javascript 4 Uses of JavaScript's Array.map() You Should Know https://codequs.com/p/B13x_ZqLE/4-uses-of-javascript-s-array-map-you-should-know Asynchronous tasks: Understanding Promises in JavaScript https://codequs.com/p/Sy3hiPP8N/understanding-promises-in-javascript JavaScript Promises: The Definitive Guide, Part 1 https://codequs.com/p/BkToHnnU4/javascript-promises-the-definitive-guide-part-1 Introduction to fetch() https://developers.google.com/web/updates/2015/03/introduction-to-fetch How to Use the JavaScript Fetch API to Get Data https://scotch.io/tutorials/how-to-use-the-javascript-fetch-api-to-get-data
-
Hello, I support this: In other words I think supporting multilingual stores is a must and doing it the PW way is the easiest to use by those who will build stores based on Padloper 2. Regarding performance, custom db tables might have an advantage but – I guess – most Padloper 2 sites will never reach the point when it matters.
-
I think you just did not drink enough coffee this morning ?
-
I would concentrate on improving these and the Page Table field. For clients wanting to edit content easily, frontend editing is often enough. Actually, my clients would not be able (or willing) to use a pagebuilder anyway, they just want to click on ONE thing and edit text or images, any more than that and I am asked to do it instead.
-
When React dies, so does WordPress. They have tightly coupled WP to Reach, the learning curve to WP development has become a lot steeper than it was before. While JavaScript and browsers are evolving in a direction where therel will be less and less need for complex frameworks, see: https://codequs.com/p/r1Jzty4S4/do-we-still-need-javascript-frameworks quote: "That said, much of what frameworks do will probably become easier to do with smaller libraries and/or native code as time goes on. Take my application as an example. At the same time, if the large frameworks and libraries remain versatile they may morph, adapt, and stick around. If not, they may end up like jQuery — a tool of the past for the most part." I would like to add that jQuery is not a thing of the past but still going strong ?
-
By default regular expressions are case sensitive and in the message only a-z is displayed and I guess Ryan wanted to make sure there can be no issues with these filenames when writing to a case sensitive filesystem.
-
You mean at https://github.com/processwire/processwire-issues/issues/829 ? Should we express how badly we need a core fix so that you can remove the try/catch?
-
The former is for module context while the latter is for frontend template file context. Can you point to the part of the docs you are referring to?
-
Sure, absolute vs relative again, docs says: "...paths, with one important difference: the returned value is the full disk path on the server." + "There are also a few items in $config->paths that aren't in $config->urls. All entries in $config->paths always end with a trailing slash." Yeah, just as @bernhard reminded me ?
-
Not really. It depends on how you find something easier to implement. Usually I use include but I try to avoid relative paths. There is a "problem" with them: http://yagudaev.com/posts/resolving-php-relative-path-problem/ BTW dirname('__FILE__') is the same as __DIR__ I only use wireRenderFile() when I want to store the rendered output in a variable, and I use this technique to avoid the hassle of passing lots of variables: https://processwire.com/talk/topic/14332-storing-templates-in-separate-directories/?do=findComment&comment=129024
-
Sure! Thanks for fixing my copy-paste error! (BTW, both should work as an extra / does not make PHP trip over, still it is unnecessary for sure).
-
You can either try include $config->paths->templates . 'inc/item__project--filter.inc'; or: include __DIR__ . '/inc/item__project--filter.inc';
-
Related discussion: https://processwire.com/talk/topic/18646-visual-builder-approach/?tab=comments#comment-162880
-
My pleasure ? Done. All three commits are in the first PR.
-
Hello @kongondo I have implemented some changes to the navbar/menu: If you like it I can make a PR. What do you think?