UrlMagic

Revision as of 05:10, 11 February 2008 by Umar Sheikh (talk | contribs) (Steps to get to DoneDone)



OurWork Edit-chalk-10bo12.png

What (summary)

Pages in some portals should be accessible if and only if the site is being viewed from a specified domain. If a page is viewed in the wrong domain, the user is redirected to the right domain.

Why this is important

Lets us continue our portal branding in a way that gives sponsors a greater sense of ownership.

DoneDone

  • If a page is skinned via the <setSkin> tag, all attempted page views for that page are redirected to the proper domain. For example, if a page is called PortlandTechCompany, and is skinned PortlandTech, any attempts to reach www.aboutus.org/PortlandTechCompany are redirected (301 permanent) to www.portlandtech.net/PortlandTechCompany. Likewise, visiting www.portlandtech.net/NotInPortlandTech should redirect to www.aboutus.org/NotInPortlandTech
  • The detection of a particular portal is done using the skin-detection logic from CustomSkinForPortals. If this capability is insufficient, make sure that developers working on both projects address it together instead of creating our own solutions.
    • We may want to factor out the function get_portal_skin from design.php. The basic approach should stay the same.
    • Create a mapping between skin names and portal URLs
  • Develop this extension using an integration test written in Ruby using Net::Mechanize. See compost/test/integration/build_domain_test.rb for an example. We want to do this so that if we modify our platform in the future we have regression tests to know this capability still works.

Steps to get to DoneDone

  • Create a new branch named urlmagic for this task.
  • Bug in stage_branch script. SSL certificate not stored. Fix this.
  • find out why we do not get any page text when we try to either use fixtures or create a page in compost side, and then try to view it by calling mediawiki resolved by using article's fetchContent function
  • Write a test cases for testing the redirect.
  • look at permanent redirects
  • do permanent redirects
  • write test cases for trying to visit a page under aboutus, being accessed as if it belongs to portal
  • instead of using a text file, use a 2-d array for names of portalskin-url pairs.
  • clean up test cases by using fixtures and default messages in a better way
  • test cases for redirect code set to 302 for permanency


Retrieved from "http://aboutus.com/index.php?title=UrlMagic&oldid=14759720"