Forums / All Other Contributions/Addons / Event Calendar v3

Event Calendar v3

Locked

Views: 68,123

Results 101 to 120 of 500
This thread is locked. New replies are disabled.
1 Mar 2009, 12:17 PM
#101
seanymph avatar

seanymph

New Zenner

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
58
Plugin Contributions:
0

Event Calendar v3

Hi everyone
Sorry about this but just in case you view my previous post and notice the module isn't there I have removed it for the time being.

I still would love to use this module later on down the track so if anyone can advise me as to why it was not showing the calendar or any information regarding the event please let me know.

Thanks.

31 May 2009, 4:27 AM
#102
diosa avatar

diosa

New Zenner

Join Date:
Mar 2006
Posts:
7
Plugin Contributions:
0

Re: Event Calendar v3

[email protected]:

hrinfo,
Did you resolve your issue?

I am experiencing the same problem. All with this module seems fine EXCEPT in Admin -> Event Manager, when I click the "new event" button it does nothing. So I seem to be unable to enter any events.

I am going to start backtracking again through all the posts in this thread in the hopes of spotting something I have missed but I'm really confused by this problem. I am under an urgent deadline so if you can point me at a fix please, please do so.

BTW, the gypsyangel.com implementation looks great! (to the programmer that rolled that out for their customer) Great job getting the calendar mod up and running!

Thanks in advance for any and all replies,
Ian

I have this same issue with "Admin -> Event Manager, when I click the "new event" button it does nothing. So I seem to be unable to enter any events."
It works great in my test environment as I have implimented the cleaned files that have been recommended. I then moved the same exact files and all to my live site and now I have this issue.

Any help would be greatly appreciated.

31 May 2009, 8:33 AM
#103
hrinfo avatar

hrinfo

New Zenner

Join Date:
May 2008
Posts:
98
Plugin Contributions:
0

Re: Event Calendar v3

Sorry but after trying everything I could not get it to work so I gave up. As far as I can tell there are only very few people that have managed to implement the calendar as there were issues with the code been scrambled on saving. Some people had to go through each file before they managed to get it working which I tried but without success.

It would be nice if someone had updated this module but as far as I know that has not happened.

Tassos

31 May 2009, 3:36 PM
#104
diosa avatar

diosa

New Zenner

Join Date:
Mar 2006
Posts:
7
Plugin Contributions:
0

Re: Event Calendar v3

What's really weird is that I can get it working perfectly in my test environment but when I move it to production (live) site, that's when I have the issue of not being able to change the month on the store pages, or when I click on "New Event" in the admin it does nothing.

Could it have something to do with the sql as my test environment run on sql version 4 and production is sql version 5?

31 May 2009, 4:57 PM
#105
diosa avatar

diosa

New Zenner

Join Date:
Mar 2006
Posts:
7
Plugin Contributions:
0

Re: Event Calendar v3

I did update sql in testing and the calendar works fine. But still no go in production.

3 Jun 2009, 11:01 PM
#106
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Event Calendar v3

dw08gm:

I am seeking a calendar layout display similar to that used for this support forum, ie http://www.zen-cart.com/forum/calendar.php,

...I would like to insert a small thumbnail with caption and links to products catering to future events.

I tried out this Event Calendar plugin for Zen Cart and did not get too far because of the inherent limitations of the calendar.

However, one of the main reasons I installed the Wordpress on ZenCart Plugin was because it has a great CALENDAR plugin that has the potential to do something close to what you are referring to.

Here is a link to my calendar inside of wordpress inside of zen cart:
http://fabricstashinc.com/index/page_id/209

The date for the 7th of June links to the product to purchase this class. This is an example of calendar linking to product.

4 Jun 2009, 3:23 AM
#107
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Hi Rainthebat

Thanks for posting - what a great find. :clap:

I especially like the mouse-over popup facility. Does this come with the calendar?

I had looked at Wordpress awhile back for blogging, but went cold on the idea when I heard it had security issues. However, now that you have opened my eyes to its other possibilities, I will have to reconsider.

