Coder Social home page Coder Social logo

friendsoftypo3 / tt_address Goto Github PK

View Code? Open in Web Editor NEW
38.0 14.0 73.0 2.26 MB

Add address / contact datasets to your content management system.

License: GNU General Public License v2.0

PHP 79.19% HTML 9.79% CSS 5.63% JavaScript 5.14% Makefile 0.25%
typo3-extension typo3-cms-extension address

tt_address's Introduction

Latest Stable Version TYPO3 12 TYPO3 11 Total Downloads Monthly Downloads StyleCI Coverage Status Donate

TYPO3 extension tt_address

The basic aim of this extension is to store address and contact data and to output those in various ways:

  • Selection based on categories and sysfolder
  • Manual selection with custom sorting
  • List & detail view
  • Various map views including Leaflet, Google Maps and static Google Maps
URL
Repository: https://github.com/FriendsOfTYPO3/tt_address
Read online: https://docs.typo3.org/p/friendsoftypo3/tt-address/main/en-us/
TER: https://extensions.typo3.org/extension/tt_address

Version matrix

8.x 7.x 6.x 5.x 4.x 3.x
TYPO3 12 yes yes no yes no no
TYPO3 11 yes yes yes yes no no
TYPO3 10 no no yes yes no no
TYPO3 9 no no no yes yes no
TYPO3 8 no no no no yes yes
TYPO3 7 no no no no no yes

Active support is only provided for the latest major version.

tt_address's People

Contributors

alexander-nitsche avatar ayacoo avatar bastianbalthasarbux avatar bmack avatar bucheggeronline avatar caplod avatar christophlehmann avatar chriwo avatar derhansen avatar froemken avatar georgringer avatar halbkreativ avatar hawkeye1909 avatar irnnr avatar kartolo avatar liayn avatar linawolf avatar lolli42 avatar lorenzulrich avatar marcobiedermann avatar mediaessenz avatar neufeind avatar nicodh avatar ohader avatar patta avatar peter-neumann-dev avatar rtoenjes avatar sorenmalling avatar tantebootsy avatar teisi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tt_address's Issues

Treeview Missing

Hi,

since the Update the treeview is missing

include_once(/var/www/vhosts/xxx.de/httpdocs/typo3conf/ext/tt_address/class.tx_ttaddress_treeview.php): failed to open stream

Is there any Document that shows how to migrate to version 3?

Brandnew installation of tt_address version 3.2.1 on a TYPO3 CMS version 8.5.1 gets blank result page

If you install a brandnew TYPO3 CMS version 8.5.1 with the actual EXT_ttaddress version 3.2.1, which is marked as "stable" there are no results in FE and only a blank page. Is this version really TYPO3 version 8 compatible? I dubt it. Also a lot of labels of the fields in the BE in the list view are missing.

Are there any plans concerning adapting and fixing this EXT:?

Thanks for feedback.

Regards,
Angelo

e-mail is no anchor tag if i change the template

If i add a second template and select the new template in the plugin (so not using the default) the e-mail address is no longer rendered as an separate html tag (<a>), it is only text.

The new template uses the same code as the default template.

EXT:tt_address: 3.2.2
TYPO3: 7.6.22

Replace the TCA for www with the inputLink for v8

Suggestion would be:

    'www' => [
        'label' => $generalLanguageFilePrefix . 'locallang_general.xlf:LGL.www',
        'config' => [
            'type' => 'input',
            'renderType' => 'inputLink',
            'eval' => 'trim',
            'size' => '20',
            'max' => '255',
            'softref' => 'typolink,url',
            'fieldControl' => [
                'linkPopup' => [
                    'options' => [
                        'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel',
                        'blindLinkOptions' => 'mail,file,spec,folder',
                        'windowOpenParameters' => 'height=600,width=800,status=0,menubar=0,scrollbars=1',
                    ],
                ],
            ],
        ],
    ],

But don't know how to handle the compatibility issue with < 8

Document address record fields

When evaluating address extensions, it's helpful to know which fields an address record contains.

This should be listed in the manual (or a screenshot of the backend).

Template code is not fetched

If you use helhum/typo3secure-web to secure your TYPO3 CMS installation and have public assets in root only, the template code is not fetched anymore.

