I am using a modified version of the default theme, integrated into an existing site. I have 4 collections. I would like to display each collection on its own individual page within my site. Can I do this?
I've made some progress. The following allows me to post a specific collection:
<?php require("plogger/gallery.php"); if ($GLOBAL['plogger_level']=='collections' || $GLOBAL['plogger_level']=='collection' ) { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the collection here } ?>
I also include the following prior to the </head>: <?php the_gallery_head(); ?>
My collection placement is determined by this:
<?php the_gallery(); ?>
The gallery is there, however, I'm getting this error:
Notice: Undefined variable: GLOBAL in /home/public_html/interior_design.php on line 3
Notice: Undefined variable: GLOBAL in /home/public_html/interior_design.php on line 3
Hmm... I've been able to eliminate the error by cleaning up the code a bit:
<?php require("plogger/plogger.php"); require("plogger/gallery.php"); if ($GLOBALS['plogger_level']=='collection' || $GLOBALS['plogger_level']=='collection' ) { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the album here } ?>
However, despite what I thought earlier I am not able to call a specific album, instead the entire gallery in thumbnails is displayed. Ugh...
Can anyone shed some light on what I am doing wrong? Thanks
Now I've been able to properly call the specific gallery, however there are no images, only the "No Albums Sorry, but there are no images or albums in this collection yet."
Here is the updated code:
<?php require("plogger/plogger.php"); require("plogger/gallery.php"); if ($GLOBALS['plogger_level'] = 'collections' || $GLOBALS['plogger_level'] = 'collection') { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the album here } ?>
Slight modification but again - No images, only the "No Albums Sorry, but there are no images or albums in this collection yet."
Here is the updated code that I'm using:
<?php include("plogger/gallery.php");
if ($GLOBALS['plogger_level'] = 'collections' || $GLOBALS['plogger_level'] = 'collection') { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the collection here } ?>
As before I can call the specific collection, I can see it in the breadcrumb trail. Why no images?!? Any help would be most appreciated! :)
Special thanks to Mike (sidtheduck) for helping me out with this one!!
The functioning code is:
<?php include("plogger/gallery.php"); if ($GLOBALS['plogger_level'] = 'collections' || $GLOBALS['plogger_level'] = 'collection') { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the collection here plogger_init(); } ?>
Update on the if statement via Mike (sidtheduck): We would need "==" instead of a single "=", as the single "=" SETS the variable $GLOBALS['plogger_level'] value to 'collection' and doesn't COMPARE the value to 'collection'.
<?php include("plogger/gallery.php"); if ($GLOBALS['plogger_level'] = 'collections' || $GLOBALS['plogger_level'] = 'collection') { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the collection here plogger_init(); } ?>
needs to change to this:
<?php include("plogger/gallery.php"); if ($GLOBALS['plogger_level'] == 'collections' || $GLOBALS['plogger_level'] == 'collection') { $GLOBALS['plogger_level'] = 'collection'; $GLOBALS['plogger_id'] = 5; // Enter the id# of the collection here plogger_init(); } ?>