vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   vBulletin CMS Widgets - YoWindow Weather Widget (https://vborg.vbsupport.ru/showthread.php?t=265918)

Gemma 02-23-2012 12:59 PM

Quote:

Originally Posted by Krusty1231 (Post 2302570)
Working great! Thanks!

Thank you :)

Gemma 02-24-2012 11:43 AM

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"/>

Change it to:
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 02-26-2012 10:11 AM

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.

Gemma 02-26-2012 12:39 PM

1 Attachment(s)
Quote:

Originally Posted by Krusty1231 (Post 2303517)
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.

There are two ways you could do this. One would be to find amp;us=metric&amp; in the code and after that add landscape=AAAAAAA&amp; where AAAAAAA would be either village, seaside, airport or oriental. This would however set all the location scenery to whatever option you choose.

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&amp;
Right after that put (where YY is the profile field number)
Code:

{vb:raw bbuserinfo.fieldYY}
So it looks like
Code:

amp;us=metric&amp;{vb:raw bbuserinfo.fieldYY}
Save the template.

Krusty1231 02-26-2012 05:23 PM

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.

Gemma 02-27-2012 06:11 PM

Quote:

Originally Posted by Krusty1231 (Post 2303626)
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.

You are more than welcome :)

MoreLinux 03-09-2012 09:29 PM

Thanks, Gemma. Installed this one on my test board and it look super cool!!

MoreLinux 03-10-2012 10:26 AM

@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}&amp;time_format=24&amp;us=metric&amp;background=#FFFFFF&amp;mini_locationBar=false&amp;copyright_bar=false"
and included the lang=nl&amp; option. Now it looks like this and the day's of the week are displayed in Dutch.
Code:

value="location_id=gn:{vb:raw bbuserinfo.fieldXX}&amp;time_format=24&amp;us=metric&amp;lang=nl&amp;background=#FFFFFF&amp;mini_locationBar=false&amp;copyright_bar=false"

Gemma 03-11-2012 04:00 PM

Quote:

Originally Posted by MoreLinux (Post 2308227)
@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}&amp;time_format=24&amp;us=metric&amp;background=#FFFFFF&amp;mini_locationBar=false&amp;copyright_bar=false"
and included the lang=nl&amp; option. Now it looks like this and the day's of the week are displayed in Dutch.
Code:

value="location_id=gn:{vb:raw bbuserinfo.fieldXX}&amp;time_format=24&amp;us=metric&amp;lang=nl&amp;background=#FFFFFF&amp;mini_locationBar=false&amp;copyright_bar=false"

I didn't pick up on that, good spot :)

MoreLinux 03-17-2012 02:48 PM

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>

&amp;time_format=24&amp;unit_system=metric&amp;lang=nl&amp;background=#FFFFFF&amp;mini_locationBar=true&amp;copyright_bar=false"/>
        <a href="http://yowindow.com?client=widget&amp;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>

I also changed the location of the <vb:if condition="$bbuserinfo[field9] !=''"> a bit so that when a user or a guest user have no ID it defaults to a city in the middle of The Netherlands.


All times are GMT. The time now is 07:02 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.01173 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete