SELECT * FROM phpbb_config WHERE config_name like '%thumb%'
in your DB, and then use $config['your_config_name']
in your script.<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
Yup, that worked - the name is img_max_thumb_width. However, I have to reference it via templating somehow, no? It's in attachment.html. I want to dynamically constrain the width of an mp4 video based on its value (I've modified attachment.html to play mp3/mp4's natively in an HTML5 browser) - which, is different than _file.WIDTH.canonknipser wrote: ↑Tue Jan 31, 2017 4:04 pm There should be a value in the config-table having "thumb" in the name, so just look withSELECT * FROM phpbb_config WHERE config_name like '%thumb%'
in your DB, and then use$config['your_config_name']
in your script.
$template->assign_var('S_THUMB_WIDTH', $config['img_max_thumb_width']);
<video width="{S_THUMB_WIDTH}" height="auto" controls name="media">
<figcaption width="{_file.S_MAX_THUMB_WIDTH}">
, it doesn't exhibit the same behavior. The border around the thumb and the caption expands to contain the caption. Here's an example:Hi Frank - useful indeed! I see elsewhere that you have contributed to an extension that presents jpeg EXIF data. Most browsers have the ability to respect orientation when presenting the full size image - but, is there a parameter I can supply to ImageMagick in your script, to have it generate the thumbnail in the proper orientation?
I useshortmort37 wrote: ↑Tue Feb 14, 2017 12:00 am what is the proper PHP Controller file where I should assign the variable?
core.parse_attachments_modify_template_data
as you can see here: https://github.com/canonknipser/viewexi ... er.php#L26shortmort_attachment.html
and create a template switch S_SHORTMORT_ENABLED
in your extension (true when you want to send out "your" code, false when you want to use the original attachments)attachment_file_before.html
Code: Select all
<!--- IF S_SHORTMORT_ENABLED -->
<!-- INCLUDE shortmort_attachment.html -->
<!-- ELSE -->
attachment_file_after.html
Code: Select all
<!-- ENDIF -->
Normally, during upload viashortmort37 wrote: ↑Sun Mar 19, 2017 10:29 pm Most browsers have the ability to respect orientation when presenting the full size image - but, is there a parameter I can supply to ImageMagick in your script, to have it generate the thumbnail in the proper orientation?
plupload
the images shout be rotated automatically; and the generated thumbnail should work on a already rotated images, so no need to rotate again for the thumbnail. But some images (esp. from mobiles) often have wrong orientation flags.
O yes, that helped me a lot the last 30 years ...
Here's an example where I upload an image - with or without the -auto-orient flag to ImageMagick's convert, it doesn't matter - and the thumbnail is on its side. Yet, when I click on the thumbnail to present the full size image in the browser, it reorients!canonknipser wrote: ↑Mon Mar 20, 2017 11:48 am Normally, during upload viaplupload
the images shout be rotated automatically; and the generated thumbnail should work on a already rotated images, so no need to rotate again for the thumbnail. But some images (esp. from mobiles) often have wrong orientation flags.