General Community > Scripting Help

Weather app?

<< < (2/8) > >>

Krash:
Ok, in index.template.php find this:


--- Code: ---
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree, $link_num;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

echo '
<div class="clear" style="padding: 15px 0;">
<div class="navigate_section" ', ($link_num == count($context['linktree']) - 1) ? '' : 'style="padding:10px 4px;"', '>
<ul>';

// Each tree item has a URL and name. Some may have extra_before and extra_after.


--- End code ---


Change to this:


--- Code: ---
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree, $link_num;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

echo '
<div class="clear" style="padding: 15px 0;">
<div class="navigate_section" ', ($link_num == count($context['linktree']) - 1) ? '' : 'style="padding:10px 4px;"', '>
<ul>';


/// weather widget

echo '

<form method="POST" action="http://forecast.weather.gov/zipcity.php" style="display:inline; position: absolute; top: 245px; left: 675px;">
<span style="font-family: verdana; font-size: 11px; font-weight: bold; color: #006699; vertical-align: middle;">7-day Forecast </span>
<input type="text" name="inputstring" size="21" value=" City,ST or zip code"  onfocus="this.value = \' \';" onblur="if(this.value==\' \') this.value=\' City,ST or zip code\';" style="font-size: 10px; vertical-align: middle; margin-top: 0px;" class="textarea">
<input type="submit" name="Go2" value="Go" class="button_submit" style="height: 20px; font-size: 11px; vertical-align: middle;"></form>';


// Each tree item has a URL and name. Some may have extra_before and extra_after.


--- End code ---


Should look like this:



Checked it in IE8 and FF3.5.  Back up the template before you change it.

mrpike:
Works, but for me it's a little far to the left. Is there a simple way to move it? If not it's not that big of a deal. Thanks for the help man, works great!

www.hooksandfins.com/forum

Krash:
Find this:


--- Code: ---
<form method="POST" action="http://forecast.weather.gov/zipcity.php" style="display:inline; position: absolute; top: 245px; left: 675px;">


--- End code ---

You can adjust the position with the top and left parameters.  30-40 px off left should do it, and I'd bring it up a couple of px.

mrpike:
Alright, thank you for all your help man!

mrpike:
And it works perfectly! Come check it out www.hooksandfins.com/forum

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version