41
zoullou
Re: Feature for a great calendar module ?
  • 2005/2/11 20:03

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Quote:

script_fu wrote:
How bout a personal page that connects to the event info.

Say its a venue, music band, business ect...


I don't understand

Quote:

koltz wrote:
Another nice feature would be to not have to choose a time on the calendar at all. As an example, I am currently testing v1 using it for events, sporting events, breakfast/lunch menus. Lunch menus don't have times along with some events, but it would come up as 00:00 when I select it just for no purpose (or whatever time I select).


Good idea, i will add this feature to my list.

42
script_fu
Re: Feature for a great calendar module ?

Please look at this site.

http://www.fyn.dk/

fsarticles module and others...

43
zoullou
Re: Feature for a great calendar module ?
  • 2005/2/12 8:01

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Ok, but for the moment it's very hard to link 2 modules

44
script_fu
Re: Feature for a great calendar module ?

Zoullou thank you for the answer. Thats what I needed to know. I think out of all the calendars yours has the most features. Good work...

45
zoullou
Re: Feature for a great calendar module ?
  • 2005/2/12 14:58

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Thanks.

But for the moment i don't have calendar

46
koltz
Re: Feature for a great calendar module ?
  • 2005/2/16 14:59

  • koltz

  • Just popping in

  • Posts: 19

  • Since: 2003/7/22


I have a question on V1 if you could help :) I am trying to mix the listview with the calendar view by allowing items in category's to be displayed only. Like the pulldown menu in listview. I have found the code where it lists it, but can't figure out the code I need to change it to as the listview code is in HTML w/PHP and this is PHP w/HTML. Here is the code:

if( array_key_exists($day_count$all_event) ) {
                    
$html .= "<table style='font-size: 10px;'>";
                                foreach(
$all_event[$day_count] as $key=>$value) {
                        
$html .= "<tr><td><a href='daily_view.php?day=".$day_count."&month=".$info['cal']['month']['current']['month']."&year=".$info['cal']['month']['current']['year']."&id=".$value['id']."'>".$value['title']."</a></td></tr>";
                    }        
                    
$html .= "</table>n";
                }{


I have copied the INDEX.PHP code in the UPPER part where it forwards to the listview down to the calendar code area to get the categories to display, just can't figure out how to only show certain categories.

Thanks, Corey

47
fatalman
Re: Feature for a great calendar module ?
  • 2005/2/16 15:55

  • fatalman

  • Just popping in

  • Posts: 2

  • Since: 2005/2/15


Hello!

SyncML in an XOOPS calendar?

I used to syncronize my mobile with outlook, rally nice! i just imported my school schedule into outlook, made an script that set the alarm to 1 hour before first class in the mornin and 10 minutes before all other lectures. That way i always knew what classroom to go to and when. Now my cable is broken and i want to syncronise my mobile over WAP!

I mean my mobile will break down any minute and how do i tranfer my calendar and contacts to my next phone?

If im out traveling and someone else ads meetings to our calendar it would be nice to syncronise over wap.

I have found some open source calendar/contacts project so one could syncronize the phone with a database, but i would like to have this directly in XOOPS and if the standard syncML is used it could be used to syncronize whatever you want since its a standard. Most mobiles now adays accept wap and syncML!

48
zoullou
Re: Feature for a great calendar module ?
  • 2005/2/17 8:49

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


To koltz :

In class.event.php replace getAllEvent methode by this one :
function getAllEvent$month$year$day=false$cat=false ) {
        
        
$sql "SELECT id, title, day, description, contact, url, email, start_date, end_date, cat_name, cat_desc, cat_color 
        FROM "
.$this->db->prefix("extcal_events")." E INNER JOIN ".$this->db->prefix("extcal_cat")." C ON E.cat = C.cat_id 
        WHERE year = 
$year AND month = $month";
        if(
$day) {
            
$sql .= " AND day = $day";
        }
        if(
$cat != 0) {
            
$sql .= " AND cat = $cat";
        }
        
$sql .= " ORDER BY day ASC, start_date ASC";
        
$result $this->db->query($sql);
        
$ret = array();
        while(
$row $this->db->fetchArray($result)) {
            
            
$ret[$row['day']][] = array('id'=>$row['id'], 'title'=>$this->myts->previewTarea($row['title']), 'description'=>$this->myts->previewTarea($row['description']), 'contact'=>$row['contact'], 'url'=>$this->myts->previewTarea($row['url']), 'email'=>$this->myts->previewTarea($row['email']), 'start_date'=>$row['start_date'], 'end_date'=>$row['end_date'], 'cat_name'=>$row['cat_name'], 'cat_desc'=>$row['cat_desc'], 'cat_color'=>$row['cat_color']);
            
        }
        
        return 
$ret;
        
    }


