| Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy. |
 |
Navigation table at top? |
 |
11-29-2006, 04:31 PM
|
#1
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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
|
|
|
|
 |
|
 |
11-29-2006, 07:04 PM
|
#2
|
|
EPC Developer
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
|
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&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&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&yr=$yf$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navRight; ?></a></td> </tr> </table>
|
|
|
|
 |
11-29-2006, 09:24 PM
|
#3
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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 |
 |
11-29-2006, 11:05 PM
|
#4
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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
|
|
|
|
11-30-2006, 09:19 AM
|
#5
|
|
EPC Developer
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
|
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"); ?>
|
|
|
|
11-30-2006, 09:51 AM
|
#6
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
Thanks again. That worked as expected.
|
|
|
|
 |
Navigation no longer displaying |
 |
01-02-2007, 03:15 PM
|
#7
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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&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&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&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
|
|
|
|
 |
01-02-2007, 03:58 PM
|
#8
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
01-02-2007, 04:14 PM
|
#9
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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
|
|
|
|
01-02-2007, 04:27 PM
|
#10
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
01-02-2007, 05:10 PM
|
#11
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
01-02-2007, 05:22 PM
|
#12
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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
|
|
|
|
01-02-2007, 05:53 PM
|
#13
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
01-02-2007, 07:57 PM
|
#14
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
01-02-2007, 10:15 PM
|
#15
|
|
Calendar User
runemedia is offline
Join Date: Nov 2006
Posts: 8
|
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 |
 |
06-04-2007, 05:15 PM
|
#16
|
|
Web Monkey / Videographer
mltsy is offline
Join Date: Jan 2007
Location: Duluth, MN
Posts: 17
|
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 |
 |
06-04-2007, 05:17 PM
|
#17
|
|
Web Monkey / Videographer
mltsy is offline
Join Date: Jan 2007
Location: Duluth, MN
Posts: 17
|
$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!
|
|
|
|
06-04-2007, 05:47 PM
|
#18
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
06-04-2007, 08:47 PM
|
#19
|
|
Web Monkey / Videographer
mltsy is offline
Join Date: Jan 2007
Location: Duluth, MN
Posts: 17
|
Oooh! I'm sorry. I misunderstood post 14 the first time. I will add that before my navigation table. Thanks!
|
|
|
|
07-10-2007, 11:19 AM
|
#20
|
|
Calendar User
scitekmike is offline
Join Date: Jul 2007
Posts: 10
|
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.
|
|
|
|
 |
|
 |
07-10-2007, 04:27 PM
|
#21
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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&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&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&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.
|
|
|
|
 |
 |
|
 |
07-11-2007, 11:12 AM
|
#22
|
|
Calendar User
scitekmike is offline
Join Date: Jul 2007
Posts: 10
|
Quote:
Originally Posted by ve9gra
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&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&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&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!!
|
|
|
|
 |
 |
|
 |
07-18-2007, 01:41 PM
|
#23
|
|
Calendar User
achintya is offline
Join Date: Jul 2007
Posts: 1
|
Which file is to be edited here?
Achintya
Quote:
Originally Posted by Brian
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&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&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&yr=$yf$anchorTag".$returnString2; ?>" class="navTableText"><?php echo $navRight; ?></a></td> </tr> </table>
|
|
|
|
|
 |
07-18-2007, 06:57 PM
|
#24
|
|
Support Team
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
|
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.
|
|
|
|
08-24-2007, 10:54 PM
|
#25
|
|
Calendar User
clcope is offline
Join Date: Aug 2007
Posts: 11
|
Is it possible to have the nav links in the same table as the month name? So that it looks like "<< August 2007 >>"?
|
|
|
|
08-25-2007, 10:15 AM
|
#26
|
|
EPC Developer
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
|
This isn't possible in the current release.
|
|
|
|
 |
Error with images when navigation is at the top |
 |
10-14-2007, 09:42 PM
|
#27
|
|
Calendar User
stevendoyle is offline
Join Date: Oct 2007
Posts: 2
|
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
|
|
|
|
10-16-2007, 07:09 PM
|
#28
|
|
EPC Developer
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
|
Can you provide a link to the page in question?
|
|
|
|
10-17-2007, 07:48 AM
|
#29
|
|
Calendar User
stevendoyle is offline
Join Date: Oct 2007
Posts: 2
|
|
|
|
|
10-17-2007, 12:34 PM
|
#30
|
|
EPC Developer
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,885
|
Viewing your source code, it appears all of your code is URL encoded. So instead of < you have < . HTML requires the < if you want it to parse as HTML.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:12 AM.
|