[pmwiki-users] Function in .tmpl file (Repost)

Thomas Lederer celok at gmx.net
Mon Mar 27 09:39:42 CST 2006


Hmm... another step... if i want to produce the real name i used to use
"echo"... therefore it is spit out at runtime, and so before the page
was shown... now if i use "return" the page is fine, but the
<!--function:LDAPRetrieval $LastModifiedBy --> doesnt work anymore....
it did with "echo"...

any ideas?

-- 
Tom

Thomas Lederer schrieb am 27.03.2006 16:53 Uhr:
> Thanks Dominique,
> 
> i am halfway there :)
> 
> 2 Problems:
> - If i request {$Author} it works (cause it is a variable from the page
> i assume), but with {$AuthID} it doesn't.
> - and second, it prints its result before anything else, i.e. before
> <!DOCTYPE.... it should however print the result at the position it is
> in the page... is this an error from my script?
> 
> Regards,
> Tom
> 
> Dominique Faure schrieb am 27.03.2006 14:38 Uhr:
>> On 3/27/06, Thomas Lederer <celok at gmx.net> wrote:
>>> Hi there,
>>> without urging anyone, maybe here could someone help me code this :)
>>>
>>> The plan would be to call a function with $AuthID as argument, and being
>>> able to use a new variable $RealLDAPName (or something) as well in a
>>> Template file or a WikiPage.
>>>
>>> Is that possible?
>>>
>> Make it a specific markup directive. Add something like below into
>> your php file:
>>
>> Markup('LdapRealName', 'directives',
>>      '/\\(:LdapRealName (.*?):\\)/e',
>>      "LDAPRetrieval(\$pagename,PSS('$1'))");
>>
>>
>>
>> Regards,
>> Dom
>>
>>
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
> 
> 




More information about the pmwiki-users mailing list