vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Home Enhancements - webprocafe.com - twittercall (https://vborg.vbsupport.ru/showthread.php?t=220798)

saltedm8 08-12-2009 10:00 PM

webprocafe.com - twittercall
 
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 =
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 ***** */

Quote:

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 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

Quote:

2. added product
you need to add plugin, not product

TheSavant 08-14-2009 02:30 PM

Quote:

Originally Posted by saltedm8 (Post 1867080)
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..


All times are GMT. The time now is 05:55 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01227 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete