Клуб API Карт

Смогу ли я сменить geocode google на geocode yandex в компоненте joomla?

e.lodyanov
8 июня 2012, 12:34

Всем доброго дня! 

Установил компонент на CMS Joomla, который выводит информацию по объектам недвижимости + метку на карте, где этот объект находится. В админке достаточно прописать адрес дома и он автоматически отображает его на карте страницы объекта.  Используется карта google, а очень надо сменить на карты yandex. 

Смогу ли я без знаний php и javascript поменять код?

Компонент и демо: http://www.joomanager.com/demo/realestate/1212-aburden-rd-los-angeles-ca

Исходный код вроде бы в одном файле:  

<?php 
// no direct access
defined( '_JEXEC' ) or die( ';)' );
global $mainframe, $Itemid; 
jimport('joomla.filesystem.file');
if($this->sendmail) {
echo $this->sendmail;
}
$config = $this->toletconfig;
$joomlarooturl = JURI::root();
$br = strtolower($_SERVER['HTTP_USER_AGENT']); // what browser.
if(preg_match("/msie 6/", $br)) {
$jmis_ie6 = "yes";
} else {
$jmis_ie6 = "no";
}
$catitemid= JRequest::getInt('catitemid','');
$Itemid= JRequest::getInt('Itemid');
function curPageURL() {
 $pageURL = 'http';
 if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}
$strpageurl = curPageURL();
$pageurl = str_replace("&","&amp;",$strpageurl);
?>
<?php if ($jmis_ie6 == "yes") { ?>
<!--[if IE 6]>
<style type="text/css"> 
#jm_zoomimage {
background:none;
filter:
progid:dximagetransform.microsoft.alphaimageloader(src='<?php echo $LiveSiteUrl;?>components/com_joomanager/templates/itemdetails/images/shared/zoom.png', sizingmethod='crop');}
</style>
<![endif]-->
<?php } ?>
<script type="text/javascript">//<![CDATA[
    document.write('<link rel="stylesheet" href="<?php echo $joomlarooturl;?>components/com_joomanager/templates/itemdetails/css/lytebox.css" type="text/css" />');
//]]></script>
<script src="<?php echo $joomlarooturl;?>components/com_joomanager/templates/itemdetails/js/lytebox.js" type="text/javascript"></script>
<div class="item_container">
<?php
//rasio add
$return = '';
$jmmainurl = JURI::root();
$return = '<div style="width:100%;padding:0px;padding-bottom:0px; margin: 0px 5px 10px 5px;">';
if($config['show_category_button']->value ==1) { 
$return .= '<div style="margin-right:-7px;float:right;width:150px;height:22px;padding-left:11px;padding-top:6px;background-image:url('.$jmmainurl.'components/com_joomanager/views/images/categories-link.png);background-repeat:no-repeat;">';
$return .= '<a href="index.php?option=com_joomanager&amp;view=items&amp;Itemid='.$Itemid.'">'.JText::_('SHOW_CATEGORY_HEADER').'</a>';
$return .= '</div>';}
if ($this->user->gid) {
$return .= '<div style="margin-right:-7px;float:right;width:127px;height:22px;padding-left:11px;padding-top:6px;background-image:url('.$jmmainurl.'components/com_joomanager/views/images/additem-link.png);background-repeat:no-repeat;">';
$return .= '<a href="index.php?option=com_joomanager&amp;view=items&amp;layout=form&amp;Itemid='.$Itemid.'">'.JText::_('ADD_ITEM_HEADER').'</a>';
$return .= '</div>';
if (isset($config['enablealerts'])&&($config['enablealerts']->value ==1)){
$return .= '<div style="margin-right:-7px;float:right;width:127px;height:22px;padding-left:11px;padding-top:6px;background-image:url('.$jmmainurl.'components/com_joomanager/views/images/additem-link.png);background-repeat:no-repeat;">';
$return .= '<a href="index.php?option=com_joomanager&amp;view=items&amp;layout=alerts&amp;Itemid='.$Itemid.'">'.JText::_('MY_ALERTS').'</a>';
$return .= '</div>';
}
}
$return .= '<div style="clear:both;"></div>';
$return .= '</div>';
echo $return;
 
