11
playsome
Re: eXtCal 2.37 Beta 4, will this ever get out of beta?
  • 2012/9/2 11:34

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I have figured out the final point above.

To change times from 10 minute intervals to 15 minute intervals so yo have quarter past, half past, quarter to.

Open extcal/class/form/formdatetime.php and on line 26 it has

$j 0$j _EXTCAL_TS_MINUTE$j $j 10


change to

$j 0$j _EXTCAL_TS_MINUTE$j $j 15



12
playsome
Re: eXtCal 2.37 Beta 4, will this ever get out of beta?
  • 2012/9/2 11:25

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


No one interested in getting extcal to work?

I have just tried a clean install on wamp
php 5.3.8
mysql 5.0.88
xoops 2.5.5

Still can't get <{$event.formated_event_start}> to work, another error though was the event title would not show on some templates that included info_bulle.html, although I could fix that by removing the include and adding the code to display the event direct to the templates, but start/end time won't show.

start/end time does show on view_calendar_month but not on view_calendar week, view_year, view_month, view_week.

Also another issue is alot of smary variables and other code seems to be in french (at least i think its french), surely these should be in english as most other variables in the module are in english.

Also in extcal_info_bulle, some coding erros

line 9 shows

<img src="css/images/<{$event.event_icone}>"  alt="" iconinfo/>


line 12 shows

<img src="<{$xoops_url}>/uploads/extcal/<{$event.event_picture1}>" alinea/>


not sure what iconinfo and alinea are supposed to be (smarty variables?) but clearly this is not proper coding format.

And finally can anyone tell me how the times are derived? times you select when creating an event are like 10.00 10.10, etc I want to change them to 10.00, 10.15, 10,30, 10.45.

Thanks




13
playsome
Re: eXtCal 2.37 Beta 4, will this ever get out of beta?
  • 2012/8/31 0:26

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Another issue:

<{$event.formated_event_start}> which is in extcal_info_bulle.html does nto work, no start date shows, this effect calendar month and week view.

Sigh



14
playsome
Re: eXtCal 2.37 Beta 4, will this ever get out of beta?
  • 2012/8/31 0:07

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Point 2 is fixed you just need to use <{$event.cat.cat_name}> in the template.



15
playsome
eXtCal 2.37 Beta 4, will this ever get out of beta?
  • 2012/8/30 23:48

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


So im having some problems with eXtCal 2.37 Beta 4, and im wondering is it being worked on? will it get out of beta anytime soon?

Heres some issues:

1) In view_week.html the start date of the event does not show, the variable <{$event.formated_event_start}> is in the template but nothing shows on the page.

2) There is no variable to show the event category, there really should be. There is to show the cat color <{$event.cat.cat_color}> but if you try to use the variable <{$event.cat}> to print the category it prints 'Array' using <{$cat.cat_name)> (from original extcal) doesnt work either, why where things rewritten?

3) event start date does not show on the page when viewing year view, view_year.html includes event_list1 template which has the event start variable but does not show the event start date, just 2 empty columns when viewing year view.

4) when submitting an event (form admin side) there is the error: undefined variable: extcalConfig in file /modules/extcal/admin/event.php line 90

5) templates are a mess, no need for highslide gallerries and other junk like that, keep things nice and clean, the additions like the highslide and tooltips doesnt event look good.

Is there any chance that at least the first 2 issues could be fixed soon?

heres the code for view_week.php

<?php

include_once  ('../../mainfile.php');
include_once (
'include/constantes.php');
$params = array('view' => _EXTCAL_NAV_WEEK'file' => _EXTCAL_FILE_WEEK);
$GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.html";
include_once (
'header.php');

/* ========================================================================== */
$year = isset($_GET['year']) ? intval($_GET['year']) : date('Y');
$month = isset($_GET['month']) ? intval($_GET['month']) : date('n');
$day = isset($_GET['day']) ? intval($_GET['day']) : date('j');
$cat = isset($_GET['cat']) ? intval($_GET['cat']) : 0;
/* ========================================================================== */


// Validate the date (day, month and year)
$dayTS mktime(000$month$day$year);
$offset date('w'$dayTS) - $xoopsModuleConfig['week_start_day'];
$dayTS $dayTS - ($offset _EXTCAL_TS_DAY);
$year date('Y'$dayTS);
$month date('n'$dayTS);
$day date('j'$dayTS);

