承接 alvis/magento2-twitter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alvis/magento2-twitter

Composer 安装命令:

composer require alvis/magento2-twitter

包简介

Twitter feed.

README 文档

README

Twitter feeds using the most popular TwitterOAuth PHP library.

Multiple configuration options giving you full control over your tweets. Global integration option available along with an easy to use widget.

Installation

Recommended installation through composer, within your Magento root directory enter the following:

composer require alvis/magento2-twitter

Enable the module

php bin/magento module:enable Alvis_Core
php bin/magento module:enable Alvis_Twitter

You may also need to re-compile:

php bin/magento setup:upgrade
php bin/magento setup:di:compile

Create your Twitter app

You will need to create a Twitter app to get your API credentials. Please use the following steps as a guide:

  1. Go to https://apps.twitter.com and login using your Twitter account credentials
  2. Create a new application filling in your details. The Callback URL can be left empty
  3. Click on the 'Keys and Access Tokens' tab and then 'Create my access token'

Module configuration

The module configuration can be found through the main menu under Alvis. As a minimum please ensure you enter your screen name, consumer key, consumer key secret, access token and access token secret.

Display settings

Multiple settings available giving you full control over your tweets including:

  • Number of tweets to show
  • Show user follow button
  • Show the user screen name
  • Show the user profile image
  • Make URL links clickable
  • Show the reply link
  • Show the retweet link
  • Show the favorite link
  • Add rel="nofollow" for URL links
  • Make # tags clickable
  • Make @ tags clickable
  • Open links in a new window

Media settings

Multiple settings for when tweets include images:

  • Show media URLs, if set to no media URLs will be stripped from the tweet
  • Show media as clickable links not images
  • Show media as images not links
  • Select the media image size, thumbnail, small, medium or large

Search settings

Display tweets based off a search query, used when displaying searched tweets.

Integration

By default Twitter displays in the main content.

Extend the layout within your theme <VendorName>/<ThemeName>/Alvis_Twitter/layout/default.xml.

Move xml block:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="alvis_twitter.latest" destination="footer" after="-" />
        <move element="alvis_twitter.mentions" destination="footer" after="-" />
        <move element="alvis_twitter.search" destination="footer" after="-" />
    </body>
</page>

Remove xml block:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="main">
            <referenceBlock name="alvis_twitter.latest" remove="true" />
            <referenceBlock name="alvis_twitter.mentions" remove="true" />
            <referenceBlock name="alvis_twitter.search" remove="true" />
        </referenceContainer>
    </body>
</page>

Update xml block arguments:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="alvis_twitter.latest">
            <arguments>
                <argument name="title" xsi:type="string">New Block Title</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Override the default templates within your theme create the following files:

<VendorName>/<ThemeName>/Alvis_Twitter/templates/tweets.phtml
<VendorName>/<ThemeName>/Alvis_Twitter/templates/widget/tweets.phtml

The original contents of the files can be found under:

<Root>/vendor/alvis/magento2-twitter/view/frontend/templates/tweets.phtml
<Root>/vendor/alvis/magento2-twitter/view/frontend/templates/widget/tweets.phtml

Widget

Alternatively you can use the Twitter Feed widget which has the following settings available:

  • Number of tweets to show
  • Title
  • Type of feed to show, latest tweets, mentioned tweets or search tweets
  • Search query

Styling

Currently no styling is provided with the module, please create your own.

alvis/magento2-twitter 适用场景与选型建议

alvis/magento2-twitter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.5k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 04 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 alvis/magento2-twitter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 alvis/magento2-twitter 我们能提供哪些服务?
定制开发 / 二次开发

基于 alvis/magento2-twitter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.5k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-02