Package: aa-bulletin-board
AA Bulletin BoardSimple bulletin board forAlliance AuthAA Bulletin Board⚠️ Before You Install This Module ⚠️InstallationStep 1: Install the PackageStep 2: Configure Alliance AuthSettings in/home/allianceserver/myauth/myauth/settings/local.pySettings in/home/allianceserver/myauth/myauth/urls.pyStep 3: Configure Your WebserverApacheNginxStep 4: Finalizing the InstallationStep 5: Set Up PermissionsPermissionsChangelogTranslation StatusContributing⚠️ Before You Install This Module ⚠️This module needs quite some configuration done before working properly. You need to
modify your Apache/Nginx configuration as well as the global URL config of Alliance
Auth. So please only install if you know what you're doing/feel comfortable to make
these kinds of changes. For your own sanity, and mine :-)InstallationImportant: Please make sure you meet all preconditions before you proceed:AA Bulletin Board is a plugin for Alliance Auth. If you don't have Alliance Auth
running already, please install it first before proceeding. (see the officialAA installation guideor details)Aa Bulletin Board needs a couple of changes made to your Webserver and Alliance
Auth configuration. So make sure you know how to do so. The steps needed will be
described in this document, but you need to understand what will be changed.Step 1: Install the PackageMake sure you're in the virtual environment (venv) of your Alliance Auth
installation Then install the latest release directly from PyPi.pipinstallaa-bulletin-boardStep 2: Configure Alliance AuthSettings in/home/allianceserver/myauth/myauth/settings/local.pyThis is fairly simple, configure your AA settings (local.py) as follows:# AA Bulletin BoardINSTALLED_APPS+=["ckeditor","ckeditor_uploader","django_ckeditor_youtube_plugin","aa_bulletin_board",# https://github.com/ppfeufer/aa-bulletin-board]if"ckeditor"inINSTALLED_APPS:# ckEditorimportckeditor.configsMEDIA_URL="/media/"MEDIA_ROOT="/var/www/myauth/media/"X_FRAME_OPTIONS="SAMEORIGIN"CKEDITOR_UPLOAD_PATH="uploads/"CKEDITOR_RESTRICT_BY_USER=TrueCKEDITOR_ALLOW_NONIMAGE_FILES=False# Editor configuration## If you already have this from another app, like `aa-forum`, you don't need to# define this again, just add it to the `CKEDITOR_CONFIGS` dict, see below## You can extend and change this to your needs# Some of the options are commented out, feel free to play around with themckeditor_default_config={"width":"100%","height":"45vh","youtube_responsive":True,"youtube_privacy":True,"youtube_related":False,"youtube_width":1920,"youtube_height":1080,"extraPlugins":",".join(["uploadimage",# "div","autolink",# "autoembed",# "embedsemantic","clipboard","elementspath",# "codesnippet","youtube",]),"toolbar":[{"name":"styles","items":["Styles","Format",# "Font",# "FontSize",],},{"name":"basicstyles","items":["Bold","Italic","Underline","Strike",# "Subscript",# "Superscript",# "-",# "RemoveFormat",],},{"name":"clipboard","items":[# "Cut",# "Copy",# "Paste",# "PasteText",# "PasteFromWord",# "-","Undo","Redo",],},{"name":"links","items":["Link","Unlink","Anchor",],},{"name":"insert","items":["Image","Youtube","Table","HorizontalRule","Smiley","SpecialChar",# "PageBreak",# "Iframe",],},{"name":"colors","items":["TextColor","BGColor",],},{"name":"document","items":[# "Source",# "-",# "Save",# "NewPage",# "Preview",# "Print",# "-",# "Templates",],},],}# Add the external YouTube pluginaa_bulletin_board__external_plugin_resources=[("youtube","/static/ckeditor/ckeditor/plugins/youtube/","plugin.min.js",)]# Put it all togetherCKEDITOR_CONFIGS={"default":ckeditor.configs.DEFAULT_CONFIG,"aa_bulletin_board":ckeditor_default_config,}CKEDITOR_CONFIGS["aa_bulletin_board"]["external_plugin_resources"]=aa_bulletin_board__external_plugin_resourcesSettings in/home/allianceserver/myauth/myauth/urls.pyNow let's move on to editing the global URL configuration of Alliance Auth. To do so,
you need to open/home/allianceserver/myauth/myauth/urls.pyand change the
following block right before thehandlerdefinitions:# URL configuration for cKeditorfromdjango.appsimportappsifapps.is_installed("ckeditor"):# Djangofromdjango.contrib.auth.decoratorsimportlogin_requiredfromdjango.views.decorators.cacheimportnever_cache# ckEditorfromckeditor_uploaderimportviewsasckeditor_viewsurlpatterns=[re_path(r"^upload/",login_required(ckeditor_views.upload),name="ckeditor_upload"),re_path(r"^browse/",never_cache(login_required(ckeditor_views.browse)),name="ckeditor_browse",),]+urlpatternsAfter this, yoururls.pyshould look similar to this:fromdjango.urlsimportinclude,re_pathfromallianceauthimporturls# Alliance auth urlsurlpatterns=[re_path(r"",include(urls)),]# URL configuration for cKeditorfromdjango.appsimportappsifapps.is_installed("ckeditor"):# Djangofromdjango.contrib.auth.decoratorsimportlogin_requiredfromdjango.views.decorators.cacheimportnever_cache# ckEditorfromckeditor_uploaderimportviewsasckeditor_viewsurlpatterns=[re_path(r"^upload/",login_required(ckeditor_views.upload),name="ckeditor_upload"),re_path(r"^browse/",never_cache(login_required(ckeditor_views.browse)),name="ckeditor_browse",),]+urlpatternshandler500="allianceauth.views.Generic500Redirect"handler404="allianceauth.views.Generic404Redirect"handler403="allianceauth.views.Generic403Redirect"handler400="allianceauth.views.Generic400Redirect"Step 3: Configure Your WebserverYour webserver needs to know from where to serve the uploaded images, of course, so we
have to tell it.ApacheIn your vhost configuration you have a lineProxyPassMatch ^/static !, which tells
the server where to find all the static files. We're adding a similar line for the
media, right below that one.Add the following right below the static proxy match:ProxyPassMatch^/media!Now we also need to let the server know where to find the media directory we just
configured the proxy for. To do so, add a new Alias to your configuration. This can
be done right below the already existing Alias for/static:Alias"/media""/var/www/myauth/media/"At last, a Directory rule is needed as well. Add the following code below to the
already existing Directory rule for the static files:<Directory"/var/www/myauth/media/">Requireallgranted</Directory>So the whole block should now look like this:ProxyPassMatch^/static!ProxyPassMatch^/media!#***NEWproxyruleProxyPass/http://127.0.0.1:8000/ProxyPassReverse/http://127.0.0.1:8000/ProxyPreserveHostOnAlias"/static""/var/www/myauth/static/"Alias"/media""/var/www/myauth/media/"<Directory"/var/www/myauth/static/">Requireallgranted</Directory><Directory"/var/www/myauth/media/">Requireallgranted</Directory>Restart your Apache webserver.NginxIn order to let Nginx know where to find the uploaded files, you need to add a new
location rule to the configuration.location/media{alias/var/www/myauth/media;autoindexoff;}Restart your Nginx webserver.Step 4: Finalizing the InstallationRun static files collection and migrationspythonmanage.pycollectstatic
pythonmanage.pymigrateRestart your supervisor services for AuthStep 5: Set Up PermissionsNow it's time to set up access permissions for your new module. You can do so in
your admin backend. Read thePermissionssection for more information
about the available permissions.PermissionsIDDescriptionNotesbasic_accessCan access the Bulletin BoardGrants read access to the bulletin boardmanage_bulletinsCan manage bulletinsGrants the right to edit and delete existing bulletins and create new bulletinsChangelogSeeCHANGELOG.mdTranslation StatusDo you want to help translate this app into your language or improve the existing
translation? -Join our team of translators!ContributingDo you want to contribute to this project? That's cool!Please make sure to read theContribution Guidelines.(I promise, it's not much, just some basics)