Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/11/2017 in all areas

  1. Do you do design websites as well as develop them? If you do then my experience has been that there is plenty of work available from businesses and organisations who care about and understand the benefits of high-quality bespoke design and development. Yes, there are many out there who think that a $40 Wordpress theme is good enough and don't want to pay above the minimum - if job satisfaction is important to you, you don't want those people as clients. You'll hate the client, hate the finished website, and end up hating your job. You say you also work in the charity sector - I think that is a good sector to target as a specialisation and maybe you can make use of your contacts there to get started. Most of my clients are not-for-profits, mainly environmental organisations. I have found them to be excellent organisations to work with - friendly, sensible people, happy to take advice and willing to let you get on and do your work without a lot of interference. Another benefit is that these organisations often fund their projects from grants. This makes them less price-sensitive. To be clear, I'm not talking about gouging them on price - just that you can quote a fair price and they base their funding application on that and there's no grizzling and bargaining over cost like you can get in the for-profit sector. I live/work in the middle-of-nowhere rural New Zealand, I have never advertised or done any kind of promotion, and have been fortunate enough to always have a steady stream of work. And believe it or not, in the ten years I have been doing web work I have never had a client request a Wordpress site. I think positive word-of-mouth is key, and the great thing about it is that good people tend to know other good people so you generally avoid those Clients From Hell. To get good word of mouth you need to exceed expectations - set yourself high standards, have meticulous attention to detail, and deliver that bit extra. Best of luck with your career!
    8 points
  2. Added the option to AOS, will be available in v130.
    7 points
  3. FacebookEvents ProcessWire module to get Facebook Page Events using the Graph API. Create an app on Facebook developers website You have to create an app to get appId and appSecret. Those keys are required. Go to Facebook Developers and add a new app. Congrats! Now you can copy your Facebook appId and appSecret. Get your Facebook page ID You can either enter your facebook page ID or the facebook page name. If you enter the Facebook page name, this module will get the page ID for you! Call Module $events = $modules->get('FacebookEvents')->getEvents(); Output Events {% for event in events|reverse %} {% if event.start_time|date('U') > date().timestamp %} <div> {% set dts = modules.get('FacebookEvents').getDates(event) %} <a href="https://www.facebook.com/events/{{event.id}}/" title="Facebook">{{dts.dates}}:</a> {{event.name}} <em>{{dts.times}}</em> </div> {% endif %} {% endfor %
    6 points
  4. @Robin S thanks for the advice. I design sites from scratch with my own small sass boilerplate for typography etc, including the awesome @include-media for breakpoints, best solution I've seen. My CSS skills outweigh my JS ones but I'm working hard on JS at the moment to catch up a bit (although the syntax bothers me somewhat). My charity work is the mental health/learning disabilities sector and it is a field I'd like to stay close to. I feel they make an actual difference to people, rather than the 'design studio look at our new ad for pepsi' stuff. Worth millions but all it's good for is giving people bad teeth. My PHP skills are ok (as long as I have the manual close...) but this is why I like the PW API so much, grabbing stuff out the database just couldn't be simpler. Anyway, I'm rambling. I just love making websites basically! Have done for over a decade, it never gets old for me, my enthusiasm probably outweighs all my skills combined
    6 points
  5. GUID Generator Generate a globally unique identifier (GUID) for Inputfield Text. Usage For each instance of a text field the field settings will be extended. Navigate to Admin > Setup > Fields and edit the desired field. Click on the Input Tab and click on the "Generate GUID" area. It extends downwards and reveals a form to enable automatic GUID generation. After having enabled GUID generation for a text field, edit a page which has a template containing this field. You'll see the field filled with a GUID.
    4 points
  6. GithubConnect ProcessWire module to connect a Github OAuth application. Register a new OAuth application Fill in module settings Click the Authorize! link to generate code and access token There are some predefined endpoints to fetch informations about an user or a repository, get a list of repositories belonging to an organization, fetch content of readme or certain file.. I used it to choose a repository from a list and import the content (e.g. readme, description) to the corresponding fields. Visit the Github Repository to get a full overview.
    4 points
  7. For those wanting more room for the tree dropdowns in the default admin theme it's easy as pie with a little custom CSS: /* Align tabs to left to make more room for tree dropdowns */ #masthead #topnav { float:left; margin-left:30px; /* just a little left margin to leave some space around the PW logo */ } @tpr, could maybe be an option in AdminOnSteroids? @Pete, the syntax highlighting in forum code blocks seems be broken for CSS - looks good in the modal, but no highlighting when the modal is closed.
    4 points
  8. This week we’ve got a new core version on the dev branch (3.0.55). This version has a whole bunch of fixes and adjustments. It also adds a new drop-down page tree that we cover in more detail in this blog post. https://processwire.com/blog/posts/processwire-3.0.55-core-updates/
    3 points
  9. Hello. Just wanted to ask if there if there is a way to NOT delete Repeater (or Matrix) Items directly but move them to the Standard Trash if the Trash-Icon on the Edit Screen is clicked? This would be helpful when editors accidently delete some Repeater-Items. There is also no Confirm Message when deleting. Especially in Repeater matrix Items there can be a whole lotta Content wich is gone forever. Thanks for every Info...
    2 points
  10. It depends on the use-case. Take a look at vue-i18n. You could probably provide the translations via json fueled by processwire's translation features. Server-side rendering is only supported in node (and not just V8, which could be run in php). Therefore you'd need to add yet another environment to your stack. I'd only go that route if you're creating a fully (node served) vuejs app with processwire just serving data via an api. Without the dev server (and hot module replacement) developing anything more in the SPA direction will be a pain, so yeah it does make sense. You could also use processwire like you do without webpack and just switch the javascript url in your template to the url webpack does provide the script on.
    2 points
  11. Hi @antpre and everyone. I lack time in recent days but the module should be available to the public the next coming week!
    2 points
  12. Nice one @Robin S - I think I prefer that in general anyway - less mouse distance to cover!
    2 points
  13. NICE!! mainly trying and checking the module for security and new features
    2 points
  14. We have ListerPro's with 10.000's of pages (some up to 80.000 pages and counting) displaying 25 fields. Just make sure to limit/paginate around 50 or 100. Still quite fast (around 3 seconds loading time). This includes all kinds of Markup changes. So I would say: yes
    2 points
  15. TextformatterTypographer A ProcessWire wrapper for the awesome PHP Typography class, originally authored by KINGdesk LLC and enhanced by Peter Putzer in wp-Typography. Like Smartypants, it supercharges text fields with enhanced typography and typesetting, such as smart quotations, hyphenation in 59 languages, ellipses, copyright-, trade-, and service-marks, math symbols, and more. It's based on the PHP-Typography library found over at wp-Typography, which is more frequently updated and feature rich that its original by KINGdesk LLC. The module itself is fully configurable. I haven't done extensive testing, but there is nothing complex about this, and so I only envisage a typographical bug here and there, if any.
    1 point
  16. Hello I made a simple app for reading the main RSS for ProcessWire news. Now you can access ProcessWire Blog, ProcessWire weekly and the Latest Forum Posts in a Single App in your iOS or Android smartphone. Open Source of Course. Made using the http://jasonette.com technology. You can compile your own app if you want. For A Quick Look 1.- Download the Jason App (iOS) https://itunes.apple.com/us/app/jason./id1095557868?mt=8 (Android) https://play.google.com/store/apps/details?id=com.jasonette.jason 2.- Use the Following Url https://raw.githubusercontent.com/NinjasCL/pw-app/master/app.json Source Here https://github.com/NinjasCL/pw-app
    1 point
  17. OK, thanks. I guess I'm exploring a little bit. PW makes localization pretty straightforward; this will be a bit more challenge.
    1 point
  18. I haven't built a multilang website with PW and Vue, but I guess you'd use something like this https://kazupon.github.io/vue-i18n/dynamic.html and with PW you'd generate the right Rest API to handle the multilanguage features?
    1 point
  19. I agree with @LostKobrakai that it really depends on what kind of app you're building. I have built two websites with SPA+Rest APi and one hybrid with CMS+VueJS and the SPA website was easier to build but more difficult to get indexed on google whereas the hybrid one was more difficult to build (much more difficult) but easier to index. Same as @LostKobrakai. Same as @LostKobrakai Yes that's the easier way to do it.
    1 point
  20. Thanks, but unfortunately there were other issues with the current approach. In v130 (just uploaded) all should be fine, and pagelist IDs are visible in the new Tree menu too. This version also contains the option to align the top nav to the left in the default admin theme (idea & request by @Robin S - thanks!).
    1 point
  21. Hi I am going to be honest I have used both but not as extensive as you have, If you are going to use VueJS via SPA, then it won't matter whether you use Processwire as you would simply be concerned about your JSON Data, which any API/Service can equally play that role. As for your webpack-dev-server i don't think it matters as SPA is only concerned about the data, meaning Express, Golang,Spring can easily serve the JSON and it won't make any difference, as for SSR am gonna be honest am still not sure what SSR really is, Maybe i should read more detailed articles on it. all the best, I would simply advise to using VueJS as components for your pages. But it depends on your aim though
    1 point
  22. I thought of a concept and it doesn't have to be as complex infact here's my proposition There should be a changelog.md and also another changelog.json which contains each version and the text serving as the changes, however this might hard to implement as it means enforcing everyone to do this, another better alternative could be a changelog.md with a specific format to follow, so that a Parser can be read to extract the needed information, it is vital a changelog is seen before uploading to inform user about what has changed and what to expect.
    1 point
  23. Or you can use AdminOnSteroids which has this function integrated.
    1 point
  24. You can filter users out by all sorts of rules, but you cannot easily create additional user listers like you could for plain pages with ListerPro. Sadly there aren't any bookmarks for the users lister as well, where one could save often used filters. I hope Ryan will add those some time.
    1 point
  25. Not an answer to your question sorry and only useful for those with Lister Pro, but just wanted to note that you can export the filtered list of users with "Export Pages to CSV" action for Lister Pro.
    1 point
  26. @gingebaker, I don't think there is a currently a way to trash Repeater items rather than delete them, but it would be useful if there was. Do you want to open a GitHub request for this so that Ryan sees it?
    1 point
  27. @modifiedcontent Works the same as everywhere else, you have a form, form gets submitted, you process it (do what you need with the values submitted). I showed you how to save the values in a page, the same way you can create a user. <?php // $input->post->username same as $_POST["username"] if($input->post->submit) { $u = new User(); $u->name = $input->post->username; $u->email = $input->post->email; $u->pass = $input->post->password; $u->registrationDate = time(); $u->addRole("member"); $u->save(); }
    1 point
  28. I found it! Posting for future people. http://cheatsheet.processwire.com/pagearray-wirearray/setting-and-modifying-items/a-removeall/ http://cheatsheet.processwire.com/pagearray-wirearray/setting-and-modifying-items/a-remove-key/
    1 point
  29. @justb3a, I see you are extra busy today releasing new modules. Great work!
    1 point
  30. You can use status!=hidden in your selector, so in "Custom selector..." you'd input something like: parent=[id of Content Blocks page], status!=hidden
    1 point
  31. You can also use timestamps in a PageFinder selector or anything that works with strtotime(): $zaehler = $page->children("einsatzdatum>=first day of January 2017, einsatzdatum<=last day of December 2017");
    1 point
  32. The dd.mm.yy format is what PW outputs, MySQL itself expects a standard datetime literal. Therefore, if you want to get all pages with a date in the current year, you need to search for a minimum date (and perhaps maximum if there are dates in future years present). <?php $startdate = date('Y') . "-01-01"; $enddate = date('Y') . "-12-31"; $zaehler = $page->children("einsatzdatum>=$startdate, einsatzdatum<=$enddate"); Or you could be daring and try out my (still beta) DatetimeAdvanced module that makes use of MySQL's builtin date and time functions. With it, you could say: <?php $year = date("Y"); $zaehler = $page->children("einsatzdatum.year=$year");
    1 point
  33. I thought I would just pop by to say how much fun I am having. I don't really get the chance to put websites together at the moment for some complicated reasons, but I have put some days aside to nail together a new blog about something. And I have thoroughly enjoyed it. Especially all the little tweaks I have been making. For instance, I want the layout on the front page to be very neat, but that means the titles of articles have to be a certain length, as do the summaries and the images, where they are available. That particular constriction doesn't necessarily work in other areas of the site. With PW, the answer is dead simple. TWO title fields, both with the counter switched on and a little note reminding me of the ideal length. I also have two summary fields for the same reason. I have a similar thing with images. I have made up a Photoshop template with Artboards for all my various image sizes - featured image, summary image for the front page, story images for the article, sidebar images and the SEO image. Of course, the fact that I can have an assortment of images in my PW template means I can take advantage of this PS template. And, because some articles just don't have an image, I have a little note telling me to write a longer summary if there is no image. Oh, and a bit of PHP that looks for the short title and uses the long one if I forgot to write a short one ... and so on. I know this is all mundane stuff compared to some of the cleverer functionality Ryan and the various mod devs are coming up with, but for me, it is this simpler versatility that makes Processwire so powerful. That I can just shove in another field to get around a certain problem and bring it up as an alternative with one line of PHP makes sites a joy to develop. Enough so that I actually spent a happy hour today neatening up my code, indenting it nicely and putting helpful little comments everywhere. I didn't need to do it, but I have worked so much faster than I could have with any other system, I had the time - so I had my little bit of fun.
    1 point
  34. When I worked with Drupal, then discovered PW...
    1 point
  35. But are you positive you are actually connecting to the local site when you visit dev.example.com? If you haven't configured your hosts file correctly your browser may be attempting to connect to an online server where that address does not resolve to anything and hence the error. If you put a file "test.txt" in your local site root and visit dev.example.com/test.txt can you see your file?
    1 point
  36. It's those little things where you find some elegant, succinct way to do exactly what you want that make development so satisfying. The only frustrating thing is that unless you work in an office of fellow code nerds you don't get to share those "nailed it" moments. Like, in your home office you call your loved one over and gesticulate enthusiastically at the screen but they're all...
    1 point
  37. is there any progress on having Changelogs for an update, so we can know if some updates are worth updating to.
    1 point
  38. I would not recommend doing this. 'allfields' is already declared in the moduleConfig file. If you set it in the module file again, this value will be overwritten and if you render the form all fields are gone. @Arcturus Feel free to optimise the documentation! Fixes and suggestions are very welcome! A lot has been changed since version 0.1.1. I think, this is the page you were looking for, but this is no longer relevant. Because the module now renders the form by itself and no template adaptions are needed any longer. Did you try to render the form (frontend)? If not, please do so. There are some migration functions in the module. If you still want to use this module, please post the input of the column data from table modules where column 'class' equals SimpleContactForm. Furthermore some additional informations would be really good (save messages enabled? fields which should be added, ..).
    1 point
  39. New Version 1.0.4: @Robin S use label tag if it isn't a multilangual site @jploch, @adrian changed hook InputfieldFile::processInputFile to InputfieldImage::processInputFile
    1 point
  40. @Jon E Just use the comparison inside the foreach loop: foreach ($page->images as $image) { $caption = ''; if ($image->imagetitle) { $caption = "<p class='caption'>{$image->imagetitle}</p>"; } echo "<li><img src='{$image->width(1040)->url}' alt='{$image->description}'>$caption</li>"; } Or if you want to combine multiple parts: you can check every extra field individually and concatenate the caption before outputting it. foreach ($page->images as $image) { $caption = ''; if ($image->imagetitle) $caption .= "<strong>{$image->imagetitle}</strong>"; if ($image->imagetext) $caption .= "<em>{$image->imagetext}</em>"; if ($image->role) $caption .= "<span>{$image->role}</span>"; if ($caption) $caption = "<p class='caption'>$caption</p>"; echo "<li><img src='{$image->width(1040)->url}' alt='{$image->description}'>$caption</li>"; }
    1 point
  41. No mockery from this group. We're here to help. If you have a statement comparing two conditions (eg. variable to1037, and variable to 1038) then there are four possible combinations: FF FT TF TT. Basically, for every n elements there are 2^n possible outcomes. Example 1. If you want to perform a conjunction (AND) then the statement is true only when both components are true, as follows: Assume $page->id = 100 IF ($page->id !== 1037) AND ($page->id !== 1038) THEN TRUE Example 2. If you want to perform a disjunction (OR) then the statement is true when either component is true, as follows: Assume $page->id = 100 IF ($page->id !== 1037) OR ($page->id !== 1038) THEN TRUE The problem you are experiencing is wanting to use the disjunctive case, as in Example 2. Because when the $page->id does not equal one of the test values (1037 or 1038) the result will also be true, which is not the desired outcome. Hope this helps.
    1 point
  42. @Thachakrit @JasonS @pwFoo To get the password validation working you need to add styles and scripts from ProcessWire Admin. The following is untested with this module but should work if you add it to the page where you do the output of the module: <script type="text/javascript" src="/wire/modules/Inputfield/InputfieldPassword/complexify/jquery.complexify.min.js"></script> <script type="text/javascript" src="/wire/modules/Inputfield/InputfieldPassword/complexify/jquery.complexify.banlist.js"></script> <script type="text/javascript" src="/wire/modules/Jquery/JqueryCore/xregexp.js?v=1466417387"></script> <script src="/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.min.js?v=101-1466417387"></script> EDIT: Forgot to add the stylesheet. It resides under /wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.css
    1 point
  43. @modifiedcontent Say you have the following form <form method="post"> <input type="text" name="name"> <input type="textarea" name="message"> <input type="submit" name="submit"> </form> You can save it to a page like this <?php if($input->post->submit) { $p = new Page(); $p->template = "template_to_save_form"; $p->parent = $pages->get("/parent-page/"); $p->title = $input->post->name . " - " . date("Y-m-d"); $p->submitted_by = $input->post->name; $p->message = $input->post->message; $p->save(); } You'll have to create the template, its fields and the parent page first. Also before saving the page make sure to validate/sanitize the input. <?php $p->submitted_by = $sanitizer->text($input->post->name); // instead of just $p->submitted_by = $input->post->name; https://processwire.com/api/ref/sanitizer/
    1 point
  44. Hi, Looking forward to use this module. Thanks for the work
    1 point
  45. I prefer third party libraries to be included and managed via composer, but if you do include them in this module make sure to do it like this: https://github.com/gmclelland/TextformatterOEmbed/commit/ce3bdcd8145da3a369f56f34979cc0791fdb7fa8 Notice the /*NoCompile*/ to prevent PW3's file compiler from compiling the third party libraries.
    1 point
  46. I've a function to clean out non URL conform chars.....since i had problems with the hashes in URL Segments this works for me: /* * create a valid url save one time token * */ function RandomToken($lenght = 32) { $p = new Password(); $h = $p->randomBase64String($lenght); $given = array("/", "."); $replace = array("_", "-"); $hash = str_replace($given, $replace, $h); return $hash; }
    1 point
  47. I wanted to go for the regular user but it didn't make sense for me to do so, as I didn't want to want users in the backend, also as for my solution we already imported the users into pages with password so it was obvious taking the regular route was too late so what i did, was create a login that checks the pages for password. I created a Hook to change the layout to my Admin Backend and i was able to get an admin interface I simply used the Session to store the user id and once its gone it redirects to the login page. Also for the backend i created a Class to parse the Url Segment and call a similar method in a controller e.g url1 is always the controller and url2 is the action and I default to a controller and an action. This works well for me as an AVID MVC adopter so its hard for me to change my pattern which is why i like PW it allows me create a flexible system.
    1 point
×
×
  • Create New...