[Typo3-dev] Changes in class.tslib_fe.php
Kasper Skårhøj
kasper2004 at typo3.com
Fri Nov 26 13:30:13 CET 2004
Hi Andreas,
With next CVS update I have added this feature, slightly modified,
This is the description in TSref:
USERUID_substToken
string
The is the token
used on the page,
which should be
substituted with
the current users
UID IF a front-end
user is logged in!
If no login, the
substitution will
not happen.
This value has no
default value and
only if you
specify a value
for this token
will a
substitution
process take
place.
On Tue, 2004-11-16 at 15:06, Wengrzik, Andreas wrote:
> Hi Kasper and Core development,
>
> i have a feature Request for class.tslib_fe.
> Theres a part which declares the marker ###USERNAME###
> in fact of using extensions with UID i added some lines to the file to
> simply use a marker for the fe_user uid:
>
>
>
> /**
> * Determines if content should be outputted.
> * Outputting content is done only if jumpurl is NOT set.
> *
> * @return boolean Returns true if $this->jumpurl is not set.
> */
> function isOutputting() {
> return (!$this->jumpurl);
> }
>
> /**
> * Processes the output before it's actually outputted. Sends headers also.
> * This includes substituting the USERNAME comment, getMethodUrlIdToken, sending additional headers (as defined in the TypoScript "config.additionalheaders" object), tidy'ing content, XHTML cleaning content (if configured)
> * Works on $this->content
> *
> * @return void
> */
> function processOutput() {
> // Substitutes username mark with the username
> if ($this->fe_user->user['uid']) {
> $token = trim($this->config['config']['USERNAME_substToken']);
> $this->content = str_replace($token ? $token : '<!--###USERNAME###-->',$this->fe_user->user['username'],$this->content);
> }
>
>
> // Changes by me - START
>
> if ($this->fe_user->user['uid']) {
> $token = trim($this->config['config']['UID_substToken']);
> $this->content = str_replace($token ? $token : '<!--###LORDUID###-->',$this->fe_user->user['uid'],$this->content);
> }
>
> // Changes by me - END
>
>
>
>
>
> So maybe you can include it - sure with another marker - into the next release? Or you say STOP this is not what we want ?
>
> Just my two cents for a new 'feature' ;)
>
> Go on with your great work!
>
> bye & Thanks
> andy w.
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
--
- kasper
----------------
Man søger fred i rigdom, glans og ære
og tænker: Hvad kan hjertet mer begære?
men dybt derinde bor den samme længsel,
og hjertet græder i sit gyldne fængsel.
More information about the TYPO3-dev
mailing list