- Cambios

- Tarea #689 -> Preparar la parte de administración

git-svn-id: https://192.168.0.254/svn/Proyectos.OriginalHouse_Web/trunk@39 54e8636e-a86c-764f-903d-b964358a1ae2
This commit is contained in:
David Arranz 2011-07-14 18:49:53 +00:00
parent 99104a00ce
commit 7a2231f9f6
69 changed files with 14767 additions and 209 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,41 @@
/**
* Settings for admin dashboard.
* Based on the styles for Maintenance Mode plugin by Michael Wöhrer
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage CapsMan
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* =========================================================== SETTINGS */
#icon-capsman-admin {
background: transparent url('images/cman32.png') no-repeat;
}
/* ====================================================== SIDEBAR ICONS */
td.sidebar a.capsman {
background-image: url('images/capsman.png');
}
/* EOF */

View File

@ -0,0 +1,72 @@
<?php
/*
Plugin Name: Capability Manager
Plugin URI: http://alkivia.org/wordpress/capsman
Description: Manage user capabilities and roles.
Version: 1.3.2
Author: Jordi Canals
Author URI: http://alkivia.org
*/
/**
* Capability Manager. Main Plugin File.
* Plugin to create and manage Roles and Capabilities.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage CapsMan
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
define ( 'AK_CMAN_PATH', dirname(__FILE__) );
define ( 'AK_CMAN_LIB', AK_CMAN_PATH . '/includes' );
/**
* Sets an admin warning regarding required PHP version.
*
* @hook action 'admin_notices'
* @return void
*/
function _cman_php_warning() {
$data = get_plugin_data(__FILE__);
load_plugin_textdomain('capsman', false, basename(dirname(__FILE__)) .'/lang');
echo '<div class="error"><p><strong>' . __('Warning:', 'capsman') . '</strong> '
. sprintf(__('The active plugin %s is not compatible with your PHP version.', 'capsman') .'</p><p>',
'&laquo;' . $data['Name'] . ' ' . $data['Version'] . '&raquo;')
. sprintf(__('%s is required for this plugin.', 'capsman'), 'PHP-5 ')
. '</p></div>';
}
// ============================================ START PROCEDURE ==========
// Check required PHP version.
if ( version_compare(PHP_VERSION, '5.0.0', '<') ) {
// Send an armin warning
add_action('admin_notices', '_cman_php_warning');
} else {
// Run the plugin
include_once ( AK_CMAN_PATH . '/framework/loader.php' );
include ( AK_CMAN_LIB . '/manager.php' );
ak_create_object('capsman', new CapabilityManager(__FILE__, 'capsman'));
}

View File

@ -0,0 +1,4 @@
# Prevent running or accessing any file directly.
Order Deny,Allow
Deny from all

View File

@ -0,0 +1,182 @@
<?php
/**
* Class Component.
* Manages the main functionality for all components.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once ( AK_CLASSES . '/abstract/module.php' );
/**
* Abtract class to be used as a component template.
* There are some special functions thay can declared in implementations to perform main actions:
* - componentActivate: (Protected) Actions to run when activating the component.
* - componentDeactivate: (Hook, must be public) Actions to run when deactivating the component.
* - componentUpdate: (Protected) Actions to update the component to a new version. (Updating version on DB is done after this).
* - componentsLoaded: (Protected) Actions to run when components initialization is performed (In plugins loaded).
* - registerWidgets: (Protected) Actions to init plugin widgets (In widgets_init).
*
* @since 0.7
* @author Jordi Canals
* @package AOC
* @subpackage Library
* @link http://alkivia.org
*/
abstract class akComponentAbstract extends akModuleAbstract
{
/**
* Parent plugin slug.
* This is used on menus and form actions.
*
* @var string
*/
protected $slug;
/**
* Class constructor.
* Calls the implementated method 'startUp' if it exists. This is done at plugins loading time.
* Prepares admin menus by seting an action for the implemented method '_adminMenus' if it exists.
*
* @param string $file The main file to run the component.
* @return aocComponent The component object.
*/
final function __construct ( $file )
{
parent::__construct('component', '', $file);
$this->slug = ak_get_object($this->PID)->getSlug();
// Activating and deactivating hooks.
add_action('ak_activate_' . $this->ID, array($this, 'activate'));
add_action('ak_deactivate_' . $this->ID, array($this, 'componentDeactivate'));
add_action('ak_' . $this->PID . '_components_init', array($this, 'init'));
add_action('ak_' . $this->PID . '_widgets_init', array($this, 'widgetsInit'));
}
/**
* Fires on plugin activation.
* @return void
*/
protected function componentActivate () {}
/**
* Fires on plugin deactivation.
* @return void
*/
public function componentDeactivate () {}
/**
* Updates the plugin to a new version.
* @param string $version Old component version.
* @return void
*/
protected function componentUpdate ( $version ) {}
/**
* Fires when plugins have been loaded.
* @return void
*/
protected function componentsLoaded () {}
/**
* Fires on Widgets init.
* @return void
*/
protected function registerWidgets () {}
/**
* Activates the Component.
* Sets the plugin version in the component settings to be saved to DB.
*
* @hook action aoc_activate_$component
* @access private
* @return void
*/
final function activate()
{
$this->componentActivate();
add_option($this->ID . '_version', $this->version);
}
/**
* Inits the component.
* Here whe call the 'update' and 'init' functions. This is done after the components are loaded.
* Also the component version is updated here.
*
* @hook action aoc_components_init
* @access private
* @return void
*/
final function init ()
{
if ( $this->needs_update ) {
$this->componentUpdate( $this->getOption('version') );
update_option($this->ID . '_version', $this->version);
}
// Call the custom init for the component.
$this->componentsLoaded();
}
/**
* Inits the widgets (In action 'widgets_init')
* Before loading the widgets, we check that standard sidebar is present.
*
* @hook action 'widgets_init'
* @return void
*/
final function widgetsInit()
{
if ( class_exists('WP_Widget') && function_exists('register_widget') && function_exists('unregister_widget') ) {
$this->registerWidgets();
} else {
add_action('admin_notices', array($this, 'noSidebarWarning'));
}
}
/**
* Loads component data.
* As it is a child component, data is loaded into akModuleAbstract::child_data
*
* @return void
*/
final protected function loadData()
{
if ( empty( $this->child_data) ) {
$component_data = ak_component_data($this->mod_file, true);
$readme_data = ak_module_readme_data($this->mod_file);
$this->child_data = array_merge($readme_data, $component_data);
$this->PID = $this->child_data['Parent'];
$this->mod_data = ak_get_object($this->PID)->getModData();
if ( empty( $this->child_data['Version']) ) {
$this->version = $this->mod_data['Version'];
} else {
$this->version = $this->child_data['Version'];
}
}
}
}

View File

@ -0,0 +1,718 @@
<?php
/**
* Class for Modules management.
* Modules are Plugins, Themes and plugin components.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Abtract class to be used as a theme template.
* Must be implemented before using this class.
* There are some special functions that have to be declared in implementations to perform main actions:
* - moduleLoad (Protected) Additional actions to be run at module load time.
* - defaultOptions (Protected) Returns the module default options.
* - widgetsInit (Public) Runs at 'widgets_init' action.
* - wpInit (Public) Runs at 'init' action.
* - adminMenus (Public) Runs at 'admin_menus' option, used to set admin menus and page options.
*
* @author Jordi Canals
* @package Alkivia
* @subpackage Framework
* @link http://wiki.alkivia.org/framework/classes/module
*
* @uses akSettings
*/
abstract class akModuleAbstract
{
/**
* Module ID. Is the module internal short name.
* Filled in constructor (as a constructor param). Used for translations textdomain.
*
* @var string
*/
public $ID;
/**
* Component parent ID.
* Used only for components.
*
* @var string
*/
public $PID = '';
/**
* Module version number.
*
* @since 0.8
*
* @var string
*/
public $version;
/**
* Module Type using a class constant: self::PLUGIN, self::COMPONENT, seelf::THEME, self::CHILD_THEME
* By default is set to 0 (unknown).
*
* @var int
*/
protected $mod_type = 0;
/**
* Full path to module main file.
* Main file is 'style.css' for themes and the php file with data header for plugins and components.
*
* @var string
*/
protected $mod_file;
/**
* URL to the module folder.
*
* @var string
*/
protected $mod_url;
/**
* Module data. Readed from the main plugin file header and the readme file.
* Filled in loadModuleData(). Called in constructor.
* From the filename:
* - 'ID' - Module internal short name. Taken from main module's file name.
* From themes style.css file header:
* - 'Name' - Name of the theme.
* - 'Title' - Long title for the theme. As WP 2.8 is the same as 'Name'.
* - 'URI' - Theme's page URI.
* - 'Description' - Description of theme's features.
* - 'Author' - Author name and link (to author home).
* - 'Version' - Theme Version number.
* - 'Template' - The parent theme (If this is a child theme).
* - 'Tags' - An array of theme tags features.
* From plugins file header:
* - 'Name' - Name of the plugin, must be unique.
* - 'Title' - Title of the plugin and the link to the plugin's web site.
* - 'Description' - Description of what the plugin does and/or notes from the author.
* - 'Author' - The author's name
* - 'AuthorURI' - The author's web site address.
* - 'Version' - The plugin's version number.
* - 'PluginURI' - Plugin's web site address.
* - 'TextDomain' - Plugin's text domain for localization.
* - 'DomainPath' - Plugin's relative directory path to .mo files.
* From readme.txt file :
* - 'Contributors' - An array with all contributors nicknames.
* - 'Tags' - An array with all plugin tags.
* - 'DonateURI' - The donations page address.
* - 'Requires' - Minimum required WordPress version.
* - 'Tested' - Higher WordPress version this plugin has been tested.
* - 'Stable' - Last stable tag when this was released.
*
* @var array
*/
protected $mod_data;
/**
* Same as $mod_data but for child themes and components.
*
* From the Component file:
* - 'File' - FileName of the component (relative to plugin's folder).
* From componets file header:
* - 'File' - The component filename, relative to the plugin folder.
* - 'Component' - The component short name or ID.
* - 'Name' - Descriptive name for the component.
* - 'Description' - A descriptive text about the component.
* - 'Author' - Component author name
* - 'URL' - Author homepage URL.
* - 'Link' - Author anchor to home page.
* - 'Core' - If this is a core compoment or not.
* - 'Version' - Component version number.
* From readme.txt file:
* - Same as seen on akModuleAbstract::mod_data.
* From child themes file header:
* - Same as seen on akModuleAbstract::mod_data for themes.
*
* @var array
*/
protected $child_data = array();
/**
* Theme saved data.
* - 'post' - Saves the current post.
* - 'more' - Saves the read more status.
*
* @var array
*/
protected $saved;
/**
* Holds a reference to the global 'settings' object.
* This object has been created on the framework loader.
*
* @var akSettings
*/
protected $cfg;
/**
* Flag to see if we are installing (activating for first time) or reactivating the module.
*
* @var boolean
*/
protected $installing = false;
/**
* Flag to see if module needs to be updated.
*
* @var boolean
*/
protected $needs_update = false;
/** Constant used to define module as plugin. */
const PLUGIN = 10;
/** Constant used to define module as component. */
const COMPONENT = 15;
/** Constant used to define module as theme. */
const THEME = 20;
/** Constant used to define module as child theme. */
const CHILD_THEME = 25;
/**
* Class constructor.
* Calls the implementated method 'startUp' if it exists. This is done at theme's loading time.
* Prepares admin menus by setting an action for the implemented method '_adminMenus' if it exists.
*
* @param string $type Module type. Must be one of 'plugin', 'component', 'theme'. (child themes are detected).
* @param string $ID Theme internal short name (known as theme ID).
* @param string $file Module file. Only for plugins and components. (For themes style.css is always used).
* @return akTheme
*/
public function __construct ( $type = '', $ID = '', $file = '' )
{
$this->cfg =& ak_settings_object();
switch ( strtolower($type) ) {
case 'plugin' :
$this->mod_type = self::PLUGIN;
$this->mod_file = trim($file);
break;
case 'component' :
$this->mod_type = self::COMPONENT;
$this->mod_file = trim($file);
break;
case 'theme' :
$this->mod_type = self::THEME;
$this->mod_file = STYLESHEETPATH . '/style.css';
break;
default:
$this->mod_type = 0; // Unknown.
}
$this->loadModuleData($ID);
if ( $this->isCompatible() ) {
add_action('init', array($this, 'systemInit'));
add_action('plugins_loaded', array($this, 'pluginsInit'));
add_action('widgets_init', array($this, 'widgetsInit'));
if ( ! apply_filters('ak_' . $this->ID . '_disable_admin', $this->getOption('disable-admin-page')) ) {
add_action('admin_menu', array($this, 'adminMenus'));
}
// Load styles
if ( is_admin() ) {
add_action('admin_print_styles', array($this, 'adminStyles'));
} else {
add_action('wp_print_styles', array($this, 'enqueueStyles'));
}
$this->moduleLoad();
}
}
/**
* Executes as soon as module class is loaded.
*
* @return void
*/
protected function moduleLoad() {}
/**
* Prepares and returns default module options.
*
* @return array Options array
*/
protected function defaultOptions()
{
return array();
}
/**
* Fires at 'widgets_init' action hook
*.
* @return void
*/
public function widgetsInit () {}
/**
* Fires at 'init' action hook.
*
* @return void
*/
protected function wpInit () {}
/**
* Fires at 'admin_menus' action hook.
*
* @return void
*/
public function adminMenus () {}
/**
* Dummy method provided to check additional WP compatibility on inplementations.
* This is mostly used on plugins to check for WordPress required version.
*
* @return boolean
*/
public function isCompatible ()
{
return true;
}
/**
* Loads module data.
* Loads different data for Plugin, Theme or Component.
*
* @return void
*/
abstract protected function loadData ();
/**
* Functions to execute at system Init.
*
* @hook action 'init'
* @access private
*
* @return void
*/
final function systemInit ()
{
switch ( $this->mod_type ) {
case self::CHILD_THEME :
load_theme_textdomain('akchild', STYLESHEETPATH . '/lang');
case self::THEME :
load_theme_textdomain('aktheme', TEMPLATEPATH . '/lang');
break;
}
$this->wpInit();
}
/**
* Functions to execute after loading plugins.
*
* @return void
*/
final function pluginsInit ()
{
switch ( $this->mod_type ) {
case self::PLUGIN :
load_plugin_textdomain($this->ID, false, basename(dirname($this->mod_file)) . '/lang');
break;
case self::COMPONENT :
// TODO: Manage components translations.
break;
}
}
/**
* Enqueues additional administration styles.
* Send the framework admin.css file and additionally any other admin.css file
* found on the module direcotry.
*
* @hook action 'admin_print_styles'
* @uses apply_filters() Calls the 'ak_framework_style_admin' filter on the framework style url.
* @uses apply_filters() Calls the 'ak_<Mod_ID>_style_admin' filter on the style url.
* @access private
*
* @return void
*/
final function adminStyles()
{
// FRAMEWORK admin styles.
$url = apply_filters('ak_framework_style_admin', AK_STYLES_URL . '/admin.css');
if ( ! empty($url) ) {
wp_register_style('ak_framework_admin', $url, false, get_option('ak_framework_version'));
wp_enqueue_style('ak_framework_admin');
}
// MODULE admin styles.
if ( $this->isChildTheme() && file_exists(STYLESHEETPATH . '/admin.css') ) {
$url = get_stylesheet_directory_uri() . '/admin.css';
} elseif ( $this->isTheme() && file_exists(TEMPLATEPATH . '/admin.css') ) {
$url = get_template_directory_uri() . '/admin.css';
} elseif ( file_exists(dirname($this->mod_file) . '/admin.css') ) {
$url = $this->mod_url . '/admin.css';
} else {
$url = '';
}
$url = apply_filters('ak_' . $this->ID . '_style_admin', $url);
if ( ! empty($url) ) {
wp_register_style('ak_' . $this->ID . '_admin', $url, array('ak_framework_admin'), $this->version);
wp_enqueue_style('ak_' . $this->ID . '_admin');
}
}
/**
* Enqueues additional styles for plugins and components.
* For themes no styles are enqueued as them are already sent by WP.
*
* @hook action 'wp_print_styles'
* @uses apply_filters() Calls the 'ak_<Mod_ID>_style_url' filter on the style url.
* @access private
*
* @return void
*/
final function enqueueStyles()
{
if ( $this->isTheme() || $this->getOption('disable-module-styles') ) {
return;
}
$url = $this->getOption('style-url', false);
if ( false === $url ) {
if ( file_exists(dirname($this->mod_file) . '/style.css') ) {
$url = $this->mod_url . '/style.css';
} else {
$url = '';
}
}
$url = apply_filters('ak_' . $this->ID . '_style_url', $url);
if ( ! empty($url) ) {
wp_register_style('ak_' . $this->ID, $url, false, $this->version);
wp_enqueue_style('ak_' . $this->ID);
}
}
/**
* Checks if current module is a Plugin.
* @return boolean
*/
final public function isPlugin()
{
return ( self::PLUGIN == $this->mod_type ) ? true : false;
}
/**
* Checks if current module is a Component.
* @return boolean
*/
final public function isComponent()
{
return ( self::COMPONENT == $this->mod_type ) ? true : false;
}
/**
* Checks if current module is a Theme (or child)
* @return boolean
*/
final public function isTheme()
{
return ( self::THEME == $this->mod_type || self::CHILD_THEME == $this->mod_type ) ? true : false;
}
/**
* Checks if current module is a child theme.
* @return boolean
*/
final public function isChildTheme()
{
return ( self::CHILD_THEME == $this->mod_type ) ? true : false;
}
/**
* Returns a module option.
* If no specific option is requested, returns all options.
* If requested a non existent settings, returns $default.
*
* @param $name Name for the option to return.
* @param $default Default value to use if the option does not exists.
* @return mixed The option's value or an array with all options.
*/
final public function getOption ( $name = '', $default = false )
{
return $this->cfg->getSetting($this->ID, $name, $default);
}
/**
* Updates a module option.
*
* @param string $name Option Name
* @param mixed $value Option value
* @return void
*/
final public function updateOption ( $name, $value )
{
$this->cfg->updateOption($this->ID, $name, $value );
}
/**
* Deletes a module option.
*
* @param string $name Option Name
* @return void
*/
final public function deleteOption( $name )
{
$this->cfg->deleteOption($this->ID, $name);
}
/**
* Merges new options into module settings.
* Replaces exsisting ones and adds new ones.
*
* @since 0.7
*
* @param array $options New options to merge into settings.
* @return void
*/
final protected function mergeOptions ( $options )
{
$current = $this->cfg->getSetting($this->ID);
$new_opt = array_merge($current, $options);
$this->cfg->replaceOptions($this->ID, $new_opt);
}
/**
* Replaces ALL module options by new ones.
*
* @param array $options Array with all options pairs (name=>value)
* @return void
*/
final public function setNewOptions ( $options )
{
$this->cfg->replaceOptions($this->ID, $options);
}
/**
* Returns current module default options.
*
* @since 0.7
*
* @return array Default module options.
*/
final protected function getDefaults ()
{
$this->cfg->getDefaults($this->ID);
}
/**
* Replaces current module defaults by new ones.
*
* @since 0.7
*
* @param array $options New default options-
* @return void
*/
final protected function setDefaults ( $options )
{
$this->cfg->setDefaults($this->ID, $options);
}
/**
* Merges new options into module defaults.
* Replaces exsisting ones and adds new ones.
*
* @since 0.7
*
* @param array $options New options to merge into defaults.
* @return void
*/
final protected function mergeDefaults ( $options )
{
$defaults = $this->cfg->getDefaults($this->ID);
$new_def = array_merge($defaults, $options);
$this->cfg->setDefaults($this->ID, $new_def);
}
/**
* Returns module data.
* This data is loaded from the main module file.
*
* @see akModuleAbstract::$mod_data
* @return mixed The parameter requested or an array wil all data.
*/
final public function getModData ( $name = '' )
{
if ( empty($name) ) {
return $this->mod_data;
} elseif ( isset( $this->mod_data[$name]) ) {
return $this->mod_data[$name];
} else {
return false;
}
}
/**
* Returns child module data.
* This data is loaded from the child module file.
*
* @see akModuleAbstract::$child_data
* @return mixed The parameter requested or an array wil all data.
*/
final public function getChildData ( $name = '' )
{
if ( empty($name) ) {
return $this->child_data;
} elseif ( isset( $this->child_data[$name]) ) {
return $this->child_data[$name];
} else {
return false;
}
}
/**
* Checks if an option can be maneged on settings page.
* Looks at the alkivia.ini file and if set there, the option will be disabled.
*
* @param string|array $options Options names.
* @param boolean $show_notice Show a notice if disabled.
* @return boolean If administration is allowed or not.
*/
final public function allowAdmin( $options, $show_notice = true )
{
foreach ( (array) $options as $option ) {
if ( ! $this->cfg->isForced($this->ID, $option) ) {
return true;
}
}
if ( $show_notice ) {
echo '<em>' . __('Option blocked by administrator.', 'akfw') . '</em>';
}
return false;
}
/**
* Loads module data and settings.
* Data is loaded from the module file headers. Settings from Database and alkivia.ini.
*
* @return void
*/
final private function loadModuleData ( $id )
{
$this->loadData();
switch ( $this->mod_type ) {
case self::PLUGIN :
$this->mod_url = WP_PLUGIN_URL . '/' . basename(dirname($this->mod_file));
$this->ID = ( empty($id) ) ? strtolower(basename($this->mod_file, '.php')) : trim($id) ;
break;
case self::THEME :
case self::CHILD_THEME :
$this->mod_url = get_stylesheet_directory_uri();
$this->ID = ( empty($id) ) ? strtolower(basename(TEMPLATEPATH)) : trim($id) ;
break;
case self::COMPONENT :
$this->mod_url = ak_get_object($this->PID)->getUrl() . 'components/' . basename(dirname($this->mod_file));
$this->ID = $this->PID . '_' . $this->child_data['Component'];
break;
}
$this->cfg->setDefaults($this->ID, $this->defaultOptions());
$old_version = get_option($this->ID . '_version');
if ( false === $old_version ) {
$this->installing = true;
} elseif ( version_compare($old_version, $this->version, 'ne') ) {
$this->needs_update = true;
}
}
/**
* Saves the current post state.
* Used if we are looping a new query to reset previous state.
*
* @return void
*/
final public function savePost()
{
global $post, $more;
$this->saved['post'] = $post;
$this->saved['more'] = $more;
}
/**
* Restores the current post state.
* Saved in savePost()
*
* @return void
*/
final public function restorePost()
{
global $post, $more;
$more = $this->saved['more'];
$post = $this->saved['post'];
if ( $post ) {
setup_postdata($post);
}
}
/**
* Returns the URL to the module folder.
*
* @return string Absolute URL to the module folder.
*/
final public function getURL()
{
return trailingslashit($this->mod_url);
}
/**
* Returns the absolute path to module direcotory.
*
* @since 0.7
*
* @return string Full absolute path to module directory.
*/
final public function getPath()
{
return trailingslashit(dirname($this->mod_file));
}
/**
* Returns the basename for the plugin folder.
*
* @since 0.7
*
* @return string Plugin folder name (Relative to wp-content/plugins or wp-content/themes.
*/
final public function getSlug()
{
$folder = basename(dirname($this->mod_file));
return $folder;
}
}

View File

