[ABD] jQ User Map api3 v.0.0.3

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.
Locked
PatrickS3
Registered User
Posts: 31
Joined: Tue Aug 09, 2011 5:15 am
Location: Germany
Name: Patrick
Contact:

Re: [DEV] jQ User Map api3 v.0.0.1

Post by PatrickS3 »

Thanks, then i install it tonight.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

[DEV] jQ User Map api3 v.0.0.2

Post by 4_seven »

v.0.0.2 released

Changes
  • adding "smooth moving" by changing location on userlist ('Jump to User') by click,
    if clicked location resides in current map view.
  • switchable overlay section: weather, clouds.
  • adding 'marker-feedback' by mouseover on userlist ('Jump to User') (scroll over list)
    requested by PatrickS3.
[de] translation by PatrickS3
http://www.4seven.de/forum/6test/viewto ... p=332#p331

Update Instruction
Upload new version of
  • user_weather/user_map.php
    user_weather/user_map_config.php*
    styles/prosilver/template/user_map.html
*save old config, config/check new config and re-upload

- Check edits in
  • language/de/common.php
- Clear all caches
Last edited by 4_seven on Fri Apr 20, 2012 6:01 pm, edited 1 time in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
PatrickS3
Registered User
Posts: 31
Joined: Tue Aug 09, 2011 5:15 am
Location: Germany
Name: Patrick
Contact:

Re: [DEV] jQ User Map api3 v.0.0.2

Post by PatrickS3 »

Thanks fot this release.

Yesterday i install the viewtopic addition, works perfect. Only thing i change is background color of the images, because i'm using a dark style.

I hope it's allowed to view an screenshot.

Image
User avatar
2xS
Registered User
Posts: 40
Joined: Tue Feb 14, 2012 7:03 pm
Location: Northern California

Re: [DEV] jQ User Map api3 v.0.0.2

Post by 2xS »

8-) FANTASTIC WORK 4_seven!
4_seven wrote:Update Instruction
Upload new version of
user_weather/user_map.php
user_weather/user_map_config.php*
*save old config, config/check new config and re-upload
Also upload new version of:
\root\styles\prosilver\template\user_map.html
4_seven wrote: - Check edits in
language/de/common.php
In english those edits are (correct in the updated XML file):
OPEN /language/en/common.php
FIND:

Code: Select all

	// jQ User Map api3  / 4seven / 2012
	'U_M'		=> 'User Map',
	'U_M_NO'	=> 'No Users in Map',
	'U_M_JUMP'	=> 'Jump to User',
	'U_M_FULL'	=> 'Show Full Map',
	'U_M_LOC'	=> 'Location',
	'U_M_LOC_DESC'	=> 'Location Description',
	'U_M_VIEW_MAP'  => 'Viewing User Map',
REPLACE WITH:

Code: Select all

	// jQ User Map api3  / 4seven / 2012
	'U_M'		=> 'User Map',
	'U_M_NO'	=> 'No Users in Map',
	'U_M_JUMP'	=> 'Jump to User',
	'U_M_FULL'	=> 'Show Full Map',
	'U_M_LOC'	=> 'Location',
	'U_M_LOC_DESC'	=> 'Location Description',
	'U_M_SET_BTTN'  => 'Add | Remove',
	'U_M_SET_CLOU'  => 'Clouds',
	'U_M_SET_OVER'  => 'Set Overlays',
	'U_M_SET_WEAT'  => 'Weather',
	'U_M_VIEW_MAP'  => 'Viewing User Map',
Also in , lines 34-35 appear to be a duplicate or lines 27-28 in user_weather/user_map_config.php

Code: Select all

// Map Marker Weather overlay /  Celsius or Fahrenheit
$cluster_max_zoom     = 15;
And my own personal preference was to show off the overlay box in all its glory, those edits are:
OPEN: \styles\prosilver\template\user_map.html
FIND:

Code: Select all

