vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Vbadvanced - Weather Channel Module (https://vborg.vbsupport.ru/showthread.php?t=81730)

boo.3 05-18-2005 10:00 PM

Vbadvanced - Weather Channel Module
 
thanks to dsboyce8624 to fixing this code

This code is based around cLord's weather module

All i did was some simple changes to his code and added the weather channels code



What Does It do?

This gives users a field to add the ZIP CODE once added they will see there local weather on your main Vba


1. In your Admincp - User Profile Fields - Goto "Add New User Profile Field" - Choose single line text box - Create new field titled "Zip Code".

2. Admincp - User Profile Fields - Click "User Profile Field Manager" and look for the Zip Code field number - In my forums its 6.

3. Admin CP - Styles & Templates - Style Manager - Add a new template called "adv_portal_weather".

Now put this code into the template:

Code:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">

<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather forcast here.<br /><br /><phrase

1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field5] !=''">

<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field5]?template=GENXV&par=null&unit=0&key=05afc55b05db4d084c1497353310d74b' alt="Weather for $bbuserinfo[field66] provided by that-sucks.net." border="0"></a></script>

<else />Add your <A HREF="$vboptions[bburl]/profile.php?do=editprofile">Zip Code</A> to show weather forcast.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>

MAKE SURE YOU CHANGE THE $bbuserinfo[field6] TO YOUR FIELD #... say yours is 4 it would be like this $bbuserinfo[field4]

Now Last Step

4. Admincp - vBa CMPS - Add Module

Module Title - Weather
Module Identifier - keep blank
OR Template to Include - weather
Activate - yes
Select the column *Right or Left*

DONE

Cyricx 05-19-2005 05:58 PM

Will this work for overseas as well? or just US members?

boo.3 05-19-2005 07:03 PM

You can look at overseas forcast, but for the zipcode i'm not sure.

Give it a try and tell me how it goes?

boo

KevinL 05-19-2005 09:07 PM

ok I installed this and Ive been wanting someone to write this up I couldnt get it to work correctly.

I have one problem now though, my quicklinks doesnt work it just reloads the page. When I shut it off the quicklinks works fine.

Any suggestions?

boo.3 05-19-2005 09:41 PM

what do you mean by quick links?

the navbar?

dsboyce8624 05-19-2005 09:44 PM

The idea is nice, and I used it, but you should tell people that it's attached to your site and that they should register for thier own on http://www.weather.com I also removed the ads.

Great idea though.

Dennis

PS - Since you have some problems (the script seems to be in twice or something.) Here is my template code

PHP Code:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]class="tborder" width="100%">
<
tr>
<
td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbulletWeather Conditions</b></span></td>
</
tr>
<
tr>
<
td class="$getbgrow"><span class="smallfont">

<if 
condition="!$bbuserinfo['userid']">
<
span class="smallfont">Registered members can see their local weather forcast here.<br /><br /><phrase 

1
="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if 
condition="$bbuserinfo[field5] !=''">

<
script src='http://voap.weather.com/weather/oap/$bbuserinfo[field5]?template=GENXV&par=null&unit=0&key=05afc55b05db4d084c1497353310d74b' alt="Weather for $bbuserinfo[field66] provided by that-sucks.net." border="0"></a></script>

<else />
<
A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</Ato show weather forcast.
</if>
</if>
</
span>
</
td>
</
tr>
</
table>
<
br/> 


boo.3 05-19-2005 09:45 PM

its fine with me if they run it off my account...

btw how did you remove adds?

would you like to help in fixing some of these problems?

ok updates are being made read top of post

dsboyce8624 05-19-2005 09:50 PM

Quote:

Originally Posted by boo.3
its fine with me if they run it off my account...

btw how did you remove adds?

would you like to help in fixing some of these problems?

ok updates are being made read top of post

I removed the top script statement you had in there.

Then replaced your script (the second one) with the one weather.com gave me. I edited it with the changes you made (the user zip field and so forth) and saved.

KevinL 05-19-2005 09:51 PM

Quote:

Originally Posted by boo.3
what do you mean by quick links?

the navbar?

Yeah in the navbar..well mine is in the header.

If I enable this and I click on that button it reloads the page. When I shut it off everything works fine again.

I have no idea why that would happen.

**edit** I also have people from overseas, is there a way to get this to work for them?

boo.3 05-19-2005 09:52 PM

ok i tryed your code and it didn't work for me it said i needed to enter zipcode?

did you get that error


All times are GMT. The time now is 03:18 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.01170 seconds
  • Memory Usage 1,757KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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