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:2010-05-07T15:09:06.250000000
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

Extension Key: pmkttnewstwitter

Language: en

Keywords: forEditors, forAdmins, forBeginners, forIntermediates

Copyright 2000-2009, Peter Klein, <pmk@io.dk>

Extension sponsored by: Hjulstad.no < http://hjulstad.no/ >

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 1

`Introduction 3 <#1.1.Introduction|outline>`_

What does it do? 3

Screenshots 3

`Users manual 4 <#1.2.Users%20manual|outline>`_

`Administration 5 <#1.3.Administration|outline>`_

`Configuration 6 <#1.4.Configuration|outline>`_

Reference (TSConfig) 6

`Frequently Asked Questions 8 <#1.5.Frequently%20Asked%20Questions|outline>`_

`Known problems 9 <#1.6.Known%20problems|outline>`_

`To-Do list 10 <#1.7.To-Do%20list|outline>`_

`Reporting Bugs 11 <#1.8.Reporting%20Bugs|outline>`_

`Updates 12 <#1.9.Updates|outline>`_

`ChangeLog 13 <#1.10.ChangeLog|outline>`_

Introduction

What does it do?

  • Adds Twitter entry when a tt_news record is created or edited.
  • 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.)

Screenshots

N/A

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.

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)

twitterUser

Property

twitterUser

Data type

string

Description

Username for your Twitter account.

Default

twitterPassword

Property

twitterPassword

Data type

string

Description

Password for your Twitter account.

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 {

    # Username of Twitter account.
    twitterUser = myTwitterUser

    # Password of Twitter account.
    twitterPassword = mySecretPassword

    #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 {

    # Username of Twitter account.
    twitterUser = myTwitterUser

    # Password of Twitter account.
    twitterPassword = mySecretPassword

    #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

  • 07.May.2010
  • Bug #7548: Fixed problems with tt_news records posted to Twitter if the “hidden” checkbox was checked. (Thanks to Andreas Hirsch for reporting this.)
  • Bug #7545: Enabled “excludefield” for the “Post on Twitter” field. Now you can exclude the field from certain usergroups. (Suggested/reported by Andreas Hirsch)
  • 25.April.2010
  • Added option to use the tt_news “keywords” as “Hash Tags” for the Twitter post. (Option suggested by Andreas Hirsch)
  • 18.April.2010
  • Fixed problems with national chars. Now data sent to twitter is correctly UTF-8 encoded. (Thanks to Paul Klimek for reporting this.)
  • Now filters out chars that Twitter doesn't like (even if they are encoded), such as “&”, “<” & “>”.
  • 11.April.2010
  • Fixed problems with messages containing quotes and other special characters. (Thanks to Kurt Kunig < www.kupix.de > for reporting this.)
  • Added German translations. (Thanks to Kurt Kunig < www.kupix.de >)
  • Fixed problem with CURL and safe_mode (Thanks to Sebastian Baumann for reporting this.)
  • Added FAQ section to the manual.
  • 09.April.2010
  • PagePath extension is now optional. (Without it, the extension just generates a plain “index.php?id=” type of backlink.) This was done as PagePath uses the BE domain for generating the FE url, and in some cases (like when the BE is https and the FE is http or if running multiple domains in the same installation) this doesn't work. (Thanks to Egon Zemmer for reporting this.)
  • Added a new PageTSconfig option called “noPagePath”. 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.
  • 19.Nov.2009
  • Added Context Sensitive Help (CSH) .
  • 16.Nov.2009
  • Added support for http://bit.ly URL shortner. Bit.ly has link tracking which tinyurl.com doesn't, but requires registration.
  • 12.Nov.2009
  • Fixed some problems in ext_emconf.php.
  • Removed htmlspecialchars around Twitter username/password.
  • Fixed problem with reference to calling object. (Error messages was not shown)
  • 11.Nov.2009
  • First version released on TER.

13