Jump to content

Leaderboard

Popular Content

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

  1. Yeah, in this context it becomes a very small issue.. I'm still baffled at how well these forums work! o.0
    1 point
  2. I have said it before, I will say it again: Markup Simple Navigation rocks! Together with a JS-based redirection to a new tab, this is very close to perfect. Thanks, Soma!
    1 point
  3. Ah that's something different. You could try something like this: 'item_tpl' => '<a href="{redirect_url|url}">{title}</a>' Then it will take the redirect_url if it's populated.
    1 point
  4. There's no way to do this in php, this has to be done in html or js client side. There's nothing against using target blank in HTML5. If you don't want to, you could add rel="ext" to the links and use jquery to make them behave like you want. This technique was often used in XHTML where target blank wasn't valid. Add it using javascript $("a[rel='ext']").attr("target","_blank"); Or using only the protocol, with any link that href starts with http:// $("a[href^='http://']").bind("click", function() { window.open( $(this).attr("href"), "_blank" ); });
    1 point
  5. More updates to the blog profile at http://processwire.com/blogtest/ Still not done with it, but lots of new tweaks. The biggest one is the addition of Tags, as well as an update to the InputfieldPageAutocomplete (committed today) that makes it work really well for tagging. Now when you are entering something in the autocomplete, if it doesn't match anything you can just hit enter and it adds it as a new page. This is assuming that you've configured the field to support that feature. Anyway, the point of this is that it's a very natural way of adding new pages with autocomplete.
    1 point
  6. I think this is correct, that it really just depends the way you are used to working with images. For the sites I build, if I ask for an image of a specific size, it's because that's the size I need. I don't care what it has to do to get there, because the needs of my layout are more important than the image itself. An image of any size other than what I asked for would be inconsistent at best or a layout breaker at worst. I'm usually dealing with lots of images that I depend on being consistent with each other in size. I hate upscaling, but I hate inconsistency even more. If something has to be upscaled then I'm going to notice that and try to find a better image, but at least the damage is limited to the image rather than the layout or consistency. Here's another way to accomplish it. Put this somewhere in one of your first template includes: function sizeDown(HookEvent $event) { $width = (int) $event->arguments[0]; $height = (int) $event->arguments[1]; $image = $event->object; if($image->width < $width) $width = $image->width; if($image->height < $height) $height = $image->height; $event->return = $image->size($width, $height); } $wire->addHook('Pageimage::sizeDown', null, 'sizeDown'); Now you can substitute any $image->size() call with $image->sizeDown(): $image = $page->image->sizeDown(300, 200);
    1 point
  7. I need to update that list. Actually, I need to get rid of that list and code a real modules directory.
    1 point
×
×
  • Create New...