Darth-Apple / BAM

Board Announcements Manager (MyBB Plugin)
GNU General Public License v3.0
2 stars 3 forks source link

IMPORTANT: You are viewing the development version of this plugin (staging for 2.1). As such, it has changes that are not fully release-ready. We recommend downloading BAM from the official MyBB Extend website, as it is fully tested and is more stable at this time!


Next Release: 2.1 (maintenance release) Status: In development (track progress in this repository)

BAM Announcements Manager has been updated, and is better than ever before! This plugin allows you to manage announcements on your forum’s header area, specific boards, or on any page of your community. These are styled based on the announcements used on the MyBB Support Forum, so if you’ve been looking for a plugin to make similar announcements, this plugin is the answer to your requests!


(MAJOR UPDATE) FEATURES IN BAM 2.X:

This plugin is supported on all MyBB 1.8.X forums, and has been tested extensively. If you used BAM 1.0 before, it is strongly recommended to update to the new version of this plugin, as it is significantly more advanced and more powerful than the initial version. Many thanks to @Guardian (Sawedoff), @VintageDaddyo and @Eldenroot for many ideas, contributions, testing, and for feedback on the new version of this mod! You guys have made BAM 2 possible.


CUSTOM ANNOUNCEMENT PAGES (ADVANCED):

This is a new feature in BAM 2.X that allows you to paste a link to a specific page to display your announcement. This setting can also take multiple values, separated by commas. Some examples of possible inputs are listed below.

THINGS BAM EXPLICITLY PARSES:

EXAMPLES:

This is an advanced feature that is very powerful, but that has specific parameters that must be met in order to work properly.

URL REWRITES: This plugin supports search engine friendly URLs as defined by MyBB's built-in htaccess file. You may paste these in exactly the same manner as native URLs, and BAM will convert these internally.

THIRD PARTY SEO PLUGINS: BAM does not have support for third party SEO plugins, such as Google SEO. You must paste native URLs into this field for them to be properly parsed if you are using such plugins. If you would like to help extend BAM, please reach out, and I will be happy to collaborate with you to help bring third-party SEO plugin support to BAM.


FREQUENTLY ASKED QUESTIONS:

WHAT IS RANDOM MODE?

CAN I USE HTML IN ANNOUNCEMENTS?

CAN I PUT JAVASCRIPT IN AN ANNOUNCEMENT?

- Javascript is not, by default, enabled. However, you can make BAM load a different template for a specific announcement. If you have a global template named my_announcement_template, put [@template:my_announcement_template] anywhere in your announcement’s text. This tag tells BAM to load a different template, which can contain javascript or anything else that you need. 

CAN I MAKE BAM DISPLAY ON MULTIPLE THEMES WITHOUT DISPLAYING ON EVERY THEME?

- Yes. Put [@themes:1,2,3] anywhere in your announcement’s text. This works for languages too! 

HOW TO I GET MY LANGUAGE AND THEME IDS FOR ANNOUNCEMENT TAGS?

- Language IDs are based on the folder name of the language pack on your forum. Navigate to /inc/languages to see the language packs. The name of your language's folder (english, espanol, etc.) is the value you should use for the language tag. 

- Theme IDs can be seen from the URL when you edit a specific theme in the ACP. Visit your theme. Edit it, and look for (tid=some_number) in your URL. This is your theme ID!

CAN I MAKE ANNOUNCEMENTS UNDISMISSABLE FOR GUESTS?

- Yes. There is a setting in the general BAM settings for this. If guests are disabled for dismissals, they will close, but not be dismissed permanently. 

CAN I RESET ALL DISMISSALS ON THE FORUM?

- Yes. There is a cookie prefix in BAM’s general plugin settings. Change this to any numeric value to reset all dismissals. 
- You can also configure how long the cookie lasts (and how long dismissed announcements remain dismissed). 

CAN I DISPLAY ANNOUNCEMENTS GLOBALLY?

- Yes! Set your announcement to "global" in the drop down menu when creating a new announcement. 

CAN I DISPLAY ANNOUNCEMENTS ON THE PORTAL AND ON THE INDEX?

- Yes! Go to BAM's plugin settings. In the "index page" setting, set it to "portal.php, index.php" (without the quotes), and save. BAM will now consider both of these pages to be your forum's "index page." Any announcement that is set to display on the index will now display on both. 

CAN I DISPLAY ANNOUNCEMENTS ON SPECIFIC PAGES OF MY FORUM?

