diff --git a/hook.php b/hook.php index afb4762..1214934 100644 --- a/hook.php +++ b/hook.php @@ -100,6 +100,43 @@ function plugin_example_giveItem($type,$ID,$data,$num) { return ""; } +function plugin_example_addDefaultJoin($type, $ref_table, &$already_link_tables) { + + // Example of default JOIN clause + // No need of the function if you do not have specific cases + switch ($type) { +// case "PluginExampleExample" : + case "MyType" : + return Search::addLeftJoin($type, $ref_table, $already_link_tables, + "newtable", "linkfield"); + } + return ""; +} + +function plugin_example_addDefaultSelect($type) { + + // Example of default SELECT item to be added + // No need of the function if you do not have specific cases + switch ($type) { +// case "PluginExampleExample" : + case "MyType" : + return "`mytable`.`myfield` = 'myvalue' AS MYNAME, "; + } + return ""; +} + +function plugin_example_addDefaultWhere($type) { + + // Example of default WHERE item to be added + // No need of the function if you do not have specific cases + switch ($type) { +// case "PluginExampleExample" : + case "MyType" : + return " `mytable`.`myfield` = 'myvalue' "; + } + return ""; +} + function plugin_example_addLeftJoin($type,$ref_table,$new_table,$linkfield) {