Example #1
0
/**
 * Crea la sección de opciones para el borde de la barra de progreso
 * @param TitanFramework->createAdminPanel $panel Objeto funcional del panel donde se debe crear las opciones.
 * @return	void
 * @since	1.0
 */
function osp_blb_options_border($panel)
{
    $propiety = "border";
    $depends[OSP_BLB_ID . '_' . $propiety] = true;
    //ENCABEZADO DE SECCIÓN "Opciones Generales"
    $panel->createOption(array('name' => __('Border', OSP_BLB_HANDLER), 'type' => 'heading'));
    //ACTIVAR BORDE
    $panel->createOption(array('name' => __('Show Border', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'enable', 'desc' => __('Indicate if you want to show the border that surrounds loading bar.', OSP_BLB_HANDLER), 'default' => false, 'enabled' => __('Show', OSP_BLB_HANDLER), 'disabled' => __('Hide', OSP_BLB_HANDLER)));
    //COLOR DEL BORDE
    $panel->createOption(array('name' => __("(Border) Color", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Color", 'type' => 'color', 'desc' => __("Indicate the color of the borders. (Default: #000000)", OSP_BLB_HANDLER), 'default' => "#000000", 'depends' => $depends));
    //ANCHO DEL BORDE
    $panel->createOption(array('name' => __("(Border) Width", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Width", 'type' => 'number', 'desc' => __("Indicate the thickness of the borders. (Default:  1px)", OSP_BLB_HANDLER), 'default' => "1", 'min' => "0", "max" => "200", 'depends' => $depends));
    //VISUALIZACIÓN DE BORDES
    $panel->createOption(array('name' => __("(Border) Visibility", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Visibility", 'type' => 'multicheck', 'desc' => __("Indicate specifically that the borders should be shown.", OSP_BLB_HANDLER), 'options' => array('top' => __("Top", OSP_BLB_HANDLER), 'right' => __("Right", OSP_BLB_HANDLER), 'bottom' => __("Bottom", OSP_BLB_HANDLER), 'left' => __("Left", OSP_BLB_HANDLER)), 'default' => array('top', 'right', 'bottom', 'left'), 'depends' => $depends));
    //RADIO DE REDONDEO DEL BORDE
    $panel->createOption(array('name' => __("(Border) Rounded", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Radius", 'type' => 'number', 'desc' => __("Indicate the radius of the rounded borders. (Default: 0px)", OSP_BLB_HANDLER), 'default' => "0", 'min' => "0", "max" => "100", 'depends' => $depends));
    //ESTILO DEL BODE
    $panel->createOption(array('name' => __("(Border) Style", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Style", 'type' => 'select', 'desc' => __("Indicate the type of style of the borders. (Default: Solid)", OSP_BLB_HANDLER), 'options' => array('solid' => __("Solid", OSP_BLB_HANDLER), 'dotted' => __("Dotted", OSP_BLB_HANDLER), 'dashed' => __("Dashed", OSP_BLB_HANDLER), 'double' => __("Double", OSP_BLB_HANDLER), 'ridge' => __("Ridge", OSP_BLB_HANDLER), 'inset' => __("Inset", OSP_BLB_HANDLER), 'outset' => __("Outset", OSP_BLB_HANDLER)), 'default' => 'solid', 'depends' => $depends));
    //OPACIDAD DEL BORDE
    $panel->createOption(array('name' => __("(Border) Opacity", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Opacity", 'type' => 'number', 'desc' => __("Indicate the level of transparency of the borders. (Default: 100) ", OSP_BLB_HANDLER), 'default' => "100", 'min' => "0", "max" => "100", 'depends' => $depends));
    //GUARDAR DATOS
    osp_blb_options_save($panel);
}
Example #2
0
/**
 * Crea la sección de opciones para el texto a mostrar de la barra de progreso
 * @param TitanFramework->createAdminPanel $panel Objeto funcional del panel donde se debe crear las opciones.
 * @return	void
 * @since	1.0
 */
function osp_blb_options_font($panel)
{
    $propiety = "font";
    $depends[OSP_BLB_ID . '_' . $propiety] = true;
    //ENCABEZADO DE SECCIÓN "TEXTO"
    $panel->createOption(array('name' => __('Text', OSP_BLB_HANDLER), 'type' => 'heading'));
    //ACTIVAR ETIQUETA DE PROGRESO
    $panel->createOption(array('name' => __('Show Text', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'enable', 'desc' => __('Indicate if you want a descriptive text inside the loading bar.', OSP_BLB_HANDLER), 'default' => true, 'enabled' => __('Show', OSP_BLB_HANDLER), 'disabled' => __('Hide', OSP_BLB_HANDLER)));
    //APARIENCIA DE LA FUENTE
    $panel->createOption(array('name' => __('(Texto) Appearance', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Style", 'type' => 'font', 'desc' => __('Select the style that you want for the font of the text. We recommend that you choose <strong>(Web Safe Fonts)</strong> so that the load bar will be faster. The use of fonts from "Google WebFonts" may slow the display of the load bar, so that it will have to be loaded in advance.', OSP_BLB_HANDLER), 'preview_text' => __('0% 20% 40% 60% 80% 100% | Loading Page', OSP_BLB_HANDLER), 'show_text_transform' => false, 'show_font_variant' => false, 'default' => array('font-family' => 'Arial', 'color' => '#000000', 'font-size' => '15px', 'font-weight' => 'bold', 'line-height' => '1em'), 'depends' => $depends));
    //ALINEACIÓN HORIZONTAL
    $panel->createOption(array("name" => __('(Text) Horizontal Alignment', OSP_BLB_HANDLER), "id" => OSP_BLB_ID . '_' . $propiety . "AlignH", "type" => "select", 'options' => array('center' => __("Center", OSP_BLB_HANDLER), 'left' => __("Left", OSP_BLB_HANDLER), 'right' => __("Right", OSP_BLB_HANDLER)), "desc" => __('Indicate the alignment of text horizontally. (Default: Center)', OSP_BLB_HANDLER), "default" => "center", 'depends' => $depends));
    //ALINEACIÓN VERTICAL
    $panel->createOption(array("name" => __('(Text) Vertical Alignment', OSP_BLB_HANDLER), "id" => OSP_BLB_ID . '_' . $propiety . "AlignV", "type" => "select", 'options' => array('middle' => __("Middle", OSP_BLB_HANDLER), 'top' => __("Top", OSP_BLB_HANDLER), 'bottom' => __("Bottom", OSP_BLB_HANDLER)), "desc" => __('Indicate the alignment of the text vertically. (Default:Middle)', OSP_BLB_HANDLER), "default" => "middle", 'depends' => $depends));
    //ORIENTACIÓN DEL TEXTO
    $panel->createOption(array('name' => __('(Text) Rotation', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Orient", 'type' => 'number', 'desc' => __('Rotates text orientation, measured in degrees of angle. (Default:0)</br><strong>Warning:</strong>This attribute is only compatible with modern browsers.', OSP_BLB_HANDLER), 'default' => '0', 'min' => '0', 'max' => '360', 'step' => '10', 'depends' => $depends));
    //TEXTO A MOSTRAR
    $panel->createOption(array("name" => __('(Text) Content', OSP_BLB_HANDLER), "id" => OSP_BLB_ID . '_' . $propiety . "Text", "type" => "text", "desc" => __('Write the text contents that you want to show in the loading bar. There are special  tags that you can use.<ul><li><code>{title}</code> - This tag writes the title of the entry or page that is loading at that moment.</li><li><code>{progress}</code> - This tag writes the progress loading of the current page in percentage units. </li><li><code>{username}</code> - This tag writes the username that is loading the page.  The user should have logged in, or on the other hand it show the word "Visitor".</li></ul>', OSP_BLB_HANDLER), "default" => "{progress}%", 'depends' => $depends));
    //GUARDAR DATOS
    osp_blb_options_save($panel);
}
Example #3
0
/**
 * Crea la sección de opciones para indicar en donde se debe mostrar la barra de progreso
 * @param TitanFramework->createAdminPanel $panel Objeto funcional del panel donde se debe crear las opciones.
 * @return	void
 * @since	1.0
 */
function osp_blb_options_locations($panel)
{
    //ENCABEZADO DE SECCIÓN "¿DONDE QUIERES VISUALIZARLO?"
    $panel->createOption(array('name' => __('Display Locations', OSP_BLB_HANDLER), 'type' => 'heading'));
    //PAGINAS
    $panel->createOption(array('name' => __('Pages', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_locationPages', 'type' => 'select', 'desc' => __('Select the pages where you want the loading bar to appear.', OSP_BLB_HANDLER), 'options' => array('all' => __('All Pages', OSP_BLB_HANDLER), 'homepage' => __('Homepage', OSP_BLB_HANDLER), 'select' => __('Let me select the pages where to show it', OSP_BLB_HANDLER)), 'default' => 'all'));
    //SELECCIONAR PAGINAS
    $panel->createOption(array('name' => __('Select Pages', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_selectPages', 'type' => 'multicheck-pages', 'desc' => __('Select specifically the pages where you want to show the loading bar.', GAMBIT_LOADING_BAR), 'depends' => array(OSP_BLB_ID . '_locationPages' => 'select')));
    //CATEGORIAS
    $panel->createOption(array('name' => __('Posts Categories', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_locationCategories', 'type' => 'select', 'desc' => __('Select the posts categories where you want to show the loading bar.', OSP_BLB_HANDLER), 'options' => array('all' => __('All Categories', OSP_BLB_HANDLER), 'select' => __('Let me select the categories where to show it', OSP_BLB_HANDLER)), 'default' => 'all'));
    //SELECCIONAR CATEGORIAS
    $panel->createOption(array('name' => __('Select Categories', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_selectCategories', 'type' => 'multicheck-categories', 'desc' => __('Select specifically the posts categories where you want to show the loading bar.', GAMBIT_LOADING_BAR), 'depends' => array(OSP_BLB_ID . '_locationCategories' => 'select')));
    osp_blb_options_save($panel);
}
Example #4
0
/**
 * Crea un sección de opciones generales para la barra de progreso
 * @param TitanFramework->createAdminPanel $panel Objeto funcional del panel donde se debe crear las opciones.
 * @param array $propierties Array con las propiedades y opciones necesarias para crear las opciones
 * @return	void
 * @since	1.0
 */
function osp_blb_options_generals($panel, $properties)
{
    //ANIMACIÓN****************************************************************
    $propiety = "animation";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'select', 'options' => array('1' => __("FadeIn/FadeOut", OSP_BLB_HANDLER), '2' => __("Toggle", OSP_BLB_HANDLER)), 'desc' => $properties[$propiety][1], 'default' => '1'));
    }
    //POSICIÓN****************************************************************
    $propiety = "position";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'select', 'options' => array('top' => __("Top", OSP_BLB_HANDLER), 'right' => __("Right", OSP_BLB_HANDLER), 'bottom' => __("Bottom", OSP_BLB_HANDLER), 'left' => __("Left", OSP_BLB_HANDLER)), 'desc' => $properties[$propiety][1], 'default' => 'top'));
    }
    //COLOR*******************************************************************
    $propiety = "color";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'color', 'desc' => $properties[$propiety][1], 'default' => "#FF0000"));
    }
    //GROSOR*******************************************************************
    $propiety = "wide";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'number', 'desc' => $properties[$propiety][1], 'default' => '20', 'min' => '1', 'max' => '500'));
    }
    //DIRECCIÓN****************************************************************
    $propiety = "direction";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'enable', 'desc' => $properties[$propiety][1], 'default' => true, 'enabled' => __('Normal', OSP_BLB_HANDLER), 'disabled' => __('Reverse', OSP_BLB_HANDLER)));
    }
    //OPACIDAD****************************************************************
    $propiety = "opacity";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'number', 'desc' => $properties[$propiety][1], 'default' => "100", 'min' => "0", 'max' => "100"));
    }
    //CSS PERSONALIZADO*****************************************************************
    $propiety = "customCSS";
    if (array_key_exists($propiety, $properties)) {
        $panel->createOption(array('name' => $properties[$propiety][0], 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'code', 'desc' => $properties[$propiety][1], 'lang' => 'css'));
    }
    //GUARDAR DATOS
    osp_blb_options_save($panel);
}
Example #5
0
/**
 * Crea la sección de opciones para la sombra de la barra de progreso
 * @param TitanFramework->createAdminPanel $panel Objeto funcional del panel donde se debe crear las opciones.
 * @return	void
 * @since	1.0
 */
function osp_blb_options_shadow($panel)
{
    $propiety = "shadow";
    $depends[OSP_BLB_ID . '_' . $propiety] = true;
    //ENCABEZADO DE SECCIÓN "Opciones Generales"
    $panel->createOption(array('name' => __('Shadow', OSP_BLB_HANDLER), 'type' => 'heading'));
    //ACTIVAR SOMBRA
    $panel->createOption(array('name' => __('Show Shadow', OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety, 'type' => 'enable', 'desc' => __('Indicate if you want to show shading on the loading bar.', OSP_BLB_HANDLER), 'default' => false, 'enabled' => __('Show', OSP_BLB_HANDLER), 'disabled' => __('Hide', OSP_BLB_HANDLER)));
    //ENTORNO DE LA SOMBRA
    $panel->createOption(array('name' => __("(Shadow) Scope", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Scope", 'type' => 'enable', 'desc' => __("Indicate the scope where you want to show shading. (<b>Outside:</b> Outside the container | <b>Inside:</b> Inside the container)", OSP_BLB_HANDLER), 'default' => true, 'enabled' => __('Outside', OSP_BLB_HANDLER), 'disabled' => __('Inside', OSP_BLB_HANDLER), 'depends' => $depends));
    //COLOR DEL SOMBREADO
    $panel->createOption(array('name' => __("(Shadow) Color", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Color", 'type' => 'color', 'desc' => __("Indicate the color of shading. (Default: #FF0000)", OSP_BLB_HANDLER), 'default' => "#FF0000", 'depends' => $depends));
    //POSICIÓN X DE LA SOMBRA
    $panel->createOption(array('name' => __("(Shadow) Position X", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "PosX", 'type' => 'number', 'desc' => __("Indicate the position on the X-axis of shading with respect to loading bar. (Default: 0px)", OSP_BLB_HANDLER), 'default' => "0", 'min' => "-200", "max" => "200", 'depends' => $depends));
    //POSICIÓN Y DE LA SOMBRA
    $panel->createOption(array('name' => __("(Shadow) Position Y", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "PosY", 'type' => 'number', 'desc' => __("Indicate the position on the Y-axis of the shading with respect to the loading bar. (Default: 0px) ", OSP_BLB_HANDLER), 'default' => "0", 'min' => "-200", "max" => "200", 'depends' => $depends));
    //DIFUMINADO DE LA SOMBRA
    $panel->createOption(array('name' => __("(Shadow) Blur", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Dith", 'type' => 'number', 'desc' => __("Indicate the rate used to blur the shading. (Default: 10px)", OSP_BLB_HANDLER), 'default' => "5", 'min' => "-200", "max" => "200", 'depends' => $depends));
    //RADIO DE EXPANSION DE LA SOMBRA
    $panel->createOption(array('name' => __("(Shadow) Expansion ratio", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Spread", 'type' => 'number', 'desc' => __("Indicate the rate with which the shading expands. (Default: 10px)", OSP_BLB_HANDLER), 'default' => "2", 'min' => "-200", "max" => "200", 'depends' => $depends));
    //OPACIDAD DEL A SOMBRA
    $panel->createOption(array('name' => __("(Shadow) Opacity", OSP_BLB_HANDLER), 'id' => OSP_BLB_ID . '_' . $propiety . "Opacity", 'type' => 'number', 'desc' => __("Indicate the level of transparency of shading. (Default: 100)", OSP_BLB_HANDLER), 'default' => "100", 'min' => "0", "max" => "100", 'depends' => $depends));
    //GUARDAR DATOS
    osp_blb_options_save($panel);
}