[TYPO3-english] extending livesearch in BE
Philipp Gampe
philipp.gampe at typo3.org
Wed Aug 8 17:34:50 CEST 2012
Hi Peter,
Peter Jaraczewski wrote:
> Hi all,
>
> is there a possibility to extend/override the functionality of
> livesearch in BE? In a project of mine there are some fe_users which
> usernames contain only integer values f.e. 106000 (which is a
> corresponding customer number). Livesearch performs a search only on uid
> and pid fields and on fields which TCA eval contains int.
What version of TYPO3? The search fields must be explicitly defined in newer
versions.
> My first try was to extend the eval with int by putting the following
> line into extTables.php:
>
> $GLOBALS['TCA']['fe_users']['columns']['username']['config']['eval'] =
> 'nospace,uniqueInPid,required ,int';
>
> livesearch works as expected then, but this makes it impossible to have
> usernames with strings as well :-/
> So, how can i extend/subclass the livesearch to keep my project
> updateable?
The easiest way is to use a git checkout and keep your changes in an own git
branch.
Then you just need to rebase into the update and git will show all conflics
on updating. On top of it, you can tell git to automatically resolve
conflicts if possible.
Have a look at git rerere if out really want to go this way. But for TCA
changes, it is better to write a small extension that does the change, so
that the core can stay unmodified.
Note: There are instructions in the wiki on how to share the object database
between different branch repositories (multiple branch setup) if you want to
use git for different projects.
Best regards
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – linkvalidator
TYPO3 .... inspiring people to share!
More information about the TYPO3-english
mailing list