-
Notifications
You must be signed in to change notification settings - Fork 6
/
details.php
102 lines (81 loc) · 2.15 KB
/
details.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* Disqus Details File
*
* @package PyroCMS
* @subpackage Disqus
* @category Comments
* @author Dan Sullivan
*/
class Module_Disqus extends Module {
public $version = '1.2.0';
public $db_pre;
// --------------------------------------------------------------------------
public function __construct()
{
}
// --------------------------------------------------------------------------
public function info()
{
return array(
'name' => array(
'en' => 'Disqus'
),
'description' => array(
'en' => 'Manage disqus comments'
),
'frontend' => false,
'backend' => true,
'menu' => 'content',
'author' => 'Dan Sullivan',
'roles' => array('admin_disqus'),
'shortcuts' => array(
array(
'name' => 'disqus.manage_shortname',
'uri' => 'admin/disqus/setup',
'class' => ''
),
),
);
}
// --------------------------------------------------------------------------
public function install()
{
$settings = array(
'slug' => 'disqus_short_name',
'title' => 'Short Name',
'description' => 'Your Disqus short name',
'type' => 'text',
'default' => '',
'value' => '',
'options' => '',
'is_required' => 1,
'is_gui' => 1,
'module' => 'disqus',
'order' => 0,
);
// Lets add the disqus short name setting
if ( ! $this->db->insert('settings', $settings))
{
log_message('debug', '-- -- could not install Disqus Settings');
return false;
}
return true;
}
// --------------------------------------------------------------------------
public function uninstall()
{
// Get rid of the disqus short name setting
return $this->db->delete('settings', array('slug' => 'disqus_short_name'));
}
// --------------------------------------------------------------------------
public function upgrade($old_version)
{
return true;
}
// --------------------------------------------------------------------------
public function help()
{
return "No documentation has been added for this module.<br/>Contact the module developer for assistance.";
}
}