-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
930 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
composer.phar | ||
vendor | ||
.dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,45 @@ | ||
### phpBB 3.1 PhpBB Extension - marttiphpbb Group Template Variables | ||
# phpBB extension marttiphpbb Group Template Variables | ||
|
||
This simple extension adds a Template variable for each group the user is in. So you can do conditional checks like this: | ||
[Topic on phpbb.com](https://www.phpbb.com/community/viewtopic.php?f=456&t=2325391) | ||
|
||
<!-- IF S_GROUP_8 --> Content only visible if your in group with id 8 <!-- ENDIF --> | ||
The extension provide a template variable for every group the current user is in. They are all put under the template variable `marttiphpbb_grouptempvars` | ||
|
||
I.e: | ||
|
||
{%- if marttiphpbb_grouptempvars.8 -%} | ||
This content is only visible when the user is in group with id 8. | ||
{%- endif -%} | ||
|
||
In the previous version (for phpBB 3.1) this extension the variables were available in the form of: | ||
|
||
S_GROUP_<group_id> | ||
|
||
This format is still available but depreciated. | ||
|
||
This extension might be useful together with the [Custom Code](https://github.com/marttiphpbb/phpbb-ext-customcode) extension. | ||
|
||
#### Quick Install | ||
## Requirements | ||
|
||
* phpBB 3.2.1+ | ||
* PHP 7+ | ||
|
||
## Quick Install | ||
|
||
You can install this on the latest release of phpBB 3.1 by following the steps below: | ||
|
||
* Create `marttiphpbb/grouptempvars` in the `ext` directory. | ||
* Download and unpack the repository into `ext/marttiphpbb/grouptempvars` | ||
* Enable `Group Template Variables` in the ACP at `Customise -> Manage extensions`. | ||
|
||
#### Uninstall | ||
## Uninstall | ||
|
||
* Disable `Group Template Variables` in the ACP at `Customise -> Extension Management -> Extensions`. | ||
* To permanently uninstall, click `Delete Data`. Optionally delete the `/ext/marttiphpbb/grouptempvars` directory. | ||
|
||
#### Support | ||
## Support | ||
|
||
* **Important: Only official release versions validated by the phpBB Extensions Team should be installed on a live forum. Pre-release (beta, RC) versions downloaded from this repository are only to be used for testing on offline/development forums and are not officially supported.** | ||
* Report bugs and other issues to the [Issue Tracker](https://github.com/marttiphpbb/phpbb-ext-grouptempvars/issues). | ||
* Support requests should be posted and discussed in the [Group Template Variables topic at phpBB.com](https://www.phpbb.com/community/viewtopic.php?f=456&t=2325391). | ||
|
||
#### License | ||
## License | ||
|
||
[GPL-2.0](license.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.