@ -0,0 +1,473 @@
<?php
/**
* Plugins related functions and classes.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once ( AK_CLASSES . '/abstract/module.php' );
/**
* Abtract class to be used as a plugin template.
* Must be implemented before using this class and it's recommended to prefix the class to prevent collissions.
* There are some special functions that have to be declared in implementations to perform main actions:
* - pluginActivate (Protected) Actions to run when activating the plugin.
* - pluginDeactivate (Protected) Actions to run when deactivating the plugin.
* - pluginUpdate (Protected) Actions to update the plugin to a new version. (Updating version on DB is done after this).
* Takes plugin running version as a parameter.
* - pluginsLoaded (Protected) Runs at 'plugins_loaded' action hook.
* - registerWidgets (Protected) Runs at 'widgets_init' action hook.
*
* @author Jordi Canals
* @package Alkivia
* @subpackage Framework
* @link http://wiki.alkivia.org/framework/classes/plugin
*/
abstract class akPluginAbstract extends akModuleAbstract
{
/**
* Holds the installed and active components.
* @var array
*/
private $components = false;
/**
* Class constructor.
* Calls the implementated method 'startUp' if it exists. This is done at plugins loading time.
* Prepares admin menus by seting an action for the implemented method '_adminMenus' if it exists.
*
* @param string $mod_file Full main plugin's filename (absolute to root).
* @param string $ID Plugin short name (known as plugin ID).
* @return spostsPlugin|false The plugin object or false if not compatible.
*/
public function __construct( $mod_file, $ID = '' )
{
parent::__construct('plugin', $ID, $mod_file);
if ( $this->isCompatible() ) {
// Activation and deactivation hooks.
register_activation_hook($this->mod_file, array($this, 'activate'));
register_deactivation_hook($this->mod_file, array($this, 'deactivate'));
add_action('plugins_loaded', array($this, 'init'));
}
}
/**
* Fires on plugin activation.
* @return void
*/
protected function pluginActivate () {}
/**
* Fires on plugin deactivation.
* @return void
*/
protected function pluginDeactivate () {}
/**
* Updates the plugin to a new version.
* @param string $version Old plugin version.
* @return void
*/
protected function pluginUpdate ( $version ) {}
/**
* Fires when plugins have been loaded.
* @return void
*/
protected function pluginsLoaded () {}
/**
* Fires on Widgets init.
* @return void
*/
protected function registerWidgets () {}
/**
* Allows to check if plugin is ready to load components on implementations.
* Overwrite this method and return true to load components, false to omit components load.
*
* @return boolean If components can be loaded or not.
*/
protected function readyForComponents ()
{
return false;
}
/**
* Activates the plugin. Only runs on first activation.
* Saves the plugin version in DB, and calls the 'pluginActivate' method.
*
* @uses do_action() Calls 'ak_activate_<modID>_plugin' action hook.
* @hook register_activation_hook
* @access private
* @return void
*/
final function activate()
{
$this->pluginActivate();
// Save options and version
$this->cfg->saveOptions($this->ID);
add_option($this->ID . '_version', $this->version);
// Load and activate plugin components.
$this->components = ak_get_installed_components($this->componentsPath(), true);
if ( empty($this->components) ) {
$this->components = false;
} else {
foreach ( $this->components as $id => $component ) {
if ( $component['Core'] ) {
require_once( $component['File'] );
do_action('ak_activate_' . $this->ID . '_' . $id);
$this->components[$id]['active'] = 1;
} else {
$this->components[$id]['active'] = 0;
}
}
update_option($this->ID . '_components', $this->components);
}
// Do activated hook.
do_action('ak_activate_' . $this->ID . '_plugin');
}
/**
* Deactivates the plugin.
*
* @uses do_action() Calls 'ak_deactivate_<modID>_plugin' action hook.
* @hook register_deactivation_hook
* @access private
* @return void
*/
final function deactivate()
{
$this->pluginDeactivate();
do_action('ak_deactivate_' . $this->ID . '_plugin');
}
/**
* Init the plugin (In action 'plugins_loaded')
* Here whe call the 'pluginUpdate' and 'pluginsLoaded' methods.
* Also the plugin version and settings are updated here.
*
* @hook action plugins_loaded
* @uses do_action() Calls the 'ak_<modID>_updated' action hook.
*
* @access private
* @return void
*/
final function init()
{
// First, check if the plugin needs to be updated.
if ( $this->needs_update ) {
$version = get_option($this->ID . '_version');
$this->pluginUpdate($version);
$this->cfg->saveOptions($this->ID);
update_option($this->ID . '_version', $this->version);
$this->searchNewComponents();
do_action('ak_' . $this->ID . '_updated');
}
$this->pluginsLoaded();
$this->loadComponents();
}
/**
* Loads plugin components if found.
*
* @return void
*/
final function loadComponents()
{
if ( ! $this->readyForComponents() ) {
return;
}
$this->components = get_option($this->ID . '_components');
if ( ! is_array($this->components) ) {
return;
}
foreach ( $this->components as $component ) {
if ( $component['active'] ) {
require_once ( $component['File']);
}
}
do_action('ak_' . $this->ID . '_components_init');
}
/**
* Reloads and updates installed components.
* If a new core component is found, it will be activated automatically.
*
* @return void
*/
private function searchNewComponents ()
{
$components = ak_get_installed_components($this->componentsPath(), true);
if ( empty($components) ) {
$this->components = false;
return;
}
$installed = array();
$core = array();
$optional = array();
// Sort components by core and optional. Then by name.
foreach ( $components as $id => $component ) {
if ( $component['Core'] ) {
$core[$id] = $component;
} else {
$optional[$id] = $component;
}
}
ksort($core); ksort($optional); // Sort components by ID.
$components = array_merge($core, $optional);
// Now, activate new core components, and set activation for optional.
$this->components = get_option($this->ID . '_components');
foreach ( $components as $id => $component ) {
$installed[$id] = $component;
if ( $component['Core'] ) {
$installed[$id]['active'] = 1;
if ( ! isset($this->components[$id]) || ! $this->components[$id]['active'] ) {
require_once( $component['File']);
do_action('ak_activate_' . $this->ID . '_' . $id);
}
} else {
if ( isset($this->components[$id]['active']) ) {
$installed[$id]['active'] = $this->components[$id]['active'];
} else {
$installed[$id]['active'] = 0;
}
}
}
$this->components = $installed;
update_option($this->ID . '_components', $this->components);
}
/**
* Checks if a component is installed and active.
*
* @return boolean If the component is active or not.
*/
public function activeComponent ( $name )
{
if ( ! is_array($this->components) ) {
return false;
}
$name = strtolower($name);
if ( isset($this->components[$name]) && $this->components[$name]['active'] ) {
return true;
} else {
return false;
}
}
/**
* Inits the widgets (In action 'widgets_init')
* Before loading the widgets, we check that standard sidebar is present.
*
* @hook action 'widgets_init'
* @return void
*/
final function widgetsInit()
{
if ( class_exists('WP_Widget') && function_exists('register_widget') && function_exists('unregister_widget') ) {
$this->registerWidgets();
do_action('ak_' . $this->ID . '_widgets_init');
} else {
add_action('admin_notices', array($this, 'noSidebarWarning'));
}
}
/**
* Checks if the plugin is compatible with the current WordPress version.
* If it's not compatible, sets an admin warning.
*
* @return boolean Plugin is compatible with this WordPress version or not.
*/
final public function isCompatible()
{
global $wp_version;
if ( version_compare($wp_version, $this->mod_data['Requires'] , '>=') ) {
return true;
} elseif ( ! has_action('admin_notices', array($this, 'noCompatibleWarning')) ) {
add_action('admin_notices', array($this, 'noCompatibleWarning'));
}
return false;
}
/**
* Shows a warning message when the plugin is not compatible with current WordPress version.
* This is used by calling the action 'admin_notices' in isCompatible()
*
* @hook action admin_notices
* @access private
* @return void
*/
final function noCompatibleWarning()
{
$this->loadTranslations(); // We have not loaded translations yet.
echo '<div class="error"><p><strong>' . __('Warning:', 'akfw') . '</strong> '
. sprintf(__('The active plugin %s is not compatible with your WordPress version.', 'akfw'),
'&laquo;' . $this->mod_data['Name'] . ' ' . $this->version . '&raquo;')
. '</p><p>' . sprintf(__('WordPress %s is required to run this plugin.', 'akfw'), $this->mod_data['Requires'])
. '</p></div>';
}
/**
* Shows an admin warning when not using the WordPress standard sidebar.
* This is done by calling the action 'admin_notices' in isStandardSidebar()
*
* @hook action admin_notices
* @access private
* @return void
*/
final function noSidebarWarning()
{
$this->loadTranslations(); // We have not loaded translations yet.
echo '<div class="error"><p><strong>' . __('Warning:', $this->ID) . '</strong> '
. __('Standard sidebar functions are not present.', $this->ID) . '</p><p>'
. sprintf(__('It is required to use the standard sidebar to run %s', $this->ID),
'&laquo;' . $this->mod_data['Name'] . ' ' . $this->version . '&raquo;')
. '</p></div>';
}
/**
* Loads plugins data.
*
* @return void
*/
final protected function loadData()
{
if ( empty($this->mod_data) ) {
if ( ! function_exists('get_plugin_data') ) {
require_once ( ABSPATH . 'wp-admin/includes/plugin.php' );
}
$plugin_data = get_plugin_data($this->mod_file);
$readme_data = ak_module_readme_data($this->mod_file);
$this->mod_data = array_merge($readme_data, $plugin_data);
$this->version = $this->mod_data['Version'];
}
}
/**
* Returns the path to plugin components.
*
* @uses apply_filters() Applies the ak_<plugin>_components_path filter on default path.
* @return string Path to components directory.
*/
final protected function componentsPath ()
{
$path = dirname($this->mod_file) . '/components';
return apply_filters('ak_' . $this->ID . '_components_path', $path);
}
/**
* Form part to activate/deactivate plugin components.
* To be included on other configuration or settings form.
* String for component name and description have to be included on plugin text_domain.
*
* @return void
*/
final protected function componentActivationForm ()
{
if ( $this->getOption('disable-components-activation') ) {
return;
}
$this->searchNewComponents();
?>
<dl>
<dt><?php _e('Activate Components', 'akfw'); ?></dt>
<dd>
<?php wp_nonce_field('ak-component-activation', '_aknonce', false); ?>
<table width="100%" class="form-table">
<?php foreach ( $this->components as $c) :
if ( ! $c['Core'] ) : ?>
<tr>
<th scope="row"><?php _e($c['Name'], $this->ID) ?>:</th>
<td>
<input type="radio" name="components[<?php echo $c['Component']; ?>]" value="1" <?php checked(1, $c['active']); ?> /> <?php _e('Yes', 'akfw'); ?> &nbsp;&nbsp;
<input type="radio" name="components[<?php echo $c['Component']; ?>]" value="0" <?php checked(0, $c['active']); ?> /> <?php _e('No', 'akfw'); ?> &nbsp;&nbsp;
<span class="setting-description"><?php _e($c['Description'], $this->ID); ?></span>
</td>
</tr>
<?php endif;
endforeach; ?>
</table>
</dd>
</dl>
<?php
}
/**
* Saves data from componets activation form.
* Activates or deactivates components as requested by user.
*
* @return void
*/
final protected function saveActivationForm ()
{
if ( $this->getOption('disable-components-activation') ) {
return;
}
check_admin_referer('ak-component-activation', '_aknonce');
if ( isset($_POST['action']) && 'update' == $_POST['action'] ) {
$post = stripslashes_deep($_POST['components'] );
$this->components = get_option($this->ID . '_components');
$this->searchNewComponents();
foreach ( $post as $name => $activate ) {
if ( $activate && ! $this->components[$name]['active'] ) {
require_once( $this->components[$name]['File']);
do_action('ak_activate_' . $this->ID . '_' . $name);
} elseif ( ! $activate && $this->components[$name]['active'] ) {
require_once( $this->components[$name]['File']);
do_action('ak_deactivate_' . $this->ID . '_' . $name);
}
$this->components[$name]['active'] = $activate;
}
update_option($this->ID . '_components', $this->components);
} else {
wp_die('Bad form received.', $this->ID);
}
}
}

View File

@ -0,0 +1,273 @@
<?php
/**
* Class for Themes management.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once ( AK_CLASSES . '/abstract/module.php' );
/**
* Abtract class to be used as a theme template.
* Must be implemented before using this class.
* There are some special functions that have to be declared in implementations to perform main actions:
* - themeInit (Protected) Runs as soon as theme has been loaded.
* - themeInstall (Protected) Runs at theme install time and fires on the 'init' action hook.
* - themeUpdate (Proetected) Runs at theme update and fires on the 'init' action hook.
* - themeSideBars (Protected) Runs at theme load time and used to register the theme sidebars.
*
* @author Jordi Canals
* @package Alkivia
* @subpackage Framework
* @link http://wiki.alkivia.org/framework/classes/theme
*
* @uses akSettings
*/
abstract class akThemeAbstract extends akModuleAbstract
{
/**
* Class constructor.
* Calls the implementated method 'startUp' if it exists. This is done at theme's loading time.
* Prepares admin menus by setting an action for the implemented method '_adminMenus' if it exists.
*
* @uses do_action() Calls the 'ak_theme_loaded' action hook.
* @param string $ID Theme internal short name (known as theme ID).
* @return akTheme
*/
public function __construct ( $ID = '' )
{
parent::__construct('theme', $ID);
if ( $this->installing ) {
$this->install();
}
if ( function_exists('register_sidebars') ) {
$this->themeSideBars();
}
$this->configureTheme();
do_action('ak_theme_loaded');
}
/**
* Inits the theme at WordPress 'init' action hook
* @return void
*/
protected function themeInit () {}
/**
* Installs the theme.
* @return void
*/
protected function themeInstall () {}
/**
* Performs additional actions to update the theme.
* @param string $version Theme current installed version.
* @return void
*/
protected function themeUpdate ( $version ) {}
/**
* Registers and sets theme sidebars.
* @return void
*/
protected function themeSideBars () {}
/**
* Configure the theme based on theme settings.
*
* @uses do_action() Calls the 'ak_theme_options_set' action hook.
* @return void
*/
final private function configureTheme()
{
// Set metatags
add_action('wp_head', array($this, 'metaTags') );
// Set the theme favicon
if ( ! $this->getOption('disable-favicon') ) {
add_action('wp_head', array($this, 'favicon'));
add_action('admin_head', array($this, 'favicon'));
}
// Enable self ping.
if ( ! $this->getOption('enable-selfping') ) {
add_action('pre_ping', array($this, 'disableSelfPing'));
}
do_action('ak_theme_options_set');
}
/**
* Installs the theme.
* Saves the theme version in DB, and calls the 'install' method.
*
* @uses do_action() Calls the 'ak_theme_installed' action hook.
* @return void
*/
final private function install ()
{
// If there is an additional function to perform on installation.
$this->themeInstall();
// Save options and version
$this->cfg->saveOptions($this->ID);
add_option($this->ID . '_version', $this->version);
do_action('ak_theme_installed');
}
/**
* Init the theme (In action 'init')
* Here whe call the 'themeUpdate' and 'themeInit' methods. This is done after the plugins are loaded.
* Also the theme version and settings are updated here.
*
* @uses do_action() Calls the 'ak_theme_updated' action hook.
* @hook action 'init'
* @access private
* @return void
*/
final function wpInit ()
{
// Check if the module needs to be updated.
if ( $this->needs_update ) {
$version = get_option($this->ID . '_version');
$this->themeUpdate($version);
$this->cfg->saveOptions($this->ID);
update_option($this->ID . '_version', $this->version);
do_action('ak_theme_updated');
}
// Call the custom init for the theme when system is loaded.
$this->themeInit();
}
/**
* Inits the widgets (In action 'widgets_init')
* In own themes standard sidebar always will be present (No check needed).
*
* @hook action 'widgets_init'
* @access private
* @return void
*/
final function widgetsInit ()
{
do_action('ak_theme_widgets_init');
}
/**
* Disables self pings.
* This will disable sending pings to our own blog.
*
* @author Michael D. Adams
* @link http://blogwaffe.com/2006/10/04/421/
* @version 0.2
* @hook action 'pre_ping'
* @param array $links Link list of URLs to ping.
*/
final function disableSelfPing( &$links )
{
$home = get_option( 'home' );
foreach ( $links as $l => $link ) {
if ( 0 === strpos( $link, $home ) ) {
unset($links[$l]);
}
}
}
/**
* Sets the favicon for the theme.
*
* @uses apply_filters() Calls apply_filters with the 'ak_theme_favicon' hook and the favicon url as content.
* @hook actions 'wp_head' and 'admin_head'
* @access private
* @return void
*/
final function favicon ()
{
$file = '/images/favicon.ico';
$favicon = $this->getOption('favicon-url');
if ( false === $favicon ) {
if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . $file) ) {
$favicon = get_stylesheet_directory_uri() . $file;
} elseif ( file_exists(TEMPLATEPATH . $file) ) {
$favicon = get_template_directory_uri() . $file;
} else {
$favicon = '';
}
}
$favicon = apply_filters('ak_theme_favicon', $favicon);
if ( ! empty($favicon) ) {
echo '<link rel="shortcut icon" href="' . $favicon . '" />' . PHP_EOL;
}
}
/**
* Adds meta names for parent and child themes to head.
*
* @hook action 'wp_head'
* @access private
* @return void
*/
final function metaTags()
{
echo '<meta name="theme" content="'
. $this->getModData('Name') . ' ' . $this->getModData('Version') . '" />' . PHP_EOL;
if ( $this->isChildTheme() ) {
echo '<meta name="child_theme" content="'
. $this->getChildData('Name') . ' ' . $this->getChildData('Version') . '" />' . PHP_EOL;
}
}
/**
* Loads theme (and child) data.
*
* @return void
*/
final protected function loadData()
{
$readme_data = ak_module_readme_data(TEMPLATEPATH . '/readme.txt');
if ( empty($this->mod_data) ) {
$theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
$this->mod_data = array_merge($readme_data, $theme_data);
}
if ( TEMPLATEPATH !== STYLESHEETPATH && empty($this->child_data) ) {
$this->mod_type = self::CHILD_THEME;
$child_data = get_theme_data(STYLESHEETPATH . '/style.css');
$child_readme_data = ak_module_readme_data(STYLESHEETPATH . '/readme.txt');
$this->child_data = array_merge($readme_data, $child_readme_data, $child_data);
}
$this->version = $this->mod_data['Version'];
}
}

View File

@ -0,0 +1,70 @@
<?php
/**
* Admin notices (or warnings).
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Class to show admin warnings (or notices)
* Throws the hook 'admin_notices' to show the warning only on allowed places.
* To use the class, just have to instantiate it as new akcAdminNotice('message').
*
* @author Jordi Canals
* @package Alkivia
* @subpackage Framework
*
* @link http://wiki.alkivia.org/framework/classes/admin-notice
*/
class akAdminNotice
{
/**
* Warning message to be shown.
* @var string
*/
private $message;
/**
* Class constructor.
* Gets the message, and sets the admin_notices hook.
*
* @param $message Message to show.
* @return aocAdminNotice
*/
public function __construct( $message )
{
$this->message = $message;
add_action('admin_notices', array($this, '_showMessage') );
}
/**
* The hook function to display the warning.
*
* @return void
*/
public function _showMessage()
{
echo '<div id="error" class="error"><p><strong>' . $this->message . '</strong></p></div>';
}
}

View File

@ -0,0 +1,330 @@
<?php
/**
* Alkivia Settings Manager
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Class to manage settings.
* It is expected to receive all settings properly filtered.
*
* @author Jordi Canals
* @package Alkivia
* @subpackage Framework
* @link http://wiki.alkivia.org/framework/classes/settings
*/
final class akSettings
{
/**
* Settings from alkivia.ini file
* This settings will be forced and cannot be set on the admin panel.
*
* @var array
*/
private $forced = array();
/**
* Global settings for all Alkivia modules.
* This is a merge from the settings on db and settings on the ini file.
*
* @var array
*/
private $settings = array();
/**
* Options retrieved from database and merged with defaults.
* This is what needs to be saved to database at end.
*
* @var array
*/
private $options = array();
/**
* Default settings for all alkivia modules.
* This options are set at module startup and used if no other setting is found.
*
* @var array
*/
private $defaults = array();
/**
* Flags to know if a setting has been updated or not.
* This is an array of flags, one item per module.
*
* @var array
*/
private $updated = array();
/**
* Settings prefix and sufix for database entry.
*/
const prefix = '';
const sufix = '_settings';
/**
* Class constructor.
* Loads settings from ini file.
*
* @return akSettings
*/
public function __construct()
{
if ( defined('AK_INI_FILE') && file_exists(AK_INI_FILE) ) {
$this->forced = parse_ini_file(AK_INI_FILE, true);
}
add_action('shutdown', array($this, 'saveOptions'));
}
/**
* Populates module settings array.
* Merges into settings array, defaults and options retrieved from DB.
*
* @param string $module Module name to load.
* @return void
*/
private function populateSettings ( $module )
{
if ( ! isset($this->defaults[$module]) ) {
$this->defaults[$module] = array();
}
if ( ! isset($this->options[$module]) ) {
$options = apply_filters('ak_' . $module . '_options', get_option(self::prefix . $module . self::sufix));
if ( is_array($options) ) {
$this->options[$module] = $options;
} else {
$this->options[$module] = array();
}
}
if ( ! isset($this->forced[$module]) ) {
$this->forced[$module] = array();
}
if ( ! isset($this->updated[$module]) ) {
$this->updated[$module] = false;
}
$this->options[$module] = array_merge(
$this->defaults[$module],
$this->options[$module]);
$this->settings[$module] = array_merge(
$this->options[$module],
$this->forced[$module]);
}
/**
* Sets default values for a module and fills missing settings with them.
*
* @uses apply_filters() Calls the 'ak_<module>_defaults' filter on new defaults.
* @param string $module Module name.
* @param array $options Default settings array.
* @return void
*/
public function setDefaults ( $module, $options )
{
if ( ! is_array($options) ) { // Must be an array of options.
$options = array();
}
$this->defaults[$module] = apply_filters('ak_' . $module . '_defaults', $options);
$this->populateSettings($module);
}
/**
* Returns an array with default values for a module.
*
* @param $module Module name
* @return array Default values for this module.
*/
public function getDefaults ( $module )
{
if ( isset($this->defaults[$module]) && is_array($this->defaults[$module]) ) {
return $this->defaults[$module];
} else {
return array();
}
}
/**
* Gets a setting for a module.
* If $option is empty, will return all settings for a module in an array.
*
* @param string $module Module internal name.
* @param string $option Setting name.
* @param mixed $default Default value if setting not found.
* @return mixed Returns the setting value or $default if not defined.
*/
public function getSetting ( $module, $option = '', $default = false )
{
if ( ! isset($this->settings[$module]) ) {
$this->populateSettings($module);
}
if ( empty($option) ) {
return $this->settings[$module];
} elseif ( isset($this->settings[$module][$option]) ) {
return $this->settings[$module][$option];
} else {
return $default;
}
}
/**
* Checks if an option is forced in the ini file.
* It is forced if it was defined on the ini file.
*
* @param string $module Module internal name.
* @param string $option Setting name.
* @return boolean
*/
public function isForced ( $module, $option )
{
if ( isset($this->forced[$module][$option]) ) {
return true;
} else {
return false;
}
}
/**
* Adds a new module setting only if it does not exists.
* Does not save them to database. After adding all new settings, must call akSettings::saveSettings()
*
* @param string $module Module name.
* @param string $option Setting name.
* @param mixed $value Setting value
* @return boolean Returns true if settings has been added, false otherwise.
*/
public function addOption ( $module, $option, $value )
{
if ( ! isset($this->options[$module]) ) {
$this->populateSettings($module);
}
if ( isset($this->options[$module][$option]) ) {
return false;
} else {
$this->options[$module][$option] = $value;
}
$this->populateSettings($module);
$this->updated[$module] = true;
return true;
}
/**
* Updates a module setting. If the setting does not exists, it is created.
* Does not save them to database. After adding all new settings, must call akSettings::saveSettings()
*
* @param string $module Module name.
* @param string $option Setting name.
* @param mixed $value Setting value
* @return void
*/
public function updateOption ( $module, $option, $value )
{
if ( ! isset($this->options[$module]) ) {
$this->populateSettings($module);
}
$this->options[$module][$option] = $value;
$this->populateSettings($module);
$this->updated[$module] = true;
}
/**
* Deletes an option from a module.
* Only if the option existed.
*
* @param string $module Module name.
* @param string $option Setting name.
* @return void
*/
public function deleteOption ( $module, $option )
{
if ( ! isset($this->options[$module]) ) {
$this->populateSettings($module);
}
if ( isset($this->options[$module][$option]) ) {
unset($this->options[$module][$option]);
}
$this->populateSettings($module);
$this->updated[$module] = true;
}
/**
* Replaces all settings for a module and saves them to database.
* If settings does not exist, them are created.
*
* @uses apply_filters() Calls the 'ak_<module>_replace_options' filter on new options.
* @param string $module Module name.
* @param array $settings New module settings.
* @return boolean Returns true if settings have been replaced.
*/
public function replaceOptions ( $module, $settings )
{
if ( ! is_array($settings) ) {
return false;
}
$this->options[$module] = apply_filters('ak_' . $module . '_replace_options', $settings);
$this->populateSettings($module);
$this->updated[$module] = true;
return $this->saveOptions($module);
}
/**
* Saves settings to database.
* If a module name is provided saves only this module settings, if not, saves all settings.
*
* @param string $module Module name to save.
* @return boolean Returns true is settings have been saved, false otherwise.
*/
public function saveOptions ( $module = '' )
{
if ( empty($module) ) {
foreach ( $this->options as $module => $value ) {
if ( $this->updated[$module] ) {
update_option(self::prefix . $module . self::sufix, $value);
$this->updated[$module] = false;
}
}
return true;
} elseif ( isset($this->options[$module]) && $this->updated[$module]) {
update_option(self::prefix . $module . self::sufix, $this->options[$module]);
return true;
} else {
return false;
}
}
}

View File

@ -0,0 +1,380 @@
<?php
/**
* Class to manage simple templates for HTML output.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* A very simple class for an easy tenplate management.
* This is an abstract class that have to be extended for use.
*
* TODO: Provide some sort of caching template contents.
*
* @package Alkivia
* @subpackage Framework
*/
class akTemplate
{
/**
* Templates folder (Slash ended).
* @var string
*/
protected $tpl_dir = array();
/**
* Config files folder (Slah ended).
* @var string
*/
private $cfg_dir = array();
/**
* Variables and values available to template.
* - 'var_name' => 'value'
* @var array
*/
protected $vars = array();
/**
* Data readed from template config files.
* @var array
*/
private $config = array();
/**
* Holds notice messages to be shown in output.
* On the template the method displayMessages() must be called.
* @var array
*/
private $notices = array();
/**
* Holds error messages to be shown in output.
* On the template the method displayMessages() must be called.
* @var array
*/
private $errors = array();
/**
* Class constructor.
*
* @param array|string $tpl_dir Full paths to template folders.
* @param string $cfg_dir Full path to config files.
* @return TemplateAbstract The class object or false if $tpl_dir is not a directory.
*/
public function __construct ( $tpl_dir, $cfg_dir = '' )
{
$this->tpl_dir = $this->checkDirectories($tpl_dir);
if ( empty($this->tpl_dir) ) {
wp_die(__('Template class: Received template paths are not valid directories.'));
}
if ( empty($cfg_dir) ) {
$this->cfg_dir = $this->tpl_dir;
} else {
$this->cfg_dir = $this->checkDirectories($cfg_dir);
if ( empty($this->tpl_dir) ) {
wp_die(__('Template class: Received config paths are not valid directories.'));
}
}
}
/**
* Checks an array of paths are valid directories.
*
* @since 0.8
*
* @param array|string $directories Absolute paths array
* @return array An array with only valid directories, wrong directories are removed.
*/
private function checkDirectories ( $directories )
{
$valid = array();
foreach ( (array) $directories as $path ) {
if ( is_dir($path) ) {
$valid[] = trailingslashit($path);
}
}
return $valid;
}
/**
* Assigns the translation textDomain as an available variable name.
* This will be available in template as $i18n.
*
* @param $context Translation context textDomain.
* @return void
*/
final public function textDomain ( $context )
{
$this->vars['i18n'] = $context;
}
/**
* Assigns a variable name with it's value.
* Reserved vars names: i18n, tpl, cfg.
*
* @param $name Variable name.
* @param $value Value of the variable.
* @return void
*/
final public function assign ( $name, $value )
{
$this->checkReserved($name);
$this->vars[$name] = $value;
}
/**
* Assigns a variable name with it's value by reference.
*
* @param $name Variable name.
* @param $value Value of the variable, received by reference.
* @return void
*/
public function assignByRef( $name, &$value )
{
$this->checkReserved($name);
$this->vars[$name] =& $value;
}
/**
* Checks if a template var name is reserved and dies if yes.
*
* @since 0.8
*
* @param string $name Variable name to check.
* @return void
*/
private function checkReserved ( $name )
{
if ( in_array($name, array('i18n', '_template', '_default', '_config', '_filename')) ) {
wp_die( sprintf(__('Template class: %s is a reserved template variable.'), $name) );
}
}
/**
* Loads an INI file from config folder, and merges the content with previous read files.
*
* @param $file File name (With no extension)
* @return void
*/
final public function loadConfig ( $file )
{
foreach ( $this->cfg_dir as $path ) {
$filename = $path . $name . '.ini';
if ( file_exists($filename) ) {
$config = parse_ini_file( $filename, true);
$this->config = array_merge($this->config, $config);
}
}
}
/**
* Sets config values to empty.
* Can be used to start over loading new INI files.
*
* @return void
*/
final public function resetConfig ()
{
$this->config = array();
}
/**
* Sets template vars to empty.
* Can be used to start over with a new template.
*
* @return void
*/
final public function resetVars ()
{
$this->vars = array();
}
/**
* Sets config and vars to empty.
* Used to start a new clean template.
*
* @return void
*/
final public function resetAll ()
{
$this->config = array();
$this->vars = array();
}
/**
* Adds an error to the erros queue.
* Only adds it if error does not already exists on errors queue.
*
* @param string $message Message to be added to the queue.
* @return void
*/
final public function addError ( $message )
{
if ( ! empty($message) && ! in_array($message, $this->errors)) {
$this->errors[] = $message;
}
}
/**
* Chechs if errors were found and have to be displayed.
*
* @return boolean Found errors.
*/
final public function foundErrors()
{
return ! empty($this->errors);
}
/**
* Adds a notice to the notices queue.
* Only adds the notice if it does not alredy exists on notices queue.
*
* @param string $message Message to be added to the queue.
* @return void
*/
final public function addNotice ( $message )
{
if ( ! empty($message) && ! in_array($message, $this->notices)) {
$this->notices[] = $message;
}
}
/**
* Empties all messages queues (notices and errors).
*
* @return void
*/
final public function resetMessages ()
{
$this->errors = array();
$this->notices = array();
}
/**
* Displays notices and/or error messages and empties the messages queue.
* This function should only be called within a template.
*
* @return void
*/
final public function displayMessages ()
{
if ( ! empty($this->errors) ) {
$errors = implode('<br />' . PHP_EOL, $this->errors);
echo '<div id="message" class="error">' . $errors . '</div>' . PHP_EOL;
}
if ( ! empty($this->notices) ) {
$notices = implode('<br />' . PHP_EOL, $this->notices);
echo '<div id="message" class="notice">' . $notices . '</div>' . PHP_EOL;
}
$this->resetMessages();
}
/**
* Checks if a template file is available.
*
* @since 0.8
*
* @param string $template Template name (With no .php extension)
* @return boolean If template file was found or not.
*/
final public function available( $template )
{
return ( false === $this->locateFile($template) ) ? false : true;
}
/**
* Displays a template from the templates folder.
* Inside the template all assigned vars will be available.
* Also 'cfg' and 'tpl' vars will be available:
* - cfg is an array which cointains all config values.
* - tpl is an string cointaining template absolute name.
*
* TODO: Load config file with same name as template.
*
* @param string $_template Template name with no extension.
* @param string $_default Alternate default template name.
* @return void.
*/
final public function display ( $_template, $_default = '' )
{
$_filename = $this->locateFile($_template);
if ( false === $_filename && ! empty($_default) ) {
$_filename = $this->locateFile($_default);
}
if ( $_filename ) {
$_config =& $this->config;
extract($this->vars);
include ( $_filename );
} else {
wp_die(sprintf(__('Template file %1$s not found. Default template %2$s not found.'), $_template, $_default));
}
}
/**
* Returns the template contents after processing it.
* Calls to TemplateAbstract::display() for template processing.
*
* @param string $template Template name with no extension.
* @param string $default Alternate default template name.
* @return string|false The template contents or false if failed processing.
*/
final public function getDisplay ( $template, $default = '' )
{
if ( ob_start() ) {
$this->display($template, $default);
$content = ob_get_contents();
ob_end_clean();
return $content;
} else {
return false;
}
}
/**
* Locates the path for a template filename.
* If template is not found, returns false.
*
* @param string $name Template name (with no .php extension)
* @return string|false Absolute path to template file. False if not found.
*/
private function locateFile( $name )
{
foreach ( $this->tpl_dir as $path ) {
$template = $path . $name . '.php';
if ( file_exists($template) ) {
return $template;
}
}
return false;
}
}

