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

Use popup link in other part of website
Old 01-02-2006, 03:32 PM   #1
Napoleon
Calendar User
 
Napoleon is offline
Join Date: Jul 2004
Posts: 5
Default Use popup link in other part of website

Hi,

I've been playing around with this great calendar and created a shortlist of upcoming events that shows up under the actual calendar.
To do this, I query the database for the date and the description. I managed to feed this data into another great free newsticker.
My question is how can I regenerate the link to launch the popup also from this scrolling text.
The link in the actual calender looks like this:
/cal/popups/escalEV.php?ev="+ev+"&readFile=0&readSQL=1
where the bold part is a number that somehow is being calculated.
It would be great to be able to calculate this number myself.
You can take a look at my the page where I'm testing it now:
http://www.maxkarting.be/index_test.shtml

For those who are interested in the scrolling text should take a look at http://www.smartmenus.org/other.php
 

Old 01-02-2006, 04:42 PM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

ev denotes the day number for the events being displayed. It appears that you're using Version 5, so the number would coorepond to the number of days since the Unix timestamp began.
__________________
-- Brian

Questions?

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

Old 01-03-2006, 04:33 AM   #3
Napoleon
Calendar User
 
Napoleon is offline
Join Date: Jul 2004
Posts: 5
Default

Hi Brian,

thanks for the quick reply.
You're correct, I'm using version 5.
For the event sheduled on January 14, the link is http://www.maxkarting.be/cal/popups/...le=0&readSQL=1
So 13162 would be the unix timestamp. Normally timestamp is in seconds, but when I convert to days and take the timezone into account, it is correct. Unix timestamp began at January 1st 1970. Since then 13162 days passed.
I'll try to find out a way to convert the date to this particular format. Or if you have a ready-made solution you're welcome

If this has changed/improved in a newer version please tell me. I do understand supporting the older versions has its effect on improving the new versions.

Stephan

Last edited by Napoleon; 01-03-2006 at 05:51 AM.
 

Old 01-03-2006, 03:51 PM   #4
Napoleon
Calendar User
 
Napoleon is offline
Join Date: Jul 2004
Posts: 5
Default

OK,

I've just finished.

These are the lines that did the job:
list($y,$m,$d) = split('[-]',$startdate);
$tsplit=mktime(1,0,0,$m,$d,$y)/86400;

Notice the 1. Since my timezone is GMT+1, I guess this prevents from linking to the wrong date.

Then I added the popupevent javascript you use:

<script language="JavaScript" type="text/JavaScript">
<!--
function popupEvent(ev,w,h) {
var winl=(screen.width-w) / 2;
var wint=(screen.height-h) / 2;
win=window.open("/cal/popups/escalEV.php?ev="+ev+"&readFile=0&readSQL=1","ESCal endar","scrollbars=yes,status=no,location=no,toolb ar=no,menubar=no,directories=no,resizable=yes,widt h="+w+",height="+h+",top="+wint+",left="+winl+"" );
if (parseInt(navigator.appVersion) >=4) { win.window.focus();}
}
//-->
</script>

And that's it.

Thanks again for the quick reply.


Stephan
 
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
Popup Problems zen7 General Support 3 10-26-2005 03:05 PM
Popup link to load into iframe ShamanHack General Support 5 08-17-2005 10:11 AM
Date link to list page - not popup cantley General 1 08-16-2005 01:53 PM
POPUP link .iNiz General Support 0 07-13-2005 01:14 PM
How can I link from event day with no popup aemilius General Support 6 07-15-2004 11:23 AM



All times are GMT -4. The time now is 11:28 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 |