Go Back   Mosets Community > Archives > Mosets Hot Property 1.0 > Discussions, Troubleshooting and Problems

 
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-06-2008, 08:49 AM
ssaguiar ssaguiar is offline
Mosets'd
 
Join Date: Apr 2008
Posts: 143
Default Help with IE

Hi.

I wish to have some help, if possible.

I made a mod to hp 1.0 to show properties infos in a tabbed way and with some others mods.
You can see it at: www.vivaemfloripa.com.br
I already published these mods here.

My question is:

In IE 7, there is a misplacement of the pictures show and of the google maps in the tabbed presentation.

In all others browsers I have installed (Opera, Firefox, K-Meleon and even with the new Google's Chrome), everything works without any problems.

Anybody can help me to find how to make it work fine in IE?

Thanks

Sergio

Below, the code of the file: /components/com_hotproperty/views/property/tmpl/default.php

Code:
<?php
defined('_JEXEC') or die('Restricted access');
global $hp_imgdir_thumb, $hp_imgdir_standard, $hp_currency, $hp_imgsize_thumb, $hp_img_noimage_thumb, $hp_imgdir_agent, $hp_show_agentdetails, $hp_show_enquiryform, $hp_thousand_sep, $hp_dec_point, $hp_link_open_newwin, $hp_show_moreinfo, $hp_use_companyagent, $hp_dec_string, $hp_thousand_string;
global $hp_show_pdficon, $hp_show_printicon, $hp_show_emailicon;
global $Itemid;
?>

<?php
defined('_JEXEC') or die('Restricted access');
global $hp_imgdir_thumb, $hp_imgdir_standard, $hp_currency, $hp_imgsize_thumb, $hp_img_noimage_thumb, $hp_imgdir_agent, $hp_show_agentdetails, $hp_show_enquiryform, $hp_thousand_sep, $hp_dec_point, $hp_link_open_newwin, $hp_show_moreinfo, $hp_use_companyagent, $hp_dec_string, $hp_thousand_string;
global $hp_show_pdficon, $hp_show_printicon, $hp_show_emailicon;
global $Itemid;
?>

<div id="con_hp1">

<div id="heading_Prop">
    <a href="<?php echo JRoute::_('index.php?option=com_hotproperty'); ?>"><?php echo JText::_('Pathway Main') . ' ' . JText::_('>') . ' '; ?></a>  <a href="<?php echo JRoute::_('index.php?option=com_hotproperty&view=type&id=' . $this->p->typeid); ?>"><?php echo $this->p->type . ' ' . JText::_('>') . ' '; ?>  </a> <?php
    
    # Show edit icon for authorized agent
    if ($this->p->user == $this->user->id && $this->p->user > 0 && $this->user->id > 0)
    { ?>
        <a href="<?php echo JRoute::_('index.php?option=com_hotproperty&view=property&task=edit&id=' . $this->p->id); ?>" title="<?php echo JText::_('Edit'); ?>" class="actionlink"><?php echo JText::_('Edit'); ?></a><?php
    }
    echo $this->p->name." > ID: ".$this->p->id;
    ?>
</div>
<div id="hp_icons"><?php
    if($this->print)
    {
        ?><a href="#" onclick="javascript:window.print(); return false" title="<?php echo JText::_( 'Print' );?>"><img src="<?php echo JURI::root();?>/images/M_images/printButton.png" border="0" alt="<?php echo JText::_( 'Print' );?>" /></a><?php
    }
    else
    {
        if ($hp_show_pdficon && !$this->pop)
        {
            /*
            ?><a href="javascript:void window.open('<?php echo JURI::root(); ?>/components/com_hotproperty/pdf.php?id=<?php echo $this->p->id; ?>', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" title="<?php echo JText::_( 'PDF' );?>"><img src="<?php echo JURI::root();?>/images/M_images/pdf_button.png" border="0" alt="<?php echo JText::_( 'PDF' );?>" /></a><?php
            */
            ?><a href="javascript:void window.open('<?php echo $this->linkPdf; ?>', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" title="<?php echo JText::_( 'PDF' );?>"><img src="<?php echo JURI::root();?>/images/M_images/pdf_button.png" border="0" alt="<?php echo JText::_( 'PDF' );?>" /></a><?php
        }
        if ($hp_show_printicon)
        {
            ?><a href="javascript:void window.open('<?php echo JURI::root(); ?>/index2.php?option=com_hotproperty&amp;view=property&amp;id=<?php echo $this->p->id; ?>&amp;print=1&amp;tmpl=1', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" title="<?php echo JText::_( 'Print' );?>"><img src="<?php echo JURI::root();?>/images/M_images/printButton.png" border="0" alt="<?php echo JText::_( 'Print' );?>" /></a><?php
        }
        if ($hp_show_emailicon && !$this->pop)
        {
            ?><a href="javascript:void window.open('<?php echo $this->linkEmail; ?>', 'win2', 'width=400,height=300,menubar=yes,resizable=yes');" title="<?php echo JText::_( 'E-mail' );?>"><img src="<?php echo JURI::root();?>/images/M_images/emailButton.png" border='0' alt="<?php echo JText::_( 'E-mail' ); ?>" /></a><?php
        }
    }
    ?>
</div>


<?php
JHTML::stylesheet('tabs.css','components/com_hotproperty/views/property/tmpl/');
jimport('joomla.html.pane');


$pane = &JPane::getInstance('tabs');
echo $pane->startPane('test-tabs');
echo $pane->startPanel('Fotos', 'panel1');
?>
    <div id="hp_view_standard_photo_con1">
        <div id="hp_view_standard_photo_con2">
            <div id="hp_view_standard_photo_con3">
                <?php
                $filename = './xml/'.$this->p->id.'.xml';
                
                if ( !file_exists($filename))
                {            
                    $somecontent='<?xml version="1.0" encoding="utf-8"?>'."\n";
                    $somecontent=$somecontent.'<playlist version="1" xmlns="http://xspf.org/ns/0/">'."\n";
                    $somecontent=$somecontent."\t".'<trackList>'."\n\n";
                    
                    if (!empty($this->images))
                    {
                        foreach($this->images AS $image)
                        {
                            $somecontent=$somecontent."\t\t".'<track>'."\n";
                            $somecontent=$somecontent."\t\t\t<title>".$image->title."</title>\n";
                            $somecontent=$somecontent."\t\t\t".'<creator>Sérgio de Aguiar</creator>'."\n";
                            $somecontent=$somecontent."\t\t\t<location>".JURI::root().$hp_imgdir_standard.DS.(($image->standard <> '') ? $image->standard : $hp_img_noimage_thumb).'</location>'."\n";
                            $somecontent=$somecontent."\t\t".'</track>'."\n\n";
                        }
                        $somecontent=$somecontent."\t".'</trackList>'."\n";
                        $somecontent=$somecontent.'</playlist>';
                        touch($filename) or die("Unable to create: " . $filename);
                        $handle = fopen($filename, 'a') or die("Could not open file: " . $filename . "\n");
                        fwrite($handle, utf8_encode($somecontent)) or die("Could not write to file: " . $filename . "\n");
                        fclose($handle);
                    }
                }
                ?>
                <div id="flashcontainer"></div>
                <embed
                src="/includes/js/imagerotator.swf"
                width="400"
                height="300"
                allowscriptaccess="always"
                flashvars="file=<?php echo($filename); ?>&transition=blocks&shuffle=false&repeat=true&transition=random" />
            </div>
        </div>
    </div>

<?php
echo $pane->endPanel();
echo $pane->startPanel( 'Detalhes do Imóvel', 'panel2' );
?>

    <div class="hp_view_details">
        <?php
        foreach($this->p as $key => $value)
        {
            // if ( array_key_exists($key,$this->fields) && ($key <> 'name' && $key <> 'suburb' && $key <> 'state' && $key <> 'postcode' && $key <> 'country' &&	$this->fields[$key]->iscore == 1) ){
            if ( array_key_exists($key,$this->fields) && !in_array($key,array('name','suburb','state','postcode','country')) )
            {
                if ($key=="address")
                {
                    if (!$this->fields['address']->hideCaption)
                    { ?>
                        <span class="hp_caption"><?php echo $this->fields['address']->caption; ?></span>:<br />
                        <?php 
                    } ?>
                    <div id="hp_view_addr">
                        <?php
                        if (trim($this->p->address)!="")
                        {
                            echo $this->p->address . '<br />';
                        }
                        if ((trim($this->p->suburb)!='') && (trim($this->p->state)!='') && (trim($this->p->postcode)!=''))
                        {
                            echo $this->p->suburb . ', ' . $this->p->state . ', ' . $this->p->postcode . '<br />';
                        }
                        elseif ((trim($this->p->suburb)!='') && (trim($this->p->state)!=''))
                        {
                            echo $this->p->suburb . ', ' . $this->p->state . '<br />';
                        }
                        elseif ((trim($this->p->suburb)!='') && (trim($this->p->postcode)!=''))
                        {
                            echo $this->p->suburb . ', ' . $this->p->postcode . '<br />';
                        }
                        elseif ((trim($this->p->state)!='') && (trim($this->p->postcode)!=''))
                        {
                            echo $this->p->state . ', ' . $this->p->postcode . '<br />';
                        }
                        elseif ((trim($this->p->state)!=''))
                        {
                            echo $this->p->state . '<br />';
                        }
                        elseif ((trim($this->p->suburb)!=''))
                        {
                            echo $this->p->suburb . '<br />';
                        } 
                        elseif ((trim($this->p->postcode)!=''))
                        {
                            echo $this->p->postcode . '<br />';
                        }
                        if (trim($this->p->country)!='')
                        {
                            echo $this->p->country . '<br />';
                        }
                        ?>
                    </div>
                    <?php
                } // End if (address)
            
                if ($key=="price")
                {
                    if (isset($this->fields['price']))
                    {
                        if (!$this->fields['price']->hideCaption) { ?><span class="hp_caption"><?php echo $this->fields[$key]->caption; ?>: </span> <?php }
                        echo "<span class=\"hp_price\">".$this->fields["price"]->prefix_text.$hp_currency." ".number_format($this->p->price, $hp_dec_point, $hp_dec_string, ($hp_thousand_sep) ? $hp_thousand_string:'').$this->fields["price"]->append_text. "</span><br /> ";
                    }
                } // End if (price)
                
                elseif ($key=="type")
                {
                    if (isset($this->fields['type']))
                    {
                        if (!$this->fields['type']->hideCaption)
                        {
                            ?><span class="hp_caption"><?php echo $this->fields[$key]->caption; ?>: </span><?php
                        }
                        echo $this->p->type." <br /> ";
                    }
                } // End if (type)
                
                elseif ($key=="intro_text")
                {
                    if ($this->p->intro_text)
                    {
                        if (!$this->fields['intro_text']->hideCaption) { ?><span class="hp_caption"><?php echo $this->fields[$key]->caption; ?>: </span><?php } ?>
                        <p id="hp_view_intro_text"><?php echo $this->p->intro_text; ?></p>
                        <?php
                    }
                } // End if (intro_text)
                
                elseif ($key=="full_text")
                {
                    if ($this->p->full_text)
                    {
                        if (!$this->fields['full_text']->hideCaption)
                            { ?>
                                <span class="hp_caption"><?php echo $this->fields[$key]->caption; ?>: </span><?php
                            } ?>
                        <p id="hp_view_full_text"><?php echo $this->p->full_text; ?></p>
                    <?php
                    }
                } // End if (full_text)
                
                elseif ($key == "featured")
                {
                    if (!$this->fields[$key]->hideCaption)
                    {
                        echo '<span class="hp_caption">'.$this->fields[$key]->caption."</span>: ";
                    }
                    echo $this->fields[$key]->prefix_text . ( ($value == '1') ? JText::_( 'Yes' ) : JText::_( 'No' ) ) . $this->fields[$key]->append_text . "<br />";
                } // End if (featured)
                
                elseif ($key <> 'address' && $value != '')
                {
                    if (!$this->fields[$key]->hideCaption)
                    { ?>
                        <span class="hp_caption"><?php echo $this->fields[$key]->caption; ?>: </span><?php
                    }
                    
                    if ($this->fields[$key]->field_type == "checkbox" || $this->fields[$key]->field_type == "selectmultiple")
                    {
                    # Generate list
                    $olist = explode("|",$value);
                    echo "<ul class=\"olist\">\n";
                    foreach ($olist AS $ol) {
                    echo "<li>".$ol."</li>\n";
                    }
                    echo "</ul>\n";
                    }
                    elseif($this->fields[$key]->field_type == "link")
                    {
                        // Evaluate mambot style data
                        $value = str_replace( '{property_id}', $this->p->id, $value );
                        $value = str_replace( '{type_id}', $this->p->typeid, $value );
                        $value = str_replace( '{agent_id}', $this->p->agentid, $value );
                        $value = str_replace( '{company_id}', $this->p->companyid, $value );
                        $value = str_replace( '{Itemid}', $Itemid, $value );
                        
                        echo $this->fields[$key]->prefix_text;
                        $link = explode("|",$value);
                        if (count($link) == 1 && ( substr(trim($link[0]),0,4) == "http" || substr(trim($link[0]),0,5) == "index" ) )
                        {
                            ?><a <?php echo ($hp_link_open_newwin) ? 'target="_blank" ': ''; ?>href="<?php echo $link[0]; ?>"><?php echo $link[0]; ?></a><?php
                        }
                        elseif (count($link) > 1 && ( substr(trim($link[1]),0,4) == "http" || substr(trim($link[1]),0,5) == "index" ) )
                        {
                            ?><a <?php echo ($hp_link_open_newwin) ? 'target="_blank" ': ''; ?>href="<?php echo $link[1]; ?>"><?php echo $link[0]; ?></a><?php
                        }
                        else
                        {
                            echo $value;
                        }
                        echo $this->fields[$key]->append_text."<br />";
                    }
                    else
                    {
                        echo $this->fields[$key]->prefix_text.$value.$this->fields[$key]->append_text."<br />";
                    }
                }
            } // End if
        } // End foreach
        ?>
        <br class="clearboth" />
    </div>


<?php
echo $pane->endPanel();
echo $pane->startPanel( 'Corretor', 'panel3' );
?>

    <?php if ($hp_show_agentdetails && $hp_use_companyagent)
    { ?>
        
        <div id="hp_view_agent_title"><?php echo JText::_('Agent Title'); ?></div>
        <div id="hp_view_agent_con">
        <?php
        echo $this->loadTemplate('agent');
        ?>
        </div>
        <?php 
    } ?>

<?php
echo $pane->endPanel();
echo $pane->startPanel( 'Contato', 'panel4' );
?>

    <?php if ($hp_show_enquiryform && !$this->print)
    { ?>
        <br class="clearboth" />
        <div id="hp_view_agent_contact"><?php echo JText::_('Send enquiry / Make an appointment'); ?></div>
        <div id="hp_emailform_con">
        <?php echo $this->loadTemplate('contact'); ?>
        </div>
    <?php
    }
    if ($this->pop)
    {
        ?>
        <center><a href='javascript:window.close();'><span class="small"><?php echo JText::_('Close');?></span></a></center>
        <?php 
    } ?>

<?php
echo $pane->endPanel();
echo $pane->startPanel( 'Localização', 'panel5' );
?>
    <div width="100%" class="background-color: transparent;">
    <div id="gmap" style="width:100%; height:360px;">Carregando Mapa...</div>
    
    <?php
    $address = '';
    $address1 = '';
    
    if (trim($this->p->lat)!="")
    {
        if (trim($this->p->lon)!="")
        {
            $address = $address1.$this->p->lat.",".$this->p->lon;
        }
    }
    else
    {
        if (trim($this->p->endereco)!="") $address1 = $address1.$this->p->endereco;
        if (trim($this->p->suburb)!="") $address1 = $address1." ".$this->p->suburb;
        if (trim($this->p->address)!="") $address1 = $address1." ".$this->p->address ;
        //if (trim($this->p->postcode)!="") $address1 = $address1." ".$this->p->postcode;
        if (trim($this->p->state)!="") $address1 = $address1." ".$this->p->state;
        if (trim($this->p->country)!="") $address1 = $address1." ".$this->p->country;
        
        $address = $address1;
    }
    ?>
    
    <script type= "text/javascript"
    src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAlFVvwx3CoF5SNVcDkK_d_BRs9X2nbm7VOoWSAyihS9Fb5lEgdxT6t9Q4T3Zt3EtIFZIMmUpovnngBw&hl=US">
    </script>
    <script type= "text/javascript">
    
    _mPreferMetric=true;
    map = new GMap2(document.getElementById("gmap"), {draggableCursor:"crosshair"});
    var start = new GLatLng(-27.598368868573615,-48.56523513793945);
    map.setCenter(start, 14);
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.addMapType(G_PHYSICAL_MAP);
    map.enableGoogleBar();
    var marker = new GMarker(start);
    var geocoder = new GClientGeocoder();
    geocoder.getLocations("<?php echo $address; ?>", addToMap);
    
    function addToMap(response)
    {
        map.clearOverlays();
        //alert('<?php echo("/movies/".$prop[0]->id.".flv");?>');
        if (!response || response.Status.code != 200)
        {
            alert("Desculpe! Endereço inválido!: <?php echo $address ?>");
        }
        else
        {
            place = response.Placemark[0];
            if (place.AddressDetails.Country.CountryNameCode == "BR")
            {
                point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);
                map.setCenter(point, 14);
                marker = new GMarker(point);
                marker.bindInfoWindow('<object width="200" height="180"><embed src="/includes/js/mediaplayer.swf" width="200" height="180" allowscriptaccess="always" allowfullscreen="false" flashvars="file=<?php if (file_exists("movies/".$this->p->id.".flv")){echo("/movies/".$this->p->id);}else{echo ("/movies/nomovie");}?>.flv&autostart=false&searchbar=false" /></object>');
                map.addOverlay(marker);
            }
            else
            {
                var start = new GLatLng(-27.598368868573615,-48.56523513793945);
                map.setCenter(start, 14);
            }
        }
    }
    </script>
    
    </div>
    
<?php
echo $pane->endPanel();
echo $pane->endPane();
?>

</div>
  #2  
Old 09-06-2008, 05:47 PM
afdev afdev is offline
Mosets'd
 
Join Date: Jun 2007
Posts: 34
Smile

Without looking at the code this is amost certainly a CSS issue with IE7. IE7 does display some things differently to other browsers. First you will need to work out exactly how your styles are affecting the layout then when you have found the one that may be causing the problem you can open the CSS file in a text editor and add a line that is only read by IE7 (look on Google how to do this) this will not affect the layout in the other browsers but will correct the layout in IE7...so much for standardisation.!

Hope this helps.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +8. The time now is 07:56 PM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.