News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SimpleTwitter

Started by Suki, April 20, 2011, 01:43:22 PM

Previous topic - Next topic

HaCCaBi

hey,

how about non-utf8 languages
mine is "latin5 turkish"

what we should do_?
En Kötü MARKA Dani MARKA

HaCCaBi

solved...

Sources/SimpleTwitter.php

replace line 49:
$twt_message = iconv("ISO-8859-9","UTF-8",$msgOptions['subject']);
this is for turkish..  for other languages you need to change the ISO-8859-9 to your character set 


replace line 90:
$twitter=$connection->post('statuses/update', array('status' =>$mensaje));



En Kötü MARKA Dani MARKA

vladok

#22
HaCCaBi, Thank you! It works!  :)

***

Russian:

$txt['ST_donate'] = 'Если Вам нравится этот мод, <a href="http://oharascans.com/donate.html" target="blank">поддержите его развитие!</a>';
$txt['simpletwitter_default_menu'] = 'Мод SimpleTwitter';
$txt['simple_twitter_post_body'] = '<span style="font-weight:bold;">Постить часть сообщения?</span><br />При включенной опции, будут публиковаться первые 80 знаков сообщения, только текст, bbc теги будут удаляться, в конце сообщения будет "..." т.е. многоточие.';
$txt['simple_twitter_enable'] = '<span style="font-weight:bold;">Включить SimpleTwitter мод</span><br />Кликните на значке помощи, чтобы узнать, как зарегистировать свою аппликацию на twitter.';
$txt['simple_twitter_use_bitly'] = '<span style="font-weight:bold;">Использовать сервис bit.ly API для укорачивания стандартной ссылки?</span><br />Кликните на значке помощи, чтобы узнать, как получить username и  key на bit.ly<br/>Это опционально, в противном случае будет публиковаться не укороченная ссылка, занимающая больше места.';
$txt['simple_twitter_bit_ly_username'] = '<span style="font-weight:bold;">Введите bit.ly username здесь:</span><br />Это опционально, но если Вы включили сервис bit.ly и не ввели username, ссылка не будет укорачиваться.';
$txt['simple_twitter_bit_ly_key'] = '<span style="font-weight:bold;">Введите bit.ly key здесь:</span><br />но если Вы включили сервис bit.ly и не ввели key, ссылка не будет укорачиваться.';
$txt['simple_twitter_boards'] = '<span style="font-weight:bold;">Введите ID разделов форума, которые этот мод НЕ будет обслуживать.</span><br />Только ID разделов, например: 1,2,3,4';
$txt['simple_twitter_consumer_key'] = '<span style="font-weight:bold;">Введите twitter consumer key здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_consumer_secret'] = '<span style="font-weight:bold;">Введите twitter consumer secret здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_oauth_token'] = '<span style="font-weight:bold;">Введите oauth token здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_oauth_token_secret'] = '<span style="font-weight:bold;">Введите oauth token secret здесь:</span><br />Вы должны сделать это после регистрации апликации на twitter.';
$txt['simple_twitter_board_enable'] = '<span style="font-weight:bold;">Определите разделы форума, которые <span style="font-weight:bold; color:red; font-size:14;">НЕ будут обслуживаться модом</span></span><br />Опционально, оставьте пустым для постинга из всех разделов. Включение этой опции полезно, если у Вас есть скрытые от гостей разделы, и Вы не хотите, чтобы из них публиковались сообщения в twitter.';

