News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SimpleTwitter

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

Previous topic - Next topic

Suki

Link to Mod

Simple Twitter mod
Author: Suki


License

* This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/


Description

For SMF 2.0.x only

This mod uses TwitterOAuth PHP Library  by Abraham Williams (abraham[at]abrah.am) http://abrah.am

This mod needs PHP 5.2+ and cURL Library

This mod allow you to publish new topics to your twitter account automatically, all the topics made by users who have an active account will be automatically published on your twitter account.

the message will be as follows:

topic name url
url will be normal url or if enable, bit.ly url


-Set the ID of the board or boards you don't want the mod work.
-Permisisons to post new topics to twitter
-You can use the bit.ly API  to short your urls
-works with every theme, this mod des not modify any file at all! ;)

   you will have to create a twitter app, without the twitter app, this mod will not work.


Laguage
-English/utf8
-Spanish_latin/utf8
-Spanish_es/utf8


Change Log
-5/Jan/12 1.2
   +Compatible with 2.0.x
   +fixed bug on users_denied and boards array
   +Updated twitter library
   +Disable the admin form via JavaScript if cURL is not installed

-23/June/11  1.1. version.
   +Added a permission, now you can manage which membergroups can post new topics to twitter
   +Added a single user ban, now you can put the IDs of single users, those users will not be able to post new topics to twitter even if they are on a group with permissions.
   +Updated to SMF 2.0
   +Cleaning up the Settings part
   +Updated the twitter API
   +Re-work of language strings
   
-10/March/11  Finished first version.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

Hey MAS

Daft question but any images on what users should expect to see?

Do members also have to own a twitter account to have their posts tweeted? ( confused with the description slightly).

Suki

No, the users do not have to have a twitter account,   this mod will post every new topic you specify in a twitter account you specify, many forums and site has a twitter account for forum/site purposes.

you wil need to create a twitter app for your twitter account where you wish to publish the topics in,  there's instruction on the mod's settings if you click the little help icon, to create a new twitter app follow this steps:


In order to use this mod, you have to create an app on twitter, first, go to: Client Applications page, sign in with your twitter username and password, click on Register a new application, fill out all the requested fields:
-Application Name: this is important, whatever you put in here will appear on every tweet: via:myforum_name
-Application URL: your forum url
-Application Type: check the "Client" option
- Default Access type: check the "Read & Write" option
- Application Icon: the icon for the app, can be edited later.

once you register your app, now you can see your Consumer key and Consumer secret.

to get your token access, clik on "My acces Token" tab. you will get your auth token and oauth token secret do not reveal those.


The topic will not be posted in he user's account but rather in the account where you made the app.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

Thanks for the eye opener MAS.


Matthew K.

Nice to see this approved finally, Miss All Sunday :) Congratulations!

Suki

Thanks!

hope this mod will be useful
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Soulmaster

is it possible to make it so that also the reactions are posted?
check out my lightning site

vladok

Mod for UTF8 boards only?

Suki

Quote from: Soulmaster on April 22, 2011, 12:00:08 AM
is it possible to make it so that also the reactions are posted?

by reactions yo mean replies?

well, I don't think posting the replies also is a good idea if you have a big or a pretty busy forum, there's also a limit set by twitter for their API.


Quote from: vladok on April 24, 2011, 07:16:35 AM
Mod for UTF8 boards only?


What language are you using?   can you post a link to your site, maybe an example of how this mod creates the tweet in your language?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

vladok

#9
I use charset windows-1251 / Russian /
Posts to Twitter (via this mod) looks like (example)  : ? ? ? ? ? ? ? ?  ? ? ? ? The Sims 3 ? ? ? ?
When you create posts to Twitter from my forum via RSS (twitterfeed.com), russian looks normal.

Suki

OK, let me do some test today to see whats the issue with non utf8 languages, to be quite honest, I only tested it with English and Spanish.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

4b11l

Hello Miss All Sunday,

Although it was explained above I am still slightly confused as to the description. Is this similar to the twitter/facebook publisher mod in the past if you've come across from it? Basically all new posts on your forum are posted on an account specified for the website. i.e. all new threads on this site will post to a simplemachines twitter account.

If so, are there permissions for threads that are created in hidden/unavailable boards? such as boards only for admin/mods.

Suki

Yes, its exactly as you pointed out.


if you have hidden boards or boards do you not want to publish to twitter  there's a check option:

Check to define the boards where this mod will not work
optional, leave in blank to post tweets from every board, this is useful if you have admin only or members only type of boards and you do not want to make the topics go public.


check that option and below:

Put the board's ID where yo DO NOT want this mod to work.
IDs only, example: 1,2,3,4




for example if you have a hidden board with ID  3  then you put   3  in that field,  if you have more  separate every number with a comma ( , )    3,67,788,2,4,5
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

4b11l

That is exactly what I wanted to hear. Wanted this feature back so badly since the other one stopped.

Usually, I can modify to fit but this one is not installing in RC3. (I know you say rc4 and 5 only)

I am getting this error:
Fatal error: Call to undefined function add_integration_function() in /home/xpeng065/public_html/Packages/temp/install.php on line 19

Can you let me know if this is a RC3 only issue or is it because I am missing cURL or PHP5.2+ if possible? Thanks that will help me narrow it down as I really want this mod to work.

Arantor

-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

4b11l

Quote from: Once Upon A Star on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

Thanks for the info by the way. That's why I ASKED. Not everyone is a genius like you at stuff like this, go save the world or something if it's that troublesome for you provide helpful info.

~DS~

Quote from: 4b11l on May 01, 2011, 09:04:46 PM
Quote from: Once Upon A Star on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

Thanks for the info by the way. That's why I ASKED. Not everyone is a genius like you at stuff like this, go save the world or something if it's that troublesome for you provide helpful info.
It's people like you who couldn't read when this mod in fact is NOT compatible with RC3, you have no choice but to upgrade if you want to use this mod's function.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Suki

4b11l  I'm afraid this mod is only compatible with RC4 and RC5, this is because this mod needs some features that are only available in those versions.


also, I will highly appreciate  if you do not use this topic for other purposes but for support for the mod only.

thank you.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

4b11l

Quote from: ~V~ on May 01, 2011, 09:08:38 PM
Quote from: 4b11l on May 01, 2011, 09:04:46 PM
Quote from: Once Upon A Star on May 01, 2011, 08:53:04 PM
-sigh-

It is RC4 and RC5 only for a REASON. Like the fact that add_integration_function didn't exist until RC4.

Thanks for the info by the way. That's why I ASKED. Not everyone is a genius like you at stuff like this, go save the world or something if it's that troublesome for you provide helpful info.
It's people like you who couldn't read when this mod in fact is NOT compatible with RC3, you have no choice but to upgrade if you want to use this mod's function.

Hello Miss All Sunday,

Thanks to the info provided by Once Upon A Star I know why now. I was simply asking for support and did not know why I received a response the way I did so I had to defend my response. Is that not what support is?

@V, it's funny people like me or rather people like you exists to throw tantrums on the internet.

I acknowledged that I knew it wasn't compatible for RC3 and usually slight modifications will make mods fit previous or other versions of SMF. I didn't knew what the reason was and simply asked to help me narrow the problem.

Either way, thanks for the great mod Miss All Sunday. Hopefully I will be able to use it in the future and as for the issue, I feel no need to pursue it any further like kids arguing over the internet.

Suki

meh :(   I meant  you   as in plural,  (you guys)    In Spanish we have two separate words,  "tu"  for a single person  and "ustedes"  for plural.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: