Jump to content

Making PW more userfriendly


NorbertH

Recommended Posts

I think it is terribly easy to clutter up a ProcessWire installation with a huge amount of information.

One thing that is important to remember is that ProcessWire is not WordPress and is not aimed at the casual blogger with little knowledge hitting an install button on their CPanel.

ProcessWire is a true CMS in that it is a system that manages content - whatever that content is.

Because it is agnostic about the nature of the content, by nature it requires a certain amount of development input post installation - in other words, its strength is that it does not try and force you down a certain route.

Consequently, it really is a development CMS, even though it is incredibly easy to learn even for non-developers.

So, I agree with Diogo just above that all that is required is links to useful tutorials and for the actual installation to be as clean as possible.

As an additional note, I would like to see a way of reverting the installation to a clean state. So, for instance, you can install with demo content, or maybe a third party tutorial profile, but once you have finished, you can press a destructive button to "install clean profile."

This effectively removes all trace of the existing profile, wipes the database (keeping the admin user details) and gets you back to a blank install.

This button would, of course, need to be available as part of the disposable profiles and not there by default! Would not want any accidents...... 

  • Like 12
Link to comment
Share on other sites

@joss Wordpress is no longer aimed towards "casual bloggers". It's used to power millions of sites ranging from personal blogs to full blown websites. It's chosen by developers and businesses around the world because of it's (perceived) ease of use and its large share of the market which results in better support.

Processwire isn't truly "agnostic". You still have rules and boundaries which shapes the way you work. In Processwire, it's pages, templates and fields. In Drupal it's nodes, taxonomies, blocks and views. These tools has to be introduced in some way. External documentation should always be the last resort. It takes you away from the moment and makes you lose context. I think ProcessWire has the potential to be one of those CMS that "just makes sense" from the start. Just adding a small intro text when you first install it, like you suggest, would be a huge leap in the right direction.

Coding isn't something unique to PW. The people who show interest in PW has probably already coded in another CMS by modifying a module/plugin or adding a bit of PHP to a view in Drupal. This has probably been a horrible experience and we need to make sure people understand how coding in PW is not the same thing as trying to hack a module someone else wrote. You'll get results faster in Wordpress, but then you have to tweak it in order to get it right. In PW, getting that initial result will take you some time but then it will turn out exactly like you wanted (and the underlying code makes sense, since you wrote it). I think the key to success is to make that initial learning curve as painless as possible.

  • Like 1
Link to comment
Share on other sites

External documentation should always be the last resort. It takes you away from the moment and makes you lose context.

I have to disagree here. External documentation gives you context. The moment might be important but it's for sure not the most important.

I think the key to success is to make that initial learning curve as painless as possible.

The learning curve will be lower if people read the documentation first.

  • Like 3
Link to comment
Share on other sites

@joss

In Processwire, it's pages, templates and fields. In Drupal it's nodes, taxonomies, blocks and views. These tools has to be introduced in some way. External documentation should always be the last resort.

It's been long since I last tried Drupal (version 6 / 7), but I can't remember those types being better introduces than templates and fields are in ProcessWire: A small explanation text somewhere in the navigation. 

Secondly, external documentation is, after the first few moments, key, as you don't want to have guidance all the time as developer, but you still sometimes need to see code examples. If I'm presented with a siteprofile, which installs extra stuff, I don't use it, because I only want to use stuff I really need. Wordpress is not successful because of it's good admin interface, which helps the developers/users. In fact it's mostly a pain to see all those plugin interfaces stiched together. It's mostly the sense of already available solutions which drive the success.

Link to comment
Share on other sites

I think all this discussion is very valuable, but everyone knows my opinion by now. I will try to resume it with an allegory.

When you were at school, I'm sure you had to read some classical books for your native language class and probably bought those small resumes. The purpose of those resumes was to put things in context and explain some trickier parts AFTER you read the book, but some of my coleagues colleagues (not me Innocent.png ) read only the resume and not the book. Some had average results, and some had bad results, but none had a good result. Maybe if those resumes wouldn't exist, they would be forced to read the book and have good results, of course they might not read the book at all and have all bad results, but that would be their own fault right? The point is: we can of course try to make things easier for new users, and some can be really useful and important, but we should be careful not to make things look easier than they are by hiding the complexity under the carpet.

  • Like 5