Best Regards

4 Jun 2009, 3:40 PM
#108
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Event Calendar v3

dw08gm:

I especially like the mouse-over popup facility. Does this come with the calendar?
The mouse-over popup came with the calendar, yes.

I should have mentioned in the last post that getting some of this stuff up and running can be a little time consuming, especially when you encounter problems that are new. Specifically, getting wordpress up (the way you want it to look) takes a little effort. Also the plugins for wordpress sometimes produce conflicts, so think minimalism as far as add-ons for wordpress are concerned.

dw08gm:

I had looked at Wordpress awhile back for blogging, but went cold on the idea when I heard it had security issues. However, now that you have opened my eyes to its other possibilities, I will have to reconsider.

Oh, not sure what the security issues were, perhaps since then they have been resolved. If you get any more info about it, please let me know as I will have to weigh the issue.

5 Jul 2009, 7:49 AM
#109
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Event Calendar v3

bigbadboy:

Hi Guys,

Installed this module on a vanilla ZC 1.3.8a install and all seems to work fine EXCEPT the sidebox contains that whole site!
Any ideas?

I have the same issue. What I can establish is this:

  1. The sidebox is meant to contain an <iframe> of a page called index.php?main_page=events_calendar_include.

  2. On some sites (that people have given as examples on this thread), if you look at the SOURCE CODE of that frame, it contains all the HTML headers, but strips out the header, left column, right column and footer. It is not doing this on our sites - we are getting the full MAIN PAGE in that iframe.

The page source should look like this inside the iframe:

 <!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" dir="ltr" lang="en">
<head>
<title>Zen Cart!, The Art of E-commerce</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="ecommerce, open source, shop, online shopping " />
<meta name="description" content="Zen Cart! :  - ecommerce, open source, shop, online shopping" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />

<base href="http://zencart-test-site.com/demo1/" />

<link rel="stylesheet" type="text/css" href="includes/templates/joe/css/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="includes/templates/joe/css/stylesheet_css_buttons.css" />

<link rel="stylesheet" type="text/css" href="includes/templates/joe/css/stylesheet_events_calendar.css" />
<link rel="stylesheet" type="text/css" media="print" href="includes/templates/joe/css/print_stylesheet.css" />
</head>

<body id="eventscalendarincludeBody">

<div id="mainWrapper">


<SCRIPT LANGUAGE="JavaScript">
    function jump(view, url)
    {
        if (document.all||document.getElementById)
        {
            month= document.calendar._month.options[document.calendar._month.selectedIndex].value;
            year=  document.calendar._year.options[document.calendar._year.selectedIndex].value;
            return url +'&_month='+ month +'&_year='+ year +'&year_view='+ view;
        }
    }

</SCRIPT>

<!-- events_calendar //-->
  


<table class="calendarBox" cellspacing="1" cellpadding="2">
    <tr>
        <td align="center" valign="top">
            <table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr class="calendarHeader">
<td align="left"><a href="http://zencart-test-site.com/demo1/index.php?main_page=events_calendar&_month=07&_year=2009" target="_parent">July 2009</a></td>
<td align="center" class="yearHeader">
<a href=index.php?main_page=events_calendar_include&eventmode=eventframe&_month=6&_year=2009 target=calendar title=June 2009 ><</a></td>
<td align="center" class="yearHeader"><a href=index.php?main_page=events_calendar_include&eventmode=eventframe&_month=8&_year=2009 target=calendar title=August 2009 >></a></td></tr>

<tr><td colspan="3">
<table cellspacing="0" cellpadding="0" border="0" class="calendarMonth"><tr class="calendarHeader">
<td align="center" valign="middle">S</td>
<td align="center" valign="middle">M</td>
<td align="center" valign="middle">T</td>
<td align="center" valign="middle">W</td>
<td align="center" valign="middle">T</td>
<td align="center" valign="middle">F</td>
<td align="center" valign="middle">S</td>
</tr>

