Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > Customizations (Themes / Templates)

Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy.

Closed Thread
 
Thread Tools Search this Thread Display Modes

Navigation table at top?
Old 11-29-2006, 04:31 PM   #1
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default Navigation table at top?

Is it possible to have the navigation table display at the top of the calendar instead of at the bottom? I tried searching for this in the forum and docs but couldn't find an answer.

Thanks,
Patrick
 

Old 11-29-2006, 07:04 PM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
Default

Yes, it is possible, but you'd need to add the navigation code manually.

You can disable the navigation on the page by adding $noNav="1"; just before requiring the calendar.

Then, add your own navigation code in just after $noNav="1"; and before requiring the calendar.

PHP Code:
  <table class="navTable" cellspacing="0" cellpadding="0">
  <tr> 
    <td align="left" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mb&amp;yr=$yb$anchorTag".$returnString2?>" class="navTableText"><?php echo $navLeft?></a></td>
    <td align="center" width="34%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$cmo&amp;yr=$cyr$anchorTag".$returnString2?>" class="navTableText"><?php echo $navMiddle ?></a></td>
    <td align="right" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mf&amp;yr=$yf$anchorTag".$returnString2?>" class="navTableText"><?php echo $navRight?></a></td>
  </tr>
  </table>
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 11-29-2006, 09:24 PM   #3
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default

Quote:
Originally Posted by Brian
Yes, it is possible, but you'd need to add the navigation code manually.
Thanks Brian. That should work.
 

links don't have correct values
Old 11-29-2006, 11:05 PM   #4
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default links don't have correct values

Quote:
Originally Posted by Brian
Yes, it is possible, but you'd need to add the navigation code manually.
Brian, when I use the code you provided, I get the navigation items at the top of the main calendar table. However, the links themselves do not generate the correct URL. The variables are blank. So, for the "next month" link, I get something like this:

http://mydomain.com/template.php?mo=&yr=

Instead of:

http://mydomain.com/template.php?mo=12&yr=2006

Should I be defining those variables somewhere?

Thanks,
Patrick
 

Old 11-30-2006, 09:19 AM   #5
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
Default

Add this too before the navigation code:

PHP Code:
<?php
$yb
=$yr;
  
$yf=$yr;
  
$mb=$mo-1;
  if (
$mb<1) {$mb=12$yb=$yr-1;}
  
$mf=$mo+1;
  if (
$mf>12) {$mf=1$yf=$yr+1;}

  
$cmo date("m");
  
$cyr date("Y");
?>
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 11-30-2006, 09:51 AM   #6
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default

Thanks again. That worked as expected.
 

Navigation no longer displaying
Old 01-02-2007, 03:15 PM   #7
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default Navigation no longer displaying

Sorry to revise this thread. However, it appears that sometime since the new year, the navigation on the little calendar is no longer displaying. Here is what I had previously that no longer seems to work:

Code:
<?php
$yb=$yr;
  $yf=$yr;
  $mb=$mo-1;
  if ($mb<1) {$mb=12; $yb=$yr-1;}
  $mf=$mo+1;
  if ($mf>12) {$mf=1; $yf=$yr+1;}

  $cmo = date("m");
  $cyr = date("Y");
?>
          <table class="navTable" cellspacing="0" cellpadding="0">
  <tr> 
    <td align="left" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mb&amp;yr=$yb$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navLeft; ?></a></td>
    <td align="center" width="34%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$cmo&amp;yr=$cyr$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navMiddle ?></a></td>
    <td align="right" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mf&amp;yr=$yf$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navRight; ?></a></td>
  </tr>
  </table>
	  <?php $noNav="1"; require($_SERVER["DOCUMENT_ROOT"]."/calendar/calendar.php"); ?>
I have checked the Setup and tried having the Navigation set to both "Show Navigation Table" and to not show the table.

Thanks for any help,
Patrick
 

Old 01-02-2007, 03:58 PM   #8
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

You probably need to initialize the $mo and $yr variables before using them. Add the following right after the <?php of the code you posted...
PHP Code:
(!isset($_REQUEST['mo'])?$mo=date('m'):$mo=$_REQUEST['mo']);
(!isset(
$_REQUEST['yr'])?$yr=date('Y'):$yr=$_REQUEST['yr']); 
Please post a link to your installation if it doesn't work so that we can see the actual problem.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 01-02-2007, 04:14 PM   #9
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default

Thanks for the reply. So, here is what my PHP code look like now:

Code:
<?php
(!isset($_REQUEST['mo'])?$mo=date('m'):$mo=$_REQUEST['mo']); 
(!isset($_REQUEST['yr'])?$yr=date('Y'):$yr=$_REQUEST['yr']); 
$yb=$yr;
  $yf=$yr;
  $mb=$mo-1;
  if ($mb<1) {$mb=12; $yb=$yr-1;}
  $mf=$mo+1;
  if ($mf>12) {$mf=1; $yf=$yr+1;}

  $cmo = date("m");
  $cyr = date("Y");
?>
But it still isn't working. You can see the page here http://summitschools.com/index.php

Thanks,
Patrick
 

Old 01-02-2007, 04:27 PM   #10
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Ahhh... I see! Some variables aren't initialized yet... Let me see what I can come up quick. Check back in about 1/2 hour.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 01-02-2007, 05:10 PM   #11
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Is it possible that your host/you have updated your PHP version?

I'm still looking into it and that's the only thing I can't check quickly.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 01-02-2007, 05:22 PM   #12
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default

I suppose it's possible the host updated the PHP version. It's at PHP 5. I have the option of going back to PHP 4 (but then I don't know what else that might impact).

Patrick
 

Old 01-02-2007, 05:53 PM   #13
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Create a new file with a .php extension with only the following for the content. Make the name a cryptic one.

Code:
<?php phpinfo(); ?>
Send me a link to it via the link in my signature.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 01-02-2007, 07:57 PM   #14
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

You can go ahead and delete the file now. I beleive it might be the way that the page is built... Let's see if this fixes it... Based upon post #9, add this right after <?php
PHP Code:
ob_start();
require(
"calendar.php");
ob_end_clean(); 
The explanation is that we're using output buffering to fake a calendar display in order to initialize all the required variables. The variables would normally be initialized by the $CSS or $OL sections, but if their output has been hardcoded (or for some other unknown reasons) they might end up un-initialized.

Let me know if this solves your issue.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 01-02-2007, 10:15 PM   #15
runemedia
Calendar User
 
runemedia is offline
Join Date: Nov 2006
Posts: 8
Default

Quote:
Originally Posted by ve9gra
Let me know if this solves your issue.
Thank you very much for your help. That indeed solved the issue (although I had to massage the path to the calendar.php... it's in a WordPress install).

I'm fairly certain it was working before the new year (2007), but I'm not certain.

Patrick
 

No text
Old 06-04-2007, 05:15 PM   #16
mltsy
Web Monkey / Videographer
 
mltsy is offline
Join Date: Jan 2007
Location: Duluth, MN
Posts: 17
Default No text

When I use this technique, I get a table, but the links have no text. Are the variables navLeft, navMiddle and navRight supposed to be set?

http://www.soleilpines.com/reservations.php

-Joe
 

$thisFile also not set
Old 06-04-2007, 05:17 PM   #17
mltsy
Web Monkey / Videographer
 
mltsy is offline
Join Date: Jan 2007
Location: Duluth, MN
Posts: 17
Default $thisFile also not set

I just notices that $thisFile must also not be set. Am I supposed to replace those or should those be initialized automatically for me? Thanks!
 

Old 06-04-2007, 05:47 PM   #18
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

That code must be used after the calendar, or else you have to do what's outlined in post #14.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 06-04-2007, 08:47 PM   #19
mltsy
Web Monkey / Videographer
 
mltsy is offline
Join Date: Jan 2007
Location: Duluth, MN
Posts: 17
Default

Oooh! I'm sorry. I misunderstood post 14 the first time. I will add that before my navigation table. Thanks!
 

Old 07-10-2007, 11:19 AM   #20
scitekmike
Calendar User
 
scitekmike is offline
Join Date: Jul 2007
Posts: 10
Default

Can someone post the final (full) code that makes this function? I've been reading through and trying to piece it together but it's getting confusing.
 

Old 07-10-2007, 04:27 PM   #21
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Code:
<?php
  (!isset($_REQUEST['mo'])?$mo=date('m'):$mo=$_REQUEST['mo']);
  (!isset($_REQUEST['yr'])?$yr=date('Y'):$yr=$_REQUEST['yr']);

  $yb=$yr;
  $yf=$yr;
  $mb=$mo-1;
  if ($mb<1) {$mb=12; $yb=$yr-1;}
  $mf=$mo+1;
  if ($mf>12) {$mf=1; $yf=$yr+1;}

  $cmo = date("m");
  $cyr = date("Y");
?>
<table class="navTable" cellspacing="0" cellpadding="0">
  <tr> 
    <td align="left" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mb&amp;yr=$yb$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navLeft; ?></a></td>
    <td align="center" width="34%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$cmo&amp;yr=$cyr$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navMiddle ?></a></td>
    <td align="right" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mf&amp;yr=$yf$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navRight; ?></a></td>
  </tr>
</table>
Only if you run into some problems, then post #14 might fix it, otherwise disregard it.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 07-11-2007, 11:12 AM   #22
scitekmike
Calendar User
 
scitekmike is offline
Join Date: Jul 2007
Posts: 10
Default

Quote:
Originally Posted by ve9gra View Post
Code:
<?php
  (!isset($_REQUEST['mo'])?$mo=date('m'):$mo=$_REQUEST['mo']);
  (!isset($_REQUEST['yr'])?$yr=date('Y'):$yr=$_REQUEST['yr']);

  $yb=$yr;
  $yf=$yr;
  $mb=$mo-1;
  if ($mb<1) {$mb=12; $yb=$yr-1;}
  $mf=$mo+1;
  if ($mf>12) {$mf=1; $yf=$yr+1;}

  $cmo = date("m");
  $cyr = date("Y");
?>
<table class="navTable" cellspacing="0" cellpadding="0">
  <tr> 
    <td align="left" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mb&amp;yr=$yb$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navLeft; ?></a></td>
    <td align="center" width="34%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$cmo&amp;yr=$cyr$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navMiddle ?></a></td>
    <td align="right" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mf&amp;yr=$yf$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navRight; ?></a></td>
  </tr>
</table>
Only if you run into some problems, then post #14 might fix it, otherwise disregard it.
Got it! Thanks!!
 

Old 07-18-2007, 01:41 PM   #23
achintya
Calendar User
 
achintya is offline
Join Date: Jul 2007
Posts: 1
Default

Which file is to be edited here?


Achintya


Quote:
Originally Posted by Brian View Post
Yes, it is possible, but you'd need to add the navigation code manually.

You can disable the navigation on the page by adding $noNav="1"; just before requiring the calendar.

Then, add your own navigation code in just after $noNav="1"; and before requiring the calendar.

PHP Code:
  <table class="navTable" cellspacing="0" cellpadding="0">
  <tr> 
    <td align="left" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mb&amp;yr=$yb$anchorTag".$returnString2?>" class="navTableText"><?php echo $navLeft?></a></td>
    <td align="center" width="34%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$cmo&amp;yr=$cyr$anchorTag".$returnString2?>" class="navTableText"><?php echo $navMiddle ?></a></td>
    <td align="right" width="33%"><a href="<?php echo "$thisFile?".$returnString.($returnString==""?"":"&")."mo=$mf&amp;yr=$yf$anchorTag".$returnString2?>" class="navTableText"><?php echo $navRight?></a></td>
  </tr>
  </table>
 

Old 07-18-2007, 06:57 PM   #24
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Whichever file you've integrated the calendar into. If you haven't integrated it in any file, then it would be /calendar/demo.php.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 08-24-2007, 10:54 PM   #25
clcope
Calendar User
 
clcope is offline
Join Date: Aug 2007
Posts: 11
Default

Is it possible to have the nav links in the same table as the month name? So that it looks like "<< August 2007 >>"?
 

Old 08-25-2007, 10:15 AM   #26
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
Default

This isn't possible in the current release.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Error with images when navigation is at the top
Old 10-14-2007, 09:42 PM   #27
stevendoyle
Calendar User
 
stevendoyle is offline
Join Date: Oct 2007
Posts: 2
Default Error with images when navigation is at the top

In the setup manager I used img tags to display gifs instead of text. This works perfectly at the bottom, but when I enter the code to have it displayed at the top as well, i see just the text of the tag (<img src=".......) with the formatting from the css. There is no error for the coding, because it is displaying the images at the bottom.


thanks!
steve
 

Old 10-16-2007, 07:09 PM   #28
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
Default

Can you provide a link to the page in question?
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 10-17-2007, 07:48 AM   #29
stevendoyle
Calendar User
 
stevendoyle is offline
Join Date: Oct 2007
Posts: 2
Default

http://www.stevendoyledesign.com/calendar.php
 

Old 10-17-2007, 12:34 PM   #30
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
Default

Viewing your source code, it appears all of your code is URL encoded. So instead of < you have &lt; . HTML requires the < if you want it to parse as HTML.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
multi-calendar navigation on top and bottom Abe General Support 3 03-19-2006 08:08 PM
epc_calendar table liaok General Support 2 08-25-2005 11:49 AM
Navigation Table Question SteveW General Support 3 05-25-2005 08:08 PM
What is the table name??? heritagelost General Support 1 01-05-2005 11:55 PM
Navigation table too wide! Judi Sohn General Support 3 03-11-2004 01:53 PM



All times are GMT -4. The time now is 02:12 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |