Jump to content

spoetnik

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by spoetnik

  1. spoetnik

    vs Drupal 8

    D8 has Twig as the template-engine, which is a big plus over the old phptemplate engine. The default html-output will suffer less from div-itus and useless classes. D8 is OO programmed, and uses the Symfony framework for some of its functions. D8 looks to become a bit more complicated to program for than the previous versions. D8 Some good modules a in core now (Views, Configuration management...) Expect D8 version 1 in the first quart of 2015. Don expect to many contrib modules in the first 6 months after this release.
  2. Thanks, I think that I will go for option 1: A new install for each client. There will be no custom instances, so a deployment on based on a Git Pull will work nice. Second question. How would you handle agile development? Not all development takes place in File. Field are created, and added to templates. All in Database. How would I deploy new features to running installs, and not destroy the data in the database?
  3. A "Batch" function, or "background" function would be nice given the following use-case. Process the files from an upload field, and index the processed values in your indexing server. There is no need for the webuser to waith for this processing, it could perfectly happen in the background using shell_exec
  4. I am building a SAAS solution based on Processwire. For example it's an intranet hosted on the internet (just for example) I have the following deployment strategies: 1 Processwire install per client. With separate Databases, Assets folder, and maybe ElasticSearch instances in the future. 1 Processwire install for all clients. A reference field on all templates to a "Client" field, so I can relate content to a client. Set the clientID in the $session for all loged-in users, so I can check their permissions. I am considering the first option for the following reasons: All results from a search action are for the correct Client. Strong separation of confidential content Arguments for the second option would be: Maintenance is much easierAny insights, tips??
  5. Thanks both for the quick answer!
  6. I give up. I can't find out why this isn't working: // display sidebar navigation, except on homepage, projects, posts, and partners pages if($page->template->name === 'home'|'project'|'projects'|'posts'|'partners'){ echo "no sidebar"; }else{ echo "sidebar"; } Can someone help?
  7. Hey Ryan, Thanks for your help. The problem is that I want the default language to be determined by the domain. This part works great. I have added the language-determination code via a common include. There is one catch: i want a language selector so the visitor can overrule the determined language. I was thinking to store this overridden language in a session. So, if there is no chosen language (in the users session), use the language determined by the domain. If a user has chosen an other language via the language selector, this must overrule the language determined by the domain. I hope this is clear? I think i need to adjust this snippet to store the choice in the users session, but I don't know how. <?php echo "<ul class=\"languageselector\">"; foreach($languages as $language) { if(!$page->viewable($language)) continue; // check if page not published for this language $class = "$language" == "$user->language" ? "active" : ""; $url = $page->localUrl($language); echo "<li class=\"$language->title hide-text \"><a href='$url'>$language->title</a></li>"; } echo "</ul>"; ?>
  8. I am developing a multilingual website. This website has 3 languages, and two domain. Languages: English (default), Dutch, and Chinese. It has a .com domain, and a .nl domain. The idea is to serve the default language (English) on the .com-domain Serve the Dutch language in the .nl domain. Have a language switcher to switch to the preferred language on any domain. For the default by domain switching I have included this snippet on the homepage: // grab the topleveldomain, i.e. "com", "nl", "ch", etc. (wont work for .co.uk... sorry) $domain = rtrim($config->httpHost, '.'); $languageName = end(explode('.', $domain)); // sanitize it just for good measure $languageName = $sanitizer->pageName($languageName); $language = null; // attempt to find a language with the same name if($languageName) $language = $languages->get($languageName); // if no language matches, then we'll assume 'default' language. if(!$language || !$language->id) $language = $languages->get('default'); // set the language to the user $user->language = $language; For the language switcher I have included this snippet on every page of the site: echo "<ul class=\"languageselector\">"; foreach($languages as $language) { if(!$page->viewable($language)) continue; // check if page not published for this language $class = "$language" == "$user->language" ? "active" : ""; $url = $page->localUrl($language); echo "<li class=\"$language->title hide-text \"><a href='$url'>$language->title</a></li>"; } echo "</ul>"; Everything works fine, except for the homepage! The language switcher doesn't work on the homepage, because of the snippet loading the default language, and thus overruling the language switcher.. I would like to set the default language on the initial load of the site. Set the initial language in the session or something, and the let the language switcher overrule this setting. Any suggestions??
  9. Thanks! The first request I did was to http://mywebsite.com/sitemap.xml and that redirects to http://mywebsite.com/en/sitemap.xml/ "/en/" is the site's default language.
  10. I use the LanguageSupportPageNames as multilingual setup. (works amazing!!! ) This is the wget response for the sitemap.xml. I did double check to not have a trailing slash. the .htaccess is the stock .htaccess from your processwire github. --2013-06-21 09:27:53-- http://mywebsite.com/en/sitemap.xml/ Connecting to mywebsite.com|194.247.xx.xx|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: /sitemap.xml [following]
  11. It looks like this template renders an endless redirect. I am using this in a multilingual site, maybe that's the problem??
  12. Thanks for taking the effort to debug my problem. I have rebuild teh multi-language as suggested using LanguagePageNames. This works like a charm! Tanks for pointing me in that direction.
  13. I have got the module working, manually accesing the urlś work. I can't get your Language Switch to work. Any ideas? It only displays the non-default language names, and these both link to the page with the default language.
  14. Any thoughts on how to use this module together with your LanguageLocalizedURL Module??
  15. Drupal uses Features. Export configuration settings from database to a module to disk. These features could be managed using Git or something. Enables Continouos Integration Scenarios like these :: http://www.slideshare.net/LimoenGroen/continuous-integration-15295346
  16. Sorry, something went wrong (in my head) posting this question. Thanks for your answer, I have bought the formbuilder, an amazing tool worth it's money!!
  17. Is it possible to populate a selectbox bases on a page reference? So a Parent of "Brand", with childs "Dell", "Sony", "Apple", "You get the idea" to populate a selectbox "Brands" Is it possible to populate a selecbox based on a page reference? So a parent of "Brand", with childs "Apple", "Sony", "Dell" could populate the selectbox "Brands"??
  18. Amazing stuff!! Never seen a formbuilder this easy!! Would be very nice if this could build the check-out page of the E-Commerce module
  19. Do you see a (hidden) .htaccess file in the root of your vhost folders? This file handles the rewrite-rules for your local links
  20. In this specific example, they sell kiteboards. One board with different sizes (variations), but each size has it's own print...
  21. I have been cracking on with E-commerce for Processwire, and I love it so far! Still lots to do. Thinking of building an IcePay Payment module (http://www.icepay.com/api-2-en). This will add the, for the Dutch widely-used iDEAL paymentmethod tp Processwire Using "Repeater" for product-variations is working great at the moment. Only one front-end question. At the moment it lists all the product-variations for a given product. I would like to ajax-load the different variations based on a select-option, just like Drupal commerce does (http://demo.commerce...fee-holders/mug) Any suggestions for a solution? Learning a lot at the moment, backend-end and front-end coding! Thanks for any help!
  22. Sweeeeeet!! I will play with this. Thanks for pointing me out in the right direction!!
  23. Maybe this is more of a general PW question, or even a general php question. How do I controll and modify the default output of modules?? I am trying to modify the default shoppingcart. I heart about hooks, but don't know if they are there, and if they are there, how to use them. Another thought would be to extend the shoppingCart class in my own module, but without success sofar. Could someone please help this novice in the right direction a bit?? Thanks.
×
×
  • Create New...