Forum Replies Created

Viewing 17 posts - 31 through 47 (of 47 total)
  • Author
    Posts
  • in reply to: Sidebar widgets background colour #396715

    For example in the sidebar of http://www.jtvdigital.com/blog/

    Let’s say the sign up plugin (mc4wp), how about setting up a background colour?

    Thanks

    in reply to: Add social icons / links in blog sidebar #396714

    Thanks but only the Facebook icon is displayed, please see here http://www.jtvdigital.com/blog/
    Thanks

    in reply to: Custom form fields width and Submit button #396559
    This reply has been marked as private.
    in reply to: Custom form fields width and Submit button #396353
    This reply has been marked as private.
    in reply to: Custom form fields width and Submit button #396352

    The tutorial is interesting indeed, also tried with the CSS options from the mc4wp plugin but still can’t achieve exactly what I wanted.

    – how to make the label fields 100% width? seems like the theme is overwriting the mc4wp CSS for fields width (it works on the “submit” button but not for fields)
    – how to change the font type, size and weight (make it bold for example) with mc4wp? (again seems like mc4wp CSS gets somehow overwritten)

    in reply to: Styling and increase font weight #395706

    Hello,

    Unfortunately the solution described here http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/ breaks the theme and prevents the site to load.
    Tried with function.php from the Child Theme and from the standard Enfold theme, same issue

    thanks

    • This reply was modified 9 years, 3 months ago by JTV Digital. Reason: issue when trying the solution
    in reply to: Custom form fields width and Submit button #395684

    Great tutorial, thanks

    in reply to: Custom form fields width and Submit button #395170
    This reply has been marked as private.
    in reply to: Styling and increase font weight #395166

    Thanks.

    Regarding 1. I am not sure the additional weights are loaded since adding this does not seem to have any effect.

    2. yes, ok. There is an option in the Advanced Styling to amend all headings at once, but it also affects the text / headings displayed in the Sliders, is that correct?
    So the only option to keep the sliders’ text let’s say White and have something else than the default colour for other headings (in the Main content or elsewhere), is to edit the colour of each “special heading”…etc manually?

    3. Footer widget titles are using the default font colour, size and are automatically in Capital letters, the idea was to find a way to play around these parameters

    Thanks

    in reply to: Custom form fields width and Submit button #395157
    This reply has been marked as private.
    in reply to: Custom form fields width and Submit button #395112

    Will try, thanks much

    in reply to: Modify "table.php" on a child theme #135194

    Thanks for everything!

    in reply to: Modify "table.php" on a child theme #135192

    Sorry Devin, but I don’t understand you. Can you tell me the code that I should insert in the functions.php and table.php?

    The functions.php is located here: child-theme/functions.php

    The table.php is located here: child-theme/table.php

    in reply to: Modify "table.php" on a child theme #135190

    Please, help me!

    in reply to: Modify "table.php" on a child theme #135189

    I created a file called “table.php” in the child theme folder. This is the content of the “table.php” file:

    <?php

    /**

    * Sidebar

    * Displays one of the registered Widget Areas of the theme

    */

    class avia_sc_table extends aviaShortcodeTemplate

    {

    static $table_count = 0;

    /**

    * Create the config array for the shortcode button

    */

    function shortcode_insert_button()

    {

    $this->config = __('Table', 'avia_framework' );

    $this->config = __('Content Elements', 'avia_framework' );

    $this->config = AviaBuilder::$path."sc-table.png";

    $this->config = 40;

    $this->config = 'avia-target-insert';

    $this->config = 'av_table';

    $this->config = array('modal_class' => 'bigscreen', 'before_save' => 'before_table_save');

    $this->config = array('av_row', 'av_cell','av_button');

    $this->config = __('Creates a data or pricing table', 'avia_framework' );

    }

    function extra_assets()

    {

    if(is_admin())

    {

    $ver = AviaBuilder::VERSION;

    wp_enqueue_script('avia_table_js' , AviaBuilder::$path.'js/avia-table.js' , array('avia_modal_js'), $ver, TRUE );

    //wp_enqueue_style( 'avia-table-style' , $this->$builder->assetsURL.'css/avia-table.css');

    }

    }

    /**

    * Popup Elements

    *

    * If this function is defined in a child class the element automatically gets an edit button, that, when pressed

    * opens a modal window that allows to edit the element properties

    *

    * @return void

    */

    function popup_elements()

    {

    $this->elements = array(

    array(

    "name" => __("Table Builder", 'avia_framework' ),

    "desc" => __("Start by adding columns and rows, then add content and styling to each.", 'avia_framework' ),

    "id" => "table",

    'container_class' =>"avia-element-fullwidth",

    "type" => "table",

    "row_style" => array( __('Default Row', 'avia_framework' ) => '',

    __('Heading Row', 'avia_framework' ) => 'avia-heading-row',

    __('Pricing Row', 'avia_framework' ) => 'avia-pricing-row',

    __('Button Row', 'avia_framework' ) => 'avia-button-row'

    ),

    "column_style" => array(__('Default Column', 'avia_framework' ) => '',

    __('Highlight Column', 'avia_framework' ) => 'avia-highlight-col',

    __('Description Column', 'avia_framework' ) => 'avia-desc-col',

    __('Center Text Column', 'avia_framework' ) => 'avia-center-col'

    )

    ),

    array(

    "name" => __("Table Purpose", 'avia_framework' ),

    "desc" => __("Choose if the table should be used to display tabular data or to display pricing options. (Difference: Pricing tables are flashier and try to stand out)", 'avia_framework' ),

    "id" => "purpose",

    "type" => "select",

    "std" => "pricing",

    "subtype" => array(

    __('Use the table as a Pricing Table', 'avia_framework' ) =>'pricing',

    __('Use the table to display tabular data', 'avia_framework' ) =>'tabular')),

    array(

    "name" => __("Table Caption", 'avia_framework' ),

    "desc" => __("Add a short caption to the table so visitors know what the data is about", 'avia_framework' ),

    "id" => "caption",

    "type" => "input",

    "std" => "",

    "required" => array("purpose","equals","tabular")

    )

    );

    }

    /**

    * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas

    * Most common usage is to define some markup in the $params which is then inserted into the drag and drop container

    * Less often used: $params to add data attributes, $params to modify the className

    *

    *

    * @param array $params this array holds the default values for $content and $args.

    * @return $params the return array usually holds an innerHtml key that holds item specific markup.

    */

    function editor_element($params)

    {

    $params = "config."' title='".$this->config."' />";

    $params.= "<div class='avia-element-label'>".$this->config."</div>";

    return $params;

    }

    /**

    * Editor Sub Element - this function defines the visual appearance of an element that is displayed within a modal window and on click opens its own modal window

    * Works in the same way as Editor Element

    * @param array $params this array holds the default values for $content and $args.

    * @return $params the return array usually holds an innerHtml key that holds item specific markup.

    */

    function editor_sub_element($params)

    {

    $template = $this->update_template("label", __("Element", 'avia_framework' ). ": {{label}}");

    $params = NULL;

    $params = "";

    $params .= "<div class='avia_image_container' {$template}>".__("Element", 'avia_framework' ).": ".$params."</div>";

    $params = array('modal_class'=>'mediumscreen');

    return $params;

    }

    /**

    * Frontend Shortcode Handler

    *

    * @param array $atts array of attributes

    * @param string $content text within enclosing form of shortcode element

    * @param string $shortcodename the shortcode found, when == callback name

    * @return string $output returns the modified html string

    */

    function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")

    {

    $atts = shortcode_atts(array('purpose' => 'pricing', 'caption' => ''), $atts);

    $depth = 2;

    $table_rows = ShortcodeHelper::shortcode2array($content, $depth);

    $output = "";

    if(empty($table_rows)) return;

    self::$table_count ++;

    switch($atts)

    {

    case "pricing": $output .= $this->pricing_table($table_rows, $atts, $meta); break;

    default: $output .= $this->data_table($table_rows, $atts, $meta); break;

    }

    return $output;

    }

    //resort the array so that its easier to do a liststlye output when using pricing tables

    function list_sort_array($table_rows)

    {

    $new = array();

    foreach($table_rows as $rk => $row)

    {

    foreach($row as $ck => $cell)

    {

    $new[$ck] = $cell;

    $new[$ck][] = $row;

    $new[$ck][] = $cell;

    }

    }

    return $new;

    }

    /*

    pricing table uses unordered lists to display the table structure

    */

    function pricing_table($table_rows, $atts, $meta)

    {

    $sorted_rows = $this->list_sort_array($table_rows);

    $output = "";

    $output .= "<div class='avia-table main_color avia-pricing-table-container avia-table-".self::$table_count." ".$meta."'>";

    $fallback_values = array();

    $empty_cells = false;

    foreach($sorted_rows as $ul_k => $ul)

    {

    $output .= "<div class='pricing-table-wrap'>";

    $output .= "<ul class='pricing-table ".$ul."'>";

    foreach($ul as $key => $li)

    {

    $content = trim(do_shortcode($li));

    if(empty($content))

    {

    $ul[$key] .= " empty-table-cell";

    $content = "{{content-{$key}}}";

    $empty_cells = true;

    }

    else if(empty($fallback_values[$key]))

    {

    $fallback_values[$key] = $content;

    }

    if(strpos($ul[$key],'avia-pricing-row') !== false)

    {

    $content = preg_replace('!($|€|¥|£|¢|¤|%|‰|¢|¤|£|¥|€)!','<span class="currency-symbol">$1</span>', $content);

    }

    if(strpos($ul[$key],'avia-pricing-row') !== false)

    {

    $content = preg_replace('!(one-time fee)!','<div class="onetimefee">$1</div>', $content);

    }

    $output .= "<li class='".$ul[$key]."'>";

    $output .= $key == 0 ? "<div class='first-table-item'>{$content}</div>" : $content;

    $output .= $key == 0 ? "<span class='pricing-extra'></span>" :"";

    $output .= "";

    }

    $output .= "";

    $output .= "</div>";

    }

    if($empty_cells)

    {

    foreach($fallback_values as $key => $value)

    {

    $output = str_replace("{{content-{$key}}}", "<span class='fallback-table-val'>".$value."</span>", $output);

    }

    }

    $output .= "</div>";

    return $output;

    }

    /*

    data table uses the real table html tag to display its structure

    */

    function data_table($table_rows, $atts, $meta)

    {

    $responsive_style = "";

    $output = "<table class='avia-table avia-data-table avia-table-".self::$table_count." ".$meta."'>";

    $output .= $atts ? "<caption>".$atts."</caption>" : "";

    $output .= "<tbody>";

    $counter = 0;

    foreach($table_rows as $rk => $row)

    {

    if(empty($row)) $row = array();

    $row_attributes = array_merge(array('row_style' => ""), $row);

    $output .= "<tr class='".$row_attributes."'>";

    foreach($row as $key => $cell)

    {

    if(empty($cell)) $cell = array();

    $cell_attributes = array_merge(array('col_style' => ""), $cell);

    $tag = $row_attributes == 'avia-heading-row' ? "th" : "td";

    $tag = $cell_attributes == 'avia-desc-col' ? "th" : $tag;

    if($rk == 0 && $tag == "th")

    {

    $responsive_style .= ".avia-table-".self::$table_count." td:nth-of-type({$counter}):before { content: '".$row[$counter]."'; } ";

    $counter ++;

    }

    $output .= "<{$tag} class='".$cell_attributes."'>";

    $output .= do_shortcode($cell);

    $output .= "</{$tag}>";

    }

    $output .= "</tr>";

    }

    $output .= "</tbody>";

    $output .= "</table>";

    $output .= "<style type='text/css'>{$responsive_style}</style>";

    return $output;

    }

    }

    And then, in the “functions.php” of my child theme I included the file “table.php”. This is the content of the “functions.php” file:

    <?php

    include("table.php");

    ?>

    But it still doesn’t work. Now when I go to the website it gives me an error…

    in reply to: Modify "table.php" on a child theme #135187

    The file “table.php” is in the “jtvdigital/config-templatebuilder/avia-shortcodes/”, but it doesn’t work. What can I do?

    in reply to: Modify "table.php" on a child theme #135185

    I created the folders “/child-theme-folder/config-templatebuilder/avia-shortcodes/”, and I added the modified “table.php” on it, but it doesn’t work.

Viewing 17 posts - 31 through 47 (of 47 total)