Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/14/2015 in all areas

  1. A new project, we are working on at updateAG, is now online (at least first step, online "reservation" process isn't yet) http://www.walder.ch The data for the shoes are imported from their system va CSV. They then can edit and publish and categorize them as they wish. Soon there will come a reservation process, that's only half implemented yet. It's an ongoing process in all parts and will get reworked or extended by time. They were using Typo3 before and were positively surprized and happy with ProcessWire and think it's all a lot simpler. They can edit all their content only with a rough 15 min crash course "showing" them ProcessWire. Design and concept is from another partner firm, who also executes the print campaigns for the client. Maybe something special to mention: is that we fighted a lot with their product fotos. The plan was to use transparent png's and then so be able to color the background. This lead to a lot of problems with png's and GDlib in general. Plus they delivered the fotos as optimized png's 8bit... etc. Very long story short. With the excellent PIA (PageImageManipulator by horst) and after lot of researching and testing I was finally able to "color a canvas", smash the png on it and have a jpg coming out on the other end! This way, we solved a lot of problems with a simple command and have regained back a lot of flexiblity, lesser artifacts and 10times lesser file sizes at the end.
    5 points
  2. I'd love to see the next Pro module provide an easy way for front end visitors to register an account and edit their profile.
    3 points
  3. $page->localName($language); Read on: https://processwire.com/api/multi-language-support/multi-language-urls/
    1 point
  4. Thank you - it's been merged !
    1 point
  5. Actually just created a new PR - row deletion was buggy, it just toggled states instead of setting/unsetting all rows for deletion. Sorry for the inconvenience. Thanks for your work!
    1 point
  6. This should be fixed now. Please stop adding that much features It was an easy fix, adding white-space: nowrap to the thead. At least that was the easiest solution and I don't see any drawbacks. Clicking on the thead items could replace the header checkboxes, question is that the sort feature will remain or not.
    1 point
  7. Hey All, Our company is looking to take on PW devs for a variety of client projects. We're London based and ideally would like to work with devs that can come into the office. The projects are pretty wide in scope, so right now we're just looking for viable candidates to ping us a cover note with details on projects you've undertaken, how you utilised PW within them, highlight anything particularly brilliant you did.... If you can direct message me, I'll ping you my email and we can go from there.
    1 point
  8. Search engines are quite dump machines, if they cannot find a link to one of the files, they won't index them. As those bots are naturally unauthenticated, they should only see the login page. If you want to access control not only the page, where the link will be shown, but also the direct link to the files, then $config->pagefileSecure is the keyword.
    1 point
  9. A starting point maybe? http://modules.processwire.com/modules/fieldtype-secure-file/
    1 point
  10. Same here, 2.6.17 + latest BCE dev and no issues, except the shift-click one and sortable table headers. The latter could be removed using "$table->setSortable(false);" in the module, if not required. Header items are still clickable though (because the CSS cursor: pointer).
    1 point
  11. that's strange. the issues are gone! i'm on 2.6.17 and the dev version of BCE. though i started with the master BCE and maybe the video was taken with that version. i can't remember, sorry
    1 point
  12. I'm not sure why you guys think that limiting flex-items to a fixed number per row is not possible via css: http://jsfiddle.net/yq5fopxh/ If you really want to use php, then use this: foreach($page->projectBox->getValues() as $num => $box) { // 0 1 2 // 3 4 5 // 6 7 8 // echo <br> before any number which is dividable by three without rest // and only if number is not 0 if($num && $num % 3 == 0) echo "<br>"; echo "<div class='projektbox'>"; // box stuff echo "</div>" }
    1 point
  13. Corrected code: $q = $sanitizer->text($input->get->q); if($q) { $input->whitelist('q', $q); $qs = explode(" ", $q); foreach($qs as $key => $q){ $qs[$key] = $sanitizer->selectorValue($q); } $selector = "title|body|interests*=" . implode("|", $qs) . ", limit=50"; if($user->isLoggedin()) $selector .= ", has_parent!=2"; $matches = $pages->find($selector); if($matches->count) { $content .= "<h2>Found $matches->count pages matching your query:</h2>"; $content .= renderNavPanel($matches); } else { $content = "<h2>Sorry, no results were found.</h2>"; } } else { $content = "<h2>Please enter a search term in the search box (upper right corner)</h2>"; }
    1 point
  14. $box_count is a new variable - you need to be initialising it to 0 outside the loop. The variable is simply a means for you to see where you are in the loop, and has no direct association with $box itself. (I have used the camelCase naming format for the counter, in my example.) <?php $boxCount = 0; ?> <?php foreach ($page->projectBox as $box) { if ($boxCount == 3) { // start a new line echo "<br>"; $boxCount = 0; } else { echo "<div class='projektbox'>"; // box stuff echo "</div>"; $boxCount++; } } ?>
    1 point
  15. thanks kixe and adrian! While creating the site, as a superuser I always use this module, http://modules.processwire.com/modules/process-batcher/ Congrats Adrian!! that one looks great too and makes sense for the editor role and batch delete. I haven't tried the cronjobEmptyTrash module, always try to keep the modules to a minimum but I will certainly have a look at that one too. thanks!
    1 point
  16. I sometimes use the code below (include doesn't loose context). <?php // Allow to cache to a variable function getPartial($path_to_file) { ob_start(); include($path_to_file); return ob_get_clean(); } $partial = getPartial($config->urls->templates . 'partials/myfile.php');
    1 point
  17. Have you tried this? $packages = $pages->get('template=packages, currency='.$page->currency->id); Perhaps you can leave the last "->id" part too. If you are using this regularly, create a getPackages function in _func.php that accepts $page as parameter and returns the snippet I wrote above. Thus you could use getPackages($page) when you need it.
    1 point
  18. Ah, great That reduces the whole stuff to just one line. So simple. Did I already say that my RegEx know-how is very limited ;-)
    1 point
  19. Perhaps you'll find your solution here: http://stackoverflow.com/questions/18890053/php-conditions-depending-on-window-width-media-queries I guess there are "solutions" with PHP, PHP + Javascript, Javascript... By the way, a ProcessWire version is missing at "3rd party modules" here: https://github.com/serbanghita/mobile-detect NB: don't forget to also read the last answer(s). Edit: see also https://css-tricks.com/forums/topic/how-to-load-a-section-of-content-only-if-the-screen-is-over-a-certain-width/
    1 point
  20. I think it can be much simpler: Turn on url segments for interests, and link to /interests/interest1/PLACE/, where PLACE is the first url segment. //poi.php $url = "/interests/interest/{$page->parent->parent->id}/"; //interest.php if ($input->urlSegment1){ //validate that the url segment isn't bullshit $place = $pages->get((int)$input->urlSegment1); if (!$place->id || $place->template != 'place') { $session->redirect( … ); } $pois = $place->find('template=poi, interest={$page->id}'); // here you go. // alternatively, if you want to fiter out the 'sender', // add it as second url segment (and after check&validation), use: $pois = $place->find("template=poi, interest={$page->id}, id!={$poi_from_segment_id}"); }
    1 point
  21. @elabx, not possible. We are in one of the interests pages at this point. -- You have only two ways of passing info to the future page when pressing a url: the url itself or session. With session there is no way to create a permanent shareable page, so i would go for the url. you can do this with url segments or using a get in the url referring to the place. -- I would simulate with url segments that interests is at the same level of the tree as (do, see, etc) and link to there instead, leaving the interests pages without a template file. You could do it like this: <?php foreach ($page->interests as $i) { $place = $page->closest("template=place"); //or whatever works $url = $place->url . "/interest_" . $i->name echo "<li><a href='{$url}'>{$i->title}</a></li>"; } ?> On the template from the places pages you would have something like (rough draft): if ($input->urlSegment1) { if (!substr($input->urlSegment1,0,9) == "interest_" ) throw new Wire404Exception(); $reduced = str_replace("interest_", "", $input->urlSegment); $sanitized = $sanitizer->name($reduced); $int = $pages->get("name=$sanitized"); $pois = $pages->find("template=poi, interests=$int"); $content .= renderNav($pois); } Edit: And welcome to PW! Edit2: corrected typo
    1 point
  22. What's critical about Lister Pro? The ability to easily save a customized lister, perform bulk actions on results, and have convenient, end-user access to tabular views of large content types that are too cumbersome to manage from within the tree control. This is standard functionality in any CMS worth using, and essential for the vast majority of sites I've built over the last 20 years or so. It's a bit silly, IMO, that you can't do these things with the built-in lister. It feels intentionally crippled solely for the sake of selling the commercial component, a perception we want to avoid. I wouldn't build anything more than the most basic, trivial processwire-powered site without Lister Pro, whereas I could easily do without the other pro modules. I (sometimes) use Form Builder out of convenience, but Lister Pro out of necessity. Mind you, I'm not complaining about the cost, at all. It's entirely reasonable and I'm happy to support development. But if we're talking about the road map for the core, open source project, I most definitely view Lister Pro as essential functionality that absolutely should be part of it. I am intrigued by the idea of "graduating" pro modules to core modules via some process that combines hitting some financial goal with enough general community interest in having specific functionality available in the core. Just my two cents.
    1 point
  23. The BMW Dealersites is a collaboration of various BMW dealers, brought together in a multisite ProcessWire setup with centralized and per-dealer contentmanagement possibilities. For anyone interesed, below a quick glance at the multisite pagetree: BMW enforces strict design guideliness for all websites that are built carrying the BMW logo. The guideliness are extensive but can be considered a bit outdated, since they do not take responsive possibilities into account yet. We managed to implement a responsive setup nevertheless, still complying to the guideliness. Which was quite a struggle, I can assure you As mentioned, the Dealersites is a collaboration of various BMW dealers. The idea is that all dealersites are basically the same (fields and templates), yet content may vary. This enabled us to create a centralized content module, in which content can be added and copied to all underlaying dealersites, minimizing the efforts needed to add and maintain content. See the screenshot below for an impression on how this works. We have been experimenting with hosting a bit. The sites are hosted using various Docker instances on an Amazon EC2 server, and mails are sent using Amazon SES. In the near future we plan on implementing ProCache3 with Amazon CloudFront. If you need any info on our experiences with this, just drop a line in this topic or sent me a DM. We have used quite a few modules, but nothing exotic. FormBuilder was used to create forms, some of which are handled by a third party URL to have added functionality: shooting Leads to an external webservice for example. The dealersites: http://www.vanlaarhovenbmw.nl http://www.vanhooffbmw.nl http://www.demaassche-venlo.nl http://www.demaassche-echt.nl http://www.nobracars-uden.nl http://www.nobracars-helmond.nl http://www.story-denbosch.nl http://www.story-waardenburg.nl http://www.story-nijmegen.nl Splashpages: http://www.nobracars.nl http://www.demaassche.nl http://www.bertstory.nl Work was done by us at X-com
    1 point
  24. Great, thanks. I used explode to get the individual words from the search query and then a foreach to build the selector. $selector = ''; if($input->get->general_search) { $value = $sanitizer->selectorValue($input->get->general_search); $terms = explode(" ", $value); foreach($terms as $term) { $selector .= "title|author|source|keywords|bibliography_type%=$term, "; } $input->whitelist('general_search', $value); }
    1 point
  25. Actually, you can do this on the dev branch. Lets assume that cities are children of countries and that is reflected in your page structure (i.e. /countries/france/paris/). Create your 2 page fields (country and city), and configure 'country' as a single page field with "parent" set to "/countries/". Next, for the "city" field configuration, use the "Custom selector to find selectable pages", present on the "input" tab. In that field, enter "parent=page.country". Save and try it out. This works with select, selectMultiple and asmSelect fields (and possibly others), though not yet with checkboxes, radios or PageListSelect.
    1 point
×
×
  • Create New...