function gdoc_field_help in Embedded Google Docs Viewer 8
Same name and namespace in other branches
- 7 gdoc_field.module \gdoc_field_help()
Implements hook_help().
File
- ./
gdoc_field.module, line 18 - A field formatter for the File field.
Code
function gdoc_field_help($route_name, RouteMatchInterface $route_match) {
$helptext = '';
if ($route_name == 'help.page.gdoc_field') {
$helptext = '<p>';
$helptext .= t('This module provides a new format for the File field type. This format presents the file as a fully rendered object within a web page - i.e. it displays the contents of the file as appropriate to its filetype (Adobe Acrobat .pdf, Microsoft Word .doc/.docx, Microsoft Excel .xls/.xlsx, Microsoft Powerpoint .ppt/.pptx), using the Google Docs embedded rendering engine.');
$helptext .= '</p>';
$helptext .= '<p>';
$helptext .= t("N.B.: Only files that are public may use this formatter - Google Docs must be able to access the file in order to render and display it. In other words, it won't work on a typical development laptop, or if your server is behind a firewall where Google is unable to access it.");
$helptext .= '</p>';
$helptext .= '<p>';
$helptext .= t("To use this field format, add a File field to a new or existing content type (such as Basic Page) on the content type's Manage Fields form. The File field type provides only one widget type - File - so select that. On the content type's 'Manage Display' form, there will be a drop-down select list of available display formats for the File field. To display the file within the embedded Google Docs viewer, choose the 'Embedded Google Documents Viewer' format.");
$helptext .= '</p>';
$helptext .= '<p>';
$helptext .= t("The document viewer is styled using the gdoc-field.html.twig template. Several theme suggestions are provided to further customize the display of this field. By default, the viewer's width is 80% with 10% margins on left and right, and its height is 400px, with a 1px solid black border.");
$helptext .= '</p>';
}
return $helptext;
}