Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/14/2012 in all areas

  1. I know I'm coming to this late and that Ryan has put a lot of effort into the multilingual features in pw. I'm not sure if this will be of any use or interest for presenting a language-select feature in pw but here's a gist of most ISO 693-1 Languages in their own script and includes direction rendering information for those that render right-to-left. Encoded in utf-8 so should render correctly if you have the necessary code-points installed in a font on your system and it also includes a few regional variations (eg. for Taiwanese vs mainland Chinese.) I just pulled this out of my, now rather outdated, Multi-Lingual Publishing (MLP) Pack for Textpattern CMS.
    2 points
  2. Hi everyone, I just finished converting my Dutch site about Sweden from nothing (="cms-less") to Processwire: http://www.zwedenweb.com During the process, which took quite some time, I also rewrote quite some content and added a few new features. And of course a little facelift regarding the design (but not to much, since I have quite some users that are somewhat older and usually they have serious problems with technical changes (or changes in general) Feel free to post your comments! /Jasper
    1 point
  3. Formmailer you should be able to do something like this (needs allow_url_fopen php server setting to be on), but I guess the rss module also uses it so it will work. Simply use this in the template where you markup cache or xml code is to check if url is available, if not it returns false, the @ is just to surpress any error it would throw. if($file = @file_get_contents("http://domain.com/the/path/to/xml")) { // or @simplexml_load_file echo $file; } else { // do something else echo "not available"; }
    1 point
  4. Hi Jasper, Nice site with a lot of good content. As a fellow dutchman i now know where to look for information about Sweden Site's fast too. Do you do any caching on the site? Template cache or maybe markupcache for your menu? Also, are there others working with the PW backend? If so i'm curious what they think of PW.
    1 point
  5. I committed a couple small additions this morning: 1. Fieldset indentation in the template editor. Hard to describe, but I needed some way to make the grouping of fieldsets a little easier to see in the asmSelect list in the template editor. Here's a screenshot which describes it better than I can: 2. The InputfieldCheckboxes field now supports columns. This would typically be used if you had a Page reference field using the Checkboxes input. When editing the field, you'll see a new option on the 'input' tab where you can specify a number of columns you want it to use. This is just a way to tighten things up for when you have lots of short-labeled checkboxes (see bottom of screenshot).
    1 point
  6. Actually those were added at the same time as this update. I experimented with it and it works nicely, but decided just to make them bold rather than changing the color. But you can change the color, background color (or the entire row) or anything else with it from an admin theme. Here are the relevant classes: #ProcessTemplateEdit .asmFieldset - applies to both starting and ending fieldsets or tabs #ProcessTemplateEdit .asmFieldsetStart - applies just to starting fieldsets or tabs #ProcessTemplateEdit .asmFieldsetEnd - applies just to ending fieldsets or tabs #ProcessTemplateEdit .asmFieldsetIndent - controls the width of the indent, adjust with css width property
    1 point
  7. This is the way to create template and fields with API: // new fieldgroup $fg = new Fieldgroup(); $fg->name = 'new-template'; $fg->add($this->fields->get('title')); // needed title field $fg->save(); // new template using the fieldgroup $t = new Template(); $t->name = 'new-template'; $t->fieldgroup = $fg; // add the fieldgroup $t->noChildren = 1; $t->save(); // add one more field, attributes depending on fieldtype $f = new Field(); // create new field object $f->type = $this->modules->get("FieldtypeFloat"); // get a field type $f->name = 'price'; $f->precision = 2; $f->label = 'Price of the product'; $f->save(); // save the field $fg->add($f); // add field to fieldgroup $fg->save(); // save fieldgroup All pretty much standard OO one can figure out looking at core and PW modules. But not someone unexperienced would figure out by themself. I think at some point we need to cover these in a documentation.
    1 point
  8. I tested it out with PageEditSoftLock and found the problem. The reason it tells you that another instance of you is editing the page is because of this statement in the checkpagestatus function: $user = $this->users->get($user_id); if($user === $this->user){ When a new repeater page is added, it goes through a $pages->save(). After $pages->save() finishes, it clears the in-memory page cache to ensure any future $pages->get/find operations in the same request aren't returning old versions (it has always done this). Users are pages. As a result, your $this->users->get($user_id) is returning a new instance of the current user than what is in $this->user, so a '===' comparison won't work, since it checks to see that two objects are the same instance. But the fix is easy, just change the above code segment to this: if($user_id == $this->user->id) { This is also more efficient, as there's no need to retrieve the user from $this->users->get() when all you need is the user ID, and you already have it. --- Edit: fixed issue with the repeater labels note honoring the language setting. They should work properly now.
    1 point
×
×
  • Create New...