Code Monkey home page Code Monkey logo

website's Introduction

ArmaForces Website ArmaForces Website

ArmaForces Website

OAuth and authentication setup

  1. Go to: https://discordapp.com/developers/applications

  2. Create new application or select existing one.

  3. Go to OAuth2 -> General tab.

    • Copy Client Id and Client Secret and place them under APP_SECURITY_OAUTH_DISCORD_CLIENT_ID and APP_SECURITY_OAUTH_DISCORD_CLIENT_SECRET environment variables respectively.

    • Add a new redirect to https://<your domain>/security/connect/discord/check.

  4. Go to Bot tab. Copy bot Token and place it under APP_SECURITY_OAUTH_DISCORD_BOT_TOKEN environment variable.

  5. Get your Discord Server Id from Server SettingsWidget tab and place it under APP_SECURITY_OAUTH_DISCORD_SERVER_ID environment variable.

  6. Go to OAuth2 -> URL Generator tab. Select bot scope and copy generated URL. Use it to add bot to your server.

  7. Enter roles names that user must have assigned to be considered a recruit or a member of the unit and place them under APP_SECURITY_OAUTH_DISCORD_RECRUIT_ROLE_NAME and APP_SECURITY_OAUTH_DISCORD_MEMBER_ROLE_NAME keys respectively in .env.local file.

Xdebug setup

Port: 9003
IDE key: armaforces-web
Path mappings: /www/app

Xdebug can be turned on/off from php container using following commands (available for dev environment, disabled by default):

xon
xoff

website's People

Contributors

3mydlo3 avatar dependabot[bot] avatar jskowronski39 avatar veteran29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

website's Issues

Modlists' names with links

Name of the modlist could be clickable links instead/same as download button at the end of row. Especially when download button in fact does not download anything just open next page. I think it is more intuitive for users.

cDLC support in modlists

We should support DLCs as separate category, not as serverside mods.

We can then include DLC data to load in downloadable file:

  <body>
    <h1>Arma 3  - Preset <strong>ArmaForces WietnamMikeForce 2021_05_07 22_10</strong></h1>
    <p class="before-list">
      <em>Drag this file or link to it to Arma 3 Launcher or open it Mods / Preset / Import.</em>
    </p>
    <div class="mod-list">
        <!-- Mods data -->
    </div>
    <div class="dlc-list">
      <table>
        <tr data-type="DlcContainer">
          <td data-type="DisplayName">S.O.G. Prairie Fire</td>
          <td>
            <a href="https://store.steampowered.com/app/1227700" data-type="Link">https://store.steampowered.com/app/1227700</a>
          </td>
        </tr>
      </table>
    </div>
    <div class="footer">
      <span>Created by Arma 3 Launcher by Bohemia Interactive.</span>
    </div>
  </body>

Feature request: Ability to invalidate/disable mod

It would be very useful if you could mark mod as invalid/disabled, possibly with some "reason" field. This way all mods would stay in database and we would have an ability to track broken mods.

Just some thoughts, you can skip to summary

It would not be possible to add such invalid mod to any modlist. There is still a question what should be done with modlists that already have such mod? We have 3 options:

  1. Exclude disabled mod from modlists (or API only)
  2. Mark the mod on modlists as disabled
  3. Leave it as is, probably with some warning

I do not like option 1 as the mod would need to be manually readded later on. And in case we just make this mod hidden, the owner of the modlist should be able to see that he has such mod included. Also if we would to exclude such mod from API response, we need to make sure it is clearly stated.

If the mod is included by group of mods I think it would be best to automatically disable the mod in the group so all modlists are updated instantly. These groups will be heavily moderated and doing it this way should not break anything.

For disabling the mod, another option is to give ability to disable mod in selected/all modlists/groups but this seems a lot of work for not much profit.

Summary

The invalid/disabled mod:

  • Should have a field for invalidation/disabling reason
  • Should not be loaded by server
  • Can (and probably should) appear on the modlist but greyed/striped with some sort of warning that it is disabled and will not be included in neither downloaded files nor in API response.
  • If the above is like suggested, it can be added to any modlist but it should appear on mods selection list with the same "invalidated" styling as when browsing modlist.
  • Invalid and disabled mods could differ in functionality. Disabled would not work at all (this one could be grayed and striped) and the invalidated would work but with warning still shown. Names are WIP.

I would not pursue into splitting how it works for modlists and groups of mods, meeting the above points will be enough.

May I use this for our website?

Hello,
your website looks great. I would like to clone and edit for our website use if you have the permission. However, I'm not sure how would I do that. Do you have any manual for deploying it to a php shared server?

Feature request: Mod tags

Mod tags would be really useful for filtering our mods base. We could add tags for maps, mission making mods, editor safe mods, mods without valid keys, and probably much more.

Feature request: Include mod description on mods download page

The descriptions for client/optional mods would be great for people so they would not need to look through Workshop descriptions. Required mods could also benefit from such descriptions.

Right now the descriptions are only available in mods list and when creating modlist.

Add prefix to modlist preset name

Add a prefix to a modlist's PresetName (e.g. "AF_Default" instead of current "Default").
This would help differentiate between presets when browsing them in A3 Launcher, especially for people not playing exclusively in ArmaForces and with such generic preset names as "Vanilla" used.

Feature request: Visible mod description

Currently on modlist download page, when you face optional mods selection, there is no way to read the mod description beside opening Workshop page. The same when you are creating/editing a modlist.

The description could appear on hover to keep main view uncluttered.

Feature request: Searchable/Filterable mods/modsets/mods groups

Right now the only way of finding a mod is by it's name by using Ctrl + F.

It's impossible to search for Workshop ID.
It could be useful to filter out broken/disabled/unsupported mods.
It would be great to have filter for tags (which are in progress).
Maybe some searching for names/descriptions e.g. if we would search ACE it would show only the mods containing ACE in either name or description.

Mismatched languages

For now on the main page every paragraph title is written in English, and the paragraph itself is in Polish. Not sure whether it's an intentional mismatch.

Modlists: Allow user to edit only his owned modlists

New permission to Manage unowned modlists should be added to support modlists creation by mission makers. They would not have it and therefore would be only able to edit their own modlists.

It would also be nice if modlist owner could be changed and if there could be more than one owner (but this is not something crucial).

Rename modlist to modset

Modlist should be renamed to Modset and become only official term.

Name modset suggests it's some collection of distinct mods which are intended to work together, while modlist is just some list of mods.

If we look from other perspective, Modset contains:

  • List of used mods (so this is the modlist)
  • Server settings, configuration and profiles

so when we create some UI for Server Manager, naming will already be consistent

Also sometimes it's useful to distinguish modset and modlist (as modlists API really gives us jsut list of mods) but we've choosen to go for simplicity with one name and now I think it shouldn't be modlist.

Of course I'm open for discussion.

Add [AF] tag to calendar event title

Right now, calendar items have only mission name in title. This is confusing, since tittles aren't always descriptive.

I'm not referencing high-maybe-level in any way

Simply adding something like [AF] to the event title would clear things up a lot

Feature request: Download with mission-making mods

On the modlist download page, the "Download with mission-making mods" (or "Download with editor-safe mods") button would really help people and maybe often prevent them from editing the mission with client-side mods loaded.

The tags mentioned in #126 could help with implementing this feature.

New modlist download page doesn't contain modlist's name

When we enter specific modlist download page, we no longer have it's name displayed, only some weird id in link which is useless for users.

It could be solved by:

  • Using modlist's name in url instead of id
  • Adding modlist's name somewhere on page

It would be nice if both url and page contained modlist's name. It will be more convenient for users, especially when using our mission bot, which is not going to be replaced by web signups any time soon.

Feature request: Show all included mods and how are they included on modlist creation/edition

Right now when you edit the modlist you must remember which mods are included in mods groups you have selected. It is not too user friendly, some summary view would be nice. Maybe the current pages on the right could contain some information on mods that are currently included in the modlist by some group (and which one). The mod itself should not have switch toggled as modlist maker might want to force the mod.

Not all group permissions for mods and modlists work

I've discovered some issues with permissions:

  • Permission for mod removal doesn't work neither by assigning the permission to user nor to group.
  • Permission for changing mod status works only if assigned to user.
  • Having all permissions assigned to group I wasn't able to change modlist owner. When I assigned myself all the permissions, the option to change owners appeared.

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.