Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/20/2012 in all areas

  1. Thanks Guys. Interrobang: tested and worked nicely - thanks for the tip, I just committed it. Great improvement. Teppo: I think there should be cleaner way to see if field is repeater. Probably by getting the actual field an checking it's fieldtype. But this is great news to know the solution for this problem. Will look into this soon (before holidays I hope).
    2 points
  2. I had the same repeater problem that Soma reported some time ago. Following changes to ProcessCropImage.module got it working: $this->setFuel('processHeadline', 'Crop images'); + $field = $this->input->get->field; + if (preg_match("/_repeater[0-9]+$/", $field)) { + $pages_id = (int) end(explode("_repeater", $field)); + $field = str_replace("_repeater$pages_id", "", $field); + } else { $pages_id = (int) $this->input->get->pages_id; + } $filename = $this->input->get->filename; - $field = $this->input->get->field; $height = $this->input->get->height; $width = $this->input->get->width; $prefix = $this->input->get->prefix; This is a bit of a hack and I haven't even tested it properly, so I'm definitely not saying that anyone should use the same method -- but it worked for me
    2 points
  3. @apeisa A client complained about not seeing the whole image if it is larger then his screen. I was able to fix this simply by adding 2 lines (boxWidth and boxHeight) in ProcessCropImage2.js. Maybe you can add something like this to your official release too? Btw, this module so really great, and my customers are loving it! Thank you so much for releasing it! $(function(){ $crop = $('#jcrop_target'); if ($crop.length > 0) { var w = $('#jcrop_target').data('width'); var h = $('#jcrop_target').data('height'); $crop.Jcrop({ onChange: showCoords, onSelect: showCoords, aspectRatio: w/h, boxWidth: screen.width - 100, boxHeight: screen.height - 100 }); } $('#show_preview').click(function(){ $('#preview-container').toggleClass('hide'); }) });
    2 points
  4. You could also just set it to sort by "date created" (reverse) in the parent's sort setting? This used to be the case up until last month, but is no longer. PW will let you sort by any fields even if they aren't auto-joined.
    1 point
  5. There is a way. // first get parent and it's first child $parent = $pages->get(1001); $first = $parent->child; // create new page with same sort as first child $p = new Page(); $p->template = $templates->get("basic-page"); $p->parent = $parent; $p->title = "Make me first"; $p->sort = $first->sort; $p->save(); // move first child to second position $first->sort++; $first->save(); Now your new page is at first position. However this only work if you got manual sorting on parent of course.
    1 point
  6. This came up by quick googling: Error code 28: No space left on device
    1 point
  7. @ryan - Thanks for this. I was just cruising the code and noticed you used foundation css and was just in the process of coding the menu for a new site (migration from MODx Evo) using foundation. I now owe you a $drink = "Payment for ./blog/topnav.php"; . We will give your PW Blog profile a spin over here. Looks nice. Quick question? How would you approach adding a blog section to en existing PW install using this?
    1 point
  8. Thanks recyclerobot! Just fixed the link, thanks for mention it.
    1 point
×
×
  • Create New...