- Posts: 32
COMMUNITY FORUM
Twitter default text
- Third Sun Productions
-
Topic Author
- Offline
- Junior Member
Less
More
15 years 6 months ago #75494
by Third Sun Productions
Twitter default text was created by Third Sun Productions
Has anyone found where to change the default text that gets sent to Twitter when clicking on "Tweet This to your followers" I would like to customize that a bit...
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- Third Sun Productions
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
15 years 6 months ago #75495
by Third Sun Productions
Replied by Third Sun Productions on topic Twitter default text
Found it here: components/com_k2/views/view.html.php around line 197.
Be careful!
Be careful!
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
- Offline
- Elite Member
Less
More
- Posts: 175
15 years 4 months ago #75496
by Oceanwatcher
Replied by Oceanwatcher on topic Twitter default text
There is a much better way to do this by using the language file. You find the relevant text in the languages folder for Joomla
/language/en-GB/en-GB.com_k2.ini
Just look for the text and change the part to the right, but do not change the text in all capitals. This way you do not need to change any core files and when there is an update, you do not have to redo anything.
If your language is not English, then just make a copy of this file and rename it according to your language. I made one for Norwegian and called it nb-NO.com_k2.ini .
/language/en-GB/en-GB.com_k2.ini
Just look for the text and change the part to the right, but do not change the text in all capitals. This way you do not need to change any core files and when there is an update, you do not have to redo anything.
If your language is not English, then just make a copy of this file and rename it according to your language. I made one for Norwegian and called it nb-NO.com_k2.ini .
Please Log in or Create an account to join the conversation.
- Third Sun Productions
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
15 years 4 months ago #75497
by Third Sun Productions
Replied by Third Sun Productions on topic Twitter default text
I'm referring to the text that autopopulates in Twitter -- that, unfortunately is not in the language file, though I wish it was. It uses "Reading @yourtwittername tinyurl..."
Svein Wisnaes said:There is a much better way to do this by using the language file. You find the relevant text in the languages folder for Joomla
/language/en-GB/en-GB.com_k2.ini
Just look for the text and change the part to the right, but do not change the text in all capitals. This way you do not need to change any core files and when there is an update, you do not have to redo anything.
If your language is not English, then just make a copy of this file and rename it according to your language. I made one for Norwegian and called it nb-NO.com_k2.ini .
Svein Wisnaes said:There is a much better way to do this by using the language file. You find the relevant text in the languages folder for Joomla
/language/en-GB/en-GB.com_k2.ini
Just look for the text and change the part to the right, but do not change the text in all capitals. This way you do not need to change any core files and when there is an update, you do not have to redo anything.
If your language is not English, then just make a copy of this file and rename it according to your language. I made one for Norwegian and called it nb-NO.com_k2.ini .
Please Log in or Create an account to join the conversation.
- kire timov
-
- Offline
- Senior Member
Less
More
- Posts: 59
14 years 7 months ago #75498
by kire timov
Replied by kire timov on topic Twitter default text
i really need this as well.. where i can chante that "Reading @username ItemTitle tinyurl.com/2ed4cz" As well i would like to add some intro text from the Item. How can i do that?
Please Log in or Create an account to join the conversation.
- troponin
-
- Offline
- Platinum Member
Less
More
- Posts: 398
14 years 7 months ago #75499
by troponin
Replied by troponin on topic Twitter default text
you can find it in /components/com_k2/views/item/view.html.php Line 217.
Be patient - if you change it you hack the core. Changes will be gone if you update K2
Be patient - if you change it you hack the core. Changes will be gone if you update K2
Please Log in or Create an account to join the conversation.
- kire timov
-
- Offline
- Senior Member
Less
More
- Posts: 59
14 years 7 months ago #75500
by kire timov
Replied by kire timov on topic Twitter default text
thank you for your replay, ok but how could i translate this in another set of chars.. this is in ANSI encoded and i need it in UTF-8.. can i somehow make translation for the "Reading" word in the k2 language file?
and how could i add to read couple of words from the Item, now it's only the title but i would like something like intro text
here is the code just to make thins easier
//Twitter link
if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) {
$itemURLForTwitter = ($params->get('tinyURL')) ? @file_get_contents('tinyurl.com/api-create.php?url='.$item->absoluteURL) : $item->absoluteURL;
$item->twitterURL = 'twitter.com/home/?status='.urlencode('Reading @'.$params->get('twitterUsername').' '.$item->title.' '.$itemURLForTwitter);
}
thank you very much for helping!
and how could i add to read couple of words from the Item, now it's only the title but i would like something like intro text
here is the code just to make thins easier
//Twitter link
if ($params->get('itemTwitterLink') && $params->get('twitterUsername')) {
$itemURLForTwitter = ($params->get('tinyURL')) ? @file_get_contents('tinyurl.com/api-create.php?url='.$item->absoluteURL) : $item->absoluteURL;
$item->twitterURL = 'twitter.com/home/?status='.urlencode('Reading @'.$params->get('twitterUsername').' '.$item->title.' '.$itemURLForTwitter);
}
thank you very much for helping!
Please Log in or Create an account to join the conversation.