ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with the updated Twitter Timeline plugin...

September 22, 2010 11:23am

Subscribe [0]
  • #1 / Sep 22, 2010 11:23am

    Oskar Smith

    33 posts

    For those looking for a temporary solution to this, you could always drop in the original _auto_link mod:

    function _auto_link($ret) {
       $ret = preg_replace("#(^|[n ])([w]+?://[w]+[^ "nrt< ]*)#", "\1<a >\2</a>", $ret);
       $ret = preg_replace("#(^|[n ])((www|ftp).[^ "tnr< ]*)#", "\1<a >\2</a>", $ret);
       $ret = preg_replace("/@(w+)/", "<a >@\1</a>", $ret);
       $ret = preg_replace("/#(w+)/", "<a >#\1</a>", $ret);
       return $ret;
    }

    For the EE2 version, this can be dropped in as an extra method just under the _parse_twitter_date function. Then on line 175 just above the $val[‘count’] = $count; line, add:

    $val['text'] = $this->_auto_link($val['text']);

    Turn off the params in the EE tag as well. i.e. just use {exp:twitter_timeline screen_name="name" twitter_refresh="1" limit="1"}

    Take a backup of your existing Twitter plugin though. EE1 mods required to do this are also probably fairly similar to this.

  • #2 / Sep 23, 2010 4:14am

    John Henry Donovan

    12339 posts

    oskarsmith,

    Thanks for posting your mod

  • #3 / Sep 23, 2010 5:37am

    Oskar Smith

    33 posts

    No worries, although I can’t take credit for it. I think it probably came from Pascal Kriete originally? I can’t quite remember. Relevant old thread is perhaps this one.

  • #4 / Sep 23, 2010 3:56pm

    Ingmar

    29245 posts

    Thanks for the update.

  • #5 / Oct 27, 2010 5:54am

    heaversm

    197 posts

    Hi - just to responding to oskarsmith’s post, can you maybe post the code for an EE2 user, regarding what you said here:

    For the EE2 version, this can be dropped in as an extra method just under the _parse_twitter_date function

    Just want to make sure I don’t use the wrong syntax. Thanks.

  • #6 / Oct 27, 2010 3:47pm

    Ingmar

    29245 posts

    I am going to split a part of this thread off to the CodeShare Corner. Thanks.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases