Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Recommended Posts

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

Share this post


Link to post
Share on other sites

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 Station

Hope that you can help!

Regards,

Xtremee

Share this post


Link to post
Share on other sites

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:

<?php
function MySQL_connection()
{
$host = "hostname";
$user = "username";
$pass = "password";

$connection = mysql_connect($host, $user, $pass);
mysql_select_db ("databasename", $connection);
}
?>

newsbar.php

<?php
include("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 by Darude1234

Share this post


Link to post
Share on other sites

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 all

any idea will be excellent.

Regards,

Xtremee

Share this post


Link to post
Share on other sites

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:

<?php
function MySQL_connection()
{
$host = "hostname";
$user = "username";
$pass = "password";

$connection = mysql_connect($host, $user, $pass);
mysql_select_db ("databasename", $connection);
}
?>

newsbar.php

<?php
include("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 by Darude1234

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
i don't wanna to make this new bar my self using marquee

That is all

Remove the marquee quotes <marquee> and </marquee> :rolleyes:

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 code

Option 2. Getting the news from a database and show it to the user

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

Share this post


Link to post
Share on other sites

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

Regards,

Xtremee

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

@Chozo4,

1st thanks for ur reoly

i don't wanna RSS news

i wanna a news bar which show the last news and update its contain automatically without modify its marquee every new news

Share this post


Link to post
Share on other sites
@Chozo4,

1st thanks for ur reoly

i don't wanna RSS news

i wanna a news bar which show the last news and update its contain automatically without modify its marquee every new news

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi

Thanks for all who try to help

i wanna newsbar like this one in the top of http://www.soft32.com

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

Regards,

Xtremee

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...