Jump to content

felix

Members
  • Posts

    214
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by felix

  1. Hey Marcus, as Marco is currently not available i'll try to answer your questions. Normally what you did should be correct. Your structure should now look like this: templates --- | dataproviders --- | ---HomePage.php home.php If this is the case you can try to debug if the dataprovider is loaded correctly. If you just place a "die('test')" inside it's populate method this should be the only output that is displayed on the homepage as the populat method is executed before rendering the actual template. If the template renders correctly instead of just displaying the text "test" there is a problem with loading the dataprovider. This (from my experience) is mostly the case if either the classname of the dataprovider is misspelled or (as stated above) there is a problem with a case sensitive filename. If this doesn't help just contact me here or via skype and we'll debug your problem together. Best Regards Felix
  2. I'm with you soma: I "watched" both talks as i usually "watch" videos from conferences: Listen to them playing in the background and look at the video when there is something interesting to see on the slides (*doh*). Nevertheless: Nice talks from both of you. I know from my personal experience that it isn't as easy as it seems to give a talk even to a small group of people. You both did very well!
  3. We've recently launched the website/blog for our new podcast: http://neuwaerts.fm/ (sorry folks: it's in german) which is of course powered by processwire. The podcast is mainly about marketing, social media and "changing things in your daily routines". From a technical point of view it's pretty much a small, standard blog (although not based on ryans blog-profile). Used Plugins: Thumbnails Modules Manager Video Embed for Youtube Template Twig replace Template Data Providers
  4. @Joss: When it comes to larger sized projects and traffic i'd ask ryan or mike from cmscritic (or even willy) for some stats. But sadly it's more dependent on organization size for the reasons already stated. @apeisa: Thank you very much. I'll contact you soon for sure!
  5. Hey totoff, thanks for the input. You're absolutly right with what you are saying. That's why we've already "been there, done that". We did a comparison and a live demo, Featurelistings and adressed all of their points. We even offered a contract to continue pw core & feature development if it's been discontinued for some reason. As I said: It's not that the customer doesn't like the system from a feature and usability point of view. But having a certain company size sometimes includes making sure there are some numbers you can rely on that save your back in case of "political" pressure. And that's what we are searching for to give him the needed security.
  6. Actually there isn't anything "special". The site will have to handle a pretty decent amount of traffic and there will be a lot of custom Code to connect the Website with various webservices. But that is even easier to achieve in pw than it would have been in typo3. It's just the Client that likes to have some sort of security apart from what we are telling him.
  7. We recently won a pitch for a website of a larger organization that we hope will gain a lot of visits and interest (in our region). The specification book didn't force a CMS to be used but recommended using typo3 as the clients old website is already running with it. Of course(!) we are planning to build the website with processwire as it's our current CMS of choice (and because Typo3 is a pain in the a... ). After presenting PW to the client's IT-Department and the internal ressources that will be creating content they are interested but still not convinced because there are few example showcases and experience reports that match their organization size (1k+ employeers). As a result we were asked to collect some Information on large scale processwire sites and the companys behind them. Plus (if possible) give them some contacts on organization side who they can talk to about experiences (everyday work, performance, security). So: If any of you can help us with that (examples, contacts) your help will be greatly appreciated. I'm sure there will be a lot of interest for PW as a system when the website will be built with it.
  8. I'd recommend using d3.js for data visualization: http://blog.pixelingene.com/2011/07/building-a-tree-diagram-in-d3-js/
  9. We've just implemented a voting functionality for a site which is currently under heavy development (i'll post it here, soon). Users can send in Videos/Photos and win prizes. Every entry can be voted. The way we've done it is like this: - Users can vote via FB and Twitter without any further authentication (social network id, origin + timestamp stored in db) - Users can Vote with their E-Mail Adresses. To avoid fake votes they can vote for as much entrys as they want but their votes aren't counted until they click a link in an opt-in mail. After the adress is validated they are handled the same as twitter/fb users. E-Mails Adresses are Checked against a list of disposable/trash-mail services before storing them (E-Mail Users got a seperate table with a is_confirmed flag) We've also discussed using a service like https://www.rafflecopter.com/ or http://www.voycer.biz/en to use their (very cool) social voting features (tweet to win...) but most of them are either created explicitly for raffles that are based on a single question/item or just support facebook as sign-on mechanism.
  10. +1 for verbosity. It's much more readable, easier to extend and as a plus avoids goto fail bugs.
  11. Doh': I thought the files already utf8 encoded. I was wrong. Shame on me! Thanks a lot!
  12. Hi Ryan, I'm trying to import a list of retailer locations into processwire using your module. The retailer stores all got the same name which contains an "umlaut" (ö). In the options I chose "Make the name unique and import new page". The Records are imported correctly but the title is cut after the umlaut (every page title is "xxx" instead of "xxxöyyy"). Do you have any suggestions how to fix this?
  13. Hey SteveB, Hey Manaus, as Marco can't answer currently I'll try to answer your questions as far as I can. @SteveB the answer is: No. As you've mentioned you can't just use PHP in Template Twig Replace. It is designed to replace the whole rendering Process and expects the input to be twig compatible. You could use Twig filters to achieve PHP execution though. The way we (Marco works at the same company I do) use Twig Replace & Data Providers is somewhat similar to the delegate approach. We use some basic "wrapper" Templates and extend them (using blocks) with template based code. Here is an example we actually use in a blog page from an actual project: Base Template (_base_template.twig in /templates) which is extended later on (every %block acts as a placeholder which can be filled with stuff from templates or chunks): <!DOCTYPE html> <!--[if lt IE 9 ]><html class="no-js lt-ie9" lang="de"><![endif]--> <!--[if IE 9 ]><html class="no-js ie9" lang="de"><![endif]--> <!--[if !(IE)]><!--><html class="no-js modern" lang="de"><!--<![endif]--> <html lang="de" xmlns:fb="http://ogp.me/ns/fb#"> <head> {% include 'includes/htmlhead.twig' %} {% block htmlhead %} {% endblock htmlhead %} </head> <body> <div class="wrapper"> {% include 'includes/header.twig' %} {% block stage %}{% endblock stage %} <main class="main"> {% block mainContent %}{% endblock mainContent %} </main> {% include 'includes/footer.twig' %} </div> {% include 'includes/javascript.twig' %} {% block beforebody %} {% endblock beforebody %} </body> </html> Blog Page (blog.twig in /templates) which displays an overview of the last articles: {% extends '_base-template.twig' %} {% block stage %} <div class="stage row"> <img class="stage__background" src="{{ config.urls.root }}dummy-data/stage_default.jpg"> <div class="stage__inner large-12 large-offset-2 columns"> <h1 class="stage__headline stage__headline--default headline">xxx</h1> </div> </div> {% endblock %} {% block mainContent %} <main class="article row" role="main"> <div class="large-offset-2 large-10 columns"> {% for article in articles %} {{ page.renderChunk('includes/blogpost_preview.twig',article,'blog') }} {% endfor %} {{ page.renderChunk('includes/pager.twig',articles) }} </div> {% include 'includes/sidebar.twig' %} </main> {% endblock mainContent%} The Coressponding "DataProvider"/Controller (BlogPage.php in /templates/dataproviders): <?php /** * Class definition of BlogPage * * @version 1.0.2 * @copyright Copyright (c) 2013, neuwaerts GmbH * @filesource */ /** * Class BlogPage */ class BlogPage extends \nw\DataProviders\PageDataProvider { public function populate() { // load articles $today = date('Y-m-d'); $this->articles = wire('pages')->find('template=blog_article, blog_articledate<=' . $today . ', sort=-date, limit=5'); $pages = wire('pages'); $this->categories = $pages->get('/blog/kategorien/')->children(); $this->authors = $pages->get('/blog/autoren/')->children(); } } And (just to make it complete and show some more twig stuff) here is the chunk for displaying the blog post previews that is included in the template. The chunk gets the article as a param and has it's own controller where you can place logic (i.e. to find related articles), too. <article class="article__preview clearfix"> <div class="article__content"> <header class="article__header clearfix"> <h2 class="article__headline"><a href="{{article.url}}">{{ article.headline ?: article.title }}</a></h2> <div class="article__meta"> {% for author in article.blog_author %} {% if loop.length > 1 %} <span class="meta__author"><img class="article__avatar" src="{{ author.blog_authorimage.size(20,20).url }}" alt="{{ author }}">{{ author.title }}</span>, {% endif %} {% if loop.last %} <span class="meta__author"><img class="article__avatar" src="{{ author.blog_authorimage.size(20,20).url }}" alt="{{ author }}">{{ author.title }}</span> {% endif %} {% endfor %} | <time datetime="{{ article.blog_articledate|date('Y-d-m', config.timezone) }} ">{{ article.blog_articledate|date('d. F Y', config.timezone) }}</time> </div> </header> {% if includeTemplate == 'blog' %} {% if article.blog_keyvisualsize == 'small' %} {% set size = 280 %} {% else %} {% set size = 755 %} {% endif %} {% if article.blog_articlekeyvisual %}<img src="{{article.blog_articlekeyvisual.width(size).url}}" alt="{{article.blog_articlekeyvisual.description}}" class="article__keyvisual {{article.blog_keyvisualsize}}">{% endif %} <div class="article__text"> {% if article.body|length > 350 %} {{ article.body[:350] }}... {% else %} {{ article.body }} {% endif %} </div> {% endif %} <div class="article__category"> {% for category in article.blog_category %} {% if loop.length > 1 %} {{ category.title }}, {% endif %} {% if loop.last %} <a class="category__link" href="{{ config.urls.root }}blog/kategorien/{{category.name}}">{{ category.title }}</a> {% endif %} {% endfor %} <div class="article__read-more right"> <a class="read-more" href="{{article.url}}">Artikel lesen</a> </div> </div> </div> </article> So we're basically splitting everything in includes (DRY), template specific stuff and Controllers. That's the way we believe is the "cleanest" and best maintainable. If you'd like to output some default stuff (i.e. headline and body) you're free to add it to the base template and just overwrite the block that they are in on demand. @Manaus: You don't HAVE to rename everything into .twig - but you CAN. If you like to do this you'll have to set this explicitly in site/config.php: $config->templateExtension = 'twig'; Enclosing everything in a <?php is not required (in fact it will output this as plaintext: <?php).
  14. Hey Ryan, thanks for all your work. That's a really cool addition to let newcomers easily see that's possible to create every type of site using processwire.
  15. Wow. Perfect Timing: Today I was searching for something exactly like this as we are building a social media campaign microsite for a client (let's see maybe the Login part will become a module). Thanks a lot for the link!
  16. Open up devtools -> inspect the form -> add novalidate as an attribute. There you go
  17. Thanks apeisa! All the content is actually linkable. Every content has it's own "physical" deeplink which is loaded via ajax on click. So if javascript is inactive the link will open a normal content page. The second benefit (apart from the site beeing accessible without js and less overhead) is SEO: All contents can be indexed individually. Take this link for example: http://einfach-lebenswert.net/naeher-dran-leben/erzeuger-und-maerkte/ - If you open it you'll be redirected to the homepage (this was a customer request :/) if you've got JS enabled. Otherwise you'll be seeing just a normal details page of the article.
  18. Indeed - I didn't know how to translate "Konsumterror" (Consume Terror? Wtf?) so i used an online tool and loved the output I'm with you: The map would be nice. But as there isn't much budget for seo/sea most of the people will visit this site intentionally and already know the region (i.e. from the offline campaign). Nevertheless: Maybe we'll add that in a future release.
  19. Thanks a lot! Concerning the Issues: - Scrolling: I will discuss this with my coworkers. But I think that's a pretty good idea. - We usually don't remove outlines for the sake of keeping keyboard navigation functional. As there already is hiliting in the navigation this propably isn't necessary but I don't think it's that "ugly". Thanks for the hint. I fixed the images (just forgot to do that before going live). They should be A LOT smaller now
  20. Nienburg Mittelweser is a Region in Lower Saxony/Germany. Our Job was to create an official campaign that engages young familys and skilled workers to settle down in Nienburg. The campaign tries to communicate the benefits of deceleration and living in an rural region in a sympathetic way. Apart from developing the whole Logo/CD/Imagery/Text our job was to create a Microsite that gives interested people a brief overview of the benefits of living in this region. The microsite is (of course/as usual) powered by processwire. http://einfach-lebenswert.net/ For those who don't speak german ( ) here are the 3 keyvisuals headlines translated in english: --> GROSSBAUSTELLE = Large construction site [in Nienburg-Mittelweser] --> KONSUMTERROR = pressures of a materialistic society [in Nienburg-Mittelweser] --> RUSH HOUR = Rush Hour
  21. Apart from that: Elasticsearch deserves beeing picked, too. It's an awesome piece of software.
  22. If you're already using the command line how about start using grunt?
  23. Very nice site. If I'm allowed to suggest something: I think it would benefit from using another (serif) typo (at least for the headlines). This would make it look much more "premium"/"classy" imho (though I'm pretty sure the typo is defined in your customers CD). I'd also be interested in hearing about the workflow part (if you built some modules for that - will they be released somewhen?).
×
×
  • Create New...