vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Weather Mk. 2 (https://vborg.vbsupport.ru/showthread.php?t=41842)

Boofo 08-05-2002 12:40 AM

Try it now, Erwin. It just kicked in for some reason. All is working well. :)

Erwin 08-05-2002 12:43 AM

Okay, it was probably a temporary weather server problem - everything is working perfectly now! :)

Thanks for your great work JJ!!!

JJR512 08-05-2002 12:44 AM

If someone just tried to contact me via AIM in regards to this hack, please try again. The message "Do you wish to accept a message from this person" popped up right as I was in the middle of typing something, right as I was about to hit the space bar, and I guess the space bar dismisses that message. I didn't even get to see who it was, but this hack is the only reason I can think of why anyone I don't already have on my list would want to contact me now...so whoever you are, I apologize, I did not mean to cancel your request. Please try again! :)

Ian 08-05-2002 01:16 AM

I attactched it if anyone needs me... I did it by hand so it's not the most even but here you go:

JJR512 08-05-2002 01:16 AM

Quote:

Originally posted by Itworx4me
Hi all,

I hope JJR512 doesn't mine. I added this to his hack. This will tell you what city,state, and country right after Your Current Weather. This will show on your forum home page. Your Current Weather For (City),(state),(country).

Find in forumhome_weather template
Code:

Your Current Weather
Then Add this right after Weather
Code:

For $weatherdata[city], $weatherdata[subdiv], $weatherdata[country]

Thanks for a wonderful hack JJR512

Sorry, I had meant to do this...I have code in weather.php which allows a subdivision name to show up as well, if there is one for the current location. I've updated the instructions to add this bit of code to the code added to index.php, and the forumhome_weather template. So, basically, re-do the instructions for index.php (remove the code you added before and add the new code now in the instructions), and replace the forumhome_weather template with the new version.

Erwin 08-05-2002 01:45 AM

I've already customized the template - can you just post and tell us what the changes actually are? Is it just the addition of $weatherdata[subdiv] in the template? What changes need to be done in the index.php?

Erwin 08-05-2002 01:47 AM

I see it. :)

I'll change it manually myself - thanks! Sorry to bother you.

Boofo 08-05-2002 01:51 AM

Ok, Erwin, the ball's in your court. Can you tell us the changes? :)

Quote:

Originally posted by Erwin
I see it. :)

I'll change it manually myself - thanks! Sorry to bother you.


Erwin 08-05-2002 01:55 AM

To upgrade from version v1.0 to v1.0a - this post has been updated - it works. :)

In forumhome_weather template, find:

Code:


<smallfont><img src

REPLACE with:

Code:


<smallfont>
$weatherdata[city], $weatherdata[showsubdiv]$weatherdata[country]<br>
<img src

NOTE: The variable is $weatherdata[showsubdiv], NOT $weatherdata[subdiv]

Then, in index.php...

Find:

PHP Code:


  
eval("\$currentweather = \"".gettemplate("forumhome_weather")."\";"); 

ABOVE it, add:

PHP Code:


  
if ($weatherdata[subdiv]) {
    
$weatherdata[showsubdiv] = "$weatherdata[subdiv], ";
  } else {
    
$weatherdata[showsubdiv] = "";
  } 

That should do it. If there's a subdivision, it will show up, and if not, it won't.

JJR512 08-05-2002 02:04 AM

The code addition is correct.

But in my version, in the forumhome_weather template, the bit you say to find isn't there. But you do have the addition correct, and it goes after "Current Weather" in that template (I believe originally, it was "Your Current Weather").


All times are GMT. The time now is 04:58 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.01335 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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