cloudy

Author Topic: NHC RSS Feed Parser - Changing Fonts etc in  (Read 738 times)

0 Members and 1 Guest are viewing this topic.

mth

  • Guest
NHC RSS Feed Parser - Changing Fonts etc in
« on: September 03, 2006, 04:49:46 PM »
krelvinaz: [split topic to move questions away from announcment]

Anole,

Great script!  Thanks for sharing your work......  Is there anyway to configure the font size / font type / font color?  I am going to have to use this script in an inline frame which limits me to do this.  If this can be done within the php script it would be a lot of help.

Thanks,
Mike

« Last Edit: September 04, 2006, 05:48:22 PM by krelvinaz »

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Changing Fonts etc in NHC RSS Feed Parser
« Reply #1 on: September 03, 2006, 04:59:50 PM »
I was just about to write something to do that.

Will take a peak... thanks.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Changing Fonts etc in NHC RSS Feed Parser
« Reply #2 on: September 03, 2006, 05:14:52 PM »
s there anyway to configure the font size / font type / font color?  I am going to have to use this script in an inline frame which limits me to do this.

It uses standard tags, so you should be able to control it with CSS without too much of an issue.

Still playing around but only took a minute or two to create a real page.

http://www.tnetweather.com/hurricanes.php

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline anole

  • Posts: 139
  • St. James City, FL USA
    • St. James City Weather
Changing Fonts etc in NHC RSS Feed Parser
« Reply #3 on: September 03, 2006, 05:29:54 PM »
Kevin's correct. It's designed to work with standard CSS. There are no <font> tags since they aren't XHTML 1.0 compliant.

Probably the easiest way to modify the output is to create a <div> with the appropriate fonts and list styles defined within it. For example:

Code: [Select]
<div style="font: normal bold 10pt Arial; list-style-type: square">
insert the call to the script here
</div>
You could also do this in a css style sheet file as well by creating a class with the attributes you want and then doing this:

in the style sheet:

Code: [Select]
.nhc {
  font: normal bold 10pt Arial;
  list-style-type: square;
}

and then in your html:

Code: [Select]
<div class="nhc">
insert the call to the script here
</div>
St. James City, FL Weather
http://weather.anolecomputer.com


mth

  • Guest
Changing Fonts etc in NHC RSS Feed Parser
« Reply #4 on: September 03, 2006, 05:50:42 PM »
Anole/krelvinaz,

THanks for your replies.  I am currently using a CSS file to control my site but it has no effect on the inline frame.  Take a look at my code.

Quote
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="About Relay Maryland Weather" />
<meta name="keywords" content="weather, local weather, relay, Maryland Weather, CWOP, lacrosse, weather station, PWS, amateur weather" />
<meta name="author" content="Your Name / Original design: Andreas Viklund - http://andreasviklund.com/" />
<link rel="stylesheet" type="text/css" href="andreas01.css" media="screen,projection" />
<link rel="stylesheet" type="text/css" href="../../temp/weatherdisplay/webpagetemplate/andreastemplate/andreas01/print.css" media="print" />
<title>RelayWeather.com</title>
</head>

<body>
<div id="wrap" style="width: 867px; height: 3277px">

<div id="header">
<h1>RelayWeather.com</h1>
<p><a href="index.html">Current Temp %temp%</a></p>
</div>

<img id="frontphoto" src="header1_760_175.jpg" width="760" height="175" alt="" />

<div id="leftside">
<h2 class="hide">Menu</h2>

<ul class="avmenu">
<li><a href="wx.html">Home</a></li>
<li><a href="wx1.html">Forecast</a></li>
<li><a href="wx2.html">Radar</a></li>
<li><a href="wx3.html">Webcam</a>
</li>
<li><a href="wx4.html">Hazards</a></li>
<li><a href="wx5.html">Daily Stats</a></li>
<li><a href="wx6.html">Historical</a></li>
<li><a href="wx7.html">Graphs</a></li>
<li><a href="wx8.html">Models</a></li>
<li><a href="wx9.html">Tropical</a></li>
<li><a href="wx10.html">Snow</a></li>
<li><a href="wx11.html">Health</a></li>
<li><a href="wx12.html">Lightning</a></li>
<li><a href="wx13.html">Mesomap</a></li>
<li><a href="wx14.html">Past Events</a></li>
<li><a href="wx15.html">Links</a></li>
<li><a href="wx16.html">About</a></li>
<li></li>
<li></li>
</ul>

<div class="announce">
<h2>World Mesonet</h2>
<p><a href="worldmesonet.html">
<img border="0" src="mesonet.gif" width="110" height="107"></a></p>
<p class="textright">&nbsp;</p>
<p>&nbsp;</p>
<p class="textright">&nbsp;</p>
</div>
</div>

<div id="contentwide">
<h2><font size="2"><br>
&nbsp;</font></h2>
<h3>&nbsp;&nbsp;<iframe name="I1" src="http://69.143.144.53/nhcfeedparse.php" width="618" height="1161">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></h3>
</div>

<div id="footer">
Copyright &copy; 2006 RelayWeather.com</div>

</div>
</body>
</html>


I am not too php savy so I always have to use inline frames for the php on my site.

Your help is appreciated as always,
Michael

mth

  • Guest
Changing Fonts etc in NHC RSS Feed Parser
« Reply #5 on: September 03, 2006, 06:13:00 PM »
Ok, I think I got it.  I called out the css file in the beginning of the php script.

Thanks!

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Changing Fonts etc in NHC RSS Feed Parser
« Reply #6 on: September 03, 2006, 06:25:04 PM »
Why don't you convert your pages to .php instead of .html

You would then be able to include stuff instead of using iframes.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

mth

  • Guest
Changing Fonts etc in NHC RSS Feed Parser
« Reply #7 on: September 04, 2006, 05:31:40 PM »
Krelvinaz,

I would love to convert to PHP but I would have no way to edit/view.  I currently use frontpage to produce and maintain my site.  I am totally green with prograrmming in PHP.  Can you offer any suggestions on how to convert and how to maintain my site.  What software do you use?

Mike

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Changing Fonts etc in NHC RSS Feed Parser
« Reply #8 on: September 04, 2006, 05:39:05 PM »
PHP is HTML with a .php extension and if you add it PHP tags.

You can actually have a complete HTML file with a .php extension that has NO PHP in it at...

So all you would need to do is have Frontpage, use .php as the extension of the files (don't know if it can do that though as I've never really used FrontPage).

What do I use....

Universally accessible tools that I can use from anywhere I have access to the Internet including my cell phone...(don't do that often).

  Notepad like editor (I use ConText normally)
  FTP client

Of if I don't have that but can ssh into the box

  vi (vim or other similar text editor)

I've used large content web management systems many times in the past Adobe GoLive, Dreamweaver etc.. but they all have one big fault.... if you are where they aren't you have a problem updating the site.


All you need is Time, Aptitude and Desire ... and you can build just about anything...

mth

  • Guest
Re: NHC RSS Feed Parser - Changing Fonts etc in
« Reply #9 on: September 04, 2006, 09:00:02 PM »
Thanks for the insight.  Frontpage will allow you to view the content of your page before you "save/upload" to the site.  Frontpage doesn't allow you to view the page within Frontpage once the page is coverted to PHP (code text only).  This is why I've been reluctant to switch.

 

cumulus