treesom Posted January 26, 2012 Share Posted January 26, 2012 Can anyone help me please, I am trying to place a PHP calendar into an existing DIV tag that used to hold a flash slideshow application, but we want to replace that with a calendar. Here is my code: echo '<div class="grid_9"> <div class="box"> <h2>'.$titleone.'</h2> <div class="block">'; if (!defined('BLOCK_FILE')) { Header('Location: ../index.php'); die(); } $modName = 'GCalendar'; $blockConfig = array('maxTitle' => 21, 'eventPrefix' => '• ', 'maxEvents' => 10, 'lookahead' => 2, 'twoColumn' => false, 'excludeCats' => array(), 'force_center' => false, ); require_once 'modules/' . $modName . '/language.php'; gcalGetLang($modName); require_once 'modules/' . $modName . '/gcal.inc.php'; require_once 'modules/' . $modName . '/common.inc.php'; require_once 'modules/' . $modName . '/getMonthlyEvents.php'; require_once 'modules/' . $modName . '/gcalBlock.php'; $config = getConfig(); list($year, $month, $today) = explode(',', date('Y,n,j')); $block = new GCalBlock($year, $month, $today, $config, $blockConfig); $content = $block->calendar(); $content .= '<br />'; $content .= $block->upcomingEvents(); echo '</div> </div> </div>'; When I try this above, I just get an 'Too many page loads' error, so I'm not sure what I've done wrong. Any help appreciated. Regards, Tree Quote Link to comment https://forums.phpfreaks.com/topic/255851-help-php-calendar-into-existing-div-box/ Share on other sites More sharing options...
treesom Posted January 27, 2012 Author Share Posted January 27, 2012 Can anyone help with this? I've tried adding the block php code to my theme.php, but I just get the same error message. Quote Link to comment https://forums.phpfreaks.com/topic/255851-help-php-calendar-into-existing-div-box/#findComment-1311658 Share on other sites More sharing options...
jcbones Posted January 27, 2012 Share Posted January 27, 2012 I'm not sure that is being returned from the PHP parser. What MVC or CMS are you using? I assume it is Joomla, because of the Mod name. Quote Link to comment https://forums.phpfreaks.com/topic/255851-help-php-calendar-into-existing-div-box/#findComment-1311816 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.