xtremee Posted October 22, 2006 Share Posted October 22, 2006 Hi all,i wanna to make newsbar that move automatically and the informattion on it don't linked (i.e. can't click on it to go to link) just wanna news.HOw i can do this?Regards,Xtremee Link to comment Share on other sites More sharing options...
ripken204 Posted October 23, 2006 Share Posted October 23, 2006 well it depends, where are you getting the news from? Link to comment Share on other sites More sharing options...
xtremee Posted October 25, 2006 Author Share Posted October 25, 2006 I don't think that is really depend on where are you getting the news from?But any way i will use it for My Radio StationHope that you can help!Regards,Xtremee Link to comment Share on other sites More sharing options...
Darude1234 Posted October 30, 2006 Share Posted October 30, 2006 (edited) If you just want to add the news to your html source files your can use this:<marquee>This is news item 1 ** This is news item 2 ** This is news item3</marquee>If you want to show news from items in a database you first have to connect to the database and fetch the items from the database. Using PHP and MySQL it would be something like this:mysqlconnection.php:<?phpfunction MySQL_connection() { $host = "hostname"; $user = "username"; $pass = "password"; $connection = mysql_connect($host, $user, $pass); mysql_select_db ("databasename", $connection); }?>newsbar.php<?phpinclude("mysqlconnection.php"); MySQL_connection();$qsqlnews = mysql_query("SELECT * FROM news");While($row = @mysql_fetch_array($qsqlnews)) { $title = $row["title"]; $message = $row["message"]; $date = $row["date"]; } echo "<marquee><b>($date) $title</b> - $message ";?>Edit:Ofcourse you have to edit $host, $user, $pass and databasename according to your situation Edited October 31, 2006 by Darude1234 Link to comment Share on other sites More sharing options...
xtremee Posted October 31, 2006 Author Share Posted October 31, 2006 Thanks for your help Link to comment Share on other sites More sharing options...
xtremee Posted October 31, 2006 Author Share Posted October 31, 2006 Hi all,i wanna to get Automatic upgating news bar that i can use to put it in my website. i don't wanna to make this new bar my self using marquee That is allany idea will be excellent.Regards,Xtremee Link to comment Share on other sites More sharing options...
Darude1234 Posted October 31, 2006 Share Posted October 31, 2006 (edited) Why did you open a new topic? What was wrong with my solution?If you want to show news from items in a database you first have to connect to the database and fetch the items from the database. Using PHP and MySQL it would be something like this:mysqlconnection.php:<?phpfunction MySQL_connection() { $host = "hostname"; $user = "username"; $pass = "password"; $connection = mysql_connect($host, $user, $pass); mysql_select_db ("databasename", $connection); }?>newsbar.php<?phpinclude("mysqlconnection.php"); MySQL_connection();$qsqlnews = mysql_query("SELECT * FROM news");While($row = @mysql_fetch_array($qsqlnews)) { $title = $row["title"]; $message = $row["message"]; $date = $row["date"]; } echo "<marquee><b>($date) $title</b> - $message ";?>Ofcourse you have to edit $host, $user, $pass and databasename according to your situation Edited October 31, 2006 by Darude1234 Link to comment Share on other sites More sharing options...
Zxian Posted October 31, 2006 Share Posted October 31, 2006 Topics Merged@xtremee - Please don't start a new topic if you've already got one. Your previous thread seemed to solve your problem. Reply there if you want more information. Link to comment Share on other sites More sharing options...
Darude1234 Posted November 3, 2006 Share Posted November 3, 2006 i don't wanna to make this new bar my self using marquee That is allRemove the marquee quotes <marquee> and </marquee> Try to tell exactly what you want. I think there are 3 options and I showed you these options:Option 1. Put the news directly in the source codeOption 2. Getting the news from a database and show it to the userOption 3. Put news lines, line by line in a text file and read every line in the text file using a script.But the last option is almost the same as option 1. Link to comment Share on other sites More sharing options...
xtremee Posted November 3, 2006 Author Share Posted November 3, 2006 @Darude1234,1st thanks for your reply,i wanna the new to be set automatically in my page without going to add them my self.-> Option 1& 3 not my requireRegards,Xtremee Link to comment Share on other sites More sharing options...
Chozo4 Posted November 4, 2006 Share Posted November 4, 2006 (edited) So you're basically asking for a new bars that gets news from RSS news feeds? Just trying to help clarify what you want - I have no experience in dealing with RSS. Edited November 4, 2006 by Chozo4 Link to comment Share on other sites More sharing options...
xtremee Posted November 8, 2006 Author Share Posted November 8, 2006 @Chozo4,1st thanks for ur reolyi don't wanna RSS newsi wanna a news bar which show the last news and update its contain automatically without modify its marquee every new news Link to comment Share on other sites More sharing options...
Darude1234 Posted November 10, 2006 Share Posted November 10, 2006 @Chozo4,1st thanks for ur reolyi don't wanna RSS newsi wanna a news bar which show the last news and update its contain automatically without modify its marquee every new newsWell, in that case, what's wrong with my solution in post #7?I still don't know what you want. If you want to change the contents automatically, try to understand that you need a source to get the news from like a database or text file, can't find another solution right now Link to comment Share on other sites More sharing options...
gugutz Posted December 25, 2006 Share Posted December 25, 2006 not sure if that is what you are looking for but ever tried Cute News? It does not use SQLs, the data is stored in flat files. Link to comment Share on other sites More sharing options...
xtremee Posted January 28, 2007 Author Share Posted January 28, 2007 HiThanks for all who try to helpi wanna newsbar like this one in the top of http://www.soft32.comi check the source of the page and i don't think that it is marquee. I think they use some java scripts!!if it java can any one tell me what is the script that i need?Thanks in advanceRegards,Xtremee Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now