DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: PMK News Twitter

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:tz
Changed:2013-03-11T16:50:59
Classification:pmkttnewstwitter
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ----
Keywords:forEditors, forAdmins, forBeginners, forIntermediates
Author:Peter Klein
Email:pmk@io.dk
Info 4:
Language:en

img-1 img-2 EXT: PMK News Twitter - pmkttnewstwitter

EXT: PMK News Twitter 2

Extension Key: pmkttnewstwitter2

Language: en

Keywords: forEditors, forAdmins, forBeginners, forIntermediates

Copyright , Tristan ZWINGELSTEIN, <tristan.zwingelstein@gmail.com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

EXT: PMK News Twitter 2 1

`Introduction 3 <#__RefHeading__1076_738945734>`_

What does it do? 3

`Users manual 4 <#__RefHeading__1080_738945734>`_

`Administration 5 <#__RefHeading__1082_738945734>`_

`Configuration 6 <#__RefHeading__1084_738945734>`_

Reference (TSConfig) 6

`Frequently Asked Questions 9 <#__RefHeading__1088_738945734>`_

`Known problems 10 <#__RefHeading__1090_738945734>`_

`To-Do list 11 <#__RefHeading__1092_738945734>`_

`Reporting Bugs 12 <#__RefHeading__1094_738945734>`_

`Updates 13 <#__RefHeading__1096_738945734>`_

`ChangeLog 14 <#__RefHeading__1098_738945734>`_

Introduction

