Bitly for EE
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Bjorn Borresen
Line break after Bitly tag
General
kevin332
|
Posted: 24 July 2011 07:36 PM |
|
|
|
First of all, thanks for a great time-saving addon. I’ve just come across one minor hiccup that’s easily fixed.
The text files returned by bit.ly seem to come with a blank 2nd line which causes the module tag to output with a line break. To avoid this, I added a maxlen of 20 to the @file_get_contents line of the module and manually edited all the existing entries in my database. I suppose trimming linebreaks would have been the more elegant solution. I just didn’t know what the best method would be.
|
|
|
Indranil
|
Posted: 10 December 2011 03:09 PM |
# 1
|
|
|
Just add this after the if($short_url) { in function _shorten_url().
$short_url = str_replace(”\n”,’‘,$short_url);
And you’re good to go. Good catch :)
|
|
|