[TYPO3-UG Oesterreich] Intranet-Seiten markieren

Gregor Weissmann gregor.weissmann at boku.ac.at
Mon May 22 15:31:01 CEST 2006


Allerbesten Dank,
genau das hab ich gesucht.

thx,
lg
Grey

Wolfgang Klinger wrote:
>  Hallo!
> 
>  Gregor Weissmann schrieb folgendes am 19.05.2006:
>> ich hab mal wieder ein kleines TypoScript - Problemchen:
>> ich würde gern, falls eine Seite irgendwelche Access-Einstellungen
>> gesetzt hat (man also eingeloggt sein muss, um sie zu sehen) ein
>> zusätzliches Content-Element zur Seite hinzufügen ('Sie sind im
>> Intranet-Bereich'), nur leider hab ich bisher keine Lösung gefunden,
>> vielleicht hat ja wer eine Idee.
> 
>  Folgendes in eine kleine Extension oder in ein eigenes Skript packen:
> ----------------
> /***************************************************************
> *  Copyright notice
> *
> *  (c) 2006 Wolfgang Klinger (wolfgang at stufenlos.net)
> *  (c) 2006 Blauensteiner & Klinger OEG (crew at stufenlos.net)
> *  All rights reserved
> *
> *  This script is part of the TYPO3 project. The TYPO3 project is
> *  free software; you can redistribute it and/or modify
> *  it under the terms of the GNU General Public License as published by
> *  the Free Software Foundation; either version 2 of the License, or
> *  (at your option) any later version.
> *
> *  The GNU General Public License can be found at
> *  http://www.gnu.org/copyleft/gpl.html.
> *
> *  This script is distributed in the hope that it will be useful,
> *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> *  GNU General Public License for more details.
> *
> *  This copyright notice MUST APPEAR in all copies of the script!
> ***************************************************************/
> 
> class user_tools {
>     function access_group_required($content, $conf) {
>         global $TSFE;
> 
>         $group_required = false;
>         $page_rootline = $TSFE->rootLine;
>         if (is_array($page_rootline)) {
>             foreach ($page_rootline as $page) {
>                 if (($page['uid'] == $TSFE->id && $page['fe_group'] != 0) ||
>                     ($page['extendToSubpages'] != 0 && $page['fe_group'] != 0)) {
> 
>                     $group_required = true;
>                     break;
>                 }
>             }
>         }
> 
>         return $group_required;
>     }
> }
> ----------------
>  (kannst du noch erweitern, falls du bestimmte Gruppen abfragen willst)
>  
>  und im TypoScript:
> ----------------
> lib.something = TEXT
> lib.something.value = Diese Seite ist eingeschränkt sichtbar
> lib.something.if.isTrue.cObject = USER
> lib.something.if.isTrue.cObject.userFunc = user_tools->access_group_required
> ----------------
> 
>  enjoy!
> 
> 
>  lg
>  Wolfgang
> 



More information about the TYPO3-at mailing list