public function InitializeFrontend() { parent::SetParameters(); $this->RestrictUnknownParams(); // operational params (what to do, with what...) $this->SetParameterType('noautoscale', CLEAN_INT); $this->SetParameterType('nobcache', CLEAN_INT); $this->SetParameterType('noembed', CLEAN_INT); $this->SetParameterType('noauto', CLEAN_INT); $this->SetParameterType('norotate', CLEAN_INT); $this->SetParameterType('notag', CLEAN_INT); $this->SetParameterType('noresponsive', CLEAN_INT); $this->SetParameterType('noremote', CLEAN_INT); $this->SetParameterType('src', CLEAN_STRING); $this->SetParameterType('overwrite', CLEAN_INT); $this->SetParameterType('force_ext', CLEAN_INT); $this->SetParameterType('force_type', CLEAN_STRING); $this->SetParameterType('progressive', CLEAN_INT); $this->SetParameterType('autoscale_op', CLEAN_STRING); // params for the output tag (if outputting an img tag) $this->SetParameterType('id', CLEAN_STRING); $this->SetParameterType('class', CLEAN_STRING); $this->SetParameterType('style', CLEAN_STRING); $this->SetParameterType('title', CLEAN_STRING); $this->SetParameterType('alt', CLEAN_STRING); $this->SetParameterType('name', CLEAN_STRING); $this->SetParameterType('height', CLEAN_INT); $this->SetParameterType('width', CLEAN_INT); $this->SetParameterType('max_height', CLEAN_INT); $this->SetParameterType('max_width', CLEAN_INT); $this->SetParameterType('quality', CLEAN_INT); $this->SetParameterType('rel', CLEAN_STRING); $this->SetParameterType(CLEAN_REGEXP . '/src\\d*/', CLEAN_STRING); $this->SetParameterType(CLEAN_REGEXP . '/alias\\d*/', CLEAN_STRING); $this->SetParameterType(CLEAN_REGEXP . '/filter_\\w*/', CLEAN_STRING); $this->SetParameterType('silent', CLEAN_INT); // more smarty plugins $smarty = cmsms()->GetSmarty(); $smarty->register_block('cgsi_convert', array('cgsi_utils', 'cgsi_convert')); $smarty->register_block('cgsi_getimages', array('cgsi_extended', 'cgsi_getimages')); }
public function SetParameters() { parent::SetParameters(); $this->RegisterModulePlugin(); $this->RestrictUnknownParams(); $this->RegisterRoute('/[Uu]ploads\\/(?P<upload_id>[0-9]+)\\/(?P<junk>.*?)$/', array('showtemplate' => 'false', 'action' => 'getfile')); $this->RegisterRoute('/[Uu]ploads\\/limited\\/(?P<url_key>.*?)$/', array('showtemplate' => 'false', 'action' => 'getfile')); $this->RegisterRoute('/[Uu]ploads\\/file\\/(?P<returnid>[0-9]+)\\/(?P<upload_id>[0-9]+)\\/(?P<junk>.*?)$/', array('action' => 'detail')); $this->CreateParameter('key', 'value', $this->Lang('param_key')); $this->CreateParameter('noauthor', '1', $this->Lang('param_noauthor')); $this->CreateParameter('upload_id', 'id', $this->Lang('param_upload_id')); $this->CreateParameter('count', '', $this->Lang('param_count')); $this->CreateParameter('sortorder', 'date_asc', $this->Lang('param_sortorder')); $this->CreateParameter('file_extensions', 'ext1,ext2,ext3', $this->Lang('param_fileextensions')); $this->CreateParameter('category', 'upload_category', $this->Lang('param_category'), false); $this->CreateParameter('filter', '', $this->Lang('param_filter')); $this->CreateParameter('no_initial', '1', $this->Lang('param_no_initial')); $this->CreateParameter('mode', 'summary', $this->Lang('param_mode'), false); $this->CreateParameter('template', '', $this->Lang('param_template')); $this->CreateParameter('detailtemplate', '', $this->Lang('param_detailtemplate')); $this->CreateParameter('nocaptcha', '', $this->Lang('param_nocaptcha')); $this->CreateParameter('filetypes', '', $this->Lang('param_filetypes')); $this->CreateParameter('selectname', '', $this->Lang('param_selectname')); $this->CreateParameter('selectnone', '', $this->Lang('param_selectnone')); $this->CreateParameter('selectvalue', '', $this->Lang('param_selectvalue')); $this->CreateParameter('selectform', '', $this->Lang('param_selectform')); $this->CreateParameter('prefix', 0, $this->Lang('param_prefix')); $this->CreateParameter('prefix_feu', 0, $this->Lang('param_prefix_feu')); $this->CreateParameter('detailpage', '', $this->Lang('param_detailpage')); $this->CreateParameter('listingtemplate', '', $this->Lang('param_listingtemplate')); $this->CreateParameter('listingsortorder', '', $this->Lang('param_listingsortorder')); $this->CreateParameter('sendfilepage', '', $this->Lang('param_sendfilepage')); $this->CreateParameter('action', 'default', $this->Lang('param_action')); $this->CreateParameter('fieldname', '', $this->Lang('param_fieldname')); $this->CreateParameter('fieldval', '', $this->Lang('param_fieldval')); $this->CreateParameter('fieldname2', '', $this->Lang('param_fieldname')); $this->CreateParameter('fieldval2', '', $this->Lang('param_fieldval')); $this->SetParameterType('junk', CLEAN_STRING); $this->SetParameterType('key', CLEAN_STRING); $this->SetParameterType('noauthor', CLEAN_INT); $this->SetParameterType('upload_id', CLEAN_INT); $this->SetParameterType('count', CLEAN_INT); $this->SetParameterType('sortorder', CLEAN_STRING); $this->SetParameterType('file_extensions', CLEAN_STRING); $this->SetParameterType('category', CLEAN_STRING); $this->SetParameterType('filter', CLEAN_STRING); $this->SetParameterType('no_initial', CLEAN_INT); $this->SetParameterType('mode', CLEAN_STRING); $this->SetParameterType('template', CLEAN_STRING); $this->SetParameterType('detailtemplate', CLEAN_STRING); $this->SetParameterType('nocaptcha', CLEAN_INT); $this->SetParameterType('filetypes', CLEAN_STRING); $this->SetParameterType('selectname', CLEAN_STRING); $this->SetParameterType('selectnone', CLEAN_INT); $this->SetParameterType('selectvalue', CLEAN_STRING); $this->SetParameterType('selectform', CLEAN_STRING); $this->SetParametertype('prefix', CLEAN_INT); $this->SetParametertype('prefix_feu', CLEAN_INT); $this->SetParameterType('detailpage', CLEAN_STRING); $this->SetParameterType('sendfilepage', CLEAN_STRING); $this->SetParameterType('url_key', CLEAN_STRING); $this->SetParameterType('fieldname', CLEAN_STRING); $this->SetParameterType('fieldval', CLEAN_STRING); $this->SetParameterType('fieldname2', CLEAN_STRING); $this->SetParameterType('fieldval2', CLEAN_STRING); $this->SetParameterType('input_key', CLEAN_STRING); $this->SetParameterType('input_author', CLEAN_STRING); $this->SetParameterType('input_summary', CLEAN_STRING); $this->SetParameterType('input_description', CLEAN_STRING); $this->SetParameterType('input_destname', CLEAN_STRING); $this->SetParameterType('input_replace', CLEAN_INT); $this->SetParameterType('input_captcha', CLEAN_STRING); $this->SetParameterType('do_uploadfile', CLEAN_STRING); $this->SetParameterType('nooutput', CLEAN_INT); $this->SetParameterType('listingtemplate', CLEAN_STRING); $this->SetParameterType('listingsortorder', CLEAN_STRING); $this->SetParameterType('input_filter', CLEAN_STRING); $this->SetParameterType('hidden_params', CLEAN_STRING); $this->SetParameterType('input_submit', CLEAN_STRING); $this->SetParameterType('input_sendto', CLEAN_STRING); $this->SetParameterType('input_subject', CLEAN_STRING); $this->SetParameterType('input_notes', CLEAN_STRING); $this->SetParameterType('input_cancel', CLEAN_STRING); $this->SetParameterType('pagenum', CLEAN_INT); $this->SetParameterType(CLEAN_REGEXP . '/field_.*/', CLEAN_STRING); uploads_smarty::init(); // initialize smarty plugins }