Fieldtype, Module

Developer
Supported

Color Picker Plus

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Shoe Shine Design & Development

     

You must be logged in to post.

RGB + Low Variables

Support Request

Percipio
Percipio

Hi,

I’m using Color Picker Plus 1.3.1 with Low Variables 2.5.0 - everything is good with hex values, but using the :rgb suffix, the tag just outputs as is; eg - {color_one:rgb} displays in the template, not the RGB value.

I’ve changed the early parsing makes no difference. Am I missing a trick here?

Thanks,

J

Stephen
# 1
Developer
Stephen

Hi J,
I’ll take a look as soon as possible and get back to you. What version of EE are you running?

Percipio
# 2
Percipio

Thanks Stephen - EE 2.9.2

Stephen
# 3
Developer
Stephen

Hi J,

I’m going to clean up the add-on’s code a bit before putting this in a new release, but below you’ll find the needed fix.

To get the rgb modifier working with Low Variables, you’ll want to add the following function to ft.color_picker_plus.php around line 525.

// --------------------------------------------------------------------
 
    /**
     * Display Modifier - for Low Variables
     */
    
public function display_var_tag($data$params$tagdata)
    
{
        
if (isset($params['mod']) && $params['mod'== 'rgb')
        
{
            
return $this->replace_rgb($data$params$tagdata);
        
}
    } 

Then, you’ll need to use LV tag syntax as follows:

{exp:low_variables:parse var="my_var" mod="rgb"

Let me know how it goes for you.