Welcome to Geeklog, Anonymous Friday, November 22 2024 @ 08:59 pm EST
Geeklog Forums
Weather Block help
Status: offline
stolidus
Forum User
Newbie
Registered: 03/07/06
Posts: 14
I pasted the following code into lib-custom.php
$count = DB_query("select count(*) as count from {$_TABLES['users']} where passwd='" . md5('password') . "'");
$A = DB_fetchArray($count);
if ( $A['count'] > 0 ) {
$secure = false;
$insecure_msg .= '<p>You still have not changed the default password from "password" on ' . $A['count'] . ' account(s). ';
$insecure_msg .= 'This will allow people to do serious harm to your site!';
}
if ($secure) {
$retval = $secure_msg;
} else {
$retval = $insecure_msg;
}
$retval = wordwrap($retval,20,' ',1);
return $retval;
}
//added for weather block
function phpblock_getweather ()
{
global $_CONF, $_TABLES, $HTTP_GET_VARS, $_WEATHER_TIMER, $showform;
$tp = $HTTP_GET_VARS['tp'];
$showform = 0;//show location drop down form. 1 = on | 0 = off
//Weather Block Timer
if ($_CONF['show_stats'] == 1){
$_WEATHER_TIMER = new timerobject();
$_WEATHER_TIMER->startTimer();
}
$path = $_CONF['path_html'] . "weather";
include_once($path . "/display_weather.php");
$display = getweather($tp);
return $display;
}
/**
* Include any code in this function that will be called by the internal CRON API
* The interval between runs is determined by $_CONF['cron_schedule_interval']
*/
function CUSTOM_runSheduledTask() {
}
Well, I only pasted the weather stuff, the rest before and after is for reference to where I pasted it.
Afterward I created a phpblock calling the function 'phpblock_getweather' and I get a whole page of crazy scrabbled this's and thats'.
If I change the phpblock function to 'phpblock_getweather ()' I get "Error in PHP Block. Function, phpblock_getweather (), does not exist." inside the block.
I know that when creating the block it says not to use empty "()" but that is the way it is in the code snippet file that comes with the weather block plugin 2.4?
Also, I do not see the plugin listed anywhere. I have put files where I think they should go. Does anyone have any more explicit install notes I might use.
Thanks.
Text Formatted Code
// check to see if any account still has 'password' as its password.$count = DB_query("select count(*) as count from {$_TABLES['users']} where passwd='" . md5('password') . "'");
$A = DB_fetchArray($count);
if ( $A['count'] > 0 ) {
$secure = false;
$insecure_msg .= '<p>You still have not changed the default password from "password" on ' . $A['count'] . ' account(s). ';
$insecure_msg .= 'This will allow people to do serious harm to your site!';
}
if ($secure) {
$retval = $secure_msg;
} else {
$retval = $insecure_msg;
}
$retval = wordwrap($retval,20,' ',1);
return $retval;
}
//added for weather block
function phpblock_getweather ()
{
global $_CONF, $_TABLES, $HTTP_GET_VARS, $_WEATHER_TIMER, $showform;
$tp = $HTTP_GET_VARS['tp'];
$showform = 0;//show location drop down form. 1 = on | 0 = off
//Weather Block Timer
if ($_CONF['show_stats'] == 1){
$_WEATHER_TIMER = new timerobject();
$_WEATHER_TIMER->startTimer();
}
$path = $_CONF['path_html'] . "weather";
include_once($path . "/display_weather.php");
$display = getweather($tp);
return $display;
}
/**
* Include any code in this function that will be called by the internal CRON API
* The interval between runs is determined by $_CONF['cron_schedule_interval']
*/
function CUSTOM_runSheduledTask() {
}
Well, I only pasted the weather stuff, the rest before and after is for reference to where I pasted it.
Afterward I created a phpblock calling the function 'phpblock_getweather' and I get a whole page of crazy scrabbled this's and thats'.
If I change the phpblock function to 'phpblock_getweather ()' I get "Error in PHP Block. Function, phpblock_getweather (), does not exist." inside the block.
I know that when creating the block it says not to use empty "()" but that is the way it is in the code snippet file that comes with the weather block plugin 2.4?
Also, I do not see the plugin listed anywhere. I have put files where I think they should go. Does anyone have any more explicit install notes I might use.
Thanks.
8
11
Quote
Status: offline
suprsidr
Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
functions.inc, config.php, templates(folder), language(folder)
all go in path_to_geeklog/plugins/weather/
images(folder), NOAAfunctions(folder), weatherFunctions(folder), admin.php, details.inc, display_weather.php, index.php, phpweather.inc, style.css, weather_details.php
all go in public_html/weather/
weather(folder), array.php, conectivity_test.php, flush_cache.php, index.php, install.php, readme.php, speedtest.php
all go in public_html/admin/plugins/weather/
and the data folder contains the forecast.sql, and stations.sql which must be executed directly into your db. (if I recall correctly)
direct your browser to http://yoursite.com/admin/plugins/weather/install.php
to install the plugin.
BUT first remove that function that you added in your lib-custom.php or you will get a "cannot redeclare" error.
Let the weather plugin create your weather block for you when it installs.
There has been some functionality loss of the weather plugin since noaa changed their site. I think the local radar and national maps is all though. Unless someone has updated it recently.
Hope this helps
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
all go in path_to_geeklog/plugins/weather/
images(folder), NOAAfunctions(folder), weatherFunctions(folder), admin.php, details.inc, display_weather.php, index.php, phpweather.inc, style.css, weather_details.php
all go in public_html/weather/
weather(folder), array.php, conectivity_test.php, flush_cache.php, index.php, install.php, readme.php, speedtest.php
all go in public_html/admin/plugins/weather/
and the data folder contains the forecast.sql, and stations.sql which must be executed directly into your db. (if I recall correctly)
direct your browser to http://yoursite.com/admin/plugins/weather/install.php
to install the plugin.
BUT first remove that function that you added in your lib-custom.php or you will get a "cannot redeclare" error.
Let the weather plugin create your weather block for you when it installs.
There has been some functionality loss of the weather plugin since noaa changed their site. I think the local radar and national maps is all though. Unless someone has updated it recently.
Hope this helps
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
11
11
Quote
Status: offline
stolidus
Forum User
Newbie
Registered: 03/07/06
Posts: 14
Well, I posted over at squatty.com after I found a past post dealing with this mysterious weather block plugin version 2.4. Apparently it is bogus. I'm a little bit concerned that it contained some sort of trojan. I went over it and found nothing, but that doesn't mean something didn't get past me.
The 2.0 version is the latest and I've installed this version and it just does not work with GL 1.4 I guess I'll have to wait for someone with the skills and info needed to make it compatible.
The phpblock_getweather function is still displaying crazy raw code on the index page. The code does not get wrapped in the block, the whole hopmepage is converted to nonsense. And I can't get the admin features added to the admin functions either. I followed a suggested hack to complete the install without that part, but with the other problem it has serious issues.
My take on it is simple. Weather block is now worthless for GL 1.4 until someone with more knowledge tha myself works on it.
I hope someone does, it would be a cool feature for our community.
I wish I knew what has changed from GL 1.3.11 to GL 1.4 that makes it get so freaky deaky.
Again many thanks.
The 2.0 version is the latest and I've installed this version and it just does not work with GL 1.4 I guess I'll have to wait for someone with the skills and info needed to make it compatible.
The phpblock_getweather function is still displaying crazy raw code on the index page. The code does not get wrapped in the block, the whole hopmepage is converted to nonsense. And I can't get the admin features added to the admin functions either. I followed a suggested hack to complete the install without that part, but with the other problem it has serious issues.
My take on it is simple. Weather block is now worthless for GL 1.4 until someone with more knowledge tha myself works on it.
I hope someone does, it would be a cool feature for our community.
I wish I knew what has changed from GL 1.3.11 to GL 1.4 that makes it get so freaky deaky.
Again many thanks.
10
10
Quote
All times are EST. The time is now 08:59 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content