View File

@ -0,0 +1,127 @@
<?php
/**
* Framework Initialization.
* This file is called at framework load time.
*
* @version $Rev: 199485 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Creates and returns the framework URL.
*
* @return string Framework URL
*/
function ak_styles_url ()
{
$dir = str_replace('\\', '/', WP_CONTENT_DIR);
$fmw = str_replace('\\', '/', AK_FRAMEWORK);
return str_replace($dir, WP_CONTENT_URL, $fmw) . '/styles';
}
// ================================================= SET GLOBAL CONSTANTS =====
if ( ! defined('AK_STYLES_URL') ) {
/** Define the framework URL */
define ( 'AK_STYLES_URL', ak_styles_url() );
}
if ( ! defined('AK_INI_FILE') ) {
/** Define the alkivia.ini filename and absoilute location */
define ( 'AK_INI_FILE', WP_CONTENT_DIR . '/alkivia.ini');
}
if ( ! defined('AK_CLASSES') ) {
/** Define the classes folder */
define ( 'AK_CLASSES', AK_FRAMEWORK . '/classes');
}
if ( ! defined('AK_LIB') ) {
/** Library folder for functions files */
define ( 'AK_LIB', AK_FRAMEWORK . '/lib');
}
if ( ! defined('AK_VENDOR') ) {
/** Vendor classes and libs */
define ('AK_VENDOR', AK_FRAMEWORK . '/vendor');
}
$akf_uploads = wp_upload_dir();
if ( ! defined('AK_UPLOAD_DIR') ) {
/** Absolute path to upload folder */
define ( 'AK_UPLOAD_DIR', $akf_uploads['basedir'] . '/alkivia');
}
if ( ! defined('AK_UPLOAD_URL') ) {
/** URL to upload folder. This could be replaced by a download manager. */
define ( 'AK_UPLOAD_URL', $akf_uploads['baseurl'] . '/alkivia');
}
// ============================================== SET GLOBAL ACTION HOOKS =====
/**
* Adds meta name for Alkivia Framework to head.
*
* @hook action 'wp_head'
* @access private
* @return void
*/
function _ak_framework_meta_tags() {
echo '<meta name="framework" content="Alkivia Framework ' . get_option('ak_framework_version') . '" />' . PHP_EOL;
}
add_action('wp_head', '_ak_framework_meta_tags');
/**
* Loads the framework translations.
* Sets the translation text domain to 'akvf'.
*
* @return bool true on success, false on failure
*/
function _ak_framework_translation()
{
$locale = get_locale();
$mofile = AK_FRAMEWORK . "/lang/$locale.mo";
return load_textdomain('akfw', $mofile);
}
add_action('init', '_ak_framework_translation');
// ================================================ INCLUDE ALL LIBRARIES =====
// Create the upload folder if does not exist.
if ( ! is_dir(AK_UPLOAD_DIR) ) {
wp_mkdir_p(AK_UPLOAD_DIR);
}
// Prepare the settings and objects libraries.
require_once ( AK_CLASSES . '/settings.php');
require_once ( AK_LIB . '/filesystem.php' );
require_once ( AK_LIB . '/formating.php' );
require_once ( AK_LIB . '/modules.php' );
require_once ( AK_LIB . '/objects.php' );
require_once ( AK_LIB . '/system.php' );
require_once ( AK_LIB . '/themes.php' );
require_once ( AK_LIB . '/users.php' );
do_action('ak_framework_loaded');

Binary file not shown.

View File

@ -0,0 +1,352 @@
# Petar Toushkov <pt.launchpad@gmail.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: Alkivia SidePosts\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-06 01:15+0100\n"
"PO-Revision-Date: 2010-02-06 01:15+0100\n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_c\n"
"X-Poedit-Basepath: .\n"
"X-Generator: Lokalize 1.0\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../classes/abstract/module.php:599
msgid "Option blocked by administrator."
msgstr "Опцията е блокирана от администратора."
#: ../classes/abstract/plugin.php:344
#: ../classes/abstract/plugin.php:363
msgid "Warning:"
msgstr "Предупреждение: "
#: ../classes/abstract/plugin.php:345
#, php-format
msgid "The active plugin %s is not compatible with your WordPress version."
msgstr "Активната приставка %s е несъвместима с вашата версия на WordPress."
#: ../classes/abstract/plugin.php:347
#, php-format
msgid "WordPress %s is required to run this plugin."
msgstr "ЗА работата на тази приставка се изисква WordPress %s."
#: ../classes/abstract/plugin.php:364
msgid "Standard sidebar functions are not present."
msgstr "Стандартните функция за страничната лента не са налични."
#: ../classes/abstract/plugin.php:365
#, php-format
msgid "It is required to use the standard sidebar to run %s"
msgstr "За да работи %s трябва да работи стандартната странична лента."
#: ../classes/abstract/plugin.php:412
msgid "Activate Components"
msgstr ""
#: ../classes/abstract/plugin.php:421
msgid "Yes"
msgstr ""
#: ../classes/abstract/plugin.php:422
msgid "No"
msgstr ""
#: ../lib/formating.php:52
msgid "Settings saved."
msgstr "Настройките бяха запазени."
#: ../lib/formating.php:160
msgid "Just Now"
msgstr "Току-що"
#: ../lib/formating.php:163
#, php-format
msgid "1 minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "преди 1 минута"
msgstr[1] "преди %d минути"
#: ../lib/formating.php:166
#, php-format
msgid "1 hour ago"
msgid_plural "%d hours ago"
msgstr[0] "преди един час"
msgstr[1] "преди %d часа"
#: ../lib/formating.php:170
#, php-format
msgid "Today at %s"
msgstr "Днес в %s"
#: ../lib/formating.php:170
#, php-format
msgid "Yesterday at %s"
msgstr "Вчера в %s"
#: ../lib/themes.php:160
msgid "Plugin Homepage"
msgstr ""
#: ../lib/themes.php:164
msgid "Theme Homepage"
msgstr ""
#: ../lib/themes.php:168
msgid "Documentation"
msgstr ""
#: ../lib/themes.php:172
msgid "Support Forum"
msgstr ""
#: ../lib/themes.php:176
msgid "Author Homepage"
msgstr ""
#: ../lib/themes.php:180
msgid "Donate to project"
msgstr ""
#: ../vendor/upload/class.upload.php:2171
msgid "File error. Please try again."
msgstr "Грешка във файла. Моля, опитайте отново."
#: ../vendor/upload/class.upload.php:2172
msgid "Local file doesn't exist."
msgstr "Локалният файл не съществува."
#: ../vendor/upload/class.upload.php:2173
msgid "Local file is not readable."
msgstr "Локалният файл не може да бъде прочетен."
#: ../vendor/upload/class.upload.php:2174
msgid "File upload error (the uploaded file exceeds the upload_max_filesize directive in php.ini)."
msgstr "Грешка при качването на файла (каченият файл надхвърля upload_max_filesize директивата в php.ini)."
#: ../vendor/upload/class.upload.php:2175
msgid "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form)."
msgstr "Грешка при качването на файла (каченият файл надхвърля MAX_FILE_SIZE директивата, указана в HTML формата)."
#: ../vendor/upload/class.upload.php:2176
msgid "File upload error (the uploaded file was only partially uploaded)."
msgstr "Грешка при качването на файла (файлът беше качен частично)."
#: ../vendor/upload/class.upload.php:2177
msgid "File upload error (no file was uploaded)."
msgstr "Грешка при качването на файла (не беше качен файл)."
#: ../vendor/upload/class.upload.php:2178
msgid "File upload error (missing a temporary folder)."
msgstr "Грешка при качването на файла (отсъства временна директория)."
#: ../vendor/upload/class.upload.php:2179
msgid "File upload error (failed to write file to disk)."
msgstr "Грешка при качването на файла (неуспех при запис върху диска)."
#: ../vendor/upload/class.upload.php:2180
msgid "File upload error (file upload stopped by extension)."
msgstr "Грешка при качването на файла (качването беше преустановено от приставката)."
#: ../vendor/upload/class.upload.php:2181
msgid "File upload error (unknown error code)."
msgstr "Грешка при качването на файла (неизвестен код за грешка)."
#: ../vendor/upload/class.upload.php:2182
msgid "File upload error. Please try again."
msgstr "Грешка при качването на файла. Моля, опитайте отново."
#: ../vendor/upload/class.upload.php:2183
msgid "File too big."
msgstr "Файлът е прекалено голям."
#: ../vendor/upload/class.upload.php:2184
msgid "MIME type can't be detected."
msgstr "Неустановен тип (MIME type)."
#: ../vendor/upload/class.upload.php:2185
msgid "Incorrect type of file."
msgstr "Неправилен файлов тип."
#: ../vendor/upload/class.upload.php:2186
msgid "Image too wide."
msgstr "Изображението е прекалено широко."
#: ../vendor/upload/class.upload.php:2187
msgid "Image too narrow."
msgstr "Изображението е прекалено тясно."
#: ../vendor/upload/class.upload.php:2188
msgid "Image too high."
msgstr "Изображението е прекалено високо."
#: ../vendor/upload/class.upload.php:2189
msgid "Image too short."
msgstr "Изображението е прекалено ниско."
#: ../vendor/upload/class.upload.php:2190
msgid "Image ratio too high (image too wide)."
msgstr "Съотношението на изображението е прекалено високо (изображението е прекалено широко)."
#: ../vendor/upload/class.upload.php:2191
msgid "Image ratio too low (image too high)."
msgstr "Съотношението на изображението е прекалено ниско (изображението е прекалено високо)."
#: ../vendor/upload/class.upload.php:2192
msgid "Image has too many pixels."
msgstr "Изображението има прекалено много пиксели."
#: ../vendor/upload/class.upload.php:2193
msgid "Image has not enough pixels."
msgstr "Изображението няма достатъчно пиксели."
#: ../vendor/upload/class.upload.php:2194
msgid "File not uploaded. Can't carry on a process."
msgstr "Файлът не беше качен. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2195
#, php-format
msgid "%s already exists. Please change the file name."
msgstr "%s вече съществува. Моля, преименувайте."
#: ../vendor/upload/class.upload.php:2196
msgid "No correct temp source file. Can't carry on a process."
msgstr "Неправилен временен файлов източник. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2197
msgid "No correct uploaded source file. Can't carry on a process."
msgstr "Неправилен файлов източник за качване. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2198
msgid "Destination directory can't be created. Can't carry on a process."
msgstr "Целевата директория не може да бъде създадена. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2199
msgid "Destination directory doesn't exist. Can't carry on a process."
msgstr "Целевата директория не съществува. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2200
msgid "Destination path is not a directory. Can't carry on a process."
msgstr "Целевият път не е директория. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2201
msgid "Destination directory can't be made writeable. Can't carry on a process."
msgstr "Целевата директория не може да получи права за запис. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2202
msgid "Destination path is not a writeable. Can't carry on a process."
msgstr "Целевият път е недостъпен за запис. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2203
msgid "Can't create the temporary file. Can't carry on a process."
msgstr "Неуспех при създаването на временния файл. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2204
msgid "Source file is not readable. Can't carry on a process."
msgstr "Файловият източник не може да бъде прочетен. Процесът не може да продължи."
#: ../vendor/upload/class.upload.php:2205
#, php-format
msgid "No create from %s support."
msgstr "Няма поддръжка за създаване от %s."
#: ../vendor/upload/class.upload.php:2206
#, php-format
msgid "Error in creating %s image from source."
msgstr "Грешка при създаването на %s изображение от източника."
#: ../vendor/upload/class.upload.php:2207
msgid "Can't read image source. Not an image?."
msgstr "Неуспех при четенето на източника на изображението. Изображение ли е?"
#: ../vendor/upload/class.upload.php:2208
msgid "GD doesn't seem to be present."
msgstr "Изглежда, GD не е налично."
#: ../vendor/upload/class.upload.php:2209
#, php-format
msgid "No create from %s support, can't read watermark."
msgstr "Няма поддръжка за създаване от %s, неуспех при четенето на водния знак."
#: ../vendor/upload/class.upload.php:2210
#, php-format
msgid "No %s read support, can't create watermark."
msgstr "Няма поддръжка за четене на %s, неуспех при четенето на водния знак."
#: ../vendor/upload/class.upload.php:2211
msgid "Unknown image format, can't read watermark."
msgstr "Неизвестен формат на изображението, неуспех при четенето на водния знак."
#: ../vendor/upload/class.upload.php:2212
#, php-format
msgid "No %s create support."
msgstr "Няма поддръжка за създаване на %s."
#: ../vendor/upload/class.upload.php:2213
msgid "No conversion type defined."
msgstr "Няма дефиниран тип преобразуване."
#: ../vendor/upload/class.upload.php:2214
msgid "Error copying file on the server. copy() failed."
msgstr "Грешка при копирането на файла на сървъра. copy() failed."
#: ../vendor/upload/class.upload.php:2215
msgid "Error reading the file."
msgstr "Грешка при четенето на файла."
#~ msgid "The active plugin %s is not compatible with your PHP version."
#~ msgstr "Активната приставка %s е несъвместима с вашата PHP версия."
#~ msgid "%s is required for this plugin."
#~ msgstr "За тази приставка се изисква %s."
#~ msgid "A widget to move posts to the sidebar."
#~ msgstr "Джаджа за прехвърляне на публикации в страничната лента."
#~ msgid "Category not selected."
#~ msgstr "Не е избрана категория."
#~ msgid "Read more &raquo;"
#~ msgstr "Прочетете още &raquo;"
#~ msgid "No Comments"
#~ msgstr "Няма коментари"
#~ msgid "1 Comment"
#~ msgstr "1 коментар"
#~ msgid "% Comments"
#~ msgstr "% коментари"
#~ msgid "Comments closed"
#~ msgstr "Коментарите са забранени"
#~ msgid "Archive for"
#~ msgstr "Архив за"
#~ msgid "Title:"
#~ msgstr "Заглавие:"
#~ msgid "Category:"
#~ msgstr "Категория:"
#~ msgid "-- PRIVATE POSTS --"
#~ msgstr "-- ЛИЧНИ ПУБЛИКАЦИИ --"
#~ msgid "Number of posts:"
#~ msgstr "Брой на публикациите:"
#~ msgid "(At most %d)"
#~ msgstr "(Най-много %d)"
#~ msgid "Show:"
#~ msgstr "Показване:"
#~ msgid "Full Post"
#~ msgstr "Цялата публикация"
#~ msgid "Post Excerpt"
#~ msgstr "Извадка от публикацията"
#~ msgid "Excerpts with thumbnails"
#~ msgstr "Извадки с умалени изображения"
#~ msgid "Photo Blog"
#~ msgstr "Фото блог"
#~ msgid "Only Post Title"
#~ msgstr "Само заглавието на публикацията"
#~ msgid "Show category on all feeds"
#~ msgstr "Показване на категорията във всички емисии"
#~ msgid "Image width:"
#~ msgstr "Ширина на изображението:"
#~ msgid "pixels"
#~ msgstr "пиксела"
#~ msgid "Align thumbnail to right"
#~ msgstr "Подравняване на изображението надясно"

Binary file not shown.

View File

@ -0,0 +1,315 @@
msgid ""
msgstr ""
"Project-Id-Version: Alkivia Framework\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-08 13:50+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Catalan\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../classes/template.php:90
msgid "Template class: Received template paths are not valid directories."
msgstr "Classe 'Template': Les rutes de plantilla rebudes no són directoris vàlids."
#: ../classes/template.php:98
msgid "Template class: Received config paths are not valid directories."
msgstr "Classe 'Template': Les rutes de configuració rebudes no són directoris vàlids."
#: ../classes/template.php:174
#, php-format
msgid "Template class: %s is a reserved template variable."
msgstr "Classe 'Template': %s és una variable reservada."
#: ../classes/template.php:338
#, php-format
msgid "Template file %1$s not found. Default template %2$s not found."
msgstr "L'arxiu de plantilla %1$s no s'ha trobat. Tampoc s'ha trobat la plantilla predeterminada %2$s."
#: ../classes/abstract/module.php:614
msgid "Option blocked by administrator."
msgstr "Opció desactivada per l'administrador."
#: ../classes/abstract/plugin.php:344
#: ../classes/abstract/plugin.php:363
msgid "Warning:"
msgstr "Atenció:"
#: ../classes/abstract/plugin.php:345
#, php-format
msgid "The active plugin %s is not compatible with your WordPress version."
msgstr "L'extensió activa %s no és compatible amb la vostra versió de WordPress."
#: ../classes/abstract/plugin.php:347
#, php-format
msgid "WordPress %s is required to run this plugin."
msgstr "Aquesta extensió requereix WordPress %s."
#: ../classes/abstract/plugin.php:364
msgid "Standard sidebar functions are not present."
msgstr "No s'han trobat les funcions necessàries de la barra lateral estàndard."
#: ../classes/abstract/plugin.php:365
#, php-format
msgid "It is required to use the standard sidebar to run %s"
msgstr "La barra lateral estàndard és necessària per executar %s."
#: ../classes/abstract/plugin.php:418
msgid "Activate Components"
msgstr "Activa Components"
#: ../classes/abstract/plugin.php:427
msgid "Yes"
msgstr "Sí"
#: ../classes/abstract/plugin.php:428
msgid "No"
msgstr "No"
#: ../lib/formating.php:52
msgid "Settings saved."
msgstr "Opcions desades."
#: ../lib/formating.php:160
msgid "Just Now"
msgstr "Ara mateix"
#: ../lib/formating.php:163
#, php-format
msgid "1 minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "Fa 1 minut"
msgstr[1] "Fa %d minuts"
#: ../lib/formating.php:166
#, php-format
msgid "1 hour ago"
msgid_plural "%d hours ago"
msgstr[0] "Fa 1 hora"
msgstr[1] "Fa %d hores"
#: ../lib/formating.php:170
#, php-format
msgid "Today at %s"
msgstr "Avui a les %s"
#: ../lib/formating.php:170
#, php-format
msgid "Yesterday at %s"
msgstr "Ahir a les %s"
#: ../lib/themes.php:160
msgid "Plugin Homepage"
msgstr "Pàgina de l'extensió"
#: ../lib/themes.php:164
msgid "Theme Homepage"
msgstr "Pàgina web del tema"
#: ../lib/themes.php:168
msgid "Documentation"
msgstr "Documentació"
#: ../lib/themes.php:172
msgid "Support Forum"
msgstr "Fòrum d'Ajuda"
#: ../lib/themes.php:176
msgid "Author Homepage"
msgstr "Lloc web de l'autor"
#: ../lib/themes.php:180
msgid "Donate to project"
msgstr "Fes un donatiu"
#: ../vendor/upload/class.upload.php:2171
msgid "File error. Please try again."
msgstr "Error de fitxer. Si us plau, torneu-ho a provar."
#: ../vendor/upload/class.upload.php:2172
msgid "Local file doesn't exist."
msgstr "El fitxer local no existeix."
#: ../vendor/upload/class.upload.php:2173
msgid "Local file is not readable."
msgstr "El fitxer local no es pot llegir."
#: ../vendor/upload/class.upload.php:2174
msgid "File upload error (the uploaded file exceeds the upload_max_filesize directive in php.ini)."
msgstr "Error de pujada de fitxer (El fitxer pujat excedeix de la directiva upload_max_filesize de php.ini)."
#: ../vendor/upload/class.upload.php:2175
msgid "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form)."
msgstr "Error pujant el fitxer (el fitxer pujat excedeix la directiva MAX_FILE_SIZE que s'ha especificat al formulari HTML)."
#: ../vendor/upload/class.upload.php:2176
msgid "File upload error (the uploaded file was only partially uploaded)."
msgstr "Error pujant el fitxer (El fitxer només s'ha rebut parcialment)."
#: ../vendor/upload/class.upload.php:2177
msgid "File upload error (no file was uploaded)."
msgstr "Error pujant el fitxer (No s'ha rebut cap fitxer)."
#: ../vendor/upload/class.upload.php:2178
msgid "File upload error (missing a temporary folder)."
msgstr "Error pujant el fitxer (manca la carpeta temporal)."
#: ../vendor/upload/class.upload.php:2179
msgid "File upload error (failed to write file to disk)."
msgstr "Error pujant el fitxer (No s'ha pogut escriure al disc)."
#: ../vendor/upload/class.upload.php:2180
msgid "File upload error (file upload stopped by extension)."
msgstr "Error pujant el fitxer (El fitxer s'ha bloquejat per extensió)."
#: ../vendor/upload/class.upload.php:2181
msgid "File upload error (unknown error code)."
msgstr "Error pujant el fitxer (Codi d'error desconegut)."
#: ../vendor/upload/class.upload.php:2182
msgid "File upload error. Please try again."
msgstr "S'ha produït un error pujant el fitxer. Torneu-ho a provar d'aquí una estona."
#: ../vendor/upload/class.upload.php:2183
msgid "File too big."
msgstr "Fitxer massa gran."
#: ../vendor/upload/class.upload.php:2184
msgid "MIME type can't be detected."
msgstr "No es pot detectar el tipus MIME."
#: ../vendor/upload/class.upload.php:2185
msgid "Incorrect type of file."
msgstr "Tipus d'arxiu invàlid"
#: ../vendor/upload/class.upload.php:2186
msgid "Image too wide."
msgstr "Imatge massa ample."
#: ../vendor/upload/class.upload.php:2187
msgid "Image too narrow."
msgstr "Imatge massa estreta."
#: ../vendor/upload/class.upload.php:2188
msgid "Image too high."
msgstr "Imatge massa alta."
#: ../vendor/upload/class.upload.php:2189
msgid "Image too short."
msgstr "Imatge massa baixa."
#: ../vendor/upload/class.upload.php:2190
msgid "Image ratio too high (image too wide)."
msgstr "Ratio d'imatge massa gran (Imatge massa ample)."
#: ../vendor/upload/class.upload.php:2191
msgid "Image ratio too low (image too high)."
msgstr "Ratio d'imatge massa baix (Imatge massa alta)."
#: ../vendor/upload/class.upload.php:2192
msgid "Image has too many pixels."
msgstr "La imatge té massa píxels."
#: ../vendor/upload/class.upload.php:2193
msgid "Image has not enough pixels."
msgstr "La imatge no té prou píxels."
#: ../vendor/upload/class.upload.php:2194
msgid "File not uploaded. Can't carry on a process."
msgstr "No s'ha pujat el fitxer. No s'ha pogut executar el procés."
#: ../vendor/upload/class.upload.php:2195
#, php-format
msgid "%s already exists. Please change the file name."
msgstr "El fitxer %s ja existeix. Si en plau canvieu-ne el nom."
#: ../vendor/upload/class.upload.php:2196
msgid "No correct temp source file. Can't carry on a process."
msgstr "El fitxer temporal no es correcte. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2197
msgid "No correct uploaded source file. Can't carry on a process."
msgstr "El fitxer original no es correcte. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2198
msgid "Destination directory can't be created. Can't carry on a process."
msgstr "No es pot crear el directori de destí. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2199
msgid "Destination directory doesn't exist. Can't carry on a process."
msgstr "El directori de destí no existeix. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2200
msgid "Destination path is not a directory. Can't carry on a process."
msgstr "La ruta de destí no és un directori. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2201
msgid "Destination directory can't be made writeable. Can't carry on a process."
msgstr "No es pot canviar a 'escriure' els drets del directori de destí. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2202
msgid "Destination path is not a writeable. Can't carry on a process."
msgstr "No es pot escriure en el directori de destí. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2203
msgid "Can't create the temporary file. Can't carry on a process."
msgstr "No es pot crear un fitxer temporal. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2204
msgid "Source file is not readable. Can't carry on a process."
msgstr "El fitxer d'origen no es pot llegir. No es pot executar el procés."
#: ../vendor/upload/class.upload.php:2205
#, php-format
msgid "No create from %s support."
msgstr "No hi ha funcions per crear des de %s."
#: ../vendor/upload/class.upload.php:2206
#, php-format
msgid "Error in creating %s image from source."
msgstr "Error creant la imatge %s des de l'original."
#: ../vendor/upload/class.upload.php:2207
msgid "Can't read image source. Not an image?."
msgstr "No es pot llegir la imatge original. És una imatge?"
#: ../vendor/upload/class.upload.php:2208
msgid "GD doesn't seem to be present."
msgstr "No sembla que la llibreria GD estigui present."
#: ../vendor/upload/class.upload.php:2209
#, php-format
msgid "No create from %s support, can't read watermark."
msgstr "No hi ha funcions per crear des de %s, no es pot llegir la marca a l'aigua."
#: ../vendor/upload/class.upload.php:2210
#, php-format
msgid "No %s read support, can't create watermark."
msgstr "No hi ha funcions per llegir %s, no es pot crear la marca a l'aigua."
#: ../vendor/upload/class.upload.php:2211
msgid "Unknown image format, can't read watermark."
msgstr "Format d'imatge desconegut, no es pot llegir la marca a l'aigua."
#: ../vendor/upload/class.upload.php:2212
#, php-format
msgid "No %s create support."
msgstr "No hi ha funcions per crear %s."
#: ../vendor/upload/class.upload.php:2213
msgid "No conversion type defined."
msgstr "No s'ha definit cap tipus de conversió."
#: ../vendor/upload/class.upload.php:2214
msgid "Error copying file on the server. copy() failed."
msgstr "Error copiant el fitxer al serivor. copy() ha fallat."
#: ../vendor/upload/class.upload.php:2215
msgid "Error reading the file."
msgstr "Error llegint el fitxer."

Binary file not shown.

View File

