Jump to content

MatthewSchenker

PW-Moderators
  • Posts

    677
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MatthewSchenker

  1. Greetings Felix, Nice work, and great to know a company like yours is adopting ProcessWire in a deep way. No question, the API and the community are priceless here. I am viewing the site on iPad mobile Safari: notice how the blue progress line on your slider matches the progress line in the iOS7 safari browser. Thanks for sharing, Matthew
  2. Hey diogo! Great way to explain the ProcessWire data structure by making analogies to universal data-relations concepts! Thanks, Matthew
  3. Greetings, There are so many possibilities it's hard to suggest! When I am hunting for design ideas, I have a list of sites I go to for inspiration. Some have great categories and interesting ways of searching that help you even more. Just a few examples: Site Inspire (Even More specific for you: charity site samples) Design Bombs Awwwards CSSElite Design Shack CSSLine Creattica Thanks, Matthew
  4. Greetings, NooseLadder: a number of us have worked a lot on doing "front-end forms" with ProcessWire. I've been doing it on pretty much all my new PW sites and it works great. I would suggest you open a new thread on this and get into the particular requirements of your project. Thanks, Matthew
  5. Greetings, Excellent concept! I just experimented with it briefly this morning. Will use it more later... One of the most common newcomer misunderstandings about ProcssWire is the "missing" dropdown field. Your module gets us closer to using the depth of ProcessWire pages as selects while being easier to set up. Thanks for doing this! Matthew
  6. Greetings, Nice work! I've viewed it viewing it on iPad Safari mobile and desktop. The site greets you very proudly with the "capabilities" image right up front. Overall, it makes a great first impression. Nice responsive elements! Your company should be proud that you did this -- and moved them from WordPress. Definitely means a brighter future. Just two small comments: 1. On mobile, the main menu drops to two lines even though there's room for a single line. Is this intentional? See screen shot below. 2. When viewing on mobile, I seem to unintentionally pan the "contact" map as I gesture down the page. I think it's because the map occupies a large portion of screen space on mobile. Thanks for sharing, Matthew
  7. Greetings, This is fun. But it really is a good subject to compare what life is like before and after ProcessWire. I already posted my humorous visual. But now, after using ProcessWire more in recent months, here's another way I see it... Before ProcessWire I spent too much time comparing and experimenting with CMSs and frameworks, chasing after specific capabilities. How well does this system do search? What are the templating or theming requirements? Is there a module for [fill in need]? Does it do tags? Is it easy to integrate scripts? No single system did all of these things well, so I was always trying another one, always having to be satisfied with "good enough," and always working around limitations. New projects always presented another "surprise" coding need I had not considered before, forcing me to search again for a system that can do it. After ProcessWire I can confidently handle all of these capabilities, dong them the way I need them to be done for each project, and I know the system will provide an intuitive way to handle those "surprise" coding needs that inevitably arise. I gain better and better understanding of the underlying coding principles behind these development capabilities. Thanks, Matthew
  8. Greetings, If I am reading your needs correctly, you add this to your "find" statement: sort=-date Thanks, Matthew
  9. Greetings bodhic, Thanks for sharing a mockup (looks better than my hand-drawn ones). You got some good ideas from diogo, and there are a lot of possibilities (almost endless actually). In this post, I offer some ideas of how you could handle each content area on your home page. Along the way, I try to show various ways to use ProcessWire search and display options. 1. The "Featured Service" Carousel There are lots of great JQuery carousels out there. For this example, I use bxSlider. Let's say you have a content type called "service," and that content type has a field called "intro_image," where you also enter a description. Let's also say that you have a checkbox field called "featured_service" (when that checkbox is checked, the service is featured). In the code below, we locate all service pages where you checked the "featured_service" checkbox (meaning it has a value of 1), then we sort the results randomly, and display each "service_image" as a 600px x 450px image. Each image links to a full "service" page: <div class="featured_service_block"> <ul class="featured_service_slider"> <?php $services = $pages->find("template=service, featured_service=1, sort=random"); foreach ($services as $service) { ?> <li><a href="<?php echo $service->url ?>"><img src="<?php echo $service->intro_image->size(600, 450)->url ?>" alt="" title="<?php echo $intro_image->description ?>" /></a></li> <?php } ?> </ul> </div> <script> // Slider script for the "featured services" slideshow $('.featured_service_slider').bxSlider({ captions: true, pager: false, }); </script> 2. Promo Offers Next, let's cycle through your "promo offers." You would create a content type called "promo," and give each page an appropriate title. Here, we display the titles of 4 "promo offers," sorted by date (newest first), with a link to the full "promo" page: <div class="promo_offers"> <$php $promos = $pages->find("template=promo, limit=4, sort=-date"); foreach($promos as $promo) { ?> <a href="<?php echo $promo->url ?>"><?php echo $promo->title ?></a> <?php } ?> </div> 3. Additional Services Now let's set up your summaries and links to "additional_services." For this, you could have a content type called "additional_service," with fields for "photo," "intro_text," and "intro_image" (which you can see is a common field shared with "service"). By using CSS to style the list items to have 50% width, you could get the layout in your mockup, with a small 100px x 75px photo floated to the left of the "intro text." The example below shows one way to cycle through 6 "additional services," sorted randomly: <div id="additional_services_block"> <ul> <?php $additional_list = $pages->find("template=additional_service, limit=6, sort=random"); foreach($additional_services as $additional_service) { ?> <li class="additonal_service_box"> <h4><a href="<?php echo $additional_service->url ?>"><?php echo $additional_service->title;?></a></h4> <div class="additional_service_photo"> <a href="<?php echo $additional_service->url ?>"><img src="<?php echo $additional_service->intro_image->size(100, 75)->url ?>" alt="" /></a> </div> <p><?php echo $additional_service->intro_text; ?></p> </li> <?php } ?> </ul> </div> I have not explored the styling for these elements, but if you need help with that just ask! Thanks, Matthew
  10. Greetngs bodhic, What you are talking about sounds feasible and comes down to how you lay out your home page and how you pull content into it. You could, for example, create 8 content types with their own pages, then pull pages from those content types into sections of your home page. You could choose and sort content according to date, a particular kind of material in the content, or other criteria. Tell us more about your ideas and we can follow up with specific code examples! Thanks, Matthew
  11. Greetings, Ryan, that is very generous of you! Your attitude is one of the many reasons ProcessWire's reputation is growing. Even though this is your system, you offer honest answers that are the best for devs and not just markting hype. OK, with that said... I have been doing more with user roles in ProcessWire and ProcessWire is definitely capable of doing anything we want. I have used Drupal and Joomla, and even though both of those systems may have "community" elements built in, the struggle to theme and override all of their design and function assumptions is far more time consuming than setting up user roles in ProcessWire. Also, after you do a few user roles in ProcessWire, you get the system and future ones are easier. * My opinion is, take the couple of extra steps to set up your user system in ProcessWire. It may take a bit more time up front, but will be better longer term. Post on the forum for specific cases and people will share the code. Thanks, Matthew * Another example of the ProcessWire "framework" concept. User roles in ProcessWire are more like doing roles in a framework than in most CMSs. This probably deserves its own separate discussion (http://processwire.com/talk/topic/2676-configuring-template-path/#entry43228).
  12. Greetings, Good point Kongondo about choosing the right tool for a particular project! I think it's important to point out that using a framework in conjunction with ProcessWire does not mean the framework is better or can do more. I like the idea of having one other tool that offers new ideas. With that said, I want to emphasize that I have drastically reduced my reliance on other frameworks over the past few months (since I started using ProcessWire). I mentioned it briefly above, but I have to say that I like PHPixie as a partner to ProcessWire. There is something about PHPixie that seems to meld nicely with ProcessWire thinking. The system itself, as well as the friendly involvement of the developer, all reminds me of ProcessWire. I'd be curious to hear what others here think of it: PHPixie Web Site. Thanks, Matthew
  13. Greetings, To pcreact: Remember, I believe that ProcessWire is a framework with CMS components built into it. I operate day-to-day with that as my working vision of ProcessWire. My comment about "no back-end" is a way of saying that the other frameworks mentioned have just that one bit more of openness and "no assumptions" attitude we all prize. But for me it just means I use a few more lines in my code to tie into the ProcessWire page/field system. Then I am home free to develop exactly like those other frameworks -- but with one very powerful advantage: the querying ease and depth of ProcessWire. Once you are working entirely in the ProcessWire API, I don't currently know of any applications that could not be built with ProcessWire. Thanks, Matthew
  14. Greetings, WeBuilder looks amazing! However... I'd love to see an equivalent system for the Mac! Thanks, Matthew
  15. Greetings, This is a terrific discussion, which opens up a lot of ideas in my mind. Over the past couple of years, I have spent a lot of time using various PHP frameworks (especially like Yii). I would agree with Soma that -- for the most part -- ProcessWire allows you to accomplish the same goals as these frameworks. There is a lot to say here, but I'll try to summarize: ProcessWire's Huge Advantage: Querying and Syntax I find that the syntax of ProcessWire is far more concise and "expressive" (borrowing a favorite Laravel term) than these PHP frameworks. The ability to design very deep queries really quickly and easily is the greatest advantage of ProcessWire. "Framework" vs "CMS" I believe ProcessWire should be described as a framework with crucial pre-built CMS components. Currently, ProcessWire is described as a CMS with a framework behind it. The problem is that when it is described as a CMS, we naturally see comparisons with WordPress, Joomla, and Drupal, and anyone who spends time with ProcessWire immediately realizes it is not the same type of thing as these CMSs. If it were presented as a framework, it would attract a whole different set of people with (I believe) more accurate assumptions. Future Development and Framework Choices Nothing replaces ProcessWire, but I gain something using other frameworks that I often can come back and use in ProcessWire. My very rapid framework rundown... CodeIgniter is essentially dead. Laravel, which seemed great at first, has become overly convoluted. Yii has the best balance as a framework, but when I compared the time and effort to get an application up and running in ProcessWire vs Yii, ProcessWire wins. Lately, I have been experimenting with PHPixie (yes, I am always trying new things), and it is really nice. In fact, I see a lot of similarities between PHPixie and ProcessWire. What Do Frameworks Have Over ProcessWire? The only "advantage" of PHP frameworks over ProcessWire is that frameworks have no back end at all. ProcessWire's back end is extremely minimal, and really does serve the most necessary elements. But when building custom UIs, I often want to just go directly to the database with no assumed page concept at all. With that said, I have developed a set of methods that nicely takes care of this in ProcessWire. And ProcessWire has such an elegant query and syntax system, it saves massive time overall as compared with one of these frameworks. So there is a bit more time getting your custom UI CRUD going, but after that you save huge time using ProcessWire's data-handling system. Sorry if this got a bit far from the direct subject, but it seems that people reading this thread might be asking some of the same questions I have asked about PHP frameworks and ProcessWire. Thanks, Matthew
  16. Greetings, What makes ProcessWire so excellent is the ability to do all kinds of work at the API level, so that you can essentially create a custom admin for your projects. Editing a page is of course a crucial part of any custom admin. NOTES: Of course, you must cutomize this to your project. Also, in my code I am editing the page directly inside the page itself. In other words, you display a page as usual, but inside it you have your edit code, as well as code to save the page after editing. The other option would be to link to another page just for editing. Editing does get rather involved. Below is a technique I've used. I'll break editing down to several steps, then later I'll put it all together as one. Here goes... Step 1: Isolate Who Has Editing Rights You don't want anyone who can view the page editing it! I use code like this to limit editing to people with either an "editor" or "superuser" role. We open it here, and close it later in Step 6: <?php if ($user->isSuperuser() OR $user->hasRole("editor")) { Step 2: Set the $page Variables (Except Title) to Hold Edited Values Take inputs received from a submitted form and use those values to replace current $page values. For this example, I am only using two fields to keep it simple. And they are text fields. We hold off on setting the title, since that needs special handling: <?php if ($input->post->title) { $page->set("first_name", $sanitizer->text($input->post->first_name)); $page->set("last_name", $sanitizer->text($input->post->last_name)); } Step 3: Edit Title Field, but Only if the Title is Unique, Then Save the Page You need something like this so you don't get an error if the title you apply to the edited page collides with the title of an existing page. The code below confirms that the title is unique and allows you to set the title, and only then save the page: $thistitle = $page->title; $matchedtitle = $input->post->title; $checktitles = $pages->find("parent=/[path]/[to]/[parent]/, title=$matchedtitle|$thistitle"); $titlecount = count($checktitles); if($titlecount < 2) { $page->of(false); $page->set("title", $sanitizer->text($input->post->title)); $page->set("name", $sanitizer->text($input->post->title)); $page->save(); Step 4: Refresh URL Think about it... If while editing this page we changed the title, the URL you are on is no longer valid. Here's a simple bit of Javascript to handle this. The code below also closes out the conditional set in Step 3: $refresh=$page->url; ?> <script type="text/javascript"> window.location = '<?php echo $refresh ?>'; </script> <?php } Step 5: Handle the Scenario When the Page Title Collides In Step 3, we edited the page title because it passed the "unique" test. But what if it fails that test? We would move to this section of code, where a message lets the user know there is a problem. A bit of Javascript helps make the warning fade in so it is more noticeable: else { ?> <div class="admin_error_box"> <p>Sorry, there is already a page using this title: <?php echo $input->post->title?>!</p> <p>Please enter a different title in the form.</p> </div> <script> $(function() { $('.admin_error_box').hide().fadeIn(3000); }); </script> <?php } Step 6: The Edit Form We need a form to capture the submission of edits. It would look the same as your page-creation form, but would have to be pre-populated with the current values of the page, which will also change upon submission of the form. The last bit of code closes out the check on user roles set in Step 1: <div class="page_create_form_box"> <p class="form_heading">EDIT THIS PAGE USING THE FORM BELOW</p> <form action="<?php echo $page->url ?>" method="post"> <ul> <li><label class="label_class" for="title">Page Title:</label> <input type="text" class="input_class" name="title" value="<?php echo $page->title ?>"></li> <li><label class="label_class" for="first_name">First Name:</label> <input type="text" class="input_class" name="first_name" value="<?php echo $page->first_name ?>"></li> <li><label class="label_class" for="last_name">Last Name:</label> <input type="text" class="input_class" name="last_name" value="<?php echo $page->last_name ?>"></li> </ul> <button class="admin_submit" type="submit" name="submit">SAVE EDITED PAGE</button> </form> <?php } ?> Step 7: Putting it all Together Now let's put all of this code into one continuous routine. <?php if ($user->isSuperuser() OR $user->hasRole("editor")) { ?> <?php if ($input->post->title) { $page->set("first_name", $sanitizer->text($input->post->first_name)); $page->set("last_name", $sanitizer->text($input->post->last_name)); } $thistitle = $page->title; $matchedtitle = $input->post->title; $checktitles = $pages->find("parent=/[path]/[to]/[parent]/, title=$matchedtitle|$thistitle"); $titlecount = count($checktitles); if($titlecount < 2) { $page->of(false); $page->set("title", $sanitizer->text($input->post->title)); $page->set("name", $sanitizer->text($input->post->title)); $page->save(); $refresh=$page->url; ?> <script type="text/javascript"> window.location = '<?php echo $refresh ?>'; </script> <?php } else { ?> <div class="admin_error_box"> <p>Sorry, there is already a page using this title: <?php echo $input->post->title?>!</p> <p>Please enter a different title in the form.</p> </div> <script> $(function() { $('.admin_error_box').hide().fadeIn(3000); }); </script> <?php } ?> <div class="page_create_form_box"> <p class="form_heading">EDIT THIS PAGE USING THE FORM BELOW</p> <form action="<?php echo $page->url ?>" method="post"> <ul> <li><label class="label_class" for="title">Page Title:</label> <input type="text" class="input_class" name="title" value="<?php echo $page->title ?>"></li> <li><label class="label_class" for="first_name">First Name:</label> <input type="text" class="input_class" name="first_name" value="<?php echo $page->first_name ?>"></li> <li><label class="label_class" for="last_name">Last Name:</label> <input type="text" class="input_class" name="last_name" value="<?php echo $page->last_name ?>"></li> </ul> <button class="admin_submit" type="submit" name="submit">SAVE EDITED PAGE</button> </form> <?php } ?> My apologies for any problems with the formatting of the code above (please use your editor to assure proper tabs). Notes: - If you include checkboxes or other field types in your page, the editing is a bit more involved. - If you have image fields, you would have separate actions connected with those. For more information on handling image fields in custom forms, take a look at this: http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/ That should get you started! Follow up if you have more questions! Thanks, Matthew
  17. Greetings. What I meant was -- as of yesterday -- ProcessWire was not even appearing in the CMS list. I see that ProcessWire is listed now. Thanks, Matthew EDIT: ProcessWire is listed in the new "Directory," but it is still NOT listed in the "List of Content Management Systems." Can this be corrected?
  18. Greetings, netcarver: excellent first bullet point! I have a three-ringed binder filled with blank white paper that I carry around with me all the time. I use those paper dividers with the colored plastic tabs so each site gets it own little section, and I constantly add to pages and re-sketch little bits. I show my sketches to clients, sometimes redrawing elements right in front of them. I have tried so many mockup tools, but I have yet to find one that works as naturally as this. Thanks, Matthew
  19. Greetings, I agree that the author has a bit too much of an all-or-nothing attitude about CSS classes. I gave some thought to what he's saying and realized that it is probably true that a lot of what we do with classes can and should be done with "native" HTML elements. But that takes you only so far, I believe. It seems like there is an important role for classes in more complex layouts. But the article is pushing me to explore those CSS attributes. Thanks, Matthew PS: I posted a response to this article, but it was deleted because I mentioned that I use ProcessWire!
  20. Greetings, Very nice! Your site does a great job of walking a visitor through the practice and introducing you to the staff. Everything is very bright and positive, and expresses professionalism. Thanks for sharing, Matthew
  21. Greetings, Very fun! That's a lucky table tennis club that gets such a nice site. I like the "Sessions" page: great way to present options and show people how to attend. Good job managing a lot of information and activities while keeping the site easy to navigate. Fun photos page! And I like the consistent color theme theoughout. One small issue: text is cut off on the "Events" page if it runs too long. I'm viewing it on an iPad with Safari. See screen shot. Thanks, Matthew
  22. Greetings Everyone, Recently, I read about styling sites entirely without CSS classes -- using the CSS "rel" attribute for everything. I have my doubts, but at the same time the idea has appeal. "Rel" adds some dynamic qualities to CSS. Paired with ProcessWire, I think this technique actually opens up some interesting possibilities. Here's a site where the technique is used: http://www.heydonworks.com/ And here the author makes a case for this approach: http://coding.smashingmagazine.com/2013/08/20/semantic-css-with-intelligent-selectors/ What do you think? Thanks, Matthew
  23. Greetings, I just jumped over there to vote for ProcessWire.... But... Thanks, Matthew
  24. Greetings, That would be great! I can't even count how many client photos I have had to edit manually in this way so they look correct in my galleries. Thanks, Matthew
  25. That's funny... Like you, I got a subscription to Adobe Cloud, but Fireworks was what I used most of the time. But more recently, I must say, I started using Illustrator and like it a lot for SVGs. I have also started using InDesign lately for eBook creation. I have never used Dreamweaver, and don't plan to start! For a very long time, InkScape was my favorite graphics application, but it has disappointed me in how it handles SVGs when you need fine-grained control of the code. Thanks, Matthew
×
×
  • Create New...