Twitter Block

Permalink 1 user found helpful
As a simple test for trying out the Block functionality, I created a Twitter block.

It shows the user's avatar, username, and the latest x number of tweets in a users stream.

As a first shot, I'm not sure if it is programmed the 'C5' way, so please let me know what improvements I could make.

1 Attachment

SkyBlueSofa
View Replies: View Best Answer
tallacman replied on at Permalink Reply
tallacman
I just installed it and all my tweets came flooding in. Thanks for this block.
jereme replied on at Permalink Reply
jereme
Timestamps should be optional too...

I'm happy to implement some of these if you're not feeling it! :)
SkyBlueSofa replied on at Permalink Reply 1 Attachment
SkyBlueSofa
I've updated the code. It is attached.

Updated is the ability to hide the avatar, change the username to an alternate title, hide the timestamp, and hide repsponses. I'm having some difficulty with pulling the saved information back out of the database for the form. Anyone want to help with that?
ScottC replied on at Permalink Reply
ScottC
Hey I wanted to thank you for the block and all the effort you have put into it :)I haven't installed it since i don't have a twitter account, but anything to advance c5 as a whole in my mind is greatly appreciated :)
jereme replied on at Permalink Reply
jereme
Hey hey... This twitter block works pretty great. However I have a few suggestions that might spice it up.

1. Make the avatar and username optional via the add/edit interface.

2. Make responses to other twitters hidden or optionally hidden.

I thought I had one more, but I can't think of it.

Good job!
vernon replied on at Permalink Reply
I've just downloaded the Twitter Block and going to install it shortly. My Site is still under construction but you will be able to check it out at http://rosspublicrelations.com
vernon replied on at Permalink Reply
I've installed and this is a great tool like I stated, but I can't seem to control the number of post that are showing. I have the option set to 3 but I'm showing 5 tweets. Anyone else had that issue?
ScottC replied on at Permalink Reply
ScottC
Showing at least 10, I don't use the service but I figured I would test it.
SkyBlueSofa replied on at Permalink Reply
SkyBlueSofa
I have fixed the bugs with the form not working correctly.
The plugin is available on my site athttp://www.sollos.net/services/plugins/...
vernon replied on at Permalink Reply
Wow thanks A really big help. Downloading now and will report back when tested.

Thanks!
vernon replied on at Permalink Reply
Hey I'm getting a Warning: Invalid argument supplied for foreach() in /homepages/25/d169524231/htdocs/RPR/blocks/twitter/view.php on line 35

This was after the upgrade. Any ideas?
michaelmior replied on at Permalink Reply 1 Attachment
michaelmior
For me, this turned out to be a cURL problem. I modified the plugin controller to use PHP stream functions instead and it seems to be working fine for me. The modified controller.php is attached. This should be placed in blocks/twitter/
Judder replied on at Permalink Reply
Judder
Most ISPs consider using php streams to be unsafe, and recommend Curl as a much safer option.

For myself testing on Media Temple I had to use the original (1st uploaded) Curl version - reference:http://kb.mediatemple.net/questions/793/Why+is+allow_url_fopen+disa...
redtype replied on at Permalink Reply
check if your twitter is protected. once i unprotected my tweets it worked with gigamyke's fix.

just wondering if a future version might have areas for sharing protected tweets?
mattwilliamson replied on at Permalink Reply
mattwilliamson
I would love to see a div at the bottom with a graphical element to follow the displayed twitter user. Also, I would like to see a more elegant way to edit the display that editing the actual php.

I used it on my site athttp://www.clevyr.com/contact and I am quite happy with it!

:)

Namaste!
tmedina replied on at Permalink Reply
I receive this message:

Warning: Invalid argument supplied for foreach() in /homepages/29/d290152409/htdocs/blocks/twitter/view.php on line 35

I've tried all 3 versions supplied by damiro and the fix suggested by gigamyke -- and still receive the same warning -- any ideas? Was I supposed to manually edit any of the php files?
freestylemovement replied on at Permalink Reply
freestylemovement
it's awesome, thanks so much for putting in the time to do it..

i'm looking to replace my username display to something else (my website name was too long for twitter ...)

