Jump to content

yellowled

Members
  • Posts

    284
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by yellowled

  1. Current project has news posts which are supposed to be associated with one or more sections of the site. So the template news-posts uses a field news_sections, which uses the fieldtype Page/Multiple Pages. Now, on the index page of any given section (which are child pages of Home), I would like to emit a list of recent news posts associated with said section, limited to 5 posts. However, I can't figure out a way to use the news_sections field as a selector. The basic API call for this should be something like this: $news = $pages->find("template=news-post, limit=5"); so my idea was to use something like $sectionId = $page->id; $news = $pages->find("template=news-post, news_section*=$sectionId, limit=5"); but that doesn't work because the field type doesn't accept *= as a selector operator. Am I doing it wrong or is this fieldtype simply not meant to be used in a selector?
  2. Any chance of adding this any time soon? My suggestion would be to point to this thread in the module documentation. It may be because I'm not a skilled PHP coder, but I got along much better once I read your posts here.
  3. Ryan, if you ever need some king of slogan for PW, I suggest: "It's just too easy." Of course, thanks to soma, this foreach($page->children("include=hidden") as $child) sitemapListPage($child); does the trick. Boy, I wish I had known about PW way, way earlier.
  4. While this works, it doesn't really include the hidden page in the sitemap but adds it to it, i.e. both the root page and the hidden page (including their children) are list items of the sitemap. In my case, the hidden page is technically a child page of the root page, so it should be included in the root pages list item as a child. (I know I could "simulate" this in terms of looks with CSS, but I prefer to have the "proper" markup.) Is there a way to achieve this?
  5. Small issue with this module: It assumes that jQuery is referenced in the <head> of the html, which quite a lot of people (including me ) don't do. For perfomance reasons (and because it's the HTML5 boilerplates default), I like to reference jQuery before the closing </body>. I assume it would suffice to edit the FieldtypeGMap.module like this: $event->return = str_ireplace("</head>", "$css\n</head>", $out); $event->return = str_ireplace("</body>", "$js\n</body>", $out); (haven't tested it yet), but that's of course not safe in case of an update to the module. It would be more flexible to have this as an option in the module. Also, the script call in the content area should probably go there also. I'm fine with adding a Google Map manually if this is not feasible for the module as a general option, I just thought I'd mention it.
  6. Okay, so I'm different. Usually, people want to exclude stuff from an automagically generated navigation – I would like to add stuff. Let's see if I can explain this: I have a primary navigation which this module is just perfect for. But the site also has a secondary navigation in the footer, so there should be an item in the primary nav which skips to said secondary nav in the footer. So basically, I would have to append an item to the nav generated by the module, technically another list item containing a link to an anchor on the same page. Conveniently, this "skip to service nav" item would be the last item of the primary navigation, so I came up with this: 'outer_tpl' => '<ul class="clearfix">||<li><a id="skip-to-service" href="#service">Service</a></li></ul>' which works fine unless I'm on a page which has children (<li class="current has_children">). In that case, outer_tpl is "reset" to '<ul class="clearfix">||</ul>' or something, at least the "appended" list item is not rendered. Not being a PHP coder myself, I can't figure out if this is intended behaviour of the module or maybe a bug. (Although I'm aware I might be misusing 'outer_tpl' here.) I also thought about different approaches to realize that kind of nav item, maybe by using a "dummy page" or something, but I can't figure out how to do that. (Suggestions welcome, of course.)
  7. See, this is what I love about ProcessWire. I was just in a meeting, and the question came up whether it was possible to export a list of events and dates as a calender, i.e. in iCal format. I wasn't sure about it, but I took a wild guess that there would be some way to do this. Back at home, checked the modules page, BAM, there you go. For someone like me who is not able to do "real" PHP coding, this is a life saver. Thank you so much.
  8. I never wanted to imply that there wasn't a good reason to implement it the way it is now, just why I would've liked the option to edit them in a text editor.
  9. I actually did. Why? First of all, I prefer working with larger amounts of text or code in my favourite text editor over working in a web frontend any time. Second, using search/replace mechanism would've made it much easier to keep the translation consistent. There are quite a number of phrases in the translateable files which are used two or more times. (Which, by the way, is a bit inefficient.) I ended up not using my favourite editor (which can handle .json files) because the language .json files are minified and apparently use some kind of escaping for special characters (like German umlauts). I didn't want to risk losing work over some weird side effects of using an editor.
  10. Like with most CMS, you would convert your HTML into a PW template, basically replacing anything which will be generated dynamically by PW with PHP tags/PW API calls. There's a standard template in /site-default/templates/ of the PW download archive which you can use as a boilerplate. Have a look at the .php/.inc files in there. Basically, you need to reproduce your site's HTML structure there, replacing the parts which will later come from PWs database with the appropriate PHP tags/API calls. You can also replace references to the standard template's CSS and JS files with references to your own CSS/JS, or you can just leave the CSS/JS references and replace the content of those files with your own CSS/JS. As it is most of the time with PW, it's entirely up to you. (And that's great about PW, at least in my book.) Now, what's generated dynamically? Well, that really depends on what you want PW to do. Typically, all page content and the navigation are generated dynamically. You'll find examples for generating a navigation in the standard template, but there's also soma's excellent MarkupSimpleNavigation module. The standard template also has templates for a search function and a sitemap – you might or might not need those in your site. Hope that clears that part up a little.
  11. @MadeMyDay just noted on Twitter that copying wire--templates-admin--default-php.json to site--templates-admin--default-php.json solves that. Tested it, it does in fact work. Unless there are any technical objections to this …?
  12. I realize it would mean some extra work for admin theme authors, but wouldn't it be possible to use language variable in the admin theme? Most of the admin themes I checked out seem to be older than the whole multi-language feature, so I just assumed what would be why they don't use translated variables … Found /wire/modules/LanguageSupport/ProcessLanguageTranslator.module That file has no translatable phrases Nope.
  13. I was aware that might be an issue, but I really don't like GitHub repos without any README notes. If anybody knows how to make GitHub exclude said README files from GitHub downloads, do tell. Other than that, great to hear it's not an issue with PW, I haven't gotten around to testing the GitHub zip on a fresh install.
  14. I had some time at hand and nothing else to do, so I went ahead and translated some more. All 70 language files translateable as of PW 2.2.2, to be exact. Someone please double-check these. I'm sure they're far from perfect, and I'll gladly accept any suggestions for better translations or hints to typos. I'll also continue to refine some of the translations, but after this little bulk translation marathon, I need a break. I also put them in a GitHub repo: https://github.com/y...wled/pw-lang-de
  15. Since I'm going to need these in a project soon, I took the liberty of updating these a bit. I didn't edit any of Nico's translations, I just cleaned out some abandoned ones and filled in most of the blanks (not the ones which make perfect sense untranslated). For starters, it would be great if other German native speakers could check these out. I'm sure there's a typo here or there. de-de_2012-05-26.zip
  16. Doesn't look like it for the German language pack. I grepped across all (installed) files in /wire/modules/LanguageSupport/, which gives me this in LanguageSupport.module: $locale = $this->_('C'); // Value to pass to PHP's setlocale(LC_ALL, 'value') function when initializing this language // Default is 'C'. Specify '0' to skip the setlocale() call (and carry on system default). if($locale != '0') setlocale(LC_ALL, $locale); But, and I remember reading something about this in another thread regarding the datetime field, I'm on a Ubuntu machine, and apparently, Ubuntu uses some non-standard localeds. Setting it to "de_DE" for instance does not work, it has to be set to "de_DE.utf8" (which looks weird to begin with). Could be related to the fact that this is Ubuntu desktop, not server.
  17. Not sure if you still need extra confirmation on this, but it works fine in Geman for me with the sole exception that I still need to use setlocale to get localized weekday names. But I guess that's due to strftime's lack of a local version of the weekday names.
  18. Log files? There already is a module to read the error log in the backend.
  19. Just so I don't get this mixed up: This example template is sort of a "standalone solution" for contact forms, right? It works without the the FormTemplateProcessor module? Edit: Yes, it does. Might not be the ideal solution for anyone, but works just fine for most of my purposes. (Although a form builder would still be a neat feature.)
  20. Erm. I guess I should get a cup of coffee. http://processwire.com/download/modules/
  21. (Assuming the might become a FAQ.) I was just wondering: is there a list of PW modules not shipped with the core? Does anyone bookmark all of them in delicious or something? Because sometimes, especially when evaluating PW for a project, this might come in handy. It might also be a nice idea to categorize such a list, maybe add a status (alpha, beta, stable) for each module …
  22. yellowled

    Avoine.fi

    Very nice job, especially with the responsive layout.
  23. ptjedi, I had the same question just the other day. Please see this thread and the one netcarver points out there.
  24. I have to admit this is too much whitespace for me, but you probably get that a lot. Maybe developers approach the site differently than "usual" visitors. When I saw the index page, I was instantly wondering if something was broken or not loaded yet. It does, however, make you curious to explore the rest of the site, which is a good thing. Very nice idea for the design/development/cms credits.
×
×
  • Create New...