{entry_id} doesn’t work.Is it possible to get {entry_id} working?
It would be very useful (along with scheduling tweets) - I’m using Simon Collison’s short URL technique, which is kinda redundant without an entry ID…
It would be very useful (along with scheduling tweets) - I’m using Simon Collison’s short URL technique, which is kinda redundant without an entry ID…{entry_id} doesn’t work.Is it possible to get {entry_id} working?
Same thing here. {entry_id} doesn’t work here either, although it shows it in the docs. Its not listed in the variables for substitution either though.
HI Leevi -
So, I’m trying to use LG Twitter on a client site, because it would be a great feature for them to have.
I’m having some issues using 2.0.1 in tandem with Brandon Kelly’s FF Matrix in FieldFrame. When both Field Frame and LG Twitter are enabled, I lose the ability to add additional rows in my FF Matrix…the (+) completely disappears in the publish screen.
I was wondering if you have any ideas on what might be causing this. I’m kind of committed to FFMatrix, but it would be great to be able to use both for this client.
Thanks a ton for this extension. It will be really helpful.
Cheers,
Josh
Hi all,
I love this extension, but found that I need to add in URL shortening. I thought I would share with you all what I did.
Things you should know…
So, to get started…
$status = $this->_shortenURLs($status);
function _shortenURLs($status)
{
preg_match_all('/\\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/i', $status, $matches, PREG_SET_ORDER);
$counter = 0;
foreach ($matches as $val) {
$status = str_replace($matches[$counter][0], $this->_getSmallLink($val[0]), $status);
$counter++;
}
return $status;
}
function _getSmallLink($longurl){
$login = "MYLOGIN";
$apikey = "MYAPIKEY";
$url = "http://api.bit.ly/shorten?version=2.0.1&longUrl;=$longurl&login;=$login&apiKey;=$apikey&format=json&history=1";
$s = curl_init();
curl_setopt($s,CURLOPT_URL, $url);
curl_setopt($s,CURLOPT_HEADER,false);
curl_setopt($s,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($s);
curl_close( $s );
$obj = json_decode($result, true);
return $obj["results"]["$longurl"]["shortUrl"];
}
That’s it. Save the file and test it.
A couple of things I would like to further add to this extension:
Cheers.
Andrew…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.