PDA

View Full Version : EPC within a DIV Container


treesom
01-26-2012, 01:31 PM
Hi,

I got the PHP Nuke module for EPC and the Block etc, but I don't want the calendar shown in a small block, i'd like to insert it at the top of my site, where a flash banner once was.

I've tried inserting the code from the block-calendar.php into the functions.php for my theme, but can't seem to get it to work.

I want to insert the calendar within a:
<div class="block">
<div id="container"></div>

Any help appreciated.

Thanks,
Tree

ve9gra
01-26-2012, 01:39 PM
Editing function.php is not the right way. You'll need to edit your theme to allow for a block to be placed where you want to, and then add the calendar block to that.

treesom
01-26-2012, 01:44 PM
Ok, so if I take this code:

<?php

if (eregi("block-Calendar.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

ob_start();
echo "<table width=\"100%\"><tr><td><div align=\"center\">";
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
$thisFile="index.php";
}

//required if you're going to use overLib
$OL=1; require ("calendar/calendar.php");

//makes the whole calendar point to a TOC link
unset($epcAltLink); $epcAltLink="modules.php?name=Calendar";

//the line that shows the calendar
require ("calendar/calendar.php");
echo "</div></td></tr></table>";
$content = ob_get_clean();
?>

And place that in my theme.php where I want the calendar to be placed?

Do I include the <?php> tags?

ve9gra
01-26-2012, 07:07 PM
No no no... Change your theme to add a spot to add a block.. then just add the block.

But first, read the rest of this forum... lots of info available on how to do a proper integration.

ve9gra
01-26-2012, 07:42 PM
I just re-read, and re-examined the module that's sticky'd...

If you already have a spot for the banner, can you not just place the block in that space? It's been such a long time since I've used PHP-Nuke. I seem to remember that you could reposition your blocks without messing with any code, as long as your theme allowed it.

treesom
01-27-2012, 06:57 AM
I've tried taking the PHP code from the block and placed it in the space for the banner, but I just get the following error on my site:

Sorry, too many page loads in so little time! Not sure what to do, as I can't seem to get this to work.

ve9gra
01-27-2012, 10:55 PM
No, not the code... don't touch the code. Just position the block where the banner should be. Forget code, just use the theme and plugin systems to position it where you want it.