<?php /** * mavatars for Cotonti CMF * * @version 1.00 * @author esclkm * @copyright (c) 2013 esclkm */ defined('COT_CODE') or die('Wrong URL'); $ext = cot_import('ext', 'G', 'TXT'); $cat = cot_import('cat', 'G', 'TXT'); $code = cot_import('code', 'G', 'TXT'); $id = cot_import('id', 'G', 'INT'); $width = cot_import('width', 'G', 'INT'); $height = cot_import('height', 'G', 'INT'); $resize = cot_import('resize', 'G', 'TXT'); $filter = cot_import('filter', 'G', 'TXT'); $quality = cot_import('quality', 'G', 'INT'); if (empty($quality)) { $quality = 85; } if (empty($resize)) { $resize = 'crop'; } $mavatar = new mavatar($ext, $cat, $code, $id); $mavatars_tags = $mavatar->tags(); $image = $mavatar->thumb($mavatars_tags[1], $width, $height, $resize, $filter, $quality); header('Content-Type: image/jpeg'); readfile($image); exit;
<?php /** * mavatars for Cotonti CMF * * @version 1.00 * @author esclkm * @copyright (c) 2013 esclkm */ defined('COT_CODE') or die('Wrong URL'); $ext = cot_import('ext', 'G', 'TXT'); $cat = cot_import('cat', 'G', 'TXT'); $code = cot_import('code', 'G', 'TXT'); $mavatar = new mavatar($ext, $cat, $code); $array = $mavatar->ajax_upload(); echo json_encode($array); // Define a destination
<?php /** * [BEGIN_COT_EXT] * Hooks=market.add.add.done,market.edit.update.done * [END_COT_EXT] */ /** * mavatarslance for Cotonti CMF * * @version 1.2.1 * @author CMSWorks Team * @copyright Copyright (c) CMSWorks.ru, littledev.ru */ defined('COT_CODE') or die('Wrong URL'); global $cfg; if (cot_plugin_active('mavatars') && $cfg['plugin']['mavatarslance']['market']) { require_once cot_incfile('mavatars', 'plug'); if (!cot_error_found()) { $mavatar = new mavatar('market', $ritem['item_cat'], $id); $mavatar->update(); $mavatar->upload(); } }
<?php /** * [BEGIN_COT_EXT] * Hooks=pagetags.main * [END_COT_EXT] */ /** * Pagemultiavatar for Cotonti CMF * * @version 1.00 * @author esclkm, graber * @copyright (c) 2011 esclkm, graber */ defined('COT_CODE') or die('Wrong URL'); require_once cot_incfile('mavatars', 'plug'); global $mavatar, $mav_rowset_list; $mavatar = new mavatar('page', $page_data['page_cat'], $page_data['page_id'], $mav_rowset_list); $mavatars_tags = $mavatar->tags(); $temp_array['MAVATAR'] = $mavatars_tags; $temp_array['MAVATARCOUNT'] = count($mavatars_tags);
<?php /** * [BEGIN_COT_EXT] * Hooks=projects.add.tags,projects.edit.tags * Tags=projects.add.tpl:{PRJADD_FORM_MAVATAR};projects.edit.tpl:{PRJEDIT_FORM_MAVATAR} * [END_COT_EXT] */ /** * mavatarslance for Cotonti CMF * * @version 1.2.1 * @author CMSWorks Team * @copyright Copyright (c) CMSWorks.ru, littledev.ru */ defined('COT_CODE') or die('Wrong URL'); global $cfg; if (cot_plugin_active('mavatars') && $cfg['plugin']['mavatarslance']['projects']) { require_once cot_incfile('mavatars', 'plug'); if ((int) $id > 0) { $code = $item['item_id']; $category = $item['item_cat']; $mavpr = 'EDIT'; } else { $code = ''; $category = $ritem['item_cat']; $mavpr = 'ADD'; } $mavatar = new mavatar('projects', $category, $code, 'edit'); $t->assign('PRJ' . $mavpr . '_FORM_MAVATAR', $mavatar->upload_form()); }
<?php /** * [BEGIN_COT_EXT] * Hooks=folio.edit.delete.done * [END_COT_EXT] */ /** * mavatarslance for Cotonti CMF * * @version 1.2.1 * @author CMSWorks Team * @copyright Copyright (c) CMSWorks.ru, littledev.ru */ defined('COT_CODE') or die('Wrong URL'); global $cfg; if (cot_plugin_active('mavatars') && $cfg['plugin']['mavatarslance']['folio']) { require_once cot_incfile('mavatars', 'plug'); $mavatar = new mavatar('folio', $ritem['item_cat'], $id); $mavatar->delete_all_mavatars(); $mavatar->get_mavatars(); }
<?php /** * [BEGIN_COT_EXT] * Hooks=projects.addofferform.tags * Tags=projects.offers.tpl:{OFFER_FORM_MAVATAR} * [END_COT_EXT] */ /** * mavatarslance for Cotonti CMF * * @version 1.2.1 * @author CMSWorks Team * @copyright Copyright (c) CMSWorks.ru, littledev.ru */ defined('COT_CODE') or die('Wrong URL'); global $cfg; if (cot_plugin_active('mavatars') && $cfg['plugin']['mavatarslance']['projects']) { require_once cot_incfile('mavatars', 'plug'); $mavatar = new mavatar('projectoffers', $id, ''); $t_o->assign('OFFER_FORM_MAVATAR', $mavatar->upload_form()); }
<?php /** * mavatars for Cotonti CMF * * @version 1.00 * @author esclkm * @copyright (c) 2013 esclkm */ defined('COT_CODE') or die('Wrong URL'); $ext = cot_import('ext', 'G', 'TXT'); $cat = cot_import('cat', 'G', 'TXT'); $code = cot_import('code', 'G', 'TXT'); $id = cot_import('id', 'G', 'TXT'); $mavatar = new mavatar($ext, $cat, $code); $array = $mavatar->delete_mavatar_byid($id); echo json_encode($array); // Define a destination