Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/22/2013 in all areas

  1. Field dependencies are coming in ProcessWire 2.4, and I just wanted to give you guys a little preview of it. The development of this new feature is being sponsored by Avoine, the company where Antti works (he also specified how it should work). Field dependencies are basically just a way of saying that one field depends on another. It dictates which fields should be shown in a given context. In our case, it also gets into whether a field is required or not. This short video demonstrates how it works: (switch to the 720p and full screen version, as YouTube's default settings for this video make it impossible to see): // Edit @Adamkiss: Here's link for those on mobile: youtu.be/hqLs9YNYKMM The implementation here is done both client-side and server side. Javascript handles the showing/hiding of fields and the required vs. not required state changes. On the server side, it doesn't process any fields that aren't shown, and honors the required rules. A separate processing occurs both client side and server side, ensuring that the user can't make their own rules by manipulating the markup or post data. These field dependencies can be used with any Inputfield forms. That means you'll be able to use it not just in ProcessWire, but in FormBuilder, and via the API too. It's very simple to use from the API. All you have to do is specify a ProcessWire selector to either "showIf" or "requiredIf" to the Inputfield, and ProcessWire takes care of the rest: // show this field only if field 'subscribe' is checked $inputfield->showIf = "subscribe=1"; // show this field only if 'price > 0' and at least one category selected $inputfield->showIf = "price>0, categories.count>0"; // make this field required only if 'email' is populated $inputfield->required = true; $inputfield->requiredIf = "email!=''"; This feature will be in the 2.4 core (rather than as a separate module), so it will also be ready and available for things like module and field configuration screens.
    8 points
  2. Thanks guys, glad that you like how this is looking. Though you are giving me more credit here than I deserve. I didn't realize there would be so much interest in it, otherwise I'd have worked on it sooner! It's been on the to-do list for awhile (with a million other things), but didn't become urgent till I remembered/found out it was needed by the end of August. So figured I better get busy! I like the way they define them there too. Longer term, I'd like to make a new Selectors inputfield that lets you build selectors this way, because it's a little more friendly in some ways, even if less flexible in others. But it's a good option to provide in addition to text input of selectors. However, I'll build that Inputfield later as something separate from field dependencies, so that it can be used elsewhere and by other modules, etc. I agree, especially in the context of the video. Though I also think subtlety is important so that required labels don't become a distraction (especially for common required fields like 'title'). If a field is required, and the user missed the visual que, they will still find out about it when they save. The field dependencies just add (or remove) the "required" class to the .Inputfield container, so the actual look of required fields is dependent upon the admin theme. But I think the field dependencies could do a quick fade-out/fade-in to indicate that something has changed about the field's state. I appreciate the compliment. But this is just not true. There are always bugs to fix, and I'm sure there will be several to find and fix with field dependencies, just like anything else (perhaps more so, given some of the complexity in it). So when those of you on the dev branch start using this, don't expect everything to work perfectly. Instead, experiment, test and tell me when you find something that doesn't work quite right. There are so many scenarios that could happen with field dependencies that it may take a few iterations till we've covered them all. There are also some fieldtypes that may not be compatible with field dependencies. For instance, we don't currently have a way of polling the value from the rich text editors, since they don't update the related <textarea> elements on the fly. We could do it by accessing the TinyMCE and/or CKEditor API functions, but I'm not sure that I want to bundle TinyMCE or CKEditor-specific code into the field dependencies–that's the type of dependency you usually want to avoid in code. So you'll be able to show/hide rich text fields based on the values from other fields, but not based on the values in a rich text field. To be honest, I'm not sure that's a problem though, as I don't see rich text fields as being likely sources of dependencies anyway. Those 3 fields are configured in the template for 33%, 34%, 33% width. Without field dependencies they would all fit on one row. When a field is removed from the mix as a result of a dependency, it simply expands the width of the last remaining field to fill out the row. The concept is really simple. It came about because I didn't like the look of the uneven rows when I started dynamically removing fields as a result of dependencies. While the concept is simple, the implementation proved to be a challenge... it's one of those things I thought would take 30 mins, and it ended taking much longer. Though a good part of that is just that I don't use Javascript every day (I'm definitely not an expert at it), so it can take me awhile to get things right.
    6 points
  3. Hi, this my first site I built with ProcessWire. It's not hyper complex and it has its flaws I know =) http://www.kuban.de I should mention that PW is not running on the server but rather a static HTML output I generated from my local install. I am still managing any changes through PW and then generate the output again. I used Sitesucker for that (it's a Mac tool similar to httrack). This method is discussed here. Modules used: FieldtypeCropImage MarkupCustomPageList ModulesManager ProcessBatcher ProcessPageDelete
    5 points
  4. CMSCritic just launched another part of the site which is a directory of CMS products (powered by ProcessWire of course). Hope you guys enjoy: http://www.cmscritic.com/dir/ While you are there, maybe click the "like" button for ProcessWire if you are so inclined.
    4 points
  5. Great addition, thanks ryan or building it and Antti/Avoine for sponsoring it! It can make several of my more complicated forms on some projects a whole lot shorter and more legible now And like many others, I marvel at how well ryan's initial versions of amazing features just seem to be so polished!
    4 points
  6. Hello folks! I've been playing with ProcessWire a lot recently, and have just launched site number 3 - Bishop Auckland Table Tennis Club. Some of my family members are associated with or are members of the club, so this was a bit of a favour for them. I haven't used many "additional" modules - just CropImage and MapMarker.
    3 points
  7. This is a little off topic, but since it involves headphones, it's probably more in topic here than anywhere else in the forum. If you haven't heard 3D stereoscopic sound (I hadn't), you need to try it, it's really quite cool. To experience it, you need to use stereo headphones. Virtual barber shop (this one works best if you close your eyes): Thunderspace (put headlines on and click play on the video): http://thunderspace.me/ What's cool is also how simple 3d stereoscopic sound is to achieve. You just record the sound with two microphones: one where each ear would be on a person. Your mind apparently does the rest in making it 3d/spacial.
    3 points
  8. I built the site with PW just for my convenience. The client does not want to make any major changes frequently, so the content is more or less static. The output and upload is scripted on my end, so it's just a matter of a single command line command =)
    3 points
  9. Nice work, we'll use it often
    3 points
  10. This is amazing. Can think of so many situations that this will come in handy.
    3 points
  11. 3 points
  12. Wow, I actually said stuff while I watched this video but it came out like "aaaaaah" and "ohhhhhh" rather than "I've felt the need for this on several occasions! Bravo Ryan!" Thanks for sharing it with us.
    3 points
  13. Once again, mind blown!
    3 points
  14. Yup, in awe, just like everyone else! A great addition to a great CMS.
    3 points
  15. This is truly magical. Wow.
    3 points
  16. yeah, so that's a week to everyone/anyone else.
    3 points
  17. I asked the same question from Ryan. It is pretty clever stuff actually: There is also a hint why Ryan deliveres rock solid from the beginning
    3 points
  18. Looks nice https://github.com/kenshin54/popline
    2 points
  19. http://www.cmscritic.com/announcing-the-peoples-choice-for-best-open-source-cms-nominees/
    2 points
  20. If Events all have the same template it would be Which would be the same as $parentmost = $page->parents->eq(2); or $parentmost = $page->parents[1];
    2 points
  21. If your Home has the same template as your events you can use this selector: $parentmost = $page->parents("parent={$page->rootParent}")->first();
    2 points
  22. Just finished a website for a Branding Agency I work together with in Karlsruhe, Germany. "Classic" Masonry stuff, but some nice additions for the client: They can - according to their client's brand - define the main color in RBG values in a field. These values are translated in Hex values and output via PW, so the tiles get the client's colors (mostly on hover) Tile sizes are controlled via a field They can decide to start a tile with an image, headline or logo Images are cycled through no matter how much images they define They can control the whole website, either if they want to create a new tiles overview or a single page or a page which collects its children for a one pager Cheers!
    2 points
  23. Soma, is it necessary to pass the $userid in the URL since you'd already know the user from the wire('user')?
    2 points
  24. Upgrading MySQL to 5.1.70 has resolved this issue
    2 points
  25. OK, what programme did you use to make that spoof video?! After effects or something? My goodness! Avoine/Antti, thank you very much!!! As for you Mr Cramer, I don't know what to tell you. Seriously, mate, I can't pick an adjective apt enough. Let's just say that you Sir are one of the best things that has happened to the open source community. Hats off! cheers /k
    2 points
  26. Awesome thanks avoine!
    2 points
  27. This is epic. Thanks for building it Ryan. Couldn't be happier with how it turned to be!
    2 points
  28. You could use the config options for page secure files... $config->pagefileSecure = true; $config->pagefileSecurePathPrefix = '-'; and make unpublished pages and their files will not be accessible via url. So you could create child pages under the users page with a file field, and leave those pages unpublished. The assets directory will be prefixed with "-" which is restricted by htaccess. But then you can use a passthru script to send the file to the user if certain requirements are given using wireSendFile(); So for example construct the download link to the file like this on a page the user can see. <a href="/download.php?user=1007&file=filename.pdf">Download file</a> and in download.php with something like this for the passthru and user check // bootstrap PW include("./index.php"); // make sure user is logged in if(wire("user")->isLoggedin()){ $file = $_GET['file']; $userid = $_GET['user']; $userpage = wire("pages")->get(wire("user")->id); if($userpage->id != $userid) die("no access"); // make sure it's the user if($filepage = $userpage->child("include=all")){ // since page is unpublished we add include all // get the file from the page $filename = $filepage->images->get($file)->filename; if(!$filename) die("download not found"); // send file to browser wireSendFile($filename, array('exit' => true)); } else { die("no user page found"); } } else { wire("session")->redirect("/somepage/"); }
    2 points
  29. Hi all This module was sponsored by Jason as per this topic: http://processwire.com/talk/topic/3566-email-image-module-development/ It's quite similar to horst & ryan's EmailImage module, but supports multiple email addresses for sending emails to different parts of your site, also allowing you to select different templates. There is also a delimiter option whereby you can split up the email's content and have text appear in the body or sidebar etc. Here's a video to show you what I mean. The video may well be of interest to other module authors as I used some Ajax to push what can normally be done in the module config - hope you like it There was the temptation to build on the EmailImage module with this one, but I already had code for my Helpdesk module (work in progress) that parsed emails using Flourishlib and wanted to use that code instead for this one. EDIT: Also worth noting is that unlike the EmailImage module, this doesn't come with a pre-built gallery template for the front-end. This is intentional as you could pipe emails into any part of a site you like, so I couldn't make assumptions as to usage of the content. You can download it via the modules directory.
    1 point
  30. My first PW project – the new responsive site for the Yavuz Sultan Selim Moschee in Mannheim. Two languages (still using LanguageLocalizedURL module to date), sticky menue, gallery with swipe gestures (photoswipe). Forms for a tour request and prayer times parsed via snippet.inc in a template. Thx for the essential help of the community – without them I couldn't have done it. It was more fun in PW than it was in modX which was my former beloved CMS... the flexibility which PW gives even to a non-coder is fantastic.
    1 point
  31. Good day all! I'm looking to hire a programmer to further build out the Email Image module (http://modules.processwire.com/modules/email-image/). I'd like to build upon or modify this plugin to meet my needs. That being said, I am very open to sponsoring this and releasing it to the public as a free module (add-on to the current module or a new one), however it makes the most sense. What I'm looking to accomplish: 1. The text of the email creates a new blog/page entry in a specific category/section. 2. Images (email attachments) upload to the new blog/page entry and inserts into the page below text in grid layout. Images would enlarge with light box treatment or something similar. Descriptions for each individual picture could be edited in PW at a later time. 3. Needs further investigation - option to convert attachments to slider gallery. Basically, this would be a field report that someone would email to create a new entry with pictures underneath. Timeframe: 30 days Budget: Approximately $500USD (please let me know if this is way off base) Payment Method: Paypal, Credit Card, Bank Transfer (international bank transfer possible but I have not done this before with my current bank, so would have to investigate further) Thanks, Jason
    1 point
  32. I have an example of the opposite http://www.cmscritic.com/critics-choice-for-best-free-cms-goes-to/
    1 point
  33. Because in the details tab of the customer field you must have it set to "Multiple Pages". Change it to a single option and you won't need first() anymore. You should only have it set to multiple if you want multiple customers assigned to each order.
    1 point
  34. You can definitely access images from other pages. When inserting into a RTE field (either TinyMCE or CKEditor) there is the option to insert an image from any page in the tree. If you are wanting to grab the image from another page using the API, then something like this will work: $image = $pages->get(/page-name/)->imagefield->url; If your imagefield is set to support multiple images you'll need to specify which image you want, eg: first(), eq(x), last() etc. EDIT: Btw, welcome to PW. Be sure to check out these resources: http://cheatsheet.processwire.com/ http://processwire.com/api/fieldtypes/images/
    1 point
  35. It looks and works great on mobile! It has all the possibilities to become very popular. Good luck!
    1 point
  36. Hey Ryan, Any thoughts on incorporating those changes in post#7? I am actually using this on a couple of sites now and if you aren't planning on doing something like this for the core, then I might start thinking about a module. No pressure, just want to make sure I don't forget about this when I do a PW upgrade Thanks, Adrian
    1 point
  37. Soma, My bad. I must admit I rather blindly copied your code which was not a good thing. I removed the removeVariations() line and the trick with trackChanges() worked. Thanks! It's a lot more elegant way to rename files than the "add/delete" way. Have a very nice day
    1 point
  38. Almost crying right now. Or having multiple orgasms. Or both. So awesome.
    1 point
  39. I can't. I don't. I'm crying.
    1 point
  40. www.rockybourgoyne.com Processwire is awesome. Period. Using Form Builder and Markup Simple Navigation Module for navigation. Simple use of the CMS thus far, but am looking forward to doing more advanced things in the future with it.
    1 point
  41. Just today I relaunched http://barefigur.es/ It’s now powered by ProcessWire. A bit of history: I launched Bare Figures in January 2012. Originally it’s a site for visualizing Apple’s quarterly results. Charts are being rendered by Highcharts JS. In the first few months after the original release I did all manually (actually also creating the JSON file by hand). After that I used a bare-bones SQL database for inputting the data and a PHP script generated the JSON file to feed Highcharts. Now Bare Figures is powered by ProcessWire (and it feels just absolutely right, I love it). I created a module that generates the JSON files and now the site is, of course, also scalable, which means I can add more companies to the site (the first one besides Apple is Google). I plan to add many more in the future. What do you think?
    1 point
  42. Hi all, here it is the site we made for an european project with processwire! http://smartenergyproject.eu The project will continue for 2 years, and maybe will have 3 languages (EN, ITA, DEU), many editors, and maybe a linkedin integration so is a good start point to test all features of processwire! Alessio
    1 point
  43. What kills me about this module is that Ryan literally decided to make it because I had something similar in WordPress and needed a substitute solution in ProcessWire (as part of the move of CMS Critic to PW) otherwise I'd have a ton of weird shortcodes in my posts for no reason. He made this module, imported my code from the other module (called Hana Code in WP) and named his Hanna Code (after his daughter) and Poof! a module is born. I am insanely jealous of his mad php skills (but glad they can be bought!)
    1 point
  44. This module is now complete: http://processwire.com/talk/topic/3743-processemailtopage/ Thanks to Jason for allowing it to be released to the community
    1 point
  45. Been having fun with this! Here's the output..A frontend demo of Horst's Local Audio Module...It's been fun playing with PW selectors and variables. First, I'd like to thank all the forum folks who've helped answer my API questions - Teppo, Soma, Diogo, Nik, etc....you know, the usual suspects.... Thanks to AnotherAndrew for this post. It led me to the nice jQuery plugin, Filtrify. Horst, big thanks for the module.! It's been a massive learning process for me besides having fun (and at times frustration ! ) along the way. There were times I went round in circles only to realise I was making simple things difficult; this is PW, the solutions are usually simple! Most of the theme is based on Filtrify's demo so all credits to Luis Almeida. Of course I won't be releasing his theme; this is just a demo (unless of course there are no restrictions). I think what I enjoyed most was the logic behind PW and how I could apply that to the demo [being a newbie and all!]. More than getting a solution I like the reasoning that comes before a solution, the journey to an end if you like. The power and sheer genius of PageReference fields and chaining selectors really clicked for me while working on this. Tools used: PW (duh!) This module (duh!x2) jTable (as I wait to learn DataTable) - for tabular track list Filtrify to create album catalogue Audio.js to play the embedded audio When this is done, @Horst, we probably want to do a tutorial/write-up about your project and how I did the frontend? Cheers
    1 point
  46. Processwire a very efficient CRUD tool with a strong API, but there is the "one" thing which my clients are requesting: They would like to build pages which don't fit in the somewhat rigid grid the developer defines: They would like to build pages which are made of an collection of building blocks (some examples: a Google map; a picture gallery; a pic with lightbox functionality on the left with text floating on the right and so on). The blocks can (and should) be defined by the developer in advance, but the clients/editors would like to combine them as they wish. The nearest close answer Processwire delivers to this request is the "Page" field. The pages can be build with that, but it's not very user-friendly: The editor has first to set up each of the child pages, and after that he returns to the page with the page field (I call it "master page") and adds the child pages one by one to the page field. If the master page is viewed, it renders the child blocks quite nicely - but the whole process of content editing takes just too long and it doesn't feel comfortable. I have watched out here in the forum for similar requests (there are a few), but unfortunately, no concrete solutions yet. Is there anything in the pipeline to fullfill these kind of needs?
    1 point
  47. Thanks to all who participate in this discussion and your point of views. I do clearly understand the good arguments of getting in control of how content is structured and presented - we are definitely of the same opinion! For example, using TinyMce is a nightmare for me (and in the long run) for editors too, because it's results are often unpredictable and not maintainable. I want to get rid of such an RTE concept, because that's not what structured HTML is for in principle. On the other hand, take a look at content heavy websites like a newspaper website, for instance. The content areas of these sites are mostly build up of a headline, an introductory text, an image (or an image gallery), a voting, some links... These block elements are limited (good to control, just a hand full of structured code, read: some templates), but it's up to the editor where the voting part or the image gallery is placed. It's part of _his_ creative process. It's not up to me to say: "wait, image galleries always belong to the bottom of the page!". No - it belongs where it best fits, mostly at that place where the according (con)text is placed. An editor may have good reasons why he might use two votings instead of one, followed by an image gallery and some text in between. I can't predict all these nearly infinite combinations and make a template for each of these. Think of "Lego" (oh god, I loved that stuff so much as a child - the elements are limited and easy to control (counted/changed/updated/deleted whatever Processwire does best), but the possibilities are unlimited! What I'm voting for is basically nothing more than a page field, which has the possibility not only to select an existing page, but to create a new page also. This function already exists, but it does only work if the parent template of the "new-to-create" child page is firmly set. That would shorten the process of creating these child pages, the editor wouldn't have to leave the page he is currently working on. Another approach would be a repeater, which has the possibility to select a different template for each row. All in all, please don't understand me wrong - I don't want to turn Processwire into a messy pile. I would like to optimize the backend usefulness at some corners. Some of you said "it's doable" and you have great conceptual ideas, I would wish that I have the coding skills to bring them to life.
    1 point
  48. I've run into a similar issue on one of my sites that has a lot of accounts to manage. I'm hoping to improve the core modules (ProcessPageType and/or ProcessUser) in this regard whenever there is bandwidth to pursue it.
    1 point
×
×
  • Create New...