In index.php, add that just after // Get all events for this month :
$cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0;
    
$xoopsTpl->assign('catselected'$cat);

And modify $all_event = $event->getAllEvent... by that :
$all_event $event->getAllEvent($info['cal']['month']['current']['month'], $info['cal']['month']['current']['year'], $cat);


I hope that code work

49
koltz
Re: Feature for a great calendar module ?
  • 2005/2/17 14:33

  • koltz

  • Just popping in

  • Posts: 19

  • Since: 2003/7/22


Thanks for the post. I made the changes, when I go to view all, it will show all, but when I select only the seperate categories, it doesn't show anything :(. If you want to see the page, go tohttp://www.koltz.com/rrsd2, the links on the the "Calendar" and underneath are the individual calendars. I will also post my index.php, maybe I screwed something up while trying to do it myself?

<?php
// $Id: index.php,v 1.2 2004/08/27 21:05:07 zoullou Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System                      //
// Copyright (c) 2000 XOOPS.org                           //
// <https://xoops.org/>                             //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify     //
// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License, or        //
// (at your option) any later version.                                      //
// //
// You may not change or alter any portion of this comment or credits       //
// of supporting developers from this source code or any supporting         //
// source code which is considered copyrighted (c) material of the          //
// original comment or credit authors.                                      //
// //
// This program is distributed in the hope that it will be useful,          //
// but WITHOUT ANY WARRANTY; without even the implied warranty of           //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
// GNU General Public License for more details.                             //
// //
// You should have received a copy of the GNU General Public License        //
// along with this program; if not, write to the Free Software              //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------ //

include("header.php");

