Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/11/2013 in all areas

  1. A small PW-based site for a Swiss photographer has just left the door: http://www.nicolasaebi.ch/ Nothing too fancy here. A couple of gallery-pages, using mainly isotope and fancybox. Responsive. Minimal.
    3 points
  2. Philipp is right -- this is roughly the logic I used a while ago: if ($input->pageNum) { $limit = 15; // whatever limit you're actually using if ($input->pageNum > 1) { echo "<link rel='prev' href='{$page->url}{$config->pageNumUrlPrefix}".($input->pageNum-1)."' />"; } if ($input->pageNum * $limit < $items->getTotal()) { echo "<link rel='next' href='{$page->url}{$config->pageNumUrlPrefix}".($input->pageNum+1)."' />"; } }
    3 points
  3. I've officially launched this site today: http://www.kidderminster-husum-twinning.co.uk/ For those not familiar with twinned towns/cities - many places (in Europe at least) are twinned with other places in the world and these are two such places which have built links between their cultures, clubs, associations etc. It was a relatively straightforward site. A design I had made many months ago actually lent itself to the Foundation site profile (which I upgraded to Foundation 5 without too much hassle) and most of the content benefits from the default styling in this case, which was a bit of a fluke as I'd not done anything with Foundation when I originally designed this I was in two minds whether to use Foundation as I'd not really touched responsive before, but it works nicely on mobile and I'm glad I did it. There's a bit more going on behind the scenes than meets the eye, and I think that because this looks like a simple site it might well be worth a full case study with a few tutorials of how I personally approach things. As for the tools I used, here's my list of modules: CKEditor Markup Yahoo Weather (a modified version) Page Link Abstractor (I always use this now so links in the body don't break when moving the site to the live server) Thumbnails (I couldn't imagine a site without this!) Languages - all of the core modules for languages, as there are English, German and Danish versions of each page (not all translated before anyone spots that but I shall leave that to the Twinning committee ) I also turned on caching for each of the templates. Due to the weather constantly updating on the sidebar I didn't use ProCache on this occasion - I toyed with making the weather a JS/AJAX/PHP combo but it then loses it's synchronisation with the two images in the slideshow on the homepage and that looked so nice that I can live with what is still a relatively quick site without making design sacrifices for the benefit of a bit more speed. What do you think?
    2 points
  4. Greetings, Nice job! Great way to design a site so the content (photography) takes center stage. The site looks great, it loads fast, and the navigation is clear. Isn't it great when you have good materials to work with? Thanks for sharing, Matthew PS: I need to get that split-tongue image of Sandy Caracciolo out of my head!
    2 points
  5. Great news! Now it's possible to try thousands of FontShop fonts while developing a website http://webfonter.fontshop.com/ http://blog.fontshop.com/2013/12/04/introducing-fontshop-webfonter/
    1 point
  6. This would give you a pager without enabling PageNumbers on template, thus using /?page=2 instead of /page2 $pageNum = $input->get->page ? $input->get->page - 1 : 0; $limit = 5; $start = $pageNum * $limit; $result = $page->children("start=$start, limit=$limit"); echo $result->renderPager(); foreach($result as $p) echo "<p>$p->url</p>"; echo $result->renderPager();
    1 point
  7. @3fingers: sorry, I had managed to miss your question. This is exactly why I added JSON view to the latest changelog version, i.e. you could use PHP or JavaScript to request same data as JSON and parse that to whatever you need. If the module is installed to default location, you can get this data from /processwire/setup/changelog/json/. Various search parameters (GET params) also work there. Ask if you need more detailed description, I'm in a bit of a hurry right now
    1 point
  8. There must be a lot of photos in there for the counting of that field to be a bottleneck? Something that may be even faster is to load the concerts that have photos in one query and label them as such, then load the concerts that have no photos in another: $concerts = $pages->find("..., fotos.count>0"); foreach($conerts as $concert) $concert->has_photos = true; $concerts->add($pages->find("..., fotos.count=0"))->sort("title"); Using that method, output code would just check $concert->has_photos; rather than count($concert->fotos); But you will have reduced 250+ additional queries down to 2.
    1 point
  9. Pete tracked it down and I put in a fix. The problem was actually related to the prependTemplateFile / appendTemplateFile options not being properly identified in the cache.
    1 point
  10. @pwired, kind of you to help, but OllieMackJames posted the thread in the jobs board
    1 point
  11. Hi Jonathan, Mary started a similar discussion a while back: http://processwire.com/talk/topic/4349-thousands-of-pages-one-site-with-multiple-pages-or-one-install-with-multiple-sites/ I don't think it touches on user roles but as Craig said some custom code might do the trick.
    1 point
  12. I think ProcessWire will be able to handle this fine, with a bit of custom code thrown in. Ryan created a Page Edit Per User "proof of concept" module to demonstrate how a role can be used to restrict the editing of certain pages, so this will be an ideal place to start at.
    1 point
  13. I see ProcessWire as a system that you build things on top of, and that's the purpose of it. You don't download ProcessWire to start publishing content in 5 minutes (even if you can), but rather to build a site or application. So ProcessWire is much more of a tool to accomplish some end means, rather than the end means itself. ProcessWire and WordPress are completely different animals in this area (opposites really), and I think it helps to explain why you can't assume that WordPress and ProcessWire would be considered in the same light via the GPL. I think the GPL is flexible enough to handle both. That's not to say we might not switch to MIT in the future, just to avoid even having to talk about it. But I prefer to stick with GPL at this time. When it comes to my own commercial modules, I still consider them open source for the users that have them, and any fees paid are for access to and support of the product. The 1-year timeline applies only to support. You can continue using the products as long as you'd like.
    1 point
  14. This might sound a bit crazy, but I wonder if doing this is more efficient; if($pages->get("parent=$tour, name=$concert->name, fotos.count>0")->id)
    1 point
  15. Bravo Christophe! I am beginning to wonder whether I should write an article not so much about Processwire, but rather why professional sites should not be made using Wordpress. I have nothing against Wordpress - it is an extremely powerful and well supported blogging platform and it is a really great tool for the hobbiest or small company that wants to create their own website without using a developer - indeed, I use it for a couple of my own blogs (though more recent ones have been built with PW) But the other day, while researching competition for a client, I came across a professional website made by an "award winning developer," built on Wordpress. I will be nice and not post the site here. It was a perfectly acceptable website, except that it used a wordpress installation and a ton and a half of wordpress plugins. The list of style sheets and script that the template was resourcing was huge and there were three different versions of JQuery being accessed, The actual site was very simple, but some of the layout was a bit cock-eyed because the client had been editing his own site with the TInyMCE editor and messed up some of the images. The client's web site requirement had been shoe-horned into Wordpress, whether that was appropriate or not, and for me that is just plain wrong. When I compose music for someone's advert, I don't go through my files trying to find an old piece of music that more or less fits the clients brand, I start from scratch and write something that fits their brand, their name and their campaign properly. In the industry I come from, that is what is expected of me. To stretch an analogy to breaking point, Processwire is a piano that you can use to write any song you like. Wordpress is a pianola that can only play the tune that is punched out on the scroll. (And just in case you don't know what a Pianola is: http://en.wikipedia.org/wiki/Player_piano)
    1 point
  16. i see htmls in there sholdunt u.use html as mode ? their is no javascripts here just html script link to javascript tl;dr use.html mode
    1 point
  17. A nice small review in French http://comparatif-cms.fr/processwire-cms-pour-site-sur-mesure/ Merci Christophe
    1 point
  18. Hi Seb, welcome to the world of the great ProcessWire! I'll try to translate WillyC to English There are two problems: 1) The code is not efficient. Your two nested for-loops load to much unused pages into memory. As you need only the concerts, go directly over the concert template: $concerts = $pages->find('template=concert'); // Maybe sort by date or another field 2) As already mentioned above, 250+ concerts are a lot to show to a user. Try to paginate them. But could be that the page load already decreases a lot if you try number 1) Cheers
    1 point
  19. Killed me. Dead. Perhaps you could also list the first 20, then "load more" via ajax on request. Also... Welcome Seb!
    1 point
  20. u shuold use.vagination with 10 - 20 concerto/page hundredos of paginas u run out memory soon if u.cannut u may try stop nested foreacher.use $tours->find( "template=concert ") { edit each felds:: date city text fotos podcast checkbox ``auto join`` save dose this help ? it.shuld u.can loook 2 ``markupcache`` modulos too in end u must use paginasnation other wises u site can not scale
    1 point
  21. I think it needs the justify class to be allowed if using ACF - not sure how to do that. See this: http://ckeditor.com/forums/CKEditor/Enable-Justify-in-ACF Oh, by the way, the standard installation of ckeditor does not include the justify plugin - that only comes with the full build. But you can download it.
    1 point
  22. Never seen Simple grid before, but I like the classnames as they are easily created with PHP. I prefer to stay in PHP, not close and open it every time.
    1 point
  23. Ok. Coincidence, as there was an dev update just an hour before I posted this thread which seem to fix this cache problem for me. Will test a litte more but definately the cache gets deleted now correctly it seems
    1 point
  24. <pwired>I think nowadays a cms should have included this from the start.</pwired> I disagree on this. I prefer well formed structural information, not the graphical representation in one situation. Content should have an independent value, not fixed to one distribution, so it can be used on a multitude of platforms. There are situation where in-page editing makes sense, but we should not forget there's high value in structural information.
    1 point
  25. Maybe I don't understand what you're saying The halfsuperuser should be created in roles, not in permissions. Every role can have a multitude of permissions you want. You can set give access at Template level.
    1 point
  26. That index.html file is just for reference, not to use in your website. Build your PW site as you would normally and use these examples when you need them. The css and images folders, you can either have them in the templates folder, or put their contents in the /styles/ and /styles/images/ (although you won't need those images for sure), or whatever you do usually.
    1 point
  27. @Pete: you're absolutely right there. A court probably wouldn't argue against copyright holders intentions especially considering that if someone "violated" the terms set by ProcessWire's GPL license, i.e. didn't adhere to the requirements set by said license, then the license wouldn't apply to them and they'd actually be violating Ryan's rights as the copyright owner.. and only Ryan could sue them for that . See where I'm going with this? To summarize this, if you want to extend / modify and then distribute a copy of ProcessWire that's licensed under GPL, you must follow the rules set by that particular license. Otherwise the license wouldn't apply to you and you'd in turn be violating Ryan's rights as the copyright owner.. which wouldn't make any difference unless he decides to sue you for that. On the other hand, if Ryan ever decides that he wants to provide you with a copy of ProcessWire under another license (and as the copyright owner that should be well within his rights, though I'm not a lawyer and might be wrong here), you can modify that copy without having to consider rules set by GPL. This Stack Overflow answer pretty much summarizes it all. Highly recommended! Edit: this is getting pretty far from the original subject, which was commercial modules. I think that we've just about reached the conclusion that yes, you can create commercial modules, and no, you probably won't get sued for that. Since this seems to be a relatively common subject here these days, perhaps it would make sense to add some kind of short explanation to the website, maybe to About > Licensing section?
    1 point
  28. I think that's the key - ryan's posted his interpretation of it here on the forums so you have the software author's permission - I can't think of a scenario where a court would argue against the software author's intentions partly because the GPL can be interpreted several ways as we've seen. I agree that something on the main website would be a good idea as well spelling out ryan's intentions - either on the plugin modules page or maybe a separate commercial modules sub-page that perhaps also links to commercial modules in the directory (if there's a way of filtering those? Not sure why you'd want to now I'm saying it though as it's better to search for something you need rather than filter by paid/free ).
    1 point
  29. I might be wrong here: What I find weird is: roles=company Roles is a Pagearray, so I think only a page ID or ID's separated with | would function here.
    1 point
  30. Hi totoff, I plan to update this theme in the near future for current and upcoming PW releases, I'm working on the new theme which is almost done, I'm tweaking the responsive part of the theme. I've been quite busy last couple of months and haven't had time to work on any of my themes and I was generally quiet around PW forum in general, my apologies for that (to everybody)... I don't think that I'm planning to support older themes besides Ergo and my new theme that's near release date of pure reason updating JqueryUI and other things is very time consuming. It's better to have 2 themes fully supported then 5 themes partly supported in the end. I'm willing to help anybody that will continue to use my older themes with any kind of advice regarding functionality.
    1 point
  31. You can also populate a page field with a custom php code in the field settings and use api to fill dropdown with child pages of current page. Like context aware.
    1 point
  32. First things first, the $user->language should be set based on the current domain its being accessed from. We'll assume that the subdomains match the language names, i.e. subdomain "fr.domain.com" corresponds with language "fr", as named in ProcessWire. Code like this should exist at the top of a common include file that gets run/included before others (I recommend using $config->prependTemplateFile to automate it for you, see /site/config.php). /site/templates/_init.php: foreach($languages as $language) { if(strpos($config->httpHost, "$language->name.domain.com") === 0) { $user->language = $language; break; } } Next, I'm not necessarily sure it's ideal to autodetect the browser language and redirect based on that. There will always be cases where this doesn't actually match the user's preference. It might (possibly?) be an SEO concern too. It also limits what you can do in terms of caching, since you have detection code that always needs to run. I think it might be better to present a default language and an easy path for the user to find their language. However, if you still want to do language detection from the browser, you can look at the http_accept_language header. We'll assume that your languages are subdomains use the same naming convention as the http_accept_language, which would be "fr", "en", "es", etc. $name = $sanitizer->pageName(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)); $language = $languages->get($name); if($language->id && $name != $user->language->name) { $url = "http://$name.domain.com" . $page->localUrl($language); $session->redirect($url); } I've found that flags don't always represent language well. For instance, for Spanish do you show a Spain, Mexico, or some other flag? I think what's better is to make the selection based on the native language name, i.e. "Espanol" for Spanish. This is easily recognizable to people looking for the language. As for implementation, there is a good code example for this in the API documentation: How to implement a language switcher. In your case, using different domains, the same strategy would apply except that you'd need to include the domain as part of the $url, i.e. // this for: de.domain.com $url = "http://$language->name.domain.com" . $page->localUrl($language); // or this for: domain.de $url = "http://domain.$language->name" . $page->localUrl($language);
    1 point
×
×
  • Create New...