DisplayShader v1.0

Hi, im trying to fix up the DisplayShaderv1.0 script found @:
http://www.highend3d.com/maya/mel/?group=m...ction=rendering
to work with Maya 4, I've got it to work, but am trying to get it to put the shader in the work area instead of the materials area, I wondered if anyone might know of something that did a similar job that I could look at and get an idea of how to go about this.
Thanks in advance.