PDA

View Full Version : Forum Home Enhancements - webprocafe.com - twittercall


saltedm8
08-12-2009, 10:00 PM
This is based off of this http://www.axllent.org/projects/mytwit

it basically calls your twitter feed

to install

upload the attached file to your sites server

Create a new plugin and use these details

Hook Location = global_start
Title = twitter call
execution order = 5

Plugin PHP Code =

ob_start();
include(DIR . '/twittercall.php');
$twitter = new myTwit();
$twitter->user = 'your twitter name';
$twitter->cacheFile = 'twitcache.txt';
$twitter->postLimit = 5;
$twitter->initMyTwit();
print $twitter->myTwitData;
$latest_twit = ob_get_contents();
ob_end_clean(); where it says your twitter name in the bit of code above, you need to place in the name you use, for example, ours is webprocafe

then place this in your css

/* ***** twitter sidebar ***** */

ul.twitbox {
list-style: none;
margin: 0;
padding: 0;
}
ul.twitbox li{
border-bottom:1px dashed #D2DADA;
padding: 10px;
font-size: 14px;
font-family: 'Lucida Grande',sans-serif;
color: #333333;
}
ul.twitbox li.mytwitHead {
height: 60px;
}
ul.twitbox li.mytwitHead a {
font-size: 22px;
font-weight: bold;
}
ul.twitbox li.mytwitHead img{
float: left;
padding-right: 10px;
}
ul.twitbox li a {
color: #0084B4;
text-decoration: none;
}
ul.twitbox li a:hover { text-decoration: underline; }
ul.twitbox span.twhen {
color: #999999;
font-family: georgia;
font-size: 10px;
font-style: italic;
padding-top: 5px;
}
that can be adjusted to however you like

then all you have to do is place

$latest_twit

wherever you want this displayed on the homepage by editing the forumhome template ( sorry, I cant give a specific place yet )

and you should be done

for a demo, please go here http://webprocafe.com/

Anyone who requires help, must have this marked as installed

thank you

there is no need to update if you are having no issues once installed

update: added $twitter->cacheFile = 'twitcache.txt'; to make sure it points to the cashe.. a couple of people had issues.. please make sure twittercall.php is set to chmod 777.

saltedm8
08-13-2009, 02:23 PM
reserved post

Wrams
08-13-2009, 03:48 PM
Haaa 1st...Lol Nice stuff Salty. Will definately like having this on the forums. Great work!! ;)

WEBDosser
08-13-2009, 06:03 PM
i don't mean to dis this but, it is just a copy of the other here (http://www.axllent.org/twitter) made into a plugin.

not original, but saves having to work it out yourself..

wD

saltedm8
08-13-2009, 06:07 PM
well, generally that's what a plugin is... the ability to 'plug' something into the forum lol, it does not have to be unique, if you checked im sure you will find loads of plugins like this that have done the same thing.

I supplied credits to that site, and there are lots of people that would have no idea how to integrate that sort of thing onto their boards.. should I not have posted it just because I did not make it from scratch ?..

it will be useful to loads of people and it will save loads of 'working out' for the majority..

why re-invent the wheel ?

Brandon Sheley
08-13-2009, 06:18 PM
I like it, nice work :)

saltedm8
08-13-2009, 06:19 PM
thank you

TheSavant
08-14-2009, 01:58 AM
Awesome! just what I was looking for.

I am trying to install the feed in a column, but I can't get it to show up.

1. Uploaded PHP to Forum dir (I now see twitfile.txt file) so that part seems to be working

2. added product
ob_start();
include(DIR . '/twittercall.php');
$twitter = new myTwit();
$twitter->user = 'ILoveToTailgate';
$twitter->postLimit = 5;
$twitter->initMyTwit();
print $twitter->myTwitData;
$latest_twit = ob_get_contents();
ob_end_clean();

3. added sidebar style info to style CSS

4. added $latest_twit to block 1 in my column template

.....nothing- what did I miss?

saltedm8
08-14-2009, 10:58 AM
2. added product

you need to add plugin, not product

TheSavant
08-14-2009, 02:30 PM
you need to add plugin, not product

Yes, plug-in not product. That is what I meant- sorry. I installed new plug-in per instructions. It is showing up as a plug-in and it is active. Still nothing.

I am using USC columns- with $latest_twit in block 1 in my column template. I can read the feed txt file off of the server. Its just not putting the feed in the column.

Thanks (again) in advance-

saltedm8
08-14-2009, 05:58 PM
maybe something is clashing with USC columns

you did use global_start for the hook location dident you ?

maybe ask whoever made USC columns if it can parse from separate plugins variables ?

test it, just put the variable anywhere in your forumhome template ( other than USC ) and see if it works..
if it works then its a clash, if not then you have done something wrong and we would need to work out what

ArnyVee
08-15-2009, 04:05 PM
Demo doesn't seem to be working. Maybe it's a Twitter thing, but I'll check back later.

saltedm8
08-15-2009, 04:48 PM
It was a twitter thing...

I think I would have to do some sort of alternative display if they are offline

Sweeks
08-15-2009, 06:34 PM
Installed and thank you :)

saltedm8
08-25-2009, 10:22 PM
This is unstable due to either it having problems reaching twitter or twitter being down

when this happens you will see the message 'could not connect to json' and makes your site go down with it

for that reason, its going into the graveyard until the issue is fixed..