User:Exor674/Journalspace Path

From Dreamwidth Notes
Jump to: navigation, search

Apache::LiveJournnal::trans

$determine_view inline sub in ::trans

  • Check for a Routing call in the user role

If one exists, we do that and are done

  • Failing that..

There are some special cases here ( __setdomsess, redirect journals ), but otherwise this determines the view and prepares to call top the next step.

$journal_view inline sub in ::trans

  • Check if we should show the adult content interstial ( if so show it and we are done! )
  • /info is a redirect to full profile ( we're done )
  • profile is ( currently ) a call into BML ( we're done )
  • update is a redirect to the update page ( we're done ) NTS: move this to a routing call!
  • Data handlers ( we're done )

customview

otherwise (Apache::LiveJournal::journal_content)

This is one of the main meats of the operation!

  • Handle robots.txt ( we're done )
  • Handle auth=digest ( we're done unless the user is already authenticated )
  • handle failed cookies, or stuff. ( we're done if cookies have failed )
  • Set up to call into make_journal

LJ::make_journal ( in LJ/User.pm )

  • If user is going down the s1 path ( THIS SHOULD NEVER HAPPEN ) blow up ( we're done )

-- determine_viewing_style

  • Determine if we are doing stlye=site or style=light
  • Check our fallback setting to see if we should do s2 or bml ( fallback by default is bml )
  • If the view is a s2/siteviews only view, set our fallback to s2
  • If the fallback is bml, set handle_with_bml_ref and bail back to *Apache::LiveJournal::journal_content*
  • If are fallback is s2, set the styleid to 'siteviews' ( special style ID )
  • Handle /security/ index page ( this is done with handle_with_siteviews right now, should be fixed not to, uh.. FIXME! ) [ render a TT template and bail out to Apache::LiveJournal::journal_content ]
  • Handle some error states [Bail back to Apache::LiveJournal::journal_content, through $security_err]
  • Check for valid identity views if we are an identity account [ Bail out through $error if we aren't ]
  • Handle feeds [ LJ::Feed::make_feed and bail ]
  • If **somehow** we are still going down the S1 path, well. blow up { this should NOT happen }
  • If we aren't doing handle_with_bml_ref, LJ::S2::make_journal ( we can bail from here and continue! )
  • If we are handle_with_bml_ref, and going to an icons or tags page ( pages that can be requested to be in BML from the style, and have no "BML" bersion ) OR doing the s2 fallback -- do siteviews instead.
  • Otherwise just bail!

LJ::S2::make_journal

  • handle stylesheet special case ( we're done, back to Apache::LiveJournal::journal_content )
  • If we are going to render the siteviews style ( we're done, back to Apache::LiveJournal::journal_content )

-- no control strip -- unset [handle_with_bml_ref] -- set [handle_with_siteviews_ref] -- prepare siteviews options, scratch space, properties, and class. ( there probably should be a own page on siteviews )

  • Determine if we are doing an entry or reply view and don't want journalstyle entry pages ( set handle_with_bml_ref and drop back to where we came from in LJ::make_journal )
  • Determine if we are doing an icons view and don't want journalstyle icons pages ( set handle_with_bml_ref and drop back to where we came from in LJ::make_journal )
  • Check if the user caps allow journalstyle entry/reply ( if not set handle_with_bml_ref and drop back to where we came from in LJ::make_journal ) [ Do we even do thio on DW? ]
  • Instantiate the class.
  • Call into S2 ( we're done, back to Apache::LiveJournal::journal_content )

back in (Apache::LiveJournal::journal_content)

  • Add extra hooks if we didn't go down the siteviews path.
  • If make_journal requested an internal_redirect [internal_redir], call into routing with it. ( we're done )
  • If make_journal requested a redirect [redir], well, redirect ( we're done )
  • If make_journal requested a direct return [handler_return], return that ( we're done )
  • If we went down the siteviews path [handle_with_siteviews], render that result in sitescheme ( we're done )
  • If a BML handler was requested [handle_with_bml_ref], determine which bml file we need to render and render it. ( we're done )
  • .. bleh a lot more stuff ( 1412 to 1521, don't want to summarize now QQ )
  • We're done! Success!