Giter Club home page Giter Club logo

twhl's People

Contributors

aj292 avatar joeltroch avatar logicandtrick avatar oskarlh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

twhl's Issues

[WikiCode] Styling is applied in inline code

WikiCode styling is applied in the content of inlined code. Here is an example showing the issue:

How about *tasks*? The `StartTask( Task_t *pTask )` method is called whenever a *task* is requested to be performed. Let us look at *task* startup for small flinch:

And here is how the preview window show it:

firefox_2020-09-02_21-39-43

You can see that the asterisk used to tell that pTask is a pointer of Task_t in the inlined code gets interpreted as bold.

[Wiki] Preview comments is not working

Using the latest version of Opera on Windows, previewing wiki comment doesn't work due to missing stuff in JQuery, console output :

POST http://beta2.twhl.info/api/format?field=text 404 (Not Found)
send @ jquery.js:8630
ajax @ jquery.js:8166
J.(anonymous function) @ jquery.js:8311
(anonymous function) @ Home:162
dispatch @ jquery.js:4435
m.handle @ jquery.js:4121

How to reproduce : go to any wiki page, type anything or nothing in the comment textarea, press the "Update Preview" button.

[WikiCode] Styling isn't applied when a sentence ends with a colon

When writing a wiki article, I have the following sentence:

Same thing with `Schedule_t` for a *schedule*:

In the preview window, the word "schedule" isn't in bold and the asterisks are shown (Schedule_t is fine and shown as inlined code). My guess is that the parser think I'm trying to write a smiley/emoticon/emoji.

Use bootstrap variables where possible

Some styles are easier to apply as bootstrap variable changes, such as the pagination and border radius overrides.

Add this and then remove all the li styles from headings.less:

@border-radius-base:        0px;
@border-radius-large:       0px;
@border-radius-small:       0px;


/* pagination */

@pagination-color:                     #fff;
@pagination-bg:                        @twhl-brand;
@pagination-border:                    lighten(@twhl-brand, 10%);

@pagination-hover-color:               #fff;
@pagination-hover-bg:                  darken(@twhl-brand, 10%);
@pagination-hover-border:              lighten(@twhl-brand, 10%);

@pagination-active-color:              #fff;
@pagination-active-bg:                 @brand-primary;
@pagination-active-border:             @brand-primary;

@pagination-disabled-color:            @gray-light;
@pagination-disabled-bg:               #ddd;
@pagination-disabled-border:           #ddd;


/* labels */

.label {
    border-radius: 0;
}

Conflicting licenses (LICENSE file, OpenAPI spec)

https://github.com/LogicAndTrick/twhl/blob/master/LICENSE is MIT
The license for the API specifically is CC BY-NC-ND

'license' => [
'name' => 'CC BY-NC-ND',
'url' => 'https://creativecommons.org/licenses/by-nc-nd/4.0/'
],
. According to Swagger, the license object contains "License information for the exposed API". The CC license is more restrictive than MIT and it's unclear which parts of TWHL's code are MIT licensed and which are CC licensed. If the intent is to license the content exposed by the API under CC BY-NC-ND, some Google search results indicate termsOfService ("The Terms of Service for the API") might be the best place to include a license for the content.

Private Message Blacklisting

Ability for users to maintain a blacklist of users who cannot send them private messages.

  • Add a page to their private message section to edit the blacklist
  • Allow users to be added and removed to the blacklist
  • Allow users to blacklist the sender when they are reading a message
  • Notify the sender and prevent sending if a user tries to message a user that has blacklisted them

Wiki page contributors section for author credits

Currently, the last editor of an article (usually me) essentially "steals the credit" for any given article or tutorial by having their username and avatar in the article header. Remove the username+avatar (not the timestamp) from the "last edited" section, and add new sections to credit original authors or any other significant contributors to the article content. Allow multiple authors in the case of articles that get merged together. The functionality should work for both TWHL members (link to profile) and archived articles (no link or maybe a wayback link).

/api error