This happens because \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::fileResource generates a relative file path like typo3conf/ext/tt_address/Resources/Public/LegacyPluginTemplate/default.html (that file does even work because the Public folder is linked in your web root). Using an own template having it in a Private folder, doesn't return any code as it isn't found in the current working directory (which IMHO is the public web directory). Using file_get_contents with an absolute path solves this problem.

Sorting

Hi, sorting with TS is not possible. In class.tx_ttaddress_pi1.php on line 178-187 the parameter $sortOrder gets always the value from the flexform, because the flexformfield "sortOrder" has the default value "ASC". So it would be better to make an empty default value in the flexform, to be able to sort from TS and flexform.

				<sortOrder>
					<TCEforms>
						<label>LLL:EXT:tt_address/pi1/locallang_ff.xml:pi1_flexform.sortOrder</label>
						<config>
							<type>select</type>
							<items type="array">
								<numIndex index="0" type="array">
									<numIndex index="0"></numIndex>
									<numIndex index="1"></numIndex>
								</numIndex>
								<numIndex index="1" type="array">
									<numIndex index="0">LLL:EXT:tt_address/pi1/locallang_ff.xml:pi1_flexform.sortOrder.ascending</numIndex>
									<numIndex index="1">ASC</numIndex>
								</numIndex>
								<numIndex index="2" type="array">
									<numIndex index="0">LLL:EXT:tt_address/pi1/locallang_ff.xml:pi1_flexform.sortOrder.descending</numIndex>
									<numIndex index="1">DESC</numIndex>
								</numIndex>
							</items>
							<default></default>
						</config>
					</TCEforms>
				</sortOrder>

[BUG]: Loading wrong images/files on TYPO3 v8 due to cObject->IMAGE changes

With tt_address 3.2.2 and Typo3 8.7.2 I had problems with the images. It seemed that random files (including PDFs etc.) were loaded instead of the corresponding images. I have managed to fix this by replacing 'data' => 'file:current:uid' with 'data' => 'file:current:uid_local' in tt_address/pi1/class.tx_ttaddress_pi1.php line 393.
Is this a bug or did I miss somthing?

Update icons

  • extension icon
  • record tt_address icon
  • content element wizard

Define latitude and longitude as DECIMAL

Hi,

latitude and longitude should be defined as DECIMAL in MySQL.
MySQL does not work properly with lomg numbers defined as FLOAT.

At last this ends in an error-message in TYPO3-Backend:
"These fields of record *** in table "tt_address" have not been saved correctly: latitude, longitude! The values might have changed due to type casting of the database."

(So long as latitude and longitude are shown in the backend by TCA ;-)).

Thank you!

Bug: treatIdAsReference is not respected due to wrong type

When rendering the FILES content object, all typoscript configuration values that are not of type array or string are ignored (see TYPO3\CMS\Core\TypoScript\TypoScriptService->explodeConfigurationForOptionSplit). Some parameters in the typoscript configuration for the image rendering are declared as integers in PHP. They should be changed to string values. Otherwise image rendering is broken, as image reference UIDs are treated as file UIDs.

Image problems after tt_address upgrade 3.2.2->3.2.3 in 7.6.29

Hello,
I updated tt_address today and my vcard-Images were gone/mixed in Frontend. Something is not working right.
Most images were gone, one was showing a wrong image. In Backend everything was right.
I reinstalled 3.2.2, and everything was ok again, but maybe it's good to know.
with the best regards,
Sabine

Update wizard missing in 6.2.17

On a typo3 6.2.17 (php 5.5.31), the update wizard for address groups is missing.

The update wizard for images is included and works as it should do.
But the one for migrating address groups is missing at all.

Reason is not a bug in the updater, but a bug when including it in ext_localconf.php, as the same hook is used twice and the second one overrides the first. The keys have just to be made unique:

// Update scripts
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tt_address_group'] = 'TYPO3\\TtAddress\\Updates\\AddressGroupToSysCategory';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tt_address_group'] = 'TYPO3\\TtAddress\\Updates\\ImageToFileReference';

Problem with combined name field

Hello,

as suggested, a repost on github:

We observed a little problem with the auto created "name" field:

Behaviour now: If you clear the other three name fields (first/middle/last) and save, then the "name" field stays filled with the previous content.

Should be: If you clear the other three name fields (first/middle/last) and save, then the "name" field should be cleared as well.

