- Posts: 12
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Tiny URL not working on 'Tweet this to your followers'
Tiny URL not working on 'Tweet this to your followers'
- dsa787
-
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- devsmi
-
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- devsmi
-
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- NosyWeb
-
- Offline
- New Member
- Posts: 10
Therefore, I have the same problem with a '+' in between the words.
Rishona Campbell said:
Sure...it's www.rishonan.net devsmi said:I had no problems when testing this myself. Could I see your site ?
Please Log in or Create an account to join the conversation.
- devsmi
-
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- yaksushi
-
- Offline
- Premium Member
- Posts: 157
Please Log in or Create an account to join the conversation.
- Mary Jezierski
-
- Offline
- New Member
- Posts: 4
devsmi said:
I just changed your pass to the same as your username. try again
Please Log in or Create an account to join the conversation.
- devsmi
-
- Offline
- New Member
- Posts: 7
It seems that the reason this happends is because twitter implemented their new homepage. If you click the button to use their old page again then this works just like before with no problem..But now with the new page there is a redirect in there. My fix is only going to be temporary because once twitter makes the new page the default and only one..things should work like normal again :) Although maybe somebody from k2 team can fix it for now
Please Log in or Create an account to join the conversation.
- Mary Jezierski
-
- Offline
- New Member
- Posts: 4
Thanks for your help with registration on your site. I was able to get in and applied the fix.
The fix works great, but the url is not shortened. :-(
Re: the '+' symbol, I changed "urlencode" to "urldecode", which replaces the plus sign with a space.
Please Log in or Create an account to join the conversation.
- Rishona Campbell
-
- Offline
- New Member
- Posts: 9
Thanks so much for that fix to remove the '+'. Works great!
Also my URL does come up shortened. I enabled Tiny URL on the backend.Mary Jezierski said:
Hello devsmi,
Thanks for your help with registration on your site. I was able to get in and applied the fix.
The fix works great, but the url is not shortened. :-(
Re: the '+' symbol, I changed "urlencode" to "urldecode", which replaces the plus sign with a space.
Please Log in or Create an account to join the conversation.
- Mary Jezierski
-
- Offline
- New Member
- Posts: 4
Thanks again!
Mary Jezierski said:
Hello devsmi,
Thanks for your help with registration on your site. I was able to get in and applied the fix.
The fix works great, but the url is not shortened. :-(
Re: the '+' symbol, I changed "urlencode" to "urldecode", which replaces the plus sign with a space.
Please Log in or Create an account to join the conversation.
- devsmi
-
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- Fernando Nunes
-
- Offline
- New Member
- Posts: 4
to
$item->twitterURL = 'twitter.com/share?text='. urlencode( $params->get('twitterUsername') ).'&url=' . $itemURLForTwitter;
Please Log in or Create an account to join the conversation.
- Chris Valius
-
- Offline
- New Member
- Posts: 5
Fernando Nunes said:
$item->twitterURL = 'twitter.com/home/?status='.urlencode('Reading @'.$params->get('twitterUsername').' '.$item->title.' '.$itemURLForTwitter);
to
$item->twitterURL = 'twitter.com/share?text='. urlencode( $params->get('twitterUsername') ).'&url=' . $itemURLForTwitter;
Please Log in or Create an account to join the conversation.
- Fernando Nunes
-
- Offline
- New Member
- Posts: 4
find: if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) { ...
and replace function with:
if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) { $itemURLForTwitter = $item->absoluteURL; if($params->get('tinyURL')) { $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL,'tinyurl.com/api-create.php?url='.$item->absoluteURL); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $itemURLForTwitter = curl_exec($ch); curl_close($ch); } $item->twitterURL = 'twitter.com/share?text='. urlencode( $params->get('twitterUsername') . ' '. $item->title ).'&url=' . $itemURLForTwitter; }
You can check whether your hosting supports you curl by phpinfoSorry for English ...
Please Log in or Create an account to join the conversation.
- Chris Valius
-
- Offline
- New Member
- Posts: 5
Mary Jezierski said:
Hello devsmi,
Thanks for your help with registration on your site. I was able to get in and applied the fix.
The fix works great, but the url is not shortened. :-(
Re: the '+' symbol, I changed "urlencode" to "urldecode", which replaces the plus sign with a space.
Please Log in or Create an account to join the conversation.
- B_Dark
-
- Offline
- Premium Member
- Posts: 126
Fernando Nunes said:
go to: components\com_k2\views\item\view.html.php and view.raw.php
find: if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) { ...
and replace function with:
if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) { $itemURLForTwitter = $item->absoluteURL; if($params->get('tinyURL')) { $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL,'tinyurl.com/api-create.php?url='.$item->absoluteURL); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $itemURLForTwitter = curl_exec($ch); curl_close($ch); } $item->twitterURL = 'twitter.com/share?text='. urlencode( $params->get('twitterUsername') . ' '. $item->title ).'&url=' . $itemURLForTwitter; }
You can check whether your hosting supports you curl by phpinfoSorry for English ...
Please Log in or Create an account to join the conversation.
- B_Dark
-
- Offline
- Premium Member
- Posts: 126
Please Log in or Create an account to join the conversation.
- Fernando Nunes
-
- Offline
- New Member
- Posts: 4
You can do a variety of ways ... just follow the API. It is somewhat customizable. How do you want?
Please Log in or Create an account to join the conversation.
- B_Dark
-
- Offline
- Premium Member
- Posts: 126
Fernando Nunes said:
Twitter API
You can do a variety of ways ... just follow the API. It is somewhat customizable. How do you want?
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Tiny URL not working on 'Tweet this to your followers'