ApiController.php:584 foreach ($obj->visible as $prop) {
fails because of image-upload's
ApiController.php:519 'object' => \stdClass::class,
stdClass doesn't have the visible property.

This is why https://twhl.info/api gives 500

Solutions: change the object type or only iterate $obj->visible if isset($obj->visible)

Overall TWHL4 progress

This is everything that's left to do on TWHL4 before it can be released.

  • Database
    • Tables
    • TWHL 3 to 4 conversion scripts
      • SQL scripts (most things)
        • Users
        • Forums
        • Vault
        • Journals
        • News
        • Competitions
        • Shouts
        • Messages
        • Polls
        • Post processing
      • Coded scripts
        • Wiki
        • Tutorials (and images)
        • Articulator
        • Competition images
        • Vault
          • Images
          • Reviews
          • Uploads
        • Avatars
        • Parser scripts (e.g. forums, journals, comments, etc)
  • Backend
    • Auth - login information
    • Auth - banned users
    • Auth - convert twhl3 account to twhl4
  • Consistency checks
    • Page titles
    • Date formats
    • Header containers
    • User avatars
    • All features implemented
  • Search
    • Wiki
    • Forum
    • Users
  • Main page
    • Vault
    • Wiki
    • Forums
    • Journals
    • News
    • Poll
  • News
    • Listings
    • Detail
  • Forums
    • Forum index
    • Threads
    • Posts
    • Styles
  • Wiki
    • Pages
    • Uploads
    • Categories
    • Styles
    • Default content
  • Vault
    • Listing/filter page
    • Item details
    • Render ratings / stars
    • Reviews
    • MOTM
  • Competitions
    • Listings
    • Competition workflows
    • Judging / voting
    • Results
    • Styles
  • Users
    • Listing
    • Profile view
      • Statistics
    • Control Panel
      • Profile editing
      • Ban/unban
      • Obliterate
    • Private messaging
      • Deleting threads
      • Styles
    • Journals
      • Styles
  • Comments
    • Metadata (ratings, etc)
    • Styles
  • Shoutbox
    • Styles

Surface wiki content more prominently on the front page

To make it clear that we have all our previously existing content in the wiki, there should be some sort of "featured articles" section on the front page for wiki pages.

Options include:

  • Random wiki article (per-refresh or per-day)
  • Featured tutorial (random, changes per day)
  • Featured article (curated, would need to change often)
  • Recently updated pages (but this overlaps with the wiki edits widget)
  • Links to common pages (tutorial categories)

In terms of placement, it could go either above or below the "new in the vault" widget, I'm leaning towards above for now, but I don't know yet.

Another option would be to remove the "recent wiki edits" widget in favour of this new one, and give it a slightly different style so it stands out.

Improve preview metadata for social media platforms

Example:

<meta name="description" property="og:description" content="This is a Map. It is hosted on TWHL. Submitted by A User.">
<meta property="og:type" content="website">
<meta property="og:title" content="Super Cool Map Name - TWHL Vault">
<meta property="og:image" content="https://twhl.info/vault/1234/preview.jpg">
<meta property="og:url" content="https://twhl.info/vault/1234">

Redesign checklist

I'm rewriting all the HTML and CSS because this is never getting finished I guess

  • Layout/Navigation
  • Home Page
  • Forums
  • Wiki
  • Vault
  • Competitions
  • Journals
  • News
  • Polls
  • Members/Profiles
  • User Control Panel
  • Comments
  • Auth
  • Search

Old (TWHL <= 3?) maps are not marked as including an RMF/VMF

Look at the "Included" field of maps such as
https://twhl.info/vault/view/5635
It lists BSP twice, instead of BSP and RMF/VMF:
image

Perhaps because of these lines (notice the duplicate type_ids):

\App\Models\Vault\VaultInclude::Create([ 'type_id' => 1, 'name' => 'BSP', 'description' => 'Compiled map', 'orderindex' => 1 ]);

\App\Models\Vault\VaultInclude::Create([ 'type_id' => 1, 'name' => 'RMF/VMF', 'description' => 'Map source file', 'orderindex' => 2 ]);

Bad links when viewing a revision of a wiki page from before it was renamed

The wiki page "AAATRIGGER texture" was renamed "AAATRIGGER".
https://twhl.info/wiki/page/AAATRIGGER : the Edit and History links work as expected.
But go to the history page and click on Windawz's "#5725". It takes you to https://twhl.info/wiki/page/AAATRIGGER_texture/5725 . On that page, clicking the History link gives you 404, the Edit link gives you 500, and the "AAATRIGGER texture" link left of the Edit link takes you to a page that tells you the article doesn't exist.

WikiCode: ability to add block-level content to table cells

Introduce a new "table reference" element that stores content against a key instead of inserting it into the parsed body. And then allow table cells to contain a reference (but no other content, if a reference is specified.)

Doing it this way is better than trying to allow newlines in table cell contents (which would be difficult to parse)

WikiCode - Internal links does not support anchors

How to reproduce?

  1. Edit this wiki article.
  2. Replace this "external -> internal link" warning from: [url=https://twhl.info/wiki/page/Monsters_Programming_-_The_Concepts_of_Half-Life%27s_AI#h6186a030dcc80]activity[/url] to [[Monsters Programming - The Concepts of Half-Life's AI#h6186a030dcc80|activity]]

Expected

I should be redirected on that wiki article and section.

Actual

"Page not found: Monsters_Programming_-_The_Concepts_of_Half-Life's_AIh6186a030dcc80"

Suggestions for improvements to the Vault

I have noted down some things I think could be changed to improve the vault, most ideas are about making it easier to find interesting works in the Vault.

  1. If people could mark their own uploads as broken, and moderators could do it too, we could put a little text near the download button to indicate that the download needs fixing, and gray out the screenshot in the list at https://twhl.info/vault/ . It saves the disappointment of finding something you want to try and finding out you can't download it. And could this motivate people to fix their downloads and others to share if they have the content?
  2. It would be helpful if the vault showed the category ("Completed", "Unfinished" etc.) in the list https://twhl.info/vault/ . Take a look at the screenshot below. You are browsing through the vault, but to see which maps are Completed, Unfinished, Examples, or Problem maps, you need to click. I suggest adding a category label near the upload time and the rating.
    image
  3. There are links to https://twhl.info/vault , https://twhl.info/vault?page=1 , https://twhl.info/vault/index , https://twhl.info/vault/index?page=1 , and https://twhl.info/vault/index?games=&cats=&types=&users=&incs=&rate=&sort=&search=&page=1 (and similar addresses) which may be a problem for web crawlers like Google or the Wayback Machine and could reduce their usefulness with TWHL content. I suggest changing the links and search form to avoid having multiple URLs for the same pages. Alternatively, <link rel="canonical" href="..." /> tags could be used. This link takes you to /vault/index:
    image
    This link takes you to /vault:
    image
  4. When you upload a map and have to choose which game it's for and you type "Counter-Strike", Condition Zero doesn't show up because it's written as "CS: Condition Zero". Counter-Strike: Source doesn't show up when you type "Source". Perhaps different variations of the game names could be entered into the database and the search box could look there too?
  5. CS: CZ: Deleted Scenes maps are currently categorised as "CS: Condition Zero". These are single-player maps while normal CZ maps are (usually) multi-player. It would be nice to have Deleted Scenes as a choice in the games list.
  6. Some mods without their own category have plenty of maps: Flat-Life (13), The Specialists (10), Natural Selection (8), Ricochet (8)
  7. I also think Half-Life Source and Half-Life Deathmatch Source deserve their own categories, even though we only have two maps: https://twhl.info/vault/view/6041 https://twhl.info/vault/view/4191
  8. Some vault entries include versions for multiple mods. Should it be possible to select multiple games, or perhaps there should be a Multiple Games (GoldSrc) option in the games list?
  9. Want your map to get noticed? Give it a tall screenshot :) image
  10. When sorting by rating, the number of ratings isn't factored in. So a map with 9 ratings of 5 stars is considered the same as a map with 1 rating of 5 stars. The simplest fix would be to add the number of ratings as a secondary sort order. That would still be unfair to maps with a dozen 5 star ratings and a single 4 star rating, which should probably come before a map with a single rating even if that rating is 5: to fix this, you could instead use a formula such as sort_order = ((2.5 + sum of all ratings) / (number of ratings + 1)). It's not uncommon for websites to use similar formulas to aggregate review scores. image
  11. People are still to this day putting Half-Life Deathmatch maps in "Half-Life", possibly because they see "Deathmatch" and think of Deathmatch Classic. It could be renamed to "Half-Life: multiplayer", or better yet, "Half-Life Deathmatch" could be removed as an option and there could be checkboxes to indicate if it's singleplayer or multiplayer content or either.
  12. For vault items with lots of screenshots, such as https://twhl.info/vault/view/6675 , some the thumbs don't load right away and it looks strange
  13. https://twhl.info/vault Min. Rating filter has the option 0.5 but the minimum possible rating is 1
  14. Metro28 has been uploading a lot of skyboxes, and they are not the only ones in the vault. We could use a new content type: skybox.

Wiki: when one article can't be found, other links may be incorrectly marked as broken

I made (and then undid) this edit to demonstrate the issue: https://twhl.info/wiki/page/Entity_Attribute%3A_Target/6820
Notice how the links to the articles "func_vehiclecontrols (Counter-Strike)" and "func_vehicle (Counter-Strike)" are red (the elements have the class "text-danger"), when only the link to "func_vehicle" (without "(Counter-Strike)") should be red.

image

After deleting the row with the bad link, the other links turn blue: https://twhl.info/wiki/page/Entity_Attribute%3A_Target/6821
image

Library updates

Update libraries and frameworks:

  • Laravel 9
  • Bootstrap 5
  • Vue 3
  • FontAwesome 6

User profiles: add comments list

When viewing user profiles, there are links to see all their maps, forum posts, and so on. Add an extra one that points to a list of comments made by the user.

Message probably intended for forum moderators is shown to others

The "Careful!" text:
Screenshot_20221216-175359

https://twhl.info/thread/view/20328
The thread is 4 months old and I can still post in it. I am of course not a forum moderator, but that message would only make sense if I had some special permission to post.

I guess the 90 here

@if (Date::DiffDays(Date::Now(), $thread->last_post ? $thread->last_post->updated_at : $thread->updated_at) > 90)

should instead be ForumThread::THREAD_LOCK_DAYS

Bad crypto key

The APP_KEY in .env.example is invalid. You can include the step php artisan key:generate in the readme (or include a working key?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.