{"action":"created","comment":{"url":"https://api.github.com/repos/xfrocks/bdAd/pulls/comments/63285929","id":63285929,"diff_hunk":"@@ -77,4 +79,25 @@ public static function helperEngine()\n \n         return call_user_func_array($method, $args);\n     }\n-}\n\\ No newline at end of file\n+\n+    public static function front_controller_pre_dispatch(XenForo_FrontController $fc, XenForo_RouteMatch &$routeMatch)\n+    {\n+        $routeMatch->getMajorSection();\n+        $majorSection = $routeMatch->getMajorSection();\n+\n+        $checkedValues = bdAd_Option::get('customizeDisplayAd');\n+\n+        foreach ($checkedValues as $key => $value) {\n+            if ($majorSection == $key) {\n+                self::$_noAd = false;\n+            }\n+        }\n+\n+    }\n+\n+    public static function bdAd_customizeDisplayAdCheck()","path":"library/bdAd/Listener.php","position":40,"original_position":40,"commit_id":"479abdb62a316d7da16e524504f8ce5ecc629f44","original_commit_id":"479abdb62a316d7da16e524504f8ce5ecc629f44","user":{"login":"daohoangson","id":239336,"avatar_url":"https://avatars.githubusercontent.com/u/239336?v=3","gravatar_id":"","url":"https://api.github.com/users/daohoangson","html_url":"https://github.com/daohoangson","followers_url":"https://api.github.com/users/daohoangson/followers","following_url":"https://api.github.com/users/daohoangson/following{/other_user}","gists_url":"https://api.github.com/users/daohoangson/gists{/gist_id}","starred_url":"https://api.github.com/users/daohoangson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daohoangson/subscriptions","organizations_url":"https://api.github.com/users/daohoangson/orgs","repos_url":"https://api.github.com/users/daohoangson/repos","events_url":"https://api.github.com/users/daohoangson/events{/privacy}","received_events_url":"https://api.github.com/users/daohoangson/received_events","type":"User","site_admin":false},"body":"Tên hàm này có vấn đề:\r\n\r\n1. Tại sao cần prefix \"bdAd_\"? Nó là hàm trong `bdAd_Listener` rồi mà?\r\n2. Tên hàm nên giải thích xem nó làm gì, ví dụ tên hàm \"customize xyz\" thì sẽ hiểu là gọi hàm này để biến đổi hiển thị cái gì đó. Nhưng hóa ra gọi hàm này để kiểm tra xem có hiện ads không -> không liên quan tí nào.\r\n3. Thường với hàm kiểm tra flag boolean thì nên để prefix là \"is\", ví dụ hàm này có thể đặt là \"isNoAd\" hoặc \"isAdFree\". Tương tự, cái flag cũng sẽ đặt tên tương ứng với cái method \"isNoAd\" -> \"$_isNoAd\", \"isAdFree\" -> \"$_isAdFree\".","created_at":"2016-05-15T04:10:51Z","updated_at":"2016-05-15T04:10:51Z","html_url":"https://github.com/xfrocks/bdAd/pull/1#discussion_r63285929","pull_request_url":"https://api.github.com/repos/xfrocks/bdAd/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/xfrocks/bdAd/pulls/comments/63285929"},"html":{"href":"https://github.com/xfrocks/bdAd/pull/1#discussion_r63285929"},"pull_request":{"href":"https://api.github.com/repos/xfrocks/bdAd/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/xfrocks/bdAd/pulls/1","id":69978632,"html_url":"https://github.com/xfrocks/bdAd/pull/1","diff_url":"https://github.com/xfrocks/bdAd/pull/1.diff","patch_url":"https://github.com/xfrocks/bdAd/pull/1.patch","issue_url":"https://api.github.com/repos/xfrocks/bdAd/issues/1","number":1,"state":"open","locked":false,"title":"[bdAd] Exclude Pages","user":{"login":"maitandat1507","id":16433751,"avatar_url":"https://avatars.githubusercontent.com/u/16433751?v=3","gravatar_id":"","url":"https://api.github.com/users/maitandat1507","html_url":"https://github.com/maitandat1507","followers_url":"https://api.github.com/users/maitandat1507/followers","following_url":"https://api.github.com/users/maitandat1507/following{/other_user}","gists_url":"https://api.github.com/users/maitandat1507/gists{/gist_id}","starred_url":"https://api.github.com/users/maitandat1507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maitandat1507/subscriptions","organizations_url":"https://api.github.com/users/maitandat1507/orgs","repos_url":"https://api.github.com/users/maitandat1507/repos","events_url":"https://api.github.com/users/maitandat1507/events{/privacy}","received_events_url":"https://api.github.com/users/maitandat1507/received_events","type":"User","site_admin":false},"body":"# Cho phép chọn các page không hiển thị quảng cáo","created_at":"2016-05-13T11:03:33Z","updated_at":"2016-05-15T04:10:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83f3a5bb1d32b6fce8e0687756404b8136c79d66","assignee":{"login":"daohoangson","id":239336,"avatar_url":"https://avatars.githubusercontent.com/u/239336?v=3","gravatar_id":"","url":"https://api.github.com/users/daohoangson","html_url":"https://github.com/daohoangson","followers_url":"https://api.github.com/users/daohoangson/followers","following_url":"https://api.github.com/users/daohoangson/following{/other_user}","gists_url":"https://api.github.com/users/daohoangson/gists{/gist_id}","starred_url":"https://api.github.com/users/daohoangson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daohoangson/subscriptions","organizations_url":"https://api.github.com/users/daohoangson/orgs","repos_url":"https://api.github.com/users/daohoangson/repos","events_url":"https://api.github.com/users/daohoangson/events{/privacy}","received_events_url":"https://api.github.com/users/daohoangson/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/xfrocks/bdAd/pulls/1/commits","review_comments_url":"https://api.github.com/repos/xfrocks/bdAd/pulls/1/comments","review_comment_url":"https://api.github.com/repos/xfrocks/bdAd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xfrocks/bdAd/issues/1/comments","statuses_url":"https://api.github.com/repos/xfrocks/bdAd/statuses/479abdb62a316d7da16e524504f8ce5ecc629f44","head":{"label":"maitandat1507:customize-display-ads","ref":"customize-display-ads","sha":"479abdb62a316d7da16e524504f8ce5ecc629f44","user":{"login":"maitandat1507","id":16433751,"avatar_url":"https://avatars.githubusercontent.com/u/16433751?v=3","gravatar_id":"","url":"https://api.github.com/users/maitandat1507","html_url":"https://github.com/maitandat1507","followers_url":"https://api.github.com/users/maitandat1507/followers","following_url":"https://api.github.com/users/maitandat1507/following{/other_user}","gists_url":"https://api.github.com/users/maitandat1507/gists{/gist_id}","starred_url":"https://api.github.com/users/maitandat1507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maitandat1507/subscriptions","organizations_url":"https://api.github.com/users/maitandat1507/orgs","repos_url":"https://api.github.com/users/maitandat1507/repos","events_url":"https://api.github.com/users/maitandat1507/events{/privacy}","received_events_url":"https://api.github.com/users/maitandat1507/received_events","type":"User","site_admin":false},"repo":{"id":58661307,"name":"bdAd","full_name":"maitandat1507/bdAd","owner":{"login":"maitandat1507","id":16433751,"avatar_url":"https://avatars.githubusercontent.com/u/16433751?v=3","gravatar_id":"","url":"https://api.github.com/users/maitandat1507","html_url":"https://github.com/maitandat1507","followers_url":"https://api.github.com/users/maitandat1507/followers","following_url":"https://api.github.com/users/maitandat1507/following{/other_user}","gists_url":"https://api.github.com/users/maitandat1507/gists{/gist_id}","starred_url":"https://api.github.com/users/maitandat1507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maitandat1507/subscriptions","organizations_url":"https://api.github.com/users/maitandat1507/orgs","repos_url":"https://api.github.com/users/maitandat1507/repos","events_url":"https://api.github.com/users/maitandat1507/events{/privacy}","received_events_url":"https://api.github.com/users/maitandat1507/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maitandat1507/bdAd","description":"","fork":true,"url":"https://api.github.com/repos/maitandat1507/bdAd","forks_url":"https://api.github.com/repos/maitandat1507/bdAd/forks","keys_url":"https://api.github.com/repos/maitandat1507/bdAd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maitandat1507/bdAd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maitandat1507/bdAd/teams","hooks_url":"https://api.github.com/repos/maitandat1507/bdAd/hooks","issue_events_url":"https://api.github.com/repos/maitandat1507/bdAd/issues/events{/number}","events_url":"https://api.github.com/repos/maitandat1507/bdAd/events","assignees_url":"https://api.github.com/repos/maitandat1507/bdAd/assignees{/user}","branches_url":"https://api.github.com/repos/maitandat1507/bdAd/branches{/branch}","tags_url":"https://api.github.com/repos/maitandat1507/bdAd/tags","blobs_url":"https://api.github.com/repos/maitandat1507/bdAd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maitandat1507/bdAd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maitandat1507/bdAd/git/refs{/sha}","trees_url":"https://api.github.com/repos/maitandat1507/bdAd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maitandat1507/bdAd/statuses/{sha}","languages_url":"https://api.github.com/repos/maitandat1507/bdAd/languages","stargazers_url":"https://api.github.com/repos/maitandat1507/bdAd/stargazers","contributors_url":"https://api.github.com/repos/maitandat1507/bdAd/contributors","subscribers_url":"https://api.github.com/repos/maitandat1507/bdAd/subscribers","subscription_url":"https://api.github.com/repos/maitandat1507/bdAd/subscription","commits_url":"https://api.github.com/repos/maitandat1507/bdAd/commits{/sha}","git_commits_url":"https://api.github.com/repos/maitandat1507/bdAd/git/commits{/sha}","comments_url":"https://api.github.com/repos/maitandat1507/bdAd/comments{/number}","issue_comment_url":"https://api.github.com/repos/maitandat1507/bdAd/issues/comments{/number}","contents_url":"https://api.github.com/repos/maitandat1507/bdAd/contents/{+path}","compare_url":"https://api.github.com/repos/maitandat1507/bdAd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maitandat1507/bdAd/merges","archive_url":"https://api.github.com/repos/maitandat1507/bdAd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maitandat1507/bdAd/downloads","issues_url":"https://api.github.com/repos/maitandat1507/bdAd/issues{/number}","pulls_url":"https://api.github.com/repos/maitandat1507/bdAd/pulls{/number}","milestones_url":"https://api.github.com/repos/maitandat1507/bdAd/milestones{/number}","notifications_url":"https://api.github.com/repos/maitandat1507/bdAd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maitandat1507/bdAd/labels{/name}","releases_url":"https://api.github.com/repos/maitandat1507/bdAd/releases{/id}","deployments_url":"https://api.github.com/repos/maitandat1507/bdAd/deployments","created_at":"2016-05-12T17:11:05Z","updated_at":"2016-05-12T17:11:06Z","pushed_at":"2016-05-13T14:09:55Z","git_url":"git://github.com/maitandat1507/bdAd.git","ssh_url":"git@github.com:maitandat1507/bdAd.git","clone_url":"https://github.com/maitandat1507/bdAd.git","svn_url":"https://github.com/maitandat1507/bdAd","homepage":null,"size":63,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xfrocks:master","ref":"master","sha":"ed0234c96ae22b08aacbe2c6f6b07af690d575e3","user":{"login":"xfrocks","id":2216975,"avatar_url":"https://avatars.githubusercontent.com/u/2216975?v=3","gravatar_id":"","url":"https://api.github.com/users/xfrocks","html_url":"https://github.com/xfrocks","followers_url":"https://api.github.com/users/xfrocks/followers","following_url":"https://api.github.com/users/xfrocks/following{/other_user}","gists_url":"https://api.github.com/users/xfrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/xfrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfrocks/subscriptions","organizations_url":"https://api.github.com/users/xfrocks/orgs","repos_url":"https://api.github.com/users/xfrocks/repos","events_url":"https://api.github.com/users/xfrocks/events{/privacy}","received_events_url":"https://api.github.com/users/xfrocks/received_events","type":"Organization","site_admin":false},"repo":{"id":58513379,"name":"bdAd","full_name":"xfrocks/bdAd","owner":{"login":"xfrocks","id":2216975,"avatar_url":"https://avatars.githubusercontent.com/u/2216975?v=3","gravatar_id":"","url":"https://api.github.com/users/xfrocks","html_url":"https://github.com/xfrocks","followers_url":"https://api.github.com/users/xfrocks/followers","following_url":"https://api.github.com/users/xfrocks/following{/other_user}","gists_url":"https://api.github.com/users/xfrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/xfrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfrocks/subscriptions","organizations_url":"https://api.github.com/users/xfrocks/orgs","repos_url":"https://api.github.com/users/xfrocks/repos","events_url":"https://api.github.com/users/xfrocks/events{/privacy}","received_events_url":"https://api.github.com/users/xfrocks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xfrocks/bdAd","description":"","fork":false,"url":"https://api.github.com/repos/xfrocks/bdAd","forks_url":"https://api.github.com/repos/xfrocks/bdAd/forks","keys_url":"https://api.github.com/repos/xfrocks/bdAd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xfrocks/bdAd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xfrocks/bdAd/teams","hooks_url":"https://api.github.com/repos/xfrocks/bdAd/hooks","issue_events_url":"https://api.github.com/repos/xfrocks/bdAd/issues/events{/number}","events_url":"https://api.github.com/repos/xfrocks/bdAd/events","assignees_url":"https://api.github.com/repos/xfrocks/bdAd/assignees{/user}","branches_url":"https://api.github.com/repos/xfrocks/bdAd/branches{/branch}","tags_url":"https://api.github.com/repos/xfrocks/bdAd/tags","blobs_url":"https://api.github.com/repos/xfrocks/bdAd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xfrocks/bdAd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xfrocks/bdAd/git/refs{/sha}","trees_url":"https://api.github.com/repos/xfrocks/bdAd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xfrocks/bdAd/statuses/{sha}","languages_url":"https://api.github.com/repos/xfrocks/bdAd/languages","stargazers_url":"https://api.github.com/repos/xfrocks/bdAd/stargazers","contributors_url":"https://api.github.com/repos/xfrocks/bdAd/contributors","subscribers_url":"https://api.github.com/repos/xfrocks/bdAd/subscribers","subscription_url":"https://api.github.com/repos/xfrocks/bdAd/subscription","commits_url":"https://api.github.com/repos/xfrocks/bdAd/commits{/sha}","git_commits_url":"https://api.github.com/repos/xfrocks/bdAd/git/commits{/sha}","comments_url":"https://api.github.com/repos/xfrocks/bdAd/comments{/number}","issue_comment_url":"https://api.github.com/repos/xfrocks/bdAd/issues/comments{/number}","contents_url":"https://api.github.com/repos/xfrocks/bdAd/contents/{+path}","compare_url":"https://api.github.com/repos/xfrocks/bdAd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xfrocks/bdAd/merges","archive_url":"https://api.github.com/repos/xfrocks/bdAd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xfrocks/bdAd/downloads","issues_url":"https://api.github.com/repos/xfrocks/bdAd/issues{/number}","pulls_url":"https://api.github.com/repos/xfrocks/bdAd/pulls{/number}","milestones_url":"https://api.github.com/repos/xfrocks/bdAd/milestones{/number}","notifications_url":"https://api.github.com/repos/xfrocks/bdAd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xfrocks/bdAd/labels{/name}","releases_url":"https://api.github.com/repos/xfrocks/bdAd/releases{/id}","deployments_url":"https://api.github.com/repos/xfrocks/bdAd/deployments","created_at":"2016-05-11T04:06:09Z","updated_at":"2016-05-11T04:06:46Z","pushed_at":"2016-05-13T14:09:56Z","git_url":"git://github.com/xfrocks/bdAd.git","ssh_url":"git@github.com:xfrocks/bdAd.git","clone_url":"https://github.com/xfrocks/bdAd.git","svn_url":"https://github.com/xfrocks/bdAd","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xfrocks/bdAd/pulls/1"},"html":{"href":"https://github.com/xfrocks/bdAd/pull/1"},"issue":{"href":"https://api.github.com/repos/xfrocks/bdAd/issues/1"},"comments":{"href":"https://api.github.com/repos/xfrocks/bdAd/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/xfrocks/bdAd/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/xfrocks/bdAd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xfrocks/bdAd/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/xfrocks/bdAd/statuses/479abdb62a316d7da16e524504f8ce5ecc629f44"}}}}