- Yes! When creating an announcement, select (Other - Advanced) in the drop down menu. Paste a link to specific pages to display your announcement on. This field can take multiple values, separated by a comma. 

- Note that while this works for most pages, there are certain pages that cannot display announcements. See the the "custom pages" section of this readme (above) for more information. 

CAN I ADD MODERATOR CP ACCESS?

CAN I PREVENT FORUM/BOARD FROM DISPLAYING ON NEWTHREAD/NEWREPLY PAGES?

HOW DOES THE FORUM GAMES COUNTING THREAD VARIABLE WORK?

- It works by looking for a group of posts with consecutive numbers. It determines that a relatively large group of consecutive posts must have the correct count, and therefore corrects itself if a user posts the wrong count. It will reset itself if you post a new count for 3-4 posts in a row. 
- {threadreplies} does the same thing, but bases itself on the reply count. If your forum game is not offset from your reply count, use this variable instead. 

I INSTALLED BAM, BUT THE ANNOUNCEMENTS DON'T DISPLAY.

- BAM, (must like most other MyBB plugins), makes template modifications in order to display on your forum. The vast majority of themes can be modified by BAM's installer without issues. However, if your announcements don't display, see the installation instructions (below) for instructions on how to manually modify your template!

ADDING CUSTOM STYLES/COLORS:


UPGRADING FROM BAM 1.0: IMPORTANT

1) RECOMMENDED METHOD: Uninstall the old version of BAM. Upload the new version (either 2.0 or 2.1), and install as usual.


2) ALTERNATIVE METHOD: Use the built in upgrader to keep existing announcements. Upload the new version of BAM. Make sure to leave BAM activated, and navigate to your plugins page. Click the upgrade link that appears in BAM's plugin description. This will make all of the necessary changes to upgrade you to BAM 2.0/2.1!

  1. Note that the upgrade script REQUIRES bam to be fully activated first. This is because it runs in-place straight from within the BAM ACP module. Due to the way that MyBB plugins work, BAM is not able to load its own upgrade script unless it is activated.

  2. This will not break your forum or interrupt announcements! BAM 2 has been specifically designed to enable the new version of BAM to display using the old version's templates and database temporarily. Your forum announcements will remain uninterrupted.

  3. This script doesn't migrate general plugin settings. These have changed heavily from BAM 1 to BAM 2. Make sure to reconfigure BAM's general plugin settings once the upgrade has completed!


UPGRADING FROM 2.0 (TO 2.1):

No database or template changes are present on this release. Simply upload the BAM 2.1 files to your server (overwriting if prompted). This will successfully upgrade to 2.1!


INSTALLATION:


TRANSLATIONS:

Deutsch_sie and Deutsch_du are provided with the github version of this plugin and are ready to use. This translation was kindly provided courtesy of @tc4me from https://autism-4all.at

If you would like to create additional translations, you are allowed to create the translation file and to distribute the file bundled with BAM on the appropriate MyBB support forum/mod database for your language. When doing so, this bundled version must contain must include all licenses included with BAM, along with credit and a link back to the original plugin. Outside of that, my only request is that you also send the translation files to me (@Darth Apple on https://mybb.com) so that I can also upload them on the English community as well!

Many thanks to everyone who has translated BAM, both for previous versions and for BAM 2.0/2.1. Thanks to your efforts, BAM is more accessible for communities of various languages!


COMPATIBILITY MODE (ADVANCED):

Leave this setting off if you are unsure!

BAM's default variables, template modifications, and hooks (how BAM interacts with MyBB) have been designed to ensure the best possible compatibility with a wide variety of MyBB forums. Occasionally, these default values may cause compatibility issues with other plugins, themes, or specific versions of PHP.

This setting forces BAM to generate and render announcements at the end of page generation, immediately before sending to the browser. BAM will attempt to replace the standard BAM variable with your parsed announcements. If this variable cannot be found (usually because of heavily modified themes), it will force the announcements above the navigation bar, even without the template variable.

This method can improve compatibility with heavily modified themes where BAM cannot appropriately modify the templates during activation. Additionally, it can occasionally resolve certain compatibility issues between some untested plugins that might conflict with BAM, and can resolve unexpected issues and bugs related to posting issues on your forum.

This setting is experimental. It may not work in all cases, and it is recommended to leave this setting off unless you have issues related to themes, plugins, or otherwise. In the vast majority of cases, standard mode can render announcements properly, and will generally be more stable than compatibility mode.


EASTER EGGS AND EXTRAS:

Copyright:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.