Leaderboard
Popular Content
Showing content with the highest reputation on 12/25/2017 in all areas
-
I don't really think it's one or the other. jquery is more a library and Vue a framework. I know it can be a fine line between the two, but something to be aware of. jQuery is still everywhere and very useful for simple DOM manipulation tasks. Mind you I would also suggest that you should learn plain javascript first - having that foundation will serve you well and make it easier to pick up the next trendy JS framework. Also, why load up jQuery for one simple thing that could easily be achieved in plain JS? Obviously Vue is becoming a popular framework, but a couple of years ago it was all Angular, and before that it was .... well you get my point. I do think that Vue is a good choice for a full blown framework right now though.7 points
-
Although Vue is being marketed as "incrementally adoptable" it is still aimed to become something react-like as I see it. That is a framework, that is to be used on a frontend, completely decoupled from the backend. In such architecture backend only serves data to a frontend via something like REST or GraphQL. And all the routing and markup generation is done on the frontend, in the browser. ProcessWire surely can be used in that scenario (just follow the provided links), but in 99% of cases I heard about it is used in an "old-fashioned" way, with routing and markup generation done on the server (backend) and served via page reload, not ajax+in-browser state change+framework like Vue. That means most examples here on the forums will be more relevant to such a usage. Ryan is building at least his demo sites this classic way. Vue is something from the new frontend oriented world. JQuery is something from that "classic" web-development world, which is still dominant. JQuery is used throughout the PW core and modules code. And that code is a very good manual in itself. So learning JQuery with PW will be easier. And (should it be first) PW API is known to be inspired by JQuery. Isn't it the ONE reason to learn JQuery first if going with PW? So, for now, I would say JQuery is a better start to be used with ProcessWire.6 points
-
Definitely agree with what @adrian say. If you are new to JS world, IMHO, I would suggest this learning curve: JS -> ES6 -> jQuery -> Vue / Angular / React https://scotch.io/bar-talk/vuejs-vs-jquery-use-cases-and-comparison-with-examples http://youmightnotneedjquery.com5 points
-
Came across this article that y'all might like https://dashbouquet.com/blog/frontend-development/9-best-javascript-charting-libraries4 points
-
Note that the Flot library listed here is essentially orphaned. Pure D3 sounds like a solid choice. I really like where this thread has gone so far I hope I can make use of this and buy bernhard dozens of drinks in the future (his liver better be made of steel).2 points
-
I gave Webpack another shot and I think i judged it too harshly. It actually works quite well, but it can take quite some time to set-up. For that reason I have created a boilerplate inspired by @heldercervantes's boilerplate: https://github.com/nextgensparx/pw-webpack-boilerplate It's nothing fancy at the moment but I mainly made it for my own personal use. Thanks for the advice!2 points
-
Woah! Put down your counter arguments. Now I've got your attention, hope you all have a great Christmas2 points
-
I would fix your markup, remove the ID from the option since that won't validate (multiple same id). Also, it looks like you are not closing the opening tag for the option. in order to have it searchable, you'd need to add data-live-search="true" to your select element. for running an action, you would need to do like an onChange event and then window.location.replace with the value of the selected option..1 point
-
Update on Jumplinks 2: I’ve been working on a few things to move everything over to a more modern JS code-base. You can learn more about that here: https://github.com/rockettpw/jumplinks/issues/14#issuecomment-353781768 Still lots of work to do on both the front and back ends, but I’ll get there. @jannisl Sorry for the delay, somehow missed your post. Jumplinks automatically trims out index.php from requests as PW doesn’t supprt them. Not sure why it’s not working for you though. Could you turn on debug mode (in Jumplinks’ config) and let me know what happens when you navigate to index.php/something?1 point
-
You're welcome. It's under modules: https://www.yoursite.com/backend/module/?reset=1 of course, replace "backend" with whatever name you have chosen during install (default = processwire)1 point
-
I have only discovered this today. I have made a code template for netbeans. For the $page var, the template_name has to be filled in, then it should work with the template-stubs module. Hope it helps. /* ----------------------- ProcessWire API variables ------------------------ */ // <editor-fold> /* @var $page tpl_${template_name} */ /* @var $pages Pages */ /* @var $modules Modules */ /* @var $user User */ /* @var $users Users */ /* @var $permissions Permissions */ /* @var $roles Roles */ /* @var $input WireInput */ /* @var $sanitizer Sanitizer */ /* @var $session Session */ /* @var $log WireLog */ /* @var $cache WireCache */ /* @var $datetime WireDateTime */ /* @var $files WireFileTools */ /* @var $mail WireMail */ /* @var $config Config */ /* @var $database WireDatabasePDO */ /* @var $fields Fields */ /* @var $templates Templates */ /* @var $languages Languages */ /* @var $wire ProcessWire */ /* @var $wire \ProCache */ // </editor-fold>1 point
-
That looks awesome. I'll have to give it a go. If it's working as expected in all/most IDEs I don't think I'll worry about building this into Tracy unless you guys can think of a reason why it would be a better fit there - it's nice to have less modules to install I guess, so maybe that's enough of a reason?1 point
-
Just bumped the module to version 2. - Added Google Invisible reCAPTCHA. To use it, no change is necessary on the frontend, you just have to configure the module to use reCAPTCHA V2 or Invisible reCAPTCHA. I will update the readme to reflect the change made by @ukyo and the new available options.1 point
-
Hi guys As a @sforsman's coworker I'll let him know about this. We do use namespaced version of this module ourselves.1 point
-
1 point
-
Roles Permissions Users Login Each group with a parent page. Content posted are children of these parent pages Group parent pages with template-level access that cascade down to the child pages (posted content) Frontend editing? These are the basics. Depending on the complexity (e.g. are there sub-groups; can a member belong to more than one group, who is posting the group content, etc), your mileage may vary... Just my 2p.1 point
-
that's exactly why using tracy is so great, because now you know that the hook did not execute it's the same for me. don't know why it is not executed. maybe it's a bug, maybe we are using the conditional hook wrong. I didn't use conditional hooks for a long time and sometimes hooks with if-statements are even easier to read. so it's totally up to you which one you use.1 point
-
Just add the disabled attribute to the button : $f = $this->modules->get('InputfieldButton'); $f->attr('disabled', 'disabled');1 point
-
You could also use the "Cache" field (not installed by default) and create a "fullname" cache field to add to user template. In the field setting add the fields "first_name last_name" to save on that field. Or add a property "fullname" hook to the User page wire()-addHookProperty("User::fullname", function($event){ $event->retuen = $event->object->first_name . " " . $event->object->last_name; });1 point
-
I agree with @horst about creating a new homepage - I don't think it will be possible and certainly confusing if it was. For testing code, I am going to shamelessly promote TracyDebugger. You can use the Console panel to run any code, or if you want to test changes to the code of a particular template, use the Template editor panel which lets you "Test" the changes without actually affecting the code that is being served up to all other visitors. As for the Pages > Add New and only seeing bookmarks, that is due to your template setup - you need to read up on how to get that add new option working. The main/default way to add a new page is from the "New" action button when you mouseover the parent page in the page tree.1 point
-
I'm not 100% sure if I really get what you are asking for. (?) I think it isn't possible to create another "homepage" besides the one existing, because it is a unique and single page. It is the root page and cannot have any siblings by design. It is the (root) parent of all other pages. But when I want to try out new codes in a homepage of a running site, I go into the template file of the homepage and put in a conditional like this: // on top of the homepage template file $testingOnTheOpenedHeart = true; // :) if('horst' == $user->name && $testingOnTheOpenedHeart) { // when I'm loggedIn and have set the conditional to test out something new, ... include(__DIR__ . '/_myHomeTemplate4TestingPurposes.php'); // ... include alternative file with my test code ... return; // ... and skip the following code from the original template file! } // following code // ...1 point
-
Update: Blog 2.4.2 As of today and this version onward, ONLY ProcessWire 3.x is supported. Changelog Support for namespaced ProcessWire only (ProcessWire 3.x). All ProcessWire Comments Form Options can now be passed as as options to renderComments(). See the options here Available now in the modules directory. Please note that this version does not address any of the reported PHP 7.x issues.1 point
-
@SamC it's really as simple as that: https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/#new-conditional-hooks Update 2022: $wire->addHookAfter('Pages::saved', function(HookEvent $event) { $page = $event->arguments('page'); bd('page saved'); bd($event, 'event'); bd($event->object, 'event->object'); bd($event->arguments(), 'event->arguments'); }); in the beginning it can be a little confusing when to use event->object, event->arguments and event->return but with the help of tracy you can quickly bring light into the dark: add the code above to the tracy console, set the radio on the right to load it on "ready" (same as placing the code in the site/ready.php file) and save any page: $event->arguments('page') is the same as using $event->arguments(0) that you will see very often and in the tracy dump you see that 0 is simply the key for the first argument in that hookevent. you can also collapse the "data" property of the hookevent and you would see the same: You can also use your IDE to quickly find what the HookEvent is returning/containing in which hook. Let's take the common saveReady hook as an example: We know that the hook is attached as Pages::saveReady (eg because we have read that somewhere) That means that the hook is part of the "Pages" class, which is located at "/wire/core/Pages.php" - that's easy to find out using CTRL+P in VSCode: Searching for "___saveReady" lets us find the corresponding method: Now we see, that we have ONE "arguments", being Page $page - this means $event->arguments(0) would return the page being ready for saving $event->object would be the class, here "Pages" $event->return is the return value of that method, here $data (line 1739) Edit: There's some additional explanations in this post: https://processwire.com/talk/topic/27248-pagestrashtemplatefoo-vs-pagestemplatefootrash/?do=findComment&comment=224659 #search afraid of hooks1 point
-
not at all, sounds like this could be a great companion! at the moment I think I will also release the datatables module as open source. I've never worked with d3 but the company I'm writing my thesis at does some crazy stuff with it maybe a dedicated "d3 preview" thread would be nice? I really enjoy the discussion and the input here1 point