Link to comment
Share on other sites

The learning curve will be lower if people read the documentation first.

The learning curve would be even lower if there was no need for documentation for simple tasks at all. In my opinion any CMS should aim for such high usability standards that creating a simple site with pages, news/blog, forms, and gallery, based on a default install should be possible without having to learn anything that is beyond general content creation standards.

That is what a user friendly CMS is about in my opinion: making it easy to do core content creation without having to study. I am not talking about learning to find your way around in a new admin, but I mean having to really study because otherwise you cannot figure out how to create basic content.

Of course PW can choose to be a system for devs, and add some form of threshold on purpose, by not making it easy for non-dev beginners. Offering a system that requires a decent amount of effort to even begin with basic stuff, would be a valid decision. But that should be made very clear on the website. Texts like "ProcessWire is designed to have an approachable simplicity [...]. From the surface, there is very little complexity and the application requires no training" are simply not true, reading it from a general public's point of view.

Link to comment
Share on other sites

The learning curve would be even lower if there was no need for documentation for simple tasks at all. In my opinion any CMS should aim for such high usability standards that creating a simple site with pages, news/blog, forms, and gallery, based on a default install should be possible without having to learn anything that is beyond general content creation standards.

No. It shouldn't.

Sorry, but this discussion is getting weird. The "more user friendliness party" is trying to make a race car suitable for the average driver. Not everything in life you come across is easy to apprehend nor should it be. There is enough stuff out there that is "everybody's darling", mostly weak average stuff that - if you dive deeper - causes more problems than it solves.

Being based on coding skills belongs to the core strengths of PW. This is not a replacement for Squarespace or any other out-of-the-box website building system. And there is no need to become the next WP. Why not? Because WP is already there and does a good job. The market gap for PW is for advanced developers seeking for a precision tool where the sky is the limit. Unfortunately this requires a minimum learning effort of let's say half a day. If you can't effort that, there are plenty alternatives.

Thanks.

  • Like 8
Link to comment
Share on other sites

@diogo

I like you're example. I think ProcessWire in itself is already damn easy. The only thing we can really improve regarding the learning curve by now is by helping users to find answers to their questions. For beginners the ProcessWire API Docs at http://processwire.com/apigen/ are way overkill while I just discovered there, that a Fieldgroup extends WireArray and I can use most of the methods I use with pages. Otherwise Ryan's new tutorial on templating or Joss one on installing a css framework are really viable explanations for beginners. I also often use the explanations here: http://processwire.com/api/variables/ because they are a little more, than just a table of available functions. 

What's maybe missing is some kind of "this stuff helps you to dive in as beginner", "this stuff is improtant for module developement", because there is already lots of documentation, but it's a little bit scattered around the site / forums. Kinda like a book, where capters are mixed up. 

 making it easy to do core content creation without having to study

Content creation is quite simple in ProcessWire. Create the needed fields, than combine them to templates. Create a page and fill in the content. This doesn't need much of explanation. The more unusual part is the templating. But to be honest, I don't know how you would create templates in any cms without previously looking at the docs or at least some other form of tutorial.

  • Like 1
Link to comment
Share on other sites

That's why I added to last paragraph :-)

I totally respect and understand any decison regarding the targeted users for PW. But it appears there are different opinions about the (real or perceived) "status" of PW with regards to "usability for non-devs". Hm.. I don't think that's good English. But I hope you know what I mean. Right now PW is targeted at devs and "aspiring amateur devs". Which is fine. But it would be good to make that perfectly clear on the site, and explicitly state that you HAVE to do some sort of (real or pseudo) coding to build a site with PW. That saves you guys also from annoying newbie questions in the forums, who thought that PW is an alternative for systems like WP, Joomla, WebsiteBaker, CMS Made Simple, etc.

  • Like 1
Link to comment
Share on other sites

The learning curve would be even lower if there was no need for documentation for simple tasks at all. In my opinion any CMS should aim for such high usability standards that creating a simple site with pages, news/blog, forms, and gallery, based on a default install should be possible without having to learn anything that is beyond general content creation standards.

