5
I Use This!
Moderate Activity

News

Analyzed about 6 hours ago. based on code collected about 6 hours ago.
Posted almost 12 years ago
When working with customers, we often need out-of-the-box solutions, accelerating the processes and minimizing the number of operations. For this purpose, Cotonti Siena 0.9.15 provides an opportunity of using installation scripts. Their primary ... [More] function is building basic packages with preinstalled extension set, well-defined configuration, and targeted demo content. To work with installation scripts you will need to review modules/install/inc/install.install.php file. The file brief overview: there are 2 variables ($default_modules and $default_plugins) related to default modules and plugins set to install. $step variable is related to current installation step. At zero step, the system prompts to select the installation language, but if a file {file_name}.install.php, is located in the root directory, the system will prompt to select it when installing Cotonti during the next steps. The installation script file contains variables and hooks, executed after the end of each step (normal hooks are not available during the installation, as there is no database). Each step consists of three elements: form display (tags), data import, bug scanning (import) and installation itself (setup). 6 steps in total: 0. Select installation language and script. 1. Create cache directories and check the system compatibility. 2. Setup database connection. 3. Select the site’s language and theme, create an administrator account. 4. Install modules and plugins. 5. Complete the installation. Accordingly, all our functions will be named in the following way: cot_install_step([1-5])_(tags|import|setup)\(\) Let’s consider an example of blog.install.php installation script: // Modules and plugins checked by default $default_modules = array('index', 'page', 'users', 'rss'); // the list of installed modules has been overriden $default_plugins = array('ckeditor', 'cleaner', 'html', 'htmlpurifier', 'ipsearch', 'mcaptcha', 'news', 'search' ); // plugin list has been overriden $L['install_body_message1'] = "Welcome to the Blog scriptPlease, relax and sit back.".$L['install_body_message1']; // The standard greeting message has been changed function cot_install_step2_tags() { // the function replaces the default database prefix and sets another database name during the installation global $t, $db_name; $db_x = "cotblog_"; $t->assign(array( 'INSTALL_DB_X' => $db_x, 'INSTALL_DB_X_INPUT' => cot_inputbox('text', 'db_x', $db_x, 'size="32"'), 'INSTALL_DB_NAME_INPUT' => cot_inputbox('text', 'db_name', is_null($db_name) ? 'cotblog' : $db_name, 'size="32"'), )); } function cot_install_step3_tags() { // default theme has been replaced in the same way global $t, $rtheme, $rscheme; $rtheme = ‘symisun-03’; $t->assign(array( 'INSTALL_THEME_SELECT' => cot_selectbox_theme($rtheme, $rscheme, 'theme'), )); } function cot_install_step3_setup() { // upon the 3rd step completion, we should set an admin panel theme… global $file; $config_contents = file_get_contents($file['config']); cot_install_config_replace($config_contents, 'admintheme', 'priori'); file_put_contents($file['config'], $config_contents); } If you want to skip some step, you just do all the necessary things in our function and then call $step++. [Less]
Posted almost 12 years ago
SxGeoIP base Extension for Cotonti CMF. Integration of SxGeo IP base (geo names supplied in Russian) Description Integration of SxGeoIP database in Cotonti CMF. This DB contains Geo coordinates related to user IP-address. SxGeoIP created ... [More] , developed and maintained by http://sypexgeo.net/ and distributed under BSD licence. Features Fast query speed Country and city detection Good data cover for ex-USSR area All cities names in russian locale Disadvantages last update dated srping 2013 Demo page You can view demo page at http://sypexgeo.net/ site. Requirements Current version requires Cotonti Siena v0.9.x and newer. Comments Plugin works out from the box. For better results check config settings in admin panel. How extension works Extension use GeoIP data packed in SxGeoIP format files. Country and city info stored in separate files. More info about SxGeoIP format you can find on http://sypexgeo.net/. Install Unpack, copy files to root folder of your site. Install via Admin → Extensions menu (Administration panel → Extensions) Checks setting in config (Administration panel → Extensions → sxgeo → Configuration). Usage You can use this extension data in 2 ways: Through functions call for sx_getCity($ip) and sx_getCountry($ip). These functions return string with Country and City name respectively. You can ommit IP address. In this case you get info according to current user info. Examples: {PHP|sx_getCity('8.8.8.8')} {PHP.usr.ip|sx_getCountry($this)} Important notes! Country names are always geted in current Cotonti locale (user selected language), according to countries.*.lang.php file. City names are returned by plugin always in russian (as it sored in SxGeoIP DB). You can turn on Auto initialization mode, so you can use direct values for current user country and city info. Data format: /** * Contains data for country code and id from last sx_getCountry*() call. */ $sx_country = array( 'iso' => '', // ISO 3166-1 code in appear case 'name' => '', // Country name with Cotonti locale as defined in countries.*.lang.php file 'id' => 0 // Country ID used in SxGeoIP base ); /** * Contains info about city from last sx_getCity*() call. */ $sx_city = array( 'info' => array(), // basic info, see sx_getCity() function for details 'ext_info' => array() //extended info, see sx_getCityExt() function for details ); Use this calls in TPL: city - {PHP.sx_city.info.city} country - {PHP.sx_country.name} Licence Distributed under BSD license. Author Andrey Matsovkin - author of Cotonti extension. All other rights belongs to http://sypexgeo.net/ as DB creator. References Cotonti.com -- Home of Cotonti CMF sxgeo on GitHub -- Latest version of sxgeo on GitHub [Less]
Posted almost 12 years ago
Description If you have intrnet shop site with Cotonti then using this plugin you can implement all the known function, the switchover of display products, such as "tiles", "line by line", etc. Installation For install the plugin download him ... [More] and in the plugins directory extract cattemplateswitcher folder from the downloaded archive. Next, go to the admin panel of your site to install the plugin and then go to its configuration page. In the plugin settings to specify a comma-separated list of modes. Note: Do not delete mode "default" - without it will not be possible to reset the mode of the standard Next, insert tag {LIST_TPL_SWITCHER} in yours tpl files page.list and other Usage Examples config mode settings If inputted mode - default, table, line will mean that, for example, the user will be able to switch between templates page.list.tpl (default mode), page.list.table.tpl (table mode), page.list.line.tpl (linear mode)  or page.list.shop.tpl (default mode), page.list.table.shop.tpl (table mode), page.list.line.shop.tpl (linear mode) where the shop this is category code Tune mode switcher If you need you can tune mode switcher in /cattemplateswitcher/tpl/cattemplateswitcher.switcher.tpl Feedback Report errors or make suggestions to improve this plugin you can in a repo on GitHub [Less]
Posted almost 12 years ago
Installation Copy the markdown plugin into your Cotonti plugins folder. Install the plugin in Administration / Extensions. Credits PHP Markdown Extra Extended by egil
Posted almost 12 years ago
Features Split fullscreen editing. Live previewing. Easy theming. Installation Copy the epiceditor plugin into your Cotonti plugins folder. Install the plugin in Administration / Extensions. Requirements Markdown Parser for Cotonti Siena. Credits EpicEditor by OscarGodson
Posted almost 12 years ago
Features List posters (contributors) in forum topics List posters (contributors) for comments Limit the number of contributors to display or not. Installation Download, extract and place the contributors folder in your plugin directory. Install ... [More] and configure the plugin in Administration panel. Add the tags desired in comments.tpl or forums.posts.tpl You can either list the contributors by using a resource list or template tags and block. A resource list is just a list of contributors based on a resource, separated by a separator configured in the administration panel. Examples All of these examples can be used in comments.tpl and forums.posts.tpl. Display using template tags Example 1: Display users using avatars only ( requires userimages plugin )        There are currently no contributors. Example 2: Display users using a link      Contributors: {CONTRIBUTOR_LINK}   and {PHP.contributors_count_diff} others. There are currently no contributors. Display using resource list To override {PHP.contributor_list}, define $R['contributors_forums_list'] for forums posts and $R['contributors_comments_list'] for comments contributors in your theme's file. Available parameters: {$id}, {$name}, {$link}, {$gender}, {$country}, {$countryflag}, {$url}, {$avatar}, {$avatar_src} Example 1: Resource list display      Contributors: {PHP.contributors_list} and {PHP.contributors_count_diff} others. There are currently no contributors. Available Template Variables comments.tpl, forums.posts.tpl {PHP.contributors_count}: Total number of contributors for the current item {PHP.contributors_count_difference}: Number of contributors that became hidden due to limiting number of contributors set in the plugin's configurations. Available Tags comments.tpl, forums.posts.tpl In comments.tpl, the following must be inside COMMENTS block. For forums.posts.tpl, the following must be inside MAIN block. In block: CONTRIBUTOR_ROW {CONTRIBUTOR_ID} {CONTRIBUTOR_NAME} {CONTRIBUTOR_LINK} {CONTRIBUTOR_GENDER} {CONTRIBUTOR_COUNTRY} {CONTRIBUTOR_COUNTRYFLAG} {CONTRIBUTOR_URL} [Less]
Posted almost 12 years ago
Requirements Cotonti Siena 0.9.14 or higher. Installation Copy the plugin to your plugins folder. Install the plugin in the administration panel. Notes The calendar requires a few Bootstrap plugins to fully function. These plugins and their ... [More] stylesheets are included in the /lib/bootstrap/ folder. Cotonti's auth system is used to determine if a user has write permissions. Users with write permissions can create events. [Less]
Posted almost 12 years ago
  Page deletion button Extension for Cotonti CMF. Adds user friendly delete button to page edit form Description Adds user friendly delete button to page edit form. So you can (if you have admin rights) delete pages in one click. By default ... [More] changes standard radio button control for page delete. You can manually insert delete button in any place within edit form in page.edit.tpl template. Features Works out from the box One-click button to delete page Allow to restrict user to delete own pages Demo page No demo page. Just install and try to edit you page.  Requirements Current version works in Cotonti Siena v0.9.14 and tested with several theme. Compatibility Can work on older Siena versions but not tested. If you have own complicated theme try to changepage.edit.tpl and/or resource string $R['page_delete'] Comments Plugin works out from the box. How extension works Simply changes standard control with delete button or use {PAGEEDIT_FORM_DELETE} tag in page.edit.tpl. Install Unpack, copy files to root folder of your site. Install via Admin → Extensions menu (Administration panel → Extensions) Checks setting in config (Administration panel → Extensions → pagedelbtn → Configuration). Comments To see this Extension in action - open page edit form. Licence Distributed under BSD license. Author Andrey Matsovkin References Cotonti.com -- Home of Cotonti CMF pagedelbtn on GitHub -- latest version of pagedelbtn on GitHub [Less]
