1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To combat forum spam, new accounts will need to make at least one (valid) post.
    Otherwise, we will periodically purge all users without posts or that haven't confirmed their account.

EPC within a DIV Container

Discussion in 'PHP-Nuke Integration' started by treesom, Jan 26, 2012.

Thread Status:
Not open for further replies.
  1. 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
  2. ve9gra

    ve9gra Support Team

    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.
  3. Ok, so if I take this code:

    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?
  4. ve9gra

    ve9gra Support Team

    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.
  5. ve9gra

    ve9gra Support Team

    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.
  6. 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.​
  7. ve9gra

    ve9gra Support Team

    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.
Thread Status:
Not open for further replies.

Share This Page