@ -0,0 +1,316 @@
msgid ""
msgstr ""
"Project-Id-Version: Alkivia Framework\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-08 13:50+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Spanish\n"
"X-Poedit-Country: SPAIN\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../classes/template.php:90
msgid "Template class: Received template paths are not valid directories."
msgstr "Clase 'Template': Las rutas de platilla recibidas no son directorios válidos."
#: ../classes/template.php:98
msgid "Template class: Received config paths are not valid directories."
msgstr "Clase 'Template': Las rutas de configuración recibidas no son directorios válidos."
#: ../classes/template.php:174
#, php-format
msgid "Template class: %s is a reserved template variable."
msgstr "Clase 'Template': %s es una variable reservada."
#: ../classes/template.php:338
#, php-format
msgid "Template file %1$s not found. Default template %2$s not found."
msgstr "El archivo de plantilla %1$s no existe. Tampoco se encontró la plantilla predeterminada %2$s."
#: ../classes/abstract/module.php:614
msgid "Option blocked by administrator."
msgstr "Opción bloqueada por el administrador."
#: ../classes/abstract/plugin.php:344
#: ../classes/abstract/plugin.php:363
msgid "Warning:"
msgstr "Atención:"
#: ../classes/abstract/plugin.php:345
#, php-format
msgid "The active plugin %s is not compatible with your WordPress version."
msgstr "El plugin activo %s no es compatible con tu versión de WordPress."
#: ../classes/abstract/plugin.php:347
#, php-format
msgid "WordPress %s is required to run this plugin."
msgstr "Para ejecutar este plugin se require WordPress %s."
#: ../classes/abstract/plugin.php:364
msgid "Standard sidebar functions are not present."
msgstr "No se encontraron las funciones de la barra lateral estandar."
#: ../classes/abstract/plugin.php:365
#, php-format
msgid "It is required to use the standard sidebar to run %s"
msgstr "Se requiere la barra lateral estandar para ejecutar %s"
#: ../classes/abstract/plugin.php:418
msgid "Activate Components"
msgstr "Activar Componentes"
#: ../classes/abstract/plugin.php:427
msgid "Yes"
msgstr "Si"
#: ../classes/abstract/plugin.php:428
msgid "No"
msgstr "No"
#: ../lib/formating.php:52
msgid "Settings saved."
msgstr "Parámetros guardados."
#: ../lib/formating.php:160
msgid "Just Now"
msgstr "Ahora mismo"
#: ../lib/formating.php:163
#, php-format
msgid "1 minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "Hace 1 minuto"
msgstr[1] "Hace %d minutos"
#: ../lib/formating.php:166
#, php-format
msgid "1 hour ago"
msgid_plural "%d hours ago"
msgstr[0] "Hace una hora"
msgstr[1] "Hace %d horas"
#: ../lib/formating.php:170
#, php-format
msgid "Today at %s"
msgstr "Hoy a las %s"
#: ../lib/formating.php:170
#, php-format
msgid "Yesterday at %s"
msgstr "Ayer a las %s"
#: ../lib/themes.php:160
msgid "Plugin Homepage"
msgstr "Página del plugin"
#: ../lib/themes.php:164
msgid "Theme Homepage"
msgstr "Página del tema"
#: ../lib/themes.php:168
msgid "Documentation"
msgstr "Documentación"
#: ../lib/themes.php:172
msgid "Support Forum"
msgstr "Foro de soporte"
#: ../lib/themes.php:176
msgid "Author Homepage"
msgstr "Página del autor"
#: ../lib/themes.php:180
msgid "Donate to project"
msgstr "Haz un donativo"
#: ../vendor/upload/class.upload.php:2171
msgid "File error. Please try again."
msgstr "Error de archivo. Por favor, reintentalo de nuevo."
#: ../vendor/upload/class.upload.php:2172
msgid "Local file doesn't exist."
msgstr "El archivo local no existe."
#: ../vendor/upload/class.upload.php:2173
msgid "Local file is not readable."
msgstr "El archivo local no es legible."
#: ../vendor/upload/class.upload.php:2174
msgid "File upload error (the uploaded file exceeds the upload_max_filesize directive in php.ini)."
msgstr "Error de carga de archivo (el archivo cargado excede la directiva UPLOAD_MAX_FILESIZE de PHP)."
#: ../vendor/upload/class.upload.php:2175
msgid "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form)."
msgstr "Error de carga de archivo (el archivo enviado excede la directiva MAX_FILE_SIZE especificada en el formulario)."
#: ../vendor/upload/class.upload.php:2176
msgid "File upload error (the uploaded file was only partially uploaded)."
msgstr "Error de carga de archivo (el archivo sólo se recibió parcialmente)."
#: ../vendor/upload/class.upload.php:2177
msgid "File upload error (no file was uploaded)."
msgstr "Error de carga de archivo (no se recibió archivo)."
#: ../vendor/upload/class.upload.php:2178
msgid "File upload error (missing a temporary folder)."
msgstr "Error de carga de archivo (falta la carpeta temporal)."
#: ../vendor/upload/class.upload.php:2179
msgid "File upload error (failed to write file to disk)."
msgstr "Error de carga de archivo (no se pudo escribir en el disco)."
#: ../vendor/upload/class.upload.php:2180
msgid "File upload error (file upload stopped by extension)."
msgstr "Error de carga de archivo (se ha bloquedao el archivo por extensión)."
#: ../vendor/upload/class.upload.php:2181
msgid "File upload error (unknown error code)."
msgstr "Error de carga de archivo (código de error desconocido)."
#: ../vendor/upload/class.upload.php:2182
msgid "File upload error. Please try again."
msgstr "Error de carga de archivo. Por favor, reinténtalo."
#: ../vendor/upload/class.upload.php:2183
msgid "File too big."
msgstr "Archivo demasiado grande."
#: ../vendor/upload/class.upload.php:2184
msgid "MIME type can't be detected."
msgstr "No se pudo detectar el tipo MIME."
#: ../vendor/upload/class.upload.php:2185
msgid "Incorrect type of file."
msgstr "Tipo de archivo incorrecto."
#: ../vendor/upload/class.upload.php:2186
msgid "Image too wide."
msgstr "Imagen demasiado ancha."
#: ../vendor/upload/class.upload.php:2187
msgid "Image too narrow."
msgstr "Imagen demasiado estrecha."
#: ../vendor/upload/class.upload.php:2188
msgid "Image too high."
msgstr "Imagen demasiado alta."
#: ../vendor/upload/class.upload.php:2189
msgid "Image too short."
msgstr "Imagen demasiado baja."
#: ../vendor/upload/class.upload.php:2190
msgid "Image ratio too high (image too wide)."
msgstr "Ratio de imagen demariado alto (imagen demasiado ancha)."
#: ../vendor/upload/class.upload.php:2191
msgid "Image ratio too low (image too high)."
msgstr "Ratio de imagen demasiado bajo (imagen demasiado alta)."
#: ../vendor/upload/class.upload.php:2192
msgid "Image has too many pixels."
msgstr "La imágen tiene demasiados píxeles."
#: ../vendor/upload/class.upload.php:2193
msgid "Image has not enough pixels."
msgstr "La imagen no tiene suficientes píxeles."
#: ../vendor/upload/class.upload.php:2194
msgid "File not uploaded. Can't carry on a process."
msgstr "No se ha cargado el archivo. No se puede ejecutar el proceso."
#: ../vendor/upload/class.upload.php:2195
#, php-format
msgid "%s already exists. Please change the file name."
msgstr "El archivo %s ya existe. Por favor, cambia el nombre de archivo."
#: ../vendor/upload/class.upload.php:2196
msgid "No correct temp source file. Can't carry on a process."
msgstr "El archivo temporal es incorrecto. No se puede ejecutar el proceso."
#: ../vendor/upload/class.upload.php:2197
msgid "No correct uploaded source file. Can't carry on a process."
msgstr "Archivo original incorrecto. No se puede ejecutar el proceso."
#: ../vendor/upload/class.upload.php:2198
msgid "Destination directory can't be created. Can't carry on a process."
msgstr "No se puede crear el directorio de destino. No se puede realizar el proceso."
#: ../vendor/upload/class.upload.php:2199
msgid "Destination directory doesn't exist. Can't carry on a process."
msgstr "El directorio de destino no existe. No se puede realizar el proceso."
#: ../vendor/upload/class.upload.php:2200
msgid "Destination path is not a directory. Can't carry on a process."
msgstr "La ruta de destino no es un directorio. No se puede realizar el proceso."
#: ../vendor/upload/class.upload.php:2201
msgid "Destination directory can't be made writeable. Can't carry on a process."
msgstr "El directorio de destino no se puede cambiar a escribible. No se puede realizar el proceso."
#: ../vendor/upload/class.upload.php:2202
msgid "Destination path is not a writeable. Can't carry on a process."
msgstr "No se puede escribir en la ruta de destino. No se puede realizar el proceso."
#: ../vendor/upload/class.upload.php:2203
msgid "Can't create the temporary file. Can't carry on a process."
msgstr "No se puede crar un archivo temporal. No se puede ejecutar el proceso."
#: ../vendor/upload/class.upload.php:2204
msgid "Source file is not readable. Can't carry on a process."
msgstr "No se puede leer el archivo original. No se puede ejecutar el proceso."
#: ../vendor/upload/class.upload.php:2205
#, php-format
msgid "No create from %s support."
msgstr "No hay soporte para crear desde %s."
#: ../vendor/upload/class.upload.php:2206
#, php-format
msgid "Error in creating %s image from source."
msgstr "Error creacdo la imagen %s desde el original."
#: ../vendor/upload/class.upload.php:2207
msgid "Can't read image source. Not an image?."
msgstr "No se puede leer la imagen orginal. ¿Es una imagen?"
#: ../vendor/upload/class.upload.php:2208
msgid "GD doesn't seem to be present."
msgstr "No se ha detectado la libreria GD."
#: ../vendor/upload/class.upload.php:2209
#, php-format
msgid "No create from %s support, can't read watermark."
msgstr "No hay soporte para crear desde %s. No se puede leer la marca de agua."
#: ../vendor/upload/class.upload.php:2210
#, php-format
msgid "No %s read support, can't create watermark."
msgstr "No hay soporte para leer %s. No se puede crear la marca de agua."
#: ../vendor/upload/class.upload.php:2211
msgid "Unknown image format, can't read watermark."
msgstr "Formato de imagen desconocido. No se puede leer la marca al agua."
#: ../vendor/upload/class.upload.php:2212
#, php-format
msgid "No %s create support."
msgstr "No hay soporte para crear %s."
#: ../vendor/upload/class.upload.php:2213
msgid "No conversion type defined."
msgstr "No se ha definido el tipo de conversión."
#: ../vendor/upload/class.upload.php:2214
msgid "Error copying file on the server. copy() failed."
msgstr "Error coipiando el archivo en el servidor. Ha fallado copy()."
#: ../vendor/upload/class.upload.php:2215
msgid "Error reading the file."
msgstr "Error leyendo el archivo."

View File

@ -0,0 +1,317 @@
msgid ""
msgstr ""
"Project-Id-Version: Alkivia SidePosts\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-08 13:50+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_c;_x:2c,1\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../classes/template.php:90
msgid "Template class: Received template paths are not valid directories."
msgstr ""
#: ../classes/template.php:98
msgid "Template class: Received config paths are not valid directories."
msgstr ""
#: ../classes/template.php:174
#, php-format
msgid "Template class: %s is a reserved template variable."
msgstr ""
#: ../classes/template.php:338
#, php-format
msgid "Template file %1$s not found. Default template %2$s not found."
msgstr ""
#: ../classes/abstract/module.php:614
msgid "Option blocked by administrator."
msgstr ""
#: ../classes/abstract/plugin.php:344
#: ../classes/abstract/plugin.php:363
msgid "Warning:"
msgstr ""
#: ../classes/abstract/plugin.php:345
#, php-format
msgid "The active plugin %s is not compatible with your WordPress version."
msgstr ""
#: ../classes/abstract/plugin.php:347
#, php-format
msgid "WordPress %s is required to run this plugin."
msgstr ""
#: ../classes/abstract/plugin.php:364
msgid "Standard sidebar functions are not present."
msgstr ""
#: ../classes/abstract/plugin.php:365
#, php-format
msgid "It is required to use the standard sidebar to run %s"
msgstr ""
#: ../classes/abstract/plugin.php:418
msgid "Activate Components"
msgstr ""
#: ../classes/abstract/plugin.php:427
msgid "Yes"
msgstr ""
#: ../classes/abstract/plugin.php:428
msgid "No"
msgstr ""
#: ../lib/formating.php:52
msgid "Settings saved."
msgstr ""
#: ../lib/formating.php:160
msgid "Just Now"
msgstr ""
#: ../lib/formating.php:163
#, php-format
msgid "1 minute ago"
msgid_plural "%d minutes ago"
msgstr[0] ""
msgstr[1] ""
#: ../lib/formating.php:166
#, php-format
msgid "1 hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: ../lib/formating.php:170
#, php-format
msgid "Today at %s"
msgstr ""
#: ../lib/formating.php:170
#, php-format
msgid "Yesterday at %s"
msgstr ""
#: ../lib/themes.php:160
msgid "Plugin Homepage"
msgstr ""
#: ../lib/themes.php:164
msgid "Theme Homepage"
msgstr ""
#: ../lib/themes.php:168
msgid "Documentation"
msgstr ""
#: ../lib/themes.php:172
msgid "Support Forum"
msgstr ""
#: ../lib/themes.php:176
msgid "Author Homepage"
msgstr ""
#: ../lib/themes.php:180
msgid "Donate to project"
msgstr ""
#: ../vendor/upload/class.upload.php:2171
msgid "File error. Please try again."
msgstr ""
#: ../vendor/upload/class.upload.php:2172
msgid "Local file doesn't exist."
msgstr ""
#: ../vendor/upload/class.upload.php:2173
msgid "Local file is not readable."
msgstr ""
#: ../vendor/upload/class.upload.php:2174
msgid "File upload error (the uploaded file exceeds the upload_max_filesize directive in php.ini)."
msgstr ""
#: ../vendor/upload/class.upload.php:2175
msgid "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form)."
msgstr ""
#: ../vendor/upload/class.upload.php:2176
msgid "File upload error (the uploaded file was only partially uploaded)."
msgstr ""
#: ../vendor/upload/class.upload.php:2177
msgid "File upload error (no file was uploaded)."
msgstr ""
#: ../vendor/upload/class.upload.php:2178
msgid "File upload error (missing a temporary folder)."
msgstr ""
#: ../vendor/upload/class.upload.php:2179
msgid "File upload error (failed to write file to disk)."
msgstr ""
#: ../vendor/upload/class.upload.php:2180
msgid "File upload error (file upload stopped by extension)."
msgstr ""
#: ../vendor/upload/class.upload.php:2181
msgid "File upload error (unknown error code)."
msgstr ""
#: ../vendor/upload/class.upload.php:2182
msgid "File upload error. Please try again."
msgstr ""
#: ../vendor/upload/class.upload.php:2183
msgid "File too big."
msgstr ""
#: ../vendor/upload/class.upload.php:2184
msgid "MIME type can't be detected."
msgstr ""
#: ../vendor/upload/class.upload.php:2185
msgid "Incorrect type of file."
msgstr ""
#: ../vendor/upload/class.upload.php:2186
msgid "Image too wide."
msgstr ""
#: ../vendor/upload/class.upload.php:2187
msgid "Image too narrow."
msgstr ""
#: ../vendor/upload/class.upload.php:2188
msgid "Image too high."
msgstr ""
#: ../vendor/upload/class.upload.php:2189
msgid "Image too short."
msgstr ""
#: ../vendor/upload/class.upload.php:2190
msgid "Image ratio too high (image too wide)."
msgstr ""
#: ../vendor/upload/class.upload.php:2191
msgid "Image ratio too low (image too high)."
msgstr ""
#: ../vendor/upload/class.upload.php:2192
msgid "Image has too many pixels."
msgstr ""
#: ../vendor/upload/class.upload.php:2193
msgid "Image has not enough pixels."
msgstr ""
#: ../vendor/upload/class.upload.php:2194
msgid "File not uploaded. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2195
#, php-format
msgid "%s already exists. Please change the file name."
msgstr ""
#: ../vendor/upload/class.upload.php:2196
msgid "No correct temp source file. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2197
msgid "No correct uploaded source file. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2198
msgid "Destination directory can't be created. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2199
msgid "Destination directory doesn't exist. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2200
msgid "Destination path is not a directory. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2201
msgid "Destination directory can't be made writeable. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2202
msgid "Destination path is not a writeable. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2203
msgid "Can't create the temporary file. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2204
msgid "Source file is not readable. Can't carry on a process."
msgstr ""
#: ../vendor/upload/class.upload.php:2205
#, php-format
msgid "No create from %s support."
msgstr ""
#: ../vendor/upload/class.upload.php:2206
#, php-format
msgid "Error in creating %s image from source."
msgstr ""
#: ../vendor/upload/class.upload.php:2207
msgid "Can't read image source. Not an image?."
msgstr ""
#: ../vendor/upload/class.upload.php:2208
msgid "GD doesn't seem to be present."
msgstr ""
#: ../vendor/upload/class.upload.php:2209
#, php-format
msgid "No create from %s support, can't read watermark."
msgstr ""
#: ../vendor/upload/class.upload.php:2210
#, php-format
msgid "No %s read support, can't create watermark."
msgstr ""
#: ../vendor/upload/class.upload.php:2211
msgid "Unknown image format, can't read watermark."
msgstr ""
#: ../vendor/upload/class.upload.php:2212
#, php-format
msgid "No %s create support."
msgstr ""
#: ../vendor/upload/class.upload.php:2213
msgid "No conversion type defined."
msgstr ""
#: ../vendor/upload/class.upload.php:2214
msgid "Error copying file on the server. copy() failed."
msgstr ""
#: ../vendor/upload/class.upload.php:2215
msgid "Error reading the file."
msgstr ""

Binary file not shown.

View File

@ -0,0 +1,417 @@
msgid ""
msgstr ""
"Project-Id-Version: SidePosts WordPress Widget in italiano\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-06 01:15+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: \n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Country: ITALY\n"
"X-Poedit-SearchPath-0: \n"
#: ../classes/abstract/module.php:599
msgid "Option blocked by administrator."
msgstr "Opzione bloccata dall'amministratore"
#: ../classes/abstract/plugin.php:344
#: ../classes/abstract/plugin.php:363
msgid "Warning:"
msgstr "Avvertimento:"
#: ../classes/abstract/plugin.php:345
#, php-format
msgid "The active plugin %s is not compatible with your WordPress version."
msgstr "Il plugin attivo %s non é compatibile con la tua versione WordPress."
#: ../classes/abstract/plugin.php:347
#, php-format
msgid "WordPress %s is required to run this plugin."
msgstr "E' necessario WordPress %s affinché questo plugin possa funzionare."
#: ../classes/abstract/plugin.php:364
msgid "Standard sidebar functions are not present."
msgstr "Non sono presenti le funzioni standard della sidebar."
#: ../classes/abstract/plugin.php:365
#, php-format
msgid "It is required to use the standard sidebar to run %s"
msgstr "E' necessario l'utilizzo della sidebar standard affinché funzioni %s"
#: ../classes/abstract/plugin.php:412
msgid "Activate Components"
msgstr ""
#: ../classes/abstract/plugin.php:421
msgid "Yes"
msgstr "Sí"
#: ../classes/abstract/plugin.php:422
msgid "No"
msgstr "No"
#: ../lib/formating.php:52
msgid "Settings saved."
msgstr "Le impostazioni sono state salvate"
#: ../lib/formating.php:160
msgid "Just Now"
msgstr "In questo momento"
#: ../lib/formating.php:163
#, php-format
msgid "1 minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "1 minuto fa"
msgstr[1] "%d minuti fa"
#: ../lib/formating.php:166
#, php-format
msgid "1 hour ago"
msgid_plural "%d hours ago"
msgstr[0] "1 ora fa"
msgstr[1] "%d ore fa"
#: ../lib/formating.php:170
#, php-format
msgid "Today at %s"
msgstr "Oggi alle %s"
#: ../lib/formating.php:170
#, php-format
msgid "Yesterday at %s"
msgstr "Ieri alle %s"
#: ../lib/themes.php:160
msgid "Plugin Homepage"
msgstr ""
#: ../lib/themes.php:164
msgid "Theme Homepage"
msgstr ""
#: ../lib/themes.php:168
msgid "Documentation"
msgstr ""
#: ../lib/themes.php:172
msgid "Support Forum"
msgstr ""
#: ../lib/themes.php:176
msgid "Author Homepage"
msgstr ""
#: ../lib/themes.php:180
msgid "Donate to project"
msgstr ""
#: ../vendor/upload/class.upload.php:2171
msgid "File error. Please try again."
msgstr "Errore file. Riprova."
#: ../vendor/upload/class.upload.php:2172
msgid "Local file doesn't exist."
msgstr "Il file locale non esiste."
#: ../vendor/upload/class.upload.php:2173
msgid "Local file is not readable."
msgstr "Il file locale non é leggibile."
#: ../vendor/upload/class.upload.php:2174
msgid "File upload error (the uploaded file exceeds the upload_max_filesize directive in php.ini)."
msgstr "Errore caricamento file (il file eccede il limite fissato dalla direttiva upload_max_filesize impostato in php.ini)."
#: ../vendor/upload/class.upload.php:2175
msgid "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form)."
msgstr "Errore caricamento file (il file eccede il limite fissato dalla direttiva MAX_FILE_SIZE specificata nel modulo html)."
#: ../vendor/upload/class.upload.php:2176
msgid "File upload error (the uploaded file was only partially uploaded)."
msgstr "Errore caricamento file (il file é stato pazialmente caricato)."
#: ../vendor/upload/class.upload.php:2177
msgid "File upload error (no file was uploaded)."
msgstr "Errore caricamento file (nessun file é stato caricato)."
#: ../vendor/upload/class.upload.php:2178
msgid "File upload error (missing a temporary folder)."
msgstr "Errore caricamento file (cartella temporanea inesistente)."
#: ../vendor/upload/class.upload.php:2179
msgid "File upload error (failed to write file to disk)."
msgstr "Errore caricamento file (non é stato possibile scrivere il file nel disco)."
#: ../vendor/upload/class.upload.php:2180
msgid "File upload error (file upload stopped by extension)."
msgstr "Errore caricamento file (blocco caricamento file dovuto alla estensione)."
#: ../vendor/upload/class.upload.php:2181
msgid "File upload error (unknown error code)."
msgstr "Errore caricamento file (codice errore sconosciuto)."
#: ../vendor/upload/class.upload.php:2182
msgid "File upload error. Please try again."
msgstr "Errore caricamento file. Riprova."
#: ../vendor/upload/class.upload.php:2183
msgid "File too big."
msgstr "File troppo grande."
#: ../vendor/upload/class.upload.php:2184
msgid "MIME type can't be detected."
msgstr "Non é possibile rilevare il formato MIME."
#: ../vendor/upload/class.upload.php:2185
msgid "Incorrect type of file."
msgstr "Tipo di file non corretto."
#: ../vendor/upload/class.upload.php:2186
msgid "Image too wide."
msgstr "Immagine troppo larga."
#: ../vendor/upload/class.upload.php:2187
msgid "Image too narrow."
msgstr "Immagine troppo stretta."
#: ../vendor/upload/class.upload.php:2188
msgid "Image too high."
msgstr "Immagine troppo alta."
#: ../vendor/upload/class.upload.php:2189
msgid "Image too short."
msgstr "Immagine troppo piccola."
#: ../vendor/upload/class.upload.php:2190
msgid "Image ratio too high (image too wide)."
msgstr "Proporzione immagine troppo elevata (immagine eccessivamente larga)."
#: ../vendor/upload/class.upload.php:2191
msgid "Image ratio too low (image too high)."
msgstr "Proporzione immagine troppo bassa (immagine eccessivamente alta)."
#: ../vendor/upload/class.upload.php:2192
msgid "Image has too many pixels."
msgstr "Immagine con troppi pixel."
#: ../vendor/upload/class.upload.php:2193
msgid "Image has not enough pixels."
msgstr "Immagine con pochi pixel."
#: ../vendor/upload/class.upload.php:2194
msgid "File not uploaded. Can't carry on a process."
msgstr "Il file non é stato caricato. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2195
#, php-format
msgid "%s already exists. Please change the file name."
msgstr "%s già esiste. Modifica il nome del file."
#: ../vendor/upload/class.upload.php:2196
msgid "No correct temp source file. Can't carry on a process."
msgstr "File temporaneo sorgente non valido. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2197
msgid "No correct uploaded source file. Can't carry on a process."
msgstr "Il file sorgente che é stato caricato non è valido. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2198
msgid "Destination directory can't be created. Can't carry on a process."
msgstr "La cartella di destinazione non può essere creata. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2199
msgid "Destination directory doesn't exist. Can't carry on a process."
msgstr "La cartella di destinazione non esiste. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2200
msgid "Destination path is not a directory. Can't carry on a process."
msgstr "Il percorso di destinazione non conduce ad una cartella. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2201
msgid "Destination directory can't be made writeable. Can't carry on a process."
msgstr "La cartella di destinazione non può essere resa scrivibile. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2202
msgid "Destination path is not a writeable. Can't carry on a process."
msgstr "Il percorso di destinazione non é scrivibile. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2203
msgid "Can't create the temporary file. Can't carry on a process."
msgstr "Non é stato possibile creare un file temporaneo. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2204
msgid "Source file is not readable. Can't carry on a process."
msgstr "Il file sorgente non é leggibile. Non é possibile proseguire l'operazione."
#: ../vendor/upload/class.upload.php:2205
#, php-format
msgid "No create from %s support."
msgstr "Impossibile creare dal supporto %s."
#: ../vendor/upload/class.upload.php:2206
#, php-format
msgid "Error in creating %s image from source."
msgstr "Errore durante la creazione della immagine %s (via sorgente)."
#: ../vendor/upload/class.upload.php:2207
msgid "Can't read image source. Not an image?."
msgstr "Impossibile la lettura del sorgente immagine. Forse, non é una immagine!"
#: ../vendor/upload/class.upload.php:2208
msgid "GD doesn't seem to be present."
msgstr "Pare che la libreria GD non sia presente."
#: ../vendor/upload/class.upload.php:2209
#, php-format
msgid "No create from %s support, can't read watermark."
msgstr "Nessuna creazione dal supporto %s. Impossibile leggere la filigrana."
#: ../vendor/upload/class.upload.php:2210
#, php-format
msgid "No %s read support, can't create watermark."
msgstr "Nessun supporto di lettura %s. Impossibile creare la filigrana."
#: ../vendor/upload/class.upload.php:2211
msgid "Unknown image format, can't read watermark."
msgstr "Formato immagine sconosciuto. Impossibile leggere la filigrana."
#: ../vendor/upload/class.upload.php:2212
#, php-format
msgid "No %s create support."
msgstr "Nessuna creazione dal supporto %s."
#: ../vendor/upload/class.upload.php:2213
msgid "No conversion type defined."
msgstr "Non é stato definito alcun tipo di conversione."
#: ../vendor/upload/class.upload.php:2214
msgid "Error copying file on the server. copy() failed."
msgstr "Errore durante la copia del file sul server. copy() failed."
#: ../vendor/upload/class.upload.php:2215
msgid "Error reading the file."
msgstr "Errore nella lettura del file."
#~ msgid "The active plugin %s is not compatible with your PHP version."
#~ msgstr "Il plugin attivo %s non é compatibile con la tua versione PHP."
#~ msgid "%s is required for this plugin."
#~ msgstr "%s necessario per questo plugin."
#~ msgid "A widget to move posts to the sidebar."
#~ msgstr "Un widget per poter spostare gli articoli nella barra laterale."
#~ msgid "Category not selected."
#~ msgstr "La categoria non é stata selezionata."
#~ msgid "Read more &raquo;"
#~ msgstr "Prosegui la lettura &raquo;"
#~ msgid "No Comments"
#~ msgstr "Nessun commento"
#~ msgid "1 Comment"
#~ msgstr "1 Commento"
#~ msgid "% Comments"
#~ msgstr "% Commenti"
#~ msgid "Comments closed"
#~ msgstr "I commenti sono stati disattivati"
#~ msgid "Archive for"
#~ msgstr "Archivo per"
#~ msgid "Title:"
#~ msgstr "Titolo:"
#~ msgid "Category:"
#~ msgstr "Categoria:"
#~ msgid "-- PRIVATE POSTS --"
#~ msgstr "-- ARTICOLI PRIVATI --"
#~ msgid "Number of posts:"
#~ msgstr "Numero di articoli:"
#~ msgid "(At most %d)"
#~ msgstr "(massimo %d)"
#~ msgid "Show:"
#~ msgstr "Mostra:"
#~ msgid "Full Post"
#~ msgstr "Articolo completo"
#~ msgid "Post Excerpt"
#~ msgstr "Riassunto dell'articolo"
#~ msgid "Excerpts with thumbnails"
#~ msgstr "Riassunti con miniatura"
#~ msgid "Photo Blog"
#~ msgstr "Photo Blog"
#~ msgid "Only Post Title"
#~ msgstr "Solo il titolo del post"
#~ msgid "Show category on all feeds"
#~ msgstr "Mostra la categoria in tutti i feed"
#~ msgid "Image width:"
#~ msgstr "Larghezza immagine:"
#~ msgid "pixels"
#~ msgstr "pixel"
#~ msgid "Align thumbnail to right"
#~ msgstr "Allinea la miniatura a destra"
#~ msgid "Read full post &raquo;"
#~ msgstr "Leggi l'articolo completo &raquo;"
#~ msgid "No posts found"
#~ msgstr "Non é stato trovato alcun articolo"
#~ msgid "Incompatible System"
#~ msgstr "Sistema incompatibile"
#~ msgid "Read More..."
#~ msgstr "Continua..."
#~ msgid "DailyTube Plugin Settings"
#~ msgstr "Configuración de DailyTube"
#~ msgid ""
#~ "DailyTube plugin has been updated. Please, check your plugin settings."
#~ msgstr ""
#~ "La extensión DailyTube ha sido actualizada. Por favor, revisa la "
#~ "configuración de esta extensión."
#~ msgid ""
#~ "CAUTION: You updated from a version prior to 1.0. For this reason your "
#~ "settings have been reverted to defaults."
#~ msgstr ""
#~ "ATENCION: Has actualizado desde una versión anterior a 1.0. Por este "
#~ "motivo, las opciones se han revertido a valores por defecto."
#~ msgid "DailyTube Settings"
#~ msgstr "Configuración DailyTube"
#~ msgid "<strong>Note:</strong> All sizes must be entered as Width x Height"
#~ msgstr "<strong>Nota:</strong> Todos los tamaños son Ancho x Alto"
#~ msgid "Content tag:"
#~ msgstr "Etiqueta de contenido:"
#~ msgid "Video Size:"
#~ msgstr "Tamaño de vídeo:"
#~ msgid "Show Related Videos?"
#~ msgstr "¿Mostrar vídeos relacionados?"
#~ msgid "Player Color:"
#~ msgstr "Color del reproductor:"
#~ msgid "Show Border?"
#~ msgstr "¿Mostrar marco?"
#~ msgid "Enhanced Genie Menu?"
#~ msgstr "¿Utilizar menú \"Genie\"?"
#~ msgid "Wide format tag:"
#~ msgstr "Marcador formato panorámico:"
#~ msgid "Square format tag:"
#~ msgstr "Marcador de formato cuadrado:"
#~ msgid "Wide Video Size"
#~ msgstr "Tamaño de vídeo panorámico"
#~ msgid "Square Video Size"
#~ msgstr "Tamaño de vídeo cuadrado"
#~ msgid "Allow FullScreen?"
#~ msgstr "¿Permitir pantalla completa?"
#~ msgid "Global Settings"
#~ msgstr "Opciones Generales"
#~ msgid "Video Align:"
#~ msgstr "Alineación del vídeo:"
#~ msgid "None"
#~ msgstr "Ninguna"
#~ msgid "Left"
#~ msgstr "Izquierda"
#~ msgid "Center"
#~ msgstr "Centro"
#~ msgid "Right"
#~ msgstr "Derecha"
#~ msgid "Save Changes"
#~ msgstr "Guardar Cambios"
#~ msgid "YouTube & Google Video Size"
#~ msgstr "Tamaño de vídeo YouTube y Google"
#~ msgid "or"
#~ msgstr "o"