also for some weird unexplainable reason, the title function does not work for me (everytime i type in a title it doesn't save it or display it)

thanks!!
ipallian replied on at Permalink Reply 1 Attachment
thanks for the block. I've just needed a similar block today and have found this block. It did not work initially so I've made some minor fixes. It's now working with my Concrete 5.3.1.1.

File attached.
RobertJNL replied on at Permalink Reply
RobertJNL
Hi Damiro,

so far I really like the block you've created and it works very nice!

I think it's a hard one, but is it possible to have twittered url's also made available as links through the block? Currently links are not clickable, do you know how to do this?

Hope to hear from ya,
thank you,

Robert
kutis replied on at Permalink Reply
kutis
http://www.concrete5.org/community/forums/block_requests/another_twitter_block
olay replied on at Permalink Reply
olay
I've just moved server and now i'm getting this invalid arguement now too...

Had it all working on another build... Anyone still suffering with this or have another fix?
PerryGovier replied on at Permalink Reply
PerryGovier
Knew it was only a short matter of time before someone put this together. Great job.
mattpav replied on at Permalink Reply 1 Attachment
First, thanks for the block. Excellent. It looks much nicer than just adding a Twitter RSS feed.

I've made some changes to it:

1. CSS formatting based on the parent website more than the block itself.
2. Different CSS spacing, layout, etc.
3. Functionality to automatically hyperlink any URL in a tweet (popping the URL in a new window to boot).
4. A handful of small bug fixes

You can see how the slightly changed version looks here:http://www.pavelle.org/index.php/technology/concrete5_twitter_block...

You can also download the code there, or from the attachment here.

Thanks again for writing this!
alanbull replied on at Permalink Reply
Hi,

I have tried every version of this Twitter block on this page but I just can't get it working.

I get a similar error mentioned above - apart from this time it's from controller.php and not view.php:

"Warning: Invalid argument supplied for foreach() in /actual-path-here/blocks/twitter/controller.php on line 61"

I am running Concrete5 v5.3.1.1

Any ideas how I can get this working?
novologic replied on at Permalink Reply
novologic
Tried latest versions of twitter block and keep getting this error message

Parse error: syntax error, unexpected $end in C:\Program Files\BitNami WAMPStack\apache2\htdocs\blocks\twitter\view.php on line 46
clairec replied on at Permalink Reply
clairec
Hi I'm running 5.3.3 I have just tried to add the twitter block above however get the following error
Fatal error cannot use object of type StdClass as array in home/gothinkd/public_html/blocks/twitter/view.php on line 18 anyideas please?
vadamalaivasu replied on at Permalink Reply
hi ,

i have install your addon which is you are attached with this post.. and my doubt how can i set date format like (1 hours ago). can u give the date format option for this

Better you can mail me with your suggestion

[email protected]


Thanks!
narinder replied on at Permalink Reply
Hi i m new to concrete5,when i add the twitter block from block list it gives the following error.

Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\test concrete\packages\jereme_tweetcrete\libraries\twitteroauth\twitteroauth.php on line 181.

please help me.

Thanks.
Mnkras replied on at Permalink Best Answer Reply
Mnkras
you should use tweetcrete in the Market Place
eads replied on at Permalink Reply
Hi

Im getting the same the 181 error too, anyone know the solution ?

Cheers
defunct replied on at Permalink Reply
defunct
You guys need to install curl and tell PHP to use it.

Seeing as how you are using XAMPP

http://www.google.com/search?hl=en&safe=off&&sa=X&e...

Sounds like you just have to uncomment the extension in your php.ini
frankstar replied on at Permalink Reply
Where can I find it?? I can can not found any download! Please help!
Mnkras replied on at Permalink Reply
Mnkras
frank look at the answer
Judder replied on at Permalink Reply
Judder
Twitter limits the public views of a profile to < 150 per hour for a single IP, so if you're testing you can hit the situation where the view.php fails as Twitter is returning an error.

To work around this modify the view.php to check for Twitter errors as follows:

<?php if (count($tweets) && !$tweets->error) { ?>
esilk replied on at Permalink Reply
esilk
I tried all 3 versions of this plugin and I still get this error:

Warning: Invalid argument supplied for foreach()

Here is the page (twitter is to go above the facebook widget):
http://www.ckkinternetmarketing.com/blog/...
Charlotte replied on at Permalink Reply
I have a question about the Twitter Block...

Can you use one of the twitter blocks on all pages or just front page? Can I also include it through the blog outlet offered on through Concrete 5?

Do I need a link for the twitter block or is there another way to go about uploading onto a webpage.

Hope I have been descriptive enough!

Thanks,