fields['name'] * @Description: Pull up the names of the categories the company is in. * */ function GetCategoriesNamesForCompany($id){ $entryarray = array(); global $gCms; $db =& $gCms->GetDB(); $query = 'SELECT * FROM '.cms_db_prefix().'module_compdir_company_categories AS c ' .'LEFT JOIN '.cms_db_prefix().'module_compdir_categories AS a ' .'ON c.category_id = a.id WHERE c.company_id = ?'; $result = $db->Execute($query, array($id)); while ($result && !$result->EOF){ $entryarray[]=$result->fields['name']; $result->MoveNext(); } return $entryarray; } } function smarty_cms_function_modslack($params, &$smarty) { global $gCms; $config =& $gCms->GetConfig(); //get and set the parameters $param1 = isset($params['param1']) ? $params['param1']:''; $assign = isset($params['assign']) ? $params['assign']:''; $ModSlackOBJ = new modslack(); //$ModSlackOBJ->findResourceDetails($ModSlackOBJ->resResizedImage); $OutCome = $ModSlackOBJ->GetCategoriesNamesForCompany($param1); if($assign!=''){ $smarty->assign($assign,$OutCome); } } function smarty_cms_help_function_modslack() { ?>
* —- Ever just had a need for a off function that you wished
* was in the module, but the creator didn't want to do it, or commit it,
* Well here we go a list of off functions for different modules. Please feel free to
* Let me know if you find more.
path - Image full pathname eg: uploads/images/test.jpg or $entry->logo_path in Company Directory etc...rootUrl (optional) - supersizer creates a temp director in the upload folder. If you move the path to the uplaod to a subdomain you may guide the output with this.$config['uploads_path'] = '/var/www/vhosts/domain.org/httpdocs/uploads'; $config['uploads_path'] = '/var/www/vhosts/domain.org/subdomains/media/httpdocs/uploads';Protect (optional) - Don't resize if smaller.. ie: don't size up if true ( true/false )Quality (optional) - Resize image at set Quality default is 85 (NOTE: 1-100 ).class (optional) - Add a classalt (optional) - Add an altid (optional) - Add an idtitle (optional) - Add a titlestripTag (optional) - stripTag take a full img tag passed in by the param path="" and makes it usable for SuperSizer ( true/false )URL (optional) - just sizes and outputs the url. you could use this in and XML output, lets say to make a map icon for CGGoogleMaps thru a CGFeedmaker output of a kml/xmlnoOutPut (optional) - just sizes the image. This is good for galleriesPrefix (optional) - Add a Prefix to the temp file nameSuffix (optional) - Add a Suffix to the temp file nameSubdir (optional) - Create Subfolders -- Organize your photos from within the SuperSizerTmp folder ( Subdir=$oneuser.id or Subdir="foo/bar")percentage (optional) - Resize image in percent of original eg. 50%.width (optional) - Resize image on width and height will resize accordingly to keep aspect ratioheight (optional) - Resize image on height and width will resize accordingly to keep aspect ratio Assign (optional) - Assign the output (return the smarty assignment) Use in conjunction with out without URLdebugIT (optional) - Get an array of the pre and post images... the original and the resized height and width (optional)
Important:You may use width in conjunction with height in order to resize image to an absolute size of your control. Aspect ratio is then, dependent on the values you use. If no parameters for resizing are passed (except for the path) then a resizing with a percentage value of 25% is performed by default
Author: jeremyBass <jeremybass@cableone.net>
Website: CorbensProducts.com
Support more mods like this:
Author: jeremyBass <jeremybass@cableone.net>
Version: 1.0, 10.10.2009