|
<?php |
|
|
|
|
|
function blog_gdata($op) { |
|
|
switch ($op) { |
|
|
case 'read': |
|
|
break; |
|
|
|
|
|
case 'write': |
|
|
break; |
|
|
|
|
|
case 'update': |
|
|
break; |
|
|
|
|
|
case 'delete': |
|
|
break; |
|
|
|
|
|
case 'search': |
|
|
break; |
|
|
|
|
|
/* |
|
|
* Return an array cantaining three elements 'implements', 'path', 'help': |
|
|
* 'implements' :: this is an array of the terms : |
|
|
* 'read', 'write', 'update', 'delete', 'search', in any order. Each |
|
|
* term signifies that your module implements the feature. The |
|
|
* absence of any term means that feature is not implemented. If no |
|
|
* feature is implemented then the module will NOT be used. |
|
|
* |
|
|
* 'path' :: this is the path under /gfeed/ that you want to handle. |
|
|
* Do NOT register this path with the normal node_menu( ) hook. |
|
|
* Also the administrator may change the path. All that is handled by |
|
|
* gdata module. If this is not provided then the name of module is used. |
|
|
* |
|
|
* 'help' :: this is a string which explains what your module does (incase |
|
|
* the administrator has forgotten it or is confused :) ) |
|
|
*/ |
|
|
case 'info': |
|
|
$array = array( |
|
|
'enabled' => 'true', |
|
|
'implements' => array('read','write'), |
|
|
'path' => 'blog', |
|
|
'help' => t('This is just a testing of GData hook, comment'), |
|
|
); |
|
|
break; |
|
|
} |
|
|
return $array; |
|
|
} |
|
| 1 |
|
<?php |
| 2 |
|
/** |
| 3 |
|
* Copyright and License info |
| 4 |
|
* |
| 5 |
|
* Copyright 2006 Sumit Datta | sumitdatta _at_ gmail _dot_ com |
| 6 |
|
* |
| 7 |
|
This program is free software; you can redistribute it and/or modify |
| 8 |
|
it under the terms of the GNU General Public License as published by |
| 9 |
|
the Free Software Foundation; either version 2 of the License, or |
| 10 |
|
(at your option) any later version. |
| 11 |
|
|
| 12 |
|
This program is distributed in the hope that it will be useful, |
| 13 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
|
GNU General Public License for more details. |
| 16 |
|
|
| 17 |
|
You should have received a copy of the GNU General Public License |
| 18 |
|
along with this program; if not, write to the Free Software |
| 19 |
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
|
*/ |
| 21 |
|
|
| 22 |
|
function blog_gdata($op) { |
| 23 |
|
switch ($op) { |
| 24 |
|
case 'read': |
| 25 |
|
break; |
| 26 |
|
|
| 27 |
|
case 'write': |
| 28 |
|
break; |
| 29 |
|
|
| 30 |
|
case 'update': |
| 31 |
|
break; |
| 32 |
|
|
| 33 |
|
case 'delete': |
| 34 |
|
break; |
| 35 |
|
|
| 36 |
|
case 'search': |
| 37 |
|
break; |
| 38 |
|
|
| 39 |
|
/* |
| 40 |
|
* Return an array cantaining three elements 'implements', 'path', 'help': |
| 41 |
|
* 'implements' :: this is an array of the terms : |
| 42 |
|
* 'read', 'write', 'update', 'delete', 'search', in any order. Each |
| 43 |
|
* term signifies that your module implements the feature. The |
| 44 |
|
* absence of any term means that feature is not implemented. If no |
| 45 |
|
* feature is implemented then the module will NOT be used. |
| 46 |
|
* |
| 47 |
|
* 'path' :: this is the path under /gfeed/ that you want to handle. |
| 48 |
|
* Do NOT register this path with the normal node_menu( ) hook. |
| 49 |
|
* Also the administrator may change the path. All that is handled by |
| 50 |
|
* gdata module. If this is not provided then the name of module is used. |
| 51 |
|
* |
| 52 |
|
* 'help' :: this is a string which explains what your module does (incase |
| 53 |
|
* the administrator has forgotten it or is confused :) ) |
| 54 |
|
*/ |
| 55 |
|
case 'info': |
| 56 |
|
$array = array( |
| 57 |
|
'enabled' => 'true', |
| 58 |
|
'implements' => array('read'), |
| 59 |
|
'path' => 'blog', |
| 60 |
|
'help' => t('This is just a testing of GData hook, comment'), |
| 61 |
|
); |
| 62 |
|
break; |
| 63 |
|
} |
| 64 |
|
return $array; |
| 65 |
|
} |