Example #1
0
<?php

defined('COT_CODE') or die('Wrong URL');
global $db_users;
require_once cot_langfile('karma', 'plug');
cot_extrafield_add($db_users, 'karma', 'input', $R['input_text'], '', '0', 0, 'HTML', $L['f_karma'], '', '1', false, 'float NOT NULL');
cot_extrafield_add($db_users, 'karma_auth', 'input', $R['input_text'], '', 'NULL', 0, 'HTML', 'karma auth', '', '1', false, 'varchar(255)  NULL');
Example #2
0
<?php

/**
 * golink plugin
 *
 * @author Roffun
 * @copyright Copyright (c) 2015 - today: Roffun | https://webcot.net/cotonti/extensions/golink-plugin
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
global $db_pages;
require_once cot_incfile('page', 'module');
require_once cot_incfile('extrafields');
cot_extrafield_add($db_pages, 'OPENLINKSONPAGE', 'select', $R['input_selectbox'], 'modal_timer,modal,redirect,nofollow,open', 'redirect', '', '', '', '');
Example #3
0
     $field['field_html'] = cot_import('field_html', 'P', 'NOC');
     $field['field_variants'] = cot_import('field_variants', 'P', 'HTM');
     $field['field_params'] = cot_import('field_params', 'P', 'HTM');
     $field['field_description'] = cot_import('field_description', 'P', 'NOC');
     $field['field_default'] = cot_import('field_default', 'P', 'HTM');
     $field['field_required'] = cot_import('field_required', 'P', 'BOL');
     $field['field_parse'] = cot_import('field_parse', 'P', 'ALP');
     $field['field_noalter'] = cot_import('field_noalter', 'P', 'BOL');
     $field['field_enabled'] = 1;
     /* === Hook === */
     foreach (cot_getextplugins('admin.extrafields.add') as $pl) {
         include $pl;
     }
     /* ===== */
     if (!empty($field['field_name']) && !empty($field['field_type'])) {
         if (cot_extrafield_add($n, $field['field_name'], $field['field_type'], $field['field_html'], $field['field_variants'], $field['field_default'], $field['field_required'], $field['field_parse'], $field['field_description'], $field['field_params'], $field['field_enabled'], $field['field_noalter'])) {
             cot_message('adm_extrafield_added');
         } else {
             cot_error('adm_extrafield_not_added');
         }
     }
     //cot_redirect(cot_url('admin', "m=extrafields&n=$n&d=$durl", '', true));
 } elseif ($a == 'upd' && !empty($_POST)) {
     $field_name = cot_import('field_name', 'P', 'ARR');
     $field_type = cot_import('field_type', 'P', 'ARR');
     $field_html = cot_import('field_html', 'P', 'ARR');
     $field_variants = cot_import('field_variants', 'P', 'ARR');
     $field_params = cot_import('field_params', 'P', 'ARR');
     $field_description = cot_import('field_description', 'P', 'ARR');
     $field_default = cot_import('field_default', 'P', 'ARR');
     $field_required = cot_import('field_required', 'P', 'ARR');
<?php

/**
 * marketorders plugin
 *
 * @package marketorders
 * @version 1.0.4
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('market', 'module');
require_once cot_incfile('marketorders', 'plug');
global $db_market, $cfg;
cot_extrafield_add($db_market, 'file', 'file', $R['input_file'], 'zip,rar', '', '', '', '', 'datas/marketfiles');
if (!file_exists('datas/marketfiles')) {
    mkdir('datas/marketfiles');
}
<?php

/**
 * Installation handler
 *
 * @package paypro
 * @version 1.0.2
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
global $db_users, $db_projects;
require_once cot_incfile('projects', 'module');
require_once cot_incfile('extrafields');
// Add field if missing
if (!$db->fieldExists($db_users, "user_pro")) {
    $dbres = $db->query("ALTER TABLE `{$db_users}` ADD COLUMN `user_pro` int(10) NOT NULL");
}
cot_extrafield_add($db_projects, 'forpro', 'checkbox', $R['input_checkbox'], '', '', '', '', '', '');
<?php

/**
 * confirmtheright plugin
 *
 * @author Roffun
 * @copyright Copyright (c) 2015 - today: Roffun | https://webcot.net/cotonti/extensions/confirmtheright-plugin
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('users', 'module');
require_once cot_incfile('confirmtheright', 'plug');
global $db_users, $cfg;
cot_extrafield_add($db_users, 'CONFIRMTHERIGHT1', 'file', $R['input_file'], 'txt,html', '', '', '', $L['fileconfirmtheright_title'], './');
cot_extrafield_add($db_users, 'CONFIRMTHERIGHT2', 'file', $R['input_file'], 'txt,html', '', '', '', $L['fileconfirmtheright_title'], './');