PDA

View Full Version : javascript is bumping the 1st calendar down in multidisplay


Raemathra
07-29-2009, 11:37 AM
Just registered; the calendar is working well.

The display has a small issue... on this page
http://www.ncaep.com/events-calendar/
in Internet Explorer, not Firefox, the 1st calendar in the display is pushed down. When I view source, that table cell has this code, the other two do not:

<script type="text/JavaScript">
<!--
function popupEvent(ev, w, h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
win = window.open("/calendar/functions/popup.php?ev=" + ev + "&readFile=0&readSQL=1&showCat=&oc=1","Calendar","scrollbars=yes,status=no,location=no,toolbar=no,me nubar=no,directories=no,resizable=yes,width=" + w + ",height=" + h + ",top=" + wint + ",left=" + winl + "");
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//-->
</script></p>

It also has the closing < / p > tag with no opening < p >. I think this i the problem? I looked in various calendar files but could not locate this section of code.

It looks to me as if its coming from the calendar software itself. I am using Wordpress and there is nothing in the content for this page that contains any of the above, just the call to the calendar and the list.

How can get all 3 months to display with same spacing? thank you.

ve9gra
07-29-2009, 10:09 PM
Actually, if you look at http://www.ncaep.com/calendar/ you will see that the </p> is not in there. So you must have something in WP that parses the output and adds it.

BTW, I'm seeing the same issue in Safari.

Raemathra
07-30-2009, 09:13 AM
Thanks; I thought that since it was only showing up in one browser and not the other that it would not be a WP issue. After your reply, I searched how to make a custom static page for Wordpress so I wouldn't have to put the integration code for the calendar inside the post writing window for WP content.


One of the best WordPress help sites had clear directions how.

http://tamba2.org.uk/wordpress/static/

I got it working!:clap:

Of course, you still have to add the EasyPHPcalendar call in the head section... and I changed his line for the stylesheet as it didn't work from his directions... to help someone else embedding the calendar inside a WordPress theme, here is my head section for my static page:


<?php
/* Don't remove this line. */
require('./wp-blog-header.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/1">
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

<?php $CSS=1; require("calendar/calendar.php"); ?>

<?php wp_head(); ?>
</head>
and this is what I put inside the "content" divs (this is just my customizing for the calendar, you would use your own script):



<?php
$MULTI= 1;
$epcMultiWidth = "600px";
$epcMultiPad = 10;
$epcMultiNav = "580px";
$epcMultiCol = 3;
$epcMultiRow = 1;
$epcMultiAdv = 1;
require ("calendar/calendar.php");
?></div>
<div style="margin-top:15px; width:600px;">
<h4>Event Details</h4><br />
<?php
$LIST=1;
$listMonths = "3";
$DF = "M d - D";
$template="monthly.php";
require ("calendar/calendar.php");
?>

Note this page is NOT within the WordPress loop. My dropdown menu plugin shows, but this page won't be listed in the menu as it's not an official WP "Page" -- I will have to link to it directly.

In case anyone doesn't get Podz's instructions, my static calendar page was uploaded to the root, as that is where I uploaded the easyPHPcalendar folder. When he says the same place as your WP index.php he means the one for the blog setup, not the theme index.php.

Result is here: http://www.ncaep.com/calendar-page.php

Thanks for the help ve9gra it pointed me in the right direction.

ve9gra
07-30-2009, 10:05 AM
Actually, I have a step-by-step guide on how to integrate the calendar in WP on my site. http://www.epctutorials.com/

Part one is to add the small calendar to your sidebar, and part two is how to create a calendar page. You shouldn't have to create a static page outside of WP to integrate the calendar.