1. rossini
  2. Free Templates / Extensions
  3. Wednesday, 15 February 2017
  4.  Subscribe via email
I installed the free template J51 Classic. After installing the module J51Image_hover I have this problem:

Fatal error: Can not redeclare hex2RGB () (previously declared in /home/mhd-01/http://www.riservadicacciamodena.it/htdocs/templates/j51_classic/php/convert_rgb.php:13) in /home/mhd-01/http://www.riservadicacciamodena .com / htdocs / modules / mod_j51hover / php / ConvertRGB.php on line 28

How can I fix?

<?php
/**
* Convert a hexa decimal color code to its RGB equivalent
*
* Code base: http://www.php.net/manual/en/function.hexdec.php#99478
*
* @param string $hexStr (hexadecimal color value)
* @param boolean $returnAsString (if set true, returns the value separated by the separator character. Otherwise returns associative array)
* @param string $seperator (to separate RGB values. Applicable only if second parameter is true.)
* @return array or string (depending on second parameter. Returns False if invalid hex color value)
*
*/
function hex2RGB($hexStr, $returnAsString = false, $seperator = ',') {
$hexStr = preg_replace('/[^0-9a-f]/i', '', $hexStr); // Gets a proper hex string
//if shorthand notation, need some string manipulations
if(strlen($hexStr) == 3)
$hexStr = preg_replace('/([0-9A-F]{1})/i','$1$1',$hexStr);
if ( strlen($hexStr) != 6) {//Invalid hex color code
return false;
}
$rgbArray = array();
$colorVal = hexdec($hexStr);
$rgbArray['red'] = 0xFF & ($colorVal >> 0x10);
$rgbArray['green'] = 0xFF & ($colorVal >> 0x8);
$rgbArray['blue'] = 0xFF & $colorVal;
// returns the rgb string or the associative array
return $returnAsString ? implode($seperator, $rgbArray) : $rgbArray;
}
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

May I suggest sending temporary administration access to your Joomla installation to info@joomla51.com and we will examine this issue further. For our reference please paste a link to this post in your email.

CiarĂ¡n
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!