Cannot use 2 instances of Image Show GK4ver. 1.38

Easily add amazing slideshow to your Joomla website with free Image Show module and manage them using slide manager
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Oct 17, 2013 2:47 pm
Hello,
I want to use on my home page 2 instances of Image show, selecting gk_appsprotech style for both.
When I enable it, my site trow this error:

Fatal error: Cannot redeclare gk_substr() (previously declared in /homepages/21/d395408718/htdocs/cedom/modules/mod_image_show_gk4/styles/gk_appsprotech/view.php:16) in /homepages/21/d395408718/htdocs/cedom/modules/mod_image_show_gk4/styles/gk_appsprotech/view.php on line 22

I try to use custom id in both modules without lucky.
Thanks,
David.
User avatar
Expert Boarder

GK User
Fri Oct 18, 2013 6:22 am
Hi,

Please replace in the view.php file the following code:

Code: Select all
// substr function to use mb_* function if exists.
function gk_substr($text, $start, $limit) {
        if(function_exists('mb_substr')) {
                return mb_substr($text, $start, $limit);       
        } else {
                return substr($text, $start, $limit);
        }
}


with:

Code: Select all
if(function_exists('gk_substr') {
// substr function to use mb_* function if exists.
function gk_substr($text, $start, $limit) {
        if(function_exists('mb_substr')) {
                return mb_substr($text, $start, $limit);       
        } else {
                return substr($text, $start, $limit);
        }
}
}
User avatar
Administrator

GK User
Tue Oct 22, 2013 6:08 pm
Hello,
i change it but throws this error:

Parse error: syntax error, unexpected '{' in homepages/21/d395408718/htdocs/cedom/modules/mod_image_show_gk4/styles/gk_appsprotech/view.php on line 15
User avatar
Expert Boarder

GK User
Tue Oct 22, 2013 10:18 pm
Sorry, my mistake, the proper code is:

Code: Select all
if(function_exists('gk_substr')) {
// substr function to use mb_* function if exists.
function gk_substr($text, $start, $limit) {
        if(function_exists('mb_substr')) {
                return mb_substr($text, $start, $limit);       
        } else {
                return substr($text, $start, $limit);
        }
}
}
User avatar
Administrator


cron