codeq/googledocs
Composer 安装命令:
composer require codeq/googledocs
包简介
Google Docs content node type for the Neos CMS
README 文档
README
Google Docs content node type for the Neos CMS.
This is a proof-of-concept implementation and therefore not yet perfect to be used for normal editors. To add content from Google Docs the editor needs to add the Google Docs FileID ( http://prntscr.com/hjdu82 ) manually in the backend. That file will render as HTML format.
Important Notes
Installation
You can install the plugin via composer.
composer require codeq/googledocs
Settings
Adopt this settings into your site package's Settings.yaml
CodeQ:
GoogleDocs:
authentication:
# Google OAuth 2.0 client secret file
# Place this JSON file in safe location and provide respective path here.
# Path should be respective to the DOCUMENT_ROOT\Web folder
clientSecretFilePath: ~
# This file will be generate automatically for storing the access token temporary
# Please provide safe location with file name
# Path should be respective to the DOCUMENT_ROOT\Web folder
accessTokenFilePath: ~
# Google OAuth 2.0 App name
appName : ~
# Google OAuth 2.0 Redirect URI
redirectUri: ~
Enable Google Drive REST API
- Go to the Google API Console.
- Select a project.
- In the sidebar on the left, expand APIs & Auth and select APIs.
- In the displayed list of available APIs, click the link for the Drive API and click Enable API.
- Within the Drive API page, select the Drive UI Integration tab and begin configuring how your App will integrate with the Drive UI.
Create Credentials
- Go To Credentials Section.
- Click on
Create CredentialsButton and selectOAuth Client IDfrom the dropdown. - Select
Web applicationfrom given options. - Add the name of the App (which will be also used in the Settings
appName). - Add
<DOMAIN>/neos/administration/googleDocsintoAuthorized redirect URIs(replace with your actual domain). This URL will also need to be placed into the settings inredirectUrioption. Authorized JavaScript originscan be null as it is not used.- Save all details. It will redirect you to the dashboard.
- Select your entry from the OAuath Client IDs section (https://prnt.sc/hmvbnv).
- You will see the
Download JSONbutton on the top (https://prnt.sc/hmvc2q). Click and download that file. - The download JSON file is the
clientSecretFileused in our settings. Put that file into the secure place and give the respective path in the settings.
Backend Module
Backend module is specially used for Authorizing the Google account for accessing the Google Docs File.
You will find the Backend Module Google Drive Authentication.
- Go the module and Click on the
Authorizebutton. - You will redirect to the Google Consent Screen. Complete the authorization process and it will redirect you back to the module (if
redirectUrisetting is not properly set, it may give you error when trying to authorize account). - Once you complete Authorization completely, you will find the
Sign outbutton. Click it if you want to de-authorize your account. De-authorizing will stop the file showing in the frontend.
Use the Google Docs CE
Once all above things are setup successfully, You will find the new CE Google Docs in your content collection (if it is allowed from the yaml configuration of the Document NodeType) https://prnt.sc/hmvgd2.
Add that CE into content collection, you will find the Google File ID property. https://prnt.sc/hmvgsq You can find the Google File ID from its URL, here is the reference about how to find ID https://productforums.google.com/forum/#!category-topic/docs/no/3STOEukh1pU.
Add the Google Docs File ID into the field. Page will automatically reload and you will find the content of Google Docs as HTML format.
codeq/googledocs 适用场景与选型建议
codeq/googledocs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 604 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 12 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 codeq/googledocs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 codeq/googledocs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 604
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-05