Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/01/2017 in all areas

  1. I have just updated my music production site. This shows how even with a very simple site, Processwire has a place. The site is, for the moment, just a single page. I could have just made a static site without much trouble, but by building it on Processwire, I will be able to expand the site in the future without having to rethink the current site. The design used the profield Repeater Matrix for everything except the footer. So, I can reorder the panels easily should I wish. Here be the site: Dancing Bear Music (All graphics by me)
    9 points
  2. I have had the company for 25 years, so not a lot of choice
    3 points
  3. I use Kualo in the UK for hosting. Actually, I have found them generally very good overall and normally nice and fast. They supply Let's Encrypt on their shared servers via CPanel, and it automatically renews. It takes seconds to set up - just hit the enable button for the domain or addon domain. https://www.kualo.co.uk/blog/lets-encrypt
    3 points
  4. @Tyssen - I definitely agree with @fbg13 here - it looks like @flydev is doing an awesome job with his upcoming module. I would hold out for that, rather than fixing an old module with much less functionality.
    3 points
  5. The PW htaccess only blocks direct access to PHP files inside /site/ Anything outside of /site/ should be accessible.
    2 points
  6. Solved it. FYI, I found 'PageImageManipulator', and with a combination of different filters I can achieve the result I want to get. Best!
    2 points
  7. Well if a jQuery solution is OK to you here's one.
    2 points
  8. today i came up with this solution. it finds the page related to a pagetable item, but it should also work for repeaters, i guess? for repeaters there is also the getForPage() method, wouldn't it be possible for you to work with this? my code: // find the related event page to the current coupon item $current = $pages->findOne('template=event, couponcodes.id=' . $page->id); // return all tickets of this event so that the user // can choose for wich tickets the coupon is valid return $current->tickets; it finds the page of type "event" that has the current item ($page->id) as part of its pagetable called "couponcodes" drawback is that this only works after saving. but thats necessary since the item wouldn't exist before saving... maybe i'm getting you wrong. but maybe it helps someone
    2 points
  9. In your first version you can use ->find() on $prCodePages again to filter by single code in memory. This way you retrieve codes in one sweep from the db and filter them later to get results by single code.
    2 points
  10. I expect its to do with there being only one pair of values for the explode function on MarkInPageTree.module:112. Thanks for pointing this out. http://stackoverflow.com/questions/1807849/undefined-offset-when-using-php-explode I will amend for the next release.
    2 points
  11. But all you said is already can be achieved. No need to do anything on my side. Maybe add documentation on module's properties though. You can modify the module settings via api by overwriting them. So here how you can set different templates for different endpoints. // /site/templates/graphql-endpoint1.php <?php $ProcessGraphQL = $modules->get('ProcessGraphQL'); $ProcessGraphQL->legalTemplates = array('skyscraper', 'city'); echo $ProcessGraphQL->executeGraphQL(); ?> // /site/templates/graphql-endpoint2.php <?php $ProcessGraphQL = $modules->get('ProcessGraphQL'); $ProcessGraphQL->legalTemplates = array('architect', 'basic-page'); echo $ProcessGraphQL->executeGraphQL(); // /site/templates/graphql-endpoint3.php $ProcessGraphQL = $modules->get('ProcessGraphQL'); echo $ProcessGraphQL->executeGraphQL(); // here it will use default settings that you set via admin interface For the ability to distinguish the versions of your GraphQL endpoints. That's also doable without much effort. We are talking about ProcessWire after all. Here how it might look like. $config->GraphqlEndpointID = 123; echo $modules->get('ProcessGraphQL')->executeGraphQL(); $config->GraphqlEndpointID = false; And same thing in other template files with different endpoint id. Now anywhere you attach a hook, you can know which endpoint of your api is being executed, or if it is being executed at all. You just need to add a conditional block in your hook. Something like if (wire('config')->GraphqlEndpointID === 123) { // some bussiness here } I am a bit confused though. One of selling points of GraphQL is that there is only one url that you need to deal with. It's just `example.com/graphql/` and nothing more. No more this GET example.com/graphql/skyscrapers/ GET example.com/graphql/skyscrapers/{id} POST example.com/graphql/skyscrapers/ PUT example.com/graphql/skyscrapers/{id} PATCH example.com/graphql/skyscrapers/{id} GET example.com/graphql/architects/ ... It's only one endpoint for everything you need. That's actually is the way it is encouraged to build GraphQL api. Also it is only one HTTP verb you need to use, which is POST. You can stop thinking about dealing with PUT, PATCH, HEAD, OPTION and more. You only need this with GraphQL. POST example.com/your-endpoint-url/ And that's it. One HTTP verb and one url to rule them all .
    2 points
  12. Considering how costly and time consuming installing a security cert was up to only quite recently, it is so much better now. On my blog, I use a CloudFlare free account which comes with free https as well, which is one way of doing it. Recently I signed up with the same hoster that I use for the blog, to host an intranet I'm building for my current employer, and it turns out they now offer 1-click Let's Encrypt certificates. And it really is that easy - one click, wait a few seconds, and it just works. Not been live long enough to see how renewing the cert goes, but I don't anticipate any issues. FYI the host is Vidahost, with their 'cloud hosting' packages. (They also offer one-click PHP version change - the intranet is running on this week's latest PW version under PHP 7.1, and it all works great!)
    2 points
  13. Something like this? Soon to be released, I hope
    2 points
  14. I would have googled it...;) http://stackoverflow.com/questions/15628305/creating-a-table-of-contents-in-php http://www.10stripe.com/articles/automatically-generate-table-of-contents-php.php https://css-tricks.com/automatic-table-of-contents/ https://www.princexml.com/forum/topic/1200/generating-a-toc-with-php regards mr-fan
    2 points
  15. Great idea, this should be included (as default) into the module as it would fix almost all issues I had with pagwtables. Thanks!
    2 points
  16. Last update: June 2024 Current stable version: 1.5.4 Dev version: github dev-branch You can find the module on Github and in the modules directory : https://modules.processwire.com/modules/duplicator/ https://github.com/flydev-fr/Duplicator/archive/master.zip Screenshots / Features Dir and files exclusion CRON job Advanced settings Local and Cloud storage duplicator.mp4
    1 point
  17. NOTE: This thread originally started in the Pub section of the forum. Since we moved it into the Plugin/Modules section I edited this post to meet the guidelines but also left the original content so that the replies can make sense. ProcessGraphQL ProcessGraphQL seamlessly integrates to your ProcessWire web app and allows you to serve the GraphQL api of your existing content. You don't need to apply changes to your content or it's structure. Just choose what you want to serve via GraphQL and your API is ready. Warning: The module supports PHP version >= 5.5 and ProcessWire version >= 3. Links: Zip Download Github Repo ScreenCast PW modules Page Please refer to the Readme to learn more about how to use the module. Original post starts here... Hi Everyone! I became very interested in this GraphQL thing lately and decided to learn a bit about it. And what is the better way of learning a new thing than making a ProcessWire module out of it! For those who are wondering what GraphQL is, in short, it is an alternative to REST. I couldn't find the thread but I remember that Ryan was not very happy with the REST and did not see much value in it. He offered his own AJAX API instead, but it doesn't seem to be supported much by him, and was never published to official modules directory. While ProcessWire's API is already amazing and allows you to quickly serve your content in any format with less than ten lines of code, I think it might be convenient to install a module and have JSON access to all of your content instantly. Especially this could be useful for developers that use ProcessWire as a framework instead of CMS. GraphQL is much more flexible than REST. In fact you can build queries in GraphQL with the same patterns you do with ProcessWire API. Ok, Ok. Enough talk. Here is what the module does after just installing it into skyscrapers profile. It supports filtering via ProcessWire selectors and complex fields like FieldtypeImage or FieldtypePage. See more demo here The module is ready to be used, but there are lots of things could be added to it. Like supporting any type of fields via third party modules, authentication, permissions on field level, optimization and so on. I would love to continue to develop it further if I would only know that there is an interest in it. It would be great to hear some feedback from you. I did not open a thread in modules section of the forum because I wanted to be sure there is interest in it first. You can install and learn about it more from it's repository. It should work with PHP >=5.5 and ProcessWire 3.x.x. The support for 2.x.x version is not planned yet. Please open an issue if you find bugs or you want some features added in issue tracker. Or you can share your experience with the module here in this thread.
    1 point
  18. There's this one...which you contributed to ....
    1 point
  19. There is not need for different endpoint for users with different roles. The module does not have any authentication/authorization logic on it's own. The users that will be able to authenticate with this module are the same users in your ProcessWire installation. When I mentioned implementing authentication, I was talking about logging in via GraphQL api, like via AJAX. In reality it will be the same $session->login('username', 'password'), nothing more. No, no. Of course not. I am sorry for the confusion here. Legal templates mean legal for the api. It does not mean it will make it available to the public. Like I mentioned earlier the module checks if the requesting user has permissions to view, edit, create and etc. If say you select user template as legal. It does not mean it will be public. It means it is available via api to those who are authorized to view it, authorized via ProcessWire's access control system. I personally don't think there is even a need for the legal templates option. But it is helpful if you have too many templates and selecting only few can reduce the schema size and make api faster. I think there is a bit confusion about this. I want emphasize that this module does not make any data public, nor does it anything private. That is not the module's concern. The module's job is to make your data available in a JSON format, in addition providing the ability to consume that JSON data via GraphQL api. If the user does not have permissions to view a certain page according to ProcessWire's access control system then he won't be able to fetch it. The same goes for fields. When implemented the user will be able to access only those fields that he is authorized via ProcessWire's access control. But I will add an option for legal fields also, because that also could help reduce the initial schema size.
    1 point
  20. v.0.1.4 : Fix issue FontIconPicker inside repeater
    1 point
  21. Update: Working with this setup I found that installing modules with the installer from the admin did not work because php-zip module was not installed. I fixed this and pushed the new image and Dockerfile to dockerhub and github.
    1 point
  22. No its a notice - it only shows up as an error because I am running Tracy in strict mode. These are my settings:
    1 point
  23. That isn't valid syntax for whitelist(). See the docs: https://processwire.com/api/ref/wire-input/whitelist/ The syntax is valid here, but you'll be overwriting the same whitelist key in each iteration of your loop. I think you want to set an array to the whitelist key, e.g. $san_array = array(); foreach($input->get->st as $st) { $san = $sanitizer->selectorValue($st); $san_array[] = $san; $selector .= "projectStatus=$san, "; } $input->whitelist('st', $san_array); // later, call renderPager() with arrayToCSV set false // or do as Ryan suggests: https://processwire.com/talk/topic/1883-how-to-use-input-whitelist-with-checkboxes-or-any-array/?do=findComment&comment=17706 echo $works->renderPager(array('arrayToCSV' => false)); For the other issue regarding setting the selected attribute of the checkbox you'll want to use in_array.
    1 point
  24. A similar topic with some solutions:
    1 point
  25. Hi Tyssen, if your are looking to backup the website rather than looking for an advanced feature like the deployment/installer, the first version which give us the possibility to to do so should be ready very soon out for a beta test. And if you have a wishlist and/or suggestion that should be implemented, feel free to reply on the dev topic.
    1 point
  26. @Mike Rockett, thanks for the info. I asked my host about Let's Encrypt certificates and they said they been providing free SSL certificates for all accounts for the last three months. Must have missed the announcement. Looks like the certificate is by Comodo via cPanel. Not sure what the pros and cons are versus a Let's Encrypt certificate but a check on SSL Labs gave it an "A" so sounds good enough to me.
    1 point
  27. @Robin S - I'm using a local hosting company called Elitehost here in SA. They told me Let's Encrypt is built into their WHM/cPanel instances (v60) on all servers. My only gripe is with regards to subdomains. The LE system auto-issues certificates once per day, so I have to wait after having created a subdomain. If it's urgent, though, then someone on the support team will do it manually for me.
    1 point
  28. No problem - don't forget to watch out for upgrades to the module Btw, another approach to I think what you are looking for: Currently it only works when the children and direct child pages, but it would be easy to customize to a different branch parent. Maybe you prefer the approach you have and I think I agree with you for your use case, but this is just another option, maybe for a different project.
    1 point
  29. Ok, fixed it using your RestictTabView module and just removed the two 71: if($this->user->isSuperuser()) return; ... 96: if($this->user->isSuperuser()) return; cases Thanks a lot!!
    1 point
  30. I was using the forum's search. But google defiantly looks like a better option
    1 point
  31. If the only place you use headerSwap() is in your home template file, then you could just use your code directly. No real need to use the function. There are other ways to go about this, btw.
    1 point
  32. Brilliant! Keeping up with the theme of learning....I can't stress enough the importance of debugging and testing your code. We have 2 great utilities in ProcessWire (besides PHP itself) to help us with these, namely $config->debug = true and Tracy Debugger. If you were testing with Tracy, she would have shown you where the error was, to be precise, these 2 PHP notices. Undefined variable config Trying to get property of non-object in... Why is this happening? Remember, you are including your *.inc files within the context of a function headerSwap(). Regarding the first notice, this takes us back to what I stated earlier; headerSwap() does not know what $config is. That variable is out of scope. In respect of the second notice, you are then saying give me the properties 'urls' and 'templates' of this variable $config. That will obviously fail, since notice 1# has already told us headerSwap() does not know what $config is. The solution, is as before. In fact, the hint was in your statement: ProcessWire 'cant' access. So, we give it access. As simple as this in your *.inc files: <?php echo wire('config')->urls->templates?>/main.css ?> Now you can call your function (see the suggested code in my edited post above): headerSwap($page->url);
    1 point
  33. Or...if those items within each list are some child pages or some items in page fields (those are the usual approaches), all you need to do is to generate them in your template file. For instance, if you had the following site structure: Home Categories Tanks and Spaghettis T-Shirts and Polo T-Shirts Brands Apple ASUS Mobile Phones Mobile Phones Android Phones Foot wears Sports Shoes Casual Shoes Books Literature and Fiction Competitive Exams In template, you would do something like this. $items = $pages->find('some-parent-template');// this is the template for Categories, Brands, etc... foreach($items as $item) { // some code here...to build Column Headers foreach($item->children as $child) { // code here to build list } }
    1 point
  34. This footer looks like it contains lists of links. My first thought would be to create a repeater field "footeritems" consisting of a text field "label" and a page field "links" configured to hold multiple pages. Then you add a repeater item, give it the label "Category" and add all the pages like "Tanks & Spaghettis", "T Shirts & Polo T Shirts", ... Your PHP template then only needs to loop over the repeater, output the label as the heading and the pages as list items. Of course, this assumes that all the links shown exist as actual pages and not just URL segments. foreach($page->footeritems as $item) { echo "<div class='uk-panel'><div class='uk-panel-title'>{$item->label}</div><ul>"; foreach($item->links as $link) { echo "<li><a href='{$link->url}'>{$link->title}</a></li>"; } echo "</ul></div>"; }
    1 point
  35. Another quick update. Both the new "Copy Repeater Items To Other Page" and "Copy Table Field Rows To Other Page" actions now include an optional selector so you can define what repeater items / table rows will be copied.
    1 point
  36. Just finished improving the exclude feature. You can now exclude multiple dir, files, or excluding files by extension.
    1 point
  37. I hope you seriously get this working. I would gladly support a commercial module with the feature set listed. Good luck, as always.
    1 point
  38. You couldn't be more precise! GraphQL and ProcessWire fit each other very well. All this module does is just maps the ProcessWire's fieldtypes with GraphQL type system. It literally tells GraphQL that FieldtypeText is a StringType, FieldtypeDate is DateType and so on. And for getting the data, on average, it is less than a single line of code . Since you can access value of a page field like $pages->$fieldName all primitive fields inherit a method for accessing data from one place. I sure having lots of fun writing this module. I agree with Drupal "godfather" totally. The need for quick bootstrapping of an api service with flexible content structure is in very high demand. I had a hard time landing a job as a ProcessWire developer. So I target myself as a full-stack SPA developer in React.js/Node.js. I tried many of open source REST frameworks in Node.js that would help me get started with a project quickly. But non of them offered enough flexibility for my style of programming (I guess ProcessWire spoiled me ). At the time I figured out the best way to build REST api in Node.js I found out that REST is not flexible either. When an app starts evolving REST gets very messy. The Github built three versions of their REST api and still are not happy with it and now decided to release a GraphQL api which probably will not introduce breaking changes in the future, because GraphQL is designed that way. I think if made correctly, this module could bring a great value to many ProcessWire users. That's right. That is the main goal of this module. I will eventually implement all the features that needed to build a complete SPA with this module. I just try to move carefully and a usage feedback from community would help a lot. Just installing it and making couple queries to confirm that it works as expected would be great.
    1 point
  39. Thank you very much for this module, @Nurguly Ashyrov! I missed this graphql thing completely, though was messing around json api a bit. Had some great time reading about it. Seems like ProcessWire fits graphql like a glove. Your module should answer a lot of recent questions about integrating PW with vue.js and alike. Dries Buytaert, the Drupal "godfather", has a nice article in his blog about the necessity for a contemporary CMS to have support for web-services built in. And his choice seems to be graphql and json api. I am sure that improving and promoting PW as a "headless CMS" kind of thing is something that could bring a lot of frontend developers to use PW. This module is the perfect start. As I understand, mutations are a way to not only read, but write data? If so, that is certainly worth implementing, so a complete SPA could be possible with this graphql module alone.
    1 point
  40. I always though graphql would only be for qraph databases, but really this looks damn rad.
    1 point
  41. First of all, I think this looks great. I'm not entirely sure if I'll ever need something like this personally, but a module like this would no doubt be useful for some cases To my best understanding the main point Ryan was making about REST was that since it's easy to add new views (or whatever you choose to call them) for a ProcessWire site, a separate module doesn't make as much sense as it does for a system that doesn't provide similar flexibility. I've got some, albeit very limited, experience with the REST API in WP, and in their case it definitely makes a lot of sense. There's also the question of security: there may be cases where something is technically speaking public, but not accessible via your existing web site, and a "generic" REST API could result in some surprises there.. and, of course, if it's not read-only, that's a whole another thing to worry about. All that being said, I'm looking forward to seeing where this module goes. An easy-to-use plug-n-play GraphQL API sounds like a great thing to have in one's toolbox
    1 point
  42. I don't know much about GraphQL but I want to learn more, and your module looks like it will make it easy to get started with in PW. So definitely interested.
    1 point
  43. Nice. Those UIkit PHP functions will be a real bonus for anyone using the profile as the starting point for a website. I like the dummy text - what generator did you use?
    1 point
  44. Currently the module is functional, I use it on every site and it work quite well, no error since November. At this moment only ProcessWire >3.0.0 is supported but I was planning to release it being compatible with 2.7. What you can do with the module (working features) : You can modify package's settings : name of final filename, ignore some folders, set a maximum number of packages, remove older packages and trigger the backup function with LazyCron or PwCron. Save the package in a local folder Upload package to Dropbox Upload package to GoogleDrive Remove packages from those cloud services (depending on the configuration set) *A package is a ZIP file bundled with a database dump and a full website directory dump (site, wire, etc) I think I will finish the first public version and we'll see what happens as I tested the @arjen's fork of @rot's module and didn't managed to get it working as expected. I also find my module more "simple" to use; I mean you set options, check some checkbox, set a cronjob, click submit and let it run. Also I saw some good features like emailing the logs on failure that could be added easily. I'll look at the module a little closer this afternoon. Thanks for your input guys.
    1 point
  45. Loving my host so much -- they automatically enabled LetsEncrypt for every single one of their clients on shared and reseller hosting with automated renewals. Interesting thing is that they didn't announce it or place a readme in the skeleton directory for new accounts. Nonetheless, it's there, and it works really well. All I have to do is force HTTPS. ??
    1 point
  46. @thomas, I created a module that allows image and file fields to be used in inputfield dependencies.
    1 point
  47. definetly! have posted an issue on github. PS: welcome to the forums!
    1 point
  48. My main focus was to reducing visual clutter and to add whitespace to help convey hierarchy, grouping and meaning of elements. I'd like to extend this theme to prove several colour combinations (like AdminThemeDefault does). I went with this colour scheme hoping it might tie in nicely with the proposed redesign of the processwire.com website (especially the dark concepts)
    1 point
  49. Currently there isn't a way to change the published 'created' date, short of changing it directly in the SQL. PW only sets this field the first time a page is saved, and then doesn't include it in any future saves. Though I could certainly change that. But if you are working this weekend, here's how you could do it with SQL: <?php $page = $pages->get("/page/you/want/to/change/"); $time = strtotime("2011-04-23"); // or whatever date you want wire('db')->query("UPDATE pages SET created=$time WHERE id={$page->id}");
    1 point
×
×
  • Create New...