View File

@ -0,0 +1,198 @@
<?php
/**
* Functions related to the file system and system settings.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Creates a subdirectory within the WordPress uploads folder.
*
* @uses apply_filters() Calls the 'ak_upload_dir' on the upload folder directory.
* @param string $name New subdirectory name.
* @return void
*/
function ak_create_upload_folder( $name )
{
if ( ! defined('AK_UPLOAD_DIR') ) {
$uploads = wp_upload_dir();
define ( 'AK_UPLOAD_DIR', $upload['basedir'] .'/alkivia' );
}
$folder = apply_filters('ak_upload_dir', AK_UPLOAD_DIR . '/' . $name);
wp_mkdir_p($folder);
}
/**
* Returns the system max filesize for uploads.
* This depends on the directives upload_max_filesize, post_max_size and memory_limit. The lowest of them is the limit.
*
* @return int Max system filesize upload (in bytes).
*/
function ak_max_upload()
{
$file = ak_return_bytes(ini_get('upload_max_filesize'));
$post = ak_return_bytes(ini_get('post_max_size'));
$mem = ak_return_bytes(ini_get('memory_limit'));
return min($file, $post, $mem);
}
/**
* Converts a PHP config value to bytes.
*
* @param $string PHP config value, as readed with ini_get()
* @return int Value in bytes.
*/
function ak_return_bytes( $value )
{
$val = trim($value);
$unit = strtoupper($val[strlen($val)-1]);
switch ( $unit ) {
case 'G': // GigaBytes
$val *= 1024;
case 'M': // MegaBytes
$val *= 1024;
case 'K': // KiloBytes
$val *= 1024;
}
return $val;
}
/**
* Formats a value in bytes to the bigger unit. (Gb, Mb, Kb).
*
* @param int $value Value to convert.
* @return string Formated value.
*/
function ak_return_units( $value, $max = 'G' )
{
$max = strtoupper($max);
$unit = 'bytes';
if ( $value >= 1024 ) {
$value /= 1024;
$unit = 'Kb';
}
if ( $value >= 1024 && ( 'M' == $max || 'G' == $max ) ){
$value /= 1024;
$unit = 'Mb';
}
if ( $value >= 1024 && ( 'G' == $max) ) {
$value /= 1024;
$unit = 'Gb';
}
$val = intval($value) . ' ' . $unit;
return $val;
}
/**
* Creates and returns an ordered list for files in a given directori.
* The function recurses into all directory tree.
*
* @param string $directory Directory where search for files. Absolute path.
* @param array $args Options array to select wich files to return. Options:
* - tree: recurses into subdirectories. 0 = No, 1 (default) = Yes
* - extensions: array or comma delimited list of wanted extensions (default all extensions).
* - with_ext: Return filename with extension. 0 = No, 1 (default) = Yes
* - prefix: A filename prefix for returned files (default = No prefix).
* @param boolean $withexst We want returned filenames with extension. Defaults true.
* @return array List of files found.
*/
function ak_dir_content($directory, $args='')
{
$directory = realpath($directory); // Be sure the directory path is well formed.
if ( ! is_dir($directory) ) { // Check if it is a directory.
return array(); // If not, return an ampty array.
}
$defaults = array(
'tree' => 1, // recurses into subdirectories (0 = No, 1 = Yes)
'extensions' => '', // array or comma delimited list of wanted extensions
'with_ext' => 1, // Return filename with extension (0 = No, 1 = Yes)
'prefix' => ''); // If we only want files with a custom prefix set the prefix option.
$options = wp_parse_args($args, $defaults);
extract($options, EXTR_SKIP);
if ( ! empty($extensions) && ! is_array($extensions) ) {
$extensions = explode(',', $extensions);
}
$dir_tree = array(); // Directory could be empty.
$d = dir($directory);
while ( false !== ( $filename = $d->read() ) ) {
if ( $prefix != substr($filename, 0, strlen($prefix)) || '.' == substr($filename, 0, 1) ) {
continue;
}
if ( is_dir($directory . DIRECTORY_SEPARATOR . $filename) && $tree ) {
$dir_tree[$filename] = ak_dir_content($directory . DIRECTORY_SEPARATOR . $filename, $options);
} else {
$fileinfo = pathinfo($directory . DIRECTORY_SEPARATOR . $filename);
if ( empty($extensions) || in_array($fileinfo['extension'], $extensions) ) {
if ( ! $with_ext ) {
$filename = substr($filename, 0, (strlen($fileinfo['extension']) + 1) * -1);
}
$dir_tree[] = $filename;
}
}
}
$d->close();
asort($dir_tree);
return $dir_tree;
}
/**
* Returns a list of templates found in an array of directories
*
* @param array|string $folders Array of folders to search in.
* @param string $prefix Templates prefix filter.
* @return array Found templates (all found php files).
*/
function ak_get_templates( $folders, $prefix = '' )
{
// Compatibility with a bug in Sideposts 3.0 and 3.0.1
if ( strpos($prefix, '&') ) $prefix = '';
$list = array();
foreach ( (array) $folders as $folder ) {
$found = ak_dir_content($folder, "tree=0&extensions=php&with_ext=0&prefix={$prefix}");
$list = array_merge($found, $list);
}
$start = strlen($prefix);
foreach ( $list as $item ) {
$name = substr($item, $start);
$templates[$name] = ucfirst(str_replace('_', ' ', $name));
}
return $templates;
}

View File

@ -0,0 +1,179 @@
<?php
/**
* General formating functions.
* Used to format output data and send messages to user.
*
* @version $Rev: 199485 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Converts vars with values equivalent to zero (0) to an empty string.
* This is useful as an output filter, when we need and empty textbox.
*
* @param mixed $var Input value to convert.
* @return string Empty string if value is equivalent to zero.
*/
function ak_zero_clean( $var )
{
return ( 0 == intval($var) ) ? '' : $var;
}
/**
* Displays admin notices.
*
* @param $message Message to display.
* @return void
*/
function ak_admin_notify( $message = '' )
{
if ( is_admin() ) {
if ( empty($message) ) {
$message = __('Settings saved.', 'akfw');
}
echo '<div id="message" class="updated fade"><p><strong>' . $message . '</strong></p></div>';
}
}
/**
* Displays admin ERRORS.
*
* @param $message Message to display.
* @return void
*/
function ak_admin_error( $message )
{
if ( is_admin() ) {
echo '<div id="error" class="error"><p><strong>' . $message . '</strong></p></div>';
}
}
/**
* Displays dashboard notices by setting the 'admin_notices' action hook.
* This is used for global warnings that have to show in all dashboard pages.
*
* @uses akAdminNotice
* @param $message Message to display.
* @return void
*/
function ak_dashboard_notice( $message )
{
if ( is_admin() ) {
require_once ( AK_CLASSES . '/admin-notices.php' );
new akAdminNotice($message);
}
}
/**
* Generic pager.
*
* @param int $total Total elements to paginate.
* @param int $per_page Number of elements per page.
* @param $current Current page number.
* @param $url Base url for links. Only page numbers are appended.
* @return string Formated pager.
*/
function ak_pager( $total, $per_page, $url, $current = 0 )
{
if ( 0 == $current ) $current = 1;
$pages = $total / $per_page;
$pages = ( $pages == intval($pages) ) ? intval($pages) : intval($pages) + 1;
if ( $pages == 1 ) {
$out = '';
} else {
$out = "<div class='pager'>\n";
if ( $current != 1 ) {
$start = $current - 1;
$out .= '<a class="prev page-numbers" href="'. $url . $start .'">&laquo;&laquo;</a>' . "\n";
}
for ( $i = 1; $i <= $pages; $i++ ) {
if ( $i == $current ) {
$out .= '<span class="page-numbers current">'. $i ."</span>\n";
} else {
$out .= '<a class="page-numbers" href="'. $url . $i .'">'. $i ."</a>\n";
}
}
if ( $current != $pages ) {
$start = $current + 1;
$out .= '<a class="next page-numbers" href="'. $url . $start .'">&raquo;&raquo;</a>' . "\n";
}
$out .= "</div>\n";
}
return $out;
}
/**
* Creates an string telling how many time ago
*
* @param $datetime Date Time in mySql Format.
* @return string The time from the date to now, just looks to yesterday.
*/
function ak_time_ago( $datetime )
{
$before = strtotime($datetime);
$is_today = ( date('Y-m-d') == substr($datetime, 0, 10) );
$now = time();
$times = array (
'd' => 43200, // 12 hours
'h' => 3600, // 1 hour
'm' => 60, // 1 minute
's' => 1 // 1 second
);
$diff = $now - $before;
foreach ( $times as $unit => $seconds ) {
if ( $diff >= $seconds ) {
$value = intval($diff / $seconds);
break;
}
}
$format = get_option('date_format') . ' | ' . get_option('time_format'); // Date-Time format
switch ( $unit ) {
case 's':
$ago = __('Just Now', 'akfw');
break;
case 'm':
$ago = sprintf(_n('1 minute ago', '%d minutes ago', $value, 'akfw'), $value);
break;
case 'h' :
$ago = sprintf(_n('1 hour ago', '%d hours ago', $value, 'akfw'), $value);
break;
case 'd' :
if ( 1 == $value ) {
$literal = ( $is_today ) ? __('Today at %s', 'akfw') : __('Yesterday at %s', 'akfw');
$ago = sprintf($literal, date('H:i', $before));
} else {
$ago = mysql2date($format, $datetime);
}
break;
}
return $ago;
}

View File

@ -0,0 +1,207 @@
<?php
/**
* Modules related functions.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Parse the plugin readme.txt file to retrieve plugin's metadata.
*
* The metadata of the plugin's readme searches for the following in the readme.txt
* header. All metadata must be on its own line. The below is formatted for printing.
*
* <code>
* Contributors: contributors nicknames, comma delimited
* Donate link: Link to plugin donate page
* Tags: Plugin tags, comma delimited
* Requires at least: Minimum WordPress version required
* Tested up to: Higher WordPress version the plugin has been tested.
* Stable tag: Latest stable tag in repository.
* </code>
*
* Readme data returned array cointains the following:
* - 'Contributors' - An array with all contributors nicknames.
* - 'Tags' - An array with all plugin tags.
* - 'DonateURI' - The donations page address.
* - 'HelpURI' - Link to the forum page.
* - 'DocsURI' - Link to module documentation.
* - 'Required' - Minimum required WordPress version.
* - 'Tested' - Higher WordPress version this plugin has been tested.
* - 'Stable' - Last stable tag when this was released.
*
* The first 8kiB of the file will be pulled in and if the readme data is not
* within that first 8kiB, then the plugin author should correct their plugin
* and move the plugin data headers to the top.
*
* The readme file is assumed to have permissions to allow for scripts to read
* the file. This is not checked however and the file is only opened for
* reading.
*
* @param string $mod_file Path to the plugin file (not the readme file)
* @return array See above for description.
*/
function ak_module_readme_data( $mod_file )
{
$file = dirname($mod_file) . '/readme.txt';
if ( is_readable($file) ) {
$fp = fopen($file, 'r'); // Open just for reading.
$data = fread( $fp, 8192 ); // Pull the first 8kiB of the file in.
fclose($fp); // Close the file.
preg_match( '|Contributors:(.*)$|mi', $data, $contributors );
preg_match( '|Donate link:(.*)$|mi', $data, $uri );
preg_match( '|Help link:(.*)$|mi', $data, $help ); // Not WP Standard
preg_match( '|Docs link:(.*)$|mi', $data, $docs ); // Not WP Standard
preg_match( '|Tags:(.*)|mi', $data, $tags );
preg_match( '|Requires at least:(.*)$|mi', $data, $required );
preg_match( '|Tested up to:(.*)$|mi', $data, $tested );
preg_match( '|Stable tag:(.*)$|mi', $data, $stable );
foreach ( array( 'contributors', 'uri', 'help', 'docs', 'tags', 'required', 'tested', 'stable' ) as $field ) {
if ( !empty( ${$field} ) ) {
${$field} = trim(${$field}[1]);
} else {
${$field} = '';
}
}
$readme_data = array(
'Contributors' => array_map('trim', explode(',', $contributors)),
'Tags' => array_map('trim', explode(',', $tags)),
'DonateURI' => trim($uri),
'HelpURI' => $help,
'DocsURI' => $docs,
'Requires' => trim($required),
'Tested' => trim($tested),
'Stable' => trim($stable) );
} else {
$readme_data = array();
}
return $readme_data;
}
/**
* Reads a component file header, and returns component data.
* Returned data is:
* - 'File' - The component filename, relative to the plugin folder.
* - 'Component' - The component short name or ID.
* - 'Name' - Descriptive name for the component.
* - 'Description' - A descriptive text about the component.
* - 'Author' - Component author name
* - 'URL' - Author homepage URL.
* - 'Link' - Author anchor to home page.
* - 'Core' - If this is a core compoment or not.
*
* @since 0.7
*
* @param string $file File name to read the header
* @param $is_core If will return data for core components or not.
* @return array Component data, see above.
*/
function ak_component_data ( $file, $is_core = false )
{
$fp = fopen($file, 'r'); // Open just for reading.
$data = fread( $fp, 8192 ); // Pull the first 8kiB of the file in.
fclose($fp); // Close the file.
preg_match( '|Module Component:(.*)$|mi', $data, $component );
if ( empty($component) && $is_core ) {
preg_match( '|Core Component:(.*)$|mi', $data, $component );
$core = 1;
} else {
$core = 0;
}
preg_match( '|Parent ID:(.*)$|mi', $data, $parent );
preg_match( '|Component Name:(.*)$|mi', $data, $name );
preg_match( '|Description:(.*)|mi', $data, $description );
preg_match( '|Version:(.*)|mi', $data, $version );
preg_match( '|Author:(.*)|mi', $data, $author );
preg_match( '|Link:(.*)|mi', $data, $url );
foreach ( array( 'component', 'parent', 'name', 'description', 'version', 'author', 'url' ) as $field ) {
if ( ! empty( ${$field} ) ) {
${$field} = trim(${$field}[1]);
} else {
${$field} = '';
}
}
if ( empty($component) ) {
$data = false;
} else {
$data = array(
'Component' => str_replace(' ', '_', strtolower($component)),
'File' => $file,
'Parent' => $parent,
'Name' => $name,
'Description' => $description,
'Version' => $version,
'Author' => $author,
'URL' => $url,
'Link' => "<a href='{$url}' target='_blank'>{$author}</a>",
'Core' => $core);
}
return $data;
}
/**
* Gets information about all optional installed components.
* The function is recursive to find files in all directory levels.
*
* TODO: Path must be provided as AOC_PATH is only for community plugin.
* @since 0.7
*
* @param string $path Absolute path where to search for components.
* @param boolean $core If we want to include the core components or not.
* @param array $files An array with filenames to seach information in. If empty will search on $path.
* @return array Array with all found components information.
*/
function ak_get_installed_components( $path, $core = false, $files = array() )
{
if ( empty($files) ) {
$files = ak_dir_content($path, 'extensions=php');
}
$components = array();
foreach ( $files as $subdir => $file ) {
if ( is_array($file) ) {
$newdir = $path .'/'. $subdir;
$data = ak_get_installed_components( $newdir, $core, $file );
if ( is_array($data) ) {
$components = array_merge($components, $data);
}
} else {
$data = ak_component_data($path . '/' . $file, $core);
if ( is_array($data) ) {
$components[$data['Component']] = $data;
}
}
}
return $components;
}

View File

@ -0,0 +1,110 @@
<?php
/**
* Functions for objects management.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if ( ! isset($GLOBALS['_akv']) )
{
// Create the global $_akv. This holds all objects and settings.
$GLOBALS['_akv'] = array();
}
/**
* Creates and stores an object in the $_akv global.
* Can be called at the same time we create the object: ak_store_object( 'obj_name', new objectName() );
*
* @param string $name Internal object name.
* @param object $object The object reference to store in the global.
* @return object The newly stored object reference.
*/
function & ak_create_object ( $name, $object )
{
$GLOBALS['_akv'][$name] =& $object;
return $object;
}
/**
* Gets an object stored in the $_akv global.
*
* @param string $name Object name.
* @return object|false Returns the requested object reference. If not found, or not an object, returns false.
*/
function & ak_get_object ( $name )
{
if ( is_object($GLOBALS['_akv'][$name]) ) {
return $GLOBALS['_akv'][$name];
} else {
return false;
}
}
/**
* Checks if an object exists in the $_akv global.
*
* @param string $name Object name to check.
* @return boolean If the object exists or not.
*/
function ak_object_exists ( $name )
{
global $_akv;
if ( isset($_akv[$name]) && is_object($_akv[$name]) ) {
return true;
} else {
return false;
}
}
/**
* Returns the 'settings' object reference.
*
* @return object|false Returns the object reference, or false if not found.
*/
function & ak_settings_object ()
{
if ( ak_object_exists('settings') ) {
return ak_get_object('settings');
} else {
return ak_create_object('settings', new akSettings());
}
}
/**
* Returns an object option/setting.
*
* @param string $object Object name to get options from.
* @param string $option Option name to return.
* @param mixed $default Default value if option not found.
* @return mixed The option value.
*/
function ak_get_option ( $object, $option = '', $default = false )
{
if ( is_object($GLOBALS['_akv'][$object]) && method_exists($GLOBALS['_akv'][$object], 'getOption') ) {
return $GLOBALS['_akv'][$object]->getOption($option, $default);
} else {
return $default;
}
}

View File

@ -0,0 +1,33 @@
<?php
/**
* Plugins related functions.
* This file is deprecated and has been replaced by modules.php.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
* @deprecated since 0.5
* @see modules.php
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once ( 'AK_LIB' . '/modules.php' );

View File

@ -0,0 +1,36 @@
<?php
/**
* Functions related to WordPress system.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Checks is we are running on WordPress MU
* @return boolean
*/
function ak_is_mu()
{
return ( defined('VHOST') ) ? true : false;
}

View File

@ -0,0 +1,231 @@
<?php
/**
* Functions library for theme management.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Creates and stores an object in the $_akv global.
* Can be called at the same time we create the object: ak_store_object( 'obj_name', new objectName() );
*
* @param string $name Internal object name.
* @param object $object The object reference to store in the global.
* @return object The newly stored object reference.
*/
function & ak_create_theme ( $theme )
{
$GLOBALS['_akv']['theme'] =& $theme;
return $theme;
}
/**
* Gets and returns the theme object.
* @return akThemeAbstract
*/
function & ak_theme ()
{
return ak_get_object('theme');
}
/**
* Returns a theme option/setting.
*
* @param string $option Option name to return.
* @param mixed $default Default value if option not found.
* @return mixed The option value.
*/
function ak_theme_option ( $option = '', $default = false )
{
return ak_get_option ( 'theme', $option, $default );
}
/**
* Returns parent theme data from style.css file.
*
* @param string $name Data name to return.
* @return mixed Data value.
*/
function ak_theme_data ( $name = '' )
{
if ( is_object($GLOBALS['_akv']['theme']) && method_exists($GLOBALS['_akv']['theme'], 'getModData') ) {
return $GLOBALS['_akv']['theme']->getModData($name);
} else {
return false;
}
}
/**
* Returns child theme data from style.css file.
*
* @param string $name Data name to return.
* @return mixed Data value.
*/
function ak_child_theme_data ( $name = '' )
{
if ( is_object($GLOBALS['_akv']['theme']) && method_exists($GLOBALS['_akv']['theme'], 'getChildData') ) {
return $GLOBALS['_akv']['theme']->getChildData($name);
} else {
return false;
}
}
/**
* Redirects user to a new page.
* This is done if the custom field 'redirect' is defined as:
* + Filed Name: redirect
* + Field Value: New target URL.
*
* @return void
*/
function ak_theme_redirect()
{
global $post;
if ( is_page() || is_single() ) {
if ( $meta = get_post_meta($post->ID, 'redirect', true) ) {
wp_redirect($meta, 301);
exit;
}
}
}
/**
* Checks if the sidebar is used.
* Do it by checking if there is any widget on a sidebar number.
*
* @param int|string $index Sidebar number or id
* @return boolean True if this sidebar is used and contains any widget, false if not.
*/
function ak_theme_is_sidebar( $index )
{
$sidebar = wp_get_sidebars_widgets();
if ( is_numeric($index) ) {
$index = 'sidebar-' . $index;
}
if (isset($sidebar[$index]) && count($sidebar[$index]) ) {
return true;
} else {
return false;
}
}
/**
* Authoring widget for admin pages.
* You can add a readme.txt file for themes to add aditional links not found on style.css
* Additional strings searched at readme.txt are: 'Help link:' and 'Docs link'.
* All others follow plugins readme.txt guidelines.
*
* @since 0.5
*
* @param string $mod_id Module ID
* @return void
*/
function ak_admin_authoring ( $mod_id )
{
$mod = ak_get_object($mod_id);
if ( ! $mod ) {
return;
}
$data = $mod->getModData();
$class = ( $mod->isComponent() ) ? $mod->PID : $mod_id;
?>
<dl>
<dt><?php echo $data['Name']; ?></dt>
<dd>
<ul>
<?php if ( ! empty($data['PluginURI']) ) : ?>
<li><a href="<?php echo $data['PluginURI']; ?>" class="<?php echo $class; ?>" target="_blank"><?php _e('Plugin Homepage', 'akfw'); ?></a></li>
<?php endif; ?>
<?php if ( ! empty($data['URI']) ) : ?>
<li><a href="<?php echo $data['URI']; ?>" class="theme" target="_blank"><?php _e('Theme Homepage', 'akfw'); ?></a></li>
<?php endif; ?>
<?php if ( ! empty($data['DocsURI']) ) : ?>
<li><a href="<?php echo $data['DocsURI']; ?>" class="docs" target="_blank"><?php _e('Documentation', 'akfw'); ?></a></li>
<?php endif; ?>
<?php if ( ! empty($data['HelpURI']) ) : ?>
<li><a href="<?php echo $data['HelpURI']; ?>" class="help" target="_blank"><?php _e('Support Forum', 'akfw'); ?></a></li>
<?php endif; ?>
<?php if ( ! empty($data['AuthorURI']) ) : ?>
<li><a href="<?php echo $data['AuthorURI']; ?>" class="home" target="_blank"><?php _e('Author Homepage', 'akfw')?></a></li>
<?php endif; ?>
<?php if ( ! empty($data['DonateURI']) ) : ?>
<li><a href="<?php echo $data['DonateURI']; ?>" class="donate" target="_blank"><?php _e('Donate to project', 'akfw')?></a></li>
<?php endif; ?>
</ul>
</dd>
</dl>
<?php
}
/**
* Copyright, authoring and versions for admin pages footer.
*
* @since 0.5
*
* @param string $mod_id Module ID
* @param int $year First copyrigh year.
* @return void
*/
function ak_admin_footer ( $mod_id, $year = 2009 )
{
$mod = ak_get_object($mod_id);
if ( ! $mod ) {
return;
}
$data = $mod->getModData();
if ( $mod->isPlugin() || $mod->isComponent() ) {
echo '<p class="footer"><a href="' . $mod->getModData('PluginURI') . '">' . $mod->getModData('Name') . ' ' . $mod->getModData('Version') .
'</a> &nbsp; &copy; Copyright ';
if ( 2010 != $year ) {
echo $year . '-';
}
echo date('Y') . ' ' . $mod->getModData('Author');
} elseif ( $mod->isTheme() ) {
echo '<p class="footer"><a href="' . $mod->getModData('URI') . '">' . $mod->getModData('Name') . ' ' . $mod->getModData('Version') .
'</a> &nbsp; &copy; Copyright ';
if ( 2010 != $year ) {
echo $year . '-';
}
echo date('Y') . ' ';
echo $mod->getModData('Author');
}
echo '<br />Framework Version: ' . get_option('ak_framework_version');
if ( $mod->isChildTheme() ) {
echo ' - Child theme: ' . $mod->getChildData('Name') . ' ' . $mod->getChildData('Version');
}
if ( $mod->isComponent() ) {
echo ' - Component: ' . $mod->getChildData('Name') . ' ' . $mod->getChildData('Version');
}
echo '</p>';
}

View File

