newscoop / google-events-plugin-bundle
Newscoop 的 Google 事件插件
Requires
- php: >=5.3.3
- newscoop/plugins-installer: >=v0.2
This package is not auto-updated.
Last update: 2024-09-24 03:18:14 UTC
README
此 Newscoop 插件添加了 smarty 函数和 Admin 工具,以便您可以在 Newscoop 中导入、管理和显示 Google 日历事件。
安装
安装过程简单快捷
- 如何安装此插件?
- 这就是全部!
步骤 1:如何安装此插件?
运行以下命令
$ php application/console plugins:install "newscoop/google-events-plugin-bundle"
$ php application/console assets:install public/
插件将被安装到您的项目 newscoop/plugins/Newscoop
目录中。
步骤 2:这就是全部!
转到 Newscoop 管理面板,然后打开 插件
选项卡。插件将显示在那里。现在您可以使用此插件了。
注意
要更新此插件,请运行以下命令
$ php application/console plugins:update "newscoop/google-events-plugin-bundle"
$ php application/console assets:install public/
要删除此插件,请运行以下命令
$ php application/console plugins:remove "newscoop/google-events-plugin-bundle"
文档
更详细的文档可以在 这里 找到。
Google 事件视图
提供端点 /google-events/events 以查看所有 Google 事件(本地缓存)。加载模板 Resources/views/GoogleEvents/google_events.tpl 或如果存在,加载主题中的 _views/google_events.tpl。
用法
{{ foreach $events as $event }} <div> <a href="/google-events/events/{{ $event->getId() }}">{{ $event->getId() }}</a> <br /> {{ $event->getSummary() }} <br /> {{ $event->getStart()|date_format:"%Y-%m-%d %H:%M" }} - {{ $event->getEnd()|date_format:"%Y-%m-%d %H:%M"}} </div> {{ /foreach }}
Google 事件视图
提供端点 /google-events/events/{id} 以查看单个 Google 事件(本地缓存)。加载模板 Resources/views/GoogleEvents/google_event.tpl 或如果存在,加载主题中的 _views/google_event.tpl。
用法
{{ $event->getId() }} {{ $event->getDescription() }} {{ $event->getStart()|date_format:"%Y-%m-%d %H:%M" }} - {{ $event->getEnd()|date_format:"%Y-%m-%d %H:%M"}} {{ $event->getCreatorDisplayName() }} {{ $event->getCreatorEmail() }} {{ $event->getSummary() }} {{ $event->getHtmlLink() }}
Google 事件搜索
注意,此操作仅搜索本地存储的 InstagramPhoto 实体,不会调用 Instagram API
提供端点 /google-events/search,它接受以下参数
- search - 搜索字符串,匹配标题、用户名、标签和 locationName 字段
- perPage - 每页发送到结果中的记录数
- offset - 开始的第一条记录(用于分页)
结果发送到 _views/google_events_search_results.tpl,如果您的主题中定义了它,或者使用默认内部视图。
列出 Google 事件 Smarty 块
提供 smarty 块以列出具有特定标签的 Instagram 图片。
用法
{{ list_google_events length=30 }} {{ $event->getSummary() }} {{ $event->getStart()|date_format:"%Y-%m-%d %H:%M" }} {{ $event->getEnd()|date_format:"%Y-%m-%d %H:%M" }} {{ /list_google_events }}
许可证
此捆绑包处于 GNU 通用公共许可证 v3 下。在捆绑包中查看完整许可证。
LICENSE.txt
关于
此捆绑包是 Sourcefabric z.ú. 的一个倡议。