Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ras2000

Pages: 1 [2]
16
How To's / Re: Show week numbers in Calendar
« on: April 21, 2009, 10:20:21 am »
Hey Conrado, thanks for the kind words!

I'll make it an option in user settings under the calendar panel and add the code to the view file.

Then I'll submit the code here, and the core developers can decide whether or not to go by it.

Even if it's not picked up, it fairly easy to do, and I can use it for myself.

17
How To's / Re: Show week numbers in Calendar
« on: April 21, 2009, 10:03:47 am »
A lot of people work with week numbers when planning

I looked at the code in calender.php, which makes the view, and it can be added.

If you are interested, I'll post it, but you won't be able to turn it on and off, and it will probably disappear with the next update.

18
How To's / adding fields in table, applying in controller
« on: April 21, 2009, 09:38:42 am »
Hello all
I was looking at
http://forums.opengoo.org/index.php?topic=1494.0
and thought I'd give it a try

I added a column to og_billing_categories called default_currency

I added the fields in add.php and index.php

I added the functions inBaseBillingCategory.class.php and the parameter in BillingController.class.php.

But the field is not updated in the table, and if I enter the currency manually, it does not appear on the pages.

Anyone know what I'm doing wrong?

I added the functions
    function getDefaultCurrency() {
      return $this->getColumnValue('default_currency');
    } // getDefaultCurrency()
    function setDefaultCurrency($value) {
      return $this->setColumnValue('default_currency', $value);
    } // setDefaultCurrency)
in BaseBillingCategory.class.php

I added this in BillingController.class.php, wherever relevant
            'default_currency' => '',

And changed the line where the $ was hardcoded in billing/index.php to
    <td style="text-align: center;padding:5px;padding-left:10px;padding-right:10px;"><?php echo clean($billing->getDefaultCurrency()) ?></td>
    <td style="text-align: center;padding:5px;padding-left:10px;padding-right:10px;"><?php echo clean($billing->getDefaultValue()) ?></td>

What else needs to be done for it to take effect?

19
How To's / Re: $ ---> €
« on: April 21, 2009, 08:23:48 am »
I found these cases as well:
C:\wamp\www\opengoo\application\views\reporting\total_task_times.php (4 hits)
   Line 125:    <?php if ($showBillingCol) { ?><td style="width:30px;padding:4px;border-top:2px solid #888;text-align:right;">$&nbsp;<?php echo $sumBillings[$i] ?></td><?php } ?>
   Line 171:    <?php if ($showBillingCol) { ?><td style="padding:4px;text-align:right;<?php echo $isAlt? 'background-color:#F2F2F2':'' ?>">$&nbsp;<?php echo $ts->getFixedBilling() ?></td><?php } ?>
   Line 180:    <?php if ($showBillingCol) { ?><td style="width:30px;padding:4px;border-top:2px solid #888;text-align:right;">$&nbsp;<?php echo $sumBillings[$i] ?></td><?php } ?>
   Line 215: </td><?php if ($showBillingCol) { ?><td style="width:30px;padding-left:8px;border-top: 1px solid #AAA;"><div style="text-align: right;padding: 10px 0; font-weight: bold;">$&nbsp;<?php echo $sumBilling ?></div></td><?php } ?>
$ should be changed to € each place.

And no, this will not stay after an update.

I could program it in, submit and hope they keep it, but that's about the best I can do.

Good luck!

20
How To's / Re: $ ---> €
« on: April 21, 2009, 08:15:58 am »
Hey

There is as far as I can see a central place to change this, it is hardcoded into the pages.

I think the best you can do is to change it in the code, one place would be
[install folder]/application/views/billing/index.php
line 29 where it says
    <td style="text-align: center;padding:5px;padding-left:10px;padding-right:10px;">$&nbsp;<?php echo clean($billing->getDefaultValue()) ?></td>

change to
    <td style="text-align: center;padding:5px;padding-left:10px;padding-right:10px;">€&nbsp;<?php echo clean($billing->getDefaultValue()) ?></td>

I am pretty sure it figures other places as well, this should definitely be changed soon.

21
How To's / Re: Monday, first day
« on: April 21, 2009, 07:59:46 am »
Salut Benj

Si tu as des problemes avec ca, ecrit le dans le question, et je peux le l'explice un peut meux.

But write in english, my french is pretty terrible...

22
How To's / Re: Starting the week with a monday
« on: April 21, 2009, 07:58:04 am »
Sorry mistake in the viewweek.php code it should be
   if (cal_option("start_monday") == 0){
      $startday = date("d", mktime(0, 0, 0, $month, $day, $year)) - (date("N", mktime(0, 0, 0, $month, $day, $year)) % 7);//previous sunday
   }else{
      $startday = date("d", mktime(0, 0, 0, $month, $day, $year)) - (date("N", mktime(0, 0, 0, $month, $day, $year)) % 7) + 1;//previous monday
   }
   $endday = $startday + 7;//fin de la semana

Have fun!

23
How To's / Re: Amount of tasks shown in view
« on: April 21, 2009, 05:20:16 am »
Thanks a lot!

I was hoping I could put that value in the database as a user config. Maybe I can do that by declaring it in website.php.

Anyway, a big help.