The assumption based CMS is not a strategy that fits to the ProcessWire core, but could be build on top of the framework using Modules & such. It could nicely live in the environment called ProcessWire. But there are certain tasks a user without knowledge shouldn't do, one of it is installing & configuring in a web-development environment.

If you have real good vision of what you want to see and how it should work, you should write an extensive plan. Maybe with someone out the community you can build what you envision. Keep in mind that this is a lot of work, so commercial interest is something that can count here. Writing a comprehensive strategy is IMOH  better than complaining about a system that's not meant to be 1 2 3 click I finish my website.

ps, ProcessWire is Easy !

  • Like 2
Link to comment
Share on other sites

@argos

But it would be good to make that perfectly clear on the site, and explicitly state that you HAVE to do some sort of (real or pseudo) coding to build a site with PW.

 
I disagree and don't see any need for this. People will find out by themselves easily. No need for a warning sign: "Stop! Think twice! Apprehending ProcessWire could cost you some time and there is a chance you may feel disappointed!" 
 
Please don't misunderstand me, I'm not against accessibility. But please don't confuse this with "usability". If the documentation could be more accessible, than let's improve it. But your former statement addresses the core of PW:
 

In my opinion any CMS should aim for such high usability standards that creating a simple site with pages, news/blog, forms, and gallery, based on a default install should be possible without having to learn anything that is beyond general content creation standards.

 
As I said, I strongly disagree with this statement. Not everything has to adapt to the lowest level possible. That has never been a good idea.

  • Like 2
Link to comment
Share on other sites

complaining about a system that's not meant to be for the 1 2 3 click I finish my website.

I am not complaining at all, nor do I think PW should be a system for non-website builders, nor am I such a person myself. Please don't feel attacked if I have some criticsm about your favorite tool. My aim was to help PW forward by telling what I as a non-coder would like to see, and what I miss in PW from my own perspective.

However, the typical response I get from most hardcore users is some form of passive attack: "It's you. PW is great, and you just should put more effort in it, and that you will see the light". Well maybe. But that's not the issue. The issue is that I don't WANT to have to put effort in it to create even a simple site. But if Ryan and other contributors decide not to put effort in making PW more easy for creating basic websites, that's fine. Hey, it's your product. My only advise is to make your position on this more clear on your site, and not market PW as you do now. I really thought PW was another kind of platform than it turned out to be, and I based that on the information on the website.

  • Like 3
Link to comment
Share on other sites

The learning curve would be even lower if there was no need for documentation for simple tasks at all. In my opinion any CMS should aim for such high usability standards that creating a simple site with pages, news/blog, forms, and gallery, based on a default install should be possible without having to learn anything that is beyond general content creation standards.

 

Usability is not the same thing as a 1-click install. You will (and should) need to code your own gallery in PW. That's the whole point of PW and what makes it flexible. Processwire needs to get better at aiding you in the process of learning how to do this, though.

That is what a user friendly CMS is about in my opinion: making it easy to do core content creation without having to study.


Agreed. You should be able to create a template, add fields, attach a page and visit that page (with correct output rendered) without having to read through any documentation. However, it's not achieved using modules. It's achieved using helpful code examples and a well structured default theme (amongst other things previously mentioned)

Link to comment
Share on other sites

My aim was to help PW forward by telling what I as a non-coder would like to see, and what I miss in PW from my own perspective.

Just to make sure, this is not heading in the wrong direction: I'm convinced, everybody in this thread and in the community values your perspective. Thanks for contributing - even if many - including me - seem not to share your standpoint. 

  • Like 4
Link to comment
Share on other sites

An example, This morning I took a 4 hour online course on "CSS: Frameworks and Grids".  I took it because I wanted to better understand the subject.  It was very beneficial, to me, because the course filled in the gap of knowledge about CSS Frameworks and Grids that I still didn't have prior to taking the course.