<tr>
<td class="empty"> </td>
<td class="empty"> </td>
<td class="empty"> </td>
<td class="calendar" align="left" valign="bottom">1</td>
<td class="calendar" align="left" valign="bottom">2</td>
<td class="calendar" align="left" valign="bottom">3</td>
<td class="calendarWeekend" align="left" valign="bottom">4</td>
</tr>
<tr>
<td class="calendarToday" onclick=top.window.location="index.php?main_page=events_calendar&_day=05&_month=07&_year=2009"><a href="index.php?main_page=events_calendar&_day=05&_month=07&_year=2009" target="_parent" title="Click for events">5</a></td>
<td class="calendar" align="left" valign="bottom">6</td>

<td class="calendar" align="left" valign="bottom">7</td>
<td class="calendar" align="left" valign="bottom">8</td>
<td class="calendar" align="left" valign="bottom">9</td>
<td class="calendar" align="left" valign="bottom">10</td>
<td class="calendarWeekend" align="left" valign="bottom">11</td>
</tr>
<tr>
<td class="calendarWeekend" align="left" valign="bottom">12</td>
<td class="calendar" align="left" valign="bottom">13</td>
<td class="calendar" align="left" valign="bottom">14</td>

<td class="calendar" align="left" valign="bottom">15</td>
<td class="calendar" align="left" valign="bottom">16</td>
<td class="calendar" align="left" valign="bottom">17</td>
<td class="calendarWeekend" align="left" valign="bottom">18</td>
</tr>
<tr>
<td class="calendarWeekend" align="left" valign="bottom">19</td>
<td class="calendar" align="left" valign="bottom">20</td>
<td class="calendar" align="left" valign="bottom">21</td>
<td class="calendar" align="left" valign="bottom">22</td>

<td class="calendar" align="left" valign="bottom">23</td>
<td class="calendar" align="left" valign="bottom">24</td>
<td class="calendarWeekend" align="left" valign="bottom">25</td>
</tr>
<tr>
<td class="calendarWeekend" align="left" valign="bottom">26</td>
<td class="calendar" align="left" valign="bottom">27</td>
<td class="calendar" align="left" valign="bottom">28</td>
<td class="calendar" align="left" valign="bottom">29</td>
<td class="calendar" align="left" valign="bottom">30</td>

<td class="calendar" align="left" valign="bottom">31</td>
<td class="empty"> </td>
</tr>
</table>
</td></tr></table>
        </td>
    </tr>
    
    <tr>
        <td class="yearHeader" align="center" valign="top">
        <form style="margin:0; padding:0" method="get" name="calendar" action="index.php?main_page=events_calendar">
            <!-- Month List -->

            <select name="_month">
                                    <option value="1"  >
                            JAN                        </option> 
                                    <option value="2"  >
                            FEB                        </option> 
                                    <option value="3"  >
                            MAR                        </option> 
                                    <option value="4"  >
                            APR                        </option> 
                                    <option value="5"  >

                            MAY                        </option> 
                                    <option value="6"  >
                            JUN                        </option> 
                                    <option value="7" selected >
                            JUL                        </option> 
                                    <option value="8"  >
                            AUG                        </option> 
                                    <option value="9"  >
                            SEP                        </option> 
                                    <option value="10"  >

                            OCT                        </option> 
                                    <option value="11"  >
                            NOV                        </option> 
                                    <option value="12"  >
                            DEC                        </option> 
                        </select><select name="_year">
            <!-- Year List -->
            <option value="2009" selected>2009</option>

<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
            </select><input type="button" class="yearHeaderButton" title=" view selected month " value=">" onclick="top.window.location=jump(0,'index.php?main_page=events_calendar')"/>
        </form>
</td>
</tr>
    <tr>
      <td class="yearHeader" align="center" valign="top">

        <input type="button" class="yearHeaderButton" title=" view selected year " value=" Y " onClick="top.window.location=jump(1,'index.php?main_page=events_calendar')"/>
      </td>
    </tr>