24
How To's / Amount of tasks shown in view
« on: April 20, 2009, 06:15:06 am »
I would like to change the amount of tasks listed in the task view from 8, but I can't find out where that limit is set.

I would have thought that the files would be in the application/views/task folder, but that doesn't seem to be the case.

25
How To's / Re: Starting the week with a monday
« on: April 17, 2009, 08:13:38 am »
One other change, in the file apllication/views/event/viewweek.php, the line
   $startday = date("d", mktime(0, 0, 0, $month, $day, $year)) - (date("N", mktime(0, 0, 0, $month, $day, $year)) % 7);//inicio de la semana

Should be replaced with
   if (!cal_option("start_monday")){
      $startday = date("d", mktime(0, 0, 0, $month, $day, $year)) - (date("N", mktime(0, 0, 0, $month, $day, $year)) % 7);//beginning of the week, sunday
   }else{
      $startday = date("d", mktime(0, 0, 0, $month, $day, $year)) - (date("n", mktime(0, 0, 0, $month, $day, $year)) % 7);//beginning of the week, monday
   }

26
How To's / Re: Starting the week with a monday
« on: April 17, 2009, 07:02:46 am »
Change setting on the calendar panel

"UPDATE `opengoo`.`og_user_ws_config_categories` SET `is_system` = '0' WHERE `og_user_ws_config_categories`.`id` =5 LIMIT 1 ;"

Add post to config options

"INSERT INTO `opengoo`.`og_user_ws_config_options` (
`id` ,
`category_name` ,
`name` ,
`default_value` ,
`config_handler_class` ,
`is_system` ,
`option_order` ,
`dev_comment`
)
VALUES (
NULL , 'calendar panel', 'start_monday', 'n', 'StringConfigHandler', '0', '600', 'Sets whether the week starts on monday or sunday'
) "

Add following line in language/en_us/administration.php (or in whatever language folder you're using)

     'user ws config category name calendar panel' => 'Calendar',
For example line 95.

Add following lines in language/en_us/administration.php (or in whatever language folder you're using)

     'user ws config option name start_monday' => 'Start week on monday',
     'user ws config option desc start_monday' => 'Will show the calendar starting weeks on a monday',
For example lines 113 - 114.

The function cal_load_options() i "library/cal/cal_gatekeeper.php" is changed to:

function cal_load_options(){
   global $cal_db, $cal_options;
   // Find current user id
   $id = $_SESSION['cal_userid'];
   // call the DB for options
   $result = cal_query_getoptions($id);
   // get all options
   $d = array();
   while($t = $cal_db->sql_fetchrow($result)){
      $d[$t['name']] = $t['value'];
   }
   // set the options that have values
   if(array_var($d,'timeout')!="")       $cal_options['timeout'] = $d['timeout'];
   if(array_var($d,'skin')!="")          $cal_options['skin'] = $d['skin'];
   if(array_var($d,'language')!="")       $cal_options['language'] = $d['language'];
   if(array_var($d,'root_password')!="") $cal_options['root_password'] = $d['root_password'];
   // set the options that are true or false
   if(array_var($d,'show_times')=='y')    $cal_options['show_times'] = TRUE;
   else                   $cal_options['show_times'] = FALSE;
   if(array_var($d,'hours_24')=='y')    $cal_options['hours_24'] = TRUE;
   else                   $cal_options['hours_24'] = FALSE;
   if(array_var($d,'start_monday')=='1') $cal_options['start_monday'] = TRUE;
   else                   $cal_options['start_monday'] = FALSE;
   if(array_var($d,'anon_naming')=='y')    $cal_options['anon_naming'] = TRUE;
   else                   $cal_options['anon_naming'] = FALSE;
}

The function cal_query_getoptions() i "library/cal/queries/mysql.php" is changed to:
function cal_query_getoptions($id){
   global $cal_db;
   $q = 'SELECT name, value
      FROM `og_user_ws_config_options`
      INNER JOIN `og_user_ws_config_option_values` ON `id` = `option_id`
      WHERE `category_name` = "calendar panel" AND `user_id` = ' . $id . '
      LIMIT 0 , 30';
   $r = $cal_db->sql_query($q);
   if(!$r AND DEBUG){
      echo $cal_db->sql_error();
   }
   return $r;
}

Now the user can set the value in account settings.

27
How To's / Starting the week with a monday
« on: April 15, 2009, 07:27:04 am »
Working in Denmark, we prefer seeing the calendar starting the week with monday.

Looking through the code in cal_gatekeeper.php, I can see that it seeks an option called start_monday in the db through a function called cal_query_getoptions().

This function is blocked out however, so I can't see where to set this property.

Does anyone know where I can set this value?

28
Thank you Ignacio

I think we'll wait for the 1.4. Tried checking out documents automatically when opening them for editing, but couldn't get it to work.

Do you have an idea of when 1.4 is ready?

29
How To's / Multiple users can edit the same document at the same time?
« on: March 27, 2009, 09:10:57 am »
Hello, just getting started with this system, so I'm not sure this is the right board for my question.

In the documents view, if the document is .html or .slim, two users can edit the same document at the same time.

Is there any way to lock a document being edited? I know the right way is to check the document out, but not all users will do so.

We are a few in the company who enjoy getting our hands dirty with PHP, so very technical answers would also be useful.

Thanx
Ras

Pages: 1 [2]