Absolutely ... First, the blog.viewComments event:
<event-handler name="blog.viewComments">
<broadcasts>
<message name="blog.getBlogEntryByID" />
<message name="blog.getBlogComments" />
<message name="blog.getBloggerID" />
</broadcasts>
<results>
<result do="blog.renderLayoutAvecPods" />
</results>
<views>
<include name="body"
template="pages/viewcomments.cfm">
<value name="xe.viewComments"
value="blog.viewComments" />
<value name="xe.addComment"
value="blog.addComment" />
<value name="xe.deleteEntry"
value="blog.deleteEntry" />
<value name="xe.deleteComment"
value="blog.deleteComment" />
</include>
</views>
</event-handler>
Now, my apologies in advance if this is more than necessary. But here
we go:
At the start of each request, we check a visitor's login status:
<event-handler name="ModelGlue.onRequestStart">
<broadcasts>
<message name="mymctc.checkLoginStatus" />
</broadcasts>
<results>
<result name="isLoggedIn"
do="mymctc.salutation" />
<result name="notLoggedIn" do="mymctc.login"
redirect="true" />
</results>
</event-handler>
If they're not logged in, then they're redirected to the mymctc.login
event:
<event-handler name="mymctc.login">
<broadcasts>
<message name="mymctc.forceHTTPS" />
</broadcasts>
<results>
<result do="template.login" />
</results>
<views>
<include name="body"
template="pages/loginform.cfm">
<value name="xe.authenticate"
value="mymctc.authenticate" />
</include>
</views>
</event-handler>
After ensuring they're using an encrypted connection, they're
presented with the login form which will submit their creds to the
mymctc.authenticate event:
<event-handler name="mymctc.authenticate">
<broadcasts>
<message name="mymctc.authenticate" />
</broadcasts>
<results>
<result name="goodLogin" do="blog.viewEntries"
redirect="true" />
<result name="badLogin" do="mymctc.login"
redirect="true" />
</results>
<views />
</event-handler>
And this is where we find my show-stopping hard-coded result for a
"goodLogin".
On Oct 24, 10:56 pm, Jared Rypka-Hauer <[EMAIL PROTECTED]>
wrote:
> Gary,
>
> There are many, many ways to do this and they're all dependent on how
> you have your application set up. It's very dependent on how you have
> relocating results set up and stuff,
>
> Can we see:
>
> The XML for the blog.viewComments event
> The XML for whatever event it is that shows the login form
>
> It would help.
>
> Thanks,
> J
>
> On Oct 24, 2008, at 4:16 PM, garence wrote:
>
>
>
> > Hi all -
>
> > Recently, I programmed a "BlogBoard" application (consider it a blog-
> > style message board) for use at my workplace. To provide folks with a
> > pulse as to the recent happenings on the blog, I created a weekly
> > digest email that among other things provides links to recent blog
> > entries. An example of a link looks like this:
>
> >http://theplaza.minneapolis.edu/index.cfm?
> > event=blog.viewComments&entryID=01F49C9D-1B78-3104-B8B54ED3513240A7
>
> > That's all well and good. But here's the rub - an employee must login
> > in order to interface with the blog, and upon successful login
> > ("goodLogin" result), the user gets redirected to a hard-coded event
> > ("blog.viewEntries"). For the moment, anyway:
>
> > <event-handler name="mymctc.authenticate">
> > <broadcasts>
> > <message name="mymctc.authenticate" />
> > </broadcasts>
> > <results>
> > <result name="goodLogin" do="blog.viewEntries"
> > redirect="true" />
> > <result name="badLogin" do="mymctc.login"
> > redirect="true" />
> > </results>
> > <views />
> > </event-handler>
>
> > What I'd like to do is land a user at the event they intended to view
> > prior to logging in to the blog. In the example above, it'd be a
> > return to the "blog.viewComments&entryID=01F49C9D-1B78-3104-
> > B8B54ED3513240A7" event.
>
> > Suggestions for how I might implement this feature?
>
> > Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---