Skip to content
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

Add links to legacy forum threads on beatmapset pages that don't use moddingv2 #1995

Merged
merged 3 commits into from
Dec 15, 2017
Merged
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
1 change: 1 addition & 0 deletions app/Transformers/BeatmapsetTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function transform(Beatmapset $beatmapset = null)
'has_scores' => $beatmapset->hasScores(),
'discussion_enabled' => $beatmapset->discussion_enabled,
'is_watched' => BeatmapsetWatch::check($beatmapset, Auth::user()),
'legacy_thread_url' => $beatmapset->thread_id !== 0 ? osu_url('legacy-forum-thread-prefix').$beatmapset->thread_id : null,
];
}

Expand Down
1 change: 1 addition & 0 deletions config/osu.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
'base' => 'https://osu.ppy.sh',
'dev' => 'https://discord.gg/ppy',
'installer' => 'https://m1.ppy.sh/r/osu!install.exe',
'legacy-forum-thread-prefix' => '/forum/t/',

This comment was marked as off-topic.

This comment was marked as off-topic.

'smilies' => '/forum/images/smilies',
'support-the-game' => '/p/support#transactionarea',

Expand Down
8 changes: 8 additions & 0 deletions resources/assets/coffee/react/beatmapset-page/header.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ class BeatmapsetPage.Header extends React.Component
icon: 'comments-o'
props:
href: laroute.route 'beatmapsets.discussion', beatmapset: @props.beatmapset.id
else if @props.beatmapset.legacy_thread_url

This comment was marked as off-topic.

el BigButton,
modifiers: ['beatmapset-header']
text:
top: osu.trans 'beatmapsets.show.discussion'
icon: 'comments-o'
props:
href: @props.beatmapset.legacy_thread_url

div className: 'beatmapset-header__box beatmapset-header__box--stats',
el BeatmapsetPage.Stats,
Expand Down