[ABD] jQ User Weather v.0.0.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] jQ User Weather v.0.0.1

Post by Jane Doe »

In memberlist.php i think

Code: Select all

if ((member['user_map_latitude'] != 0) 
	&&  (member['user_id'] != ANONYMOUS)
	&& (!member['is_bot']))
should be

Code: Select all

if (($member['user_map_latitude'] != 0) 
	&&  ($member['user_id'] != ANONYMOUS)
	&& (!$member['is_bot']))
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

oops, i correct that.

edit: new package is up.

thanks for reporting. seems a copy and paste error..
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] jQ User Weather v.0.0.1

Post by Jane Doe »

sorry my fault.
In memberlist.php

Code: Select all

&& (!$member['is_bot']))
leads to a Undefined index: is_bot - debug error .

Code: Select all

&& (!$user->data['is_bot']))
seems to work better.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

it have to be $member, it's important.

wait a minute, working on solution..
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] jQ User Weather v.0.0.1

Post by Jane Doe »

hmm with

Code: Select all

&& (!$member['is_bot']))
i get
[phpBB Debug] PHP Notice: in file [ROOT]/memberlist.php on line 449: Undefined index: is_bot
(Line 449 is this line in my memberlist.php)

with

Code: Select all

&& (!$user->data['is_bot']))
all is working fine.

I am testing offline with a somewhat modified memberlist.php so may be thats my problem.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

Jane Doe wrote:

Code: Select all

&& (!$user->data['is_bot']))
seems to work better.
youre right. i get the same result. in case of robot check, we can use your solution instead,
bcs. in the named row is_bot is not present as in user->data object.
for the other checks $member is needed, so its a good conclusion.

so find edits in memberlist.php

Code: Select all

	if  (($member['user_map_latitude'] != 0) 
	&&  ($member['user_id'] !== ANONYMOUS)
	&&  (!$member['is_bot']))
	{
and change to

Code: Select all

	if  (($member['user_map_latitude'] != 0) 
	&&  ($member['user_id'] !== ANONYMOUS)
	&& (!$user->data['is_bot']))
	{
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

package is corrected, thanks for reporting.

board III addition is not touched. here is user->data already in place.
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] jQ User Weather v.0.0.1

Post by Jane Doe »

jupp, all fine :)
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

sorry for confusing, but now i see, that all but the first switch was senseless

so my last solution is here, same is for jQ User Weather everywhere, but there in function.php.

i report back for the addition, but here is the solution for this mod:

open

memberlist.php

find (last solution)

Code: Select all

	if  (($member['user_map_latitude'] != 0)
	&&  ($member['user_id'] !== ANONYMOUS)
	&& (!$user->data['is_bot']))
	{
replace with

Code: Select all

	if  (($member['user_map_latitude'] != 0) 
	&&    $auth->acl_get('u_viewprofile'))
	{
for all other modules i use this auth right anyway, so its more uniform.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

both modx instructions are corrected, means main mod (edit change in memberlist.php) and addition (edit change in function.php)
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] jQ User Weather v.0.0.1

Post by Jane Doe »

I have a problem with wrong german values.
e.g.

same location, same time:

$user_language = 'de'; /in user_weather_config.php

Code: Select all

Di.
Meist sonnig
min. -18,89 ° C
max. -15,56 ° C
this is wrong


$user_language = 'en';

Code: Select all

Tue
Mostly Sunny
min. -2,22 ° C
max. 3,89 ° C
this is correct.

Boardlanguage is german.

From de, en, fr, es, nl only en gives the correct value.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

open config file and edit fahreinheit/celsius switch
Current Mods | Mod Base | php(BB) programming | No help via PM
Jane Doe
Registered User
Posts: 145
Joined: Thu Aug 11, 2005 12:35 pm

Re: [DEV] jQ User Weather v.0.0.1

Post by Jane Doe »

It doesnt matter if i select fahrenheit or celsius.

If i choose any other language than en the values are wrong.

eg:

Code: Select all

// Enter language, eg: de, en, fr, es, nl, etc.
$user_language         = 'de';

// Enter 0 for fahrenheit or 1 for celsius
$celsius_or_fahrenheit = 0;
leads to

Code: Select all

Di.
Meist sonnig
min. -0.4 F
max. 10.4 F
wrong values

Code: Select all

// Enter language, eg: de, en, fr, es, nl, etc.
$user_language         = 'en';

// Enter 0 for fahrenheit or 1 for celsius
$celsius_or_fahrenheit = 0;
leads to

Code: Select all

Tue
Mostly Sunny
min. 28.4 F
max. 46.4 F
values are correct

and the normal config for me

Code: Select all

// Enter language, eg: de, en, fr, es, nl, etc.
$user_language         = 'de';

// Enter 0 for fahrenheit or 1 for celsius
$celsius_or_fahrenheit = 1;
results in

Code: Select all

Di.
Meist sonnig
min. -18,89 ° C
max. -12,78 ° C
wrong values again.

If i look in the cached xml the values for the the last de/celsius config:

Code: Select all

<low data="-2"/><high data="9"/>
are correct.

But instead of (-2°C and 9°C) (-18,89 ° C and -12,78 ° C) is shown in the profile.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

i check it out soon. always have en installed, so i should install de language and report back.

edit: the now state seems to be ok..
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Weather v.0.0.1

Post by 4_seven »

i've half fixed that. i fix it completely these days, so enter just en till than.
ive never switched on other language bcs. the system seems clear, so thanks again for reporting.
Current Mods | Mod Base | php(BB) programming | No help via PM
Locked

Return to “[3.0.x] Abandoned MODs”