QUOTE:
I'm sticking with you guys!
Well, it's pretty much just me, and a couple of very helpful people here on the forums.
but it's true, what file to edit depends on where you want it to appear.
On every page ?
On the header or footer ?
Only the main page ?
Only on certain categories ?
Maybe you want weather for a different city on each category ?
The possibilities are literally endless.
Basically, you would be appending your javascript snippet to an existing variable.
For the most part the script assembles HTML by appending it to a variable
| Code: |
$html = "Some HTML code ":
$html .= "Some more HTML code appended to the previous code":
$html .= "Even more HTML code with \"quotations\" in it ":
|
Eventually the $html variable is sent to the browser, and erased to free up server memory
| Code: |
echo $html;
unset $html;
|
Your java script snippet to fetch and display weather will almost certainly have quotes in it, be sure to escape them with the backslashes when appending them, like I did to the word quotations above.