-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ticktackk/develop
1.0.3
- Loading branch information
Showing
10 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Upload Avatar From URL for XenForo 2.1.10.2+</h1><h2>Description</h2><p>This add-on allows users with permission to upload avatar from URL.</p><h2>Requirements</h2><ul><li>PHP 7.3+</li></ul><h2>Permissions</h2><h4>General permissions</h4><ul><li>Upload an avatar from URL</li></ul><h2>License</h2> | ||
This project is licensed under the MIT License - see the <a href="https://github.com/ticktackk/UploadAvatarFromUrlForXF2/blob/master/LICENSE.md">LICENSE.md</a> file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
[SIZE=6][B]Upload Avatar From URL for XenForo 2.1.10.2+[/B][/SIZE] | ||
|
||
[SIZE=5][B]Description[/B][/SIZE] | ||
[HEADING=1]Upload Avatar From URL for XenForo 2.1.10.2+[/HEADING] | ||
[HEADING=1]Description[/HEADING] | ||
This add-on allows users with permission to upload avatar from URL. | ||
|
||
[SIZE=5][B]Requirements[/B][/SIZE] | ||
[HEADING=1]Requirements[/HEADING] | ||
[LIST] | ||
[*]PHP 7.3+ | ||
[/LIST] | ||
|
||
[SIZE=5][B]Permissions[/B][/SIZE] | ||
[TABLE] | ||
[TR] | ||
[TH]Group[/TH] | ||
[TH]Permission[/TH] | ||
[/TR] | ||
[TR] | ||
[TD]General permissions[/TD] | ||
[TD]Upload an avatar from URL[/TD] | ||
[/TR] | ||
[/TABLE] | ||
|
||
[SIZE=5][B]License[/B][/SIZE] | ||
[HEADING=1]Permissions[/HEADING] | ||
[HEADING=3]General permissions[/HEADING] | ||
[LIST] | ||
[*]Upload an avatar from URL | ||
[/LIST] | ||
[HEADING=1]License[/HEADING] | ||
This project is licensed under the MIT License - see the [URL='https://github.com/ticktackk/UploadAvatarFromUrlForXF2/blob/master/LICENSE.md']LICENSE.md[/URL] file for details. |
28 changes: 28 additions & 0 deletions
28
_files/js/ticktackk/upload_avatar_from_url/xf/avatar.23x.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var TickTackk = window.TickTackk || {}; | ||
TickTackk.UploadAvatarFromUrl = TickTackk.UploadAvatarFromUrl || {}; | ||
|
||
;((window, document) => | ||
{ | ||
'use strict' | ||
|
||
XF.AvatarUpload = XF.extend(XF.AvatarUpload, { | ||
__backup: { | ||
'ajaxResponse': 'tckUploadAvatarFromUrl__ajaxResponse' | ||
}, | ||
|
||
ajaxResponse: function(e, data) | ||
{ | ||
this.tckUploadAvatarFromUrl__ajaxResponse(e, data); | ||
|
||
const form = this.target | ||
const customType = form.querySelector('.js-tckUploadAvatarFromUrl_customType:checked') | ||
const urlField = form.querySelector('.js-tckUploadAvatarFromUrl_urlField') | ||
const useCustom = (form.querySelector('input[name="use_custom"]:checked').value == 1) | ||
|
||
if ((customType !== undefined) && (customType.value === 'url') && (urlField !== undefined) && useCustom) | ||
{ | ||
urlField.value = ''; | ||
} | ||
} | ||
}) | ||
})(window, document) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters