Jlee
Joined: 28 Jun 2005
Posts: 157
Location: Birmingham, AL
|
| Posted: Wed Jun 29, 2005 3:14 am Post subject: Hello Community |
|
|
I would like to cover several things with this post.
First of all, very nice project. I have been working with Open Source software for almost two years now, and writing code for maybe 10. For as many people whom contribute, the code isn't that bad.
We have developed a PHP library of functions and classes called zcom-php. I bet it would help keep the code in vtiger cleaner, and easier.
Take a look at http://tts.zertis.net It is a program we wrote for the timber industry. It uses a gui/framework we call zcore-php, which happens to use zcom-php. If you actually do look at the link above, then make sure you log in with admin : admin and check out the module controls, I bet you would like it. Also, make sure you check out "Add Ticket" the date control boxes. I want to show you how easy those forms were to make (by the way your module structure was very similar to ours).
Code:
<?
class ExpenseForm extends Form {
function buildControls() {
Form::buildControls();
$this->batchAddControls(array(
new HiddenControl('expense_id', 'expense_id'),
new HiddenControl('tract_id', 'tract_id'),
new MyAutoText('Type Expense', 'name', 'expense_name'),
new InputControl('Paid To', 'paid_to'),
new InputControl('Amount', 'amount'),
new InputControl('Interest', 'interest'),
new InputControl('Remarks', 'description'),
new CalendarControl("Expense Date", "expense_date")
));
}
}
?>
A nice example of a action / display page is this:
Code:
<?php
require 'mod.inc.php';
RequireLogin();
access_check('Skills');
zcom_ehandle();
function update_skill($data) {
global $error;
$cb = new SkillBase();
$cb->addSkill($data);
if(!$error) {
redirect("index.php");
make_log("Added skill: " . $data['skill'], "Added Skill");
}
}
function cancel_update($data) {
redirect("index.php");
}
action_map(array(
'add' => 'update_skill',
'cancel' => 'cancel_update'
));
page_start('Add Skill', array("$CSSURL/pager.css"));
echo $error;
$form = new ExpenseForm("add_expenses.php?equipment_id=$equipment_id");
$form->actions = array('update_skill' => 'Update', 'cancel_update' => 'Cancel');
print $form->render($expense->record);
page_end();
?>
If you all would like to use something like this I need help managing it on source forge.
Also, I have found some bugs in 4.0.1
Here is a list:
-----------------------------------------
Contacts are not deleting properly when clicking the checkbox on the right, and then deletings.
-----------------------------------------
Search does not search anything but people and companies, it does not search activities, I.E. calls, or meetings.
-----------------------------------------
Some activities showed up without a subject, that should not be posible on this system.
-----------------------------------------
When Clicking the checkbox on the Accounts pager, then clicking delete, there is no conformation, there needs to be one. Check the other pagers as well. This is an important fix we need.
-----------------------------------------
"Only My" checkbox does not work on activities, it does however work on the Contacts.
The Home page Activities list should be listed showing priorities.
The show Only My checkboxes should show your groups stuff as well. Or a Only My Group checkbox should be added.
-----------------------------------------
I am implementing this system for a client in a few days, so if you know of any patches for any of these, please let me know. Code: |
|