<strong style="cursor:pointer; color:#115098;" onclick="spoil('pers-spoiler');">{L_U_M_SET_OVER}</strong>

	<script type="text/javascript">
    // <![CDATA[
	function spoil(id){
	if (document.getElementById) {
	var divid = document.getElementById(id);
	divid.style.display = (divid.style.display=='block'?'none':'block');
	} }
	// ]]>
	</script>

	<div id="pers-spoiler" style="display: none;">
REPLACE WITH:

Code: Select all

<strong>{L_U_M_SET_OVER}</strong>
CHEERS!
User avatar
2xS
Registered User
Posts: 40
Joined: Tue Feb 14, 2012 7:03 pm
Location: Northern California

Re: [DEV] jQ User Map api3 v.0.0.2

Post by 2xS »

Also, thought I may contribute a bit more (sorry to double post), but it seems acceptable under the circumstances.

I thought it may be helpful to include a legend for the users.
Image
This is a prosilver style.

To accomplish this:
OPEN: \styles\prosilver\template\user_map.html
FIND:

Code: Select all

<!-- INCLUDE overall_footer.html -->


BEFORE, ADD:

Code: Select all

         <div class="forabg">
           <div class="inner"><span class="corners-top"><span></span></span>
             <ul class="topiclist">
               <li class="header">
                 <dl class="icon">
                   <dt>LEGEND</dt>
                 </dl>
               </li>
             </ul>
             <ul class="topiclist forums">
               <li class="row">
                 <table width="100%" cellspacing="0">
                   <tr>
                     <td align="{S_CONTENT_FLOW_BEGIN}" valign="top" style="padding-left:10px">
                       <table cellspacing="3" cellpadding="0" border="0">
                         <tr>
                           <td style="text-align: center;"><img src="http://chart.apis.google.com/chart?chst=d_bubble_text_small&chld=bb|Online|EA938C|000000" title="ONLINE" width="51" height="25" alt="User Online" /></td>
                           <td class="gensmall">User is Online</td>
                           <td>&nbsp;&nbsp;</td>
                           <td style="text-align: center;"><img src="http://chart.apis.google.com/chart?chst=d_bubble_text_small&chld=bb|Offline|A7C096|000000" title="OFFLINE" width="51" height="25" alt="User Offline" /></td>
                           <td class="gensmall">User is Offline</td>
                         </tr>
                       </table>
                     </td>
                     <td align="{S_CONTENT_FLOW_END}" style="padding-right:10px"><span class="gensmall">RIGHT-CLICK user tag on map to view profile</span></td>
                   </tr>
                 </table>  
                </li>
             </ul>
           <span class="corners-bottom"><span></span></span></div>
           </div>
A couple explanations for those interested:
I DID NOT update the common.php language file (because I use Google Translate board wide and saw it as unnecessary). The english appearing in this file would need to be altered depending on your preference.

e.g.
FIND AND CHANGE each line as desired:

Code: Select all

<dt>LEGEND</dt>
title="ONLINE"
alt="User Online"
<td class="gensmall">User is Online</td>
title="OFFLINE"
<td class="gensmall">User is Offline</td>
title="OFFLINE"
alt="User Offline"
<span class="gensmall">RIGHT-CLICK user tag on map to view profile</span>
Also, the Google API marker tags would need to be altered based on your preference:
Online marker:
http://chart.apis.google.com/chart?chst ... 38C|000000
Offline marker:
http://chart.apis.google.com/chart?chst ... 096|000000

You can alter the URL to change the markers to say whatever you want e.g. "Online" > whatever.
and/or to be whatever background color you want e.g. "EA938C" to whatever.
For me personally, it made more sense to display the online color as green and offline as red so I reversed the colors (also change in user_weather/user_map_config.php lines 34-40).

CHEERS!

And THANKS AGAIN for this FANTASTIC MOD!
Last edited by 2xS on Fri Apr 20, 2012 7:51 pm, edited 1 time in total.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Map api3 v.0.0.2

Post by 4_seven »

