[hack] show all items in single calendar

Help with installation and general calendar setttings

Re: [hack] show all items in single calendar

Postby steph2saly » Tue Aug 28, 2012 9:49 pm

it's ok i ve just test it now and for this moment there's no bu to declare !
Thanks
steph2saly
 
Posts: 9
Joined: Mon Aug 27, 2012 5:12 pm

Re: [hack] show all items in single calendar

Postby steph2saly » Wed Aug 29, 2012 9:26 am

It's me again
In fact there's a bug for the french language
I create an Fr language !
The date of the week is good but the date is not.
In English or Spanish is good but not Fr
Can you help me?
Note that I am on a network of casablanca + schedule because I am in Senegal
steph2saly
 
Posts: 9
Joined: Mon Aug 27, 2012 5:12 pm

Re: [hack] show all items in single calendar

Postby steph2saly » Wed Aug 29, 2012 9:29 am

i found the problem
For day_0 i wrote Lundi it was Dimanche !
Sorry
steph2saly
 
Posts: 9
Joined: Mon Aug 27, 2012 5:12 pm

Re: [hack] show all items in single calendar

Postby brunitika » Fri Aug 31, 2012 11:53 am

I've resolved the problem with the admin interface (see my last post here): it was on ac-includes/ajax/calendar.ajax.php the more-bash-style line with:

Code: Select all
/ create the calendar
if ($id_item ==0 )
  echo draw_mycal($id_item,$the_month,$the_year);
else
  echo draw_cal($id_item,$the_month,$the_year);


modified in php-style

Code: Select all
if ($id_item == 0 ) {
  echo draw_mycal($id_item,$the_month,$the_year); }
else {
  echo draw_cal($id_item,$the_month,$the_year); }


On the above lines on same file from

Code: Select all
if($id_item=="")    die("no item defined");
if($the_month=="")    die("no month defined");
if($the_year=="")    die("no year defined");


I'm not sure if you need curly brackets to include die() after if.
brunitika
 
Posts: 15
Joined: Fri Aug 24, 2012 8:07 pm

Re: [hack] show all items in single calendar

Postby brunitika » Sat Sep 01, 2012 2:08 pm

A little performance on "last update": if you have multiple items view, you don't have last update printed on video, because this is depending of which item you are looking. To have last change printed on screen (doesn't matter what, is just last item with booking) I've changed the function:

Code: Select all
function get_cal_update_date($id_item){
   if(AC_DATE_DISPLAY_FORMAT=="us")   $date_format   = "%m-%d-%Y";
   else                         $date_format   = "%d-%m-%Y";
   
   $sql="SELECT DATE_FORMAT(date_mod, '".$date_format."') as date_mod FROM `".T_BOOKING_UPDATE."` WHERE id_item=".$id_item."";
   $res=mysql_query($sql) or die("error getting last calendar update date");
   $row=mysql_fetch_assoc($res);
   return $row["date_mod"];
}


to

Code: Select all
function get_cal_update_date($id_item){
   if(AC_DATE_DISPLAY_FORMAT=="us")   $date_format   = "%m-%d-%Y";
   else                         $date_format   = "%d-%m-%Y";
   if ($id_item == 0) {
     $sql="SELECT DATE_FORMAT(date_mod, '".$date_format."') AS date_mod_formatted FROM `".T_BOOKING_UPDATE."` ORDER BY date_mod DESC";
     $res=mysql_query($sql) or die("error getting last calendar update date");
     $row=mysql_fetch_array($res);
     $lastdate="<br />".$row[0];
     }   else {
     $sql="SELECT DATE_FORMAT(date_mod, '".$date_format."') as date_mod FROM `".T_BOOKING_UPDATE."` WHERE id_item=".$id_item."";
     $res=mysql_query($sql) or die("error getting last calendar update date");
     $row=mysql_fetch_assoc($res);
     $lastdate=$row["date_mod"]; }
     return $lastdate;
}


if id_item=0 (=multiple items view) select last date on the bookings_last_update table on db. Note that you have to change link "as date_mod_formatted", because loosing the date order if not.

Cheers
brunitika
 
Posts: 15
Joined: Fri Aug 24, 2012 8:07 pm

Re: [hack] show all items in single calendar

Postby steph2saly » Mon Sep 03, 2012 2:43 pm

Hi one question,
I ve got 2 types of product :
Product1
and product 2
In each product, there's many other product,
is it possible to display only one product with their product ?
for example :
SIKAS 1
SIKAS 2
COCOTIER 1
COCOTIER 2
can i display a calendar withe only All Sikas in a page, and display a calendar withe all COCOTIER in another page ?
do i used a same calendar for different display ?
thanks
steph2saly
 
Posts: 9
Joined: Mon Aug 27, 2012 5:12 pm

Re: [hack] show all items in single calendar

Postby henkieman » Sun Sep 09, 2012 9:01 pm

hi there

i can't find the files to replace in the index.php file the newest version in now 3.4.0.7
and this is for version 3.4.0.4
can you tell how i can fix this
i will see two calendars but they are the same
hope to hear from you

thanks

henk
henkieman
 
Posts: 1
Joined: Sun Sep 09, 2012 8:58 pm

Previous

Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron