Technical Discussion
  >> Web Design / HTML / Web hosting Forum


Register (or login) on our website and you will not see this ad.


  Print Thread
Standard User RogerE
(committed) Thu 20-Jun-13 10:39:24
Print Post

Way to update news section of website


[link to this post]
 
Local sports club has a basic website (HTML/CSS/Javascript). Used to display news by adding news item to Twitter then using the Twitter API display the text from the Tweets in a form that matched the website theme.

Twitter has changed their API and now has to include ability to retweet, addreplies etc and look and feel like Twitter, so of no use on the news section of the website.

Is there a simple way of displaying up to 10 text blocks (might be multiline) e.g. from a text file loaded to the server.

I started to look at JSON files but this appears to be for single line records only.

Or can anyone suggest a better way?

Many thanks

Edited by RogerE (Thu 20-Jun-13 11:31:55)

Standard User camieabz
(sensei) Fri 21-Jun-13 02:20:16
Print Post

Re: Way to update news section of website


[re: RogerE] [link to this post]
 
Perhaps?

http://www.youtube.com/watch?v=6Oq5AYKFuTI

~ Camieabz ~

All Connection Data ~ Some plusnet links

I've forgotten more about broadband than I care to remember.
Standard User RogerE
(committed) Fri 21-Jun-13 16:26:29
Print Post

Re: Way to update news section of website


[re: camieabz] [link to this post]
 
Therein lies the problem!

The new Twitter API dictates the feed looks and behaves like Twitter - you must show the user icon, you must show retweet, like and reply buttons, you only have 2 colour schemes and the width range is limited.

Previously the old API allowed you to choose which parts of the tweet you wanted to display, and you could use CSS to make it appear consistent with the website.

We only want to display the news text on the news page of the website - if people want to reply or retweet they can go to the actual Twitter page.


Register (or login) on our website and you will not see this ad.

Standard User metalhead41
(knowledge is power) Fri 21-Jun-13 16:37:10
Print Post

Re: Way to update news section of website


[re: RogerE] [link to this post]
 
I done something like this a while ago, I'll have to check my notes, but I think I used php for it like this:
PHP
1
23
45
6
<?php
    $myfilename = "textfile.txt";    if(file_exists($myfilename)){
      echo file_get_contents($myfilename);    }
?>


I'll check when I get home and update if need be smile

----------------------------------------------------
We may be human But we're still animals

My Blog | follow me @metalhead41 | Surfin' Bird Dance
Standard User camieabz
(sensei) Fri 21-Jun-13 17:18:34
Print Post

Re: Way to update news section of website


[re: RogerE] [link to this post]
 
Also see:

https://dev.twitter.com/docs/embedded-timelines

You can fiddle with the width, and there should be the option to omit replies.

I imagine there's all sorts of customisation options, if you know what you're doing with the Twitter API.

~ Camieabz ~

All Connection Data ~ Some plusnet links

I've forgotten more about broadband than I care to remember.
Standard User BatBoy
(legend) Fri 21-Jun-13 18:39:42
Print Post

Re: Way to update news section of website


[re: RogerE] [link to this post]
 
This any use? http://allwebco-templates.com/support/S_script_IFram...


__________________________________________________________________________The back pedalling starts here__________________
Standard User RogerE
(committed) Mon 01-Jul-13 17:43:51
Print Post

Re: Way to update news section of website


[re: RogerE] [link to this post]
 
Have resorted to my old programming language (Delphi) and written a program that looks and behaves like Notepad (editing a text file). Then, with a button press the file is parsed and HTML tags are added and the HTML is FTP'd to the server, as newsfeed.txt.

The actual news page was just changed to a SHTML page and the newsfeed page is included, and CSS looks after the formatting and display.
  Print Thread

Jump to