// help strings
$helptxt['simple_twitter_enable'] = 'Более детально можно узнать <a href="http://oharascans.com/foro/tutoriales/tutcreate_twitter_app_simpletwitter_mod_2786.msg9714.html#msg9714" target="blank">здесь</a><p />Для работы этого мода Вы должны создать свою аппликацию на twitter. Перейдите <a href="http://dev.twitter.com/apps" target="blank">на страницу Client Applications</a>, залогиньтесь,  нажмите Register a new application, и заполните поля: <br />
-Application Name:  это важно, будет публиковаться в поле:  via:здесь_имя_аппликации<br />
-Application URL:  линк на Ваш форум<br />
-Application Type:  включите "Client" опцию<br/>
- Default Access type:  включите "Read & Write" опцию <br/>
- Application Icon: значок аппликации, может быть отредактирован впоследствии.<br/>
<p /> после регистрации Вы увидите Consumer key и Consumer secret. <p />Для получения token access, кликните "My acces Token"  закладку. Получите oauth token и oauth token secret.';
$helptxt['simple_twitter_use_bitly'] = 'Для использования сервиса bit.ly, Вы должны зарегистрировать аккаунт на <a href="http://bit.ly/" target="blank">bit.ly</a>  и запросить: <a href="http://bit.ly/a/your_api_key" target="blank">Ваш API key</a>. Получив Ваши username и key сервиса, заполните соотвествующие поля мода.';

madfitz

Is there any way to add hashtags to the tweet? For example, if your board is dedicated to certain sports team you could include #teamname to every tweet?

Suki

can you please elaborate more?  you want to include  #something in the tweet?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

madfitz

Quote from: Miss All Sunday on May 28, 2011, 05:23:18 PM
you want to include  #something in the tweet?

Yes, exactly. And I'm happy to have the same #something in every tweet.

Suki

open your Sources/SimpleTwitter.php file  and find:

$mensaje = $twt_message.'  '.$twturl;


there you can add your #somthing   by replacing with this




$thing_to_show = '#something';
$mensaje = $twt_message.'  '.$twturl. ' .$thing_to_show;



this will show # at the end of the tweet after the url
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

madfitz

Quote from: Miss All Sunday on May 28, 2011, 05:45:23 PM
open your Sources/SimpleTwitter.php file  and find:

$mensaje = $twt_message.'  '.$twturl;


there you can add your #somthing   by replacing with this




$thing_to_show = '#something';
$mensaje = $twt_message.'  '.$twturl. ' .$thing_to_show;



this will show # at the end of the tweet after the url

Thank you but this edit results in the error:
Parse error: syntax error, unexpected T_STRING in /home/.../forum/Sources/SimpleTwitter.php on line 79

Suki

my bad

it needs tobe . ' ' .   instead of . ' .
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

madfitz

Thank you - works perfectly!

One more thing. Where is this text found so I could edit it? "last messages from twitter"

Suki

where exactly did you see this text?   
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

madfitz

It is the header text above the mod in the info center on the board index.

Suki

mmm, can I have a screnshot please, I don't remember put that string to this mod, all the strings this mod uses are in /Themes/languages/SimpleTwitter.your_language.php
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

madfitz

Quote from: Miss All Sunday on May 29, 2011, 12:19:21 PM
mmm, can I have a screnshot please, I don't remember put that string to this mod, all the strings this mod uses are in /Themes/languages/SimpleTwitter.your_language.php

Ok, I'm mobile right now but when I get back to my desk I'll get a screenshot for you. If it helps, that text is also a clickable link to the twitter account.

madfitz

Screenshot attached...

Suki

That seems to be like another mod, what other mods do you have installed?

remember that his mod only post new topics to twitter, it does not get the latest tweets from twitter ;)
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

madfitz

Quote from: Miss All Sunday on May 29, 2011, 07:02:08 PM
That seems to be like another mod, what other mods do you have installed?

remember that his mod only post new topics to twitter, it does not get the latest tweets from twitter ;)

Of course! It's the 'Calling Your Twitter' mod. How stupid am I?  :-[

Thanks for the help (with your mod!)

Bobn

Having trouble setting this up can anyone help?

Suki

@Bobn   if you specify what's the issues you're having I may be able to help you.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Bobn

Quote from: Miss All Sunday on May 30, 2011, 07:43:08 PM
@Bobn   if you specify what's the issues you're having I may be able to help you.

Hi Thanks,,

I installed the mod,, ok
Went to twitter and created an app Consumer key, Consumer secret
Clicked on My Access Token, Access Token (oauth_token), Access Token Secret (oauth_token_secret)

Left everything below that unchecked, did not specify boards, did not use bit.ly

Posted in the forum,, did not appear in our twitter page.

Thanks in advance :)

Advertisement: