forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: oneoddsock on February 11, 2006, 03:26:54 am

Title: anycontent - 'n' times in album page plse ?
Post by: oneoddsock on February 11, 2006, 03:26:54 am
hi,

 firstly thanks for a neat gallery solution  8)

 secondly I searched but I couldn't see this specific question (well I did but it wasn't in feature requests)

basically would like to have the ability to include the anycontent block multiple times in the album page, at the moment I've put it into my 1.4 index.php as a hack

Code: [Select]
                    case 'anycontent':
                        if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
// oneoddsock - use the matches number here
                    if($matches[2]) {
                      include("anycontent_$matches[2].php");
                    }
//                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                        }

so essentially when I define the content of the main page in Album list config I set 'anycontent,1/breadcrumb/catlist/alblist/anycontent,2' which allows me to have files anycontent_1.php and anycontent_2.php (or anycontent_'n'.php) pulled into different parts of the album page.

works @ http://oneoddsock.co.uk/gallery but perhaps there's a better way going forward ?  :)

Thanks!

oos