-
-
Notifications
You must be signed in to change notification settings - Fork 999
[ticket/17623] switch twitter to x in profile #6946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,7 +101,7 @@ | |
| 'AUTH_PROVIDER_OAUTH_SERVICE_BITLY' => 'Bitly', | ||
| 'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook', | ||
| 'AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE' => 'Google', | ||
| 'AUTH_PROVIDER_OAUTH_SERVICE_TWITTER' => 'Twitter', | ||
| 'AUTH_PROVIDER_OAUTH_SERVICE_TWITTER' => 'X', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace with |
||
| 'AUTH_PROVIDER_OAUTH_TOKEN_ERROR_NOT_STORED' => 'OAuth token not stored.', | ||
| 'AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED' => 'OAuth token incorrectly stored.', | ||
| 'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.', | ||
|
|
@@ -842,7 +842,7 @@ | |
| 2 => 'Total members <strong>%d</strong>', | ||
| ), | ||
| 'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s', | ||
| 'TWITTER' => 'Twitter', | ||
| 'TWITTER' => 'X', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace language string to |
||
|
|
||
| 'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image. Please verify that the URL you entered is correct.', | ||
| 'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,6 +148,6 @@ | |
| 'VIEWING_PROFILE' => 'Viewing profile - %s', | ||
| 'VIEW_FACEBOOK_PROFILE' => 'View Facebook Profile', | ||
| 'VIEW_SKYPE_PROFILE' => 'View Skype Profile', | ||
| 'VIEW_TWITTER_PROFILE' => 'View Twitter Profile', | ||
| 'VIEW_TWITTER_PROFILE' => 'View X Profile', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace the word |
||
| 'VIEW_YOUTUBE_PROFILE' => 'View YouTube Profile', | ||
| )); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| <?php | ||
| /** | ||
| * | ||
| * This file is part of the phpBB Forum Software package. | ||
| * | ||
| * @copyright (c) phpBB Limited <https://www.phpbb.com> | ||
| * @license GNU General Public License, version 2 (GPL-2.0) | ||
| * | ||
| * For full copyright and license information, please see | ||
| * the docs/CREDITS.txt file. | ||
| * | ||
| */ | ||
|
|
||
| namespace phpbb\db\migration\data\v33x; | ||
|
|
||
| class profilefields_x_update extends \phpbb\db\migration\migration | ||
| { | ||
| public static function depends_on(): array | ||
| { | ||
| return [ | ||
| '\phpbb\db\migration\data\v33x\profilefields_update', | ||
| ]; | ||
| } | ||
|
|
||
| public function update_data(): array | ||
| { | ||
| return [ | ||
| ['custom', [[$this, 'update_other_profile_fields']]], | ||
| ]; | ||
| } | ||
|
|
||
| public function revert_data(): array | ||
| { | ||
| return [ | ||
| ['custom', [[$this, 'revert_other_profile_fields']]], | ||
| ]; | ||
| } | ||
|
|
||
| public function update_other_profile_fields(): void | ||
| { | ||
| $profile_fields = $this->table_prefix . 'profile_fields'; | ||
|
|
||
| $this->db->sql_query( | ||
| "UPDATE $profile_fields | ||
| SET field_contact_url = 'https://x.com/%s' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A second opinion is probably wise although I'm pretty sure you shouldn't be changing database migrations. This only adds a custom profile field that can be changed in the ACP anyway. I think the most appropriate way to go about this is to create a new migration (possibly). |
||
| WHERE field_name = 'phpbb_twitter'" | ||
| ); | ||
| } | ||
|
|
||
| public function revert_other_profile_fields(): void | ||
| { | ||
| $profile_fields = $this->table_prefix . 'profile_fields'; | ||
|
|
||
| $this->db->sql_query( | ||
| "UPDATE $profile_fields | ||
| SET field_contact_url = 'https://twitter.com/%s' | ||
| WHERE field_name = 'phpbb_twitter'" | ||
| ); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -693,7 +693,7 @@ Colours and backgrounds for buttons.css | |
| .phpbb_youtube-icon { background-position: -98px 0; } | ||
| .phpbb_facebook-icon { background-position: -119px 0; } | ||
| .phpbb_skype-icon { background-position: -161px 0; } | ||
| .phpbb_twitter-icon { background-position: -203px 0; } | ||
| .phpbb_twitter-icon { background-position: -202px 0; } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change the class name to |
||
| .phpbb_yahoo-icon { background-position: -224px 0; } | ||
|
|
||
| /* Forum icons & Topic icons */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to replace
VIEW_TWITTER_PROFILEwithVIEW_X_PROFILEalthough perhaps it needs to be something a bit more unique as that kind of makes it seem like a placeholder. Up for discussion as to whether that's okay as is but it definitely needs changing from Twitter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, for 3.3.x I'm unsure how to best treat this since renaming the vars as well certainly adds some extra noice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a fair point.
This is somewhat off-topic, but 4.0 should remove custom fields for social links like this. If an admin wants them it's an easy enough task to add them.