Image resizing for non-uploads

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Image resizing for non-uploads
« Reply #15, on March 14th, 2012, 03:28 PM »
I suppose that provided we perform the injection of zoomedia.js in place of the current code (i.e. doing the inclusion once we hit such an image) we would retain that benefit...
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Image resizing for non-uploads
« Reply #16, on March 14th, 2012, 04:12 PM »
That's exactly what AeMe does when it embeds an item -- but it makes me think, we have to do the change in the database, don't we...? Because it's in the img bbcode... The PHP code... Oh my... I hate that :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Image resizing for non-uploads
« Reply #17, on March 14th, 2012, 04:25 PM »
Oh, yes, yes it is. That's why I asked what it would take to make it work because I'll sit and do it for you ;) I just don't know enough (anything?) about Zoomedia's internals and figured you'd be able to point me in the right direction.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Image resizing for non-uploads
« Reply #18, on March 14th, 2012, 04:40 PM »
Hmmm... Basically, it would take this to work:

Code: [Select]
global $context;

loadSource('media/Aeva-Subs-Vital');
$context['header'] .= '
<link rel="stylesheet" href="' . add_css_file('zoom') . '" media="screen">' . aeva_initZoom(false);

The false is for autosize, which is currently not implemented. There's an additional param where you an set the outline type (array('outline' => 'black') for instance), or an expand delay ('expand' in milliseconds).

I think it should work... But please check first :)