Slider - Display slider only on home page - fix in old thread didn't work for me Slider - Display slider only on home page - fix in old thread didn't work for me
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Slider - Display slider only on home page - fix in old thread didn't work for me

Started by scohen125, January 15, 2012, 01:48:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scohen125

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.

Αndré

Try to add
$superCage = Inspekt::makeSuperCage();
before the modified code block.

scohen125

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

scohen125

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. :)

scohen125

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

Αndré

It also works without the additional line for me. However, glad it works now :) Please don't forget to mark your thread as solved.