//rasio ratings system
if($config['allow_rating']->value == 1 ){
$item_rating = JoomanagerHelpers::rating_bar($catitemid,$Itemid,5);//$this->showdetails[0]->id
}else{
$item_rating = "";
$item_comments = '';
//rasio comments system
if($config['allow_rating']->value == 1 ){ //&& $this->user->id > 0
$item_comments .= '<div class="jm_commenttitle">'.JText::_("COMMENTS").' ('. $_SESSION['commentcount'].'):</div>';
$item_comments .= JoomanagerHelpers::comments_display($catitemid);//$this->showdetails[0]->id
}else{
$item_comments = "";
}
//end rasio add
?>
<!-- Display Breadcrumb -->
<?php if($config['show_breadcrumb']->value) { 
echo '<div style="background:url('.$joomlarooturl.'components/com_joomanager/views/images/breadcrumbs_left.png) no-repeat scroll 0 0 transparent;">
<div style="padding: 0 0px;background:url('.$joomlarooturl.'components/com_joomanager/views/images/breadcrumbs_right.png)no-repeat scroll right center transparent;">
<div class="breadcrumb" style="font-size:11px;margin:5px;line-height:24px;height:25px;background:url('.$joomlarooturl.'components/com_joomanager/views/images/breadcrumbs_m.png) repeat-x scroll 0 0 transparent;">';
echo '&nbsp;<strong>'.JText::_("YOUAREHERE").':</strong>&nbsp;&nbsp;';
foreach ($this->breadcrumb as $trail) {
echo '<a href="'.$trail->link.'">'.$trail->category_name.'</a> > ';
}
$end = end($this->breadcrumb);
echo $end->title;
echo '</div></div></div>';
}
?>
<!-- Set Page Title -->
<?php 
$jmmydoc =& JFactory::getDocument();
$jmtitle = $jmmydoc->getTitle();
$jmmydoc->setTitle($this->showdetails[0]->title);
?>
<!-- End Set Page Title -->
<?php 
//print_r($this->user);
if($this->showdetails[0]->userid == $this->user->id && $this->user->id> 0 || $this->user->usertype == 'Super Administrator') { ?>
<div style="text-align:right; padding-right:10px;" class="jm_editbutton"><?php echo '<a href="index.php?option=com_joomanager&amp;view=items&amp;layout=form&amp;task=edit&amp;id='.$this->showdetails[0]->id.'&amp;Itemid='.$this->itemid.'">'.JText::_("EDITLISTING").'</a>';?></div>
<div style="clear:both;"></div>
<?php } ?>
<!-- Displays Category List as per config using backend Templates option -->
<?php 
$templateFile = JPATH_SITE.DS.'components'.DS.'com_joomanager'.DS.'templates'.DS.'itemdetails'.DS.$config['item_template']->value;
$fp = fopen($templateFile, 'r');  
if(!$fp)  
echo "Can't open file";
$cssfilename = JFile::stripExt($config['item_template']->value);
$mainframe->addCustomHeadTag('<link rel="stylesheet" href="'.$joomlarooturl.'components/com_joomanager/templates/itemdetails/css/'.$cssfilename.'.css" type="text/css" />');
if($jsfilename = JFile::stripExt($config['item_template']->value))
$mainframe->addCustomHeadTag('<script src="'.$joomlarooturl.'components/com_joomanager/templates/itemdetails/js/'.$cssfilename.'.js" type="text/javascript"></script>');
$data = file_get_contents($templateFile);
$first_items_image = '';
$items_images ='';
$image_counter = 0;
$googlemap = '';
    $googlemap_dp = '';
//function to use item title if no map address is input
if ($this->showdetails[0]->map_address == '' ) { 
$googlemap_dp = $this->showdetails[0]->title;}
else {
$googlemap_dp = $this->showdetails[0]->map_address;} 
if($this->showdetails[0]->show_googlemap == '1') {
 
$googlemap .= '<div class="jm_maptitle">'.JText::_("MAPTITLE").':</div>';
$googlemap .= '<div class="details_item_wrap">';
$googlemap .= '<div class="details_first_topl">';
$googlemap .= '<div class="details_first_topr">';
$googlemap .= '<div class="details_first_topm">';
$googlemap .= '</div>';
$googlemap .= '</div>';
$googlemap .= '</div>';
$googlemap .= '<div class="details_first_ml">';
$googlemap .= '<div class="details_first_mr">';
$googlemap .= '<div class="jmitem_padding">';
$googlemap .= '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script><script type="text/javascript">';
$googlemap .= ' var geocoder;';
$googlemap .= ' var map;';
$googlemap .= ' var address ="'.$googlemap_dp.'";';
$googlemap .= ' function JM_GMstartup() {';
$googlemap .= '   geocoder = new google.maps.Geocoder();';
$googlemap .= '   var latlng = new google.maps.LatLng(-34.397, 150.644);';
$googlemap .= '   var myOptions = {';
$googlemap .= '      zoom: 18,';
$googlemap .= '     center: latlng,';
$googlemap .= '  mapTypeControl: true,';
$googlemap .= 'mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},';
$googlemap .= '    navigationControl: true,';
$googlemap .= '     mapTypeId: google.maps.MapTypeId.ROADMAP';
$googlemap .= '   };';
$googlemap .= '    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);';
$googlemap .= '    if (geocoder) {';
$googlemap .= '      geocoder.geocode( { \'address\': address}, function(results, status) {';
$googlemap .= '       if (status == google.maps.GeocoderStatus.OK) {';
$googlemap .= '         if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {';
$googlemap .= 'map.setCenter(results[0].geometry.location);';
$googlemap .= '            var infowindow = new google.maps.InfoWindow(';
$googlemap .= '                { content: \'Address: \'+address+\'\',';
$googlemap .= '                  size: new google.maps.Size(150,50) });   ';
$googlemap .= '            var marker = new google.maps.Marker({';
$googlemap .= '                position: results[0].geometry.location,';
$googlemap .= '                map: map, ';
$googlemap .= '                title:address }); ';
$googlemap .= '            google.maps.event.addListener(marker, \'click\', function() { ';
$googlemap .= '                infowindow.open(map,marker);    }); ';
$googlemap .= '          } else { alert("No results found"); } ';
$googlemap .= '        } else { alert("Geocode was not successful for the following reason: " + status);}  });   }  }   ';       
$googlemap .= 'function jm_mapload() {JM_GMstartup();} ';
$googlemap .= 'window.setTimeout(jm_mapload,100);</script> ';
$googlemap .= '<div id="map_canvas" class="map" style="width:100%;height:350px"></div>';
$googlemap  .='</div>';
$googlemap  .= '</div>';
$googlemap  .= '</div>';
$googlemap  .= '<div class="details_first_bottoml">';
$googlemap  .= '<div class="details_first_bottomr">';
$googlemap  .= '<div class="details_first_bottomm">';
$googlemap  .= '</div>';
$googlemap  .= '</div>';
$googlemap  .= '</div>';
$googlemap  .= '</div>';
$googlemap  .= '<div style="clear:both;"></div>';
}
if($this->showdetails[0]->show_tellafriend == '1') {
$tellafriend = "<script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js\"></script>";
$tellafriend .= "<div class=\"addthis_toolbox addthis_default_style\">";
    $tellafriend .= "<a href=\"http://addthis.com/bookmark.php?v=250\" class=\"addthis_button_compact\">".JText::_("SOCIALBUTTONS")."</a>";
    $tellafriend .= "<span class=\"addthis_separator\"></span>";
    $tellafriend .= "<a class=\"addthis_button_facebook\"></a>";
    $tellafriend .= " <a class=\"addthis_button_twitter\"></a>  ";  
    $tellafriend .= " <a class=\"addthis_button_googlebuzz\"></a>";
    $tellafriend .= " <a class=\"addthis_button_email\"></a>";
$tellafriend .= " </div>";
} else { $tellafriend = "";}
$items_images_once = 1;
if (!empty ($this->categoryrets)){
// get the photo objects from rets
if(!empty($this->images)) {
foreach($this->images as $images) { 
// rasio add
$w=$config['img_item_show_width']->value;
$h=$config['img_item_show_height']->value;
$w_tm=$config['img_tmb_item_show_width']->value;
$h_tm=$config['img_tmb_item_show_height']->value;
$rets= new phRETS();
$connect = $rets->Connect($config['rets_login_url']->value, $config['rets_username']->value, $config['rets_password']->value);
include_once(JPATH_ADMINISTRATOR.DS."components".DS."com_joomanager".DS."tables".DS."items.php");
$db= & JFactory::getDBO();
$row_load = new Tableitems( $db );
$row_load->SetPrimaryField($db,'id');
if($row_load->load($catitemid) && $row_load->rets == 1){
$photos = $rets->GetObject("Property", "Photo", $row_load->ListingID, "*",1);
}
//print_r($photos[0]['Success']);exit;
//print_r ($images);
//print_r($retsphoto_index);
//foreach($photos as $photo){
if ($photos[0]['Success'] == 1) {
//silviu change for display images inside array data value
if(is_string($images)){
$retsphoto_index = explode("|",$images);
if ($items_images_once == 1) {
for ( $counter = 0; $counter <= 0; $counter += 1){
$first_items_image .= '<a href="'.$retsphoto_index[1].'" rel="lytebox[gallery]" id="jm_lyteboximage" title="'.$retsphoto_index[2].'">'; 
$first_items_image .= '<div id="jm_zoomimage_outer"><div id="jm_zoomimage"></div><img name="button" src="'.$retsphoto_index[1].'" alt="zoom" width="'.$w.'" height="'.$h.'" /></div></a>';
$first_items_image .= '<script type="text/javascript">function movepic(img_name,img_src) {document[img_name].src=img_src;}</script>';
$items_images_once = 0;
}
}
$items_images .= '<script type="text/javascript">function jm_change'.$retsphoto_index[2].'() {document.getElementById(\'jm_lyteboximage\').href = \''.$retsphoto_index[1].'\';}</script>';
$items_images .= '<span style="background:url('.$retsphoto_index[1].');display:none;"></span>';
$items_images .= '<a href=\''.$retsphoto_index[1].'\' rel="lytebox[gallery]"></a><img src="'.$retsphoto_index[1].'" alt="'.$retsphoto_index[2].'" width="'.$w_tm.'" height="'.$h_tm.'" onclick="jm_change'.$retsphoto_index[2].'();movepic(\'button\',\''.$retsphoto_index[1].'\')"  align="top" class="custom_image" id="image_'.$retsphoto_index[2].'" style="cursor:pointer;"/>';
$image_counter = $image_counter + 1;
//silviu change for display images inside array data value
}elseif(is_array($images) && isset($images["ListingID"])){
if ($items_images_once == 1) {
for ( $counter = 0; $counter <= 0; $counter += 1){
$first_items_image .= '<a href="'.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'" rel="lytebox[gallery]" id="jm_lyteboximage" title="'.$this->showdetails[0]->title.'">'; 
$first_items_image .= '<div id="jm_zoomimage_outer"><div id="jm_zoomimage"></div><img name="button" src="'.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'" alt="zoom" width="'.$w.'" height="'.$h.'" /></div></a>';
$first_items_image .= '<script type="text/javascript">function movepic(img_name,img_src) {document[img_name].src=img_src;}</script>';
$items_images_once = 0;
}
}
$items_images .= '<script type="text/javascript">function jm_change'.$images_row.'() {document.getElementById(\'jm_lyteboximage\').href = \''.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'\';}</script>';
$items_images .= '<span style="background:url(\''.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'\');display:none;"></span>';
$items_images .= '<a href=\''.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'\' rel="lytebox[gallery]"></a>
<img src="'.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'" alt="'.$this->showdetails[0]->title.'" width="'.$w_tm.'" height="'.$h_tm.'" onclick="jm_change'.$images_row.'();movepic(\'button\',\''.JURI::root().'components/com_joomanager/helpers/photo.php?index='.$images_row.'&ListingID='.$images["ListingID"].'\')"  align="top" class="custom_image" id="image_'.$images_row.'" style="cursor:pointer;"/>';
$image_counter = $image_counter + 1;
}
}else {
foreach($this->images[0] as $images) { 
// rasio add
$w=$config['img_item_show_width']->value;
$h=$config['img_item_show_height']->value;
$w_tm=$config['img_tmb_item_show_width']->value;
$h_tm=$config['img_tmb_item_show_height']->value;
if ($items_images_once == 1) {
for ( $counter = 0; $counter <= 0; $counter += 1){
$first_items_image .= '<a href="'.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.'" rel="lytebox[gallery]" id="jm_lyteboximage" title="'.$images->title.'">';
$first_items_image .= '<div id="jm_zoomimage_outer"><div id="jm_zoomimage"></div><img name="button" src="'.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/tn_'.$images->value.'" alt="zoom" width="'.$w.'" height="'.$h.'" /></div></a>';
$first_items_image .= '<script type="text/javascript">function movepic(img_name,img_src) {document[img_name].src=img_src;}</script>';
$items_images_once = 0;
}
}
$items_images .= '<script type="text/javascript">function jm_change'.$images->fieldid.'() {document.getElementById(\'jm_lyteboximage\').href = \''.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.'\';}</script>';
$items_images .= '<span style="background:url('.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.');display:none;"></span>';
$items_images .= '<a href=\''.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.'\' rel="lytebox[gallery]"></a><img src="'.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/tn_'.$images->value.'" alt="'.$images->value.'" width="'.$w_tm.'" height="'.$h_tm.'" onclick="jm_change'.$images->fieldid.'();movepic(\'button\',\''.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/tn_'.$images->value.'\')"  align="top" class="custom_image" id="image_'.$images->fieldid.'" style="cursor:pointer;"/>';
$image_counter = $image_counter + 1;
}//end foreach
}//end else
//}//end foreach
} //end foreach$this->images
} //end if
} //end if
else {
//get the images from local
if(!empty($this->images)) {
foreach($this->images as $images) { 
// rasio add
$w=$config['img_item_show_width']->value;
$h=$config['img_item_show_height']->value;
$w_tm=$config['img_tmb_item_show_width']->value;
$h_tm=$config['img_tmb_item_show_height']->value;
if ($items_images_once == 1) {
for ( $counter = 0; $counter <= 0; $counter += 1){
$first_items_image .= '<a href="'.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.'" rel="lytebox[gallery]" id="jm_lyteboximage" title="'.$images->title.'">';
$first_items_image .= '<div id="jm_zoomimage_outer"><div id="jm_zoomimage"></div><img name="button" src="'.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/tn_'.$images->value.'" alt="zoom" width="'.$w.'" height="'.$h.'" /></div></a>';
$first_items_image .= '<script type="text/javascript">function movepic(img_name,img_src) {document[img_name].src=img_src;}</script>';
$items_images_once = 0;
}
}
$items_images .= '<script type="text/javascript">function jm_change'.$images->fieldid.'() {document.getElementById(\'jm_lyteboximage\').href = \''.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.'\';}</script>';
$items_images .= '<span style="background:url('.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.');display:none;"></span>';
$items_images .= '<a href=\''.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/'.$images->value.'\' rel="lytebox[gallery]"></a><img src="'.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/tn_'.$images->value.'" alt="'.$images->value.'" width="'.$w_tm.'" height="'.$h_tm.'" onclick="jm_change'.$images->fieldid.'();movepic(\'button\',\''.$joomlarooturl.'images/com_joomanager/items/'.$images->fieldid.'/tn_'.$images->value.'\')"  align="top" class="custom_image" id="image_'.$images->fieldid.'" style="cursor:pointer;"/>';
$image_counter = $image_counter + 1;
}
}
}
$custom = '';
$user = JFactory::getUser($this->showdetails[0]->userid); // get the user details like email address for contact form
foreach($this->showdetails as $showdetails) {
if ($showdetails->value == '') { } else {
//rasio add multiple option - start
if(strstr($showdetails->value, '|')){
$showdetails->value = str_replace("|",",&nbsp;",$showdetails->value);
}
//rasio add multiple option - end
//silviu fix checkbox issue - start
if($showdetails->showon_details == 1){
if($showdetails->fieldtype == 'checkbox'){
if($showdetails->value == '1'){
$custom .= '<div style="float:left;padding-right:3px;" class="custom" id="custom_'.$showdetails->fid.'">'.$showdetails->fieldname.'</div> ';
}
}else{
$custom .= '<div style="float:left;padding-right:3px;" class="custom" id="custom_'.$showdetails->fid.'">'.$showdetails->fieldname.':</div> ';
$custom .= ' <div style="float:left;" class="custom_value" id="custom_value_'.$showdetails->fid.'">'.$showdetails->value.'</div>';
}
}
//silviu fix checkbox issue - end
$custom .= '<br />';
$custom .= '<div style="clear:both;"></div><hr style="height:1px;background:#E8E5E2;border: 0;" />';
$custom .= '';}
}
if($this->showdetails[0]->show_contactform == '1') {
$mainframe->addCustomHeadTag('<script type="text/javascript" src="'.$joomlarooturl.'components/com_joomanager/js/contactform.js"></script>');
$contactform = '<div class="jm_contacttitle"><strong>'.JText::_( "SELLER_CONTACT_FORM" ).'</strong></div>';
$contactform .= '<div class="details_item_wrap">';
$contactform .= '<div class="details_first_topl">';
$contactform .= '<div class="details_first_topr">';
$contactform .= '<div class="details_first_topm">';
$contactform .= '</div>';
$contactform .= '</div>';
$contactform .= '</div>';
$contactform .= '<div class="details_first_ml">';
$contactform .= '<div class="details_first_mr">';
$contactform .= '<div class="jmitem_padding">';
$contactform .= '<fieldset class="adminform">';
$contactform .= '<legend></legend><br />';
$contactform .= '<form action="'.JRoute::_( 'index.php?option=com_joomanager' ).'" method="post" name="form1" id="form1" onsubmit="MM_validateForm(\'tolet_name\',\'\',\'R\',\'tolet_email\',\'\',\'RisEmail\',\'tolet_subject\',\'\',\'R\',\'tolet_phone\',\'\',\'Rval\',\'verif_box\',\'\',\'R\',\'tolet_message\',\'\',\'R\');return document.MM_returnValue">';
$contactform .= '<div style="width:100%;">';
$contactform .= '<div style="float:left;width:64px;">'.JText::_("NAME").':</div>';
$contactform .= '<div style="float:left;"><input type="text" id="'.JText::_("NAME").'" name="tolet_name" /></div>';
$contactform .= '<div style="clear:both;height:8px;"></div>';
$contactform .= '<div style="float:left;width:64px;">'.JText::_("EMAIL").':</div>';
$contactform .= '<div style="float:left;"><input id="'.JText::_("EMAIL").'" type="text" name="tolet_email" /></div>';
$contactform .= '<div style="clear:both;height:8px;"></div>';
$contactform .= '<div style="float:left;width:64px;">'.JText::_("SUBJECT").':</div>';
$contactform .= '<div style="float:left;"><input id="'.JText::_("SUBJECT").'" type="text" name="tolet_subject" /></div>';
$contactform .= '<div style="clear:both;height:8px;"></div>';
$contactform .= '<div style="float:left;width:64px;">'.JText::_("PHONE_NUMBER").':</div>';
$contactform .= '<div style="float:left;"><input id="'.JText::_("PHONE_NUMBER").'" type="text" name="tolet_phone" /></div>';
$contactform .= '<div style="clear:both;height:8px;"></div>';
$contactform .= '<div style="float:left;width:64px;">'.JText::_("MESSAGE").':</div>';
$contactform .= '<div style="float:left;"><textarea id="'.JText::_("MESSAGE").'" name="tolet_message" rows="5" cols="30">'.JRequest::getVar("tolet_message").'</textarea></div>';
$contactform .= '<div style="clear:both;height:8px;"></div>';
$contactform .= '<div style="float:left;padding-left:64px;">'.JText::_("TYPE_VERF_CODE").':</div><br />';
$contactform .= '<div style="padding-left:64px;"><input id="verification_code" type="text" name="verif_box" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"/>';
$contactform .= '<img src="'.$jmmainurl.'index.php?no_html=1&amp;option=com_joomanager&amp;task=verifycaptcha&amp;controller=details?'.rand(0,9999).'" alt="verification image, type it in the box" width="50" height="24" align="bottom" /></div><br />';
if(JRequest::getVar('wrong_code') == 'true') { 
$contactform .= '<div style="border:1px solid #990000; background-color:#D70000; color:#FFFFFF; padding:4px; padding-left:6px;width:295px;">Wrong verification code</div><br />';
}
// rasio add
$urltosend = base64_encode($joomlarooturl."index.php?option=com_joomanager&view=details&catitemid=".$this->showdetails[0]->id."&Itemid=".$Itemid);
$contactform .= '<div style="clear:both;"></div>';
$contactform .= '<div style="padding-left:64px;"><input type="submit" name="Submit" class="button" value="'.JText::_("SUBMIT").'" />';
$contactform .= '</div></div>';
$contactform .= '<input type="hidden" name="view" value="details" />';
$contactform .= '<input type="hidden" name="catitemid" value="'.$catitemid.'" />';
$contactform .= '<input type="hidden" name="Itemid" value="'.$this->itemid.'" />';
$contactform .= '<input type="hidden" name="sendmail" value="1" />';
$contactform .= '<input type="hidden" name="email" id="email" value="'.$user->email.'" />';
$contactform .= '<input type="hidden" name="urltosend" id="urltosend" value="'.$urltosend.'" />';
$contactform .= '</form>';
$contactform .= '</fieldset>';
$contactform .='</div>';
$contactform .= '</div>';
$contactform .= '</div>';
$contactform .= '<div class="details_first_bottoml">';
$contactform .= '<div class="details_first_bottomr">';
$contactform .= '<div class="details_first_bottomm">';
$contactform .= '</div>';
$contactform .= '</div>';
$contactform .= '</div>';
$contactform .= '</div>';
$contactform .= '<div style="clear:both;"></div>';
$search= array("{item_images}","{item_rating}","{googlemap}","{item_comments}","{item_name}","{custom_fields}","{contact_form}","{social_buttons}","{first_items_image}","{image_counter}","{joomlarooturl}");
$replace= array($items_images,$item_rating,$googlemap,$item_comments,$this->showdetails[0]->title,$custom,$contactform,$tellafriend,$first_items_image,$image_counter,$joomlarooturl);
echo $itemdetails = str_replace($search, $replace, $data);
} else {
$search= array("{item_images}","{item_rating}","{googlemap}","{item_comments}","{item_name}","{custom_fields}","{contact_form}","{social_buttons}","{first_items_image}","{image_counter}","{joomlarooturl}");
$replace= array($items_images,$item_rating,$googlemap,$item_comments,$this->showdetails[0]->title,$custom,"",$tellafriend,$first_items_image,$image_counter,$joomlarooturl);
echo $itemdetails = str_replace($search, $replace, $data);
 
 ?>
 </div>

 

2 комментария
Подписаться на комментарии к посту

> Смогу ли я без знаний php и javascript поменять код?

Нет.

А если Вы поможете, за вознаграждение конечно же?