@ -0,0 +1,142 @@
<?php
/**
* Users, Roles and Capabilities related functions.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Gets current user ID.
*
* @return int Current user ID or 0 if not logged in.
*/
function ak_current_user_id ()
{
$user = wp_get_current_user();
return $user->id;
}
/**
* Returns all valid roles.
* The returned list can be translated or not.
*
* @uses apply_filters() Calls the 'alkivia_roles_translate' hook on translated roles array.
* @since 0.5
*
* @param boolean $translate If the returned roles have to be translated or not.
* @return array All defined roles. If translated, the key is the role name and value is the translated role.
*/
function ak_get_roles( $translate = false ) {
global $wp_roles;
if ( ! isset( $wp_roles ) ) {
$wp_roles = new WP_Roles();
}
$roles = $wp_roles->get_names();
if ( $translate ) {
foreach ($roles as $k => $r) {
$roles[$k] = _x($r, 'User role');
}
asort($roles);
return apply_filters('alkivia_roles_translate', $roles);
} else {
$roles = array_keys($roles);
asort($roles);
return $roles;
}
}
/**
* Return the user role. Taken from WordPress roles and Capabilities.
*
* @since 0.5
*
* @param int|object $user_ID User ID or the user object to find the role.
* @return string User role in this blog (key, not translated).
*/
function ak_get_user_role( $user ) {
global $wpdb, $wp_roles;
if ( ! isset( $wp_roles ) ) {
$wp_roles = new WP_Roles();
}
$caps_name = $wpdb->prefix . 'capabilities';
if ( ! is_object($user) ) {
$user = get_userdata($user);
}
$roles = array_filter( array_keys( (array) $user->$caps_name ), array( &$wp_roles, 'is_role' ) );
return array_pop($roles);
}
/**
* Generates the caps names from user level.
*
* @since 0.5
*
* @param int $level Level to convert to caps
* @return array Generated caps
*/
function ak_level2caps( $level ) {
$caps = array();
$level = min(10, intval($level));
for ( $i = $level; $i >= 0; $i--) {
$caps["level_{$i}"] = "Level {$i}";
}
return $caps;
}
/**
* Finds the proper level from a capabilities list.
*
* @since 0.5
*
* @uses _ak_level_reduce()
* @param array $caps List of capabilities.
* @return int Level found, if no level found, will return 0.
*/
function ak_caps2level( $caps ) {
$level = array_reduce( array_keys( $caps ), '_ak_caps2level_CB', 0);
return $level;
}
/**
* Callback function to find the level from caps.
* Taken from WordPress 2.7.1
*
* @since 0.5
* @access private
*
* @return int level Level found.
*/
function _ak_caps2level_CB( $max, $item ) {
if ( preg_match( '/^level_(10|[0-9])$/i', $item, $matches ) ) {
$level = intval( $matches[1] );
return max( $max, $level );
} else {
return $max;
}
}

View File

@ -0,0 +1,280 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,71 @@
<?php
/**
* Framework Loader.
* This file MUST always be included at startup when using the framework.
*
* @version $Rev: 203758 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// TODO: Bybapass framework loading if already loaded.
// TODO: Load Framework at plugins_loaded or init to allow filters on plugins?
// If loaded on plufins_loaded will not load for themes.
$akf_version = '0.8';
if ( file_exists(WP_CONTENT_DIR . '/alkivia.php') ) {
/** Loads alkivia.php to override some default constants */
include_once( WP_CONTENT_DIR . '/alkivia.php');
}
// Check version for installs and updates.
$akf_current = get_option('ak_framework_version');
$akf_path = dirname(__FILE__);
if ( false === $akf_current ) {
// Install the framework. Save version and path.
add_option('ak_framework_version', $akf_version);
add_option('ak_framework_path', $akf_path);
} elseif ( version_compare($akf_version, $akf_current, '>') ) {
// Update framework if newer. Save version and path.
update_option('ak_framework_version', $akf_version);
update_option('ak_framework_path', $akf_path);
} else {
// Using installed version.
$akf_db_path = get_option('ak_framework_path');
if ( false !== $akf_db_path && is_dir($akf_db_path) ) {
// Only use current if still present. Could be from an uninstalled plugin.
$akf_path = $akf_db_path;
} else {
// If installed version not present, use current.
update_option('ak_framework_version', $akf_version);
update_option('ak_framework_path', $akf_path);
}
}
if ( ! defined('AK_FRAMEWORK') ) {
// Define the framework path.
define ('AK_FRAMEWORK', $akf_path );
}
include_once( AK_FRAMEWORK . '/init.php');

View File

@ -0,0 +1,33 @@
; $Id: alkivia.ini 203758 2010-02-10 19:01:07Z Txanny $
; If you set this file on your wp-content directory, it will override the module
; options, force to use this ones and disable them from the admin page.
; All alkivia plugins and themes share the same file. If you already have an
; alkivia.ini file in your wp-content directory, you can copy and paste this
; settings on it.
; The ini file is mostly used on WordPress MU, when we want to force all blogs to
; this settings and don't want to allow the blog administrators to change them.
; This settings are available to any theme or plugin that uses the framework,
; just have to write this settings on the plugin or theme section.
;
; More information at http://wiki.alkivia.org/framework/ini-file
;
[for_all]
; disable-admin-page = Off
[for_plugins]
; disable-module-styles = Off
; style-url = "http://example.com/styles/style.css"
; disable-components-activation = Off
[for_themes]
; disable-favicon = Off
; favicon-url = "http://sample.com/images/favicon.ico"
; enable-self-ping = Off

View File

@ -0,0 +1,42 @@
<?php
/**
* Alkivia paths.
* You can locate this file on your wp-content directopry if you want to
* override the framework location or if you want to point to custom
* 'alkivia.ini' location.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2008, 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2008, 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** Override the absolute path to Alkivia Framework
* If you move the framework outside the wp_content folder,
* You will have to define AK_STYLES_URL and set the styles folder
* in a server public place.
*
* @link http://wiki.alkivia.org/framework/config-file
*/
// define ('AK_FRAMEWORK', '/home/my_user/my_root/wp_content/plugins/my_plugin/framework'
/** Overrides the default 'alkivia.ini' location. */
// define ( 'AK_INI_FILE', dirname(__FILE__) . '/alkivia.ini');

View File

@ -0,0 +1,4 @@
# Prevent running or accessing any file directly.
Order Deny,Allow
Allow from all

View File

@ -0,0 +1,169 @@
/**
* Alkivia Framework.
* Styles for admin dashboard.
* Based on the styles for Maintenance Mode plugin by Michael Wöhrer
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage Framework
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* =========================================================== SETTINGS */
table#akmin {
width: 100%;
border: 0 none;
padding: 0;
margin:0;
}
table#akmin fieldset {
border: 0 none;
padding: 0;
margin:0;
}
table#akmin td {
vertical-align: top;
}
table#akmin td dl {
padding: 0;
margin: 10px 0 20px 0;
background-color: white;
border: 1px solid #dfdfdf;
}
table#akmin td dl {
-moz-border-radius: 5px;
-khtml-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
table#akmin dl dt {
font-size: 13px;
font-weight: bold;
margin: 0;
padding: 4px 10px 4px 10px;
background: #dfdfdf url('images/dl-bg-gray.png') repeat-x left top;
}
table#akmin p {
padding: 5px 0 5px 0;
margin: 0;
}
table#akmin .footer {
text-align: center;
font-size: 10.5px;
}
table#akmin .footer a {
font-size: 10.5px;
text-decoration: none;
}
table#akmin .footer a:hover {
text-decoration: underline;
}
table#akmin td small {
font-size: 10.5px;
}
table#akmin hr {
border: none 0;
border-top: 1px solid #bbbbbb;
height: 1px;
}
table#akmin ul {
list-style: none;
}
table#akmin ul.bullet {
list-style-type: disc;
padding-left: 20px;
}
/* ====================================================== ADMIN CONTENT */
table#akmin td.content {
padding: 0 8px 0 0;
}
table#akmin td.content dd {
margin: 0;
padding: 10px 20px 10px 20px;
}
/* ====================================================== ADMIN SIDEBAR */
table#akmin td.sidebar {
width: 200px;
padding: 0 0 0 8px;
}
table#akmin td.sidebar ul, table#akmin td.sidebar ul li {
list-style: none;
padding: 0;
margin: 0;
}
table#akmin td.sidebar a {
text-decoration: none;
background-position: 0px 60%;
background-repeat: no-repeat;
padding: 4px 0px 4px 22px;
border: 0 none;
display: block;
}
table#akmin td.sidebar ul li {
margin: 0;
border-bottom: 1px dotted gray;
}
table#akmin td.sidebar dd {
margin: 0;
padding: 5px 10px 5px 10px;
}
/* ====================================================== SIDEBAR ICONS */
td.sidebar a.docs {
background-image: url('images/docs.png');
}
td.sidebar a.help {
background-image: url('images/help.png');
}
td.sidebar a.home {
background-image: url('images/alkivia.png');
}
td.sidebar a.donate {
background-image: url('images/paypal.png');
}
/* EOF */

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,169 @@
<?php
/**
* General Admin for Capability Manager.
* Provides admin pages to create and manage roles and capabilities.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage CapsMan
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
$roles = $this->roles;
$default = $this->current;
?>
<div class="wrap">
<div id="icon-capsman-admin" class="icon32"></div>
<h2><?php _e('Roles and Capabilities', $this->ID) ?></h2>
<form method="post" action="admin.php?page=<?php echo $this->ID ?>">
<?php wp_nonce_field('capsman-general-manager'); ?>
<fieldset>
<table id="akmin">
<tr>
<td class="content">
<dl>
<dt><?php printf(__('Capabilities for %s', $this->ID), $roles[$default]); ?></dt>
<dd>
<table width='100%' class="form-table">
<tr>
<?php
$i = 0; $first_row = true;
$current = get_role($default);
$rcaps = $current->capabilities;
foreach ( $this->capabilities as $key => $cap ) :
// Levels are not shown.
if ( preg_match( '/^level_(10|[0-9])$/i', $key ) ) {
continue;
}
if ( $i == $this->getOption('form-rows') ) {
echo '</tr><tr>';
$i = 0; $first_row = false;
}
$style = ( isset($rcaps[$key]) && $rcaps[$key] ) ? 'color:green;font-weight:bold;' : 'color:red;';
$disable = '';
if ( 'manage_capabilities' == $key ) {
if ( ! current_user_can('administrator') ) {
continue;
} elseif ( 'administrator' == $default ) {
$disable = 'disabled="disabled"';
}
}
?>
<td style="<?php echo $style; ?>"><label for="caps[<?php echo $key; ?>]"><input id=caps[<?php echo $key; ?>] type="checkbox" name="caps[<?php echo $key; ?>]" value="1" <?php checked(1, $rcaps[$key]); echo $disable;?> />
<?php echo $cap;
if ( ! empty($disable) ) {
echo '<input type="hidden" name="caps[manage_capabilities]" value="1" />';
}
?></label></td>
<?php
$i++;
endforeach;
if ( $i == $this->getOption('form-rows') ) {
echo '</tr><tr>';
$i = 0;
}
$level = ak_caps2level($rcaps);
?>
<td><?php _e('Level:', $this->ID) ;?><select name="level">
<?php for ( $l = $this->max_level; $l >= 0; $l-- ) {?>
<option value="<?php echo $l; ?>" style="text-align:right;"<?php selected($level, $l); ?>>&nbsp;<?php echo $l; ?>&nbsp;</option>
<?php }
++$i;
if ( ! $first_row ) {
// Now close a wellformed table
for ( $i; $i < $this->settings['form-rows']; $i++ ){
echo '<td>&nbsp;</td>';
}
}
?>
</select>
</tr>
</table>
</dd>
</dl>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input type="hidden" name="current" value="<?php echo $default; ?>" />
<input type="submit" name="Save" value="<?php _e('Save Changes', $this->ID) ?>" class="button-primary" /> &nbsp;
<?php if ( current_user_can('administrator') && 'administrator' != $default ) : ?>
<a class="ak-delete" title="<?php echo attribute_escape(__('Delete this role', $this->ID)) ?>" href="<?php echo wp_nonce_url("admin.php?page={$this->ID}&amp;action=delete&amp;role={$default}", 'delete-role_' . $default); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf(__("You are about to delete the %s role.\n 'Cancel' to stop, 'OK' to delete.", $this->ID), $roles[$default])); ?>') ) { return true;}return false;"><?php _e('Delete Role', $this->ID)?></a>
<?php endif; ?>
</p>
<?php ak_admin_footer($this->ID, 2009); ?>
</td>
<td class="sidebar">
<?php ak_admin_authoring($this->ID); ?>
<dl>
<dt><?php _e('Select New Role', $this->ID); ?></dt>
<dd style="text-align:center;">
<p><select name="role">
<?php
foreach ( $roles as $role => $name ) {
echo '<option value="' . $role .'"'; selected($default, $role); echo '> ' . $name . ' &nbsp;</option>';
}
?>
</select><br /><input type="submit" name="Change" value="<?php _e('Change', $this->ID) ?>" class="button" /></p>
</dd>
</dl>
<dl>
<dt><?php _e('Create New Role', $this->ID); ?></dt>
<dd style="text-align:center;">
<p><input type="text" name="create-name"" class="regular-text" /><br />
<input type="submit" name="Create" value="<?php _e('Create', $this->ID) ?>" class="button" /></p>
</dd>
</dl>
<dl>
<dt><?php _e('Copy this role to', $this->ID); ?></dt>
<dd style="text-align:center;">
<p><input type="text" name="copy-name" class="regular-text" /><br />
<input type="submit" name="Copy" value="<?php _e('Copy', $this->ID) ?>" class="button" /></p>
</dd>
</dl>
<dl>
<dt><?php _e('Add Capability', $this->ID); ?></dt>
<dd style="text-align:center;">
<p><input type="text" name="capability-name" class="regular-text" /><br />
<input type="submit" name="AddCap" value="<?php _e('Add to role', $this->ID) ?>" class="button" /></p>
</dd>
</dl>
</td>
</tr>
</table>
</fieldset>
</form>
</div>

View File

@ -0,0 +1,41 @@
<?php
/**
* Admin Pages Quthoring widget.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage CapsMan
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<dl>
<dt>Capability Manager</dt>
<dd>
<ul>
<li><a href="http://alkivia.org/wordpress/capsman" class="capsman" target="_blank"><?php _e('Plugin Homepage', $this->ID); ?></a></li>
<li><a href="http://wiki.alkivia.org/capsman" class="docs" target="_blank"><?php _e('Documentation', $this->ID); ?></a></li>
<li><a href="http://wordpress.org/tags/capsman?forum_id=10" class="help" target="_blank"><?php _e('Support Forum', $this->ID); ?></a></li>
<li><a href="http://alkivia.org" class="home" target="_blank"><?php _e('Author Homepage', $this->ID)?></a></li>
<li><a href="http://alkivia.org/donate" class="donate" target="_blank"><?php _e('Help donating', $this->ID)?></a></li>
</ul>
</dd>
</dl>

View File

@ -0,0 +1,81 @@
<?php
/**
* Capability Manager Backup Tool.
* Provides backup and restore functionality to Capability Manager.
*
* @version $Rev: 198515 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage CapsMan
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<div class="wrap">
<div id="icon-capsman-admin" class="icon32"></div>
<h2><?php _e('Backup Tool for Capability Manager', $this->ID) ?></h2>
<form method="post" action="tools.php?page=<?php echo $this->ID ?>-tool">
<?php wp_nonce_field('capsman-backup-tool'); ?>
<fieldset>
<table id="akmin">
<tr>
<td class="content">
<dl>
<dt><?php _e('Backup and Restore', $this->ID); ?></dt>
<dd>
<table width='100%' class="form-table">
<tr>
<th scope="row"><?php _e('Select action:', $this->ID); ?></th>
<td>
<select name="action">
<option value="backup"> <?php _e('Backup roles and capabilities', $this->ID); ?> </option>
<option value="restore"> <?php _e('Restore last saved backup', $this->ID); ?> </option>
</select> &nbsp;
<input type="submit" name="Perform" value="<?php _e('Do Action', $this->ID) ?>" class="button-primary" />
</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt><?php _e('Reset WordPress Defaults', $this->ID)?></dt>
<dd>
<p style="text-align:center;"><strong><span style="color:red;"><?php _e('WARNING:', $this->ID); ?></span> <?php _e('Reseting default Roles and Capabilities will set them to the WordPress install defaults.', $this->ID); ?></strong><br />
<?php _e('If you have installed any plugin that adds new roles or capabilities, these will be lost.', $this->ID)?><br />
<strong><?php _e('It is recommended to use this only as a last resource!')?></strong></p>
<p style="text-align:center;"><a class="ak-delete" title="<?php echo attribute_escape(__('Reset Roles and Capabilities to WordPress defaults', $this->ID)) ?>" href="<?php echo wp_nonce_url("tools.php?page={$this->ID}-tool&amp;action=reset-defaults", 'capsman-reset-defaults'); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf(__("You are about to reset Roles and Capabilities to WordPress defaults.\n 'Cancel' to stop, 'OK' to reset.", $this->ID), $roles[$default])); ?>') ) { return true;}return false;"><?php _e('Reset to WordPress defaults', $this->ID)?></a>
</dd>
</dl>
<?php ak_admin_footer($this->ID, 2009); ?>
</td>
<td class="sidebar">
<?php ak_admin_authoring($this->ID); ?>
</td>
</tr>
</table>
</fieldset>
</form>
</div>

View File

@ -0,0 +1,623 @@
<?php
/**
* Capability Manager.
* Plugin to create and manage roles and capabilities.
*
* @version $Rev: 199485 $
* @author Jordi Canals
* @copyright Copyright (C) 2009, 2010 Jordi Canals
* @license GNU General Public License version 2
* @link http://alkivia.org
* @package Alkivia
* @subpackage CapsMan
*
Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
include_once ( AK_CLASSES . '/abstract/plugin.php' );
/**
* Class cmanCapsManager.
* Sets the main environment for all Capability Manager components.
*
* @author Jordi Canals
* @package CapsMan
* @link http://alkivia.org
*/
class CapabilityManager extends akPluginAbstract
{
/**
* Array with all capabilities to be managed. (Depends on user caps).
* The array keys are the capability, the value is its screen name.
* @var array
*/
private $capabilities = array();
/**
* Array with roles that can be managed. (Depends on user roles).
* The array keys are the role name, the value is its translated name.
* @var array
*/
private $roles = array();
/**
* Current role we are managing
* @var string
*/
private $current;
/**
* Maximum level current manager can assign to a user.
* @var int
*/
private $max_level;
/**
* Creates some filters at module load time.
*
* @see akModuleAbstract#moduleLoad()
*
* @return void
*/
protected function moduleLoad ()
{
// Only roles that a user can administer can be assigned to others.
add_filter('editable_roles', array($this, 'filterEditRoles'));
// Users with roles that cannot be managed, are not allowed to be edited.
add_filter('map_meta_cap', array(&$this, 'filterUserEdit'), 10, 4);
}
/**
* Sets default settings values.
*
* @return void
*/
protected function defaultOptions ()
{
$this->generateSysNames();
return array(
'form-rows' => 5,
'syscaps' => $this->capabilities
);
}
/**
* Activates the plugin and sets the new capability 'Manage Capabilities'
*
* @return void
*/
protected function pluginActivate ()
{
$this->setAdminCapability();
}
/**
* Updates Capability Manager to a new version
*
* @return void
*/
protected function pluginUpdate ( $version )
{
$backup = get_option($this->ID . '_backup');
if ( false === $backup ) { // No previous backup found. Save it!
global $wpdb;
$roles = get_option($wpdb->prefix . 'user_roles');
update_option($this->ID . '_backup', $roles);
}
}
/**
* Adds admin panel menus. (At plugins loading time. This is before plugins_loaded).
* User needs to have 'manage_capabilities' to access this menus.
* This is set as an action in the parent class constructor.
*
* @hook action admin_menu
* @return void
*/
public function adminMenus ()
{
// First we check if user is administrator and can 'manage_capabilities'.
if ( current_user_can('administrator') && ! current_user_can('manage_capabilities') ) {
$this->setAdminCapability();
}
add_users_page( __('Capability Manager', $this->ID), __('Capabilities', $this->ID), 'manage_capabilities', $this->ID, array($this, 'generalManager'));
add_management_page(__('Capability Manager', $this->ID), __('Capability Manager', $this->ID), 'manage_capabilities', $this->ID . '-tool', array($this, 'backupTool'));
}
/**
* Sets the 'manage_capabilities' cap to the administrator role.
*
* @return void
*/
private function setAdminCapability ()
{
$admin = get_role('administrator');
$admin->add_cap('manage_capabilities');
}
/**
* Filters roles that can be shown in roles list.
* This is mainly used to prevent an user admin to create other users with
* higher capabilities.
*
* @hook 'editable_roles' filter.
*
* @param $roles List of roles to check.
* @return array Restircted roles list
*/
function filterEditRoles ( $roles )
{
$this->generateNames();
$valid = array_keys($this->roles);
foreach ( $roles as $role => $caps ) {
if ( ! in_array($role, $valid) ) {
unset($roles[$role]);
}
}
return $roles;
}
/**
* Checks if a user can be edited or not by current administrator.
* Returns array('do_not_allow') if user cannot be edited.
*
* @hook 'map_meta_cap' filter
*
* @param array $caps Current user capabilities
* @param string $cap Capability to check
* @param int $user_id Current user ID
* @param array $args For our purpose, we receive edited user id at $args[0]
* @return array Allowed capabilities.
*/
function filterUserEdit ( $caps, $cap, $user_id, $args )
{
if ( 'edit_user' != $cap || $user_id == (int) $args[0] ) {
return $caps;
}
$this->generateNames();
$valid = array_keys($this->roles);
$user = new WP_User( (int) $args[0] );
foreach ( $user->roles as $role ) {
if ( ! in_array($role, $valid) ) {
$caps = array('do_not_allow');
break;
}
}
return $caps;
}
/**
* Manages global settings admin.
*
* @hook add_submenu_page
* @return void
*/
function generalManager ()
{
if ( ! current_user_can('manage_capabilities') && ! current_user_can('administrator') ) {
// TODO: Implement exceptions.
wp_die('<strong>' .__('What do you think you\'re doing?!?', $this->ID) . '</strong>');
}
global $wp_roles;
$this->current = get_option('default_role'); // By default we manage the default role.
if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
check_admin_referer('capsman-general-manager');
$this->processAdminGeneral();
}
$this->generateNames();
$roles = array_keys($this->roles);
if ( isset($_GET['action']) && 'delete' == $_GET['action']) {
check_admin_referer('delete-role_' . $_GET['role']);
$this->adminDeleteRole();
}
if ( ! in_array($this->current, $roles) ) { // Current role has been deleted.
$this->current = array_shift($roles);
}
include ( AK_CMAN_LIB . '/admin.php' );
}
/**
* Manages backup, restore and resset roles and capabilities
*
* @hook add_management_page
* @return void
*/
function backupTool ()
{
if ( ! current_user_can('manage_capabilities') && ! current_user_can('administrator') ) {
// TODO: Implement exceptions.
wp_die('<strong>' .__('What do you think you\'re doing?!?', $this->ID) . '</strong>');
}
if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
check_admin_referer('capsman-backup-tool');
$this->processBackupTool();
}
if ( isset($_GET['action']) && 'reset-defaults' == $_GET['action']) {
check_admin_referer('capsman-reset-defaults');
$this->backupToolReset();
}
include ( AK_CMAN_LIB . '/backup.php' );
}
/**
* Processes and saves the changes in the general capabilities form.
*
* @return void
*/
private function processAdminGeneral ()
{
global $wp_roles;
if (! isset($_POST['action']) || 'update' != $_POST['action'] ) {
// TODO: Implement exceptions. This must be a fatal error.
ak_admin_error(__('Bad form Received', $this->ID));
return;
}
$post = stripslashes_deep($_POST);
if ( empty ($post['caps']) ) {
$post['caps'] = array();
}
$this->saveRoleCapabilities($post['current'], $post['caps'], $post['level']);
$this->current = $post['current'];
// Select a new role.
if ( isset($post['Change']) && __('Change', $this->ID) == $post['Change'] ) {
$this->current = $post['role'];
// Create a new role.
} elseif ( isset($post['Create']) && __('Create', $this->ID) == $post['Create'] ) {
if ( $newrole = $this->createRole($post['create-name']) ) {
ak_admin_notify(__('New role created.', $this->ID));
$this->current = $newrole;
} else {
ak_admin_error(__('Error: Failed creating the new role.', $this->ID));
}
// Copy current role to a new one.
} elseif ( isset($post['Copy']) && __('Copy', $this->ID) == $post['Copy'] ) {
$current = get_role($post['current']);
if ( $newrole = $this->createRole($post['copy-name'], $current->capabilities) ) {
ak_admin_notify(__('New role created.', $this->ID));
$this->current = $newrole;
} else {
ak_admin_error(__('Error: Failed creating the new role.', $this->ID));
}
// Save role changes. Already saved at start with self::saveRoleCapabilities().
}elseif ( isset($post['Save']) && __('Save Changes', $this->ID) == $post['Save'] ) {
ak_admin_notify(__('New capabilities saved.', $this->ID));
// Create New Capability and adds it to current role.
} elseif ( isset($post['AddCap']) && __('Add to role', $this->ID) == $post['AddCap'] ) {
$role = get_role($post['current']);
if ( $newname = $this->createNewName($post['capability-name']) ) {
$role->add_cap($newname['name']);
ak_admin_notify(__('New capability added to role.', $this->ID));
} else {
ak_admin_error(__('Incorrect capability name.', $this->ID));
}
} else {
// TODO: Implement exceptions. This must be a fatal error.
ak_admin_error(__('Bad form received.', $this->ID));
}
}
/**
* Processes backups and restores.
*
* @return void
*/
private function processBackupTool ()
{
if ( isset($_POST['Perform']) ) {
global $wpdb;
$wp_roles = $wpdb->prefix . 'user_roles';
$cm_roles = $this->ID . '_backup';
switch ( $_POST['action'] ) {
case 'backup':
$roles = get_option($wp_roles);
update_option($cm_roles, $roles);
ak_admin_notify(__('New backup saved.', $this->ID));
break;
case 'restore':
$roles = get_option($cm_roles);
if ( $roles ) {
update_option($wp_roles, $roles);
ak_admin_notify(__('Roles and Capabilities restored from last backup.', $this->ID));
} else {
ak_admin_error(__('Restore failed. No backup found.', $this->ID));
}
break;
}
}
}
/**
* Deletes a role.
* The role comes from the $_GET['role'] var and the nonce has already been checked.
* Default WordPress role cannot be deleted and if trying to do it, throws an error.
* Users with the deleted role, are moved to the WordPress default role.
*
* @return void
*/
private function adminDeleteRole ()
{
global $wpdb;
$this->current = $_GET['role'];
$default = get_option('default_role');
if ( $default == $this->current ) {
ak_admin_error(sprintf(__('Cannot delete default role. You <a href="%s">have to change it first</a>.', $this->ID), 'options-general.php'));
return;
}
$query = "SELECT ID FROM {$wpdb->usermeta} INNER JOIN {$wpdb->users} "
. "ON {$wpdb->usermeta}.user_id = {$wpdb->users}.ID "
. "WHERE meta_key='{$wpdb->prefix}capabilities' AND meta_value LIKE '%{$this->current}%';";
$users = $wpdb->get_results($query);
$count = count($users);
foreach ( $users as $u ) {
$user = new WP_User($u->ID);
if ( $user->has_cap($this->current) ) { // Check again the user has the deleting role
$user->set_role($default);
}
}
remove_role($this->current);
unset($this->roles[$this->current]);
ak_admin_notify(sprintf(__('Role has been deleted. %1$d users moved to default role %2$s.', $this->ID), $count, $this->roles[$default]));
$this->current = $default;
}
/**
* Resets roles to WordPress defaults.
*
* @return void
*/
private function backupToolReset ()
{
require_once(ABSPATH . 'wp-admin/includes/schema.php');
if ( ! function_exists('populate_roles') ) {
ak_admin_error(__('Needed function to create default roles not found!', $this->ID));
return;
}
$roles = array_keys($this->roles);
foreach ( $roles as $role) {
remove_role($role);
}
populate_roles();
$this->setAdminCapability();
ak_admin_notify(__('Roles and Capabilities reset to WordPress defaults', $this->ID));
}
/**
* Callback function to create names.
* Replaces underscores by spaces and uppercases the first letter.
*
* @access private
* @param string $cap Capability name.
* @return string The generated name.
*/
function _capNamesCB ( $cap )
{
$cap = str_replace('_', ' ', $cap);
$cap = ucfirst($cap);
return $cap;
}
/**
* Generates an array with the system capability names.
* The key is the capability and the value the created screen name.
*
* @uses self::_capNamesCB()
* @return void
*/
private function generateSysNames ()
{
$this->max_level = 10;
$this->roles = ak_get_roles(true);
$caps = array();
foreach ( array_keys($this->roles) as $role ) {
$role_caps = get_role($role);
$caps = array_merge($caps, $role_caps->capabilities);
}
$keys = array_keys($caps);
$names = array_map(array($this, '_capNamesCB'), $keys);
$this->capabilities = array_combine($keys, $names);
$sys_caps = $this->getOption('syscaps');
if ( is_array($sys_caps) ) {
$this->capabilities = array_merge($sys_caps, $this->capabilities);
}
asort($this->capabilities);
}
/**
* Generates an array with the user capability names.
* If user has 'administrator' role, system roles are generated.
* The key is the capability and the value the created screen name.
* A user cannot manage more capabilities that has himself (Except for administrators).
*
* @uses self::_capNamesCB()
* @return void
*/
private function generateNames ()
{
if ( current_user_can('administrator') ) {
$this->generateSysNames();
} else {
global $user_ID;
$user = new WP_User($user_ID);
$this->max_level = ak_caps2level($user->allcaps);
$keys = array_keys($user->allcaps);
$names = array_map(array($this, '_capNamesCB'), $keys);
$this->capabilities = array_combine($keys, $names);
$roles = ak_get_roles(true);
unset($roles['administrator']);
foreach ( $user->roles as $role ) { // Unset the roles from capability list.
unset ( $this->capabilities[$role] );
unset ( $roles[$role]); // User cannot manage his roles.
}
asort($this->capabilities);
foreach ( array_keys($roles) as $role ) {
$r = get_role($role);
$level = ak_caps2level($r->capabilities);
if ( $level > $this->max_level ) {
unset($roles[$role]);
}
}
$this->roles = $roles;
}
}
/**
* Creates a new role/capability name from user input name.
* Name rules are:
* - 2-40 charachers lenght.
* - Only letters, digits, spaces and underscores.
* - Must to start with a letter.
*
* @param string $name Name from user input.
* @return array|false An array with the name and display_name, or false if not valid $name.
*/
private function createNewName( $name ) {
// Allow max 40 characters, letters, digits and spaces
$name = trim(substr($name, 0, 40));
$pattern = '/^[a-zA-Z][a-zA-Z0-9 _]+$/';
if ( preg_match($pattern, $name) ) {
$roles = ak_get_roles();
$name = strtolower($name);
$name = str_replace(' ', '_', $name);
if ( in_array($name, $roles) || array_key_exists($name, $this->capabilities) ) {
return false; // Already a role or capability with this name.
}
$display = explode('_', $name);
$display = array_map('ucfirst', $display);
$display = implode(' ', $display);
return compact('name', 'display');
} else {
return false;
}
}
/**
* Creates a new role.
*
* @param string $name Role name to create.
* @param array $caps Role capabilities.
* @return string|false Returns the name of the new role created or false if failed.
*/
private function createRole( $name, $caps = array() ) {
$role = $this->createNewName($name);
if ( ! is_array($role) ) {
return false;
}
$new_role = add_role($role['name'], $role['display'], $caps);
if ( is_object($new_role) ) {
return $role['name'];
} else {
return false;
}
}
/**
* Saves capability changes to roles.
*
* @param string $role_name Role name to change its capabilities
* @param array $caps New capabilities for the role.
* @return void
*/
private function saveRoleCapabilities( $role_name, $caps, $level ) {
$this->generateNames();
$role = get_role($role_name);
$old_caps = array_intersect_key($role->capabilities, $this->capabilities);
$new_caps = ( is_array($caps) ) ? array_map('intval', $caps) : array();
$new_caps = array_merge($new_caps, ak_level2caps($level));
// Find caps to add and remove
$add_caps = array_diff_key($new_caps, $old_caps);
$del_caps = array_diff_key($old_caps, $new_caps);
if ( ! current_user_can('administrator') ) {
unset($add_caps['manage_capabilities']);
unset($del_caps['manage_capabilities']);
}
if ( 'administrator' == $role_name && isset($del_caps['manage_capabilities']) ) {
unset($del_caps['manage_capabilities']);
ak_admin_error(__('You cannot remove Manage Capabilities from Administrators', $this->ID));
}
// Add new capabilities to role
foreach ( $add_caps as $cap => $grant ) {
$role->add_cap($cap);
}
// Remove capabilities from role
foreach ( $del_caps as $cap => $grant) {
$role->remove_cap($cap);
}
}
protected function pluginDeactivate() {}
protected function pluginsLoaded() {}
protected function registerWidgets() {}
public function wpInit() {}
}

