Thread: Major Additions - VBGooglemap Member Edition
View Single Post
  #500  
Old 09-13-2007, 02:05 AM
GeekDrew GeekDrew is offline
 
Join Date: Dec 2004
Location: Columbus, OH, USA
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this a couple of days ago, and the first couple of users that tried to use it (other admins of mine, as I like to do extensive testing) managed to break the pins, because of the XML validation error that others have referenced as "running the XML file".

The cause of the problem is that the pimage link isn't being parsed safely for XML.

Here's a fix that I think will work (at least it works for me -- I do NOT guarantee this, if it causes spontaneous combustion, fire, death, etc., I'm not to blame):

*** I JUST SAID THAT I DO NOT GUARANTEE THIS WILL WORK. I DISCLAIM ALL LIABILITY. YOU MUST BACK UP YOUR DATABASE AND ALL OF THE FILES RELATED TO THIS MODIFICATION, SO THAT YOU CAN RESTORE THEM IF NECESSARY. ***

In /forums/includes/cron/vbgooglemapme_cron.php:

Find:
Quote:
while ($get_xml_marker = $vbulletin->db->fetch_array($get_xml_markers))
Immediately ABOVE the text I have quoted, place the following text:

Quote:
This quote has been removed because I failed to consider HTML rendering. See the text here, so that it is properly parsed: link
In the same file, find this:

Quote:
if ($get_xml_marker["pimage"]!='')
{
$pimage = $get_xml_marker["pimage"];
}
else
{
$pimage = $bburl."/images/googlemapme/noimage.png";
}
Immediately BELOW the text that I have quoted, place this:

Quote:
$pimage = parseToXML($pimage);
That should render all entities in the 'pimage' field safe for XML, so it will validate. However, that script is only called when the CRON job is executed... when someone edits their entry online, a different copy of that same script is called (which is really bad form, in my opinion, but hey, I didn't develop this...). That second copy is located at /forums/includes/functions_vbgooglemapme.php. You need to make the exact same changes in that file as I have mentioned above.

Now... I am not claiming that this will solve everyone's issues. It more than likely will not. It will, however, fix problems with 'pimage' being the reason that the XML won't validate. I think that this will probably fix the problems that quite a few of you are happening.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01180 seconds
  • Memory Usage 1,767KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete