Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
YoWindow Weather Widget Details »»
YoWindow Weather Widget
Version: 1.01, by Gemma Gemma is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.x.x Rating:
Released: 06-27-2011 Last Update: Never Installs: 29
Template Edits
Re-useable Code  
No support by the author.

What is it?
A simple template modification to bring the YoWindow Weather Widget to vB4

Quote:
Originally Posted by YoWindow Website
YoWindow weather widget works like your window - a landscape reflects the weather. You see weather picture, not just numbers. The widget designed to work on any website including Blogger, Wordpress and MySpace. Click the widget to enter full screen mode.
1. Firstly, you need to set up a new Profile Field. Choose Single-Line Text Box

Title: Weather Location Code
Description: (Whatever you want - here's what I use because the process might confuse some users)
Quote:
If you want to display the weather for your region/location on our index page - go to <a href="http://yowindow.com/weatherwidget.php">YoWindow Weather Widget</a> and fill in the details and generate your code. You now need the number that appears like the hightlight red text <b>location_id=gn:<i><font color="red">1234567</i></font>& - add that number in this box.
Required Field: No, but display at registration
Field Editable by User: Yes
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Display Page: Edit Profile

Take note of the newly created profile field number.

2. Next you need to create a new template. Go to AdminCP > Styles & Templates > Style Manager > Add New Template

Title: block_weather

Code:
<center><li>
    <div class="block smaller">
        <div class="blocksubhead">
            <a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a>
            <span class="blocktitle">{vb:raw blockinfo.title}</span>
        </div>
        <div class="widget_content blockbody floatcontainer">
        <div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow">
<vb:if condition="$bbuserinfo[fieldXX] !=''"> 
            <div style="width:230px; height:150px;">
    <object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf" width="220" height="150">
        <param name="movie" value="http://swf.yowindow.com/yowidget3.swf"/>
        <param name="allowfullscreen" value="true"/>
        <param name="wmode" value="opaque"/>
        <param name="bgcolor" value="#FFFFFF"/>
        <param name="flashvars" 
        value="location_id=gn:{vb:raw bbuserinfo.fieldXX}&amp;time_format=24&amp;us=metric&amp;background=#FFFFFF&amp;mini_locationBar=false&amp;copyright_bar=false"
    />
        <a href="http://yowindow.com/weatherwidget.php"
        style="width:220px;height:150px;display: block;text-indent: -50000px;font-size: 0px;background:#DDF url(http://yowindow.com/img/logo.png) no-repeat scroll 50% 50%;"
        >HTML weather</a>
    </object>
</div>
<div style="width: 220px; height: 15px; font-size: 14px; font-family: Arial,Helvetica,sans-serif;">
    <span style="float:left;"><a target="_top" href="http://yowindow.com?client=widget&amp;link=copyright" style="color: #2fa900; text-decoration:none;" title="Desktop weather">YoWindow.com</a></span>
    <span style="float:right; color:#888888;"><a href="http://yr.no" style="color: #2fa900; text-decoration:none;">yr.no</a></span>
</div>
<vb:else />
<br/><b>Add your <a href="{vb:raw vboptions.bburl}/profile.php?do=editprofile">Weather Location Code</A> to show your weather forecast in this block. <br/></b>   </vb:if>
        </div>
        </div>
    </div>
    <div class="underblock"></div>
</li></center>
Replace the XX (2 times) with the number of the profile field you created earlier.

3. Go to AdminCP > Forums & Moderators > Forum Blocks Manager > Add Block

Title: Weather Forecast
Content Type: HTML
Content: <div></div>
Template To Use: block_weather

Now, this part may prove tricky for some going by what I've seen in other weather widget modifications so I'll try and make it simple and add a few pictures, this process is also required to be done by your members to display their local forecast.

Go to http://yowindow.com/weatherwidget.php and fill in your details and generate the code. The only part of the code you need is the number after id=gn: and before &amp;. Take note of that number and go to Edit Profile on your site, scroll down to the newly made Weather Code Location and blurb box and enter the number. Save your profile. Go back to your forum home and the new block should display with your weather details for the next 5 days. Click on the scenery image and it will expand to full-screen and give a more detailed outlook.

How To Add Location Scenery (village, seaside, airport or oriental)
To Your Weather Widget - https://vborg.vbsupport.ru/showpost....1&postcount=24

How To Add Weather Widget To Member Profiles
- https://vborg.vbsupport.ru/showpost....4&postcount=18

Added: 28.12.2012 An alternative version that uses IP location to display the weather rather than creating and entering data into a profile field can be found here - https://vborg.vbsupport.ru/showpost....8&postcount=36. It also allows the user to display weather forecasts from many other locations via dropdown menus.

If anyone wants to further develop any of my addons, you are free to do so.

Screenshots

File Type: jpg weather1.jpg (239.2 KB, 0 views)
File Type: jpg weather2.jpg (102.6 KB, 0 views)
File Type: jpg weather3.jpg (52.9 KB, 0 views)
File Type: jpg weather4.jpg (43.0 KB, 0 views)
File Type: jpg Untitled-1.jpg (37.0 KB, 0 views)
File Type: jpg weather.jpg (48.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
Macgiber, nacaruncr, WendM

Comments
  #42  
Old 12-29-2012, 10:04 PM
thermax04 thermax04 is offline
 
Join Date: Apr 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
Find:
Code:
var flashvars = {
                location_id: "auto"
//              landscape: "seaside",
//              background: "#FFFFFF",
//              lang: "de",
//              unit_system: "metric",
//              time_format: "24"
            };
Change it to:
Code:
            var flashvars = {
//              location_id: "auto"
//              landscape: "airport",
//              background: "#FFFFFF",
//              lang: "de",
                unit_system: "us",
                u_temperature: "c",
//              time_format: "24"
            };
For the second problem, can you post me the contents of your block_html template so I can look at the code
Ok, this mod. fixed problems in pic 1

is this block_html?
PHP Code:
<center><div><li>
    <!-- 
Location Chooser component -->
    <
script type="text/javascript" src="http://js.yowindow.com/js/yolc.js"></script>
<!-- 
YoWindow widget component -->
    <
script type="text/javascript" src="http://js.yowindow.com/js/yowidget.js"></script>     
    <
script language="JavaScript">
 
//To track if commands can be sent to YoWidget
        
window.isYoWidgetReady false;
 
        function 
onLoad() {
            
installLocationChooser();
            
installYoWidget();
        }
 
        function 
installLocationChooser() {
            var 
place document.getElementById('location_chooser_place');
//Create YoLocationChooser and keep it as a variable of HTML window
            
this.locationChooser = new YoLocationChooser(place);
 
//Subscribe to onLocationChange event
            
this.locationChooser.onLocationChange onLocationChange;
 
/**
lc.open(); - let the user to choose the location, starting on country-level
lc.open("#auto"); - detect location by IP and open it
lc.open("United Kingdom/Stirling"); - open London
*/
            
this.locationChooser.open("#auto");
        }
 
/**
Event of YoLocationChooser
It is called every time the location changes.
When location was deselected - node is null
node format
node = {
    @id, // GeoNames id
    @name, // Name from the Geonames data-base
    @p // Population
}
 
Here we reflect selected location in the widget.
*/
        
function onLocationChange(node) {
//Do not do anything if location was deselected (node is null).
            
if (!node) {
                return;
            }
            var 
locationId node['@id'];
 
//You can call yowidget methods only after it gets ready to intercept commands
            
var yowidget document.getElementById('yowidget');
            if (!
window.isYoWidgetReady) {
                return;
            }
//Select location in YoWindow widget
            
yowidget.setLocationId(locationId);
        }
 
/**
Creates YoWindow widget and adds it to the place-holder "yowidget_place"
*/
        
function installYoWidget() {
 
/**
flashvars parameters
See http://yowindow.com/widget_parameters.php
 
I have put some examples in the code, uncomment to see them in effect
*/
            
var flashvars = {
//              location_id: "auto"
//              landscape: "airport",
//              background: "#FFFFFF",
//              lang: "de",
                
unit_system"us",
                
u_temperature"c",
//              time_format: "24"
            
};
 
/**
Flash parameters
*/
            
var params = {
                
quality"high",
                
bgcolor"#FFFFFF",
                
allowscriptaccess"always",
                
allowfullscreen"true",
                
wmode"opaque"
            
};
 
            var 
attributes = {
//Optionally control the color of the copyright text
//              copyright_color: "#0000FF",
//              copyright_link_color: "#FF0000",
 
//id and name of YoWindow widget in HTML DOM
                
id"yowidget",
                
name"yowidget"
            
};
 
            
YoWidget.embed(
                
"yowidget_place"//place-holder id
                
240//width
                
150//height
                
flashvars,
                
params,
                
attributes
            
);
        }
 
//This function is called by YoWidget SWF when it is ready for commands
        
function yowidget_onReady() {
            
window.isYoWidgetReady true;
            var 
yowidget document.getElementById('yowidget');
//Display location selected in Chooser if any
            
var node this.locationChooser.selectedLocation;
            if (
node) {
                var 
locationId node['@id'];
                
yowidget.setLocationId(locationId);
            }
        }
 
    </
script>

 
<
body onLoad="onLoad();">
 
    <
div>
        <
span id="yowidget_place" style="display:inline-block;">
        </
span>

 <
span id="location_chooser_place" style="display:inline-block; width:240px; vertical-align:top;">
        </
span>
    </
div><br/>
<
div><center><b>Click the image for expanded forecast.</b></center></div>

 
        </
div>
        </
div>
    </
div>
    </
li></div></center
Reply With Quote
  #43  
Old 12-29-2012, 10:07 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, block_html is one of the default templates. I want to see what the code structure is so I can try to get your block to display properly
Reply With Quote
  #44  
Old 12-29-2012, 10:10 PM
thermax04 thermax04 is offline
 
Join Date: Apr 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
No, block_html is one of the default templates. I want to see what the code structure is so I can try to get your block to display properly
Ok, here it is

Code:
<li>
	<div class="block smaller">
		<div class="blocksubhead">
			<a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a>
			<span class="blocktitle">{vb:raw blockinfo.title}</span>
		</div>
		<div class="widget_content blockbody floatcontainer">
		<div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow">
			{vb:raw content}
		</div>
		</div>
	</div>
	<div class="underblock"></div>
</li>
Reply With Quote
  #45  
Old 12-29-2012, 10:21 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure why you are receiving the other errors. Did you follow create the block_weather template using the code from post #36 then follow the steps to create the block?
Reply With Quote
  #46  
Old 12-29-2012, 10:31 PM
thermax04 thermax04 is offline
 
Join Date: Apr 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
Not sure why you are receiving the other errors. Did you follow create the block_weather template using the code from post #36 then follow the steps to create the block?
1- I edit my first post during your replies:

How to create a new template called block_weather?


2- According to the following code, I made some mods to get as the pic, and still waiting for your help to solve the other errors.

Code:
<center><div><li>
    <!-- Location Chooser component -->
    <script type="text/javascript" src="http://js.yowindow.com/js/yolc.js"></script>
<!-- YoWindow widget component -->
    <script type="text/javascript" src="http://js.yowindow.com/js/yowidget.js"></script>     
    <script language="JavaScript">
 
//To track if commands can be sent to YoWidget
        window.isYoWidgetReady = false;
 
        function onLoad() {
            installLocationChooser();
            installYoWidget();
        }
 
        function installLocationChooser() {
            var place = document.getElementById('location_chooser_place');
//Create YoLocationChooser and keep it as a variable of HTML window
            this.locationChooser = new YoLocationChooser(place);
 
//Subscribe to onLocationChange event
            this.locationChooser.onLocationChange = onLocationChange;
 
/**
lc.open(); - let the user to choose the location, starting on country-level
lc.open("#auto"); - detect location by IP and open it
lc.open("United Kingdom/Stirling"); - open London
*/
            this.locationChooser.open("#auto");
        }
 
/**
Event of YoLocationChooser
It is called every time the location changes.
When location was deselected - node is null
node format
node = {
    @id, // GeoNames id
    @name, // Name from the Geonames data-base
    @p // Population
}
 
Here we reflect selected location in the widget.
*/
        function onLocationChange(node) {
//Do not do anything if location was deselected (node is null).
            if (!node) {
                return;
            }
            var locationId = node['@id'];
 
//You can call yowidget methods only after it gets ready to intercept commands
            var yowidget = document.getElementById('yowidget');
            if (!window.isYoWidgetReady) {
                return;
            }
//Select location in YoWindow widget
            yowidget.setLocationId(locationId);
        }
 
/**
Creates YoWindow widget and adds it to the place-holder "yowidget_place"
*/
        function installYoWidget() {
 
/**
flashvars parameters
See http://yowindow.com/widget_parameters.php
 
I have put some examples in the code, uncomment to see them in effect
*/
            var flashvars = {
//              location_id: "auto"
//              landscape: "airport",
//              background: "#FFFFFF",
//              lang: "de",
                unit_system: "us",
                u_temperature: "c",
//              time_format: "24"
            };
 
/**
Flash parameters
*/
            var params = {
                quality: "high",
                bgcolor: "#FFFFFF",
                allowscriptaccess: "always",
                allowfullscreen: "true",
                wmode: "opaque"
            };
 
            var attributes = {
//Optionally control the color of the copyright text
//              copyright_color: "#0000FF",
//              copyright_link_color: "#FF0000",
 
//id and name of YoWindow widget in HTML DOM
                id: "yowidget",
                name: "yowidget"
            };
 
            YoWidget.embed(
                "yowidget_place", //place-holder id
                240, //width
                150, //height
                flashvars,
                params,
                attributes
            );
        }
 
//This function is called by YoWidget SWF when it is ready for commands
        function yowidget_onReady() {
            window.isYoWidgetReady = true;
            var yowidget = document.getElementById('yowidget');
//Display location selected in Chooser if any
            var node = this.locationChooser.selectedLocation;
            if (node) {
                var locationId = node['@id'];
                yowidget.setLocationId(locationId);
            }
        }
 
    </script>

 
<body onLoad="onLoad();">
 
    <div>
        <span id="yowidget_place" style="display:inline-block;">
        </span>

 <span id="location_chooser_place" style="display:inline-block; width:240px; vertical-align:top;">
        </span>
    </div><br/>
<div><center><b>Click the image for expanded forecast.</b></center></div>

 
        </div>
        </div>
    </div>
    </li></div></center>
Attached Images
File Type: jpg Untitled 4.jpg (20.5 KB, 0 views)
Reply With Quote
  #47  
Old 12-29-2012, 10:40 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thermax04 View Post
1- I edit my first post during your replies:

How to create a new template called block_weather?
AdminCP > Style Manager > in the dropdown menu of the style you use select Add New Template.

Title - block_weather
Code:
<li>
    <div class="block smaller">
        <div class="blocksubhead">
            <a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a>
            <span class="blocktitle">{vb:raw blockinfo.title}</span>
        </div>
        <div class="widget_content blockbody floatcontainer">
        <div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow">
            <center><div><li>
    <!-- Location Chooser component -->
    <script type="text/javascript" src="http://js.yowindow.com/js/yolc.js"></script>
<!-- YoWindow widget component -->
    <script type="text/javascript" src="http://js.yowindow.com/js/yowidget.js"></script>     
    <script language="JavaScript">
 
//To track if commands can be sent to YoWidget
        window.isYoWidgetReady = false;
 
        function onLoad() {
            installLocationChooser();
            installYoWidget();
        }
 
        function installLocationChooser() {
            var place = document.getElementById('location_chooser_place');
//Create YoLocationChooser and keep it as a variable of HTML window
            this.locationChooser = new YoLocationChooser(place);
 
//Subscribe to onLocationChange event
            this.locationChooser.onLocationChange = onLocationChange;
 
/**
lc.open(); - let the user to choose the location, starting on country-level
lc.open("#auto"); - detect location by IP and open it
lc.open("United Kingdom/Stirling"); - open London
*/
            this.locationChooser.open("#auto");
        }
 
/**
Event of YoLocationChooser
It is called every time the location changes.
When location was deselected - node is null
node format
node = {
    @id, // GeoNames id
    @name, // Name from the Geonames data-base
    @p // Population
}
 
Here we reflect selected location in the widget.
*/
        function onLocationChange(node) {
//Do not do anything if location was deselected (node is null).
            if (!node) {
                return;
            }
            var locationId = node['@id'];
 
//You can call yowidget methods only after it gets ready to intercept commands
            var yowidget = document.getElementById('yowidget');
            if (!window.isYoWidgetReady) {
                return;
            }
//Select location in YoWindow widget
            yowidget.setLocationId(locationId);
        }
 
/**
Creates YoWindow widget and adds it to the place-holder "yowidget_place"
*/
        function installYoWidget() {
 
/**
flashvars parameters
See http://yowindow.com/widget_parameters.php
 
I have put some examples in the code, uncomment to see them in effect
*/
            var flashvars = {
//              location_id: "auto"
//              landscape: "airport",
//              background: "#FFFFFF",
//              lang: "de",
                unit_system: "us",
                u_temperature: "c",
//              time_format: "24"
            };
 
/**
Flash parameters
*/
            var params = {
                quality: "high",
                bgcolor: "#FFFFFF",
                allowscriptaccess: "always",
                allowfullscreen: "true",
                wmode: "opaque"
            };
 
            var attributes = {
//Optionally control the color of the copyright text
//              copyright_color: "#0000FF",
//              copyright_link_color: "#FF0000",
 
//id and name of YoWindow widget in HTML DOM
                id: "yowidget",
                name: "yowidget"
            };
 
            YoWidget.embed(
                "yowidget_place", //place-holder id
                240, //width
                150, //height
                flashvars,
                params,
                attributes
            );
        }
 
//This function is called by YoWidget SWF when it is ready for commands
        function yowidget_onReady() {
            window.isYoWidgetReady = true;
            var yowidget = document.getElementById('yowidget');
//Display location selected in Chooser if any
            var node = this.locationChooser.selectedLocation;
            if (node) {
                var locationId = node['@id'];
                yowidget.setLocationId(locationId);
            }
        }
 
    </script>

 
<body onLoad="onLoad();">
 
    <div>
        <span id="yowidget_place" style="display:inline-block;">
        </span>

 <span id="location_chooser_place" style="display:inline-block; width:240px; vertical-align:top;">
        </span>
    </div><br/>
<div><center><b>Click the image for expanded forecast.</b></center></div>

 
        </div>
        </div>
    </div>
    <div class="underblock"></div>
</li>
Save the file then add a new forum block. AdminCP > Forums & Moderators > Forum Blocks Manager > Add Block > Custom HTML/PHP

Title: Weather Forecast
Description: Whatever
Cache Time: You Decide
Display Order: Up to you
Content Type: HTML
Content: <div></div>
Template To Use: block_weather

Save. Purge cache.

I don't know what else to tell you, I've tried in 3 different styles and cannot reproduce the errors you have stated.
Reply With Quote
  #48  
Old 12-29-2012, 10:42 PM
thermax04 thermax04 is offline
 
Join Date: Apr 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working on it now, just hang on
Reply With Quote
  #49  
Old 12-29-2012, 10:54 PM
thermax04 thermax04 is offline
 
Join Date: Apr 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
AdminCP > Style Manager > in the dropdown menu of the style you use select Add New Template.

Title - block_weather
Code:
<li>
    <div class="block smaller">
        <div class="blocksubhead">
            <a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a>
            <span class="blocktitle">{vb:raw blockinfo.title}</span>
        </div>
        <div class="widget_content blockbody floatcontainer">
        <div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow">
            <center><div><li>
    <!-- Location Chooser component -->
    <script type="text/javascript" src="http://js.yowindow.com/js/yolc.js"></script>
<!-- YoWindow widget component -->
    <script type="text/javascript" src="http://js.yowindow.com/js/yowidget.js"></script>     
    <script language="JavaScript">
 
//To track if commands can be sent to YoWidget
        window.isYoWidgetReady = false;
 
        function onLoad() {
            installLocationChooser();
            installYoWidget();
        }
 
        function installLocationChooser() {
            var place = document.getElementById('location_chooser_place');
//Create YoLocationChooser and keep it as a variable of HTML window
            this.locationChooser = new YoLocationChooser(place);
 
//Subscribe to onLocationChange event
            this.locationChooser.onLocationChange = onLocationChange;
 
/**
lc.open(); - let the user to choose the location, starting on country-level
lc.open("#auto"); - detect location by IP and open it
lc.open("United Kingdom/Stirling"); - open London
*/
            this.locationChooser.open("#auto");
        }
 
/**
Event of YoLocationChooser
It is called every time the location changes.
When location was deselected - node is null
node format
node = {
    @id, // GeoNames id
    @name, // Name from the Geonames data-base
    @p // Population
}
 
Here we reflect selected location in the widget.
*/
        function onLocationChange(node) {
//Do not do anything if location was deselected (node is null).
            if (!node) {
                return;
            }
            var locationId = node['@id'];
 
//You can call yowidget methods only after it gets ready to intercept commands
            var yowidget = document.getElementById('yowidget');
            if (!window.isYoWidgetReady) {
                return;
            }
//Select location in YoWindow widget
            yowidget.setLocationId(locationId);
        }
 
/**
Creates YoWindow widget and adds it to the place-holder "yowidget_place"
*/
        function installYoWidget() {
 
/**
flashvars parameters
See http://yowindow.com/widget_parameters.php
 
I have put some examples in the code, uncomment to see them in effect
*/
            var flashvars = {
//              location_id: "auto"
//              landscape: "airport",
//              background: "#FFFFFF",
//              lang: "de",
                unit_system: "us",
                u_temperature: "c",
//              time_format: "24"
            };
 
/**
Flash parameters
*/
            var params = {
                quality: "high",
                bgcolor: "#FFFFFF",
                allowscriptaccess: "always",
                allowfullscreen: "true",
                wmode: "opaque"
            };
 
            var attributes = {
//Optionally control the color of the copyright text
//              copyright_color: "#0000FF",
//              copyright_link_color: "#FF0000",
 
//id and name of YoWindow widget in HTML DOM
                id: "yowidget",
                name: "yowidget"
            };
 
            YoWidget.embed(
                "yowidget_place", //place-holder id
                240, //width
                150, //height
                flashvars,
                params,
                attributes
            );
        }
 
//This function is called by YoWidget SWF when it is ready for commands
        function yowidget_onReady() {
            window.isYoWidgetReady = true;
            var yowidget = document.getElementById('yowidget');
//Display location selected in Chooser if any
            var node = this.locationChooser.selectedLocation;
            if (node) {
                var locationId = node['@id'];
                yowidget.setLocationId(locationId);
            }
        }
 
    </script>

 
<body onLoad="onLoad();">
 
    <div>
        <span id="yowidget_place" style="display:inline-block;">
        </span>

 <span id="location_chooser_place" style="display:inline-block; width:240px; vertical-align:top;">
        </span>
    </div><br/>
<div><center><b>Click the image for expanded forecast.</b></center></div>

 
        </div>
        </div>
    </div>
    </li></div></center>  
        </div>
        </div>
    </div>
    <div class="underblock"></div>
</li>
Save the file then add a new forum block. AdminCP > Forums & Moderators > Forum Blocks Manager > Add Block > Custom HTML/PHP

Title: Weather Forecast
Description: Whatever
Cache Time: You Decide
Display Order: Up to you
Content Type: HTML
Content: <div></div>
Template To Use: block_weather

Save. Purge cache.

I don't know what else to tell you, I've tried in 3 different styles and cannot reproduce the errors you have stated.
did everything as instructed but still have the problem with other blocks!!

EDIT:
I fixed it by making the weather block is the last block, it is temp fix, but better than nothing till we figure out how to fix it while it is in the middle with other blocks
Reply With Quote
  #50  
Old 12-29-2012, 11:01 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you send me a link to your site?
Reply With Quote
  #51  
Old 12-29-2012, 11:09 PM
thermax04 thermax04 is offline
 
Join Date: Apr 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
Can you send me a link to your site?
www.mobileguide-mea.com/vb

you switch forum language to English from the bottom of the page

funny thing happened now, it gives me the date 1 day earlier and the time 1 hour more?!!

Edit:
the funny thing is back to normal!!! time and date are correct now
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08185 seconds
  • Memory Usage 2,444KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (7)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete