Jump to content

mr-fan

Members
  • Posts

    848
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by mr-fan

  1. First: I think such thing is easy possible with the upcoming 2.5 that have a import/export for fields: https://processwire.com/talk/topic/2117-continuous-integration-of-field-and-template-changes/page-6#entry68899 So such examples could get some demofiles.... Second: I find PW is for me a educational system!! Really like this aspect maybe we should advertice this on the homepage!! This is the reason while users are here (and i'm so happy to found it) i can reinvent the wheel i like - i coun't do that with any other cms - and serve my clients with the result that i believe it's good. So please argos and norbert take a breath, read the letters from the experienced users here and accept there strong opinion - there is no fear, there is no need... @Joss - could the old wiki entries that are mostly complete transformed in some tuts....wiki is badly linked (i found it via some older posts) but they helped me very much to get first results special this four would be great: http://wiki.processwire.com/index.php/Small_Project_Walkthrough http://wiki.processwire.com/index.php/Basic_Website_Tutorial http://wiki.processwire.com/index.php/Simple_Gallery_System http://wiki.processwire.com/index.php/Simple_News_System or link it in the docs for now?
  2. send me a pm i you need help or something else - i'm absolute not skilled enought with pw but i did build several tutorials and wrote for others (in german - my english is to bad) so maybe i could share some experience on this. that is something indeed i'm missing since i am not so skilled. my workflow is to search the cheatsheet and copy&paste the calls in the Google Forum Search so i get some examples from some interesting posts....but this is not good handling for people willing to learn more.
  3. To keep a positive idea in this heavy ideological topics I like the idea of a snippet gallery this would be a nice addition on the tutorials for beginners? With the 2.5 it should be possible to export needed fields and templates and show some example calls on that fields.....so it would be a easy start. Like i wrote the wiki tuts was great but old and not really linked with the current docs. A dev use the great API documentation and the cheatsheet!! But a newcomer has to search the forum (and hopefully since the forum search isn't that good find first this or this post)
  4. Such discussions are very difficult for non native speakers but i try my best to harm nobody. since Norbert and Argos were members of my former community, too i have some thoughts on this topics and maybe the reasons of such wishes... We all came from a former real big community with worldwide devs and contributors. The former CMS we used was one of the real big ones that was in use, but in lack of marketing and a scary name "WebsiteBaker" it was not so big public visible.....kinda like PW too. This websitebaker was a great cms (now development is stagnate for the last years) with a easy mediaadministration, simple templatesystem (php), pagetree, one site could have a different template and unlimited sectionblocks where a sectionblock was a addon like a form, gallery, wysiwyg, poll and so on. Cons are that every addon produce own HTML output, not easy to setup, update for a dev. -> But easy to get a website up and running fast.....with strong borders and limits. -> Former CMS was like a setup a db -> install -> install a template ->install some addons ->fast result! But Processwire is a different thing and i've to strict confirm the "hero" and "distinguished" members on theire points! Just some background on my person the short story: - i'm a web-hobbyist, - i studied agrobusiness, - my family have a little farm in southgermany, - i work in a ngo, since a couple of years i've a small business helping people - especially from the agrobusiness to get a more "pro" website up and running than a "standard hoster websitebuilder" could even with a small budget and the very most important thing easy to use/update so they get along. My understanding for OpenSource was always that if you use such piece of code you have two options 1. contribute with your time 2. spend money to push such good work! Since my projects all have a small budget (with some less exceptions) i always try to invest some spare time to contribute, help in forum, try to code something....(In former CMS i was a forummod, wrote several tutorials, assisted several addondevs with translations and testing, started a project for a portable version with preinstalled version on a WAMP server2go) I've not a webdevbusiness to make a living - but since i'm a economist i understand one simple goal/rule: What is good for the client is usually good for me if i running a service with one big exception -> if the good thing is that the client don't need my work anymore! So we talk about "make it userfriendly" or "make it devfriendly" ? i think processwire is a great tool for both devs and users, since i could make the website (and the backend) for my clients real userfriendly without limitation like other cms have. So it is "friendly to me" and after all my work it is "friendly to the enduser"... I don't think that standarisation would be good here - i like particularly that a pro user could adapt a MFC template system and a nonpro like me use a simpler technique. Yes PW more a CMF than a CMS but this is great for everybody that creates professional websites or even apps. @Argos: i think there is a big misunderstanding about the "user" - i think you mean with user -> somebody that use/install/build a site with PW? but i think others here might think user -> client that use/work with a fine adjusted ready to work installation of PW? No offend to you (i honor your work that i know from the last couple of years) and like i said it is hard in a non native language but i try to ask: Since i'm a complete self educated person (no design education, no programming edu) i think that in current times of webdesign nobody without some skills in coding or a partner that devellops for him could stand in the long-range. We live in times of using explicit combination of javascript (if not required for a website - but surely for a app or mobile website), serverside javascript via node.js is on the way, the morst good CMS all works with PHP or even a own language like typo3, preprocessors for CSS like SASS and LESS, JSON data for serving different things, imagehandling for responsive design and so on... since we work with computers and software - all is code - i thought even drawing is just math? @Norbert: there could be indeed more examples, easyer entries for new users -> that wanna try out PW and install it. But hey that is something to do - nothing to write about it. I know you are a experienced programmer so you've no problems to setup a website for a customer "userfriendly" so why this is such a big topic? For my first project i take the time to setup the most things you've mentioned so i can recycle them easy for the next ones... PW is hard for the first beginning - if - you don't search the forum, don't look at the example code in the templates, read a lot of posts, dig through the doc is fun while you learn fast....the tuts in the wiki are old but working. To change this only simple things are to do. Take the 2.5 create template and fields and use the export - share it - so a new user easy get it work with one click and import such examples like a setup for a calendar, news and so on. Or write some tutorials.....if my first project is finished i will do share my learning for other newbees...like other users here did before. @all former other CMS users: PW will/should never be like a other CMS or your former used CMS. Just switch your minds and start to change the way you thinking before - and you will be surprised. I felt in love with pw in lets say about a 30 minutes trial I get the first grasp until lets say the next 3 hours I belief i'll stay for ever in the status Newbee since every day i read this forum i'll learn new things from this great community Best regards - Martin
  5. i don't setup something like this before but i think you could do this via a pagesetup, too and save the entries for each step...like - frontendpage where the form is shown - get the current step via url segments or navigate with the pagestructure /myform/client-one/step1/ -cliententry-one (as parent for the steps and maybe save the final result/calculations) -step1 (process step one and save entries) -step2 ^^ -step3 ^^ -cliententry-two(as parent for the steps) -step1 (process step one and save entries) -step2 ^^ -step3 ^^ so all is saved in PW fields and could easy checked via PHP the form frontedpage shows via URL segment like DaveP wrotes or with the given pagetree the steps - with such a setup it should be even possible to navigate a step back or something.... just some newbee thoughts on this interesting usecase....maybe there is a way with the FormBuilder module from Ryan, too?
  6. since i'm an 286/386/486 generation it reminds me on DOS hacking EMS configuration to get some games to run..... and reminds me of the great QBASIC/Pascal aera... if you use this theme for a blog you don't need syntaxhighlighting
  7. very interesting growing project, too is this one: https://software.intel.com/en-us/html5/videos/getting-started-with-the-intel-xdk
  8. I think one really important step on userfriendly is the new 2.5 on choose a start theme while installing.....maybe the old classic theme should replaced with a kinda minblog as a startingpoint. So first install user can choose to start with a simple page, a simple blog or blank....maybe this would help to get every tester faster forward to "look inside". What i really like and think it is very userfriendly is the new (ok few weeks old) tutorial place in the doc. There is so much stuff in this forum to take further for a great tutorial. For me (and i think for all here) is a important thing that i "can" build a website for a client really really userfriendly with processwire without some given limitations like in every other cms exists
  9. https://kristopolous.github.io/BOOTSTRA.386/index.html look great an every screen.....
  10. Soma handles documents with a special setup and a template so you could easy setup pdf's with a field "old-path" and check for this so the "old" links should work: here is his tutorial: https://processwire.com/talk/topic/4602-flexible-downloads-using-pages/ http://soma.urlich.ch/posts/flexible-downloads-using-pages/ this is really great! I use it on a page with some pdf's to count downloads - so your file could have a different name/url and adding an "old-url" field should be no problem. And since a pdf-download is a page you can redirect it via your normal methode, too without need of additional fields and changing the PDF!! Hope this helps - mr-fan
  11. setting is like reems writes under >access>users>guest (=visitors) change the default language on this the default language under >admin>setup>languages couln't changed....your right.
  12. Language for users could changed via ->profile->language your-domain.com/processwire/profile/ there you could change the language for the logged in user. or you asking for a multilanguagepage-setup? regards mr-fan
  13. https://processwire.com/talk/topic/7164-processwire-and-seo/
  14. So here i'm finished for now since i've not the time to get this even further...but it works and i share it. (it is only hardcoded in the FormTemplateProcessor) 1. call the form like it is described 2. i've changed the __buildform() - to get a hidden field !!don't ignore the CSS // set a random name to the submit button so that this form doesn't process // any submissions without first receiving a rendered form. This isn't // necessary, but it may help to reduce automated spam to the form. $submit->name = "submit"; $submit->value = 'Submit'; //Changes for better Spamprotection with a hidden additional field as a honeypot // create a text input a hide it via CSS .Inputfield_name2 display:none - see CSS example on the end of this module $field = $this->modules->get("InputfieldText"); $field->label = "Name2"; $field->attr('id+name','name2'); $field->required = 0; $form->add($field); // append the field to the form //end changes // add the submit button the the form $form->add($submit); so a field for a honeypot is added to the form - use in your frontend CSS .Inputfield_name2 { display:none; } 2. next step i added a check for a field called "quest" as additional spamdetection used as a "don't fill this field" check with a visible field! 3. check if the hidden or the visible field was empty and sendMail or save to a page....if fields are not empty show a error and do nothing /** * Render a form or process it's input * * @return string Output of the form or success message upon completion. * */ public function ___render() { if(!$this->contact->template) throw new WireException("You must specify a Template"); $form = $this->buildForm(); // if the form hasn't been submitted, then just return the rendered form. if(!$this->input->post->submit) return $form->render(); // variable to hold our output, which we will return $out = ''; // now we assume the form has been submitted. // tell the form to process input frmo the post vars. $form->processInput($this->input->post); //Set the Spamfilter and check if field quest or spam are blank! $questfield = $this->input->post->quest; $spamfield = $this->input->post->name2; if(empty($spamfield) && empty($questfield)) { echo "spam is blank sending mail"; // see if any errors occurred if(count($form->getErrors())) { // re-render the form, it will include the error messages $out .= $form->render(); } else { // successful form submission, so populate the new page with the new values. foreach($form as $field) { $this->contact->set($field->name, $field->value); } if($this->email) $this->sendEmail($form); //if($this->parent) $this->savePage($form); $out .= $this->successMessage; } return $out; } else { echo "You dirty Bot!"; } } So a basic Spamprotection with two methods is working. This could be more professional with optional/individual names for the fields, and hiding the spamfields in the mail but in lack of skills i leave this as it is for now... regards mr-fan
  15. CSRF is known. But keeps the token attention on the time between building the form and the submit action? That's a way to prevent spam with a token and timestamps.... I will search in the core for this...
  16. Great so far! I've got it working with a visible field with label like "Show your are a human leaf this field blank" and my check i could simply prevent the sending and saving of the form. Next step will be adding a hidden field (honeypot) for double check to bots. One Question about something that is not easy for me since i'm not good in "advanced security" things: the Token from the $form is setting with the FormProcessor like: <input type="hidden" value="6c7936d25985fbe72c8bfd7698f8c0a20e412c188ed20f504e99ecc4535232b6" name="TOKEN1942360421" id="_post_token"> I know this is build in CSRF protection. One question on this: check this token the timestamp, too? i mean simple spamprotection via a sessiontoken with timestamp from building the form to submitting the form... Such a time validation would be a perfect additional spamprotection to honeypotfields. I don't now if this is already build in the core token, or this is only a token to validate the indentity of the present form? regards mr-fan
  17. so far i get the spam field showed up and checked if ti was emty....so i handle the sendMail and save only if the spamfields are empty.... i dig deeper now to get the "hardcoded" field into the array setting for the module.... i like PW because for my limited time i could even dig trought to find out how it works without look in 1xxxx lines of code!! Thank you adrian and soma for the hints and push //testcheck echo $this->input->post->spam; $spamfield = $this->input->post->spam; if(empty($spamfield)) { echo "spam is blank"; } else { echo "spam exists"; };
  18. did change all the varnames into different on the two calls: <?php $formImages = $this->modules->get('InputfieldForm'); // prep the form $wrapperImages = new InputfieldWrapper; // a wrapper $wrapperImages->attr('value', '<h2>Bilder</h2>'); $i = $this->modules->get('ProcessPageList'); // kongondo's code goes here $i->set('id', 1015); // setting the parent page $pageTreeImages = new InputfieldMarkup; // the placeholder $pageTreeImages->value = $i->execute(); // fill the InputfieldMarkup form field... $wrapperImages->add($pageTreeImages); // put inside the wrapper... $formImages->append($wrapperImages); // append the wrapper echo $formImages->render(); $formFiles = $this->modules->get('InputfieldForm'); // prep the form $wrapperFiles = new InputfieldWrapper; // a wrapper $wrapperFiles->attr('value', '<h2>Dateien</h2>'); $f = $this->modules->get('ProcessPageList'); // kongondo's code goes here $f->set('id', 1033); // setting the parent page $pageTreeFiles = new InputfieldMarkup; // the placeholder $pageTreeFiles->value = $f->execute(); // fill the InputfieldMarkup form field... $wrapperFiles->add($pageTreeFiles); // put inside the wrapper... $formFiles->append($wrapperFiles); // append the wrapper echo $formFiles->render(); if i comment out the first - second works if i comment out the second - first works.... so that was my base question: if this doesn't work with the PageList i could work arround with a own created list with pagination and a add new button.....with the tree it would be more comfortable...
  19. Thank you i've digging through it..... so far i wanna use the FormTemplateProcessor.module i've to change it. Hard knocks for a php hobbyist (for tha label scriptkiddy i'am to old ) i've changed some simple points/steps: 1. added a textfield (namend "spam") to the contact-template.php 2. added array setting for fields to check: // Array of field names that should be used as honeypot when drawing the form $this->set('honeyFields', array('spam')); 3. Check if the $this->honeyfields has content This is the part where i'am not shure where to put the check. Tomorrow i will try some things out...... /** * Render a form or process it's input * * @return string Output of the form or success message upon completion. * */ public function ___render() { if(!$this->contact->template) throw new WireException("You must specify a Template"); $form = $this->buildForm(); // if the form hasn't been submitted, then just return the rendered form. if(!$this->input->post->submit) return $form->render(); // variable to hold our output, which we will return $out = ''; // now we assume the form has been submitted. // tell the form to process input frmo the post vars. $form->processInput($this->input->post); // see if any errors occurred if(count($form->getErrors())) { // re-render the form, it will include the error messages $out .= $form->render(); } else { // successful form submission, so populate the new page with the new values. foreach($form as $field) { $this->contact->set($field->name, $field->value); } if($this->email) $this->sendEmail($form); if($this->parent) $this->savePage($form); $out .= $this->successMessage; } return $out; } }
  20. I've getting a contact form working nicly with this great module. (FormTemplateProcessor) So only one question stays: What is the best way to build in something like a honeypot? -> Can i simply append a field or could i setup a kinda hidden field on the used pagetemplate? -> How could i build in the check against that field? -> Have i work with a hook for the check? Unlikely my skill are limited to learn the API for pagetemplate files and simple backend tweaks, but not to get the idea where to start here. The contactform itself works great - frontend looks good - forms send via mail and saved as pages under the contact page itself..... regards mr-fan
  21. anyone? or a hint if this was possible or is it not possbible to get two pagelist's working on one page, i don't think since i've seen this in other complicated processadmintools, too but i didn't get an idea what i've overlooked?
  22. Indeed the structure from soma's great https://processwire.com/talk/topic/3219-images-manager-beta/ setup a page as image root with subtemplates image-cat and image - so page is "one-image" field....(like described on the github page from soma) with this you've central image managment - equal if you use the image manager to manage the pics or use it in PW way (add new page= image or new cat=image-cat) on other pages you could simple use a PageField for choosing an image. (like in my the screenshots) Image1: Labeling is built in 2.4 PW in the template settings you could choose the fields that are shown in the pagetree see Image2: Setting for Imagethumbs in the tree Image3: A second field in every other template with the pageparent is setted as the image-root page for choosing a pic... hope this helps - best regards mr-fan
  23. i think bwakad was aware of: https://support.google.com/webmasters/answer/66359?hl=en but the simplest solution to avoid this are canonical url's: https://support.google.com/webmasters/answer/139066?hl=en so you could simply work with url segments, ajax and only one templatefile i thought?
×
×
  • Create New...