The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
YoWindow Weather Widget Details »» | |||||||||||||||||||||||||||||||||||||||
What is it?
A simple template modification to bring the YoWindow Weather Widget to vB4 Quote:
Title: Weather Location Code Description: (Whatever you want - here's what I use because the process might confuse some users) Quote:
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}&time_format=24&us=metric&background=#FFFFFF&mini_locationBar=false&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&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> 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 &. 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
Show Your Support
|
Comments |
#22
|
||||
|
||||
|
#23
|
||||
|
||||
I've updated part of the code, it should still work with the old code but if you want to upgrade find:
Code:
<object type="application/x-shockwave-flash" data="http://swf.yowindow.com/wimo/hpPal/hpPal.swf" width="220" height="150"> <param name="movie" value="http://swf.yowindow.com/wimo/hpPal/hpPal.swf"/> <param name="allowfullscreen" value="true"/> <param name="wmode" value="opaque"/> <param name="bgcolor" value="#FFFFFF"/> Code:
<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"/> |
Благодарность от: | ||
Krusty1231 |
#24
|
||||
|
||||
Is there a way to add the different scenes to this? On the "block" all I can get is the country side looking one, but on profiles I got the airport one by playing with the code alittle....how would one make the airport or the other scenes work on block?
Or is this even possible? Thanks in advance. |
#25
|
||||
|
||||
Quote:
Or you could do it this way. Create a new user profile field. Profile Field Type: Single-Selection Radio ButtonTitle: Weather Location Scene Description: Choose from Village, Seaside, Airport and Oriental imagery for the background of your weather forecast report. Options: village seaside airport oriental Set Default: Yes Field Required: No Field Editable By User: Yes Private Field: Yes Field Searchable on Members List: No Show on Members List: No Take note of the profile field number. Save Note: the scenery options must be in lowercase letters (village, seaside, airport or oriental). In your template find Code:
amp;us=metric& Code:
{vb:raw bbuserinfo.fieldYY} Code:
amp;us=metric&{vb:raw bbuserinfo.fieldYY} |
#26
|
||||
|
||||
Wow, just wow. Thank you very much. I used the first option you gave, as I then can switch it up for the members when I want them to see something different.
Thank you for taking the time Gemma! Very much appreciated. |
#27
|
||||
|
||||
You are more than welcome
|
#28
|
|||
|
|||
Thanks, Gemma. Installed this one on my test board and it look super cool!!
|
#29
|
|||
|
|||
@Gemma, Your widget language stays in English, but the original yowindow widget can change the language.
I changed the line Code:
value="location_id=gn:{vb:raw bbuserinfo.fieldXX}&time_format=24&us=metric&background=#FFFFFF&mini_locationBar=false&copyright_bar=false" Code:
value="location_id=gn:{vb:raw bbuserinfo.fieldXX}&time_format=24&us=metric&lang=nl&background=#FFFFFF&mini_locationBar=false&copyright_bar=false" |
Благодарность от: | ||
Gemma |
#30
|
||||
|
||||
Quote:
|
#31
|
|||
|
|||
I have this mod now running on my board in the CMS as a widget, but changed the code a tiny bit so that it auto-scales. Now the code looks like this (my changes are marked in RED)
Code:
<div class="cms_widget"> <div class="block"> <div class="cms_widget_header"> <h3><img src="{vb:stylevar imgdir_siteicons}/html.png" alt="" /> {vb:raw widget_title}</h3> </div> <div class="cms_widget_content_restore_widget_content"> <center> <div style="width:auto; height:200px;"> <object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf" width="100%" height="100%"> <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="SCALE" VALUE="exactfit"> <param name="flashvars" <vb:if condition="$bbuserinfo[field9] !=''"> value="location_id=gn:{vb:raw bbuserinfo.field9} <vb:else /> value="location_id=gn:2745912 </vb:if> &time_format=24&unit_system=metric&lang=nl&background=#FFFFFF&mini_locationBar=true&copyright_bar=false"/> <a href="http://yowindow.com?client=widget&link=stub" 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%;" >Desktop weather</a> </object> </div> <div style="width: 220px; height: 15px; font-size: 14px; font-family: Arial,Helvetica,sans-serif;"> </div> </div> </center> </div> </div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|