Can be tested with any address entry in the backend, with version 3.2.1.

[Moved from forge] Use xliff for translations (turn locallang.xml into locallang.xlf)

This has been moved manually from forge.typo3.org (originated by Stefan Neufeind)

Description:
xliff is used since quite a while now. I'm not sure if it's maybe even mandatory for using translation.typo3.org for this extension.

In this step maybe also move the translation-files to their "new" home - Extbase-like hierarchy: Resources/Private/Language/

Cant overwrite email function in typoscript

Hi, I'm pretty new to Typo3 and tried to over write some functions.

1.) I just want this extension to give me the plin text I type in in the fields.
So when I type in (in field Mail) "[email protected]" i also want to set the value of the Marker ###EMAIL### to be "[email protected]" and not:
<a href="mailto:[email protected]" class="email" item="email">[email protected]</a>

So my question is: how can I overwrite this function in a way which is still working when I update the extension? (editing "ext/tt_address/static/pi1/setup.txt" worked but will get overwritten at the next update)

I already tried overwriting this function by setting the values to other values in typoscript but it did not work.

email {}

email.typolink.ATagParams = class="btn btm-primary" email.typolink.parameter.field = normal

email.wrap = <a href="mailto:|" class="btn btn-primary"><i class="glyphicon glyphicon-envelope"></i>E-Mail</a>

2.) Every template gets wraped in a div with the class "tx-tt_address-pi1" to avoid this, I also had to edit the Main function.. is there any other way to solve this problem, as It kills my design if there is another div between? Is there maybe a option or a way to overwrite it?

3.) I'm running on Typo3 8.7.15 and Pictures does not get shown in the frontend.. tried many formates (.svg, .png, .jpg..) but none of them get shown in the frontend, even after reinstalling the Extension and resetting the Typoskript. Just made a clean install just to test this, but its not working.

Thank you very much in advance

Best regards,
Martin

Feature: support strings in placeholderImage

We have a specific use case where we use SVG sprites and we want to use a sprite image as fallback.

For this we have to use some <svg ...></svg> as output but so far placeholderImage just supports paths.

No image [bugfix for TYPO3 8]

In TYPO3 8, in class.tx_ttaddress_pi1.php line 394, this MUST be:

'data' => 'file:current:originalUid'

Otherwise no image will be shown.

Birthday always required in TYPO3 8 [SOLUTION]

You always have to insert a birthday in TYPO3 8, otherwise you get a mysql error with strict mode on.

Solution, if you do not need birthday... overwrite TCA with TCA/Overrides/tt_address.php

$GLOBALS['TCA']['tt_address']['palettes']['contact']['showitem'] = 'email, --linebreak--,phone, fax, --linebreak--,mobile, --linebreak--,www, --linebreak--,';

remove pidList from getSingleRecords()

hi,

maybe it's more a question as an issue.
This is the DB Query for singleRecords

            $addresses = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                '*',
                'tt_address',
                'uid IN(' . $uidList . ') ' . (!empty($this->conf['pidList']) ? ' AND pid IN (' . $this->conf['pidList'] . ')' : '')
                . $this->cObj->enableFields('tt_address')
            );

why you ask for pidList, uid should be enough as unique identifier. or not?
Problem is, if you don't set a pidList in TS or Flexform the pidList is set to $GLOBALS['TSFE']->id in init()

  $pages = $pages ?
            implode(GeneralUtility::intExplode(',', $pages), ',') :
            $GLOBALS['TSFE']->id;

so in the DB Query there is always a pidList and you must set the correct pidList if you only want to use singleRecords, it's very confusing for an integrator.

best regards
Sven

Trouble rendering image from tt_address record in Typo3 7.6.5 LTS

Hi,

I upgraded a typo3 Installation of mine for 4.5.x to 7.6.5. I am rendering tt_address objects within a page, showing the associated image. In 4.5.x this worked fine with the following typoscript:

SNIPPET:

10 = IMAGE
10.file.import = uploads/pics/
10.file.import.field = image
10.file.import.listNum = 0
10.file.width = {$content.tt_address.image.width}
10.wrap = |

Now, this doesn't render anything useful anymore. I think, the image is no longer located in the tt_address table (using tt_address 3.0.3), but somehwere else.

Can you help and explain, how to render the image from tt_address records now?

Thanks in advance, Manfred

Missing function: Localize records

Hello,
currently it's not possible to localize records. Is it planned to provide this function?
How it is supposed to handle it currently?

Best regards
Evelyn

Typo3 9.x compatibility

The current version tt_address 3.2.3 seems to be incompatible with Typo3 9.3.3:

  • not marked as compatible (can be overridden without white page of death)
  • when creating a content element, Typo3 takes ages and times out when tt_address is enabled

Are there plans to make tt_address compatible with Typo3 9.x? Maybe I can help.

contact-values (country, city...) from direct_mail_subscription not being saved into tt_address

I have the following setup:

Typo3 7.6.15
tt_address 3.2.2
direct_mail 5.2.0
direct_mail_subscription 2.0.4

I wanted to add the field "country" to the subscription-page so I added the following to my template:

<label for="fe_ttaddress_country_input" id="label-fe_ttaddress_country">Country*</label>
<select class="form_dropdown" name="FE[tt_address][country]" id="fe_ttaddress_country_input" style="text-align-last:center">
     <option value selected disabled>--Choose--</option>
     <option value="inland">some country</option>
     <option value="abroad">others</option>
</select>

To my constants as well to my setup on the subscription-page-template I've added the following:

plugin.feadmin.dmailsubscription.create.fields = last_name, first_name, title, country, hidden, email, module_sys_dmail_html
plugin.feadmin.dmailsubscription.create.required = title, country, last_name, first_name, email
plugin.feadmin.dmailsubscription.edit.fields = last_name, first_name, title, country, hidden, email, module_sys_dmail_html
plugin.feadmin.dmailsubscription.edit.required = title, country, last_name, first_name, email

(I had to add them in both constants and setup; if missing in constants the title is not being saved in tt_address, if missing in setup, the error message "this field is required" is shown on the subscription page.)

The field is being shown but the value from the country-select is not being transmitted to the tt_address table in the database.

With the title I did exactly the same and it works like a charm.

I've seen a solution to this problem (I don't seem to be the only one with this issue) but this would require to install kickstarter and extend the tt_address extension. As I'm quite a freshman to typo3 (especially to the configurations) this seems to be rather difficult when the solution could be so easy.

The issue doesn't only seem to apply to the country field but to almost all fields in the address-group of the contacts-tab from tt_address.

Am I missing something or does this really not work? Is there a way (other than extending the extension) to achieve adding a country to the subscription?

I would be grateful for any pointers or help.

Greetings, Kathara

typoscript resources wrong(?) parameter (EDIT: aka IMAGE Problem on T3 v8)

