GitHub PullRequestEvent at 2014-03-27 17:22:29
Repository: wow-skeletor
Actor: ter3sa
Payload: {"action":"closed","number":245,"pull_request":{"url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/245","id":14069919,"html_url":"https://github.com/Webcraft-Myplanet/wow-skeletor/pull/245","diff_url":"https://github.com/Webcraft-Myplanet/wow-skeletor/pull/245.diff","patch_url":"https://github.com/Webcraft-Myplanet/wow-skeletor/pull/245.patch","issue_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/245","number":245,"state":"closed","title":"User Profile overhaul - fixes left column issue forevahhh","user":{"login":"sjagr","id":6181571,"avatar_url":"https://avatars.githubusercontent.com/u/6181571?","gravatar_id":"da4b6c80f86359463b47f42cfe307356","url":"https://api.github.com/users/sjagr","html_url":"https://github.com/sjagr","followers_url":"https://api.github.com/users/sjagr/followers","following_url":"https://api.github.com/users/sjagr/following{/other_user}","gists_url":"https://api.github.com/users/sjagr/gists{/gist_id}","starred_url":"https://api.github.com/users/sjagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjagr/subscriptions","organizations_url":"https://api.github.com/users/sjagr/orgs","repos_url":"https://api.github.com/users/sjagr/repos","events_url":"https://api.github.com/users/sjagr/events{/privacy}","received_events_url":"https://api.github.com/users/sjagr/received_events","type":"User","site_admin":false},"body":"With a major change in the hook strategy, an explanation should be in order...\r\n\r\nI found that the idea of using absolute positioning to place the left bar into the heading bar and overlap under the `h1` tag to be a bit messy... so I decided a re-structure of the `h1` and other various things into the left-side column would be a much better approach. This strategy requires that the `page.tpl.php` file be changed... but we don't want to change everything else in the website (because a fluid container for edit pages, projects timeline, etc. looks... ugh.)\r\n\r\nThe solution? Make a new `page.tpl.php` that hooks only into the User Profile page. Take the left sidebar from `user-profile.tpl.php` and throw it into this new User Profile page template, and include the `h1` in the left sidebar, as well as move messages to the right content area. Looks good! But the template name `page--user.tpl.php` is catching for **all** user pages, including the edit page and login page. There doesn't seem to be a specific user profile page hook such as `page--user--profile.tpl.php`, and `page--user--%.tpl.php` works but includes the edit page still.\r\n\r\nThe solution was to implement the following hook:\r\n\r\n    function unicorn_preprocess_page(&$vars) {\r\n        $vars['content_column_class'] = ' class=\"col-xs-offset-1 col-xs-10\"';\r\n        if (arg(0) === 'user' || arg(0) === 'users') {\r\n            if (arg(2) !== 'edit') {\r\n                $vars['content_column_class'] = ' class=\"col-xs-12\"';\r\n                // Make sure the user profile page hook is specifically called\r\n                $vars['theme_hook_suggestion'] = 'page__user__profile';\r\n            }\r\n        }\r\n    }\r\n\r\nBy setting `$vars['theme_hook_suggestion']` to a specific hook, Drupal is forced to load that `.tpl.php` page. [See here for more info](https://drupal.org/node/223440#custom-suggestions)\r\n\r\nAll of this along with a lot of tweaking and we now have an awesome user profile page (although we may need to do some further tweaking.. but now we can focus on other things rather than fixing this column all the time.)","created_at":"2014-03-27T17:07:33Z","updated_at":"2014-03-27T17:22:29Z","closed_at":"2014-03-27T17:22:29Z","merged_at":"2014-03-27T17:22:29Z","merge_commit_sha":"db743d361b4ce2a35ea2273004ce403bd633127d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/245/commits","review_comments_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/245/comments","review_comment_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/245/comments","statuses_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/statuses/b908fa1be10369412e7bf1339d96762d678e1fd3","head":{"label":"Webcraft-Myplanet:UF-403","ref":"UF-403","sha":"b908fa1be10369412e7bf1339d96762d678e1fd3","user":{"login":"Webcraft-Myplanet","id":6411506,"avatar_url":"https://avatars.githubusercontent.com/u/6411506?","gravatar_id":null,"url":"https://api.github.com/users/Webcraft-Myplanet","html_url":"https://github.com/Webcraft-Myplanet","followers_url":"https://api.github.com/users/Webcraft-Myplanet/followers","following_url":"https://api.github.com/users/Webcraft-Myplanet/following{/other_user}","gists_url":"https://api.github.com/users/Webcraft-Myplanet/gists{/gist_id}","starred_url":"https://api.github.com/users/Webcraft-Myplanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Webcraft-Myplanet/subscriptions","organizations_url":"https://api.github.com/users/Webcraft-Myplanet/orgs","repos_url":"https://api.github.com/users/Webcraft-Myplanet/repos","events_url":"https://api.github.com/users/Webcraft-Myplanet/events{/privacy}","received_events_url":"https://api.github.com/users/Webcraft-Myplanet/received_events","type":"Organization","site_admin":false},"repo":{"id":15938442,"name":"wow-skeletor","full_name":"Webcraft-Myplanet/wow-skeletor","owner":{"login":"Webcraft-Myplanet","id":6411506,"avatar_url":"https://avatars.githubusercontent.com/u/6411506?","gravatar_id":null,"url":"https://api.github.com/users/Webcraft-Myplanet","html_url":"https://github.com/Webcraft-Myplanet","followers_url":"https://api.github.com/users/Webcraft-Myplanet/followers","following_url":"https://api.github.com/users/Webcraft-Myplanet/following{/other_user}","gists_url":"https://api.github.com/users/Webcraft-Myplanet/gists{/gist_id}","starred_url":"https://api.github.com/users/Webcraft-Myplanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Webcraft-Myplanet/subscriptions","organizations_url":"https://api.github.com/users/Webcraft-Myplanet/orgs","repos_url":"https://api.github.com/users/Webcraft-Myplanet/repos","events_url":"https://api.github.com/users/Webcraft-Myplanet/events{/privacy}","received_events_url":"https://api.github.com/users/Webcraft-Myplanet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Webcraft-Myplanet/wow-skeletor","description":"","fork":false,"url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor","forks_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/forks","keys_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/teams","hooks_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/hooks","issue_events_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/events{/number}","events_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/events","assignees_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/assignees{/user}","branches_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/branches{/branch}","tags_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/tags","blobs_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/refs{/sha}","trees_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/statuses/{sha}","languages_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/languages","stargazers_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/stargazers","contributors_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/contributors","subscribers_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/subscribers","subscription_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/subscription","commits_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/commits{/sha}","git_commits_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/commits{/sha}","comments_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/comments{/number}","issue_comment_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/comments/{number}","contents_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/contents/{+path}","compare_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/merges","archive_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/downloads","issues_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues{/number}","pulls_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls{/number}","milestones_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/milestones{/number}","notifications_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/labels{/name}","releases_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/releases{/id}","created_at":"2014-01-15T15:05:18Z","updated_at":"2014-03-27T17:22:29Z","pushed_at":"2014-03-27T17:22:29Z","git_url":"git://github.com/Webcraft-Myplanet/wow-skeletor.git","ssh_url":"git@github.com:Webcraft-Myplanet/wow-skeletor.git","clone_url":"https://github.com/Webcraft-Myplanet/wow-skeletor.git","svn_url":"https://github.com/Webcraft-Myplanet/wow-skeletor","homepage":null,"size":11909,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":5,"mirror_url":null,"open_issues_count":0,"forks":5,"open_issues":0,"watchers":3,"default_branch":"master","master_branch":"master"}},"base":{"label":"Webcraft-Myplanet:master","ref":"master","sha":"3294b6c91503a9d6804f39c5d823ece976928782","user":{"login":"Webcraft-Myplanet","id":6411506,"avatar_url":"https://avatars.githubusercontent.com/u/6411506?","gravatar_id":null,"url":"https://api.github.com/users/Webcraft-Myplanet","html_url":"https://github.com/Webcraft-Myplanet","followers_url":"https://api.github.com/users/Webcraft-Myplanet/followers","following_url":"https://api.github.com/users/Webcraft-Myplanet/following{/other_user}","gists_url":"https://api.github.com/users/Webcraft-Myplanet/gists{/gist_id}","starred_url":"https://api.github.com/users/Webcraft-Myplanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Webcraft-Myplanet/subscriptions","organizations_url":"https://api.github.com/users/Webcraft-Myplanet/orgs","repos_url":"https://api.github.com/users/Webcraft-Myplanet/repos","events_url":"https://api.github.com/users/Webcraft-Myplanet/events{/privacy}","received_events_url":"https://api.github.com/users/Webcraft-Myplanet/received_events","type":"Organization","site_admin":false},"repo":{"id":15938442,"name":"wow-skeletor","full_name":"Webcraft-Myplanet/wow-skeletor","owner":{"login":"Webcraft-Myplanet","id":6411506,"avatar_url":"https://avatars.githubusercontent.com/u/6411506?","gravatar_id":null,"url":"https://api.github.com/users/Webcraft-Myplanet","html_url":"https://github.com/Webcraft-Myplanet","followers_url":"https://api.github.com/users/Webcraft-Myplanet/followers","following_url":"https://api.github.com/users/Webcraft-Myplanet/following{/other_user}","gists_url":"https://api.github.com/users/Webcraft-Myplanet/gists{/gist_id}","starred_url":"https://api.github.com/users/Webcraft-Myplanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Webcraft-Myplanet/subscriptions","organizations_url":"https://api.github.com/users/Webcraft-Myplanet/orgs","repos_url":"https://api.github.com/users/Webcraft-Myplanet/repos","events_url":"https://api.github.com/users/Webcraft-Myplanet/events{/privacy}","received_events_url":"https://api.github.com/users/Webcraft-Myplanet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Webcraft-Myplanet/wow-skeletor","description":"","fork":false,"url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor","forks_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/forks","keys_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/teams","hooks_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/hooks","issue_events_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/events{/number}","events_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/events","assignees_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/assignees{/user}","branches_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/branches{/branch}","tags_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/tags","blobs_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/refs{/sha}","trees_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/statuses/{sha}","languages_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/languages","stargazers_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/stargazers","contributors_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/contributors","subscribers_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/subscribers","subscription_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/subscription","commits_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/commits{/sha}","git_commits_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/git/commits{/sha}","comments_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/comments{/number}","issue_comment_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/comments/{number}","contents_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/contents/{+path}","compare_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/merges","archive_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/downloads","issues_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues{/number}","pulls_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls{/number}","milestones_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/milestones{/number}","notifications_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/labels{/name}","releases_url":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/releases{/id}","created_at":"2014-01-15T15:05:18Z","updated_at":"2014-03-27T17:22:29Z","pushed_at":"2014-03-27T17:22:29Z","git_url":"git://github.com/Webcraft-Myplanet/wow-skeletor.git","ssh_url":"git@github.com:Webcraft-Myplanet/wow-skeletor.git","clone_url":"https://github.com/Webcraft-Myplanet/wow-skeletor.git","svn_url":"https://github.com/Webcraft-Myplanet/wow-skeletor","homepage":null,"size":11909,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":5,"mirror_url":null,"open_issues_count":0,"forks":5,"open_issues":0,"watchers":3,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/245"},"html":{"href":"https://github.com/Webcraft-Myplanet/wow-skeletor/pull/245"},"issue":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/245"},"comments":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/issues/245/comments"},"review_comments":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/245/comments"},"review_comment":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/pulls/245/commits"},"statuses":{"href":"https://api.github.com/repos/Webcraft-Myplanet/wow-skeletor/statuses/b908fa1be10369412e7bf1339d96762d678e1fd3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ter3sa","id":884752,"avatar_url":"https://avatars.githubusercontent.com/u/884752?","gravatar_id":"a500aa040a0d6f02455bd4ccbc52de4e","url":"https://api.github.com/users/ter3sa","html_url":"https://github.com/ter3sa","followers_url":"https://api.github.com/users/ter3sa/followers","following_url":"https://api.github.com/users/ter3sa/following{/other_user}","gists_url":"https://api.github.com/users/ter3sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ter3sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ter3sa/subscriptions","organizations_url":"https://api.github.com/users/ter3sa/orgs","repos_url":"https://api.github.com/users/ter3sa/repos","events_url":"https://api.github.com/users/ter3sa/events{/privacy}","received_events_url":"https://api.github.com/users/ter3sa/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":15,"additions":259,"deletions":69,"changed_files":5}}