|
Revision 11316, 0.7 KB
(checked in by mistic100, 2 years ago)
|
|
activate captcha on comment form
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | function plugin_install() |
|---|
| 3 | { |
|---|
| 4 | global $conf; |
|---|
| 5 | |
|---|
| 6 | if (!isset($conf['cryptographp_theme'])) |
|---|
| 7 | { |
|---|
| 8 | pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("cryptographp_theme","cryptographp,reject","CryptograPHP config");'); |
|---|
| 9 | } |
|---|
| 10 | } |
|---|
| 11 | |
|---|
| 12 | function plugin_activate() |
|---|
| 13 | { |
|---|
| 14 | global $conf; |
|---|
| 15 | $conf['cryptographp_theme'] = explode(',', $conf['cryptographp_theme']); |
|---|
| 16 | |
|---|
| 17 | if(count($conf['cryptographp_theme']) == 1) |
|---|
| 18 | { |
|---|
| 19 | pwg_query('UPDATE '.CONFIG_TABLE.' SET value = "'.$conf['cryptographp_theme'][0].',reject" WHERE param = "cryptographp_theme";'); |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
| 22 | function plugin_uninstall() |
|---|
| 23 | { |
|---|
| 24 | pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="cryptographp_theme" LIMIT 1'); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | ?> |
|---|