Advanced search  

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

Pages: [1]   Go Down

Author Topic: Slider - Display slider only on home page - fix in old thread didn't work for me  (Read 6046 times)

0 Members and 1 Guest are viewing this topic.

scohen125

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Retina Gallery

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

Try to add
Code: [Select]
$superCage = Inspekt::makeSuperCage();before the modified code block.
Logged

scohen125

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Retina Gallery

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
Logged

scohen125

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Retina Gallery

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

scohen125

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Retina Gallery

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

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

Page created in 0.02 seconds with 20 queries.