2xS wrote:
  • Also upload new version of:
    \root\styles\prosilver\template\user_map.html
  • Also in , lines 34-35 appear to be a duplicate or lines 27-28 in user_weather/user_map_config.php

    Code: Select all

    // Map Marker Weather overlay /  Celsius or Fahrenheit
    $cluster_max_zoom     = 15;
Update instruction and double config entry is corrected. package is re-up.
Last edited by 4_seven on Fri Apr 20, 2012 8:04 pm, edited 1 time in total.
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 Map api3 v.0.0.2

Post by 4_seven »

related to http://www.phpbb.com/community/viewtopi ... #p13139028

[quote=""2xS"]OPEN: \styles\prosilver\template\user_map.html

FIND:

Code: Select all

<strong style="cursor:pointer; color:#115098;" onclick="spoil('pers-spoiler');">{L_U_M_SET_OVER}</strong>

	<script type="text/javascript">
    // <![CDATA[
	function spoil(id){
	if (document.getElementById) {
	var divid = document.getElementById(id);
	divid.style.display = (divid.style.display=='block'?'none':'block');
	} }
	// ]]>
	</script>

	<div id="pers-spoiler" style="display: none;">
REPLACE WITH:

Code: Select all

<strong>{L_U_M_SET_OVER}</strong>
[/quote]

Further find direct after named lines

Code: Select all

	</div>
	</form>
	</div>
Replace with

Code: Select all

	</div>
	</form>
Otherwise we have an orphaned </div>
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
2xS
Registered User
Posts: 40
Joined: Tue Feb 14, 2012 7:03 pm
Location: Northern California

Re: [DEV] jQ User Map api3 v.0.0.2

Post by 2xS »

4_seven wrote:Otherwise we have an orphaned </div>
THANK YOU!

Just for reference, I've observed the cloud overlay [on] and user_map_config.php set to

Code: Select all

// Map Initial Zoom / Default: 4
$map_initial_zoom     = 2; 
displays some wonky results. This obviously has nothing to do with you or your MOD, just thought I'd point it out as it was my initial config.


Another thought perhaps...
When an unregistered or non-logged in user accesses the map, the map appears empty and gives the message "No Users in Map."

I thought it would be nice to prompt them with the login screen and a pretty message.

Here's what I did:

OPEN: /language/en/common.php (or your language file)
FIND:

Code: Select all

	'LOGIN_EXPLAIN_VIEWONLINE'			=> 'In order to view the online list you have to be registered and logged in.',
ADD AFTER:

Code: Select all

	'LOGIN_MAP'							=> 'The board requires you to be registered and logged in to access the user map.',
OPEN: /user_weather/user_map.php
FIND:

Code: Select all

$user->setup();
ADD AFTER:

Code: Select all

if ($user->data['user_id'] == ANONYMOUS)
{
	login_box('', $user->lang['LOGIN_MAP']);
} 
Also, a quick and easy question (hopefully). If I want to display the weather overlay as on by default, how would you suggest I do that. (was messing with it for a bit, but I figured you'd just know right off hand)

THANKS MATE!
CHEERS!
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Map api3 v.0.0.2

Post by 4_seven »

2xS wrote:

Code: Select all

// Map Initial Zoom / Default: 4
$map_initial_zoom     = 2; 
displays some wonky results.
bcs. its a wonky value.
2xS wrote:how would you suggest I do that
its designed to work the given way. must see, if i find time to fiddle it out.
Current Mods | Mod Base | php(BB) programming | No help via PM
lionel0769
Registered User
Posts: 9
Joined: Sat Apr 28, 2012 9:47 am

Re: [DEV] jQ User Map api3 v.0.0.2

Post by lionel0769 »

Hi,

I have this error when i want edit profile by administration pannel :

Code: Select all

Erreur générale
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' user_map_longitude = , user_map_location = 'tregonneau_22200' WHERE user_id ' at line 2 [1064]

SQL

UPDATE phpbb_users SET user_map_latitude = , user_map_longitude = , user_map_location = 'tregonneau_22200' WHERE user_id = 252

BACKTRACE

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_user_map.php
LINE: 81
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/acp/acp_users.php
LINE: 1399
CALL: include('[ROOT]/includes/functions_user_map.php')

FILE: [ROOT]/includes/functions_module.php
LINE: 507
CALL: acp_users->main()

FILE: [ROOT]/adm/index.php
LINE: 74
CALL: p_master->load_active()
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] jQ User Map api3 v.0.0.2

Post by 4_seven »

can not reproduce.
check all edits manually (especially acp edits).
open includes/acp/acp_users.php

find

Code: Select all

						trigger_error($user->lang['USER_PROFILE_UPDATED'] . adm_back_link($this->u_action . '&u=' . $user_id));]