Binary file not shown.

View File

@ -0,0 +1,281 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: antsar.info <iliamrv@ya.ru>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Belarusian\n"
"X-Poedit-Country: BELARUS\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "Папярэджанне:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "Убудова %s не сумяшчальны з вашай версіяй PHP."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "%s неабходзен лоя ўбудовы."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Ролі і магчымасці"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Магчымасць для %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Узровень:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Захаваць налады"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Выдаліць гэту ролю"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Вы пра выдаленне ролі %s.\n"
" 'Адмяніць' для прыпынку, 'ОК' для выдалення."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Выдаленне ролі"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Абраць новую ролю"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "Змяніць"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Стварыць новую ролю"
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "Стварыць"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Копія гэтай ролі"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "Копія"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Дадаць магчымасць"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "Дадаць ролю"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Прылада для стварэння рэзервовай копіі для Capability Manager"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Рэзервовая копія і аднаўленне"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Абраць дзеянне:"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Рэзерв. копія роляў і магчымасцяў"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Аднавіць з апошняга захаванага бэкапу"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "Няма дзеянняў"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Сбростить налады WordPress па змаўчанні"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "УВАГА:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "Скід стандартных роляў і магчымасцяў павінен скінуць налады па змаўчанні пры установвке ў WordPress."
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "Калі вы ўсталявалі іншую ўбудову, які дадае новыя ролі ці магчымасці, гэта павінна знікнуць. "
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "Гэта рэкамендуецца дя выкарыстанні толькі як последный рэсурс!"
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Скінуць ролі і воможности"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Вы пра скід роляў і магчымасцяў %s.\n"
" 'Адмяніць' для прыпынку, 'ОК' для скіду."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Скінуць налады WordPress"
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Capability Manager"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Магчымасці"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "Вы ведаеце, што робіце?!?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "Se ha recibido un formulario incorrecto."
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "Новая роля створана."
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "Памылка: Новая роля не створана."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "Новыя магчымасці захаваны."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "Новая воможность дададзена да ролі."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Некарэктнае імя магчымасці."
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "Дрэнная форма адпраўкі."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "Новы бэкап захаваны."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "Ролі і магчымасці адноўлены з апошняга бэкапу."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Аднаўленне спынена. Не знойдзена бэкапаў. "
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "Не выдалена стандартная роля. Вы <a href=\"%s\">павінны спачатку змяніць гэта</a>."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "Роля была выдалена. %1$d карыстачоў перамешчана ў стандартную ролю %2$s."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "Неабходная функцыя па стварэнні роляў не знойдзена!"
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "Ролі і магчымасці скінуты да стандартных для WordPress "
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "Вы не можаце выдаліць Manage Capabilities праз адміністратараў ."
#~ msgid "The active plugin %s is not compatible with your WordPress version."
#~ msgstr "Актыўная ўбудова %s не сумяшчальны з бягучай версіяй WordPress."
#~ msgid "WordPress %s is required to run this plugin."
#~ msgstr "WordPress %s неабходзен для запуску гэтай убудовы."
#~ msgid "Standard sidebar functions are not present."
#~ msgstr "Стандартныя функцыі бакавой панэлі не прадстаўлены."
#~ msgid "It is required to use the standard sidebar to run %s"
#~ msgstr ""
#~ "Гэта неабходна для выкарыстання стандартнай бакавой панэлі для запуску %s"
#~ msgid "Settings saved."
#~ msgstr "Налады захаваны."
#~ msgid "Plugin Homepage"
#~ msgstr "Хатняя старонка ўбудовы"
#, fuzzy
#~ msgid "Theme Homepage"
#~ msgstr "Хатняя старонка аўтара"
#, fuzzy
#~ msgid "Documentation"
#~ msgstr "Няма дзеянняў"
#~ msgid "Support Forum"
#~ msgstr "Форум падтрымкі"
#~ msgid "Author Homepage"
#~ msgstr "Хатняя старонка аўтара"
#, fuzzy
#~ msgid "Incorrect type of file."
#~ msgstr "Некарэктнае імя магчымасці."
#, fuzzy
#~ msgid "Error in creating %s image from source."
#~ msgstr "Памылка: Новая роля не створана."
#, fuzzy
#~ msgid "Error reading the file."
#~ msgstr "Памылка: Новая роля не створана."
#~ msgid "Help donating"
#~ msgstr "Дапамога праз ахвяраванні"
#~ msgid "Managing %s"
#~ msgstr "Administrando %s"

Binary file not shown.

View File

@ -0,0 +1,384 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Catalan\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "Atenció:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "L'extensió activa %s no és compatible amb la teva versió de PHP."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "Es requereix %s per aquesta extensió."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Rols i Competències"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Competències per %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Nivell:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Desa els canvis"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Elimina aquest rol"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Estàs apunt d'eliminar el rol %s.\n"
" 'Cancel·la' per sortir, 'D'acord' per eliminar."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Eliminar Rol"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Selecciona un nou Rol"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "Canvia"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Crear rol nou"
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "Crear"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Copia aquest rol a"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "Copiar"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Afegeix Competència"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "Afegir al rol"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Eina de Copies de Seguretat per a Capability Manager"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Copia i Restaura"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Selecciona una acció:"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Desa una copia de rols i competències"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Recupera la darrera còpia de seguretat"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "Executa l'Acció"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Restaura valors predeterminats de WordPress"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "ATENCIÓ:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "Restaurant els valors predeterminats per a Rols i Competències, els configurarà als valors predeterminats de la instal·lació de WordPress."
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "Si has instal·lat alguna extensió que afegeix nous rols o competències, aquests es perdran."
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "Es recomana utilitzar aquesta opció només com a últim recurs!"
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Restaura Rols i Competències als valors predeterminats de WordPress"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Estàs apunt de restaurar els valors predeterminats de WordPress per a Rols i Competències.\n"
" 'Cancel·la' per abandonarr, 'D'acord' per restaurar."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Restaura els valors predeterminats de WordPress"
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Administrador de Compoetències"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Competències"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "Que et penses que fas?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "S'ha rebut un formulari incorrecte."
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "S'ha creat el nou rol."
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "Error: No s'ha pogut crear el nou rol."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "S'han desat les noves competències."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "Nova competència afegida al rol."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Nom incorrecte de competència."
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "S'ha rebut un formulari incorrecte."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "S'ha creat la copia de seguretat."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "S'han recuperat els Rols i Competències des de la copia de seguretat."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Ha fallat la recuperació. No s'ha trobat cap copia de seguretat."
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "No es pot eliminar el rol predeterminat. <a href=\"%s\" Abans has de canviar-lo</a>."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "El rol ha estat eliminat. S'han mogut %1$d usuaris al rol predeterminat %2$s."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "La funció per crear els rols predeterminats no s'ha trobat!"
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "S'han restaurat Rols i Competències als valors predeterminats de WordPress."
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "No pots eliminar 'Manage Capabilities' dels administradors"
#~ msgid "Option blocked by administrator."
#~ msgstr "Opció desactivada per l'administrador."
#~ msgid "The active plugin %s is not compatible with your WordPress version."
#~ msgstr ""
#~ "L'extensió activa %s no és compatible amb la teva versió de WordPress."
#~ msgid "WordPress %s is required to run this plugin."
#~ msgstr "Aquesta extensió requereix com a mínim WordPress %s."
#~ msgid "Standard sidebar functions are not present."
#~ msgstr "Les funcions de la barra lateral estàndard no es troben presents."
#~ msgid "It is required to use the standard sidebar to run %s"
#~ msgstr "És necessari utilitzar la barra lateral estàndard per executar %s"
#~ msgid "Settings saved."
#~ msgstr "Opcions desades."
#~ msgid "Just Now"
#~ msgstr "Ara mateix"
#~ msgid "1 minute ago"
#~ msgstr "Fa 1 minut"
#~ msgid "1 hour ago"
#~ msgstr "Fa 1 hora"
#~ msgid "Today at %s"
#~ msgstr "Avui a les %s"
#~ msgid "Yesterday at %s"
#~ msgstr "Ahir a les %s"
#~ msgid "Plugin Homepage"
#~ msgstr "Pàgina web de l'extensió"
#~ msgid "Theme Homepage"
#~ msgstr "Pàgina web del tema"
#~ msgid "Documentation"
#~ msgstr "Documentació"
#~ msgid "Support Forum"
#~ msgstr "Forum d'Ajuda"
#~ msgid "Author Homepage"
#~ msgstr "Lloc web de l'autor"
#~ msgid "Donate to project"
#~ msgstr "Fes un donatiu"
#~ msgid "File error. Please try again."
#~ msgstr "Error de fitxer. Si us plau, torneu-ho a provar."
#~ msgid "Local file doesn't exist."
#~ msgstr "El fitxer local no existeix."
#~ msgid "Local file is not readable."
#~ msgstr "El fitxer local no es pot llegir."
#~ msgid ""
#~ "File upload error (the uploaded file exceeds the upload_max_filesize "
#~ "directive in php.ini)."
#~ msgstr ""
#~ "Error de pujada de fitxer (El fitxer pujat excedeix de la directiva "
#~ "upload_max_filesize de php.ini)."
#~ msgid ""
#~ "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive "
#~ "that was specified in the html form)."
#~ msgstr ""
#~ "Error pujant el fitxer (el fitxer pujat excedeix la directiva "
#~ "MAX_FILE_SIZE que s'ha especificat al formulari HTML)."
#~ msgid "File upload error (the uploaded file was only partially uploaded)."
#~ msgstr "Error pujant el fitxer (El fitxer només s'ha rebut parcialment)."
#~ msgid "File upload error (no file was uploaded)."
#~ msgstr "Error pujant el fitxer (No s'ha rebut cap fitxer)."
#~ msgid "File upload error (missing a temporary folder)."
#~ msgstr "Error pujant el fitxer (manca la carpeta temporal)."
#~ msgid "File upload error (failed to write file to disk)."
#~ msgstr "Error pujant el fitxer (No s'ha pogut escriure al disc)."
#~ msgid "File upload error (file upload stopped by extension)."
#~ msgstr "Error pujant el fitxer (El fitxer s'ha bloquejat per extensió)."
#~ msgid "File upload error (unknown error code)."
#~ msgstr "Error pujant el fitxer (Codi d'error desconegut)."
#~ msgid "File upload error. Please try again."
#~ msgstr ""
#~ "S'ha produït un error pujant el fitxer. Torneu-ho a provar d'aquí una "
#~ "estona."
#~ msgid "File too big."
#~ msgstr "Fitxer massa gran."
#~ msgid "MIME type can't be detected."
#~ msgstr "No es pot detectar el tipus MIME."
#~ msgid "Incorrect type of file."
#~ msgstr "Tipus d'arxiu invàlid"
#~ msgid "Image too wide."
#~ msgstr "Imatge massa ample."
#~ msgid "Image too narrow."
#~ msgstr "Imatge massa estreta."
#~ msgid "Image too high."
#~ msgstr "Imatge massa alta."
#~ msgid "Image too short."
#~ msgstr "Imatge massa baixa."
#~ msgid "Image ratio too high (image too wide)."
#~ msgstr "Ratio d'imatge massa gran (Imatge massa ample)."
#~ msgid "Image ratio too low (image too high)."
#~ msgstr "Ratio d'imatge massa baix (Imatge massa alta)."
#~ msgid "Image has too many pixels."
#~ msgstr "La imatge té massa píxels."
#~ msgid "Image has not enough pixels."
#~ msgstr "La imatge no té prou píxels."
#~ msgid "File not uploaded. Can't carry on a process."
#~ msgstr "No s'ha pujat el fitxer. No s'ha pogut executar el procés."
#~ msgid "%s already exists. Please change the file name."
#~ msgstr "El fitxer %s ja existeix. Si en plau canvieu-ne el nom."
#~ msgid "No correct temp source file. Can't carry on a process."
#~ msgstr "El fitxer temporal no es correcte. No es pot executar el procés."
#~ msgid "No correct uploaded source file. Can't carry on a process."
#~ msgstr "El fitxer original no es correcte. No es pot executar el procés."
#~ msgid "Destination directory can't be created. Can't carry on a process."
#~ msgstr ""
#~ "No es pot crear el directori de destí. No es pot executar el procés."
#~ msgid "Destination directory doesn't exist. Can't carry on a process."
#~ msgstr "El directori de destí no existeix. No es pot executar el procés."
#~ msgid "Destination path is not a directory. Can't carry on a process."
#~ msgstr "La ruta de destí no és un directori. No es pot executar el procés."
#~ msgid ""
#~ "Destination directory can't be made writeable. Can't carry on a process."
#~ msgstr ""
#~ "No es pot canviar a 'escriure' els drets del directori de destí. No es "
#~ "pot executar el procés."
#~ msgid "Destination path is not a writeable. Can't carry on a process."
#~ msgstr ""
#~ "No es pot escriure en el directori de destí. No es pot executar el procés."
#~ msgid "Can't create the temporary file. Can't carry on a process."
#~ msgstr "No es pot crear un fitxer temporal. No es pot executar el procés."
#~ msgid "Source file is not readable. Can't carry on a process."
#~ msgstr "El fitxer d'origen no es pot llegir. No es pot executar el procés."
#~ msgid "No create from %s support."
#~ msgstr "No hi ha funcions per crear des de %s."
#~ msgid "Error in creating %s image from source."
#~ msgstr "Error creant la imatge %s des de l'original."
#~ msgid "Can't read image source. Not an image?."
#~ msgstr "No es pot llegir la imatge original. És una imatge?"
#~ msgid "GD doesn't seem to be present."
#~ msgstr "No sembla que la llibreria GD estigui present."
#~ msgid "No create from %s support, can't read watermark."
#~ msgstr ""
#~ "No hi ha funcions per crear des de %s, no es pot llegir la marca a "
#~ "l'aigua."
#~ msgid "No %s read support, can't create watermark."
#~ msgstr ""
#~ "No hi ha funcions per llegir %s, no es pot crear la marca a l'aigua."
#~ msgid "Unknown image format, can't read watermark."
#~ msgstr "Format d'imatge desconegut, no es pot llegir la marca a l'aigua."
#~ msgid "No %s create support."
#~ msgstr "No hi ha funcions per crear %s."
#~ msgid "No conversion type defined."
#~ msgstr "No s'ha definit cap tipus de conversió."
#~ msgid "Error copying file on the server. copy() failed."
#~ msgstr "Error copiant el fitxer al serivor. copy() ha fallat."
#~ msgid "Error reading the file."
#~ msgstr "Error llegint el fitxer."
#~ msgid "Help donating"
#~ msgstr "Ajuda donant"

Binary file not shown.

View File

@ -0,0 +1,281 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Alkivia | http://alkivia.org <alkivia@jcanals.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "WARNUNG:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "Das aktive Plugin %s ist mit der PHP Version nicht kompatibel."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "%s wird für dieses Plugin benötigt."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Rollen und Berechtigungen"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Berechtigungen für %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Berechtigungslevel:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Einstellungen speichern"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Diese Rolle löschen"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Sicher dass die Rolle %s gelöscht werden soll?\n"
" 'Abbrechen' um zu stoppen, 'OK' zum löschen."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Rolle löschen"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Neue Rolle auswählen"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "ändern"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Neue Rolle anlegen "
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "erstellen"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Diese Rolle kopieren"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "kopieren"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Berechtigung hinzufügen"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "zur Rolle hinzufügen"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Backup-Tool für den Berechtigungsmanager (Capability Manager)"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Sichern und Wiederherstellen"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Aktion auswählen"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Backup der Rollen und Berechtigungen"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Zuletzt gespeichertes Sicherung wiederherstellen"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "ausführen"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Wordpress Standardeinstellungen wiederherstellen"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "WARNUNG:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "das Wiederherstellen von Rollen und Berechtigungen erfolgt auf den Wordpress Standard!"
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "Einstellungen zu Rollen und Berechtigungen die nicht mit dem Berechtigungs-Manager erstellt wurden, werden gelöscht!"
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "Es wird empfohlen, dies als letzte Möglichkeit anzuwenden!"
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Rollen und Berechtigungen auf den Wordpress Standard zurücksetzen"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Du bist dabei die Rollen und Berechtigungen auf den Wordpress Standard zurückzusetzen!\n"
" 'Abbrechen' um dies nicht zu tun, 'OK' um auf Standardwerte zurückzusetzen."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Wordpress Standardwerte wiederherstellen."
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Berechtigungs Manager"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Berechtigungen"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "Was glaubst du, was Du tust?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "Fehlerhaftes Formular empfangen."
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "Neue Rolle wurde erstellt."
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "FEHLER: Rolle konnte nicht angelegt werden."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "Neue Berechtigung gespeichert."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "Neue Berechtigung zur Rolle hinzugefügt."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Berechtigungsname ist nicht zulässig."
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "Fehlerhaftes Formular empfangen."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "Neues Backup wurde erfolgreich gespeichert."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "Rollen und Berechtigungen der letzten Sicherung wiederhergestellt."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Wiederherstellen fehlgeschlagen - kein Backup gefunden!"
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "Standardrolle (default) konnte nicht gelöscht werden. Zuerst <a href=\"%s\">ändern</a>."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "Rolle wurde gelöscht. %1$d Benutzer auf Standardrolle (default) gesetzt %2$s."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "Benötigte Funktion zum Erstellen der Standardrolle (default) nicht gefunden!"
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "Rollen und Berechtigungen auf Wordpress Standard zurücksetzen"
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "Administratoren dürfen keine Berechtigungen entzogen werden!"
#~ msgid "The active plugin %s is not compatible with your WordPress version."
#~ msgstr ""
#~ "Das Plugin %s ist zu der aktuellen Wordpressversion nicht kompatibel!"
#~ msgid "WordPress %s is required to run this plugin."
#~ msgstr "WordPress %s wird für dieses Plugin benötigt."
#~ msgid "Standard sidebar functions are not present."
#~ msgstr "Standard Sidebarfunktionen stehen nicht zur Verfügung!"
#~ msgid "It is required to use the standard sidebar to run %s"
#~ msgstr "Standard Sidebaroptionen werden benötigt, to run %s"
#~ msgid "Settings saved."
#~ msgstr "Einstellungen gespeichert"
#~ msgid "Plugin Homepage"
#~ msgstr "Plugin Homepage"
#, fuzzy
#~ msgid "Theme Homepage"
#~ msgstr "Author Homepage"
#, fuzzy
#~ msgid "Documentation"
#~ msgstr "ausführen"
#~ msgid "Support Forum"
#~ msgstr "Support Forum"
#~ msgid "Author Homepage"
#~ msgstr "Author Homepage"
#, fuzzy
#~ msgid "Incorrect type of file."
#~ msgstr "Berechtigungsname ist nicht zulässig."
#, fuzzy
#~ msgid "Error in creating %s image from source."
#~ msgstr "FEHLER: Rolle konnte nicht angelegt werden."
#, fuzzy
#~ msgid "Error reading the file."
#~ msgstr "FEHLER: Rolle konnte nicht angelegt werden."
#~ msgid "Help donating"
#~ msgstr "Spenden"
#~ msgid "Managing %s"
#~ msgstr "Administrando %s"

Binary file not shown.

View File

