Hi Everyone,
This is my first post to this forum and I am a new user to CMS Made Simple but have fallen in love with it. I am currently on version 1.0.6. This is for our school district here in Vilonia, Arkansas and I am trying to get our content moved over to CMS to make it a site that our faculty can also begin using to expand their classroom offerings. In trying to "spruce" up the site and keep things somewhat consistant with the old site, I was trying to add a weather script to our site from weather.com (we have this on our current website (http://vilonia.k12.ar.us) but the content from the weather.com site does NOT come through, only a link is posted on the page in a box showing us how to get to the weather on weather.com.
I had cut the script from the weather.com site after it was generated by them, then I pasted iit into the template I am using (a custom copy of Left Simple Navigation + 1 column). I am using the horizontal format of their script. I created (as you will see from what I am pasting below, a new section within the template just below the "News" module to "hold" their script.
My question is, am I putting this script in the correct place? Since I cannot seem to get it to function properly (their "live" weather and graphics do not come through) should I be doing this elsewhere? I am definitely am NOT a CSS person but can hack and slash with the best of them! The code I am using is pasted below. The site I am trying to put it on is currently at 165.29.97.65/ Thanks in advance for any insight into how I might make this work. I scanned the manual but this doesn't seem to fit the scenerio I am faced with.
Vilonia Weather Forecast, AR
/* Locations can be edited manually by updating 'wx_locID' below. Please also update */
/* the location name and link in the above div (wx_module) to reflect any changes made. */
var wx_locID = 'USAR0572';
/* If you are editing locations manually and are adding multiple modules to one page, each */
/* module must have a unique div id. Please append a unique # to the div above, as well */
/* as the one referenced just below. If you use the builder to create individual modules */
/* you will not need to edit these parameters. */
var wx_targetDiv = 'wx_module_5088';
/* Please do not change the configuration value [wx_config] manually - your module */
/* will no longer function if you do. If at any time you wish to modify this */
/* configuration please use the graphical configuration tool found at */
/* https://registration.weather.com/ursa/wow/step2 */
var wx_config='SZ=728x90*WX=FHW*LNK=SSNL*UNT=F*BGI=boat*MAP=CSC|null*DN=vilonia.k12.ar.us*TIER=0*PID=1004138900*MD5=ae2f2f76093dfc8a0a24145590828c8d';
document.write('');
adding external weather.com scripts to site
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: adding external weather.com scripts to site
I use a (pretty much) identical thing for theweathernetwork.com.
However, just to keep my code looking good, and readable, I placed the code snippet from theweathernetwork.com into a global content block, then I used the global content block in my page template.
A good rule of thumb is, any HTML snippet required to embed somebody elses content in your site, should go into a global content block.
However, just to keep my code looking good, and readable, I placed the code snippet from theweathernetwork.com into a global content block, then I used the global content block in my page template.
A good rule of thumb is, any HTML snippet required to embed somebody elses content in your site, should go into a global content block.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: adding external weather.com scripts to site
I use a User Defind Tag to show the weather on my site www.wsv-herkingen.nl
{weerbericht}
Gregor
{weerbericht}
Code: Select all
echo '<__iframe width="120" height="160" scrolling="no" frameborder="0" src="http://gratis.weer.nl/meteo/hptool/?cid=31X4825&l=nl&cityName=Grevelingen&style=1&v=nl"> </__iframe>';
Re: adding external weather.com scripts to site
Thanks for the feedback. I took your advice and put the contents of the script in a Global Content block called weather and just referenced it from the template. Much cleaner. I can get the one from theweathernetwork.com to work, but not the one from weather.com. I see that there is quite a bit of difference in the type of script (namely that theweathernetwork.com uses an iframe) but it seems that some of the items from the weather.com (it uses more javascript) site do not parse correctly.calguy1000 wrote:
A good rule of thumb is, any HTML snippet required to embed somebody elses content in your site, should go into a global content block.
Do you have any ideas of where I can go to find out more or go about troubleshooting that script? The weathernetwork.com script is ok, but it doesn't have a direct reference for our town and you know how schools are.... they like to see their name in lights!
Thanks for the tips and at least I have a working one on the site now. You all are terrific.
-
mvtech
Re: adding external weather.com scripts to site
First, CMSMS is great! Its the best and easiest CMS to implement and use by far! Now if I was just smart enough to figure it all out!
CMSMS 1.0.6
I'm doing the exact same thing, trying to add weather. I got the script from weather.com, put it into a GCB and it kinda works. The content, graphics etc.. display but they are heavily greyed out and are static. I have tried putting {literal}{/literal} tags in but still no go. Anyway to make it work/display correctly? Wish I'd found this thread before I tried re-inventing the wheel.....
Thanks for any help!
CMSMS 1.0.6
I'm doing the exact same thing, trying to add weather. I got the script from weather.com, put it into a GCB and it kinda works. The content, graphics etc.. display but they are heavily greyed out and are static. I have tried putting {literal}{/literal} tags in but still no go. Anyway to make it work/display correctly? Wish I'd found this thread before I tried re-inventing the wheel.....
Thanks for any help!
Re: adding external weather.com scripts to site
Ok, well, my Weather.com problem went away (sort of) when I got the DNS entry for my CMS site added to our state hosting DNS server instead of just being an IP address.
But I have a new issue that I will have to address in another thread because it involves changing the site name from the original IP address when I created it, to the actual domain name that is is tied to now, because now the weather.com stuff only works on the Home page and not the others because all the others still reference the IP address. So I have to figure out the correct way to get CMS to go through and make all the corrections to the xml links (I am guessing) so that they resolve to the actual DNS name and NOT the IP address. I tried just opening the config.php page in notepad, and did a find and replace where I replaced ALL entries in it having just the IP address with the actual URL (domain name) and I thought everything was good, but then the FCKEditorX started giving me XML errors when I tried to add images to pages, so that messed that up. I got fearful of other stuff being messed up so I put the old config.php file back. I just need to know how to get this thing to recognize all the pages now as the REAL domain name.
Thanks for all the help and feedback on the weather issue though. I learned a lot, and now know what has to done to get at least weather.com stuff to work. The other sites that do weather seem to work much easier though overall. The scripts are just more friendly or something.
But I have a new issue that I will have to address in another thread because it involves changing the site name from the original IP address when I created it, to the actual domain name that is is tied to now, because now the weather.com stuff only works on the Home page and not the others because all the others still reference the IP address. So I have to figure out the correct way to get CMS to go through and make all the corrections to the xml links (I am guessing) so that they resolve to the actual DNS name and NOT the IP address. I tried just opening the config.php page in notepad, and did a find and replace where I replaced ALL entries in it having just the IP address with the actual URL (domain name) and I thought everything was good, but then the FCKEditorX started giving me XML errors when I tried to add images to pages, so that messed that up. I got fearful of other stuff being messed up so I put the old config.php file back. I just need to know how to get this thing to recognize all the pages now as the REAL domain name.
Thanks for all the help and feedback on the weather issue though. I learned a lot, and now know what has to done to get at least weather.com stuff to work. The other sites that do weather seem to work much easier though overall. The scripts are just more friendly or something.

