vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Direct link to vbgooglemap location (https://vborg.vbsupport.ru/showthread.php?t=113055)

stonyarc 04-17-2006 05:56 PM

Quote:

Originally Posted by cuphongle
very nice

Thanks Cuphongle,

I know it's a bit of work to install both the vbgooglemap 2.0.2 and this template modifications but I think it's worth it.

I find it very handy to be able to directly click on a postbit or memberinfo and get transfered to that users geo location on the map.

PS: I know I'm repeating myself but support for the map is in the other thread !!

caliman 04-17-2006 06:28 PM

Would it be possible to have it only show the pins of the member you are looking at?

stonyarc 04-20-2006 12:05 PM

Quote:

Originally Posted by mini2
Or, you could have two custom user fields, one the automatic one above, and another that users check themselves (radio button) called "link to location" or something, so they get a say in whether the icon shows up or not (of course, you just check for both in the postbit(_legacy).

I might do this myself if I get the time. I just feel your way involves too much effort on the part of the forum user.

I'll have a check if I can cook up something in the future version on vbgooglemap itself

JoeWho 04-28-2006 11:18 AM

Quote:

Originally Posted by mini2
Have you considered making this automatic?

You could disable the field (not editable) run a check via scheduled tasks for an entry in the database and update the profilefield with the correct URL if there is one. Much the same way as I worked my vbadvanced gallery link in postbits (IF they have any images uploaded). Save user input, which is usually a good thing in my view.

mini2,

I agree...
I think this is a must, "making this automatic" or at lest make it so the default domain-address is automatic and the user just adds the data (lat=13.84411462921368&lng=-17.89286017417908&zoom=6) that would help!

Note: a user could put any web-address in the box... I don't have time to check them... do you want a link to a XXX web-site on your forum?:surprised:

Don't get me wrong I really like the idea of the link being in postbit's, but currently I consider this a security risk, what kind of data can be entered into that field, and what damage could be cause?

I just tested it, if the user hasn't filled in the information and someone clicks on a link in postbit it will open a blank page. I did set new registration to the default map page (Default Value = http//www.yourwebsite.com/forums/vbgooglemap.php) but what about all the users that are registered prior to this install, there is no data in that field. Yes... I know I could go into the database and manually insert this information... Oh' more fun.

.

stonyarc 04-28-2006 12:46 PM

Just to let you know that this feature will be default in the next version of the member map and manageable from backend.

No more copy thingy.

Still working on the best way to do it but mini and you have some nice ideas going on.

/EDIT
I'll try to make it so that no additional datamanipulation is needed.

Brrrr is that a plugin that I feel there :D

rinkrat 04-28-2006 01:25 PM

I'm hitting Install but I'll wait till the info is automated if they have entered the info in the googlemap already. Great idea, this hack is a real community builder.

randy. 05-01-2006 03:52 AM

on my instalation all i get on the edit profile section is a textbox... where is the map??? i thought a link is to appear?

volarium 05-14-2006 05:15 PM

Okay guys, I'm having the strangest problem. I installed Mini2's version of the hack, and it appeared to be working perfectly. Then I realized that I was getting SQL errors on some threads. Not all threads, only some threads. Here is the error I'm getting:

Invalid SQL:
SELECT userid,lat_map,username,lng_map FROM googlemapme WHERE userid =;

Since this is the query from googlemap_check.php, I'm assuming it has to do with this hack. After trying for hours to resolve the issue, in the interest of fixing my board, I finally decided to uninstall. So I turned off the scheduled task, I removed the code from postbit_legacy, and I actually removed the custom user profile field completely.

The problem is still there! I don't understand how pulling up a specific thread would execute this query at all. The whole reason Mini2 did it this way is to AVOID executing a query everytime a thread is opened. I've looked everywhere, and I can't figure out where this query is being executed when opening a thread. I suspect no one can help me with this mystery, but I just thought I'd ask. I'm sure it's something stupid that I missed, but I'm at a loss as to what to try next.

http://vfrworld.com/forums/vbgooglemapme.php

Thanks for any thoughts you may have.

volarium 05-16-2006 11:20 PM

Update. I've narrowed down the problem to threads that contain a post by a user without a userID. Why would a user not have a userID? Two reasons:
1. I imported my boards from YABB, and some threads lost their corresponding user information (because the users had removed their accounts). These threads show up as being posted by "Guest".
2. I import messages from an external Listserv. These messages show the username from the Listserv, but since they were not posted by a user of my board, they do not have a userID.

However, I still can't figure out why the query would be executing. I removed the code from the postbit template, and removed the userfield containing the HTML.

Any ideas now?

volarium 05-17-2006 12:37 AM

Hey Mini! I really appreciate your reply. Here is what I modified your script to:

<?^M
////////////////////////////////////////////^M
// MAKE SURE YOU EDIT THIS WHERE STATED //^M
// Then upload to /includes/cron/ //^M
////////////////////////////////////////////^M
^M
// Edit - Make sure this is correct^M
define('FILE_VERSION', '3.5.2'); // this should match install.php^M
^M
error_reporting(E_ALL & ~E_NOTICE);^M
if (!is_object($vbulletin->db))^M
{^M
exit;^M
}^M
^M
// Edit this line to reflect your database structure^M
$map_query=$vbulletin->db->query_read("SELECT userid,lat_map,lng_map FROM ".TABLE_PREFIX."googlemapme");^M
^M
// Make sure you set this field to the correct number! and set the link URL to your own map!^M
while ($inids = $vbulletin->db->fetch_array($map_query)) {^M
$posid = $inids[userid];^M
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field8 = '<a href=\"http://www.vfrworld.com/forums
/vbgooglemapme.php?lat=$inids[lat_map]&lng=$inids[lng_map]&zoom=9\"><u>Find Me!</u></a>' WHERE ".TABLE_PREFIX."userfield
.userid = $posid");^M
}^M
^M
log_cron_action("map task updated", $nextitem);^M
?>

I changed your mod to point to googlemapme, so I still think it might be related. I don't know why vbgooglemap would be causing problems in showthread.php. Does my code above help at all? I'm really at a loss. :-(

I appreciate you trying to help, even if we can't figure it out.


All times are GMT. The time now is 07:13 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.01057 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)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