</table>
<!-- events_calendar //-->

</td>

  </tr>
</table>


</body></html>

I am not skilled enough in PHP to know why the entire MAIN PAGE is loading into the iframe, rather than just:
/index.php?main_page=events_calendar_include
but I think it has something to do with calendar.php in the classes folder...

I would appreciate taking a look at this class file from a site where the sidebox is working OK, and also, I'd like to know what version of ZC is installed on sites where this is working.

20 years a Zencart User

6 Aug 2009, 11:41 AM
#110
roylen1 avatar

roylen1

New Zenner

Join Date:
May 2009
Posts:
38
Plugin Contributions:
0

Re: Event Calendar v3

@schoolboy
I had the same issue. i ran the sql statement as per step 1 and it went away
"1)Install database sql file tabelenupdate.sql from admin/tools/install sql patches"

10 Sep 2009, 11:36 PM
#111
bgallagher avatar

bgallagher

New Zenner

Join Date:
Feb 2008
Posts:
41
Plugin Contributions:
0

Re: Event Calendar v3

Has anyone been able to get this event calendar to work properly?
~B.

11 Sep 2009, 12:10 AM
#112
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: Event Calendar v3

I gave up on that calendar. But I did find a great substitute. It's low cost and the developer offers great support. If you have problems installing it, he will install it for you.

It's not meant to be a ZenCart plugin, but you can add the code to an EZPAGE and it will work great! To customers it looks like part of your site. There is a demo on his site...

http://www.availabilitybookingcalendar.com/event-booking/

Vicky
Compass Web Services - Templates for Zen Cart
http://www.compasswebservices.com/

17 Sep 2009, 10:52 PM
#113
richardr avatar

richardr

New Zenner

Join Date:
Jul 2009
Location:
Maryland
Posts:
34
Plugin Contributions:
0

Re: Event Calendar v3

falstaffpac:

I'm a little reluctant to post these files because:

  1. It is not my work
  2. I am not a programmer so I cannot offer support

Unfortunately, this script has not received much support lately and I think its pretty cool when it works. So, I've included the code of the 2 files I formatted below. I hope this is enough to get your calendar working. Beyond this, I don't know that I can be of much help.

/includes/classes/calendar.php

