This is something I’ve kept meaning to do but never got around to implementing – using PHP instead of JavaScript for managing TypeKey user information on the comments forms.
The current method is, to me, a bit of a hack. It involves calling a CGI script to read a cookie which checks to see if the user is signed in, and then some document.write() statements to vary the look of the comment form depending on whether the user is signed in to TypeKey or not. This can all be done using PHP.
Update: PHP-TypeKey is now located here.
Related Posts:
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License.
November 18, 2004 at 04:53
PHP TypeKey
PHP TypeKey…
November 18, 2004 at 09:23
Great work, I implemented it and the pages are loading super fast now compared to before. You may just want to change the script above, in dynamic templating mode, you can’t use <? you’ll need to use <?php
Also this doesn’t seem to work properly in dynamic publishing mode because MTRemote tags are being taken literally, I’m trying to find a way to get this to work in dynamic templating system…
November 19, 2004 at 00:46
This is only slightly related. I’m seeking some advice and i respect Neil enough to take his advice seriously.
I do a fair amount of back-end website stuff for a contractor. All of the code i’ve done has been an asp.net / sql-server combo. But the guy i do the work for is actually pretty flexible as long as the site works. On an xp machine IIS is handicapped to such an extent that developing web applications on a single machine is painfully slow moving to say the least. On top of this i’m hoping to migrate to a powermac in the near future (or maybe march 2005 haha)
I want to start developing with php+mysql instead, so that i’m not trapped in a microsoft jail cell.
I’ve worked with a vast number of languages so it shouldn’t be a struggle, but the php documentation in the past has put me off learning enough to be considered a rapid developer, especially where database manipulation is concerned.
So anyway, from what i gather you are an expert in these fields and a good judge of well written simplicity. Can you recommend a good site of textbook that covers php in an intelligent business oriented manor?
(Sorry that that was so long winded, i wanted to explain my reasons first…come to think of it, maybe this would have been better in an email)
November 20, 2004 at 16:00
Type Key Authentication on PHP
Finally! There is a decent implementation for authentication using Type Key which you can download a copy of the Auth_Typekey which Daiji Hriata wrote. Looks way better than the PECL module called Auth_Typekey which I’ve been developing in my free…
November 23, 2004 at 22:00
Neil, does this work with dynamic templates? What about the safeREF plugin?
November 23, 2004 at 23:30
The SafeHREF plugin is not dynamic-compatible, as far as I know. As for the rest of the code, it should work if you replace <? with <?php .
November 24, 2004 at 07:12
I think you can use encode_html=”1″ instead of SafeHREF plugin.
November 24, 2004 at 08:25
No, you can’t – I tried
.
November 28, 2004 at 18:51
Hmm… this is weird, I can’t get it to work for me. I will email you my template. Maybe you can see something I am missing.
November 29, 2004 at 20:21
For the others having the problem I was using a free SSL domain through my host https://koldarknet.secure.powweb.com for all CGI, and I ended up having to use AdminCGI in `mt.cfg` for my admin interface, to get it to work properly with http://www.koldark.net. I am not sure if it is a bug with how Neil is handling things or if it is somewhere else. But I now have it working.
November 30, 2004 at 15:38
I figured out your validation issue, and it should work with dynamic templates (untested).
November 30, 2004 at 15:40
htmlentities is a PHP function that encodes the URL. I use this other places. I have verified that it works on my site.
December 1, 2004 at 19:26
links for 2004-12-01
Neil’s World – PHP TypeKey How to make your Individual Archives use PHP for the TypeKey information instead of…
December 3, 2004 at 17:13
links for 2004-12-03
Busty Mousepads Mousepads for $25 with gel wrist rests. Shaped like boobs. Attached to a hentai girl. [via sexblo.gs] (categories: funny sex) To dance,…
December 28, 2004 at 04:29
Dumping
I didn’t buy the LCD television I wanted for Christmas because I kept reading that prices will decline after the…
January 2, 2005 at 20:57
TypeKey con PHP
Hace unos d