@ -0,0 +1,392 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Spanish\n"
"X-Poedit-Country: SPAIN\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "Atención:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "La extensión activa %s no es compatible con tu versión de PHP."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "Se require %s para utilizar esta extensión."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Roles y Permisos"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Permisos para %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Nivel:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Guardar cambios"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Eliminar este rol"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Estás a intentando eliminar el rol %s.\n"
" 'Aceptar' para borrar, 'Cancelar' para salir."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Eliminar Rol"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Seleccionar nuevo Rol"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "Cambiar"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Crear nuevo Rol"
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "Crear"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Copiar este rol a"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "Copiar"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Añadir Permiso"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "Añadir al rol"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Herramienta de copias de seguridad para Capability Manager"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Salvar y Recuperar"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Selecciona una acción:"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Crea una copia de seguridad de roles y permisos"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Recupera la última copia de seguridad"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "Ejecutar Acción"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Restaurar valores por defecto de WordPress"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "ATENCIÓN:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "Restaurando los Roles y Premisos por defecto, los devolverá al estado por defecto de la instalación de WordPress."
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "Si has instalado algún plugin que añade roles o permisos, estos se perderán."
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "¡Se recomienda utilitzar esta opción solo como último recurso!"
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Restaura Roles y Permisos a los valores por defecto de WordPress"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Estás a intentando restaurar los valores por defecto de WordPress para Roles y Permisos.\n"
" 'Aceptar' para restaurar, 'Cancelar' para abandonar."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Restaura los valores por defecto de WordPress"
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Administrador de Permisos"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Permisos"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "¿Que piensas que estás haciendo?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "Se ha recibido un formulario incorrecto."
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "Se ha creado el nuevo rol."
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "Error: No se ha podido crear el nuevo rol."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "Se han actualizado los nuevos permisos."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "Nuevos permiso añadido al rol."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Nombre incorrecto de permiso ."
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "Se ha recibido un formulario incorrecto."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "Se ha creado una nueva copia de seguridad."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "Roles y permisos restaurados de la última copia de seguridad."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Ha fallado la recuperación. No se encontró ninguna copia de seguridad."
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "No se puede eliminar el rol predeterminado. <a href=\"%s\">Debes cambiarlo antes</a>."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "El rol ha sido eliminado. Se ha asignado el rol predeterminado %2$s a %1$d usuarios."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "¡No se encontró la función necesaria para crear los roles por defecto!"
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "Roles y Permisos restaurados a los valores por defecto de WordPress"
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "No se puede eliminar 'Manage Capabilities' de los administradores."
#~ msgid "Option blocked by administrator."
#~ msgstr "Opción bloqueada por el administrador."
#~ msgid "The active plugin %s is not compatible with your WordPress version."
#~ msgstr ""
#~ "La extensión activa %s no es compatible con tu versión de WordPress."
#~ msgid "WordPress %s is required to run this plugin."
#~ msgstr "Se require WordPress %s para ejecutar esta extensión."
#~ msgid "Standard sidebar functions are not present."
#~ msgstr ""
#~ "No se han encontrado algunas funciones de la barra lateral estándar."
#~ msgid "It is required to use the standard sidebar to run %s"
#~ msgstr "Es preciso utilizar la barra lateral estándar para ejectutar %s"
#~ msgid "Settings saved."
#~ msgstr "Opciones guardadas."
#~ msgid "Just Now"
#~ msgstr "Ahora mismo"
#~ msgid "1 minute ago"
#~ msgstr "Hace 1 minuto"
#~ msgid "1 hour ago"
#~ msgstr "Hace una hora"
#~ msgid "Today at %s"
#~ msgstr "Hoy a las %s"
#~ msgid "Yesterday at %s"
#~ msgstr "Ayer a las %s"
#~ msgid "Plugin Homepage"
#~ msgstr "Página del plugin"
#~ msgid "Theme Homepage"
#~ msgstr "Página del tema"
#~ msgid "Documentation"
#~ msgstr "Documentación"
#~ msgid "Support Forum"
#~ msgstr "Foro de soporte"
#~ msgid "Author Homepage"
#~ msgstr "Página del autor"
#~ msgid "Donate to project"
#~ msgstr "Haz un donativo"
#~ msgid "File error. Please try again."
#~ msgstr "Error de archivo. Por favor, reintentalo de nuevo."
#~ msgid "Local file doesn't exist."
#~ msgstr "El archivo local no existe."
#~ msgid "Local file is not readable."
#~ msgstr "El archivo local no es legible."
#~ msgid ""
#~ "File upload error (the uploaded file exceeds the upload_max_filesize "
#~ "directive in php.ini)."
#~ msgstr ""
#~ "Error de carga de archivo (el archivo cargado excede la directiva "
#~ "UPLOAD_MAX_FILESIZE de PHP)."
#~ msgid ""
#~ "File upload error (the uploaded file exceeds the MAX_FILE_SIZE directive "
#~ "that was specified in the html form)."
#~ msgstr ""
#~ "Error de carga de archivo (el archivo enviado excede la directiva "
#~ "MAX_FILE_SIZE especificada en el formulario)."
#~ msgid "File upload error (the uploaded file was only partially uploaded)."
#~ msgstr ""
#~ "Error de carga de archivo (el archivo sólo se recibió parcialmente)."
#~ msgid "File upload error (no file was uploaded)."
#~ msgstr "Error de carga de archivo (no se recibió archivo)."
#~ msgid "File upload error (missing a temporary folder)."
#~ msgstr "Error de carga de archivo (falta la carpeta temporal)."
#~ msgid "File upload error (failed to write file to disk)."
#~ msgstr "Error de carga de archivo (no se pudo escribir en el disco)."
#~ msgid "File upload error (file upload stopped by extension)."
#~ msgstr ""
#~ "Error de carga de archivo (se ha bloquedao el archivo por extensión)."
#~ msgid "File upload error (unknown error code)."
#~ msgstr "Error de carga de archivo (código de error desconocido)."
#~ msgid "File upload error. Please try again."
#~ msgstr "Error de carga de archivo. Por favor, reinténtalo."
#~ msgid "File too big."
#~ msgstr "Archivo demasiado grande."
#~ msgid "MIME type can't be detected."
#~ msgstr "No se pudo detectar el tipo MIME."
#~ msgid "Incorrect type of file."
#~ msgstr "Tipo de archivo incorrecto."
#~ msgid "Image too wide."
#~ msgstr "Imagen demasiado ancha."
#~ msgid "Image too narrow."
#~ msgstr "Imagen demasiado estrecha."
#~ msgid "Image too high."
#~ msgstr "Imagen demasiado alta."
#~ msgid "Image too short."
#~ msgstr "Imagen demasiado baja."
#~ msgid "Image ratio too high (image too wide)."
#~ msgstr "Ratio de imagen demariado alto (imagen demasiado ancha)."
#~ msgid "Image ratio too low (image too high)."
#~ msgstr "Ratio de imagen demasiado bajo (imagen demasiado alta)."
#~ msgid "Image has too many pixels."
#~ msgstr "La imágen tiene demasiados píxeles."
#~ msgid "Image has not enough pixels."
#~ msgstr "La imagen no tiene suficientes píxeles."
#~ msgid "File not uploaded. Can't carry on a process."
#~ msgstr "No se ha cargado el archivo. No se puede ejecutar el proceso."
#~ msgid "%s already exists. Please change the file name."
#~ msgstr "El archivo %s ya existe. Por favor, cambia el nombre de archivo."
#~ msgid "No correct temp source file. Can't carry on a process."
#~ msgstr "El archivo temporal es incorrecto. No se puede ejecutar el proceso."
#~ msgid "No correct uploaded source file. Can't carry on a process."
#~ msgstr "Archivo original incorrecto. No se puede ejecutar el proceso."
#~ msgid "Destination directory can't be created. Can't carry on a process."
#~ msgstr ""
#~ "No se puede crear el directorio de destino. No se puede realizar el "
#~ "proceso."
#~ msgid "Destination directory doesn't exist. Can't carry on a process."
#~ msgstr ""
#~ "El directorio de destino no existe. No se puede realizar el proceso."
#~ msgid "Destination path is not a directory. Can't carry on a process."
#~ msgstr ""
#~ "La ruta de destino no es un directorio. No se puede realizar el proceso."
#~ msgid ""
#~ "Destination directory can't be made writeable. Can't carry on a process."
#~ msgstr ""
#~ "El directorio de destino no se puede cambiar a escribible. No se puede "
#~ "realizar el proceso."
#~ msgid "Destination path is not a writeable. Can't carry on a process."
#~ msgstr ""
#~ "No se puede escribir en la ruta de destino. No se puede realizar el "
#~ "proceso."
#~ msgid "Can't create the temporary file. Can't carry on a process."
#~ msgstr ""
#~ "No se puede crar un archivo temporal. No se puede ejecutar el proceso."
#~ msgid "Source file is not readable. Can't carry on a process."
#~ msgstr ""
#~ "No se puede leer el archivo original. No se puede ejecutar el proceso."
#~ msgid "No create from %s support."
#~ msgstr "No hay soporte para crear desde %s."
#~ msgid "Error in creating %s image from source."
#~ msgstr "Error creacdo la imagen %s desde el original."
#~ msgid "Can't read image source. Not an image?."
#~ msgstr "No se puede leer la imagen orginal. ¿Es una imagen?"
#~ msgid "GD doesn't seem to be present."
#~ msgstr "No se ha detectado la libreria GD."
#~ msgid "No create from %s support, can't read watermark."
#~ msgstr ""
#~ "No hay soporte para crear desde %s. No se puede leer la marca de agua."
#~ msgid "No %s read support, can't create watermark."
#~ msgstr "No hay soporte para leer %s. No se puede crear la marca de agua."
#~ msgid "Unknown image format, can't read watermark."
#~ msgstr "Formato de imagen desconocido. No se puede leer la marca al agua."
#~ msgid "No %s create support."
#~ msgstr "No hay soporte para crear %s."
#~ msgid "No conversion type defined."
#~ msgstr "No se ha definido el tipo de conversión."
#~ msgid "Error copying file on the server. copy() failed."
#~ msgstr "Error coipiando el archivo en el servidor. Ha fallado copy()."
#~ msgid "Error reading the file."
#~ msgstr "Error leyendo el archivo."
#~ msgid "Help donating"
#~ msgstr "Ayuda donando"
#~ msgid "Managing %s"
#~ msgstr "Administrando %s"

Binary file not shown.

View File

@ -0,0 +1,281 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager in italiano\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:06+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e;_n\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "Attenzione:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "Il plugin %s non é compatibile con la tua versione PHP."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "E' necessario %s per l'utilizzo di questo plugin."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Ruoli e capacità"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Capacità per %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Livello:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Salva le modifiche"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Cancella questo ruolo"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Stai per cancellare il ruolo %s.\n"
" 'Annulla' per fermarti, 'OK' per procedere."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Cancella il ruolo"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Seleziona ruolo"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "Cambia"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Crea un nuovo ruolo"
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "Crea"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Copia questo ruolo per"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "Copia"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Aggiungi capacità"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "Aggiungi al ruolo"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Strumento di backup per Capability Manager"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Backup e Ripristino"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Seleziona una azione:"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Backup ruoli e capacità"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Ripristina all'ultimo backup in memoria"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "Procedi"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Ripristina ai valori predefiniti di WordPress"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "ATTENZIONE:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "Il ripristino alle predefinite per i Ruoli e le Capacità coinciderà con i valori predefiniti di WordPress."
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "I ruoli e le capacità propri di ogni plugin installato saranno persi."
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "Da utilizzarsi solamente come ultima risorsa!"
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Ripristina i Ruoli e le Capacità ai valori predefiniti di WordPress"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Stai per ripristinare i Ruoli e le Capacità ai valori predefiniti di WordPress.\n"
" 'Annulla' per fermarti, 'OK' per procedere."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Ripristina ai predefiniti di WordPress"
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Gestione capacità"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Capacità"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "Cosa stai facendo?!?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "E' stata ricevuta una richiesta errata"
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "Il nuovo ruolo é stato creato."
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "Errore: non é stato possibile creare il nuovo ruolo."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "Le nuove capacità sono state salvate."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "La nuova capacità é stata aggiunta al ruolo."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Nome non valido per la capacità."
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "E' stata ricevuta una richiesta errata."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "Il nuovo backup é stato salvato."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "I ruoli e le capacità sono stati ripristinati all'ultimo backup in memoria."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Non é stato possibile effettuare il ripristino. Non é stato trovato alcun file di backup."
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "Non é possibile cancellare il ruolo predefinito. E' necessario che tu compia questa <a href=\"%s\">modifica</a> prima di procedere."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "Il ruolo é stato cancellato. Gli utenti %1$d sono stati spostati nel ruolo predefinito a nome %2$s."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "La funzione necessaria per la creazione dei ruoli predefiniti non é stata trovata!"
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "I ruoli e le capacità sono stati ripristinati ai valori predefiniti di WordPress"
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "Non puoi rimuovere la gestione delle capacità per gli amministratori"
#~ msgid "The active plugin %s is not compatible with your WordPress version."
#~ msgstr "Il plugin %s non é compatibile con la tua versione di WordPress."
#~ msgid "WordPress %s is required to run this plugin."
#~ msgstr "Per l'utilizzo del plugin é necessario WordPress %s."
#~ msgid "Standard sidebar functions are not present."
#~ msgstr "Le funzioni standard per la sidebar non sono presenti."
#~ msgid "It is required to use the standard sidebar to run %s"
#~ msgstr "Necessario per l'utilizzo della sidebar standard %s"
#~ msgid "Settings saved."
#~ msgstr "Le impostazioni sono state salvate."
#~ msgid "Plugin Homepage"
#~ msgstr "Homepage del plugin"
#, fuzzy
#~ msgid "Theme Homepage"
#~ msgstr "Homepage autore"
#, fuzzy
#~ msgid "Documentation"
#~ msgstr "Procedi"
#~ msgid "Support Forum"
#~ msgstr "Forum di supporto"
#~ msgid "Author Homepage"
#~ msgstr "Homepage autore"
#, fuzzy
#~ msgid "Incorrect type of file."
#~ msgstr "Nome non valido per la capacità."
#, fuzzy
#~ msgid "Error in creating %s image from source."
#~ msgstr "Errore: non é stato possibile creare il nuovo ruolo."
#, fuzzy
#~ msgid "Error reading the file."
#~ msgstr "Errore: non é stato possibile creare il nuovo ruolo."
#~ msgid "Help donating"
#~ msgstr "Donazioni"

Binary file not shown.

View File

@ -0,0 +1,281 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Fat Cow <gpl@alkivia.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Russian\n"
"X-Poedit-Country: RUSSIAN FEDERATION\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "Предупреждение:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "Плагин %s не совместим с вашей версией PHP."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "%s необходим лоя плагина."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Роли и возможности"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Возможность для %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Уровень:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Сохранить настройки"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Удалить эту роль"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Вы об удалении роли %s.\n"
" 'Отменить' для остановки, 'ОК' для удаления."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Удаление роли"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Выбрать новую роль"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "Изменить"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Создать новую роль"
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "Создать"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Копия этой роли"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "Копия"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Добавить возможность"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "Добавить роль"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Инструмент для создания резервной копии для Capability Manager"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Резервная копия и восстановление"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Выбрать действие:"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Резерв. копия ролей и возможностей"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Восстановить из последнего сохраненного бэкапа"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "Нет действий"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Сбростить настройки WordPress по умолчанию"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "ВНИМАНИЕ:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "Сброс стандартных ролей и возможностей должен сбросить настройки по умолчанию при установвке в WordPress."
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "Если вы установили другой плагин, который добавляет новые роли или возможности, это должно исчезнуть. "
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "Это рекомендуется дя использования только как последный ресурс!"
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Сбросить роли и воможности"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Вы об сбросе ролей и возможностей %s.\n"
" 'Отменить' для остановки, 'ОК' для сброса."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Сбросить настройки WordPress"
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Capability Manager"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Возможности"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "Вы знаете, что делаете?!?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "Se ha recibido un formulario incorrecto."
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "Новая роль создана."
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "Ошибка: Новая роль не создана."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "Новые возможности сохранены."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "Новая воможность добавлена к роли."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Некорректное имя возможности."
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "Плохая форма отправки."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "Новый бэкап сохранен."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "Роли и возможности восстановлены с последнего бэкапа."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Восстановление остановлено. Не найдено бэкапов. "
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "Не удалена стандартная роль. Вы <a href=\"%s\">должны сначала изменить это</a>."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "Роль была удалена. %1$d пользователей перемещена в стандартную роль %2$s."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "Необходимая функция по созданию ролей не найдена!"
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "Роли и возможности сброшены к стандартным для WordPress "
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "Вы не можете удалить Manage Capabilities через администраторов ."
#~ msgid "The active plugin %s is not compatible with your WordPress version."
#~ msgstr "Активный плагин %s не совместим с текущей версией WordPress."
#~ msgid "WordPress %s is required to run this plugin."
#~ msgstr "WordPress %s необходим для запуска этого плагина."
#~ msgid "Standard sidebar functions are not present."
#~ msgstr "Стандартные функции боковой панели не представлены."
#~ msgid "It is required to use the standard sidebar to run %s"
#~ msgstr ""
#~ "Это необходимо для использования стандартной боковой панели для запуска %s"
#~ msgid "Settings saved."
#~ msgstr "Настройки сохранены."
#~ msgid "Plugin Homepage"
#~ msgstr "Домашняя страница плагина"
#, fuzzy
#~ msgid "Theme Homepage"
#~ msgstr "Домашняя страница автора"
#, fuzzy
#~ msgid "Documentation"
#~ msgstr "Нет действий"
#~ msgid "Support Forum"
#~ msgstr "Форум поддержки"
#~ msgid "Author Homepage"
#~ msgstr "Домашняя страница автора"
#, fuzzy
#~ msgid "Incorrect type of file."
#~ msgstr "Некорректное имя возможности."
#, fuzzy
#~ msgid "Error in creating %s image from source."
#~ msgstr "Ошибка: Новая роль не создана."
#, fuzzy
#~ msgid "Error reading the file."
#~ msgstr "Ошибка: Новая роль не создана."
#~ msgid "Help donating"
#~ msgstr "Помощь через пожертвования"
#~ msgid "Managing %s"
#~ msgstr "Administrando %s"

Binary file not shown.

View File

@ -0,0 +1,240 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jens Wedin <me@jenswedin.com>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_c;_x:2c,1\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr "Varning:"
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr "Det aktuella pluginet % är inte kompatibelt med din version av PHP."
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr "%s krävs för detta plugin."
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr "Roller och behörigheter"
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr "Behörighet för %s"
#: ../includes/admin.php:92
msgid "Level:"
msgstr "Nivå:"
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr "Spara ändringar"
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr "Ta bort roll"
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
"Du håller på att ta bort %s rollen.\n"
"'Avbryt' för att stoppa, 'OK' för att ta bort."
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr "Ta bort roll"
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr "Välj ny roll"
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr "Ändra"
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr "Skapa ny roll"
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr "Skapa"
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr "Kopiera rollen till"
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr "Kopiera"
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr "Lägg till behörigheter"
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr "Lägg till, till roll"
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr "Säkerhetetskopiering för Capability Manager"
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr "Säkerhetskopiera och Återställ"
#: ../includes/backup.php:46
msgid "Select action:"
msgstr "Välj alternativ:"
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr "Återställ roller och behörigheter"
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr "Återställ senaste versionen säkerhetskopian"
#: ../includes/backup.php:52
msgid "Do Action"
msgstr "Gör"
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr "Återställ WordPress standardvärden"
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr "VARNING:"
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr "Att återställa standardvärderna för roller och och behörigheter kommer att återställa dem till WordPress standardvärden."
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr "Om du har installerat något plugin som lägger till nya roller och behörigheter kommer dessa att försvinna."
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr "Det är rekommenderat att använda detta som en sista utväg! "
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr "Återställ roller och behörigheter till Wordpress standardvärden"
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
"Du håller på att återställa roller och behörigheter till WordPress standardvärden.\n"
"'Avbryt' för att stoppa, 'OK' för att återställa."
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr "Återställ till WordPress standardvärden"
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr "Ändra behörighet"
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr "Behörigheter"
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr "Vad tror du håller på med?!?"
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr "Ett felande formulär har skickats"
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr "Ny roll har skapats"
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr "Fel: Det gick inte att skapa en ny roll."
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr "Nya behörigheter har skapats."
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr "Nu behörighet har skapats."
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr "Fel på namnet för behörigheten"
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr "Felande formulär har skickats."
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr "Ny säkerhetskopiering har sparats."
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr "Roller och behörigheter har återskapats från senaste säkerhetskopian."
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr "Återställningen misslyckades. Ingen säkerhetskopia hittades."
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr "Kan inte ta bort standard rollen. Du <a href=\"%s\">måste ändra den först</a>."
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr "Rollen har tagits bort. %1$d användare har flyttats till standardrollen %2$s."
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr "En viss funktion saknas för att skapa en standardroll."
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr "Roller och behörigheter har återställts till WordPress standardvärden"
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr "Du kan inte ta bort 'Ändra rättigheter' för Administratörer"

View File

@ -0,0 +1,236 @@
msgid ""
msgstr ""
"Project-Id-Version: Capability Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-29 15:03+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Jordi Canals <devel@jcanals.cat>\n"
"Language-Team: Jordi Canals | http://alkivia.org <devel@jcanals.cat>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_c;_x:2c,1\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../capsman.php:53
msgid "Warning:"
msgstr ""
#: ../capsman.php:54
#, php-format
msgid "The active plugin %s is not compatible with your PHP version."
msgstr ""
#: ../capsman.php:56
#, php-format
msgid "%s is required for this plugin."
msgstr ""
#: ../includes/admin.php:36
msgid "Roles and Capabilities"
msgstr ""
#: ../includes/admin.php:45
#, php-format
msgid "Capabilities for %s"
msgstr ""
#: ../includes/admin.php:92
msgid "Level:"
msgstr ""
#: ../includes/admin.php:115
#: ../includes/manager.php:319
msgid "Save Changes"
msgstr ""
#: ../includes/admin.php:117
msgid "Delete this role"
msgstr ""
#: ../includes/admin.php:117
#, php-format
msgid ""
"You are about to delete the %s role.\n"
" 'Cancel' to stop, 'OK' to delete."
msgstr ""
#: ../includes/admin.php:117
msgid "Delete Role"
msgstr ""
#: ../includes/admin.php:128
msgid "Select New Role"
msgstr ""
#: ../includes/admin.php:136
#: ../includes/manager.php:296
msgid "Change"
msgstr ""
#: ../includes/admin.php:141
msgid "Create New Role"
msgstr ""
#: ../includes/admin.php:144
#: ../includes/manager.php:300
msgid "Create"
msgstr ""
#: ../includes/admin.php:149
msgid "Copy this role to"
msgstr ""
#: ../includes/admin.php:152
#: ../includes/manager.php:309
msgid "Copy"
msgstr ""
#: ../includes/admin.php:157
msgid "Add Capability"
msgstr ""
#: ../includes/admin.php:160
#: ../includes/manager.php:323
msgid "Add to role"
msgstr ""
#: ../includes/backup.php:33
msgid "Backup Tool for Capability Manager"
msgstr ""
#: ../includes/backup.php:42
msgid "Backup and Restore"
msgstr ""
#: ../includes/backup.php:46
msgid "Select action:"
msgstr ""
#: ../includes/backup.php:49
msgid "Backup roles and capabilities"
msgstr ""
#: ../includes/backup.php:50
msgid "Restore last saved backup"
msgstr ""
#: ../includes/backup.php:52
msgid "Do Action"
msgstr ""
#: ../includes/backup.php:60
msgid "Reset WordPress Defaults"
msgstr ""
#: ../includes/backup.php:62
msgid "WARNING:"
msgstr ""
#: ../includes/backup.php:62
msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
msgstr ""
#: ../includes/backup.php:63
msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
msgstr ""
#: ../includes/backup.php:64
msgid "It is recommended to use this only as a last resource!"
msgstr ""
#: ../includes/backup.php:65
msgid "Reset Roles and Capabilities to WordPress defaults"
msgstr ""
#: ../includes/backup.php:65
msgid ""
"You are about to reset Roles and Capabilities to WordPress defaults.\n"
" 'Cancel' to stop, 'OK' to reset."
msgstr ""
#: ../includes/backup.php:65
msgid "Reset to WordPress defaults"
msgstr ""
#: ../includes/manager.php:139
#: ../includes/manager.php:140
msgid "Capability Manager"
msgstr ""
#: ../includes/manager.php:139
msgid "Capabilities"
msgstr ""
#: ../includes/manager.php:220
#: ../includes/manager.php:256
msgid "What do you think you're doing?!?"
msgstr ""
#: ../includes/manager.php:283
msgid "Bad form Received"
msgstr ""
#: ../includes/manager.php:302
#: ../includes/manager.php:312
msgid "New role created."
msgstr ""
#: ../includes/manager.php:305
#: ../includes/manager.php:315
msgid "Error: Failed creating the new role."
msgstr ""
#: ../includes/manager.php:320
msgid "New capabilities saved."
msgstr ""
#: ../includes/manager.php:328
msgid "New capability added to role."
msgstr ""
#: ../includes/manager.php:330
msgid "Incorrect capability name."
msgstr ""
#: ../includes/manager.php:334
msgid "Bad form received."
msgstr ""
#: ../includes/manager.php:354
msgid "New backup saved."
msgstr ""
#: ../includes/manager.php:360
msgid "Roles and Capabilities restored from last backup."
msgstr ""
#: ../includes/manager.php:362
msgid "Restore failed. No backup found."
msgstr ""
#: ../includes/manager.php:384
#, php-format
msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
msgstr ""
#: ../includes/manager.php:405
#, php-format
msgid "Role has been deleted. %1$d users moved to default role %2$s."
msgstr ""
#: ../includes/manager.php:419
msgid "Needed function to create default roles not found!"
msgstr ""
#: ../includes/manager.php:431
msgid "Roles and Capabilities reset to WordPress defaults"
msgstr ""
#: ../includes/manager.php:606
msgid "You cannot remove Manage Capabilities from Administrators"
msgstr ""

View File

@ -0,0 +1,280 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,144 @@
=== Capability Manager ===
Contributors: txanny
Donate link: http://alkivia.org/donate
Help link: http://wordpress.org/tags/capsman?forum_id=10
Docs link: http://wiki.alkivia.org/capsman
Tags: roles, capabilities, manager, rights, role, capability
Requires at least: 2.9
Tested up to: 2.9.2
Stable tag: trunk
A simple way to manage WordPress roles and capabilities. With this plugin you will be able to easily create and manage roles and capabilities.
== Description ==
The Capability Manager plugin provides a simple way to manage role capabilities. Using it, you will be able to change the capabilities of any role, add new roles, copy existing roles into new ones, and add new capabilities to existing roles.
You can also delegate capabilities management to other users. In this case, some restrictions apply to this users, as them can only set/unset the capabilities they have.
With the Backup/Restore tool, you can save your Roles and Capabilities before making changes and revert them if something goes wrong. You'll find it on the Tools menu.
* Capability manager has been tested to support only one role per user.
* Only users with 'manage_capabilities' can manage them. This capability is created at install time and assigned only to administrators.
* Administrator role cannot be deleted.
* Non-administrators can only manage roles or users with same or lower capabilities.
See the <a href="http://wiki.alkivia.org/capsman" target="_blank">plugin manual</a> for more information.
= Features: =
* Manage role capabilities.
* Create new roles or delete existing ones.
* Add new capabilities to any existing role.
* Backup and restore Roles and Capabilities to revert your last changes.
* Revert Roles and Capabilities to WordPress defaults.
= Languages included: =
* English
* Catalan
* Spanish
* Belorussian *by <a href="http://antsar.info/" rel="nofollow">Ilyuha</a>*
* German *by <a href="http://great-solution.de/" rel="nofollow">Carsten Tauber</a>*
* Italian *by <a href="http://gidibao.net" rel="nofollow">Gianni Diurno</a>*
* Russian *by <a href="http://www.fatcow.com" rel="nofollow">Marcis Gasuns</a>*
* Swedish *by <a href="http://jenswedin.com/" rel="nofollow">Jens Wedin</a>
* POT file for easy translation to other languages included. See the <a href="http://wiki.alkivia.org/general/translators">translators page</a> for more information.
== Installation ==
= System Requirements =
* **Requires PHP 5.2**. Older versions of PHP are obsolete and expose your site to security risks.
* Verify the plugin is compatible with your WordPress Version. If not, plugin will not load.
= Installing the plugin =
1. Unzip the plugin archive.
1. Upload the plugin's folder to the WordPress plugins directory.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. Manage the capabilities on the 'Capabilities' page on Users menu.
1. Enjoy your plugin!
== Screenshots ==
1. Setting new capabilities for a role.
2. Actions on roles.
3. Backup/Restore tool.
== Frequently Asked Questions ==
= Where can I find more information about this plugin, usage and support ? =
* Take a look to the <a href="http://alkivia.org/wordpress/capsman">Plugin Homepage</a>.
* A <a href="http://wiki.alkivia.org/capsman">manual is available</a> for users and developers.
* The <a href="http://alkivia.org/cat/capsman">plugin posts archive</a> with new announcements about this plugin.
* If you need help, <a href="http://wordpress.org/tags/capsman?forum_id=10">ask in the Support forum</a>.
= I've found a bug or want to suggest a new feature. Where can I do it? =
* To fill a bug report or suggest a new feature, please fill a report in our <a href="http://tracker.alkivia.org/set_project.php?project_id=7&ref=view_all_bug_page.php">Bug Tracker</a>.
== License ==
Copyright 2009, 2010 Jordi Canals
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
== Changelog ==
= 1.3.2 =
* Added Swedish translation.
= 1.3.1 =
* Fixed a bug where administrators could not create or manage other administrators.
= 1.3 =
* Cannot edit users with more capabilities than current user.
* Cannot assign to users a role with more capabilities than current user.
* Solved an incompatibility with Chameleon theme.
* Migrated to the new Alkivia Framework.
* Changed license to GPL version 2.
= 1.2.5 =
* Tested up to WP 2.9.1.
= 1.2.4 =
* Added Italian translation.
= 1.2.3 =
* Added German and Belorussian translations.
= 1.2.2 =
* Added Russian translation.
= 1.2.1 =
* Coding Standards.
* Corrected internal links.
* Updated Framework.
= 1.2 =
* Added backup/restore tool.
= 1.1 =
* Role deletion added.
= 1.0.1 =
* Some code improvements.
* Updated Alkivia Framework.
= 1.0 =
* First public version.
== Upgrade Notice ==
= 1.3.2 =
Only Swedish translation.
= 1.3.1 =
Bug fixes.
= 1.3 =
Improved security esiting users. You can now create real user managers.

View File

@ -0,0 +1,18 @@
; $Id: alkivia.ini 203758 2010-02-10 19:01:07Z Txanny $
; If you set this file on your wp-content directory, it will override the plugin
; options, force to use this ones and disable them from the admin page.
; All alkivia plugins and themes share the same file. If you already have an
; alkivia.ini file in your wp-content directory, you can copy and paste this
; settings on it.
; The ini file is mostly used on WordPress MU, when we want to force all blogs to
; this settings and don't want to allow the blog administrators to change them.
; More information at http://wiki.alkivia.org/capsman/config
; SEE ALSO THE alkivia.ini FILE ON THE framework/samples folder.
[capsman]
; form-rows = 5

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -16,10 +16,10 @@ TABLE OF CONTENTS
/*-----------------------------------------------------------------------------------*/
if ( function_exists( 'wp_nav_menu') ) {
add_theme_support( 'nav-menus' );
register_nav_menus( array( 'primary-menu' => __( 'Primary Menu', 'woothemes' ) ) );
//register_nav_menus( array( 'primary-menu' => __( 'Primary Menu', 'woothemes' ) ) );
register_nav_menus( array( 'secondary-menu' => __( 'Secondary Menu', 'woothemes' ) ) );
register_nav_menus( array( 'top-menu' => __( 'Top Menu', 'woothemes' ) ) );
register_nav_menus( array( 'footer-menu' => __( 'Footer Menu', 'woothemes' ) ) );
//register_nav_menus( array( 'top-menu' => __( 'Top Menu', 'woothemes' ) ) );
//register_nav_menus( array( 'footer-menu' => __( 'Footer Menu', 'woothemes' ) ) );
}