$form = new XoopsSimpleForm('''navigSelectBox'$params['file'], 'get');
$form->addElement(getListYears($year,$xoopsModuleConfig['agenda_nb_years_before'],$xoopsModuleConfig['agenda_nb_years_after']));
$form->addElement(getListMonths($month));
$form->addElement(getListDays($day));
$form->addElement(getListCategories($cat));
$form->addElement(new XoopsFormButton(""""_SEND"submit"));
 
// Assigning the form to the template
$form->assign($xoopsTpl);

/**********************************************************************/
// Retriving events and formatting them
//$events = $eventHandler->objectToArray($eventHandler->getEventWeek($day, $month, $year, $cat), array('cat_id'));
$criteres = array('periode' => _EXTCAL_EVENTS_WEEK,
                  
'day' => $day,
                  
'month' => $month,
                  
'year' => $year,
                  
'cat' => $cat,
                  
'externalKeys' => 'cat_id');
$events $eventHandler->getEventsOnPeriode($criteres);
/**********************************************************************/
$eventsArray $events;
// Formating date
// $eventHandler->formatEventsDate($events, $extcalConfig['event_date_year']);
// 
// Treatment for recurring event
// $startWeek = mktime(0, 0, 0, $month, $day, $year);
// $endWeek = $startWeek + _EXTCAL_TS_WEEK;
// 
// $eventsArray = array();
// foreach ($events as $event) {
//     if (!$event['event_isrecur']) {
//         // Formating date
//         $eventHandler->formatEventDate($event, $extcalConfig['event_date_week']);
//         $eventsArray[] = $event;
//     } else {
//         $recurEvents = $eventHandler->getRecurEventToDisplay($event, $startWeek, $endWeek);
//         // Formating date
//         $eventHandler->formatEventsDate($recurEvents, $extcalConfig['event_date_week']);
//         $eventsArray = array_merge($eventsArray, $recurEvents);
//     }
// }
// 
// Sort event array by event start
// usort($eventsArray, "orderEvents");

// Assigning events to the template
$xoopsTpl->assign('events'$eventsArray);

// Retriving categories
$cats $catHandler->objectToArray($catHandler->getAllCat($xoopsUser));
// Assigning categories to the template
$xoopsTpl->assign('cats'$cats);

// Making navig data
$weekCalObj = new Calendar_Week($year$month$day$extcalConfig['week_start_day']);
$pWeekCalObj $weekCalObj->prevWeek('object');
$nWeekCalObj $weekCalObj->nextWeek('object');
$navig = array(
    
'prev'
    
=> array(
        
'uri'
        
=> 'year=' $pWeekCalObj->thisYear() . '&amp;month='
            
$pWeekCalObj->thisMonth() . '&amp;day='
            
$pWeekCalObj->thisDay(), 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp())
    ), 
'this'
    
=> array(
        
'uri'
        
=> 'year=' $weekCalObj->thisYear() . '&amp;month='
            
$weekCalObj->thisMonth() . '&amp;day='
            
$weekCalObj->thisDay(), 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp())
    ), 
'next'
    
=> array(
        
'uri'
        
=> 'year=' $nWeekCalObj->thisYear() . '&amp;month='
            
$nWeekCalObj->thisMonth() . '&amp;day='
            
$nWeekCalObj->thisDay(), 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp())
    )
);

// Title of the page
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->getVar('name') . ' ' 
                                   
$navig['this']['name']);

// Assigning navig data to the template
$xoopsTpl->assign('navig'$navig);

//Affichage des infobulle
$xoopsTpl->assign('showInfoBulle'$extcalConfig['showInfoBulle']);
$xoopsTpl->assign('showId'$extcalConfig['showId']);

// Assigning current form navig data to the template
$xoopsTpl->assign('selectedCat'$cat);
$xoopsTpl->assign('year'$year);
$xoopsTpl->assign('month'$month);
$xoopsTpl->assign('day'$day);
$xoopsTpl->assign('params'$params);

$tNavBar getNavBarTabs($params['view']);
$xoopsTpl->assign('tNavBar'$tNavBar);
$xoopsTpl->assign('list_position'$extcalConfig['list_position']);
// echoArray($tNavBar,true);

$xoTheme->addScript('browse.php?modules/extcal/js/highslide.js');
$xoTheme->addStylesheet('browse.php?modules/extcal/js/highslide.css');


include 
XOOPS_ROOT_PATH '/footer.php';
?>


If someone could fix the first issues and maybe help me with this:https://xoops.org/modules/newbb/viewtopic.php?post_id=349059#forumpost349059 I will make some nive templates for extcal in return.

Thanks



16
playsome
Re: extcal how to duplicate view_calendar-week.php?
  • 2012/8/28 20:52

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I have tried some code I found on the smarty.net forums

<{foreach item=weekdayName from=$weekdayNames}>
        <{if 
$weekdayName == 'Monday'}>
        <
h2><{$weekdayName.value|escape:'htmlall':'UTF-8'}></h2>
        <
div>
        <{foreach 
item=day from=$week}>
        <{foreach 
item=event from=$day.events}>
            <{if 
$event}>

            <{include 
file="db:extcal_info_bulle.html"}>

           
            <{/if}>
            <{/foreach}>
       
        <{/foreach}>
        </
div>
        <{/if}>
        <{if 
$weekdayName == 'Tuesday'}>
        <
h2><{$weekdayName.value|escape:'htmlall':'UTF-8'}></h2>
        <
div>
        <{foreach 
item=day from=$week}>
        <{foreach 
item=event from=$day.events}>
            <{if 
$event}>

            <{include 
file="db:extcal_info_bulle.html"}>

           
            <{/if}>
            <{/foreach}>
       
        <{/foreach}>
        </
div>
        <{/if}>


However the nested foreach loops that get/display the events is causing me havoc, it still displays the same events under each day, see screenshot.

Resized Image


If any one can help out here it would be much appreciated. I think this would be good for general release in the next update of the module since responsive design is popular right now, makes sense to have templates which are good for mobile.

Thanks



17
playsome
Making extcal template responsive?
  • 2012/8/28 19:20

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi everyone,

I am needing a bit of help on getting my duplicated view_calendar_week template as described above to be responsive.

The media queries/css part isnt the problem, the problem seems to lie with the way the day weeks are displayed in the template using <{foreach}>

Heres the code of the template

<{foreach item=weekdayName from=$weekdayNames}>
        <
h2><{$weekdayName}></h2>
        <{/foreach}>
   
        <{foreach 
item=day from=$week}>
        
            
            <{foreach 
item=event from=$day.events}>
            <{if 
$event}>

            <{include 
file="db:extcal_info_bulle.html"}>

            <
div style="background-color:#<{$event.cat.cat_color}>; height:2px; font-size:2px;">
                &
nbsp;</div>
            <{/if}>
            <{/foreach}>
       
        <{/foreach}>


If we are using a table, this is fine, the days can be enclosed in a <td> and will go along the top of the table horizontally, but to better suited for mobile (I have tried numerous responsive table approaches and none work that well), I am wanting to have the days and events displayed as a list like so:

Monday
event for monday
another event for monday

Tuesday
some tuesday event
another event

and so on.

But like I said because of the <{foreach}> which is used to display the days the days display first and then the events at the very bottom instead of each event for a particular day displaying underneath the particular day.

The php code to retrieve and assign the week day names to the template is:

// Retriving weekdayNames
$weekdayNames Calendar_Util_Textual::weekdayNames(); 
for (
$i 0$i $xoopsModuleConfig['week_start_day']; $i++) {
    
$weekdayName array_shift($weekdayNames);
    
$weekdayNames[] = $weekdayName;
}
// Assigning weekdayNames to the template
$xoopsTpl->assign('weekdayNames'$weekdayNames);


Is there away, using smarty or php or both that I could perhaps get the day name using its index in the array, display this in the template and still have the correct events listed under each day?

Thanks for your help




18
playsome
Re: extcal how to duplicate view_calendar-week.php?
  • 2012/8/25 9:04

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


OK, got it sorted i think. view_week.php now uses the new template, I have just one final question.

Could I eventually run into some issues by basically pasting code from one php file into another?

Cheers



19
playsome
Re: extcal how to duplicate view_calendar-week.php?
  • 2012/8/25 8:36

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Oops, I think I just found where the template is assigned to the file. I looked for it so much I couldnt see it.

Seems to be line 6
$GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.html";



20
playsome
extcal how to duplicate view_calendar-week.php?
  • 2012/8/25 8:32

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi everyone,

I'm looking for a bit of help from an extcal developer (Mamba, help).

What I am trying to do is duplicate view_calendar-week.php or rather I am copying all code from the file into view_week.php (after deleting all existing code from view_week.php).

What I want to do is basically duplicate the template for view_calendar-week and modify it to have a different layout, so if someone goes to view_week.php it will use the exact same code, smarty variables, etc but the template will have a different layout.

I have duplicated the extcal_view_calendar-week.html and renamed it to extcal_view_calendar-week-list.html, added this intop xoops_version.php and updated the module.

Everything works ok so far, no errors, etc using same code as view_calendar-week in view_week.php but view_week.php still seems to use the extcal_view_calendar-week.html template and not the duplicated one.

I think the issue may be with this line:

$params = array('view' => _EXTCAL_NAV_CALWEEK'file' => _EXTCAL_FILE_CALWEEK);
and the constants contained in that line, I can see where the constants are defined but I cant see or figure out how a template is assigned to a particular php file. In view_calendar-week.php I was expecting something like

xoopsTpl->assign('put_new_template_file_here');


but I dont see it. Can anyone tell me how a template file is assigned to a particular php file?

Cheers




TopTop
« 1 (2) 3 4 5 ... 17 »



Login

Who's Online

206 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 206


more...

Donat-O-Meter

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

Latest GitHub Commits