replace-with

Code: Select all

						// jQ User Map api3  / 4seven / 2012
						include($phpbb_root_path . 'includes/functions_user_map.' . $phpEx);
						// jQ User Map api3  / 4seven / 2012
						
						trigger_error($user->lang['USER_PROFILE_UPDATED'] . '<br /><br />' . $err_mess . adm_back_link($this->u_action . '&u=' . $user_id));

Code: Select all

SET user_map_latitude = , user_map_longitude = ,
Also this entrys are empty, so the corresponding php include/functions_user_map.php is not in place or you are blacklisted by google.
Current Mods | Mod Base | php(BB) programming | No help via PM
lionel0769
Registered User
Posts: 9
Joined: Sat Apr 28, 2012 9:47 am

Re: [DEV] jQ User Map api3 v.0.0.2

Post by lionel0769 »

4_seven wrote:

Code: Select all

SET user_map_latitude = , user_map_longitude = ,
Also this entrys are empty, so the corresponding php include/functions_user_map.php is not in place or you are blacklisted by google.
Not in place , delete by another administrator :roll:
Sorry and thanks , all is ok now
purusam
Registered User
Posts: 440
Joined: Sat Feb 02, 2008 10:31 pm

Re: [DEV] jQ User Map api3 v.0.0.2

Post by purusam »

first i did Custom Profile Field (CPF), then i did the database tables, after that i did all the codes.

But i cant make it work, i dont got any errors, when i update my location in my cp i i get the message that my profile is updated succes. But i do not get this message Location: XXXXXXX is set successfully.

i got no error messages

what do u think ?

Yes i have udated styles themes and everything and cleared cache both in browser and forum system

the only thing i dit was this, my tables are named phpbb3_xxxx so....

Code: Select all

ALTER TABLE phpbb_users ADD user_map_latitude varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_map_longitude varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_jq_online int(1) NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_map_location varchar(100) COLLATE utf8_bin NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_map_location_desc varchar(400) COLLATE utf8_bin NOT NULL DEFAULT '0';
to this

Code: Select all

ALTER TABLE phpbb3_users ADD user_map_latitude varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '0';
ALTER TABLE phpbb3_users ADD user_map_longitude varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '0';
ALTER TABLE phpbb3_users ADD user_jq_online int(1) NOT NULL DEFAULT '0';
ALTER TABLE phpbb3_users ADD user_map_location varchar(100) COLLATE utf8_bin NOT NULL DEFAULT '0';
ALTER TABLE phpbb3_users ADD user_map_location_desc varchar(400) COLLATE utf8_bin NOT NULL DEFAULT '0';
It doesnt seem like it goes to my database somehow.
purusam
Registered User
Posts: 440
Joined: Sat Feb 02, 2008 10:31 pm

Re: [DEV] jQ User Map api3 v.0.0.2

Post by purusam »

okey... i did alot of testing in my forum...

i got the map to show if i put in the longitude and latitude manual in the database tables.


so it have to do something with sending the information to the database.. in the ucp. maybe it have something to do with phpbb3_users and phpbb_users do to ?

I have checked all the code everything is in place.
Locked

Return to “[3.0.x] Abandoned MODs”