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

Show legacy forum icons on topic listing, posts, and post search #11277

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

cl8n
Copy link
Member

@cl8n cl8n commented Jun 17, 2024

resolves #2814

it's pretty ugly with most icons but I hope that can be forgiven since it's just a historical thing.


Comment on lines +24 to +31
$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');
Copy link
Member Author

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

Copy link
Collaborator

@nanaya nanaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the icons are very ugly especially with dark background. I wonder if the non-essentials should just be removed

use App\Traits\Memoizes;
use Illuminate\Database\Eloquent\Collection;

class ForumLegacyIcons
Copy link
Collaborator

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 }}"
Copy link
Collaborator

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;
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good place to put the icon. It just looks wrong

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add legacy support for forum icons
3 participants