-
Notifications
You must be signed in to change notification settings - Fork 0
/
scribd_filter.module
36 lines (32 loc) · 1.59 KB
/
scribd_filter.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
<?php
/**
* @file
* Provides the ability to embed documents from Scribd.
*
* This module provides an input filter to add a document (from Scribd) anywhere
* input filters are accepted. You have the option of replacing the filter tag
* with a link to the scribd or embedding the scribd itself.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function scribd_filter_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.scribd_filter':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Scribd Input filter makes it possible to embed documents from Scribd everywhere input filters are accepted. For more information, see the project for <a href="@scribd_filter">Scribd Input Filter</a>.', array('@scribd_filter' => 'http://drupal.org/project/scribd_filter')) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Usage') . '</dt>';
$output .= '<dd>' . t('To embed a document, you need to use the following code snippet: <samp>[scribd id=doc_id key=access_key mode=mode]</samp>.') . ' where mode is optional.</dd>';
$output .= '<dt>' . t('How to find the document id?') . '</dt>';
$output .= '<dd><ul>';
$output .= '<li>' . t('Navigate to Scribd and find the embed button') . '.</li>';
$output .= '<li>' . t('Click on embed') . '.</li>';
$output .= '<li>' . t('You can copy and paste the code used for Wordpress directly.') . '.</li>';
$output .= '</ul></dd>';
$output .= '</dl>';
return $output;
}
}