if (
$xoopsModuleConfig['extcal_listview'] == '1') {

    
$xoopsOption['template_main'] = 'extcal_listview.html';
    include(
XOOPS_ROOT_PATH."/header.php");

    
$cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0;
    
$xoopsTpl->assign('catselected'$cat);

    
$show = isset($HTTP_GET_VARS['show']) ? intval($HTTP_GET_VARS['show']) : 0;
    
    if (
$show == 0) {
        
$year $info['cal']['month']['current']['year'];
        
$lastyear "2003";
        
$nextyear "2005";
    } else {
        
$year $show;
        
$lastyear $show 1;
        
$nextyear $show 1;
    }

    
// Get all events for this year
    
$event = new Event();
    
$all_events     $event->getListViewEvents($year$cat);
    
$all_categories $event->getAllCategories();

    
$xoopsTpl->assign('events'$all_events);
    
$xoopsTpl->assign('categories'$all_categories);
    
    
$lang["title"]        = _MD_CALENDAR;
    
$lang["year"]         = $year;
    
$lang["lastyear"]     = $lastyear;
    
$lang["nextyear"]     = $nextyear;
    
$lang["date"]         = _MD_DATE;
    
$lang["event"]        = _MD_EVENT;
    
$lang["category"]     = _MD_CATEGORY;
    
$lang["more"]         = _MD_MORE;
    
$lang["catselect"]    = _MD_CATSELECT;
    
$lang["catselectall"] = _MD_CATSELECTALL;
                
    
$xoopsTpl->assign('lang'$lang);

} else {

    
$xoopsOption['template_main'] = 'extcal_index.html';
    include(
XOOPS_ROOT_PATH."/header.php");
    
    
$cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0;
    
$xoopsTpl->assign('catselected'$cat);

    
$show = isset($HTTP_GET_VARS['show']) ? intval($HTTP_GET_VARS['show']) : 0;

    
$html "";
    
    
$event = new Event();
    
$all_events     $event->getListViewEvents($year$cat);
    
$all_categories $event->getAllCategories();

    
$xoopsTpl->assign('events'$all_events);
    
$xoopsTpl->assign('categories'$all_categories);
    
    
// Get all events for this month
    
$cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0;
    
$xoopsTpl->assign('catselected'$cat);
    
$event = new Event();
    
$all_event $event->getAllEvent($info['cal']['month']['current']['month'], $info['cal']['month']['current']['year'], $cat);
    
    
// Number of day in this month
    
$nb_day $info['cal']['month']['current']['daynumber'];
    
    
// Id of the first day for this month
    
$start_day $info['cal']['month']['current']['firstday'];
    
    
// Get cell of the first row where began this month
    
if( $start_day == ) {
        
$start_cell 7;
    } else {
        
$start_cell $start_day;
    }
    
    
// Get number of row for this month
    
if( $nb_day == 31 ) {
        
        if( 
$start_day == || $start_day == ) {
            
$nb_row 6;
        } else {
            
$nb_row 5;
        }
    
    } elseif( 
$nb_day == 30 ) {
    
        if( 
$start_day == ) {
            
$nb_row 6;
        } else {
            
$nb_row 5;
        }
    
    } elseif( 
$nb_day == 29 ) {
    
        
$nb_row 5;
    
    } elseif( 
$nb_day == 28 ) {
    
        if( 
$start_day != ) {
            
$nb_row 5;
        } else {
            
$nb_row 4;
        }
    
    }
    
    
// Counter for the day number of this month
    
$day_count 1;
    
    
// Counter for the number's cell in cellendar
    
$cell_count 1;
    
    for( 
$i=$i<$nb_row $i++ ) {
    
        
$html .= "<tr height='50px'>n";
        
        
// Counter for number's cell in the row (Monday, tuesday...)
        
$k 0;
        do {
            
            
// Cellules faisant parties d'un mois
            
if( $cell_count >= $start_cell && $day_count <= $nb_day ) {
                
                
// If it's the current day
                
if($day_count == $info['now']['day'] && $info['cal']['month']['current']['month'] == $info['now']['month'] && $info['cal']['month']['current']['year'] == $info['now']['year']) {
                    
$class "currentday";
                } else {
                    
$class "day";
                }
                
$html .= "<td class='$class'>n";
                
                
$html .= "<table width='100%'><tr><td>$day_count</td><td>&nbsp;</td></tr></table>n";
                
                
// Si il y a des evenements pour le jour en cours
                
if( array_key_exists($day_count$all_event) ) {
                    
$html .= "<table style='font-size: 10px;'>";
                    foreach(
$all_event[$day_count] as $key=>$value) {
                        
$html .= "<tr><td><a href='daily_view.php?day=".$day_count."&month=".$info['cal']['month']['current']['month']."&year=".$info['cal']['month']['current']['year']."&id=".$value['id']."'>".$value['title']."</a></td></tr>";
                    }        
                    
$html .= "</table>n";
                }
                
                
$html .= "</td>n";
                
$day_count++;
            
// Cellules ne faisant pas partie d'un mois
            
} else {
                
$html .= "<td class='emptyday'>";
                
$html .= $info['cal']['month']['current']['monthname']." ".$info['cal']['month']['current']['year'];
                
$html .= "</td>n";
            }
            
$cell_count++;
            
$k++;
    
        } while( 
$k != );
    
        
$html .= "</tr>n";
    
    }

    
$lang["title"]        = _MD_CALENDAR;
    
$lang["year"]         = $year;
    
$lang["lastyear"]     = $lastyear;
    
$lang["nextyear"]     = $nextyear;
    
$lang["date"]         = _MD_DATE;
    
$lang["event"]        = _MD_EVENT;
    
$lang["category"]     = _MD_CATEGORY;
    
$lang["more"]         = _MD_MORE;
    
$lang["catselect"]    = _MD_CATSELECT;
    
$lang["catselectall"] = _MD_CATSELECTALL;
                
    
    if( 
$info['cal']['month']['current']['month'] == $info['now']['month'] && $info['cal']['month']['current']['year'] == $info['now']['year'] ) {
        
$xoopsTpl->assign('classcurrentmonth''currentmonth');
    } else {
        
$xoopsTpl->assign('classcurrentmonth''thismonth');
    }
    
    
$curentdate $info['now']['dayname']." ".$info['now']['day']." ".$info['now']['monthname']." ".$info['now']['year'];
    
$xoopsTpl->assign('curentdate'$curentdate);
    
    
$prevmonth = array('id'=>$info['cal']['month']['preview']['month'], 'year'=>$info['cal']['month']['preview']['year'], 'name'=>$info['cal']['month']['preview']['monthname']);
    
$xoopsTpl->assign('prevmonth'$prevmonth);
    
    
$thismonth = array('year'=>$info['cal']['month']['current']['year'], 'name'=>$info['cal']['month']['current']['monthname']);
    
$xoopsTpl->assign('thismonth'$thismonth);
    
    
$nextmonth = array('id'=>$info['cal']['month']['next']['month'], 'year'=>$info['cal']['month']['next']['year'], 'name'=>$info['cal']['month']['next']['monthname']);
    
$xoopsTpl->assign('nextmonth'$nextmonth);
    
    
$xoopsTpl->assign('lang'$lang);
    
$xoopsTpl->assign('calendar'$html);

}

include(
XOOPS_ROOT_PATH."/footer.php");
?>

50
zoullou
Re: Feature for a great calendar module ?
  • 2005/2/17 15:09

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Add
echo $sql;
Just after
$sql .= " ORDER BY day ASC, start_date ASC";
In class.event.php and give me the result.

Login

Who's Online

171 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits