Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions build/buttonstyle/isango.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/buttonstyle/isango.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions build/buttonstyle/isango.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ $gateway-map: (
color: #4267b2,
icon: "M10.3 18.5H13V12h1.8l.2-2.3h-2V8.6c0-.6.1-.9.9-.9H15V5.5h-1.8c-2.2 0-2.9 1.1-2.9 2.9v1.4H9V12h1.3zM12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12z"
),
vkontakte: (
color: #4c75a3,
icon: "M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm-.4 7.4c.7 0 .9 0 1.2.1.8.2.5.9.5 2.8 0 .6-.1 1.4.3 1.7.2.1.6 0 1.7-1.9.5-.9.9-1.9.9-1.9s.2-.2.3-.2c.1-.1.3-.1.3-.1h2.5s.7-.1.9.2c.1.4-.3 1.2-1.3 2.5-1.7 2.3-1.9 2.1-.5 3.3 1.3 1.2 1.6 1.8 1.6 1.9.5.9-.6 1-.6 1h-2.2s-.5.1-1.1-.3c-.8-.6-1.6-2-2.2-1.8-.6.2-.6 1.5-.6 1.5s0 .3-.1.4c-.2.2-.4.2-.4.2h-1s-2.2.1-4.1-1.9c-2.1-2.2-3.9-6.5-3.9-6.5s-.1-.3 0-.4c.1-.2.5-.2.5-.2h2.3s.2 0 .4.2c.1.1.2.3.2.3s.4 1 .9 1.8c1 1.7 1.4 2.1 1.8 1.9.5-.3.3-2.4.3-2.4s0-.8-.2-1.1c-.2-.3-.6-.3-.8-.4-.1 0 .1-.3.4-.5.4-.2 1.2-.2 2-.2z"
),
yahoo: (
color: #5d0bed,
icon: "M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm4 5.5h3l-2.5 6h-3l2.5-6zM5 7.9h2.8L9.5 12l1.7-4.1H14L9.5 18.5H6.7l1.4-3.3L5 7.9zm9.1 4.7c.9 0 1.6.7 1.6 1.6-.1.9-.8 1.6-1.6 1.6-.9 0-1.6-.7-1.6-1.6 0-.9.7-1.6 1.6-1.6z"
Expand Down
9 changes: 9 additions & 0 deletions upload/inc/plugins/isango.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ function isango_bridge()

// Get user information
$user = array();

// Hack the email from the flow, if available. Vkontakte doesn't provide email at API endpoint
if($mybb->input['gateway'] == 'vkontakte' && isset($data["email"])){
$user["email"] = $data["email"];
}

$conf = isango_config($mybb->input['gateway'], 'api');
if (is_string($conf['url'])) {
$conf['url'] = (array) $conf['url'];
Expand Down Expand Up @@ -475,6 +481,9 @@ function isango_curl(array $params, string $gateway, string $mode = 'api')
$header = array('Accept' => 'application/json'); // Default, override with config
if ($mode == 'api') {
$header['Authorization'] = 'Bearer ' . $params['code'];
if($gateway == 'vkontakte'){ // Header will not help carrying the access token for Vkontakte
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['access_token' => $params['code'], 'v' => '5.110']));
}
}

if (isset($conf['header']) && is_array($conf['header'])) {
Expand Down
14 changes: 14 additions & 0 deletions upload/inc/plugins/isango/isango.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ a.isango_facebook:hover {
background: #34518d !important;
}

a.isango_vkontakte {
background: #4c75a3 !important;
border: 1px solid #3c5c80 !important;
min-width: 100px;
}

a.isango_vkontakte span:before {
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24px' height='24px' fill='white'><path d='M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm-.4 7.4c.7 0 .9 0 1.2.1.8.2.5.9.5 2.8 0 .6-.1 1.4.3 1.7.2.1.6 0 1.7-1.9.5-.9.9-1.9.9-1.9s.2-.2.3-.2c.1-.1.3-.1.3-.1h2.5s.7-.1.9.2c.1.4-.3 1.2-1.3 2.5-1.7 2.3-1.9 2.1-.5 3.3 1.3 1.2 1.6 1.8 1.6 1.9.5.9-.6 1-.6 1h-2.2s-.5.1-1.1-.3c-.8-.6-1.6-2-2.2-1.8-.6.2-.6 1.5-.6 1.5s0 .3-.1.4c-.2.2-.4.2-.4.2h-1s-2.2.1-4.1-1.9c-2.1-2.2-3.9-6.5-3.9-6.5s-.1-.3 0-.4c.1-.2.5-.2.5-.2h2.3s.2 0 .4.2c.1.1.2.3.2.3s.4 1 .9 1.8c1 1.7 1.4 2.1 1.8 1.9.5-.3.3-2.4.3-2.4s0-.8-.2-1.1c-.2-.3-.6-.3-.8-.4-.1 0 .1-.3.4-.5.4-.2 1.2-.2 2-.2z' /></svg>");
}

a.isango_vkontakte:hover {
background: #3c5c80 !important;
}

a.isango_yahoo {
background: #5d0bed !important;
border: 1px solid #4a09bc !important;
Expand Down
14 changes: 14 additions & 0 deletions upload/inc/plugins/isango/vkontakte.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[auth]
url = "https://oauth.vk.com/authorize"
params[scope] = "email"

[token]
url = "https://oauth.vk.com/access_token"

[api]
url = "https://api.vk.com/method/getProfiles"

[info]
id = "{$u['response'][0]['id']}"
name = "{$u['response'][0]['first_name']} {$u['response'][0]['last_name']}"
email = "{$u['email']}"