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


Go Back   Easy PHP Calendar > General Discussion > General Support

General Support Questions about using the Easy PHP Calendar. (Not installation or customizations)

Closed Thread
 
Thread Tools Search this Thread Display Modes

List events 30 days prior
Old 11-03-2006, 01:42 PM   #1
Joe Gurney
Calendar User
 
Joe Gurney is offline
Join Date: Oct 2006
Posts: 2
Default List events 30 days prior

First off let me say that the calendar works great. Keep up the great work!

What I am looking to do is display events which have occurred in the past 30 days on the list mode for one particular category.

I have the current months calendar displaying but as the month rolls over all of the past events disappear. Is there a way I can show events which happened in the past 30 days?

Thanks in advance for the help.

Joe
 

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

Before showing (requiring) the List Mode, you can set the month to the previous month using the $mo variable. This will probably get you close as there isn't an exact way to show the "past 30 days".
__________________
-- Brian

Questions?

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

Old 11-03-2006, 08:38 PM   #3
Joe Gurney
Calendar User
 
Joe Gurney is offline
Join Date: Oct 2006
Posts: 2
Default

One month works just as well <G>

Took me a little while to figure it out but I assume you meant to use the statement:

$mo = $mo -1;

In order to roll the list back one month.

Once I did that it did the trick....

One other little thing, is there a way to show the list mode in reverse order? So that the most recent event is near the top and older dates are towards the bottom?
 

Old 11-04-2006, 08:58 AM   #4
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,887
Default

The List Mode can only display events in chronological order.
__________________
-- Brian

Questions?

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

Old 11-04-2006, 09:28 AM   #5
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

You might want to add a check to make sure that you don't roll back $mo to 0.

if ($mo == 1) {
$mo = 12;
$yr -= 1;
} else {
$mo -= 1;
}
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 01-24-2008, 07:24 PM   #6
Mankul
Calendar User
 
Mankul is offline
Join Date: Nov 2007
Posts: 26
Question

Quote:
Originally Posted by Joe Gurney View Post
One month works just as well <G>



$mo = $mo -1;

In order to roll the list back one month.


Hi ve9gra,

Is there a way to roll back by week instead of months? i.e. someting like $week = $week -1; ? not familiar with php codes....
 

Old 01-24-2008, 09:47 PM   #7
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

No, that's not possible. The variables that control the display of the calendar and list is $mo (month) and $yr (year)... there's nothing that can set the week.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Last three month in multi-calendar mode
Old 02-22-2008, 11:05 AM   #8
Ihor
Calendar User
 
Ihor is offline
Join Date: Jan 2008
Posts: 16
Default Last three month in multi-calendar mode

I have searched in the forum but didn't find the answer on how to list last several month.

Like:

$listMonths = x;
Lists 'x' number of months from the currently displayed Month,

just backward.

Will you help please?
 

Old 02-22-2008, 12:52 PM   #9
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

You'd have to manipulate your variables to reset $mo and $yr to different values after you've displayed the calendar, in order to back them up 3 months.

Like $mo = $mo - 3;

You'd have to take into account the year in there too and check to make sure that you roll the month over to December for example if you're displaying February... to make sure you don't get a -1 for month.

And then use $listMonths=3; to display the list for the past three months.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

not working...
Old 02-22-2008, 01:41 PM   #10
Ihor
Calendar User
 
Ihor is offline
Join Date: Jan 2008
Posts: 16
Default not working...

this variables not working on my page - I have error message.

Probably I am missing something..

I'll try to put more clear:

There is only normal three calendars on the page.
I need to show the last month and the two previous - not two future.
Here the link:
http://svoboda-news.com/5.php

Also,
how can I change on-click pop-up window name from "Event Viewer" to another name?
 

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

Ah! You're not using the list. You're using the $MULTI option... Then you'd have to check if $mo and $yr have been initialized yet and then roll back 3 months before you display the calendars.

The quick and dirty way of doing that is simply by passing the variables in the URL. http://svoboda-news.com/5.php?mo=11&yr=2007

But that's not really nice... I know it's been posted somewhere, but can't check now... dinner is ready. Check back in later.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 02-22-2008, 06:25 PM   #12
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

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


$mo=$mo-3;
if(
$mo<1){$mo=$mo+12;$yr=$yr-1;} 
Paste this between the $MULTI and the require() lines... I didn't test it but I'm fairly confident that it will work.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 02-22-2008, 08:52 PM   #13
Ihor
Calendar User
 
Ihor is offline
Join Date: Jan 2008
Posts: 16
Default

Thank you! Looks like the dinner was tasty.

It works.
The only thing I had to change was $mo-3 to $mo-2.
 

Pop-up name
Old 02-22-2008, 09:03 PM   #14
Ihor
Calendar User
 
Ihor is offline
Join Date: Jan 2008
Posts: 16
Default Pop-up name

Almost forget..

How to change a pop-up window name?
 

Old 02-23-2008, 08:16 AM   #15
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

I don't think that it's possible. I haven't found anything in the language file, and the rest would be in /calendar/functions/popup.php [which is encrypted and not modifyable].
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 
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
Printing List of Events tina9msu General Support 4 10-05-2006 10:57 PM
list mode, popups, and multiple events dedawgg Customizations (Themes / Templates) 1 07-17-2006 07:41 PM
List Mode - Being able to list events far into future cmb1202 General Support 2 11-04-2005 10:39 AM
Display Empty Days in List Mode? Dakko General Support 1 07-26-2005 05:19 PM
list module doesn't list all events... hazonweb General Support 2 04-14-2005 04:34 PM



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