Mailing List Archive

Get Current User
Hi all,

Is there a way to retrieve the current user name with wiki-syntax, like
so: {{USER}} ( returning: "User:Rolf Lampa" )

Regards,

// Rolf Lampa

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Get Current User [ In reply to ]
Rolf Lampa wrote:
> Hi all,
>
> Is there a way to retrieve the current user name with wiki-syntax, like
> so: {{USER}} ( returning: "User:Rolf Lampa" )
>
> Regards,
>
> // Rolf Lampa

No, as that would break caching.
It's available for javascript as wgUserName, though.


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Get Current User [ In reply to ]
Platonides skrev:
> Rolf Lampa wrote:
>
>> Is there a way to retrieve the current user name with wiki-syntax, like
>> so: {{USER}} ( returning: "User:Rolf Lampa" )
>>
>
> No, as that would break caching.
>

Ah, you only regard use for Wikipedia... =). I use MW also for many
small sites where I'ld have very good use of such a feature.

> It's available for javascript as wgUserName, though.
>

That'll do, I think. Thx.

// Rolf Lampa
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Get Current User [ In reply to ]
Thats why things like that are extensions:
http://www.mediawiki.org/wiki/Extension:UserFunctions

~Daniel Friesen(Dantman) of:
-The Gaiapedia (http://gaia.wikia.com)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
-and Wiki-Tools.com (http://wiki-tools.com)

Rolf Lampa wrote:
> Platonides skrev:
>
>> Rolf Lampa wrote:
>>
>>
>>> Is there a way to retrieve the current user name with wiki-syntax, like
>>> so: {{USER}} ( returning: "User:Rolf Lampa" )
>>>
>>>
>> No, as that would break caching.
>>
>>
>
> Ah, you only regard use for Wikipedia... =). I use MW also for many
> small sites where I'ld have very good use of such a feature.
>
>
>> It's available for javascript as wgUserName, though.
>>
>>
>
> That'll do, I think. Thx.
>
> // Rolf Lampa
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Get Current User [ In reply to ]
- Ahh... perfect! Thank you very much, this is exactly what I need!

// Rolf Lampa


DanTMan skrev:
> Thats why things like that are extensions:
> http://www.mediawiki.org/wiki/Extension:UserFunctions
>
> ~Daniel Friesen(Dantman) of:
> -The Gaiapedia (http://gaia.wikia.com)
> -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
> -and Wiki-Tools.com (http://wiki-tools.com)
>
> Rolf Lampa wrote:
>
>> Platonides skrev:
>>
>>
>>> Rolf Lampa wrote:
>>>
>>>
>>>
>>>> Is there a way to retrieve the current user name with wiki-syntax, like
>>>> so: {{USER}} ( returning: "User:Rolf Lampa" )
>>>>
>>>>
>>>>
>>> No, as that would break caching.
>>>
>>>
>>>
>> Ah, you only regard use for Wikipedia... =). I use MW also for many
>> small sites where I'ld have very good use of such a feature.
>>
>>
>>
>>> It's available for javascript as wgUserName, though.
>>>
>>>
>>>
>> That'll do, I think. Thx.
>>
>> // Rolf Lampa
>>

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l