[Zope-dev] Emailing html web pages: how can I render page as the anonymous user?

Bjorn Stabell bjorn@exoweb.net
Sun, 7 Oct 2001 16:19:04 +0800


My favorite way is to support this is to create skins.  We have two
skins:

	printable
	emailable

that fixes the standard_html_* stuff, and can even be used to override
the content rendering at a deeper level, if needed (overriding
document_view etc).  We can use the same way to support WAP, Avantgo etc
also.  A printable version of a page is simply done by doing

	http://myurl/contenturl?portal_skin=3Dprintable

Pretty cool.  IMO, this is a better use of skins than to use it for
languages; languages are better managed by Localizer or ZBabel.

Bye,
--=20
Bjorn <bjorn@exoweb.net>

> -----Original Message-----
> From: Chris McDonough [mailto:chrism@digicool.com]
> Posted At: Sunday, October 07, 2001 04:53
> Posted To: Zope Developer
> Conversation: [Zope-dev] Emailing html web pages: how can I=20
> render page
> as the anonymous user?
> Subject: Re: [Zope-dev] Emailing html web pages: how can I render page
> as the anonymous user?
>=20
>=20
> Hi Don,
>=20
> Instead of including the rendered standard_html_header and=20
> standard_html_footer in the emailed page, why not have a=20
> "emailed_html_header" and "emailed_html_footer", which are=20
> prerendered=20
> copies of a toolbar and other things as seen by the anonymous user?
>=20
> The setuid/setgid thing is tricky and since the outcomes will=20
> be about=20
> the same (always showing folks an anonymous-based toolbar), including=20
> static content is easier.
>=20
> - C
>=20
> Don Hopkins wrote:
> > I'm using the CMF, and I've implement an "email_this_page"=20
> method, that
> > prompts for an email address, then uses the sendmail tag to=20
> email the html
> > contents of a page, like yahoo and other sites commonly do.
> > I want to include the standard_html_header and=20
> standard_html_footer in the
> > email message, so it's easy for the recipient to navigate=20
> to the web site.
> > But when I tested it out, I noticed I got all the=20
> management buttons like
> > "Reject" and "Reconfigure portal" in the email message!
> > Of course they required authentication, but it'd rather=20
> render the page as
> > it would be seen by the anonymous user.
> >=20
> > What I need is something like the effect of a=20
> setuid/seteuid system calls,
> > that temporarily downgrades the Zope user to anonymous,=20
> while it renders the
> > html headers and footers.
> > As a stab in the dark, I tried changing the proxy role of=20
> the dtml script
> > that uses the sendmail tag and renders the html, but I still got the
> > management buttons.
> > Is it as simple as temporarily changing some properties of=20
> the request? Or
> > is there an extension or product that can do that?
> > Thanks!
> >=20
> > http://www.WorldTradeCenterDisaster.com:8080/Memorial
> >=20
> >     -Don
> >=20
> >=20
> >=20
> >=20
> > _______________________________________________
> > Zope-Dev maillist  -  Zope-Dev@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -=20
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >=20
>=20
>=20
> --=20
> Chris McDonough                    Zope Corporation
> http://www.zope.org             http://www.zope.com
> "Killing hundreds of birds with thousands of stones"
>=20
>=20
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>=20