Difference between revisions of "User:Exor674/Journalspace Path"

From Dreamwidth Notes
Jump to: navigation, search
Line 22: Line 22:
  
 
* Data handlers ( we're done )
 
* Data handlers ( we're done )
 
Customview is diffrent!!!
 
  
 
====customview====
 
====customview====
Line 39: Line 37:
 
* Set up to call into make_journal
 
* Set up to call into make_journal
  
===LJ::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 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.
 +
 
 +
* If we aren't doing handle_with_bml_ref, LJ::S2::make_journal!
 +
 
 +
* Otherwise just bail!
 +
 
 +
====LJ::S2::make_journal====
 +
 
  
 
===back in (Apache::LiveJournal::journal_content)===
 
===back in (Apache::LiveJournal::journal_content)===
Line 51: Line 82:
 
* If make_journal requested a direct return [handler_return], return that ( we're done )
 
* If make_journal requested a direct return [handler_return], return that ( we're done )
  
* If we went down the siteviews path, render that result in sitescheme ( 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, determine which bml file we need to render and render it. ( 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 )
 
* .. bleh a lot more stuff ( 1412 to 1521, don't want to summarize now QQ )
 +
 +
* We're done! Success!

Revision as of 01:02, 1 February 2012

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 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.
  • If we aren't doing handle_with_bml_ref, LJ::S2::make_journal!
  • Otherwise just bail!

LJ::S2::make_journal

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!