-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstapaper.module
53 lines (48 loc) · 1.49 KB
/
instapaper.module
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
<?php
// $Id$
/**
* @file
* Provides connection to Instapaper service
*/
/**
* Implementation of hook_help().
*/
function instapaper_help($path, $arg) {
switch ($path) {
case 'admin/help#instapaper':
return t('Provides functionality to interface with the Instapaper web service to allow offline reading.');
}
}
/**
* Implementation of hook_menu().
*/
function instapaper_menu() {
$items['admin/settings/service_links/instapaper'] = array(
'title' => t('Instapaper'),
'description' => t('Configuration options for the Instapaper service.'),
'page callback' => 'drupal_get_form',
'page arguments' => array('instapaper_admin_settings'),
'access arguments' => array('administer service links'),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
'file' => 'instapaper.admin.inc',
);
return $items;
}
/**
* Implementation of hook_service_links().
*
* See the Service Links module.
*/
function instapaper_service_links() {
$links['instapaper'] = array(
'name' => 'Read Later',
'description' => t('Read Later with Instapaper'),
// 'link' => 'http://www.instapaper.com/e2?url=<encoded-url>&title=<encoded-title>',
'link' => 'http://www.instapaper.com/hello2?u=<encoded-url>&t=<encoded-title>',
'icon' => drupal_get_path('module', 'instapaper') .'/images/' . variable_get('instapaper_icon', 'instapaper.png'),
// 'javascript' => 'http://www.instapaper.com/javascript/embed2.js?ver=1.1',
// 'callback' => 'instapaper_embed',
);
return $links;
}