{{indexmenu_n>600}} ===== imgx= (Images from filecenter) ===== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=112248#p112248]] For pictures there is a special replacement tag using the UD info from filecenter when over driving the respective file. **Images:** [img=ID.FORMATxWxHxCROPxQUALITY ALT-text]TITLE-text[/img] **shorted:** [img=ID.FORMATxWxHxCROPxQUALITY] ''WxHxCROPxQUALITY'' are optional - ''[W[xH[xCROP[xQUALITY] [Alt-text]]]]'' Basically this is enough: [img=10x100x100] Show a picture with ID 10 as JPG and shrink it proportionally to max. 100 pixels width and/or 100 pixels height. **Downloads:** [download=ID1] [download=ID1]Caption[/download] [download=ID1,ID2,ID3]Caption1 Caption2 Caption3[/download] wird nicht mehr gebraucht ===== Tag [imgx=.....] - is not no more used ===== The internal function with -- //[img=ID.FORMAT WxHxCROPxQUALITY]Title-text[/imgx]// -- functioned not yet (v1.4.0 r286), therefore the procedure was outsourced by me temporarly to frontend_render ( /include/inc_front/ext.func.inc.php ->function parse_images($matches) ). Tag: **##[imgx=ID.FORMAT WxHxCROPxQUALITY ALT-text]Title-text[/imgx]##** .FORMAT WxHxCROPxQUALITY ALT-Text & Title-Text are optional - [.FORMAT [W[xH[xCROP[xQUALITY[ ALT-Text[Title-Text]]]]]]] [imgx=ID.FORMAT WxHxCROPxQUALITY ALT-Text]Title-Text[/imgx] The original script in /include/inc_front/ext.func.inc.php programmed by (c) Oliver Georgi 03.01.09 patched and swaped out to /frontend_render/* by K.Heermann (flip-flop) Forum: http://forum.phpwcms.org/viewtopic.php?p=107263#p107263 Tag: [imgx=ID.FORMAT WxHxCROPxQUALITY ALT-Text]Title-Text[/imgx] .FORMAT WxHxCROPxQUALITY ALT-Text Title-Text sind optional - [.FORMAT [W[xH[xCROP[xQUALITY[ ALT-Text[Title-Text]]]]]]] Have a look into /include/inc_front/ext.func.inc.php -> function parse_images($matches) { .... For me it canĀ“t run. I have swaped out and patched this function to /frontend_render/ with the tag: [imgx=ID.FORMAT WxHxCROPxQUALITY ALT-Text]Title-Text[/imgx] ============================================================================================= */ // ---------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) { die("You Cannot Access This Script Directly, Have a Nice Day."); } // ---------------------------------------------------------------- if( strpos($content['all'], '[imgx=') !== FALSE ) { function parse_imagesx($matches) { // $matches[0] = [imgx=ID.FORMAT WxHxCROPxQUALITY ALT-Text]Title-Text[/img] // $matches[1] = FileID // $matches[2] = WxHxCROPxQUALITY ALT-Text // $matches[3] = Title-Text if(isset($matches[1])) { // Image file ID $img_id = intval($matches[1]); // .FileID // check for Alt-Text $alt = explode(' ', $matches[2], 3); // WxHxCROPxQUALITY ALT-Text // $alt[0] = .FORMAT // $alt[1] = WxHxCROPxQUALITY // $alt[2] = ALT-Text $value = explode('x', trim(strtolower($alt[1]))); $alttext = isset($alt[ 2 ]) ? trim($alt[ 2 ]) : ''; // + kh -> alt text if(substr($alt[0], 0, 1) == '.') { // .FORMAT $ext = trim($alt[0]); } else { $ext = '.jpg'; } $alt = isset($alt[1]) ? html_specialchars(trim($alt[1])) : ''; // WxHxCROPxQUALITY $width = isset($value[ 0 ]) ? intval($value[ 0 ]) : 0; $height = isset($value[ 1 ]) ? intval($value[ 1 ]) : 0; $crop = isset($value[ 2 ]) && intval($value[ 2 ]) === 1 ? 1 : 0; $quality = isset($value[ 3 ]) ? intval($value[ 3 ]) : 0; $image = ''.$alttext.''; } $content["all"] = preg_replace_callback('/\[imgx=(\d+)(.*?){0,1}\](.*?)\[\/imgx\]/i', 'parse_imagesx', $content["all"]); $content["all"] = preg_replace_callback('/\[imgx=(\d+)(.*?){0,1}\]/i', 'parse_imagesx', $content["all"]); } // end if ?>