Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/22/2012 in all areas

  1. Here are a few ProcessWire sites I've launched in the last month or so. Nothing real big or exciting here, but figured it's good to post new stuff here when available. Blue Ridge Beverage This is a beer distributor for the state of Virginia in USA. I designed it back in 2009, but the client only recently came back and wanted it developed and launched. A friend did most of the development and did a great job getting everything working in ProcessWire. The client is still populating content here, so there are a few holes, especially in the Beverages database. Almanac of Architecture & Design Before you click on this one, note that this is using the default ProcessWire "basic site" profile (the client fell in love with it and didn't want to change… what can I do). But don't let that fool you, because this is actually quite a large and comprehensive site, particularly the Architecture Firms database. This one has dynamic maps, graphs, search engines and stats galore. There's also some fun stuff in the Buildings section. This site is an on-going project, so some sections are built out more than others, and stuff will be continually added to it. Jamaica Villas I just did the development on this one (not the design, other than tweaks). The design they had was very much in line with the Kickstart framework, so I stuck with it when producing in ProcessWire. I enjoyed using it, and was nice to use a framework developed by another ProcessWire user. I've worked on a few other villa sites in the past, and this one is smaller in terms of quantity of properties, though still involved a lot of work. This one has a full calendar and availability tracking system built into it (all running on ProcessWire), so it can search by availability or look at availability calendars and such. So there's a lot of power packed into this one. I just wish I'd had the opportunity to do the full design on this one, but it was still a satisfying and enjoyable project (as most are, when using ProcessWire)
    6 points
  2. Barry, using my MarkupSimpleNavigation module you could simply do: $nav = $modules->get("MarkupSimpleNavigation"); echo $nav->render(array( "max_levels" => 2, "show_root" => true, "current_class" => "on" )); Just in case. Edit: Ok the checkbox thing is not possible. But it would be possible using page "hidden" for page you don't want in mainnav. But your code is also nice and flexible if you need it.
    1 point
  3. Not tested, but cant't you store your custom sortfield temporary in your pages and sort them later by this field? Something like this: foreach ($yourpagearray as $p) { $p->sortfield = toLowerCase($p->title); } $yourpagearray->sort("sortfield"); EDIT: this code should work: foreach ($yourpagearray as $p) { $p->tempsort = strtolower($p->title); } $yourpagearray->sort("tempsort");
    1 point
  4. I've done some research and I've got what I wanted. First issue It's not so important for me right now, but I will check that later. Second issue I've got results similar to my old CMS I'm using shared hosting, so I can't modify MySQL configuration files. I have to use LIKE method, but with standard selector %= I had too many unwanted results. I've decided to add extra selector %^= which use SQL LIKE method but gives me what I wanted To do that I had to modify 2 files in ./wire/core folder: DatabaseQuerySelectFulltext.php: // At line 76 I've added: case '%^=': $v = $this->db->escape_string($value); $v = preg_replace('/([%^_])/', '\\\$1', $v); // prep value for use in LIKE $query->where("$tableField LIKE '$v%'"); // SLOW, but assumed break; Selector.php: // At line 147 I've added: Selectors::addType(SelectorContainsLikeStarts::getOperator(), 'SelectorContainsLikeStarts'); // At line 226 I've added: class SelectorContainsLikeStarts extends SelectorContains { public static function getOperator() { return '%^='; } } After that, I can search for short words using LIKE% method intead of %LIKE% which gives me less but highly wanted results It's similar to ^= selector. I've proposed changes at GitHub. DatabaseQuerySelectFulltext.php Selector.php
    1 point
  5. I figured it out without a plugin, I'll post it for anyone's future reference: <ul> <?php $homepage = $pages->get("/"); $mainchildren = $homepage->children; $mainchildren->prepend($homepage); foreach($mainchildren as $mainchild) { $class = $mainchild === $page->rootParent ? " class='on'" : ''; if ($mainchild->mainNav != 0){ echo "<li><a$class href='{$mainchild->url}'>{$mainchild->title}</a>"; if($mainchild->path != '/' && $mainchild->numChildren > 0) { echo "<ul>"; foreach($mainchild->children as $subchild) { $class = $page === $subchild ? " class='on'" : ''; echo "<li><a$class href='{$subchild->url}'>{$subchild->title}</a></li>"; } echo "</ul>"; }else{ echo "</li>"; } } } ?> </ul> For anyone wondering: if ($mainchild->mainNav != 0){ simply checks if a checkbox is checked that I even want it in my main menu.
    1 point
  6. I want to add in that ProcessWire does have a pretty nice RSS feed module included in the core. There is a good example of using it in the Blog profile in the posts.php template. I mention it only because it was the first item on your list of things PW doesn't have. As far as the quantity and scope of modules go, that's more an observation about the age of the platform than anything else. Had ProcessWire been open source since the early 2000s then I'm sure you'd find the same depth of modules that you do with the likes of Drupal and WordPress. And I actually think our plugin/module system is far better than theirs too. Growth in the quantity and scope of both free and commercially supported modules is something I would expect to happen with ProcessWire over time, so stay tuned. You've correctly identified some of the major compromises that come with a markup generating CMS like Drupal. I don't like that aspect of it any more than you do. But to the positive points of that approach, I think it gets to the heart of what you are talking about. Something that generates markup is by nature going to be able to provide more ready-to-go, plug-n-play functionality than something that doesn't. The compromise is that you don't have much control over that markup, and the markup is usually a mess. But if it's doing everything else you want, then it still may be worthwhile. As designer/developers we are perfectionists and we take our markup/code as seriously as the visuals, so it's hard to look past the mess and the inherent drawbacks. But you get a nice reward for putting up with this mess, which is lots of bolt-on functionality that you don't have to write any code for. It's a compromise like anything else. Unfortunately I've been unable to keep up with Drupal in my toolbox. I've used it on a couple sites, and have had to continue maintaining them. I was able to get past the wretched smell in the code after a lot of effort. But I absolutely dread doing any kind of administrative task or development task in the system. It's a giant time suck that I really don't like using. At the same time, I recognize that many enjoy using it, and I have a good respect for Drupal and all that is possible with it. So if you've found yourself liking it and it's answering some needs you have, add it to your toolbox (alongside ProcessWire). But only use Drupal when you have to. If you don't want to go very far with code, then I think it's good to keep one markup-generating CMS (like Drupal) in your toolbox for the times when it fits. And only use them when they are going to save real time. Use ProcessWire for everything else. Though for those that like working with code, I wouldn't bother with any markup generating CMS, as I think once you know what you are doing with code, they end up costing, rather than saving time. Also want to bring up the other one you mentioned, Expression Engine. There are some quality add-ons out there for it. If it's doing something that lines up with a given project, go for it. If you are doing work where people pay you for it, the cost of EE and any add-ons should be a non-issue. Your time is worth much more than the cost of these things. You should be passing along the costs of anything you purchase to the client. For me, I can't stand using EE any more than I can Drupal. But if you can stand it, then use it in the situations where it makes sense. EE at least gives you far better markup control than Drupal.
    1 point
×
×
  • Create New...