Forum
Welcome, Guest

TOPIC: Google Mapping Problem

Google Mapping Problem 3 years, 3 months ago #39

  • alveaca
  • OFFLINE
  • Junior Boarder
  • Posts: 23
Hi Everebody, I'm getting some problems installing Google Map for SOBI2 Search Results custom to my sobi2 and also using Feature Listing, but the thing is that I've done everything what the document says once I run my site, it gave me this error

Fatal error: Call to undefined function sobi2VCview() in /home/content/a/l/l/alllocalsearch/html/components/com_sobi2/includes/custom.listing.php on line 606

Please anyone can help me,
I'm stuck

Re:Google Mapping Problem 3 years, 3 months ago #40

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 407
It sounds like there is something not quite right in the vcard template. Have you double checked the modifications there? If you have a code editor that gives syntax coloring information make sure all the php is structured properly.

Don't worry, we'll get you going. Let me know if you need further assistance. I'll be happy to help in anyway I can.

Jerry

Re:Google Mapping Problem 3 years, 3 months ago #41

  • alveaca
  • OFFLINE
  • Junior Boarder
  • Posts: 23
This is my V-CARD please take a look and tell me if there is any error.


<?php
/**
* @version $Id: sobi2.vc.tmpl.php 4237 2008-07-27 10:18:09Z Sigrid Suski $
@package: Sigsiu Online Business Index 2
* ===================================================
* @author
* Name: Sigrid & Radek Suski, Sigsiu.NET
* Email: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
* Url: www.sigsiu.net
* ===================================================
* @copyright Copyright (C) 2007 Sigsiu.NET (www.sigsiu.net). All rights reserved.
* @license see www.gnu.org/licenses/lgpl.html GNU/LGPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*/


/*please do not remove this line */
defined( '_SOBI2_' ) || ( trigger_error("Restricted access", E_USER_ERROR) && exit() );


/* ------------------------------------------------------------------------------
* This is the template for the V-Card View
* ------------------------------------------------------------------------------
*/


/* Don't remove this line! */


function sobi2VCview($id, $style, $ico, $img, $title, $fieldsObjects, $fieldsFormatted, $plugins, $tdTrCounter, $editButton = null, $deleteButton = null)
{


// For advanced templating comment in the next line if you need to access other sobi2 object proporties


$mySobi = new sobi2( $id );
$config =& sobi2Config::getInstance();
$waySearchLink = HTML_SOBI::createWaySearchUrl( $id );
?>


<td <?php echo $style; ?>>


<?php HTML_SOBI::editButtons($config,$mySobi); ?>
<?php
if (isset($tdTrCounter)) {
$tdTrCounter++;
echo "<img src='/components/com_sobi2/GoogleMapsIcons/icong".$tdTrCounter.".png' />";
}
?>
<?php echo ' '.$ico; ?>
<?php echo $img; ?>
<?php echo $title; ?>
<?php //echo rs_showDistance ($id); ?><br>
<?php echo HTML_SOBI::customFieldsData($fieldsFormatted);?><br>


<?php //HTML_SOBI::waySearchUrl($waySearchLink); ?>


<!-- here ends the template -->


<?php
$gmmaPart1 = $fieldsObjects['field_street']->data;
$gmmaPart2 = $fieldsObjects['field_city']->data;
$gmmaPart3 = $fieldsObjects['field_federal_state']->data;
$gmmaPart4 = $fieldsObjects['field_postcode']->data;
$gmmaPart5 = $mySobi->title;
$gmmaSobi_id = $mySobi->id ;
$gmmaPart6 = '<b>'.$gmmaPart5.'</b><br/><a href="wwww.mysite.com/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=0&sobi2Id='.$gmmaSobi_id.'&Itemid=53" target="_parent">View Profile</a>';
$gmmaPart7 = $fieldsObjects['field_latitude']->data;
$gmmaPart8 = $fieldsObjects['field_longitude']->data;


$mapCounter += 1;


$GoogleMapMarkerSt = $gmmaPart1.' '.$gmmaPart2.' '.$gmmaPart3.' '.$gmmaPart4;
$GoogleMapMarkerName = $gmmaPart5;
$GoogleMapMarkerHTML = $gmmaPart6;
$GoogleMapMarker = 'Address'.$GoogleMapMarkerSt.'Name'.$GoogleMapMarkerName.'HTML'.$GoogleMapMarkerHTML.'Latitude'.$gmmaPart7.'Longitude'.$gmmaPart8;


?>


<!-- Don't remove these lines! -->


</td>


<?php
return $GoogleMapMarker;
}


?>

Re:Google Mapping Problem 3 years, 3 months ago #42

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 407
I don't see anything wrong. The only questionable thing is the second comment line with the @ but no *. Your's is all the way to the left mine is a couple of spaces in, but that shouldn't cause a problem.

Were you using the vcard before applying the custom? Did you set the options in the backend under SOBI2 that were noted in the documentation?

I'm having my associate look into this as well. He has more experience with SOBI2 setup than I do so I hope he recognizes something that I don't.

One thing you could try: put $trTdCounter, after $plugins, where the function is called in custom.listing.php. Maybe none of the other installs have ever used the custom.listing.php member so it hasn't come up. Something to try.

Let me know if that works. Meanwhile Glen will be looking at this too.

Jerry

Re:Google Mapping Problem 3 years, 3 months ago #43

  • nicholas
  • OFFLINE
  • Moderator
  • Developing for Joomla since it was born!
  • Posts: 1197
Are you running this on a local install, or on a server?

Which version of Joomla and SOBI2 are you running?

Are you using post code or are you geocoding to get the co-ordinates on the map?

Did you get a Google API key?

Without the modifications, can you get the Google map to display in the details template?

Thanks,

Glen
Nicholas
CIO - CorFun, Inc.
Publisher - orthodoxbiz.com
Webmaster - Orthodox Christian Network

Re:Google Mapping Problem 3 years, 3 months ago #44

  • alveaca
  • OFFLINE
  • Junior Boarder
  • Posts: 23
See my answers below

Were you using the vcard before applying the custom?
Yes, I used vcard before and it works great...

Did you set the options in the backend under SOBI2 that were noted in the documentation?
Yes, I set them all as the documentation said.

As a matter of fact, yes I changed that file adding the new variable in it and still fails in that line 606....
this is the line in custom.listing.php

sobi2VCview($item->itemid,$style, $ico, $img, $title, $fieldsObjects, $fieldsFormated, $plugins, $tdTrCounter, $editButton, $deleteButton);
Moderators: jasper, nicholas, henry, jerry
Time to create page: 0.60 seconds

Login