twitter inside indexhibit

think5577 / 2009-02-24 02:30:31   

ok, so i searched the word 'twitter' and found 3 posts. two of them were not what i was looking for. the 3rd post was titled 'twitter plugin' but when clicked, it went back to the forum main page.

so, i would like to post my other twitter account/html badge inside an indexhibit page itself. i've tried just a simple copy and paste inside the CMS, but the actual list does not come up, only the title on my updates & the 'follow me...' link, both provided by twitter.

i have twitter on my sidebar, but like i said, i'd like to have another one in indexhibit.

is this possible?

Vaska A / 2009-02-24 02:40:21   

You mean this? Read the tutorial about plugins if you don't know what to do with this...I'm in a rush right now...

  1. function twitter()
  2. {
  3. ¬†¬†¬†¬†$OBJ =& get_instance();
  4. ¬†¬†¬†¬†global $rs;
  5. ¬†¬†¬†¬†// password info
  6. ¬†¬†¬†¬†$login = 'login:password';
  7. ¬†¬†¬†¬†$name = explode(':', $login);
  8. ¬†¬†¬†¬†$url = 'http://twitter.com/users/show/' . $name[0] . '.xml';
  9. ¬†¬†¬†¬†// setup curl  
  10.     $ch = curl_init();  
  11.     curl_setopt($ch, CURLOPT_URL, $url);
  12.     curl_setopt($ch, CURLOPT_USERPWD, $login);  
  13.     curl_setopt($ch, CURLOPT_HEADER, 0);
  14.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  15.     $xmla = curl_exec($ch);
  16.     // returns nothing if there is a problem
  17.     if ($xmla == '') return;
  18.     curl_close($ch);
  19.     $xml = new SimpleXMLElement($xmla);
  20. ¬†¬†¬†¬†$text = ($xml->status->text == '') ? '' : $xml->status->text;
  21. ¬†¬†¬†¬†// just return the content
  22. ¬†¬†¬†¬†$s = "<div id='twitter'>n";
  23. ¬†¬†¬†¬†$s .= '<p>' . $text . '</p>';
  24. ¬†¬†¬†¬†$s .= "<p><a href='http://twitter.com/" . $name[0] . "'>More updates? Follow my Twitters.</a></p>n";
  25. ¬†¬†¬†¬†$s .= "</div>n";
  26. ¬†¬†¬†¬†return $s;
  27. }

