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

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

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