Tt address
Aus LagoWiki
Gabriel (Diskussion | Beiträge)
(Die Seite wurde neu angelegt: <p>The Following files are changes in the tt_address to meet the requirements.<br> 1) ext_tables.sql<br> 2) pi1/class.tx_ttaddress_pi1.php<br> 3) tca.php<br> 4)...)
Zum nächsten Versionsunterschied →
Aktuelle Version
The Following files are changes in the tt_address to meet the requirements.
1) ext_tables.sql
2) pi1/class.tx_ttaddress_pi1.php
3) tca.php
4) res/default_hcard.htm
1) ext_tables.sql
Problem: Sorting is not working on zip filed of tt_address due to varchar data type so we have changed it to int(5) .
2) pi1/class.tx_ttaddress_pi1.php
In pi1 class.tx_ttaddress_pi.php we have done the shorting only on the zip code and we comments the original sorting of the tt_address as shown below
// sorting the addresses
//$sortBy = array();
//foreach($addresses as $k => $v) {
// $sortBy[$k] = $v[$this->conf['sortByColumn']];
// }
// array_multisort($sortBy, $this->conf['sortOrder'], $addresses);
And also change the following line to remove the, from the front of zip code
$markerArray['###ZIP###'] = substr_replace($lcObj->stdWrap($address['zip'],$lConf['zip.']),"",0,1); at line no:343
The original was:
$markerArray['###ZIP###'] = $lcObj->stdWrap($address['zip'], $lConf['zip.']);
3) tca.php
In tca.php we have change the following this :
$TCA['tt_address']['ctrl']['default_sortby'] = 'ORDER BY zip';
At the line number 394 for the sorting purpose according to the ZIP code
4) res/default_hcard.htm
In res/default_hcard.htm we have change the html according to the http://stromeyer.lagopixel.de/5.html site
The original was :
<!-- ###TEMPLATE_ADDRESS### beginn -->
<div class="vcard">
###IMAGE###
<!-- ###SUBPART_URL### begin -->
###FIRSTNAME### ###MIDDLENAME### ###LASTNAME###
<!-- ###SUBPART_URL### end -->
###ORGANIZATION###
###EMAIL###
<!-- ###SUBPART_ADR### begin -->
<div class="adr">
###ADDRESS###
###CITY### ###REGION### ###ZIP### ###COUNTRY###
</div>
<!-- ###SUBPART_ADR### end -->
###PHONE###
</div>
<!-- ###TEMPLATE_ADDRESS### end -->
And we have changed it to the following lines:
<!-- ###TEMPLATE_ADDRESS### beginn -->
<div style="width:24%;float:left;height:108px;">
<div><b>###ZIP### ###CITY###</b></div>
<div><!-- ###SUBPART_URL### begin -->###FIRSTNAME### ###MIDDLENAME### ###LASTNAME###<!-- ###SUBPART_URL### end --></div>
<div> <!-- ###SUBPART_ADR### begin -->###ADDRESS###<!-- ###SUBPART_ADR### end --></div>
<div style="float:left;">Tel. </div> ###PHONE###
</div>
<!-- ###TEMPLATE_ADDRESS### end -->
Note: form en.lagoxiki.com