But change the 'login:password" part with your Twitter login and password. This requires that you have PHP5 and SimpleXML installed as well...if you don't have these then ask your webhost (we can't do anything about these for you).

You can customize the html output at the end...I've left a hook in here so you can style things a bit if wanted...

think5577 / 2009-02-24 02:52:10   

thanks man. i'll mess with this asap!

think5577 / 2009-03-19 16:39:38   

hey,

ok, i finally got to this but i'm having a problem with nothing showing up. here is what i did:

  1. - i created a .php file using the code above. 
  2. - placed my twitter username/pw in code. 
  3. - called function in .php file ndxz_think5577yummy()
  4. - uploaded the file to the plugins folder. 
  5. - called the plugin "plug:ndxz_think5577yummy" (with proper end tags in indexhibit)

then nothing shows up. no warnings/etc. am i missing something? i've tried reading up on all the 'plugin' talk around the forums, but can't seem to find anything that might help.

thanks in advanced.

think5577 / 2009-03-19 16:40:39   

opps, sorry about the code tags.

Vaska A / 2009-03-19 16:58:43   

Is your host running PHP5?

think5577 / 2009-03-19 17:12:00   

yeap. 5.2.8

all the specs for the plugin are good.

Vaska A / 2009-03-19 17:43:04   

When Twitter is particularly busy it doesn't return the data...maybe this is the problem?

think5577 / 2009-03-19 17:55:12   

maybe. still nothing showing up. i'll mess around with this some more.

thanks vaska.

Vaska A / 2009-03-19 17:56:46   

you separated the login and password with a :

???

cruz / 2009-03-19 18:14:20   

If you're running safari 4 there's this strange issue with twitter in that only shows fresh posts. Get satisfaction thread Other than that I used to have a badge on my main page and it worked Ok.

think5577 / 2009-03-19 18:17:42   

i'm using the latest FF. I have a twitter account on the sidebar in index.php. this is for using twitter inside indexhibit.

cruz, did you use the above code/steps to make a plugin?

m

Vaska A / 2009-03-19 18:46:57   

think...you saw my note?

I'm curious about this...

think5577 / 2009-03-19 18:52:41   

sorry vaska,

didn't see your post.

yes, username:password with ':'

Vaska A / 2009-03-19 18:56:27   

can you send me a note with ftp info to your site? i'd like to play with this and see what's going on...

contact [at] indexhibit [dot] org

Maurice_Redmond / 2009-08-21 09:52:15   

Found it, the instructions to create the code to add a twitter feed are right here:

easy peasy lemon squeezy

m

Edited by Vaska: edited out the link because it will be confusing for others...it's for another system. Don't understand why it was linked here...providing a better link below...

Vaska A / 2009-08-21 10:10:39   

More complete ways to add Twitter to your site.

ishbudesign / 2009-11-24 19:05:24   

Is there a way to work just the text feed into the site? I really don't want all of the extra stuff from the Twitter widget that is created through the Twitter site.

Would I just use the example listed above, or is there another workaround for that?

wynams / 2010-04-04 19:22:17   

totally befuddled ...

tried: http://tweet.seaofclouds.com/tweet/jquery.tweet.js
didn't know where to put the js (documentation lacking)

tried php above, put plugin.twitter.php in ..\site\plugin dir and it displayed the function as a header on the webpage

tried going to twitter directly and copying the script into an indexhibit page, it displayed nothing

my site otherwise seems to work

mstemmelen / 2010-05-03 21:41:39   

How can I add a simple Twitter link in my left hand bar?
Thanks!

humbert / 2011-01-11 22:59:42   

some one has a demo of how this looks ?

harky / 2011-01-28 05:48:55   

WOOAH! much easier is this -----

See my twitter feed:
http://vahakn.co.uk/

You put this line of code:

Twitter Feed



just replace YOURTWITTERUSERNAME with your twitter user name (obviously)

Vahakn

harky / 2011-01-28 05:49:29   

WOOAH! much easier is this -----

See my twitter feed:
http://vahakn.co.uk/

You put this line of code:

Twitter Feed



just replace YOURTWITTERUSERNAME with your twitter user name (obviously)

Vahakn

harky / 2011-01-28 05:50:14   

Twitter Feed



harky / 2011-01-28 05:50:55   

oh for christ sake whats going on with my post?
im using the blockquote tags and the code tags and it formulating my html so u cant see my solution

????

harky / 2011-01-28 05:51:10   

oh for christ sake whats going on with my post?
im using the blockquote tags and the code tags and it formulating my html so u cant see my solution

????

beast / 2011-02-13 14:42:12   

http://swttl.com/technical/indexhibit-tools/

I used this to embed the Twitter feed in my page.
Worked in seconds.

valente / 2011-04-08 08:49:40   

that's amazing beast. Thanks for sharing :)

Appceptionall / 2011-04-13 11:21:35   

Could somebody please explain where and how to put this plugin in indexhibit?

Would be great to get some help :)

domhnall / 2011-05-28 22:40:52   

Appceptionall, it goes in the normal plug-in directory: /ndxz-studio/site/plugin

I just switched from that "Exhibit Format" plug-in to some simple code I found.

  1. I dropped this text into the exhibit I was editing:
  2. <h1>Twitter Updates</h1>
  3. <ul id="twitter_update_list"></ul>
  4. <script src="http://twitter.com/javascripts/blogger.js" type="text/javascript"></script>

<script src="http://twitter.com/statuses/user_timeline/USERNAME.json?callback=twitterCallback2&count=10" type="text/javascript"></script>
<a style="display:block;text-align:right;" id="twitter-link" href="http://twitter.com/USERNAME"><h1>Follow me on Twitter</h1></a>

  1. And I dropped the following in my css page:
  2. /* TWITTER TEST */

#twitter_update_list { /* sets properties for whole list, fonts, bullets, etc */
    font-size: 11px;
    line-height: 18px;
    list-style: none;
    }

