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.

Topics - brg

Pages: [1]
Feature requests / Translation for custom properties
« on: February 07, 2013, 10:50:19 am »
At this moment I can't create custom property for everything on several languages.

I think the best solution use unique name instead id and add lang function if name field empty.

Aloha everybody!
We created 2 small plugins and want present their

1. Spy. This plugins show what users modified while editing objects. For example:

This is standard notify email,but i think follow email look more informative:

And notes:

Or comment!

This plugin user Diff from PEAR. But it sometimes makes mistakes =(

Unpack and copy files. Only I file you must rewrite "application/views/notifier/general.php" =( This is little core files modification. Be careful while update FO.

2. Overdue reminder
This plugin create new cron job that notify subscribers about task that overdue, but not complete.
And write overdue days in email subject!

Just unpack and copy files.

Older versions / [1.7-RC] Bad HTML/CSS
« on: May 14, 2010, 09:19:41 am »
There are many css properties like this "color:333333" in file "application/views/co/view.php".
May be in another files .. but this properties never work!

How To's / logged_user() return wrong data.
« on: April 29, 2010, 08:00:20 am »
logged_user()  function can return User object (if i am log in) or NULL (if i am not log in) .. ok, but some methods like ProjectTasks::getLateTasksByUser() call logged_user()->getTimezone() without checking what data return logged_user() function.

Second moment .. if i want get in cron job (run from wget without user login) all task ProjectTasks::getProjectTasks() or ProjectTasks::getLateTasksByUser() i get Fatal error because permissions_sql_for_listings() call $user->getId() method .. but $user was "NULL" value if i run cron.php without authorization.


Something strange ..
getLateTasksByUser() method was User $user argument, but never use it .. always return late tasks logged user has access to

I am modify:
Code: [Select]
$permissions = ' AND ( ' . permissions_sql_for_listings(ProjectTasks::instance(),ACCESS_LEVEL_READ, logged_user(), 'project_id') .')';
Code: [Select]
$permissions = ' AND ( ' . permissions_sql_for_listings(ProjectTasks::instance(),ACCESS_LEVEL_READ, $user, 'project_id') .')';
And maybe:
Code: [Select]
$to_date = DateTimeValueLib::now()->add('h', logged_user()->getTimezone())->beginningOfDay();
Code: [Select]
$to_date = DateTimeValueLib::now()->add('h', $user->getTimezone())->beginningOfDay();

Older versions / [1.7 beta 2] HTML tags in email subjects
« on: April 22, 2010, 07:37:22 am »
In application/models/notifier/Notifier.class.php file in 125 row:
Code: [Select]
"subject" => $subject = lang("$notification notification $type", $name, $uid, $typename, $ws),
but before:
Code: [Select]
$css = get_workspace_css_properties($w->getColor());
$ws .= "<span style=\"$css\">" . $w->getPath() . "</span>";
After this in "$ws" we have html tags, it is ok for "$properties['workspace'] = $ws;", but not for subjects!

Simple solution:
Code: [Select]
"subject" => $subject = lang("$notification notification $type", $name, $uid, $typename, html_to_text($ws)),

How To's / How to create my custom widgets to dashboard?
« on: December 10, 2009, 04:22:53 am »
I want to write a little plugin which will create additional widget to my dashboard .. but i don`t understand how do this.

I read this - and this

I create my widget, but l am edit OG core files .. DashboardController.class.php and dashboard/index.php .. it is not a solution, because any core update, will create a lot of problems.

OG use hooks and may be I can use some hook to create widget and don`n edit core files?

I can`t get these variables in translation. Changing 2 lines fix this problem:
Code: [Select]
--- application/models/notifier/Notifier.class.php
+++ application/models/notifier/Notifier.class.php
@@ -398,7 +398,7 @@
  return self::queueEmail(
  self::prepareEmailAddress($milestone->getAssignedTo()->getEmail(), $milestone->getAssignedTo()->getDisplayName()),
  self::prepareEmailAddress($milestone->getCreatedBy()->getEmail(), $milestone->getCreatedByDisplayName()),
- lang('milestone assigned to you'),
+ lang('milestone assigned to you', $milestone->getName(), $milestone->getProject()->getName()),
  tpl_fetch(get_template_path('milestone_assigned', 'notifier'))
  ); // send
@@ -434,7 +434,7 @@
  array(self::prepareEmailAddress($task->getAssignedTo()->getEmail(), $task->getAssignedTo()->getDisplayName())),
  self::prepareEmailAddress($task->getUpdatedBy()->getEmail(), $task->getUpdatedByDisplayName()),
- lang('task assigned to you'),
+ lang('task assigned to you', $task->getTitle(), $task->getProject()->getName()),
  tpl_fetch(get_template_path('task_assigned', 'notifier'))
  ); // send

I am attach path to 1.6 RC

Pages: [1]