Help Finding a Solution please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

Help Finding a Solution please

Post by irishmike2004 »

Greetings:

I have been working on a scrolling weather application based on a PHP application I built some time back.

I tried to just use a <marquee></marquee> tag to keep it simple (KIS) but the data is way too much for that to work efficiently. It is apparent to me that I need to find another way to acomplish this task. The current solution, which is not the way to go is at radioteal.no-ip.com/miketest/weather_scroll_1.php

What would be ideal is if there is a PHP based solution to accomplish the scrolling and I would need help setting up the code. The JavaScript examples I have seen don't work for one reason or another after escaping (\) the single quotes so that they will work, I suppose that it may be the way I approach PHP in building that is the issue (I tend to echo all my HTML out in one echo'html code would be here'; block).

Any help getting this to work would be very much appreciated. We are dealing with a 4 or 5 line paragraph that we need to scroll and it either uses three lines in the marquee tag or is incomplete data...

Thanks again for any help!

Mike
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Okay, I'll answer your question first, and then tell you what I think of the project as a whole.

PHP cannot scroll the code. This is a client side problem and PHP cannot do much to help you.

What PHP can do, however, is parse the data so that the marquee is one line in height. I'd suggest stripping the <p> tags via strip_tags.

Now, I'd like to know: why does it have to be a marquee? Marquees are dead annoying, I kid you not. A better time of your development efforts would be to do something like use GD to make a little thermometer image that has the red bar move up and down depending on the temperature or setting up a nice graphical display (that doesn't move around). MARQUEE and BLINK are evil. Don't use them.
theda
Forum Contributor
Posts: 332
Joined: Sat Feb 19, 2005 8:35 am
Location: USA

Post by theda »

I'd think just having a static text/image 'toolbar' of sorts on a website is better than marqueeing the hell out of people's eyes. :)
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

Take the idea under advisement

Post by irishmike2004 »

I will take your input under advisement on the GD... perhaps I can figure out a way to make them small enough to fit my tight space though... I could use alt tags to allow for tool tips and that might work. There is a lot of data we want to make available in a very small space :-)

Thanks for the help in any case.

Mike
g00fy_m
Forum Newbie
Posts: 7
Joined: Mon Feb 21, 2005 1:46 am

Post by g00fy_m »

what about a flash movie that reads the dynamic data generated from php?

an alt to GD, but not everyone likes flash, including Google :)

could even have a tabbed interface then, an fit as much info as you like.
or

CSS tabs http://www.alistapart.com/articles/slidingdoors/ and do the same using GD for images

hth
g00fy
Post Reply