What does it do?

  • Adds Twitter entry when a tt_news record is created or edited based on the new twitter authentication method .
  • Optional link back to tt_news singleView page can be added to Twitter post.
  • (If you don't want the news posted on Twitter, there's a checkbox named “Don't post on Twitter” on the news record.)

Users manual

  • Once the extension is installed and the Twitter username and password have been inserted in either Page or User TSConfig, creation or editing of tt_news records will trigger post on Twitter. (Only is the field selected in the TSConfig options have been changed.)
  • On the tt_news records there's now a new checkbox field named “Don't post on Twitter”. If this is checked, nothing will be posted to Twitter.

Administration

  • The extension must be configured using Page/User TSConfig, with the username and password of the Twitter account you want the news to be posted to. And what field should be posted/trigger posting.
  • See the Configuration section for an example.

Get Twitter credentials

Create an account on https://dev.twitter.com

Create the application that will be used to publish on Twitter.

Set “Read & Write” rights to the application

Recover consumer key, consumer secret, access token and access token secret (see configuration section)

Configuration

  • The extension has 3 TSConfig options which must be set before Twitter posting will occur.
  • If the config options is placed in User TSConfig, it's possible to have different accounts depending on the BE user creating/editing the news item.
  • If placed in Page TSConfig it's possible to have different accounts depending on the page where the config options is placed.

Reference (TSConfig)

twitterconsumerkey

Property

twitterconsumerkey

Data type

string

Description

Cf “Get Twitter credentials”

Default

twitterconsumersecret

Property

twitterconsumersecret

Data type

string

Description

Cf “Get Twitter credentials”

Default

twitteraccesstoken

Property

twitteraccesstoken

Data type

string

Description

Cf “Get Twitter credentials”

Default

twitteraccesstokensecret

Property

twitteraccesstokensecret

Data type

string

Description

Cf “Get Twitter credentials”

Default

postField

Property

postField

Data type

string

Description

The field to post on Twitter. If this field is changed the first 140 chars is posted to the Twitter account.

Default

title

linkBack

Property

linkBack

Data type

boolean

Description

If set a link back to the page where tt_news is inserted in singleView mode is added to the Twitter msg.This requires that the tt_news singlePid have been set from TypoScript, or you use singlePids in the categories. It will NOT work if you only set the singlePid in the tt_news plugin FlexForm.

Default

useKeywordsAsHashTags

Property

useKeywordsAsHashTags

Data type

boolean

Description

If set, then the keywords field will be used as Hash tags when posting.

Default

noPagePath

Property

noPagePath

Data type

boolean

Description

If the PagePath extension is installed and this is set, then PagePath will NOT be used for generating the link back to the tt_news post.

Default

bitlyLogin

Property

bitlyLogin

Data type

string

Description

Optional bit.ly login.If no bit.ly login & API key is provided, then the URL is shortened using tinyurl.com.Bit.ly has link tracking which tinyurl.com doesn't, but requires registration.

Default

bitlyApiKey

Property

bitlyApiKey

Data type

string

Description

Optional bit.ly API key.

Default

[tsrconfig:tx_pmkttnewstwitter]

((generated))
Example

Insert configuration code like this on either Page or User TSConfig:

For Page TSConfig, the code must be inserted like this:

tx_pmkttnewstwitter {

    twitterconsumerkey = XXXXXX

    twitterconsumersecret = XXXXXX

    twitteraccesstoken = XXXXXX

    twitteraccesstokensecret= XXXXXX

    # Password of Twitter account.


    #The field to post on Twitter
    postField = title

    # Insert link back to singleView page on site.
    linkBack = 1

    # If set, then the keywords field will be used as Hash tags when posting.
    useKeywordsAsHashTags = 1

    # If PagePath extension is installed, and this is set,
    # then PagePath WILL NOT be used for generating the links back to the site.
    noPagePath = 0
}

For User TSConfig, the config option must be prepended with “page.”, like this:

page.tx_pmkttnewstwitter {

    twitterconsumerkey = XXXXXX

    twitterconsumersecret = XXXXXX

    twitteraccesstoken = XXXXXX

    twitteraccesstokensecret= XXXXXX


    #The field to post on Twitter
    postField = bodytext

    # Insert link back to singleView page on site.
    linkBack = 1

    # If set, then the keywords field will be used as Hash tags when posting.
    useKeywordsAsHashTags = 1

    # If PagePath extension is installed, and this is set,
    # then PagePath WILL NOT be used for generating the links back to the site.
    noPagePath = 0
}

Remember to change the username / password to that of your Twitter account.

Frequently Asked Questions

Q: I sometimes forget to check off the “Don't post on Twitter” checkbox, and as a result I have to go to my Twitter account and delete the entry. Is there a possibility to “revert” that, so that I have to check off the checkbox if I WANT to post on Twitter?

A: Not currently, but with Page TSConfig you can use TCAdefaults to make the checkbox checked by default when you create a new tt_news record. That way you'll have to UNCHECK the checkbox before something is posted on Twitter.

Insert this in the Page TSConfig on the sysfolder with your tt_news records.

TCAdefaults.tt_news.tx_pmkttnewstwitter_notwitter = 1

Q: The links back to my site is not correct. What should I do?

A: Try removing the PagePath extension (or set the “noPagePath” in your Page TSConfig setup) This will make the extension create plain “index.php?id=” type of backlinks (This means *NO* RealURL or CoolUri translations of the URL.)

I suggest you write a bugreport at the PagePath Forge bugtracker, describing your setup. `http://forge.typo3.org/projects/extension- pagepath/issues <http://forge.typo3.org/projects/extension- pagepath/issues>`_

Q: Instead of a backlink on Twitter, I get a “Error” text. What should I do?

A: Turn off the PagePath extension (or set the “noPagePath” in your Page TSConfig setup).

Q: I have SinglePid set in the FlexForm of the plugin and not in TypoScript, what should I do?

A: Create an EXT: TypoScript template on the the sysfolder where your tt_news records are stored. Then insert this in the TypoScript setup field:

plugin.tt_news.singlePid = <ID of sysfolder>

Remember to change <ID of sysfolder> to the id of the sysfolder where the tt_news records are located.

Known problems

The plugin first checks if a Category is attached to the news record, with a singlePid set. If not it reads the TypoScript configuration of tt_news (plugin.tt_news.singlePid) to determine what page is used for singleView.So it WILL NOT WORK if you only set the singleView mode in the tt_news plugin FlexForm!, as it's not possible to read the FlexForm settings form a BE extension.

To-Do list

Nothing planned, but ideas are welcome.

Reporting Bugs

  • If you discover a bug, please don't write the author(s) directly. Instead post a bug report at the Forge bugtracker: http://forge.typo3.org/projects/show/extension-pmkttnewstwitter
  • That way others can see your bug report and maybe add additional comment. It also makes it possible for all the extension authors to see what bugs are already been fixed by one of the other authors.

Updates

For latest version, always check the Forge repository: http://forge.typo3.org/projects/show/extension-pmkttnewstwitter

ChangeLog

28.02.2013 : First Release

15