That course and any others that I take helps me in developing websites for myself and clients.  I put the time and effort into stuff I believe are important to my success.  I have no problem investing in myself.  Other people may not have to take courses to understand these subjects and I have no problem with that.  I studied PW for over a year before I felt that I partially understood what was going on.  I have a sandbox of domains where I practice and practice my web development skills.  Some things I still don't understand and I will take a course/courses, buy a book/books, read a bunch of articles, study source code or learn from following the forum (where others have solved a problem).  When I learn more about PHP, Javascript, Jquery, MySQL, CSS3 and HTML5, I increase my marketing value in a world of developers.  PW has actually done me a great favor in that it requires a level of knowledge to work with it.  I would never have taken the time to relearn the basics if it wasn't for PW.  I owe Ryan Cramer a debt of gratitude.

I'm a subject matter expert on a lot of things in Information Technology (IT), Networking or Communications worlds (and this is not me thinking I am, but based on documented fact).  All that experience and knowledge doesn't make learning PW or PHP any easier and I still have to put in the time to learn the basics that apply to PW.

I've done work in WordPress, Drupal and Joomla.  They are very popular because knowledgeable developers have crafted modules and plug-ins that let anyone easily put together a website.  Is the resulting website secure?  Maybe or maybe not.  That answer is always based on the knowledge level of the person developing the website.  You have to know what and why you are dong things.  As I said the other day, it's not magic.  Good website developers have no problems with the learning process.  I left those CMS because they required you to do things in a very structured way. PW frees you from all that BS.

I hope everyone is successful using PW, however I know they won't be unless they invest some time into learning the basics.  There's a level of understanding that everyone is required to achieve before they can successfully utilize PW.  We can wish all day that there shouldn't be a level of knowledge you need.  PW is basically PHP with a prettier interface and a dynamic API.  If you already know PHP you won't have any problems with PW.  If you know the other basic building blocks of web development you are well on your way.  Not learning PHP is not an option where PW is concerned.  Take it another way, if anyone took the time to learn PHP they would be remarkable with WordPress, Drupal, Joomla and a host of the most popular CMS in the world.  They are all built on PHP.

This is a great and vibrant community where the knowledgeable have no problems helping others understand the basics.  That's what is going on in the PW forum on a daily basis.  These are professionals who utilize PW to make a living.  They don't have to share their knowledge, yet thankfully they do.

To summarize, learning is important.  If you don't value the learning process then theres nothing anyone can do for you.

  • Like 10
Link to comment
Share on other sites

I think all this discussion is very valuable, but everyone knows my opinion by now. I will try to resume it with an allegory.

When you were at school, I'm sure you had to read some classical books for your native language class and probably bought those small resumes. The purpose of those resumes was to put things in context and explain some trickier parts AFTER you read the book, but some of my coleagues colleagues (not me Innocent.png ) read only the resume and not the book. Some had average results, and some had bad results, but none had a good result. Maybe if those resumes wouldn't exist, they would be forced to read the book and have good results, of course they might not read the book at all and have all bad results, but that would be their own fault right? The point is: we can of course try to make things easier for new users, and some can be really useful and important, but we should be careful not to make things look easier than they are by hiding the complexity under the carpet.

Just don't ask Diogo about browser back buttons! ;)

Link to comment
Share on other sites

