OSB enhancements to date
This commit is contained in:
@@ -1,125 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AgileBill - Open Billing Software
|
||||
*
|
||||
* This body of work is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Open AgileBill License
|
||||
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* Originally authored by Tony Landis, AgileBill LLC
|
||||
*
|
||||
* Recent modifications by Deon George
|
||||
*
|
||||
* @author Deon George <deonATleenooksDOTnet>
|
||||
* @copyright 2009 Deon George
|
||||
* @link http://osb.leenooks.net
|
||||
*
|
||||
* @link http://www.agileco.com/
|
||||
* @copyright 2004-2008 Agileco, LLC.
|
||||
* @license http://www.agileco.com/agilebill/license1-4.txt
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @package AgileBill
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
class product_translate
|
||||
{
|
||||
|
||||
# Open the constructor for this mod
|
||||
function product_translate()
|
||||
{
|
||||
# name of this module:
|
||||
$this->module = "product_translate";
|
||||
|
||||
# location of the construct XML file:
|
||||
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
|
||||
|
||||
# open the construct file for parsing
|
||||
$C_xml = new CORE_xml;
|
||||
$construct = $C_xml->xml_to_array($this->xml_construct);
|
||||
|
||||
$this->method = $construct["construct"]["method"];
|
||||
$this->trigger = $construct["construct"]["trigger"];
|
||||
$this->field = $construct["construct"]["field"];
|
||||
$this->table = $construct["construct"]["table"];
|
||||
$this->module = $construct["construct"]["module"];
|
||||
$this->cache = $construct["construct"]["cache"];
|
||||
$this->order_by = $construct["construct"]["order_by"];
|
||||
$this->limit = $construct["construct"]["limit"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
## ADD ##
|
||||
##############################
|
||||
function add($VAR)
|
||||
{
|
||||
$type = "add";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->add($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## VIEW ##
|
||||
##############################
|
||||
function view($VAR)
|
||||
{
|
||||
$type = "view";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->view($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## UPDATE ##
|
||||
##############################
|
||||
function update($VAR)
|
||||
{
|
||||
$type = "update";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->update($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## DELETE ##
|
||||
##############################
|
||||
function delete($VAR)
|
||||
{
|
||||
$db = new CORE_database;
|
||||
$db->mass_delete($VAR, $this, "");
|
||||
}
|
||||
|
||||
##############################
|
||||
## SEARCH FORM ##
|
||||
##############################
|
||||
function search_form($VAR)
|
||||
{
|
||||
$type = "search";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search_form($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## SEARCH ##
|
||||
##############################
|
||||
function search($VAR)
|
||||
{
|
||||
$type = "search";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## SEARCH SHOW ##
|
||||
##############################
|
||||
|
||||
function search_show($VAR)
|
||||
{
|
||||
$type = "search";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search_show($VAR, $this, $type);
|
||||
}
|
||||
/**
|
||||
* The main AgileBill Product Translate Class
|
||||
*
|
||||
* @package AgileBill
|
||||
* @subpackage Module:Product
|
||||
*/
|
||||
class product_translate extends OSB_module {
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@@ -45,31 +45,36 @@
|
||||
<type>C(16)</type>
|
||||
</language_id>
|
||||
<name>
|
||||
<type>C(128)</type>
|
||||
<display>Name</display>
|
||||
<min_len>1</min_len>
|
||||
<max_len>128</max_len>
|
||||
<type>C(128)</type>
|
||||
<validate>any</validate>
|
||||
</name>
|
||||
<description_short>
|
||||
<type>X2</type>
|
||||
<display>Short Description</display>
|
||||
<html>1</html>
|
||||
<type>X2</type>
|
||||
</description_short>
|
||||
<description_full>
|
||||
<display>Full Description</display>
|
||||
<type>X2</type>
|
||||
<html>1</html>
|
||||
</description_full>
|
||||
<!-- @todo - unknown usage -->
|
||||
<email_template>
|
||||
<display>Email Template</display>
|
||||
<type>X2</type>
|
||||
</email_template>
|
||||
</field>
|
||||
|
||||
<!-- Methods for this class, and the fields they have access to, if applicable -->
|
||||
<method>
|
||||
<add>id,site_id,product_id,language_id,name,description_short,description_full,email_template</add>
|
||||
<update>id,site_id,product_id,language_id,name,description_short,description_full,email_template</update>
|
||||
<delete>id,site_id,product_id,language_id,name,description_short,description_full,email_template</delete>
|
||||
<view>id,site_id,product_id,language_id,name,description_short,description_full,email_template</view>
|
||||
<search>id,site_id,product_id,language_id,name,description_short,description_full,email_template</search>
|
||||
<add>product_id,language_id,name,description_short,description_full,email_template</add>
|
||||
<update>id,product_id,language_id,name,description_short,description_full,email_template</update>
|
||||
<delete>id</delete>
|
||||
<view>id,product_id,language_id,name,description_short,description_full,email_template</view>
|
||||
<search>id,product_id,language_id,name,description_short,description_full,email_template</search>
|
||||
</method>
|
||||
|
||||
<!-- Method triggers -->
|
||||
@@ -81,5 +86,18 @@
|
||||
|
||||
<!-- Template helpers -->
|
||||
<tpl>
|
||||
<search_show>
|
||||
<checkbox>
|
||||
<field>id</field>
|
||||
<type>checkbox</type>
|
||||
<width>25px</width>
|
||||
</checkbox>
|
||||
<language_id>
|
||||
<field>language_id</field>
|
||||
</language_id>
|
||||
<name>
|
||||
<field>name</field>
|
||||
</name>
|
||||
</search_show>
|
||||
</tpl>
|
||||
</construct>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<!-- SUB Modules to install with this one -->
|
||||
<sub_modules></sub_modules>
|
||||
<!-- MODULE Type (core|base), core modules cannot be deleted, unrecognised types are ignored. -->
|
||||
<type>base</type>
|
||||
<type></type>
|
||||
</module_properties>
|
||||
|
||||
<!-- Tree Menu & Module Methods to load, they will be assigned the group permissions on install time, as selected by the user. -->
|
||||
|
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<install>
|
||||
<product_translate>
|
||||
<id>2</id>
|
||||
<site_id>1</site_id>
|
||||
<product_id>2</product_id>
|
||||
<language_id>english</language_id>
|
||||
<name>Sample Product</name>
|
||||
<description_short><![CDATA[This is just a sample product, edit as needed or delete.<br />
|
||||
]]></description_short>
|
||||
<description_full>This is just a sample product, edit as needed or delete.</description_full>
|
||||
</product_translate>
|
||||
<product_translate_id>
|
||||
<id>2</id>
|
||||
</product_translate_id>
|
||||
</install>
|
||||
<product_translate>
|
||||
<id>2</id>
|
||||
<site_id>1</site_id>
|
||||
<product_id>2</product_id>
|
||||
<language_id>en</language_id>
|
||||
<name>Sample Product</name>
|
||||
<description_short><![CDATA[This is just a sample product, edit as needed or delete.]]></description_short>
|
||||
<description_full>This is just a sample product, edit as needed or delete.</description_full>
|
||||
</product_translate>
|
||||
|
||||
<product_translate_id>
|
||||
<id>2</id>
|
||||
</product_translate_id>
|
||||
</install>
|
||||
|
Reference in New Issue
Block a user