-
Notifications
You must be signed in to change notification settings - Fork 387
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
Show legacy forum icons on topic listing, posts, and post search #11277
base: master
Are you sure you want to change the base?
Conversation
$table->mediumIncrements('icons_id'); | ||
$table->string('icons_url')->default(''); | ||
$table->tinyInteger('icons_width')->default(0); | ||
$table->tinyInteger('icons_height')->default(0); | ||
$table->unsignedMediumInteger('icons_order')->default(0); | ||
$table->boolean('display_on_posting')->default(true); | ||
|
||
$table->index(['display_on_posting'], 'display_on_posting'); |
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.
could use a double-check for accuracy bc I just copied thsi from phpbb3.0
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.
use App\Traits\Memoizes; | ||
use Illuminate\Database\Eloquent\Collection; | ||
|
||
class ForumLegacyIcons |
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.
It doesn't seem it's used frequently enough to warrant this (and all the usage seems involve querying the post/topic)
<img | ||
alt="" | ||
class="forum-legacy-icon" | ||
src="{{ osu_url('forum_legacy_icons') }}/{{ $icon->icons_url }}" |
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.
the url generation should be the icon's method
// See the LICENCE file in the repository root for full licence text. | ||
|
||
.forum-legacy-icon { | ||
margin: 0 5px; |
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.
I think this can use gap on __icons instead
@@ -14,6 +14,11 @@ | |||
> | |||
<img class="search-forum-post__avatar-image" src="{{ $user->user_avatar }}"> | |||
</a> | |||
|
|||
@if ($post->legacyIcon() !== null) |
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.
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.
Icons should go before or after the title, or in the information lines at the bottom, imo. It should definitely not be shifting the layout of entire blocks.
resolves #2814
it's pretty ugly with most icons but I hope that can be forgiven since it's just a historical thing.