mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 20:01:47 +02:00
New {SETIMAGE} shortcode for theme developers. Using this prior to a media-manager image being called will allow one to set the default size for the image (ie. when not specified otherwise). eg. {SETIMAGE|w=293} will set the width of the images to 293px.
This commit is contained in:
10
e107_core/shortcodes/single/setimage.php
Normal file
10
e107_core/shortcodes/single/setimage.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
// Aloow theme templates to set the default Image Resizing of thumb.php
|
||||
|
||||
function setimage_shortcode($parm, $mode)
|
||||
{
|
||||
parse_str($mode,$options);
|
||||
e107::getParser()->thumbWidth = vartrue($options['w'],100);
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user