Difference between revisions of "UrlMagic"
Line 19: | Line 19: | ||
* <s>Stage the urlmagic branch locally.</s> | * <s>Stage the urlmagic branch locally.</s> | ||
* <s>Understand domain page integration test class.</s> | * <s>Understand domain page integration test class.</s> | ||
− | * Write a test case for testing the redirect. | + | * Write a test case for testing a portal page is redirected to it's domain. |
+ | * Write a test cases for testing the redirect. | ||
* Write code in mediawiki that would redirect in case it finds the tag in the article. | * Write code in mediawiki that would redirect in case it finds the tag in the article. | ||
[[Category:DevelopmentTask]] | [[Category:DevelopmentTask]] | ||
</noinclude> | </noinclude> |
Revision as of 07:34, 30 January 2008
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. -
Stage the urlmagic branch locally. -
Understand domain page integration test class. - Write a test case for testing a portal page is redirected to it's domain.
- Write a test cases for testing the redirect.
- Write code in mediawiki that would redirect in case it finds the tag in the article.