Mob 238 php side

This is the php code needed for mobile lightbox sharing (https://wikia-inc.atlassian.net/browse/MOB-238).  This needs to be pushed out 14 days before the JS so that the parser cache will have time to clear.  

Please don't merge this yet as it's still in code review, and then QA.