Leaderboard
Popular Content
Showing content with the highest reputation on 10/30/2018 in all areas
-
Hi all, This is Margaret from the Web Team at the Australian Antarctic Division. As some of you would be aware, a little while ago we chose ProcessWire as our replacement CMS. We've been working on moving one of our smaller sites since that time (before we set our sights on our main site next year), but a month or so ago our attention was diverted to a brand new site that came up - for the SCAR COMNAP 2020 conference. It's a very small site at this stage (2 pages!), but it will grow a little as time goes on. Technically speaking it's very simple, but I just thought I'd post it here because it is our very first live PW site, which is a little bit exciting! ? https://scarcomnap2020.antarctica.gov.au/ Margaret7 points
-
Hello Winnie, Welcome to the forums. Depending on your background (i.e. are you a designer, front-end developer, back-end developer, content/marketing person or a unicorn?) there are different paths to take. If I suggest you work yourself through the beginner tutorials of ProcessWire. This will give you a better understandig of the inner workings. Also explore the site profiles which comes with installing ProcessWire.7 points
-
It sure does - I've built a number of conference sites with PW. So far only information sites, but one of my clients organises several conferences per year and has requested a more sophisticated tool that will serve as a kind of Eventbrite replacement. Looking forward to scoping that out and working on it next year.6 points
-
5 points
-
That video got me hooked as well. I'd love to help out with making a new marketing video. I can do the screen recording, video editing and voice-over. If someone can concept out a script/storyboard, I can take care of the rest. Maybe it can be featured on the new PW homepage hero section to hook more people.4 points
-
I have just added access rights to TracyDebugger's RequestInfo > Field Code section. It now contains: [ 'type' => 'FieldtypeText', 'flags' => '32800', 'name' => 'my_field_2', 'label' => 'My Field 2 Label', 'collapsed' => '0', 'minlength' => '0', 'maxlength' => '2048', 'showCount' => '0', 'size' => '0', 'tags' => '', 'editRoles' => [ 'editor', ], 'viewRoles' => [ 'author', 'editor', ], 'textformatters' => '', 'showIf' => '', 'themeInputSize' => '', 'themeInputWidth' => '', 'themeOffset' => '', 'themeBorder' => '', 'themeColor' => '', 'themeBlank' => '', 'columnWidth' => '100', 'required' => '', 'requiredAttr' => '', 'requiredIf' => '', 'stripTags' => '', 'placeholder' => '', 'pattern' => '', ] which is everything to need to create a field via the API including the view and edit restrictions. You can then simply wrap this output in: $f = new Field(); foreach() $f->save(); so that you have: $f = new Field(); foreach([ 'type' => 'FieldtypeText', 'flags' => '32800', 'name' => 'my_field', 'label' => 'My Field Label', 'collapsed' => '0', 'minlength' => '0', 'maxlength' => '2048', 'showCount' => '0', 'size' => '0', 'tags' => '', 'editRoles' => [ 'editor', ], 'viewRoles' => [ 'author', 'editor', ], 'textformatters' => '', 'showIf' => '', 'themeInputSize' => '', 'themeInputWidth' => '', 'themeOffset' => '', 'themeBorder' => '', 'themeColor' => '', 'themeBlank' => '', 'columnWidth' => '100', 'required' => '', 'requiredAttr' => '', 'requiredIf' => '', 'stripTags' => '', 'placeholder' => '', 'pattern' => '', ] as $k => $v) { $f->$k = $v; } $f->save(); So to get this to work, create a field via the PW admin and set it up exactly how you want with the access restrictions, then go to the RequestInfo panel and copy the array from the "Field Code" section. Note that this section is not turned on by default when you install Tracy, so you will need to go to the config settings for the RequestInfo panel and turn it on.4 points
-
We can change as many forums as you like to Q&A forums but yes there were issues with it. Here's where someone hits the nail on the head when requesting the forum devs make it more like StackExchange: https://invisioncommunity.com/forums/topic/438364-qa-forum-types-add-comment-feature-please/ So SE lets you comment on the chosen answer. The forum software pulls the chosen answer out of the topic flow (from memory) and the upvoting/downvoting means you can't have a meaningful conversation in a Q&A topic. I will have a look on a local copy to see if they've updated the functionality since we last looked used it but I honestly wouldn't count on it - they seem to spend more time on implementing cross-device support for emojis than improving some useful features ?(okay so that's a bit harsh, but they do seem to have a weird priority to their feature rollouts).4 points
-
@psy Same path here but I was the other two devs too ?3 points
-
I arrived at ProcessWire via a different path. A few years back, two other developers and I were dissatisfied with the CMS we were using. Other two researched, tested, investigated all on the market except WordPress. We all agreed we'd rather give up than go down that road. Fortunately for me, they both agreed PW was the best and I should give it a go. Haven't looked back. Thanks @ryan, the forum team, Goran and @Stikki ?3 points
-
I feel like the Q&A style works for Stack Overflow, because discussion and order of posting is usually less important in a plain "here's the answer" context. There's hardly interaction between various answers besides the "xxx answer is wrong" every now and then. There are the comments for answers, but those are no longer answers by themselves and often hardly useful. Most topics here on the other hand are way more discussion heavy and afaik it's not like you can choose what you need, but rather certain subforums would have only Q&A style topics, while others would have normal ones. The other thing about Stack Overflow is that usually each topic just has just a single question asked. We have lot's of topics, which don't fit that pattern at all. Instead of one topic with 7 solution stack overflow might just have 7 similar questions with each a single different solution. I mean we certainly have duplication as well, but the problem isn't solved for anyone here. Iirc that's what made the Q&A forums a non-starter for me when testing those. By removing the order of messages they just didn't work for any kind of content, which refered to prev. posted stuff and was more contextual than just posting a potential solution in isolation.3 points
-
Try adding... au BufRead,BufNewFile *.module set filetype=php at the end of your .vimrc file and re-launch vim.2 points
-
If you have the required language modules installed, you just change the field type of the seo fields, look for field seo_title, and see that you can change it to other types of fields, in this case, you want Text multilanguage for seo_title, it should show up after the multilanguage modules are setup.2 points
-
Yeah, looks like I'll be doing some reading tonight for sure (to ensure no surprises)2 points
-
Thanks @adrian! Yes, it would work really well! In this case the conference organiser is going to be handling the registrations and schedule side of things. We were just asked to put this up so they have somewhere to provide info ahead of time, and then an archive of the proceedings once it's over. However, if we ever have to do anything more complex down the track, at least we know that PW is more than capable.2 points
-
Just wanted to let you know, that this will no longer be a problem. I have removed the code that cleared the sticky panels cookie when saving the config settings. I'll keep an eye on things because I am still not sure exactly why I added it in the first place, but it's definitely annoying ? On another note, core modules and site modules classes are now optional available in the API Explorer panel, along with lots of other improvements.2 points
-
I agree - I am not saying that something like it shouldn't be implemented - just wanted to expand on @kongondo's answer and explain what we found about it that didn't work well, and the way it was, it really wasn't helpful. Maybe Ryan could reconsider it (or another similar approach) with the website revamp.2 points
-
I know that there is not only ONE answer to a question. Maybe we have to not see this feature as a "This is the answer" but instead as an "This is an useful answer". StackOverflow was my reference also, because you can upvote multiple answers. Users would know that upvoted answers would/could work. I don't know much about the setup of the forum software, if you can enable the voting function for specific threads or not. Even if not, I do not see why support threads for example should not have an upvote option for useful answers, because of what I mentioned before. I really think, that upvoting answers would help everybody, because most times you (me) are searching for a solution in the forum/thread for hours and find many different solutions, try them out after once, and maybe one solution works. But you have to scan through the whole thread to get the correct one. There also is much bulk/clutter between the question and the answer, which may be a little bit off-topic, asks new questions or something else. I think everybody of us, had this problem more than once, right?2 points
-
If my memory serves, it was because it ruined the flow of the thread. In a lot of cases we are not looking for a single "best answer", but rather it's a discussion of different approaches. That said, it obviously works pretty well on StackOverflow so I think it's something to consider again, but I don't know which boards should use it and which shouldn't and I think that was part of the problem with the attempted implementation at the time.2 points
-
You want an updated video? But I remember it when it was nearly new! *checks video date, feels old* ? I had a similar experience to others - I was looking for a CMS that could meet my non-standard requirements - I remember seeing the site and some of the docs back then and being confused. Fortunately I came back to it a few weeks later and finally watched the video and that sold it to me instantly.2 points
-
It sounds to me as if your struggle is not with ProcessWire, but with JavaScript, specifically, JavaScript + Ajax, rather than ProcessWire + Ajax. It doesn't matter what profile is being used in ProcessWire. The only thing that $config->ajax does it to detect whether an Ajax call has been sent. It returns a Boolean; true if Ajax call made to the receiving 'file' (i.e. your template file or page) or false if not. Nothing more. The parameters you send with your Ajax call are up to you. The JS framework/library you use or vanilla JavaScript you use to make the Ajax call are up to you. ProcessWire will not care :-). An Ajax call will hit the server as either a GET or POST request, so you handle it accordingly. The rules for what files/URL you can ping (I can't find the relevant posts at the moment) still apply. If you ping an ADMIN URL, ProcessWire will reject that get/post. If you ping a standalone php file within one of ProcessWire's protected folders, ProcessWire will reject that get/post. So, you can either send your request to the current page and let it include your standalone file or make your standalone file a template file of a template and ping a page that uses that template, etc. Assuming you've sent your Ajax call to a valid 'url', you can handle things server-side like any other input. You validate and sanitize the data. If you have to send user input back to them, make sure you parse it through $sanitizer->entities(). I know you said you are frustrated by the 'Google-about-Ajax' suggestions, but I will tell you the same. A good tutorial/intro to Ajax would probably cost you about 30 minutes of your time :-). If you already have jQuery, use it to make life simpler (I know,... the JS purists here are groaning ;-)). OK, to some quick example if($config->ajax) { # 1. process input variables sent via Ajax $author = $sanitizer->text($input->author);// a parameter/variable 'author' was sent by ajax // validate $author here if(!$author) // error handling here //$email = $sanitizer->email($input->email);// just an example $volumes = (int) $input->volumes;// some integer input # 2. find requested books by the named author $books = $pages->find("template=book,name=$author,volumes>=$volumes,limit=20"); $results = array(); if($books->count) { foreach($books as $book) { $results[$book->id] = array('title'=>$book->title,'year'=>$book->year,'volumes'=>$book->volumes,'co_authors'=>$book->co_authors->explode('title')); } } # 3. prepare output to send back as JSON response to Ajax call if(count($results)) $results['message'] = 'success'; else $results['message'] = 'fail'; # 4. send JSON output back to client browswer echo json_encode($results); exit;// or ProcessWire halt() if applicable } // no ajax else { } You then handle the $results JSON in JavaScript, as you wish. PS: written in browser and not tested.2 points
-
In the getSelectablePages() hook $event->arguments('page') is the page being edited, but that is not so useful in your case because what you want is the Repeater page that contains the two Page Reference fields. Give this a try: $wire->addHookAfter('InputfieldPage::getSelectablePages', function(HookEvent $event) { if($event->object->hasField == 'people') { $inputfield = $event->object; $repeater_page = $inputfield->hasPage; if($repeater_page->team && $repeater_page->team->id) { $event->return = $event->pages->find("template=user, team=$repeater_page->team"); } } }); Note that if the user changes the selection for the team field they will need to save the page before the selectable options for the people field will update.2 points
-
1 point
-
v0.1.11 released. Thanks to a pull request from @adrian, this update wraps the last breadcrumb item in a link to the page tree (like the other breadcrumb items) and also standardises the page tree links so they always include an "open" parameter to load the tree opened to the clicked page. This is a change from the core breadcrumbs, which treats the link on parent breadcrumb item differently. There is discussion on this topic here: https://github.com/processwire/processwire-issues/issues/22 My opinion is that the breadcrumb tree links should be treated consistently, and if you want to go back to the page tree in its last state you can click the ProcessWire logo or "Pages" or "Pages > Tree" in the main admin menus.1 point
-
There is a specific type of modules in PW called Text Formatters for doing just that. They parse text field contents before they get output and can change things based on regular expressions. Just make a new text formatter module based on something simple like this and adjust it to your needs. You probably could change the initial behaviour somehow too if this solution does not work out.1 point
-
For multi-language SEO tags you can use a FieldtypeFieldsetGroup in your templates (put it on a new tab for easy access): https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/ .. echo this vars inside an included file (or use a Markup Region) in the main template file. PS: I never try with FieldtypeFieldsetPage, but can works too1 point
-
Got it working ? https://processwire.com/docs/tutorials/how-to-structure-your-template-files/ Helped a bunch.... enabling debugging shown the error I was looking for, it seems like a file may have been renamed from .less to .css changed it back and now it's working as it should, thanks a bunch @elabx1 point
-
Ok, so you need to start from there ? Those files are used to handle the rendering of the website but they can be used in multiple ways. You would need to figure out the output strategy of the site. Do you have access to the admin? site.com/processwire? Take a look at these: https://processwire.com/docs/tutorials/ https://processwire.com/docs/tutorials/how-to-structure-your-template-files/ https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/1 point
-
1 point
-
https://processwire.com/blog/posts/rebuilding-pw-website-part2/1 point
-
Thanks for the insight. I think I'll let Padloper take a passive role on this. Shop admins will decide what data they deem 'required' and what data is optional. Padloper will store what they want to be stored.1 point
-
You can process the queue by calling a script manually, from a seperate cronjob or for example from LazyCron. <?php $modules->get('IftRunner')->processQueue(); // Or if you want to specify how many queues must be executed you can also set a maximum $max = 5; // or whatever how many you want to be executed $modules->get('IftRunner')->processQueue($max);1 point
-
Yeah, actually I just wrote to my notes about why PW is great: Headless got innovative and trendy in 2018, PW works like this for several years now and is extremely mature.1 point
-
I think mods should split all of the replies to another topic. To save @pwired some time on Bolt CMS investigation, this is talking about the backend: https://docs.bolt.cm/3.6/internals/javascript-css-build#css-bootstrap-and-custom-scss "The CSS is based on Bootstrap 3.3.7, with our own theming and custom styles added to that" You can see at the end of this all the JS and CSS dependencies of the backend: https://github.com/bolt/bolt/blob/3.6/app/src/grunt/concat.js In the frontend you have to use Twig templating. I would like to continue this conversation in a split topic as I am curious to know, why pwired had no problem with jQuery UI being in the backend for ages even though it is very much a CSS framework as well.1 point
-
I've just moved it down to the function without anything popping up in error log. Load is down by 90% at least, site speed has improved dramatically as well. I'd suggest you really look into this asap ?1 point
-
@modifiedcontent here you go with a very simple example using jQuery (but it's different for all javascript frameworks or vanilla javascript... I'm using the default profile for the example: home.php <?php namespace ProcessWire; if($config->ajax) { $content = "content loaded via ajax @ " . date('d.m.Y H:i:s'); } else { $content = $page->body . renderNav($page->children); } $sidebar = '<button id="loadrandom">load random page</button>'; _main.php: add this before your </head> <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> <script> $(document).ready(function() { // add an event listener for the click event on #loadrandom button $('#loadrandom').click(function() { // check your console if everything works console.log('button was clicked'); // use the load() method to replace the current content // of div#content by the content of div#content that is // returned from an ajax request to the current url ./ $('#content').load('./ #content'); }); }); </script>1 point
-
No, it doesn't. But thanks anyway. ? Just wondering why nobody is talking about the "elephant in the room".1 point
-
Why is everybody here ignoring bootstrap? is it "too popuar" and thus not "cool" enough? ? https://www.npmtrends.com/bootstrap-vs-bulma-vs-foundation-vs-uikit1 point
-
You are safe to skip this warning while you are sure you don't have a script that need to run longer than the limit (e.g. a custom cron job which in this case will fail silently). If you don't have lot of modules or your site's size isn't that "big" then you are again safe to ignore it. A small note about this specific warning coming from the FileCompiler.php to try to find out the culprit (imho, in your case, it come from a module) : Read on https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/#file-compiler-updates Call to set_time_limit() in ProcessWire 3 : https://github.com/processwire/processwire/search?q=set_time_limit&type=Code1 point
-
Another "me too" from here. In fact when @apeisa first introduced me to ProcessWire, I wasn't that enthusiastic about it (some things about templates and fields just didn't seem to make sense), but having Ryan walk you through all that was a real game changer. We could use an updated video, though ?1 point
-
Thanks for your work on docs, @ryan! Actually your way of presenting and explaining things is as an important feature of ProcessWire as its beloved API. I remember being "hooked" after watching that gentle introductory video, way before I understood anything (could not find it to link here, is it gone?) Nowadays forum newcomers do not get much direct response from you (except for pro boards - and that is another reason to buy Pro modules ?), so probably even do not know about your way of turning answers to simple questions to profound mini-tutorials, often with some philosophical background. And that makes this documentation updated by you even more meaningful (Luckily those forum gurus that handle most of the never-ending questions are still inspired and hold the spirit of wise goodwill that make this place so great to be at). And those connections between established documentation and the constantly updating blog you wrote about are not only the new way to obtain more knowledge, but also a way to show the power of ProcessWire Page field in action on a site that should be an outstanding example of the system. The only thing i wish would happen but not yet happening is a community collaboration on creating, updating, linking the contents of the site, as well as designing and building it. You did say that the latter is about to happen, we do not discuss the former too much. So I suggest we think about the means by which the community can help you better in maintaining the docs and updating them gradually, so they are always up to date. These times most collaborative documentation is written under some kind of source control systems like git and afterwards presented with static site generators. I doubt this is a good way to go for a CMS project like PW (we should be eating our own dog food). But maybe we could use a mechanism of keeping contents in github and importing it to PW docs site when it is upgraded? Like the one use in ProcessWire Recipies website? That way we could help. And that is probably one of the best way to make happen the docs translation you talked about in the last post. Do you think we should explore this, or maybe you have something more profound already planned?1 point
-
1 point
-
Great idea on linking the blog posts to the docs pages. I’ve been using the blog more than the docs pages lately for finding documentation of new features, which is fine if you keep up with the blog like I do, but most newcomers are sadly not aware of these features!1 point
-
If you pasted that code here as-is, the issue seems to be that there's an extra space after self::new – it should be "self::new($items)" and not "self::new ($items)". A FileCompiler issue, perhaps? Could also try manually replacing /wire/core/WireArray.php with the one found from GitHub, just in case. Ping @ryan ?1 point
-
When searching pages with images field, there's no subfield "name" for images, but you can use images.data. And you won't get the image but a page(s) $p = $wire->pages->get("images.data%=mode"); // get return the first match echo $p->images->get("filename%=mode")->url; Or $p = $wire->pages->find("images.data=modelifestyle.jpg")->first(); // returns a pagearray and we access first echo $p->images->get("filename%=mode")->url; Or echo $p->images->get("name%=mode")->url; Or echo $p->images->find("filename%=mode")->first()->url; Or echo $p->images->get("modelifestyle.jpg")->url; Or echo $p->images->get("modelifestyle.jpg")->name; // image name or echo $p->images->get("modelifestyle.jpg")->filename; // full path1 point
-
But there are some Problems in the Frontend when you are using Bootstrap 4 and the Front End Edit Fields... ? thats uncool (i don't know what framework (?) is used for the Frontend Editor)0 points