forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: scohen125 on January 15, 2012, 01:48:01 am

Title: Slider - Display slider only on home page - fix in old thread didn't work for me
Post by: scohen125 on January 15, 2012, 01:48:01 am
My website is
www.RetinaGallery.com

and I've installed the newest version of slider plugin.

I'd like the slider to only display on the home page.  When I edit the codebase.php as suggested:

 http://forum.coppermine-gallery.net/index.php/topic,57388.msg336426.html#msg336426

with the edit:

Code: [Select]
// Add search display action
$thisplugin->add_filter('plugin_block','slider_mainpage');
// Add filter for page head
$thisplugin->add_action('page_start','slider_head');and replace with

Code: [Select]
if (!$superCage->get->keyExists('cat')) {
    // Add search display action
    $thisplugin->add_filter('plugin_block','slider_mainpage');
    // Add filter for page head
    $thisplugin->add_action('page_start','slider_head');
}

I get the following error message on the browser when I go to open my website:
Fatal error: Call to a member function keyExists() on a non-object in /home/content/52/6897452/html/plugins/slider/codebase.php on line 27
I have attached a copy of the edited codebase.php that I uploaded that gave the error.
Title: Re: Slider - Display slider only on home page - fix in old thread didn't work for me
Post by: Αndré on January 17, 2012, 11:41:15 am
Try to add
Code: [Select]
$superCage = Inspekt::makeSuperCage();before the modified code block.
Title: Re: Slider - Display slider only on home page - fix in old thread didn't work for me
Post by: scohen125 on January 17, 2012, 02:46:16 pm
I tried this revision and now the slider does not appear on the homepage or the subsequent pages.  I have attached the revised codebase.php file.

website: www.RetinaGallery.com
Title: Re: Slider - Display slider only on home page - fix in old thread didn't work for me
Post by: scohen125 on January 17, 2012, 02:47:50 pm
Andre,
Also, I neglected to say thank you for the help.  I appreciate it.  You must be busy with the recent update to the coppermine code.  Thanks again. :)
Title: Re: Slider - Display slider only on home page - fix in old thread didn't work for me
Post by: scohen125 on January 17, 2012, 03:12:35 pm
Andre,

I had not cleared my cache and reloaded the page when I uploaded the new code. 

YOUR ADDITIONAL LINE OF CODE DID WORK!
Thank you,
Steve
Title: Re: Slider - Display slider only on home page - fix in old thread didn't work for me
Post by: Αndré on January 17, 2012, 03:13:09 pm
It also works without the additional line for me. However, glad it works now :) Please don't forget to mark your thread as solved.