X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/acc3a2b53f346ea22ec4ba097bcf718f8df2460f..4c9ded61db6baf9a5cbd7342055b9ad783ca2351:/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index 51b91d30d..be9854a08 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -11,4 +11,26 @@ Xan. > ?>` in all the relevant ikiwiki [[templates]] and arrange for the > generated HTML pages to get run through the PHP interpreter. The trick > would work differently with other [[plugins/type/auth]] plugins, -> if at all. +> if at all. --[[Schmonz]] + +>> Thanks a lot, Xan. + +>>> Another possible trick would be to use some Javascript to make a +>>> "who am I?" AJAX request to the CGI (the CGI would receive the +>>> session cookie, if any, and be able to answer). Obviously, this +>>> wouldn't work for users who've disabled Javascript, but since it's +>>> non-essential, that's not so bad. You'd need to +>>> [[write_a_plugin|plugins/write]] to add a suitable CGI action, +>>> perhaps ?do=whoami, and insert the Javascript. --[[smcv]] + +>>>> It's an idea, but you're trading off a serious speed hit for a very +>>>> minor thing. --[[Joey]] + +>>>> Cool idea. A similar trick (I first saw it +>>>> [here](http://www.peej.co.uk/articles/http-auth-with-html-forms.html)) +>>>> could be used to provide a [[plugins/passwordauth]]-like login form +>>>> for [[plugins/httpauth]]. --[[Schmonz]] + +>>>>> I always assumed the entire reason someone might want to use the +>>>>> httpauth plugin is to avoid nasty site-specific login forms.. +>>>>> --[[Joey]]