#twitter_update_list li { /* makes a 2x1 image repeat as a divider between posts */
    background: url('/images/divider.gif') bottom left repeat-x;
    padding-bottom: 6px;
    margin-bottom: 6px;
    }

#twitter_update_list span, { /* sets the attributes of the tweet text */
    color: black;
    text-decoration: none;
    }

#twitter_update_list span a { /* sets the attributes of the links */
    color: #red;
    }

#twitter_update_list a { /* sets the attributes of the time stamp */
    color: #blue;
    }

/* End Twitter Test */

domhnall / 2011-05-28 22:44:30   

Sorry, that should be this in the exhibit

  1. <h1>Twitter Updates</h1>
  2. <ul id="twitter_update_list"></ul>
  3. <script src="http://twitter.com/javascripts/blogger.js" type="text/javascript"></script>
  4. <script src="http://twitter.com/statuses/user_timeline/USERNAME.json?callback=twitterCallback2&count=10" type="text/javascript"></script>
  5. <a style="display:block;text-align:right;" id="twitter-link" href="http://twitter.com/USERNAME"><h1>Follow me on Twitter</h1></a>

And this in the CSS

  1. /* TWITTER TEST */
  2. #twitter_update_list { /* sets properties for whole list, fonts, bullets, etc */
  3.     font-size: 11px;
  4.     line-height: 18px;
  5.     list-style: none;
  6.     }
  7. #twitter_update_list li { /* makes a 2x1 image repeat as a divider between posts */
  8.     background: url('/images/divider.gif') bottom left repeat-x;
  9.     padding-bottom: 6px;
  10.     margin-bottom: 6px;
  11.     }
  12. #twitter_update_list span, { /* sets the attributes of the tweet text */
  13.     color: black;
  14.     text-decoration: none;
  15.     }
  16. #twitter_update_list span a { /* sets the attributes of the links */
  17.     color: #red;
  18.     }
  19. #twitter_update_list a { /* sets the attributes of the time stamp */
  20.     color: #blue;
  21.     }
  22. /* End Twitter Test */
domhnall / 2011-05-28 22:47:43   

And don't forget to make & upload that "divider.gif" if you want it.

martinhooke / 2011-06-13 04:09:32   

this thread is helping me alot, but i'm still having few issues! i'm pretty noob to this whole coding and stuff, but i want the twitter feed wich i put in my menu to be less wide and less posts. i'd also like where to upload the divider.gif cause it doesn't seem to find it!

thanks a bunch! this is my site www.hooke.nl

martinhooke / 2011-06-13 04:09:53   

this thread is helping me alot, but i'm still having few issues! i'm pretty noob to this whole coding and stuff, but i want the twitter feed wich i put in my menu to be less wide and less posts. i'd also like where to upload the divider.gif cause it doesn't seem to find it!

thanks a bunch! this is my site www.hooke.nl

siekram15 / 2011-06-17 04:36:16   

Twitter Marketing Made Easy

Twitter is a great place for growing online business. The simple strategies are to build followers, brand and advertise websites.
It is not hard to use Twitter. But it's not so easy to use Twitter effectively to grow follower numbers and then get traffic which can lead to sales.
It's a good news for the online business holders that ebooks containing all the concerned features of business in Twitter are available.
To have access one of the most powerful resources about using Twitter for business, just one have to do is download Twitter Marketing Made Easy.
Details twitter follower generator, quick twitter followers, champions league twitter, twitter marketing

siekram15 / 2011-06-17 04:37:27   

Twitter Marketing Made Easy

Twitter is a great place for growing online business. The simple strategies are to build followers, brand and advertise websites.
It is not hard to use Twitter. But it's not so easy to use Twitter effectively to grow follower numbers and then get traffic which can lead to sales.
It's a good news for the online business holders that ebooks containing all the concerned features of business in Twitter are available.
To have access one of the most powerful resources about using Twitter for business, just one have to do is download Twitter Marketing Made Easy.
Details twitter follower generator, quick twitter followers, champions league twitter, twitter marketing

This thread has been closed, thank you.