anycontent - 'n' times in album page plse ? anycontent - 'n' times in album page plse ?
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

anycontent - 'n' times in album page plse ?

Started by oneoddsock, February 11, 2006, 03:26:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oneoddsock

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


                    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