<?php /** --------------------------------------------------------------------- */ /** zen-cart Open Source E-commerce */ /** --------------------------------------------------------------------- */ /** Copyright (c) 2003 The zen-cart developers */ /** */ /** http://www.zen-cart.com/index.php */ /** */ /** Portions Copyright (c) 2003 osCommerce */ /** ---------------------------------------------------------------------- */ /** This source file is subject to version 2.0 of the GPL license, */ /** that is bundled with this package in the file LICENSE, and is */ /** available through the world-wide-web at the following url: */ /** http://www.zen-cart.com/license/2_0.txt. */ /** If you did not receive a copy of the zen-cart license and are unable */ /** to obtain it through the world-wide-web, please send a note to */ /** [email protected] so we can mail you a copy immediately. */ /** ---------------------------------------------------------------------- */ /** $Id: events_manager.php 2007-07-10 [email protected] */ class Calendar { function Calendar() { } function getDayNames() { return $this->dayNames; } function setDayNames($names) { $this->dayNames = $names; } function getMonthNames() { $this->monthNames; } function setMonthNames($names) { $this->monthNames = $names; } function getStartDay() { return $this->startDay; } function setStartDay($day) { $this->startDay = $day; } function getStartMonth() { return $this->startMonth; } function setStartMonth($month) { $this->startMonth = $month; } function getCalendarLink($month, $year) { return "&_month=$month&_year=$year"; } function pad($s, $n) { $r = $s; while (strlen($r) < $n) { $r = "0".$r; } return $r; } function getFileName($day, $month, $year) { return $this->pad($year, 4) ."-". $this->pad($month, 2) ."-". $this->pad($day, 2); } function getDbLink($day, $month, $year) { global $db; $dateString = $this->getFileName($day, $month, $year); $event = $db->Execute("select start_date from " . TABLE_EVENTS_CALENDAR . " where '" . $dateString . "' between start_date and end_date"); if($event->RecordCount() > 0) { while (!$event->EOF) { /* get the first event for this day's start date for the link */ list($year_start, $month_start, $day_start) = split ('[/.-]', $event->fields['start_date']); break; $event->MoveNext(); } $bname = FILENAME_EVENTS_CALENDAR; return "index.php?main_page=".$bname."&_day=".$day_start."&_month=".$month_start."&_year=".$year_start.""; } } function getCurrentMonthView() { $d = getdate(time()); return $this->getMonthView($d["mon"], $d["year"]); } function getCurrentYearView() { $d = getdate(time()); return $this->getYearView($d["year"]); } function getMonthView($month, $year) { return $this->getMonthHTML($month, $year); } function getYearView($year) { return $this->getYearHTML($year); } function getDaysInMonth($month, $year) { if ($month < 1 || $month > 12) { return 0; } $d = $this->daysInMonth[$month - 1]; if ($month == 2) { if ($year%4 == 0) { if ($year%100 == 0) { if ($year%400 == 0) { $d = 29; } } else { $d = 29; } } } return $d; } function getMonthHTML($m, $y, $show = 1) { $s = ""; $a = $this->adjustDate($m, $y); $month = $a[0]; $year = $a[1]; $daysInMonth = $this->getDaysInMonth($month, $year); $date = getdate(mktime(12, 0, 0, $month, 1, $year)); $first = $date["wday"]; $monthName = $this->monthNames[$month - 1]; $prev = $this->adjustDate($month - 1, $year); $next = $this->adjustDate($month + 1, $year); $this_month = date('m'); $this_year = date('Y'); $header = $monthName . (($show > 0) ? " " . $year : ""); $D = $this->monthNames[11].' '; $J = $this->monthNames[0].' '; if ($show == 1) { $prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><</a>'; $nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >></a>'; } else { $prevMonth = ""; $nextMonth = ""; } $s .= "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"; $s .= "<tr class=\"calendarHeader\">\n"; $linkHeader = zen_href_link(FILENAME_EVENTS_CALENDAR, "_month=$month&_year=$year"); $s .= "<td align=\"left\"><a href=\"$linkHeader\" target=\"_parent\">$header</a></td>\n"; $s .= "<td align=\"center\" class=\"yearHeader\">\n"; if(mktime (0,0,0,$month ,0,$year) > mktime (0,0,0,$this_month ,0,$this_year)) { $s .= $prevMonth; } else { $s .= $prevMonth; } $s .= "</td>\n"; $s .= "<td align=\"center\" class=\"yearHeader\">$nextMonth</td></tr>\n"; $s .= "<tr><td colspan=\"3\">\n"; $s .= "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"calendarMonth\"><tr class=\"calendarHeader\">\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay)%7] . "</td>\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay+1)%7] . "</td>\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay+2)%7] . "</td>\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay+3)%7] . "</td>\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay+4)%7] . "</td>\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay+5)%7] . "</td>\n"; $s .= "<td align=\"center\" valign=\"middle\">" . $this->dayNames[($this->startDay+6)%7] . "</td>\n"; $s .= "</tr>\n";$d = $this->startDay + 1 - $first; while ($d > 1) { $d -= 7; } $today = getdate(time()); $start_day = $this->getStartDay(); $click = BOX_CLICK_LINK; while ($d <= $daysInMonth) { $s .= "<tr>\n"; for ($i = 0; $i < 7; $i++) { $class = (($i < (6-$start_day) &! $i <= $start_day) ? (($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "calendarToday" : "calendar" ) : (($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "calendarToday" : "calendarWeekend")); if ($d > 0 && $d <= $daysInMonth) { $link = $this->getDbLink($d, $month, $year); $s .= (($link == "") ? "<td class=\"$class\" align=\"left\" valign=\"bottom\">" : "<td class=\"$class\" onclick=top.window.location=\"$link\">" ); if($show == 1) { $s .= (($link == "") ? $d : "<a href=\"$link\" target=\"_parent\" title=\"$click\">$d</a>"); } else { $s .= (($link == "") ? $d : "<a href=\"$link\" title=\"$click\">$d</a>"); } } else { $s .= "<td class=\"empty\"> "; } $s .= "</td>\n"; $d++; } $s .= "</tr>\n"; } $s .= "</table>\n"; $s .= "</td></tr></table>\n"; return $s; } function getYearHTML($year) { $year_view = 1; $s = ""; $prev = 'index.php?main_page='.FILENAME_EVENTS_CALENDAR . $this->getCalendarLink(1, $year - 1) .'&year_view=1'; $next = 'index.php?main_page='.FILENAME_EVENTS_CALENDAR . $this->getCalendarLink(1, $year + 1) .'&year_view=1'; $this_year = date('Y'); $s .= "<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" >\n"; $s .= "<tr>"; if($year > $this_year) { $s .= "<td class=\"yearHeader\" align=\"center\" align=\"left\">" . (($prev == "") ? " " : "<a href=\"$prev\"><<</a>") . "</td>\n"; } else { $s .= "<td class=\"yearHeader\" align=\"center\" align=\"left\"> </td>\n"; } $s .= "<td height=\"20\" class=\"yearHeader\" align=\"center\">" . (($this->startMonth > 1) ? $year . " - " . ($year + 1) : $year) ."</td>\n"; $s .= "<td class=\"yearHeader\" align=\"center\" align=\"right\">" . (($next == "") ? " " : "<a href=\"$next\">>></a>") . "</td>\n"; $s .= "</tr>\n"; $s .= "<tr>"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(0 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(1 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(2 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "</tr>\n"; $s .= "<tr>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(3 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(4 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(5 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "</tr>\n"; $s .= "<tr>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(6 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(7 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(8 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "</tr>\n"; $s .= "<tr>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(9 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(10 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "<td valign=\"top\">" . $this->getMonthHTML(11 + $this->startMonth, $year, 0) ."</td>\n"; $s .= "</tr>\n"; $s .= "</table>\n"; return $s; } function adjustDate($month, $year) { $a = array(); $a[0] = $month; $a[1] = $year; while ($a[0] > 12) { $a[0] -= 12; $a[1]++; } while ($a[0] <= 0) { $a[0] += 12; $a[1]--; } return $a; } /* The start day of the week. This is the day that appears in the first column of the calendar. Sunday = 0. */ var $startDay = 0; /* The start month of the year. This is the month that appears in the first slot of the calendar in the year view. January = 1. */ var $startMonth = 1; /* The labels to display for the days of the week. The first entry in this array represents Sunday. */ var $dayNames = array("S", "M", "T", "W", "T", "F", "S"); /* The labels to display for the months of the year. The first entry in this array represents January. */ var $monthNames = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); /* The number of days in each month. You're unlikely to want to change this... The first entry in this array represents January. */ var $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); } ?>
> 
> /modules/events_calendar_listing.php
> ```php
<?php

/** --------------------------------------------------------------------- */
/** zen-cart Open Source E-commerce                                       */
/** --------------------------------------------------------------------- */
/**  Copyright (c) 2003 The zen-cart developers     */
/**                                                                 */
/**  [url]http://www.zen-cart.com/index.php[/url]           */
/**                                                                   */
/** Portions Copyright (c) 2003 osCommerce                               */
/** ----------------------------------------------------------------------   */
/** This source file is subject to version 2.0 of the GPL license,       */
/**  that is bundled with this package in the file LICENSE, and is       */
/** available through the world-wide-web at the following url:           */
/**  [url]http://www.zen-cart.com/license/2_0.txt[/url].                             */
/**  If you did not receive a copy of the zen-cart license and are unable */
/** to obtain it through the world-wide-web, please send a note to       */
/** [email protected] so we can mail you a copy immediately.          */
/** ----------------------------------------------------------------------  */
/** $Id: events_manager.php 2007-07-10 [email protected]  */




if(isset($listingTitle))
{
    echo '<H2>' . $listingTitle . '</H2>';
}
    $events_split = new splitPageResults($events_query_raw, MAX_DISPLAY_NUMBER_EVENTS, 'DAYOFMONTH(start_date)');
    $events_query = $db->Execute($events_query_raw);
    
    /** Show Paging Header ? */
    
if (($events_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) 
 {
 ?>
        </td>
    </tr>

<tr>
        <td>
            <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                    <td class="smallText">
                        <?php
                             if(isset($displayPagingSuffix))
                            {
                                $displayPagingSuffix = ' : ' . $displayPagingSuffix;
                            }
                            echo $events_split->display_count(TEXT_DISPLAY_NUMBER_OF_PAGES . $displayPagingSuffix);
                         ?>
                    </td>
                    <td align="right" class="smallText">
                    <?php
                     echo TEXT_RESULT_PAGE . ' ' . $events_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y')));
                    ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>

    <?php
}
 	 $row = 0;
 	 $list_box_contents = array();
 	 
 	 /** Add headings ... */
 	 
 	 $list_box_contents[$row][] = array('align' => 'left',
                                'params' => 'class="event_header"',
                                'text' => ' ' . TEXT_EVENT_TITLE . ' ');
 	 
 	 $list_box_contents[$row][] = array('align' => 'center',
                                'params' => 'class="event_header"',
                                'text' => ' Start ' . TEXT_EVENT_DATE . ' ');
     $list_box_contents[$row][] = array('align' => 'center',
                                'params' => 'class="event_header"',
                                'text' => ' End ' . TEXT_EVENT_DATE . ' ');

                                
	/** Add listing rows ... */
             $events = $db->Execute($events_split->sql_query);
         
	/** while($events = zen_db_fetch_array($events_query)) */
	
		while (!$events->EOF)
		{
		    $row++;
		    $list_box_contents[$row][] = array('align' => 	'left',
                                       						'params' => 'class="event_description"',
                            							'text'  =>  '<a href="index.php?main_page='
                                           . FILENAME_EVENTS_CALENDAR . '&select_event=' . $events->fields['event_id'] . '">' . $events->fields['title'] . '</a>');
   			    $events->MoveNext();
		    list($year, $month, $day) = split ( '[/.-]', $events->fields['start_date']);
	            $list_box_contents[$row][] = array( 'align'  => 'center',
	            					'params' => 'class="event_description"',
	            					'text'   => date("F j, Y", mktime(0, 0, 0, $month, $day, $year)));
	            $endDate = '-';
	            if(isset($events->fields['end_date']) && trim($events->fields['end_date']) != '')
	            {
	                list($year, $month, $day) = split ('[/.-]', $events->fields['end_date']);
	                    $endDate = date("F j, Y", mktime(0, 0, 0, $month, $day, $year));
	                    }
	                    $list_box_contents[$row][] = array('align'  => 'center',
                                       'params' => 'class="event_description"',
                                       'text'   => $endDate);
                            
   		            }
   		            
 	/** Show listing */
 	 		require($template->get_template_dir('tpl_tabular_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_tabular_display.php');
 	
 	/** new productListingBox($list_box_contents); */
 			if (($events_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')))
 	{
 	?>
        </td>
    </tr>
    <tr>
        <td>
            <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                    <td class="smallText">
                        <?php
                             if(isset($displayPagingSuffix))
                            {
                                $displayPagingSuffix = ' : ' . $displayPagingSuffix;
                            }
                            echo $events_split->display_count(TEXT_DISPLAY_NUMBER_OF_PAGES . $displayPagingSuffix);
                         ?>
                    </td>
                    <td align="right" class="smallText">
                        <?php echo TEXT_RESULT_PAGE . ' ' . $events_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y'))); ?>                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td><?php
    }
 else
{
?>
	<table border=0 width="100%" cellspacing="0" cellpadding="4">
		<tr>
                    <td class="main"><br><?php echo TEXT_NO_EVENTS; ?></td>
                </tr>
            </table>
<?php
}
?>

fixed all my problems, great post! thanks for the support!!

6 Oct 2009, 11:14 PM
#114
bgallagher avatar

bgallagher

New Zenner

Join Date:
Feb 2008
Posts:
41
Plugin Contributions:
0

Re: Event Calendar v3

Well, if anyone is interested........I think i've been able to addapt this script to a site i've been working with ...i am sooooooooooo a Zenewbie but it works for the site. I'd like to be able to share what i did but i dont even really know enough about all of this to know WHAT files i NEED to share.
Take a look.
http://www.scponstage.com

~B.

6 Oct 2009, 11:18 PM
#115
bgallagher avatar

bgallagher

New Zenner

Join Date:
Feb 2008
Posts:
41
Plugin Contributions:
0

Re: Event Calendar v3

P.S.
GREAT Adaptation Richard !!!!

6 Oct 2009, 11:26 PM
#116
aussie avatar

aussie

New Zenner

Join Date:
Apr 2005
Location:
NSW - Australia
Posts:
38
Plugin Contributions:
0

Re: Event Calendar v3

BGallagher, that looks great !

And since I have not visited for a while, its looks like I have missed Richard's Great Contribution.
Thanks for the heads up Guys !

Appreciate it !

Brad

7 Oct 2009, 1:07 AM
#117
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Event Calendar v3

BGallagher:

I'd like to be able to share what i did but i dont even really know enough about all of this to know WHAT files i NEED to share.
Take a look.
http://www.scponstage.com

~B.

Wow, that looks really fabulous. I think you are doing a very good job, and should continue to make small refinements to get the calendar optimum. It is looking pretty sophisticated. Very nice how you can choose a quantity of tickets by age group as well, after selecting an event.

Also, the website itself looks great too. Very lively, picturific, feng shui and quite a joy to visit, congrats.

7 Oct 2009, 4:08 PM
#118
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

BGallagher:

Well, if anyone is interested........I think i've been able to addapt this script to a site i've been working with ...i am sooooooooooo a Zenewbie but it works for the site. I'd like to be able to share what i did but i dont even really know enough about all of this to know WHAT files i NEED to share.
Take a look.
http://www.scponstage.com

~B.

Great stuff BGallagher.

I would like to know how you got to display the monthly calendar in the centre column, as at:

http://scponstage.com/index.php?main_page=events_calendar&_month=11&_year=2009&month_view=1,

Mine currently displays only as:

http://aprons4you.com/index.php?main_page=events_calendar&_day=17&_month=10&_year=2009

Is it in the code posted by richardr above. If not, can you please post.

Best Regards

10 Oct 2009, 5:08 AM
#119
slobadog avatar

slobadog

New Zenner

Join Date:
Mar 2006
Posts:
89
Plugin Contributions:
0

Re: Event Calendar v3

Oh yeah, breakthrough! Mine was doing the "I'm doing nothing" thing when clicking just about anything. To fix it, I modified the files:

templates/tpl_events_calendar_default.php
and
admin/events_manager.php

Changed all instances of $HTTP_POST_VARS to $_POST and all instances of $HTTP_GET_VARS to $_GET. This got me going to the point where I was able to modify to suit my purposes, I hope it works for you too...

10 Oct 2009, 6:08 AM
#120
slobadog avatar

slobadog

New Zenner

Join Date:
Mar 2006
Posts:
89
Plugin Contributions:
0

Re: Event Calendar v3

Edit: there's a problem with admin/event_drop_dns.php which is breaking the edit/create page before it can write the buttons. I have simply taken out the "require" reference in admin/events_manager.php as I don't need the product link function.