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?

* 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

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

  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!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.