Posted almost 12 years ago
UI_datetime Plugin for Cotonti CMF. It replaces common date/time selection controls with unified pretty style jQueryUI controls. Description Current date/time selection controls are presented as several separated dropdown select box. Separate for ... [More] year, month, day for date and hour, minutes for time. The plugin hides this controls and bring to user unified one input field for date and one field for time respectively. In addition this fields supplied with easy-to-use dropdown UI controls to selec date/time in one-click. Features Unified input field for date selections Unified input field for time selections User friendly pop-up UI control attached for fast selection of date time I18n for date and time picker control (date format, month and day of weeks names) Using jQueryUI library jQueryUI ThemeRoller ready By default working in add/edit page, edit users, user profile, search options. Optional mode to track standard Cotonti date/time controls and replace with new one regardless opened page or extension Requirements Works with Cotonti Siena (0.9.x branch). Required jQuery to be updated to version 1.6 or higher Required jQueryUI (distributed with extension or your custom buld with at least datepicker and slider wigits) Demo page You can see demonstration how extension works here: Demo page on GitHub Version info Current version uses: jQueryUI (version 1.8.23 with Redmond theme). jquery.timepickr.js - extended version of original timepickr jQuery plugin (until 1.6.0 version of UI_datetime) jquery.timepicker.js - Timepicker jQuery plugin by Trent Richardson (from 1.6.0 version of UI_datetime) Comments Plugin must works out from the box. Tested on Nemesis, HTML Kickstart, SymiSun-03 theme and must work on most common themes or extension that uses standard date/time controls that relies oncot_selectbox_date function and $R['input_date*'] resource strings. But if your use highly customized theme or your custom resource strings ($R['input_date*']) than extension may work uncorrectly. How extension works Old style controls simply hides with inline styles but still work as input fields for transfer parameters to server (while you save the data). New fancy style UI controls use jQuery UI library and dynamically added in pages in specially marked DIV containers. Simply it maked by changing controls template in resource strings $R['input_date'] and$R['input_date_short']. The default ui_date/time template for 'short' date is: {$day} {$month} {$year} (See ui_datetime.global.php for details.) Most part of magic happened after page loads. JS script searches for elements with uidt_date anduidt_time class then parse it and linked with new controls added in block with class uidt_datetarget anduidt_timetarget class respectively. By default extension tracks controls only on these pages: add/edit page, edit users, user profile. You can switch on global mode in settings for trace all controls on all pages, but it's not recommened because will load extension files all the time. Install Unpack, copy files to root folder of your site. Install via Admin → Extensions menu (Administration panel → Extensions) If you already use jQueryUI in your project than setup path for jQueryUI library in ui_datetime settings . If you use custom downloaded bundle of jQueryUI - be sure this lib include datepicker and slider wigits required for date/time picker and its version higher than 1.8.0. !Note: If you upgrade extension from version prior to 1.6.0 make full uninstall previous version through admin panel and install new one. Do not update it with «update» button, or be sure to check actual path for new timepicker library. After that you can delete old js time picker library time_pickr (./js/time_pickr - old folder for deletion. ./js/time_picker is new one. Do not delete). Comments After install you can see and test extension on Admin → Tools page (Administration panel → Extensions → UI date/time picker → Administration). You can Enable/Disable date and time controls separately via settings. References Cotonti.com -- Home of Cotonti CMF Discussion -- Forum thread about extension (in russian) Discussion -- Forum thread about extension (in english)   [Less]
Posted almost 12 years ago
ExtDev_multiselect Plugin for Cotonti CMF. Designed as helper for Cotonti Extension (plugin) developers. Description Extends standard controls types for plugin configuration screen. There are no multiselect type control that can be used in ... [More] Cotonti plugin configuration parameters. This extension (ExtDev_multiselect) extends standard input fields with additional functionality to select multiple values at once. With this extension there are three new types of multiselect control. Features Extending plugin configuration UI controls Three new types of multiselect control May be used as «supplementary» plugin without modification of current plugin code May be used as code snippet in your own plugins Easy to implement your own controls I18n Demo page Just install and switch to plugin configuration page. Comments Plugin works out from the box. You can see new controls on plugin configuration page. How extension works Hooks only on Extension's own configuration page (switch to global mode for tracking all Extensions in system). And preprocess plugin parameters to create multiselect controls on Extension config page. There are added three new types of controls with multiple selection: simplelist - shows as usual text input field that allowed to select items and presents it as comma separated list. multiselect - shows as common selectbox element with multiple selection support checkboxlist - presented as list of checkboxes. To enable new stye controls you must add specially named parameter of type text to your plugin setup file - plugname.setup.php (see extdev_multiselect.setup.php for examples). Rules of naming config variable: `varname_type`, where `varname` - variable name allowed `type` - type of control: simplelist, multiselect, checkboxlist So to make a multiselect field you can write this code: VARNAME_multiselect=01:text:item1,item2,item3,item4,item5:item1,item3:«Multiselect» parameter By default extension tracks controls only on own config (testing) page. If you want to enable multiselect controls in you plugin - enables Global mode. Install Unpack, copy files to root folder of your site. Install via Admin → Extensions menu (Administration panel → Extensions) If you plan to use it as «supplementary» for your own plugins - select global mode in config (Administration panel → Extensions → ExtDev_multiselect → Configuration) and rename Config parameters in you plugin (see below). Comments To use this Extension as helper for your own plug you must add (or rename existing ones) parameters of type text. See rules for naming in How extension works section. Compatibility Tested with Cotonti Siena 0.9.5 ­- 0.9.11   References Cotonti.com -- Home of Cotonti CMF Actual code https://github.com/macik/cot-extdev_multiselect   [Less]