Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to put twitter and news in one feed

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
GB
At the moment I have two areas on the news page, the news feed that comes from our mssql database which is searchable on keyword and date. The other is a straightforward list showing our last 10 tweets.

Is it possible to

When a visitor views the news page they see one list of news AND twitter displayed in date order. So the visitor knows which is which as it will just be one list, the twitter feeds could have the twitter icon next to them, or have a blue border or something.

I guess I would need to pull the twitter feeds into an array, pull the news results into an array, order the array then output to the screen?!?!

Is that correct, would it take the page an age to load? Is there a better way? Can anyone point me to any tutoriasls online that would show me how to do it?

Thanks
 
I guess I would need to pull the twitter feeds into an array, pull the news results into an array, order the array then output to the screen?!?!

yes. that would be fine.

remember that this should _NOT_ be done on each page load. instead have a script that assembles the information on a pre-determined basis (say two minutes via cron) and stores the result in a text file. then the actual page requested just includes the text file. you could even have the relevant html block element request the text file via ajax every (say) two minutes) and reload it so that you could auto update.

or you could probably find a javascript class that does it all for you solely on the client side.

Can anyone point me to any tutoriasls online that would show me how to do it?

I suspect that this is too trivial for any tutorials; but I have not looked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top