I think I may get rid of the tooltips and just going to add those textboxes like on the  "home" site to "fields", "templates" and "pages" with a short description what it is ad how to create it. It shows until you hit the x (each textbox would get it's own x) or uninstall the module. On the bottom of each of those textboxes I would add a "read more" link to the docs page of the specific topic.

So you would have kind of a little instruction but it wouldn't be as annoying as the tooltips. What to you think?

  • Like 2
Link to comment
Share on other sites

My only advise is to make your position on this more clear on your site, and not market PW as you do now. I really thought PW was another kind of platform than it turned out to be, and I based that on the information on the website.

I'm wondering how many people have the same experience.

  • Like 1
Link to comment
Share on other sites

I really thought PW was another kind of platform than it turned out to be, and I based that on the information on the website.

since i come from the same former as argos - i've to write some different letters.

like written i'am a "non-coder" too with limited skills but kinda like "mud grubbing" on code to learn new things!

(and love to think abstract and crossways and listen and read to people that know more -  so i get most things i need sorted)

the actual homepage of PW says for the mainreasons to choose PW:

1. Build Bigger, Faster, Stronger, Easier.

->Impression: Yeah its a good slogan but how it serve my needs?

-> Ok thats says nothing about the techical side of the product - this could even placed on the the typo3 homepage wich is a real complex system for content

2. A friendly and powerful open source CMS with an exceptionally strong foundation.

With all custom fields, an easy-to-use jQuery-inspired API, and a powerful selector engine, ProcessWire will rise to any task.

->Impression: friendly & powerfull sounds a bit like "captain planet" ->strong foundation...hmm we will see - custom fields...interesting - what is a jQuery-inspired API??? - what is a selector engine??? rise to any task? ===> now i'm really curious!

-> Ok this sounds not like a normal CMS - API such things only named on PHP frameworks...not on a joomla, drupal or wordpress homepage.....hmm read on

3. last paragraph of intro:

Managing and developing a site in ProcessWire is shockingly simple–and fun–compared to what you may be used to. What makes ProcessWire different?

->Impression: hmm i just wanna know now how it works and where is the fun...more curious ok read the Whats different stuff!!

-> So far so good--until now we read about fun, developing, API, selector-engine ->get in the end to this video:

http://processwire.com/videos/overview/

This video shows _not_ here you can install a theme with one click - here you add some fancy stuff......!! this video shows the real power under the cover!

So for me after 30 minutes reading and watching some videos.....i get a "friendly and powerfull" feeling that i read about in the 2. part of the homepage!

For me as a non-dev landing on the PW homepage - everthing is clear -

  1. there is a API (hey an API -> i have to code let's look if i can take this stuff....until now a have a little bit fear of this API thingy)
  2. there is a naked/fast/foundation as backend (ok -> no problem i like minimal effort on tools)
  3. all is a page and a field - i can create what i want----> ohhhh hmm that give me power - but more power is more responsibility - can i manage this?
  4. this is no "normal" CMS

beeing disappointed depends on what you expect - not what you find!

I'm sad that PW not fit your needs - in a few days my first website will go online - i've managed some parts (easy forms, image managment, small newssystem) that i missed for building small websites, argos have a look in the showcase section i will explain deeper what i did next week.

best regards mr-fan

  • Like 5
Link to comment
Share on other sites

@Nico

I think the boxes could be a good addition to a default / first run install. It helps some people and all the others hit "X" and deinstall, maybe this could even remove the files, or most of them. The tooltips on the other hand could be in a second module, if someone really wishes a guided tour. Adding the module via the new module installer on their own shouldn't be a problem, can be explained, and they even learn how to install a module on the way. Think of it as a advanced tutorial. But I'm not sure how much people would actually use such a module.

  • Like 1
Link to comment
Share on other sites

I feel we're running in circles... For the last time I will try to sum up my point of view. Not to keep "complaining", but to make myself clear, as I feel I get reponses that don't match what I said.

1. I agree disappointment has two sides: expectations about the system and the system itself. Based on what I had read and my own skills, my testing week with PW has led to some kind of disappointment. Not in PW itself (which seems to be more powerful than I will even know), but in what I had expected based on what I had read.

2. I had expected a powerful framework/platfom/CMS for COMPLEX tasks, PLUS some sort of easy way of working with PW (or ready to use functions) for mundane tasks like creating pages, blogs, galleries, forms. As it turned out to be the second assumption is not true (although a lot of experienced PW users seem to disagree with this, but that is in hindsight, and many times people tend to forget or justify past struggles and efforts).

3. Therefore I propose to EITHER add some way of ready to use module-like way of simply creating regular content types like page, news/blog, galley and form to build a regular semi-static type website that powers most of the internet. OR to not do that and deliberately aim for (pseudo) coders that are willing and capable of starting from zero by creating a site with PHP/PW from scratch.

I did not and do not propose to low level PW into some 1-2-3-click website for non-sitebuilders, as some have suggested. I just suggest that PW takes a stand on what is wants to be, and take actions according to that.

Should it be a CMS that even non-dev website builders coming from other CMS's can use for creating run of the mill sites without coding? Then it should have more or less ready to use regular content type thingies.

Should it be a developer platform, that even could be used by non-devs who are willing to learn to code to some extent? Then this should be better made clear on the site.

Now it's a developer platform that suggest it's also a ready to use CMS, besides a platform. It's not. And that may lead to disappointment for some beginners, and also to annoyment for experienced users that see non-coding newbies enter the forums with questions and support requests that could have been prevented.

  • Like 1
Link to comment
Share on other sites

I am not complaining at all, nor do I think PW should be a system for non-website builders, nor am I such a person myself. Please don't feel attacked if I have some criticsm about your favorite tool. My aim was to help PW forward by telling what I as a non-coder would like to see, and what I miss in PW from my own perspective.

However, the typical response I get from most hardcore users is some form of passive attack: "It's you. PW is great, and you just should put more effort in it, and that you will see the light". Well maybe. But that's not the issue. The issue is that I don't WANT to have to put effort in it to create even a simple site. But if Ryan and other contributors decide not to put effort in making PW more easy for creating basic websites, that's fine. Hey, it's your product. My only advise is to make your position on this more clear on your site, and not market PW as you do now. I really thought PW was another kind of platform than it turned out to be, and I based that on the information on the website.

I can only speak for myself, but i did -or do- not feel attacked. There just seem to be some differing opinions on what constitutes a CMS and what is easy with regards to creating a basic site. I think PW hits both check-boxes, you do not. I don't think there is a letter of misleading info on the website, you do.

I've never done much in say Wordpress or Joomla but from my short experiments i always got the impression that every CMS will require some coding to make it do what you want, with maybe the exception of just grabbing a pre-made template and running with that.

It's possible that these systems work better for you but that does not mean that PW can't be advertised the way it is.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By spercy16
      I was previously using individual fields to capture and output multiple cards onto my web page but after recently learning about repeaters would prefer to use this field type, as it will be a lot more user friendly for end users to create new cards. I tried to modify my code to grab the fields from the new Repeater field(s) but am getting this error message on the page:
      Here is the code I'm currently trying to use for the cards:
      <?php // https://processwire.com/api/arrays/ // check if the array of images has items foreach($page->tall_card as $card) { $count = 0; $count++; $options = array( 'quality' => 70 ); $image = $card->image; $img = $card->image->size(550, 400, $options); $cardHeading = $card->title; $cardBody = $card->plain_paragraph; $raised = $card->raised_amount; $goal = $card->goal_amount; $link = $card->link; if ($raised == 0 ) : $percent = 0; else: $percent = $raised_amount / $goal_amount * 100; endif; if ($percent <= 5) : $percent = 0; endif; ?> <span id="card<?php echo $count?>" class="card"> <img class="cardThumb" src="<?php echo $img->url; ?>" alt="<?php echo $image->description; ?> Thumbnail" /> <div class="cardBody"> <div class="cardText"> <h2><?php echo $cardHeading; ?></h2> <?php echo $cardBody; ?> </div> <div class="progressBarSection"> <progress class="progressBar" id="progressbar<?php echo $count; ?>" value="<?php echo $percent; ?>" max="100"></progress> <span class="raisedAmount"> $<?php echo $raised; ?> usd </span> <span class="goalAmount"> $<?php echo $goal; ?> usd </span> </div> <div class="primaryBtn"> <a href="https://www.paypal.com/donate?hosted_button_id= <?php echo $link; ?> &source=url"> <button> <i class="fas fa-donate"></i> Donate </button> </a> </div> </div> </span> <?php } ?> Thanks in advance for any help!
    • By CachePuzzles
      Hi there,
      I'm probably missing something simple, but I'm just setting up my first site so I guess that's bound to happen.
      I've installed the LoginRegistration module and at first I was thinking that the confirmation emails weren't being sent. However I now see that new user confirmation emails are taking 20+ minutes to arrive. Is there a way to speed this up?
      Also the email is coming from processwire@mydomain - I couldn't found a place to change this.
      Any advice or help would be great!
      Brian
    • By humanafterall
      Hi,
      I would like to set an admin template to 'https only' as recommended in the Processwire security docs.
      However if I do this it forces this setting locally too, resulting in https://localhost requests which result in an error page.
      Is there a simple way round this? Setting https for templates in the config?
      Thanks!
    • By fruid
      Hi friends,
      just 7 months ago, I was "just" a designer and a rather semi-developer, still struggling with WordPress sites and more often than not delegating that work to pros. ProcessWire really helped me realising that it's not that hard after all (well it's still hard but it's doable) and you learn a lot just by doing it which has to be true for all developers anyway. So I started coding myself, I might also have to thank the 2020 pandemic to help me focus a bit more than usual, I created a bunch of websites using PW already – one of which I can't wait to put on showcases but it's still not live yet. That is one big personal milestone for me. The next milestone would be to give something back, and so I'd like to take on contributing some code I wrote, namely a event calendar for anyone to use. It's my first attempt doing this so please don't eat me alive. It's not a PW module yet (that's the plan however) just a git but I'm positive it will be useful once it works – well it works but it still needs more work – because if I had found a module that came close I wouldn't have started coding it myself :D
      With that, I will appreciate all input, be it how to improve the .js (probably especially), or the templates, or guidance how to proceed turning this into a PW-module, and of course, in that last process, no pun intended, suggestions to make it more versatile for different needs.
      git: github.com/bbblgmsp/ProcessEventCalendar
      demo: http://foobar.roofaccess.org/events/
      Thank you!
    • By Chris Bennett
      Hi all, I am going round and round in circles and would greatly appreciate if anyone can point me in the right direction.
      I am sure I am doing something dumb, or missing something I should know, but don't. Story of my life 😉

      Playing round with a module and my basic problem is I want to upload an image and also use InputfieldMarkup and other Inputfields.
      Going back and forth between trying an api generated page defining Fieldgroup, Template, Fields, Page and the InputfieldWrapper method.

      InputfieldWrapper method works great for all the markup stuff, but I just can't wrap my head around what I need to do to save the image to the database.
      Can generate a Field for it (thanks to the api investigations) but not sure what I need to do to link the Inputfield to that. Tried a lot of stuff from various threads, of varying dates without luck.
      Undoubtedly not helped by me not knowing enough.

      Defining Fieldgroup etc through the api seems nice and clean and works great for the images but I can't wrap my head around how/if I can add/append/hook the InputfieldWrapper/InputfieldMarkup stuff I'd like to include on that template as well. Not even sure if it should be where it is on ___install with the Fieldtype stuff or later on . Not getting Tracy errors, just nothing seems to happen.
      If anyone has any ideas or can point me in the right direction, that would be great because at the moment I am stumbling round in the dark.
       
      public function ___install() { parent::___install(); $page = $this->pages->get('name='.self::PAGE_NAME); if (!$page->id) { // Create fieldgroup, template, fields and page // Create new fieldgroup $fmFieldgroup = new Fieldgroup(); $fmFieldgroup->name = MODULE_NAME.'-fieldgroup'; $fmFieldgroup->add($this->fields->get('title')); // needed title field $fmFieldgroup->save(); // Create new template using the fieldgroup $fmTemplate = new Template(); $fmTemplate->name = MODULE_NAME; $fmTemplate->fieldgroup = $fmFieldgroup; $fmTemplate->noSettings = 1; $fmTemplate->noChildren = 1; $fmTemplate->allowNewPages = 0; $fmTemplate->tabContent = MODULE_NAME; $fmTemplate->noChangeTemplate = 1; $fmTemplate->setIcon(ICON); $fmTemplate->save(); // Favicon source $fmField = new Field(); $fmField->type = $this->modules->get("FieldtypeImage"); $fmField->name = 'fmFavicon'; $fmField->label = 'Favicon'; $fmField->focusMode = 'off'; $fmField->gridMode = 'grid'; $fmField->extensions = 'svg png'; $fmField->columnWidth = 50; $fmField->collapsed = Inputfield::collapsedNever; $fmField->setIcon(ICON); $fmField->addTag(MODULE_NAME); $fmField->save(); $fmFieldgroup->add($fmField); // Favicon Silhouette source $fmField = new Field(); $fmField->type = $this->modules->get("FieldtypeImage"); $fmField->name = 'fmFaviconSilhouette'; $fmField->label = 'SVG Silhouette'; $fmField->notes = 'When creating a silhouette/mask svg version for Safari Pinned Tabs and Windows Tiles, we recommend setting your viewbox for 0 0 16 16, as this is what Apple requires. In many cases, the easiest way to do this in something like illustrator is a sacrificial rectangle with no fill, and no stroke at 16 x 16. This forces the desired viewbox and can then be discarded easily using something as simple as notepad. Easy is good, especially when you get the result you want without a lot of hassle.'; $fmField->focusMode = 'off'; $fmField->extensions = 'svg'; $fmField->columnWidth = 50; $fmField->collapsed = Inputfield::collapsedNever; $fmField->setIcon(ICON); $fmField->addTag(MODULE_NAME); $fmField->save(); $fmFieldgroup->add($fmField); // Create: Open Settings Tab $tabOpener = new Field(); $tabOpener->type = new FieldtypeFieldsetTabOpen(); $tabOpener->name = 'fmTab1'; $tabOpener->label = "Favicon Settings"; $tabOpener->collapsed = Inputfield::collapsedNever; $tabOpener->addTag(MODULE_NAME); $tabOpener->save(); // Create: Close Settings Tab $tabCloser = new Field(); $tabCloser->type = new FieldtypeFieldsetClose; $tabCloser->name = 'fmTab1' . FieldtypeFieldsetTabOpen::fieldsetCloseIdentifier; $tabCloser->label = "Close open tab"; $tabCloser->addTag(MODULE_NAME); $tabCloser->save(); // Create: Opens wrapper for Favicon Folder Name $filesOpener = new Field(); $filesOpener->type = new FieldtypeFieldsetOpen(); $filesOpener->name = 'fmOpenFolderName'; $filesOpener->label = 'Wrap Folder Name'; $filesOpener->class = 'inline'; $filesOpener->collapsed = Inputfield::collapsedNever; $filesOpener->addTag(MODULE_NAME); $filesOpener->save(); // Create: Close wrapper for Favicon Folder Name $filesCloser = new Field(); $filesCloser->type = new FieldtypeFieldsetClose(); $filesCloser->name = 'fmOpenFolderName' . FieldtypeFieldsetOpen::fieldsetCloseIdentifier; $filesCloser->label = "Close open fieldset"; $filesCloser->addTag(MODULE_NAME); $filesCloser->save(); // Create Favicon Folder Name $fmField = new Field(); $fmField->type = $this->modules->get("FieldtypeText"); $fmField->name = 'folderName'; $fmField->label = 'Favicon Folder:'; $fmField->description = $this->config->urls->files; $fmField->placeholder = 'Destination Folder for your generated favicons, webmanifest and browserconfig'; $fmField->columnWidth = 100; $fmField->collapsed = Inputfield::collapsedNever; $fmField->setIcon('folder'); $fmField->addTag(MODULE_NAME); $fmField->save(); $fmFieldgroup->add($tabOpener); $fmFieldgroup->add($filesOpener); $fmFieldgroup->add($fmField); $fmFieldgroup->add($filesCloser); $fmFieldgroup->add($tabCloser); $fmFieldgroup->save(); /////////////////////////////////////////////////////////////// // Experimental Markup Tests $wrapperFaviconMagic = new InputfieldWrapper(); $wrapperFaviconMagic->attr('id','faviconMagicWrapper'); $wrapperFaviconMagic->attr('title',$this->_('Favicon Magic')); // field show info what $field = $this->modules->get('InputfieldMarkup'); $field->name = 'use'; $field->label = __('How do I use it?'); $field->collapsed = Inputfield::collapsedNever; $field->icon('info'); $field->attr('value', 'Does this even begin to vaguely work?'); $field->columnWidth = 50; $wrapperFaviconMagic->add($field); $fmTemplate->fields->add($wrapperFaviconMagic); $fmTemplate->fields->save(); ///////////////////////////////////////////////////////////// // Create page $page = $this->wire( new Page() ); $page->template = MODULE_NAME; $page->parent = $this->wire('pages')->get('/'); $page->addStatus(Page::statusHidden); $page->title = 'Favicons'; $page->name = self::PAGE_NAME; $page->process = $this; $page->save(); } }  
×
×
  • Create New...