in typo3 8lts
in getItemMarkerArray function:
'file.' => array(
'height' => $height.'c',
'import.' => array(
'data' => 'file:current:uid'
),
gives me the wrong relations, i have to use
'file.' => array(
'height' => $height.'c',
'import.' => array(
'data' => 'file:current:originalUid'
),

greetings
jochen

Improve Frontend

  • Use bootstrap instead of custom HTML
  • Remove custom css
  • Check what is used by old plugin

Style selection not working after updating to 3.0.0 (from 3.0.0dev)

Hi.

I run into an issue since the style selection isn't working anymore. I debugged it an there seems to be an issue within the AbstractFilesToSelector.php (line 37).

So I changed the line from

$thePageId = $params['row']['pid'];

to

$thePageId = $params['flexParentDatabaseRow']['pid'];

to get the Template-Files within our fileadmin/... subfolder shown again.
We are not aware if this is the right way, but it seems the first entry isn't providing the page id it should.

Can someone confirm the usage is right or let me know how to change it right?

Regards
RM

[CLEANUP] Rename property linkedin in Domain

Property linkedin is spelled "linkedIn" in the domain model, but "linkedin" in database.
Therefore a mapping is necessary in ext_typoscript_setup.txt

Just rename the property and its getter/setter in the domain model, so the mapping is not needed anymore.

Markers using tt_address and sys_category

Added by Volker Burggräf

moved from: https://forge.typo3.org/issues/75940

When selecting a category to display the markers of a bunch of tt_address records, the following error appears in the page instead of the map:

"Oops, an error occurred! Code: 2016042710595178ef3d25"

The "code" apparently consists of the current timestamp (20160427105951) and a random string of 8 chars.

Wenn using only single tt_address recores, the map works, but as soon as I add a "category", the error appears.

Exception if sort_by is empty

If settings.sortBy is not set there is an exception Unknown column 'tt_address.single_selection' in 'order clause'.

Tested with TYPO3 9.5.2-dev and tt_address commit ca74c7d

Drop old plugin

  • remove from settings
  • remove code itself
  • remove update wizard 2 versions later

Change TCA for Mysql strict Mode

When MySQL is in strict Mode, TCA fields need some modifications.
For example the field Birtday needs the following changes:
From:
'eval' => 'date',

To:
'eval' => 'datetime,int',

Also there should be a default => 0 for all fields

At least this has to be done to birthday and `sys_language_uid' to make it work on TYPO3 8.7 and MySQL in strict mode which is default from MySQL 5.7

v3.0.0: variable type issue in tx_ttaddress_pi1.php ($spConf['hasOneOf'] is not of type array)

Hi dears,
as far as I see, in

EXT::/pi1/tx_ttaddress_pi1.php
at line 461 you treated the $spConf variable as an Array - but it isn't.

Though the 'hasOneOf' configuration option does not work.
I changed
if ($spConf['hasOneOf'] && !$this->hasOneOf($spConf['hasOneOf'], $address)) {
to
if($spName === 'hasOneOf' && !$this->hasOneOf($spConf,$address)) {
and all works fine.

HTH
Tom.

Import from old categories

Added by Alex Kellner

from https://forge.typo3.org/issues/77146

Currently we're doing a large migration and within this project, we want to migrate from tt_adddress 2.3.5 to 3.0.3.
Because of some valid reasons we call your update script from a CommandController, what basicly works like a charm.

Nevertheless, there are 2 or 3 categories that are throwing an exception when trying to import.
This may happen because the customer has strange datamanagement and I'm not sure why this categories are failing with:

array(4 items)
  caller => "TYPO3\CMS\Core\Database\DatabaseConnection::exec_UPDATEquery" (60 chars)
  ERROR => "You have an error in your SQL syntax; check the manual that corresponds to y
     our MySQL server version for the right syntax to use near '' at line 1" (146 chars)
  lastBuiltQuery => "UPDATE sys_category SET parent='67' WHERE uid=" (46 chars)
  debug_backtrace => "call_user_func#27 // {closure}# // TYPO3\CMS\Backend\Console\Application->ru
     n#26 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#73 // TYPO3\CMS\Backend
     \Console\CliRequestHandler->handleRequest#302 // call_user_func#69 // TYPO3\
     CMS\Core\Cache\Backend\SimpleFileBackend->{closure}# // TYPO3\CMS\Extbase\Co
     re\Bootstrap->run#154 // TYPO3\CMS\Extbase\Core\Bootstrap->handleRequest#193
      // TYPO3\CMS\Extbase\Mvc\Cli\RequestHandler->handleRequest#206 // TYPO3\CMS
     \Extbase\Mvc\Dispatcher->dispatch#91 // TYPO3\CMS\Extbase\Mvc\Controller\Com
     mandController->processRequest#86 // TYPO3\CMS\Extbase\Mvc\Controller\Comman
     dController->callCommandMethod#139 // call_user_func_array#257 // In2code\In
     2template\Command\ImportCommandController->ttAddressGroupsImportCommand# //
     TYPO3\TtAddress\Updates\AddressGroupToSysCategory->performUpdate#91 // TYPO3
     \TtAddress\Updates\AddressGroupToSysCategory->updateParentFieldOfMigratedCat
     egories#103 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_UPDATEquery#
     264 // TYPO3\CMS\Core\Database\DatabaseConnection->debug#268" (1048 chars)

A simple solution is to typecast two variables in \TYPO3\TtAddress\Updates\AddressGroupToSysCategory::updateParentFieldOfMigratedCategories():

$sysCategoryUid = (int)$oldNewCategoryUidMapping[$row['uid']];
$newParentUid = (int)$oldNewCategoryUidMapping[$row['parent_group']];

Improve documentation

  • New config of extbase plugin
  • add tsconfig to extend templatelayout
  • update screenshots
  • write about template overloading
  • bugfixing:
    • unit & functional tests
    • travis & coveralls
    • github & issue templates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.