├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── github-commits-to-discord.yml ├── .gitignore ├── LICENSE.txt ├── README.md └── Upload ├── admin └── modules │ └── user │ └── ougc_awards.php ├── awards.php ├── images ├── modcp │ └── awards.png └── ougc_awards │ ├── CREDITS.txt │ ├── default.png │ └── index.html ├── inc ├── languages │ ├── english │ │ ├── admin │ │ │ └── user_ougc_awards.lang.php │ │ ├── ougc_awards.lang.php │ │ └── ougc_awards_extra_vals.lang.php │ └── espanol │ │ ├── admin │ │ └── user_ougc_awards.lang.php │ │ ├── ougc_awards.lang.php │ │ └── ougc_awards_extra_vals.lang.php ├── plugins │ ├── dvz_stream │ │ └── streams │ │ │ └── ougcAwards.php │ ├── ougc │ │ └── Awards │ │ │ ├── admin.php │ │ │ ├── admin │ │ │ └── user.php │ │ │ ├── class_alerts.php │ │ │ ├── core.php │ │ │ ├── hooks │ │ │ ├── admin.php │ │ │ ├── forum.php │ │ │ └── shared.php │ │ │ ├── settings.json │ │ │ └── templates │ │ │ ├── awardImage.html │ │ │ ├── awardImageClass.html │ │ │ ├── awardWrapper.html │ │ │ ├── checkBoxField.html │ │ │ ├── controlPanel.html │ │ │ ├── controlPanelButtons.html │ │ │ ├── controlPanelCategoryOwners.html │ │ │ ├── controlPanelConfirmation.html │ │ │ ├── controlPanelConfirmationDeleteAward.html │ │ │ ├── controlPanelConfirmationDeleteCategory.html │ │ │ ├── controlPanelConfirmationDeleteOwner.html │ │ │ ├── controlPanelContents.html │ │ │ ├── controlPanelEmpty.html │ │ │ ├── controlPanelGrantEdit.html │ │ │ ├── controlPanelList.html │ │ │ ├── controlPanelListButtonUpdateCategory.html │ │ │ ├── controlPanelListCategoryLinks.html │ │ │ ├── controlPanelListCategoryLinksModerator.html │ │ │ ├── controlPanelListColumnDisplayOrder.html │ │ │ ├── controlPanelListColumnEnabled.html │ │ │ ├── controlPanelListColumnOptions.html │ │ │ ├── controlPanelListColumnRequest.html │ │ │ ├── controlPanelListRow.html │ │ │ ├── controlPanelListRowDisplayOrder.html │ │ │ ├── controlPanelListRowEmpty.html │ │ │ ├── controlPanelListRowEnabled.html │ │ │ ├── controlPanelListRowOptions.html │ │ │ ├── controlPanelListRowRequest.html │ │ │ ├── controlPanelListRowRequestButton.html │ │ │ ├── controlPanelLogs.html │ │ │ ├── controlPanelLogsEmpty.html │ │ │ ├── controlPanelLogsPagination.html │ │ │ ├── controlPanelLogsRow.html │ │ │ ├── controlPanelMyAwards.html │ │ │ ├── controlPanelMyAwardsEmpty.html │ │ │ ├── controlPanelMyAwardsPagination.html │ │ │ ├── controlPanelMyAwardsRow.html │ │ │ ├── controlPanelMyAwardsRowLink.html │ │ │ ├── controlPanelNewEditAwardForm.html │ │ │ ├── controlPanelNewEditAwardFormUpload.html │ │ │ ├── controlPanelNewEditCategoryForm.html │ │ │ ├── controlPanelNewEditTaskForm.html │ │ │ ├── controlPanelNewEditTaskFormRequirementRow.html │ │ │ ├── controlPanelOwners.html │ │ │ ├── controlPanelOwnersEmpty.html │ │ │ ├── controlPanelOwnersRow.html │ │ │ ├── controlPanelPresets.html │ │ │ ├── controlPanelPresetsAward.html │ │ │ ├── controlPanelPresetsDefault.html │ │ │ ├── controlPanelPresetsForm.html │ │ │ ├── controlPanelPresetsRow.html │ │ │ ├── controlPanelPresetsSelect.html │ │ │ ├── controlPanelRequests.html │ │ │ ├── controlPanelRequestsEmpty.html │ │ │ ├── controlPanelRequestsRow.html │ │ │ ├── controlPanelTasks.html │ │ │ ├── controlPanelTasksEmpty.html │ │ │ ├── controlPanelTasksRow.html │ │ │ ├── controlPanelTasksRowOptions.html │ │ │ ├── controlPanelTasksRowRequirement.html │ │ │ ├── controlPanelTasksThead.html │ │ │ ├── controlPanelUsers.html │ │ │ ├── controlPanelUsersColumnOptions.html │ │ │ ├── controlPanelUsersEmpty.html │ │ │ ├── controlPanelUsersFormGrant.html │ │ │ ├── controlPanelUsersFormRevoke.html │ │ │ ├── controlPanelUsersRow.html │ │ │ ├── controlPanelUsersRowLink.html │ │ │ ├── controlPanelUsersRowOptions.html │ │ │ ├── css.html │ │ │ ├── globalNotification.html │ │ │ ├── globalPagination.html │ │ │ ├── global_menu.html │ │ │ ├── inputField.html │ │ │ ├── js.html │ │ │ ├── modcp_requests_buttons.html │ │ │ ├── page.html │ │ │ ├── pageRequest.html │ │ │ ├── pageRequestButton.html │ │ │ ├── pageRequestError.html │ │ │ ├── pageRequestForm.html │ │ │ ├── pageRequestSuccess.html │ │ │ ├── postBit.html │ │ │ ├── postBitContent.html │ │ │ ├── postBitEmpty.html │ │ │ ├── postBitPagination.html │ │ │ ├── postBitPreset.html │ │ │ ├── postBitPresets.html │ │ │ ├── postBitPresetsRow.html │ │ │ ├── postBitPresetsRowLink.html │ │ │ ├── postBitRow.html │ │ │ ├── postBitRowLink.html │ │ │ ├── postBitRowTotalCount.html │ │ │ ├── postBitViewAll.html │ │ │ ├── postBitViewAllSection.html │ │ │ ├── profile.html │ │ │ ├── profileContent.html │ │ │ ├── profileEmpty.html │ │ │ ├── profilePagination.html │ │ │ ├── profilePresets.html │ │ │ ├── profilePresetsRow.html │ │ │ ├── profilePresetsRowLink.html │ │ │ ├── profileRow.html │ │ │ ├── profileRowLink.html │ │ │ ├── profileRowTotalCount.html │ │ │ ├── profileViewAll.html │ │ │ ├── profileViewAllSection.html │ │ │ ├── profile_row.html │ │ │ ├── profile_rowLink.html │ │ │ ├── radioField.html │ │ │ ├── selectField.html │ │ │ ├── selectFieldOption.html │ │ │ ├── stats.html │ │ │ ├── statsUserRow.html │ │ │ ├── stats_empty.html │ │ │ ├── streamItem.html │ │ │ ├── textAreaField.html │ │ │ ├── viewAll.html │ │ │ ├── viewAllSection.html │ │ │ ├── viewUser.html │ │ │ ├── viewUserEmpty.html │ │ │ ├── viewUserError.html │ │ │ └── viewUserRow.html │ └── ougc_awards.php └── tasks │ └── ougc_awards.php ├── jscripts └── ougc_awards.js └── uploads └── awards └── index.html /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/github-commits-to-discord.yml: -------------------------------------------------------------------------------- 1 | name: Discord Webhook 2 | 3 | on: [push] 4 | 5 | jobs: 6 | git: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | 11 | - name: Run Discord Webhook 12 | uses: johnnyhuy/actions-discord-git-webhook@main 13 | with: 14 | webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_COMMITS }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.toptal.com/developers/gitignore/api/macos,windows,intellij+all,phpstorm+all,visualstudiocode,intellij+iml,intellij 2 | # Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,intellij+all,phpstorm+all,visualstudiocode,intellij+iml,intellij 3 | 4 | ### Intellij ### 5 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 6 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 7 | 8 | # User-specific stuff 9 | .idea/** 10 | .obsidian/** 11 | 12 | # AWS User-specific 13 | .idea/**/aws.xml 14 | 15 | # Generated files 16 | .idea/**/contentModel.xml 17 | 18 | # Sensitive or high-churn files 19 | .idea/**/dataSources/ 20 | .idea/**/dataSources.ids 21 | .idea/**/dataSources.local.xml 22 | .idea/**/sqlDataSources.xml 23 | .idea/**/dynamic.xml 24 | .idea/**/uiDesigner.xml 25 | .idea/**/dbnavigator.xml 26 | 27 | # Gradle 28 | .idea/**/gradle.xml 29 | .idea/**/libraries 30 | 31 | # Gradle and Maven with auto-import 32 | # When using Gradle or Maven with auto-import, you should exclude module files, 33 | # since they will be recreated, and may cause churn. Uncomment if using 34 | # auto-import. 35 | # .idea/artifacts 36 | # .idea/compiler.xml 37 | # .idea/jarRepositories.xml 38 | # .idea/modules.xml 39 | # .idea/*.iml 40 | # .idea/modules 41 | # *.iml 42 | # *.ipr 43 | 44 | # CMake 45 | cmake-build-*/ 46 | 47 | # Mongo Explorer plugin 48 | .idea/**/mongoSettings.xml 49 | 50 | # File-based project format 51 | *.iws 52 | 53 | # IntelliJ 54 | out/ 55 | 56 | # mpeltonen/sbt-idea plugin 57 | .idea_modules/ 58 | 59 | # JIRA plugin 60 | atlassian-ide-plugin.xml 61 | 62 | # Cursive Clojure plugin 63 | .idea/replstate.xml 64 | 65 | # SonarLint plugin 66 | .idea/sonarlint/ 67 | 68 | # Crashlytics plugin (for Android Studio and IntelliJ) 69 | com_crashlytics_export_strings.xml 70 | crashlytics.properties 71 | crashlytics-build.properties 72 | fabric.properties 73 | 74 | # Editor-based Rest Client 75 | .idea/httpRequests 76 | 77 | # Android studio 3.1+ serialized cache file 78 | .idea/caches/build_file_checksums.ser 79 | 80 | ### Intellij Patch ### 81 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 82 | 83 | # *.iml 84 | # modules.xml 85 | # .idea/misc.xml 86 | # *.ipr 87 | 88 | # Sonarlint plugin 89 | # https://plugins.jetbrains.com/plugin/7973-sonarlint 90 | .idea/**/sonarlint/ 91 | 92 | # SonarQube Plugin 93 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin 94 | .idea/**/sonarIssues.xml 95 | 96 | # Markdown Navigator plugin 97 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced 98 | .idea/**/markdown-navigator.xml 99 | .idea/**/markdown-navigator-enh.xml 100 | .idea/**/markdown-navigator/ 101 | 102 | # Cache file creation bug 103 | # See https://youtrack.jetbrains.com/issue/JBR-2257 104 | .idea/$CACHE_FILE$ 105 | 106 | # CodeStream plugin 107 | # https://plugins.jetbrains.com/plugin/12206-codestream 108 | .idea/codestream.xml 109 | 110 | # Azure Toolkit for IntelliJ plugin 111 | # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij 112 | .idea/**/azureSettings.xml 113 | 114 | ### Intellij+all ### 115 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 116 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 117 | 118 | # User-specific stuff 119 | 120 | # AWS User-specific 121 | 122 | # Generated files 123 | 124 | # Sensitive or high-churn files 125 | 126 | # Gradle 127 | 128 | # Gradle and Maven with auto-import 129 | # When using Gradle or Maven with auto-import, you should exclude module files, 130 | # since they will be recreated, and may cause churn. Uncomment if using 131 | # auto-import. 132 | # .idea/artifacts 133 | # .idea/compiler.xml 134 | # .idea/jarRepositories.xml 135 | # .idea/modules.xml 136 | # .idea/*.iml 137 | # .idea/modules 138 | # *.iml 139 | # *.ipr 140 | 141 | # CMake 142 | 143 | # Mongo Explorer plugin 144 | 145 | # File-based project format 146 | 147 | # IntelliJ 148 | 149 | # mpeltonen/sbt-idea plugin 150 | 151 | # JIRA plugin 152 | 153 | # Cursive Clojure plugin 154 | 155 | # SonarLint plugin 156 | 157 | # Crashlytics plugin (for Android Studio and IntelliJ) 158 | 159 | # Editor-based Rest Client 160 | 161 | # Android studio 3.1+ serialized cache file 162 | 163 | ### Intellij+all Patch ### 164 | # Ignore everything but code style settings and run configurations 165 | # that are supposed to be shared within teams. 166 | 167 | .idea/* 168 | 169 | !.idea/codeStyles 170 | !.idea/runConfigurations 171 | 172 | ### Intellij+iml ### 173 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 174 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 175 | 176 | # User-specific stuff 177 | 178 | # AWS User-specific 179 | 180 | # Generated files 181 | 182 | # Sensitive or high-churn files 183 | 184 | # Gradle 185 | 186 | # Gradle and Maven with auto-import 187 | # When using Gradle or Maven with auto-import, you should exclude module files, 188 | # since they will be recreated, and may cause churn. Uncomment if using 189 | # auto-import. 190 | # .idea/artifacts 191 | # .idea/compiler.xml 192 | # .idea/jarRepositories.xml 193 | # .idea/modules.xml 194 | # .idea/*.iml 195 | # .idea/modules 196 | # *.iml 197 | # *.ipr 198 | 199 | # CMake 200 | 201 | # Mongo Explorer plugin 202 | 203 | # File-based project format 204 | 205 | # IntelliJ 206 | 207 | # mpeltonen/sbt-idea plugin 208 | 209 | # JIRA plugin 210 | 211 | # Cursive Clojure plugin 212 | 213 | # SonarLint plugin 214 | 215 | # Crashlytics plugin (for Android Studio and IntelliJ) 216 | 217 | # Editor-based Rest Client 218 | 219 | # Android studio 3.1+ serialized cache file 220 | 221 | ### Intellij+iml Patch ### 222 | # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 223 | 224 | *.iml 225 | modules.xml 226 | .idea/misc.xml 227 | *.ipr 228 | 229 | ### macOS ### 230 | # General 231 | .DS_Store 232 | .AppleDouble 233 | .LSOverride 234 | 235 | # Icon must end with two \r 236 | Icon 237 | 238 | 239 | # Thumbnails 240 | ._* 241 | 242 | # Files that might appear in the root of a volume 243 | .DocumentRevisions-V100 244 | .fseventsd 245 | .Spotlight-V100 246 | .TemporaryItems 247 | .Trashes 248 | .VolumeIcon.icns 249 | .com.apple.timemachine.donotpresent 250 | 251 | # Directories potentially created on remote AFP share 252 | .AppleDB 253 | .AppleDesktop 254 | Network Trash Folder 255 | Temporary Items 256 | .apdisk 257 | 258 | ### macOS Patch ### 259 | # iCloud generated files 260 | *.icloud 261 | 262 | ### PhpStorm+all ### 263 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 264 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 265 | 266 | # User-specific stuff 267 | 268 | # AWS User-specific 269 | 270 | # Generated files 271 | 272 | # Sensitive or high-churn files 273 | 274 | # Gradle 275 | 276 | # Gradle and Maven with auto-import 277 | # When using Gradle or Maven with auto-import, you should exclude module files, 278 | # since they will be recreated, and may cause churn. Uncomment if using 279 | # auto-import. 280 | # .idea/artifacts 281 | # .idea/compiler.xml 282 | # .idea/jarRepositories.xml 283 | # .idea/modules.xml 284 | # .idea/*.iml 285 | # .idea/modules 286 | # *.iml 287 | # *.ipr 288 | 289 | # CMake 290 | 291 | # Mongo Explorer plugin 292 | 293 | # File-based project format 294 | 295 | # IntelliJ 296 | 297 | # mpeltonen/sbt-idea plugin 298 | 299 | # JIRA plugin 300 | 301 | # Cursive Clojure plugin 302 | 303 | # SonarLint plugin 304 | 305 | # Crashlytics plugin (for Android Studio and IntelliJ) 306 | 307 | # Editor-based Rest Client 308 | 309 | # Android studio 3.1+ serialized cache file 310 | 311 | ### PhpStorm+all Patch ### 312 | # Ignore everything but code style settings and run configurations 313 | # that are supposed to be shared within teams. 314 | 315 | 316 | 317 | ### VisualStudioCode ### 318 | .vscode/* 319 | !.vscode/settings.json 320 | !.vscode/tasks.json 321 | !.vscode/launch.json 322 | !.vscode/extensions.json 323 | !.vscode/*.code-snippets 324 | 325 | # Local History for Visual Studio Code 326 | .history/ 327 | 328 | # Built Visual Studio Code Extensions 329 | *.vsix 330 | 331 | ### VisualStudioCode Patch ### 332 | # Ignore all local history of files 333 | .history 334 | .ionide 335 | 336 | ### Windows ### 337 | # Windows thumbnail cache files 338 | Thumbs.db 339 | Thumbs.db:encryptable 340 | ehthumbs.db 341 | ehthumbs_vista.db 342 | 343 | # Dump file 344 | *.stackdump 345 | 346 | # Folder config file 347 | [Dd]esktop.ini 348 | 349 | # Recycle Bin used on file shares 350 | $RECYCLE.BIN/ 351 | 352 | # Windows Installer files 353 | *.cab 354 | *.msi 355 | *.msix 356 | *.msm 357 | *.msp 358 | 359 | # Windows shortcuts 360 | *.lnk 361 | 362 | # End of https://www.toptal.com/developers/gitignore/api/macos,windows,intellij+all,phpstorm+all,visualstudiocode,intellij+iml,intellij 363 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Project logo 4 | 5 |

6 | 7 |

ougc Awards

8 | 9 |
10 | 11 | [![Status](https://img.shields.io/badge/status-active-success.svg)]() 12 | [![GitHub Issues](https://img.shields.io/github/issues/OUGC-Network/ougc-Awards.svg)](./issues) 13 | [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/OUGC-Network/ougc-Awards.svg)](./pulls) 14 | [![License](https://img.shields.io/badge/license-GPL-blue)](/LICENSE) 15 | 16 |
17 | 18 | --- 19 | 20 |

Manage a powerful awards system for your community. 21 |
22 |

23 | 24 | ## 📜 Table of Contents 25 | 26 | - [About](#about) 27 | - [Getting Started](#getting_started) 28 | - [Dependencies](#dependencies) 29 | - [File Structure](#file_structure) 30 | - [Install](#install) 31 | - [Update](#update) 32 | - [Template Modifications](#template_modifications) 33 | - [Settings](#settings) 34 | - [File Level Settings](#file_level_settings) 35 | - [Usage](#usage) 36 | - [Categories](#usage_categories) 37 | - [MyShowcase](#usage_categories_myshowcase) 38 | - [Templates](#templates) 39 | - [Built Using](#built_using) 40 | - [Authors](#authors) 41 | - [Acknowledgments](#acknowledgement) 42 | - [Support & Feedback](#support) 43 | 44 | ## 🚀 About 45 | 46 | Manage a powerful awards system for your community. 47 | 48 | [Go up to Table of Contents](#table_of_contents) 49 | 50 | ## 📍 Getting Started 51 | 52 | The following information will assist you into getting a copy of this plugin up and running on your forum. 53 | 54 | ### Dependencies 55 | 56 | A setup that meets the following requirements is necessary to use this plugin. 57 | 58 | - [MyBB](https://mybb.com/) >= 1.8 59 | - [MyShowcase](https://github.com/Sama34/MyShowcase-System) >= 3.0 60 | - PHP >= 7 61 | - [MyBB-PluginLibrary](https://github.com/frostschutz/MyBB-PluginLibrary) >= 13 62 | 63 | ### File structure 64 | 65 | ``` 66 | . 67 | ├── inc 68 | │ ├── plugins 69 | │ │ ├── ougc 70 | │ │ │ ├── Awards 71 | │ │ │ │ ├── admin 72 | │ │ │ │ │ ├── user.php 73 | │ │ │ │ ├── hooks 74 | │ │ │ │ │ ├── admin.php 75 | │ │ │ │ │ ├── forum.php 76 | │ │ │ │ │ ├── shared.php 77 | │ │ │ │ ├── templates 78 | │ │ │ │ │ ├── awardImage.html 79 | │ │ │ │ │ ├── awardImageClass.html 80 | │ │ │ │ │ ├── awardWrapper.html 81 | │ │ │ │ │ ├── checkBoxField.html 82 | │ │ │ │ │ ├── controlPanel.html 83 | │ │ │ │ │ ├── controlPanelButtons.html 84 | │ │ │ │ │ ├── controlPanelCategoryOwners.html 85 | │ │ │ │ │ ├── controlPanelConfirmation.html 86 | │ │ │ │ │ ├── controlPanelConfirmationDeleteAward.html 87 | │ │ │ │ │ ├── controlPanelConfirmationDeleteCategory.html 88 | │ │ │ │ │ ├── controlPanelConfirmationDeleteOwner.html 89 | │ │ │ │ │ ├── controlPanelContents.html 90 | │ │ │ │ │ ├── controlPanelEmpty.html 91 | │ │ │ │ │ ├── controlPanelGrantEdit.html 92 | │ │ │ │ │ ├── controlPanelList.html 93 | │ │ │ │ │ ├── controlPanelListButtonUpdateCategory.html 94 | │ │ │ │ │ ├── controlPanelListCategoryLinks.html 95 | │ │ │ │ │ ├── controlPanelListCategoryLinksModerator.html 96 | │ │ │ │ │ ├── controlPanelListColumnDisplayOrder.html 97 | │ │ │ │ │ ├── controlPanelListColumnEnabled.html 98 | │ │ │ │ │ ├── controlPanelListColumnOptions.html 99 | │ │ │ │ │ ├── controlPanelListColumnRequest.html 100 | │ │ │ │ │ ├── controlPanelListRow.html 101 | │ │ │ │ │ ├── controlPanelListRowDisplayOrder.html 102 | │ │ │ │ │ ├── controlPanelListRowEmpty.html 103 | │ │ │ │ │ ├── controlPanelListRowEnabled.html 104 | │ │ │ │ │ ├── controlPanelListRowOptions.html 105 | │ │ │ │ │ ├── controlPanelListRowRequest.html 106 | │ │ │ │ │ ├── controlPanelListRowRequestButton.html 107 | │ │ │ │ │ ├── controlPanelLogs.html 108 | │ │ │ │ │ ├── controlPanelLogsRow.html 109 | │ │ │ │ │ ├── controlPanelMyAwards.html 110 | │ │ │ │ │ ├── controlPanelMyAwardsEmpty.html 111 | │ │ │ │ │ ├── controlPanelMyAwardsRow.html 112 | │ │ │ │ │ ├── controlPanelMyAwardsRowLink.html 113 | │ │ │ │ │ ├── controlPanelNewEditAwardForm.html 114 | │ │ │ │ │ ├── controlPanelNewEditAwardFormUpload.html 115 | │ │ │ │ │ ├── controlPanelNewEditCategoryForm.html 116 | │ │ │ │ │ ├── controlPanelNewEditTaskForm.html 117 | │ │ │ │ │ ├── controlPanelNewEditTaskFormRequirementRow.html 118 | │ │ │ │ │ ├── controlPanelOwners.html 119 | │ │ │ │ │ ├── controlPanelOwnersEmpty.html 120 | │ │ │ │ │ ├── controlPanelOwnersRow.html 121 | │ │ │ │ │ ├── controlPanelPresets.html 122 | │ │ │ │ │ ├── controlPanelPresetsAward.html 123 | │ │ │ │ │ ├── controlPanelPresetsDefault.html 124 | │ │ │ │ │ ├── controlPanelPresetsForm.html 125 | │ │ │ │ │ ├── controlPanelPresetsRow.html 126 | │ │ │ │ │ ├── controlPanelPresetsSelect.html 127 | │ │ │ │ │ ├── controlPanelRequests.html 128 | │ │ │ │ │ ├── controlPanelRequestsEmpty.html 129 | │ │ │ │ │ ├── controlPanelRequestsRow.html 130 | │ │ │ │ │ ├── controlPanelTasks.html 131 | │ │ │ │ │ ├── controlPanelTasksRow.html 132 | │ │ │ │ │ ├── controlPanelUsers.html 133 | │ │ │ │ │ ├── controlPanelUsersColumnOptions.html 134 | │ │ │ │ │ ├── controlPanelUsersEmpty.html 135 | │ │ │ │ │ ├── controlPanelUsersFormGrant.html 136 | │ │ │ │ │ ├── controlPanelUsersFormRevoke.html 137 | │ │ │ │ │ ├── controlPanelUsersRow.html 138 | │ │ │ │ │ ├── controlPanelUsersRowLink.html 139 | │ │ │ │ │ ├── controlPanelUsersRowOptions.html 140 | │ │ │ │ │ ├── css.html 141 | │ │ │ │ │ ├── global_menu.html 142 | │ │ │ │ │ ├── globalNotification.html 143 | │ │ │ │ │ ├── globalPagination.html 144 | │ │ │ │ │ ├── inputField.html 145 | │ │ │ │ │ ├── js.html 146 | │ │ │ │ │ ├── modcp_requests_buttons.html 147 | │ │ │ │ │ ├── page.html 148 | │ │ │ │ │ ├── pageRequest.html 149 | │ │ │ │ │ ├── pageRequestButton.html 150 | │ │ │ │ │ ├── pageRequestError.html 151 | │ │ │ │ │ ├── pageRequestForm.html 152 | │ │ │ │ │ ├── pageRequestSuccess.html 153 | │ │ │ │ │ ├── postBitPreset.html 154 | │ │ │ │ │ ├── postBitViewAll.html 155 | │ │ │ │ │ ├── profile.html 156 | │ │ │ │ │ ├── profile_row.html 157 | │ │ │ │ │ ├── profileEmpty.html 158 | │ │ │ │ │ ├── profilePagination.html 159 | │ │ │ │ │ ├── profilePresets.html 160 | │ │ │ │ │ ├── profilePresetsRow.html 161 | │ │ │ │ │ ├── profileViewAll.html 162 | │ │ │ │ │ ├── radioField.html 163 | │ │ │ │ │ ├── selectField.html 164 | │ │ │ │ │ ├── selectFieldOption.html 165 | │ │ │ │ │ ├── stats.html 166 | │ │ │ │ │ ├── stats_empty.html 167 | │ │ │ │ │ ├── statsUserRow.html 168 | │ │ │ │ │ ├── textAreaField.html 169 | │ │ │ │ │ ├── viewAll.html 170 | │ │ │ │ │ ├── viewUser.html 171 | │ │ │ │ │ ├── viewUserEmpty.html 172 | │ │ │ │ │ ├── viewUserError.html 173 | │ │ │ │ │ ├── viewUserRow.html 174 | │ │ │ │ ├── admin.php 175 | │ │ │ │ ├── class_alerts.php 176 | │ │ │ │ ├── core.php 177 | │ │ │ │ ├── settings.json 178 | │ │ │ ├── ougc_awards.php 179 | │ ├── tasks 180 | │ │ ├── ougc_awards.php 181 | ├── jscripts 182 | │ ├── ougc_awards.js 183 | ├── uploads 184 | │ ├── awards 185 | │ │ ├── index.html 186 | └── awards.php 187 | ``` 188 | 189 | ### Installing 190 | 191 | Follow the next steps in order to install a copy of this plugin on your forum. 192 | 193 | 1. Download the latest package from the [MyBB Extend](https://community.mybb.com/mods.php) site or 194 | from the [repository releases](https://github.com/OUGC-Network/ougc-Awards/releases/latest). 195 | 2. Upload the contents of the _Upload_ folder to your MyBB root directory. 196 | 3. Browse to _Configuration » Plugins_ and install this plugin by clicking _Install & Activate_. 197 | 4. Browse to _Settings_ to manage the plugin settings. 198 | 199 | ### Updating 200 | 201 | Follow the next steps in order to update your copy of this plugin. 202 | 203 | 1. Browse to _Configuration » Plugins_ and deactivate this plugin by clicking _Deactivate_. 204 | 2. Follow step 1 and 2 from the [Install](#install) section. 205 | 3. Browse to _Configuration » Plugins_ and activate this plugin by clicking _Activate_. 206 | 4. Browse to _Settings_ to manage the plugin settings. 207 | 208 | ### Template Modifications 209 | 210 | To display Awards data it is required that you edit the following template for each of your themes. 211 | 212 | 1. Place `{$ougcAwardsJavaScript}` in the `headerinclude` template. 213 | 2. Place `{$ougcAwardsCSS}` in the `headerinclude` template. 214 | 3. Place `{$ougcAwardsMenu}` after `{$menu_calendar}` in the `header` template to display a link to the awards page. 215 | 4. Place `{$memprofile['ougc_awards']}` after `{$profilefields}` in the `member_profile` template to display the awards 216 | in the user profile. 217 | 5. Place `{$memprofile['ougc_awards_preset']}` after `{$warning_level}` in the `member_profile` template to display the 218 | user preset in the user profile. 219 | 6. Place `{$memprofile['ougc_awards_view_all']}` in the `member_profile` template to display a link to view all awards 220 | in the user profile. 221 | 7. Place `{$post['ougc_awards']}` after `{$post['user_details']}` in the `postbit` and `postbit_classic` template to 222 | display the awards in the user posts. 223 | 8. Place `{$post['ougc_awards_preset']}` after `{$post['user_details']}` in the `postbit` and `postbit_classic` template 224 | to display the 225 | user preset in the user posts. 226 | 9. Place `{$post['ougc_awards_view_all']}` in the `postbit` and `postbit_classic` template to display a link to view all 227 | awards in the user posts 228 | 10. Place `{$userData['ougc_awards']}` after `{$userData['user_details']}` in the `pageViewCommentsCommentUserDetails` 229 | and `pageViewEntryUserDetails` templates to display the awards in the user entries and comments in showcases. 230 | 11. Place `{$userData['ougc_awards_preset']}` after `{$userData['user_details']}` in the 231 | `pageViewCommentsCommentUserDetails` and `pageViewEntryUserDetails` templates to display the user entries and 232 | comments in showcases. 233 | 12. Place `{$userData['ougc_awards_view_all']}` in the `pageViewCommentsCommentUserDetails` and 234 | `pageViewEntryUserDetails` template to display a link to view all awards in the user entries and comments in 235 | showcases. 236 | 13. Place `{$ougcAwardsStatsLast}` in the `stats` template to display the last award grants in the stats page. 237 | 14. Place `{$ougcAwardsViewAll}` in any template to display a link to view all awards for the current user. 238 | 15. Place `{$ougcAwardsGlobalNotificationRequests}` after `{$awaitingusers}` in the `header` template to display the 239 | requests notification to moderator, category owners, and user owners. 240 | 16. You can place `{$totalAwardGrants}` in the `postBitRow` or `profileRow` template if you want to display the amount 241 | of award grants in posts or profiles for each award. 242 | 17. You can place `{$paginationMenu}` in the `postBitContent` template if you want to display the pagination for the 243 | current user post. 244 | 245 | [Go up to Table of Contents](#table_of_contents) 246 | 247 | ## 🛠 Settings 248 | 249 | Below you can find a description of the plugin settings. 250 | 251 | ### Main Settings 252 | 253 | - **Maximum Awards in Posts** `numeric` 254 | - _Maximum number of awards to be shown in posts._ 255 | - **Maximum Presets in Posts** `numeric` 256 | - _Type the maximum preset awards to display in posts._ 257 | - **Maximum Awards in Profile** `numeric` 258 | - _Maximum number of awards to be shown in profiles._ 259 | - **Maximum Preset Awards in Profiles** `numeric` 260 | - _Type the maximum preset awards to display in profiles._ 261 | - **Items Per Page** `numeric` 262 | - _Maximum number of items to show per page or within listings._ 263 | - **View Groups** `select` 264 | - _Allowed groups to view the awards page._ 265 | - **Presets Allowed Groups** `select` 266 | - _Select which groups are allowed to use and create presets._ 267 | - **Maximum Presets** `numeric` 268 | - _Select the maximum amount of presets can create._ 269 | - **Moderator Groups** `select` 270 | - _Allowed groups to manage awards._ 271 | - **Enable Stats** `yesNo` 272 | - _Do you want to enable the top and last granted users in the stats page?_ 273 | - **Latest Grants in Stats** `numeric` 274 | - _Type the maximum number of latest grants to show in the stats page._ 275 | - **Send PM** `yesNo` 276 | - _Do you want to send an PM to users when receiving an award?_ 277 | - **Grant Default Visible Status** `yesNo` 278 | - _Select the visible status of awards when granting awards to users. If set to No, users will need to 279 | set their awards as visible in the sorting page from withing the My Awards page._ 280 | - **Uploads Path** `text` 281 | - _Type the path where the awards images will be uploaded._ 282 | - **Uploads Dimensions** `text` 283 | - _Type the maximum dimensions for the awards images. Default 32|32._ 284 | - **Uploads Size** `numeric` 285 | - _Type the maximum size in bytes for the awards images. Default 50._ 286 | 287 | ### File Level Settings 288 | 289 | Additionally, you can force your settings by updating the `SETTINGS` array constant in the `ougc\Awards\Core` 290 | namespace in the `./inc/plugins/ougc_awards.php` file. Any setting set this way will always bypass any front-end 291 | configuration. Use the setting key as shown below: 292 | 293 | ```PHP 294 | define('ougc\Awards\Core\SETTINGS', [ 295 | 'allowImports' => false, 296 | 'myAlertsVersion' => '2.1.0' 297 | ]); 298 | ``` 299 | 300 | [Go up to Table of Contents](#table_of_contents) 301 | 302 | ## 📖 Usage 303 | 304 | This plugin has no additional configurations; after activating make sure to modify the global settings in order to get 305 | this plugin working. 306 | 307 | ### 🛠 Categories 308 | 309 | - ** Output in Custom Section** `yesNo` 310 | - _ Enable this to display awards from this category in its custom section._ 311 | 312 | Setting this option to _Yes_ will display the awards from this category in a custom section inside the profiles. This is 313 | useful if you want to display different awards in different sections of the profile. 314 | 315 | By default categories will be concatenated to the main section. 316 | 317 | ![imagen](https://github.com/user-attachments/assets/76580282-50c4-4e8d-b13e-09bb8c064517) 318 | 319 | To display each category section in a different area of the `member_profile` template. Simply add the 320 | `{$memprofile['ougcAwardsSectionX']}` variable to wherever you want the custom section to be displayed, where `X` is the 321 | category ID. 322 | 323 | Place `{$memprofile['ougcAwardsViewAllSectionX']}` to display a link to the view all modal for the custom section. 324 | 325 | ![imagen](https://github.com/user-attachments/assets/a2f81ce2-0318-419a-9d11-6a26249eac61) 326 | 327 | To display each category section in a different area of the `postbit` or `postbit_classic` templates. Simply add the 328 | `{$post['ougcAwardsSectionX']}` variable to wherever you want the custom section to be displayed, where `X` is the 329 | category ID. 330 | 331 | Place `{$post['ougcAwardsViewAllSectionX']}` to display a link to the view all modal for the custom section. 332 | 333 | #### MyShowcase 334 | 335 | To display each category section in a different area of the `myShowcase_pageViewCommentsComment` or 336 | `myShowcase_pageViewEntry` templates. Simply add the `{$userData['ougcAwardsSectionX']}` variable to wherever you want 337 | the custom section to be displayed, where `X` is the category ID. 338 | 339 | Place `{$userData['ougcAwardsViewAllSectionX']}` to display a link to the view all modal for the custom section. 340 | 341 | ![imagen](https://github.com/user-attachments/assets/885cca0e-5ba7-427b-b8a1-14d9e589a36e) 342 | 343 | Place `{$ougcAwardsViewAllSections['sectionX']}` in any template to display a link to view all awards from that section 344 | for the current user. 345 | 346 | You can build your custom modal links in any template by using the following code: 347 | 348 | ```HTML 349 | {$sectionTitle} 350 | ``` 351 | 352 | Where `{$userID}` is the user identifier (`uid`) of the user you want to view the awards from and `{$sectionID}` is the 353 | section or category identifier (`categoryID` or `sectionID`). 354 | 355 | [Go up to Table of Contents](#table_of_contents) 356 | 357 | ## 📐 Templates 358 | 359 | The following is a list of templates available for this plugin. 360 | 361 | - `ougcawards_awardImage` 362 | - _front end_; 363 | - `ougcawards_awardImageClass` 364 | - _front end_; 365 | - `ougcawards_awardWrapper` 366 | - _front end_; 367 | - `ougcawards_checkBoxField` 368 | - _front end_; 369 | - `ougcawards_controlPanel` 370 | - _front end_; 371 | - `ougcawards_controlPanelButtons` 372 | - _front end_; 373 | - `ougcawards_controlPanelCategoryOwners` 374 | - _front end_; 375 | - `ougcawards_controlPanelConfirmation` 376 | - _front end_; 377 | - `ougcawards_controlPanelConfirmationDeleteAward` 378 | - _front end_; 379 | - `ougcawards_controlPanelConfirmationDeleteCategory` 380 | - _front end_; 381 | - `ougcawards_controlPanelConfirmationDeleteOwner` 382 | - _front end_; 383 | - `ougcawards_controlPanelContents` 384 | - _front end_; 385 | - `ougcawards_controlPanelEmpty` 386 | - _front end_; 387 | - `ougcawards_controlPanelGrantEdit` 388 | - _front end_; 389 | - `ougcawards_controlPanelList` 390 | - _front end_; 391 | - `ougcawards_controlPanelListButtonUpdateCategory` 392 | - _front end_; 393 | - `ougcawards_controlPanelListCategoryLinks` 394 | - _front end_; 395 | - `ougcawards_controlPanelListCategoryLinksModerator` 396 | - _front end_; 397 | - `ougcawards_controlPanelListColumnDisplayOrder` 398 | - _front end_; 399 | - `ougcawards_controlPanelListColumnEnabled` 400 | - _front end_; 401 | - `ougcawards_controlPanelListColumnOptions` 402 | - _front end_; 403 | - `ougcawards_controlPanelListColumnRequest` 404 | - _front end_; 405 | - `ougcawards_controlPanelListRow` 406 | - _front end_; 407 | - `ougcawards_controlPanelListRowDisplayOrder` 408 | - _front end_; 409 | - `ougcawards_controlPanelListRowEmpty` 410 | - _front end_; 411 | - `ougcawards_controlPanelListRowEnabled` 412 | - _front end_; 413 | - `ougcawards_controlPanelListRowOptions` 414 | - _front end_; 415 | - `ougcawards_controlPanelListRowRequest` 416 | - _front end_; 417 | - `ougcawards_controlPanelListRowRequestButton` 418 | - _front end_; 419 | - `ougcawards_controlPanelLogs` 420 | - _front end_; 421 | - `ougcawards_controlPanelLogsRow` 422 | - _front end_; 423 | - `ougcawards_controlPanelMyAwards` 424 | - _front end_; 425 | - `ougcawards_controlPanelMyAwardsEmpty` 426 | - _front end_; 427 | - `ougcawards_controlPanelMyAwardsRow` 428 | - _front end_; 429 | - `ougcawards_controlPanelMyAwardsRowLink` 430 | - _front end_; 431 | - `ougcawards_controlPanelNewEditAwardForm` 432 | - _front end_; 433 | - `ougcawards_controlPanelNewEditAwardFormUpload` 434 | - _front end_; 435 | - `ougcawards_controlPanelNewEditCategoryForm` 436 | - _front end_; 437 | - `ougcawards_controlPanelNewEditTaskForm` 438 | - _front end_; 439 | - `ougcawards_controlPanelNewEditTaskFormRequirementRow` 440 | - _front end_; 441 | - `ougcawards_controlPanelOwners` 442 | - _front end_; 443 | - `ougcawards_controlPanelOwnersEmpty` 444 | - _front end_; 445 | - `ougcawards_controlPanelOwnersRow` 446 | - _front end_; 447 | - `ougcawards_controlPanelPresets` 448 | - _front end_; 449 | - `ougcawards_controlPanelPresetsAward` 450 | - _front end_; 451 | - `ougcawards_controlPanelPresetsDefault` 452 | - _front end_; 453 | - `ougcawards_controlPanelPresetsForm` 454 | - _front end_; 455 | - `ougcawards_controlPanelPresetsRow` 456 | - _front end_; 457 | - `ougcawards_controlPanelPresetsSelect` 458 | - _front end_; 459 | - `ougcawards_controlPanelRequests` 460 | - _front end_; 461 | - `ougcawards_controlPanelRequestsEmpty` 462 | - _front end_; 463 | - `ougcawards_controlPanelRequestsRow` 464 | - _front end_; 465 | - `ougcawards_controlPanelTasks` 466 | - _front end_; 467 | - `ougcawards_controlPanelTasksRow` 468 | - _front end_; 469 | - `ougcawards_controlPanelUsers` 470 | - _front end_; 471 | - `ougcawards_controlPanelUsersColumnOptions` 472 | - _front end_; 473 | - `ougcawards_controlPanelUsersEmpty` 474 | - _front end_; 475 | - `ougcawards_controlPanelUsersFormGrant` 476 | - _front end_; 477 | - `ougcawards_controlPanelUsersFormRevoke` 478 | - _front end_; 479 | - `ougcawards_controlPanelUsersRow` 480 | - _front end_; 481 | - `ougcawards_controlPanelUsersRowLink` 482 | - _front end_; 483 | - `ougcawards_controlPanelUsersRowOptions` 484 | - _front end_; 485 | - `ougcawards_css` 486 | - _front end_; 487 | - `ougcawards_global_menu` 488 | - _front end_;- 489 | - `ougcawards_globalNotification` 490 | - _front end_; 491 | - `ougcawards_globalPagination` 492 | - _front end_; 493 | - `ougcawards_inputField` 494 | - _front end_; 495 | - `ougcawards_js` 496 | - _front end_; 497 | - `ougcawards_modcp_requests_buttons` 498 | - _front end_; 499 | - `ougcawards_page` 500 | - _front end_; 501 | - `ougcawards_pageRequest` 502 | - _front end_; 503 | - `ougcawards_pageRequestButton` 504 | - _front end_; 505 | - `ougcawards_pageRequestError` 506 | - _front end_; 507 | - `ougcawards_pageRequestForm` 508 | - _front end_; 509 | - `ougcawards_pageRequestSuccess` 510 | - _front end_; 511 | - `ougcawards_postBitPreset` 512 | - _front end_; 513 | - `ougcawards_postBitViewAll` 514 | - _front end_; 515 | - `ougcawards_profile` 516 | - _front end_; 517 | - `ougcawards_profile_row` 518 | - _front end_; 519 | - `ougcawards_profileEmpty` 520 | - _front end_; 521 | - `ougcawards_profilePagination` 522 | - _front end_; 523 | - `ougcawards_profilePresets` 524 | - _front end_; 525 | - `ougcawards_profilePresetsRow` 526 | - _front end_; 527 | - `ougcawards_profileViewAll` 528 | - _front end_; 529 | - `ougcawards_radioField` 530 | - _front end_; 531 | - `ougcawards_selectField` 532 | - _front end_; 533 | - `ougcawards_selectFieldOption` 534 | - _front end_; 535 | - `ougcawards_stats` 536 | - _front end_; 537 | - `ougcawards_stats_empty` 538 | - _front end_; 539 | - `ougcawards_statsUserRow` 540 | - _front end_; 541 | - `ougcawards_textAreaField` 542 | - _front end_; 543 | - `ougcawards_viewAll` 544 | - _front end_; 545 | - `ougcawards_viewUser` 546 | - _front end_; 547 | - `ougcawards_viewUserEmpty` 548 | - _front end_; 549 | - `ougcawards_viewUserError` 550 | - _front end_; 551 | - `ougcawards_viewUserRow` 552 | - _front end_; 553 | 554 | [Go up to Table of Contents](#table_of_contents) 555 | 556 | ## ⛏ Built Using 557 | 558 | - [MyBB](https://mybb.com/) - Web Framework 559 | - [MyBB PluginLibrary](https://github.com/frostschutz/MyBB-PluginLibrary) - A collection of useful functions for MyBB 560 | - [PHP](https://www.php.net/) - Server Environment 561 | 562 | [Go up to Table of Contents](#table_of_contents) 563 | 564 | ## ✍️ Authors 565 | 566 | - [@Omar G](https://github.com/Sama34) - Idea & Initial work 567 | 568 | See also the list of [contributors](https://github.com/OUGC-Network/ougc-Awards/contributors) who participated in 569 | this 570 | project. 571 | 572 | [Go up to Table of Contents](#table_of_contents) 573 | 574 | ## 🎉 Acknowledgements 575 | 576 | - [The Documentation Compendium](https://github.com/kylelobo/The-Documentation-Compendium) 577 | 578 | [Go up to Table of Contents](#table_of_contents) 579 | 580 | ## 🎈 Support & Feedback 581 | 582 | This is free development and any contribution is welcome. Get support or leave feedback at the 583 | official [MyBB Community](https://community.mybb.com/thread-159249.html). 584 | 585 | Thanks for downloading and using our plugins! 586 | 587 | [Go up to Table of Contents](#table_of_contents) -------------------------------------------------------------------------------- /Upload/admin/modules/user/ougc_awards.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ -------------------------------------------------------------------------------- /Upload/images/modcp/awards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OUGC-Network/ougc-Awards/1f7f22c28377e5b7790abd1e4d6d2cb91c7b7919/Upload/images/modcp/awards.png -------------------------------------------------------------------------------- /Upload/images/ougc_awards/CREDITS.txt: -------------------------------------------------------------------------------- 1 | PixeloPhilia icons by: Omer Cetin at http://omercetin.deviantart.com . 2 | 3 | Famfam icons by: http://www.famfamfam.com -------------------------------------------------------------------------------- /Upload/images/ougc_awards/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OUGC-Network/ougc-Awards/1f7f22c28377e5b7790abd1e4d6d2cb91c7b7919/Upload/images/ougc_awards/default.png -------------------------------------------------------------------------------- /Upload/images/ougc_awards/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |   7 | 8 | -------------------------------------------------------------------------------- /Upload/inc/languages/english/admin/user_ougc_awards.lang.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | $l = [ 30 | 'ougcAwards' => 'ougc Awards', 31 | 'ougcAwardsDescription' => 'Manage a powerful awards system for your community.', 32 | 33 | 'setting_group_ougc_awards' => 'Awards', 34 | 'setting_group_ougc_awards_desc' => 'Manage a powerful awards system for your community.', 35 | 36 | 'ougc_awards_import_title' => 'Import Awards', 37 | 'ougcAwardsImportDescription' => '
   Import From MyAwards 38 |
   Import From Nickman\'s Awards System', 39 | 'ougc_awards_import_confirm_myawards' => 'Are you sure you want to import awards from MyAwards?', 40 | 'ougc_awards_import_confirm_nickawards' => 'Are you sure you want to import awards from Nickman\'s award system?', 41 | 'ougc_awards_import_end' => 'Awards Imported Successfully.', 42 | 'ougc_awards_import_error' => 'There was an error trying to import the selected awards. The "{1}" table doesn\'t seems to exists.', 43 | 44 | 'setting_ougc_awards_showInPosts' => 'Maximum Awards in Posts', 45 | 'setting_ougc_awards_showInPosts_desc' => 'Maximum number of awards to be shown in posts.', 46 | 'setting_ougc_awards_groupAwardGrantsInPosts' => 'Group Awards in Posts', 47 | 'setting_ougc_awards_groupAwardGrantsInPosts_desc' => 'If you enable this, awards will be shown once per user only.', 48 | 'setting_ougc_awards_showInPostsPresets' => 'Maximum Presets in Posts', 49 | 'setting_ougc_awards_showInPostsPresets_desc' => 'Type the maximum preset awards to display in posts.', 50 | 'setting_ougc_awards_showInProfile' => 'Maximum Awards in Profile', 51 | 'setting_ougc_awards_showInProfile_desc' => 'Maximum number of awards to be shown in profiles.', 52 | 'setting_ougc_awards_groupAwardGrantsInProfiles' => 'Group Awards in Profiles', 53 | 'setting_ougc_awards_groupAwardGrantsInProfiles_desc' => 'If you enable this, awards will be shown once per user only.', 54 | 'setting_ougc_awards_showInProfilePresets' => 'Maximum Preset Awards in Profiles', 55 | 'setting_ougc_awards_showInProfilePresets_desc' => 'Type the maximum preset awards to display in profiles.', 56 | 'setting_ougc_awards_perPage' => 'Items Per Page', 57 | 'setting_ougc_awards_perPage_desc' => 'Maximum number of items to show per page or within listings.', 58 | 'setting_ougc_awards_perPageViewUsers' => 'Awards Per Page in View Modal', 59 | 'setting_ougc_awards_perPageViewUsers_desc' => 'Maximum number of awards to show per page in the view modal.', 60 | 'setting_ougc_awards_groupsView' => 'View Groups', 61 | 'setting_ougc_awards_groupsView_desc' => 'Allowed groups to view the awards page.', 62 | 'setting_ougc_awards_groupsPresets' => 'Presets Allowed Groups', 63 | 'setting_ougc_awards_groupsPresets_desc' => 'Select which groups are allowed to use and create presets.', 64 | 'setting_ougc_awards_presetsMaximum' => 'Maximum Presets', 65 | 'setting_ougc_awards_presetsMaximum_desc' => 'Select the maximum amount of presets can create.', 66 | 'setting_ougc_awards_groupsModerators' => 'Moderator Groups', 67 | 'setting_ougc_awards_groupsModerators_desc' => 'Allowed groups to manage awards.', 68 | 'setting_ougc_awards_statsEnabled' => 'Enable Stats', 69 | 'setting_ougc_awards_statsEnabled_desc' => 'Do you want to enable the top and last granted users in the stats page?', 70 | 'setting_ougc_awards_statsLatestGrants' => 'latest Grants in Stats', 71 | 'setting_ougc_awards_statsLatestGrants_desc' => 'Type the maximum number of latest grants to show in the stats page.', 72 | 'setting_ougc_awards_notificationPrivateMessage' => 'Send PM', 73 | 'setting_ougc_awards_notificationPrivateMessage_desc' => 'Do you want to send an PM to users when receiving an award?', 74 | 'setting_ougc_awards_grantDefaultVisibleStatus' => 'Grant Default Visible Status', 75 | 'setting_ougc_awards_grantDefaultVisibleStatus_desc' => 'Select the visible status of awards when granting awards to users. If set to No, users will need to set their awards as visible in the sorting page from the My Awards page.', 76 | 'setting_ougc_awards_uploadPath' => 'Uploads Path', 77 | 'setting_ougc_awards_uploadPath_desc' => 'Type the path where the awards images will be uploaded.', 78 | 'setting_ougc_awards_uploadDimensions' => 'Uploads Dimensions', 79 | 'setting_ougc_awards_uploadDimensions_desc' => 'Type the maximum dimensions for the awards images. Default 32|32.', 80 | 'setting_ougc_awards_uploadSize' => 'Uploads Size', 81 | 'setting_ougc_awards_uploadSize_desc' => 'Type the maximum size in bytes for the awards images. Default 50.', 82 | 'setting_ougc_awards_privateMessageSenderUserID' => 'Private Message Sender User ID', 83 | 'setting_ougc_awards_privateMessageSenderUserID_desc' => 'Select the user identifier (UID) that will send the private messages to users when receiving an award. Default is 0.', 84 | 'setting_ougc_awards_groupsTasks' => 'Tasks View Groups', 85 | 'setting_ougc_awards_groupsTasks_desc' => 'Allowed groups to view the awards tasks page.', 86 | 'setting_ougc_awards_groupsMyAwards' => 'My Awards View Groups', 87 | 'setting_ougc_awards_groupsMyAwards_desc' => 'Allowed groups to view the My Awards page.', 88 | 'setting_ougc_awards_enableDvzStream' => 'Enable DVZ Stream Integration', 89 | 'setting_ougc_awards_enableDvzStream_desc' => 'Enable DVZ Stream integration for granted awards.', 90 | 91 | 'ougcAwardsTaskRan' => 'The awards task ran successfully.', 92 | 93 | 'ougcAwardsPluginLibrary' => 'This plugin requires PluginLibrary version {2} or later to be uploaded to your forum.' 94 | ]; 95 | -------------------------------------------------------------------------------- /Upload/inc/languages/english/ougc_awards_extra_vals.lang.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | /* 30 | $l['ougcAwardsPrivateMessagesOverwrite'] = 'Hi {1}. You have been given the [b]{2}[/b] award. 31 | 32 | Reason: 33 | [quote]{3}[/quote] 34 | 35 | [i]The {5} community.[/i]'; 36 | */ 37 | 38 | //$l['ougcAwardsNameAward1']= 'Name of AID 1'; 39 | 40 | //$l['ougcAwardsDescriptionAward1'] = 'Description of AID 1.'; 41 | 42 | //$l['ougcAwardsReasonAward1'] = 'Reason from AID 1 will show this.'; -------------------------------------------------------------------------------- /Upload/inc/languages/espanol/admin/user_ougc_awards.lang.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | $l = [ 30 | 'ougcAwards' => 'Premios ougc', 31 | 'ougcAwardsDescription' => 'Gestiona un poderoso sistema de premios para tu comunidad.', 32 | 33 | 'setting_group_ougc_awards' => 'Premios', 34 | 'setting_group_ougc_awards_desc' => 'Gestiona un poderoso sistema de premios para tu comunidad.', 35 | 36 | 'ougc_awards_import_title' => 'Importar Premios', 37 | 'ougcAwardsImportDescription' => '
   Importar Desde MyAwards 38 |
   Importar Desde el Sistema de Premios de Nickman', 39 | 'ougc_awards_import_confirm_myawards' => '¿Estás seguro de que deseas importar premios de MyAwards?', 40 | 'ougc_awards_import_confirm_nickawards' => '¿Estás seguro de que deseas importar premios del sistema de premios de Nickman?', 41 | 'ougc_awards_import_end' => 'Premios importados con éxito.', 42 | 'ougc_awards_import_error' => 'Hubo un error al intentar importar los premios seleccionados. La tabla "{1}" no parece existir.', 43 | 44 | 'setting_ougc_awards_showInPosts' => 'Máximo de Premios en Mensajes', 45 | 'setting_ougc_awards_showInPosts_desc' => 'Número máximo de premios que se mostrarán en los mensajes.', 46 | 'setting_ougc_awards_groupAwardGrantsInPosts' => 'Agrupar Premios en Mensajes', 47 | 'setting_ougc_awards_groupAwardGrantsInPosts_desc' => 'Si activas esto, los premios se mostraran solo una vez por usuario en los mensajes', 48 | 'setting_ougc_awards_showInPostsPresets' => 'Máximo de Presets en Mensajes', 49 | 'setting_ougc_awards_showInPostsPresets_desc' => 'Escribe el número máximo de premios preestablecidos para mostrar en los mensajes.', 50 | 'setting_ougc_awards_showInProfile' => 'Máximo de Premios en el Perfil', 51 | 'setting_ougc_awards_showInProfile_desc' => 'Número máximo de premios que se mostrarán en los perfiles.', 52 | 'setting_ougc_awards_groupAwardGrantsInProfiles' => 'Agrupar Premios en Perfiles', 53 | 'setting_ougc_awards_groupAwardGrantsInProfiles_desc' => 'Si activas esto, los premios se mostraran solo una vez por usuario en los perfiles', 54 | 'setting_ougc_awards_showInProfilePresets' => 'Máximo de Premios Preestablecidos en Perfiles', 55 | 'setting_ougc_awards_showInProfilePresets_desc' => 'Escribe el número máximo de premios preestablecidos para mostrar en los perfiles.', 56 | 'setting_ougc_awards_perPage' => 'Elementos Por Página', 57 | 'setting_ougc_awards_perPage_desc' => 'Número máximo de elementos a mostrar por página o dentro de listados.', 58 | 'setting_ougc_awards_perPageViewUsers' => 'Premios Por Página en el Modal de Vista', 59 | 'setting_ougc_awards_perPageViewUsers_desc' => 'Número máximo de premios a mostrar por página en el modal de vista.', 60 | 'setting_ougc_awards_groupsView' => 'Grupos de Vista', 61 | 'setting_ougc_awards_groupsView_desc' => 'Grupos permitidos para ver la página de premios.', 62 | 'setting_ougc_awards_groupsPresets' => 'Grupos Permitidos para Presets', 63 | 'setting_ougc_awards_groupsPresets_desc' => 'Selecciona qué grupos pueden usar y crear presets.', 64 | 'setting_ougc_awards_presetsMaximum' => 'Máximo de Presets', 65 | 'setting_ougc_awards_presetsMaximum_desc' => 'Selecciona la cantidad máxima de presets que se pueden crear.', 66 | 'setting_ougc_awards_groupsModerators' => 'Grupos de Moderadores', 67 | 'setting_ougc_awards_groupsModerators_desc' => 'Grupos permitidos para gestionar premios.', 68 | 'setting_ougc_awards_statsEnabled' => 'Habilitar Estadísticas', 69 | 'setting_ougc_awards_statsEnabled_desc' => '¿Quieres habilitar los usuarios más otorgados y los últimos otorgados en la página de estadísticas?', 70 | 'setting_ougc_awards_statsLatestGrants' => 'Últimos Otorgamientos en Estadísticas', 71 | 'setting_ougc_awards_statsLatestGrants_desc' => 'Escribe el número máximo de últimos otorgamientos a mostrar en la página de estadísticas.', 72 | 'setting_ougc_awards_notificationPrivateMessage' => 'Enviar PM', 73 | 'setting_ougc_awards_notificationPrivateMessage_desc' => '¿Quieres enviar un PM a los usuarios al recibir un premio?', 74 | 'setting_ougc_awards_grantDefaultVisibleStatus' => 'Estado Visible Predeterminado al Otorgar', 75 | 'setting_ougc_awards_grantDefaultVisibleStatus_desc' => 'Selecciona el estado visible de los premios al otorgar premios a los usuarios. Si se establece en No, los usuarios deberán configurar sus premios como visibles en la página de clasificación desde la página Mis Premios.', 76 | 'setting_ougc_awards_uploadPath' => 'Ruta de Subidas', 77 | 'setting_ougc_awards_uploadPath_desc' => 'Escribe la ruta donde se subirán las imágenes de los premios.', 78 | 'setting_ougc_awards_uploadDimensions' => 'Dimensiones de Subidas', 79 | 'setting_ougc_awards_uploadDimensions_desc' => 'Escribe las dimensiones máximas para las imágenes de los premios. Predeterminado 32|32.', 80 | 'setting_ougc_awards_uploadSize' => 'Tamaño de Subidas', 81 | 'setting_ougc_awards_uploadSize_desc' => 'Escribe el tamaño máximo en bytes para las imágenes de los premios. Predeterminado 50.', 82 | 'setting_ougc_awards_privateMessageSenderUserID' => 'ID de Usuario del Remitente del Mensaje Privado', 83 | 'setting_ougc_awards_privateMessageSenderUserID_desc' => 'Selecciona el identificador de usuario (UID) que enviará los mensajes privados a los usuarios al recibir un premio. El valor predeterminado es 0.', 84 | 'setting_ougc_awards_groupsTasks' => 'Grupos de Vista de Tareas', 85 | 'setting_ougc_awards_groupsTasks_desc' => 'Grupos permitidos para ver la página de tareas de premios.', 86 | 'setting_ougc_awards_groupsMyAwards' => 'Grupos de Vista de Mis Premios', 87 | 'setting_ougc_awards_groupsMyAwards_desc' => 'Grupos permitidos para ver la página Mis Premios.', 88 | 'setting_ougc_awards_enableDvzStream' => 'Habilitar Integración de DVZ Stream', 89 | 'setting_ougc_awards_enableDvzStream_desc' => 'Habilitar la integración de DVZ Stream para premios otorgados.', 90 | 91 | 'ougcAwardsTaskRan' => 'La tarea de premios se ejecutó con éxito.', 92 | 93 | 'ougcAwardsPluginLibrary' => 'Este plugin requiere PluginLibrary versión {2} o posterior para ser subido a tu foro.' 94 | ]; 95 | -------------------------------------------------------------------------------- /Upload/inc/languages/espanol/ougc_awards_extra_vals.lang.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | /* 30 | $l['ougcAwardsPrivateMessagesOverwrite'] = 'Hi {1}. You have been given the [b]{2}[/b] award. 31 | 32 | Reason: 33 | [quote]{3}[/quote] 34 | 35 | [i]The {5} community.[/i]'; 36 | */ 37 | 38 | //$l['ougcAwardsNameAward1']= 'Name of AID 1'; 39 | 40 | //$l['ougcAwardsDescriptionAward1'] = 'Description of AID 1.'; 41 | 42 | //$l['ougcAwardsReasonAward1'] = 'Reason from AID 1 will show this.'; -------------------------------------------------------------------------------- /Upload/inc/plugins/dvz_stream/streams/ougcAwards.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | use dvzStream\Stream; 30 | use dvzStream\StreamEvent; 31 | 32 | use function dvzStream\addStream; 33 | use function ougc\Awards\Core\awardGetIcon; 34 | use function ougc\Awards\Core\awardsCacheGet; 35 | use function ougc\Awards\Core\grantGet; 36 | use function ougc\Awards\Core\getTemplate; 37 | use function ougc\Awards\Core\loadLanguage; 38 | 39 | use function ougc\Awards\Core\urlHandlerBuild; 40 | 41 | use const ougc\Awards\Core\AWARD_TEMPLATE_TYPE_CLASS; 42 | 43 | global $lang; 44 | 45 | $stream = new Stream(); 46 | 47 | $stream->setName(explode('.', basename(__FILE__))[0]); 48 | 49 | loadLanguage(); 50 | 51 | $stream->setTitle($lang->ougcAwardsDvzStream); 52 | 53 | $stream->setEventTitle($lang->ougcAwardsDvzStreamEvent); 54 | 55 | $stream->setFetchHandler(function (int $query_limit, int $lastGrantID = 0) use ($stream) { 56 | global $db, $cache; 57 | 58 | $whereClauses = ["gid>'{$lastGrantID}'", "visible='1'"]; 59 | 60 | $awardsCache = awardsCacheGet()['awards'] ?? []; 61 | 62 | $awardsIDs = implode("','", array_keys($awardsCache)); 63 | 64 | $whereClauses[] = "aid IN ('{$awardsIDs}')"; 65 | 66 | $grantedAwards = grantGet( 67 | $whereClauses, 68 | ['uid AS userID', 'aid AS awardID', 'thread AS threadID', 'date AS grantStamp'], 69 | [ 70 | 'limit' => $query_limit 71 | ] 72 | ); 73 | 74 | $usersCache = []; 75 | 76 | $userIDs = implode("','", array_map('intval', array_column($grantedAwards, 'userID'))); 77 | 78 | $query = $db->simple_select( 79 | 'users', 80 | 'uid AS userID, username AS userName, usergroup AS userGroup, displaygroup AS displayGroup, avatar AS userAvatar', 81 | "uid IN ('{$userIDs}')" 82 | ); 83 | 84 | while ($user_data = $db->fetch_array($query)) { 85 | $usersCache[(int)$user_data['userID']] = $user_data; 86 | } 87 | 88 | $streamEvents = []; 89 | 90 | foreach ($grantedAwards as $grantID => $grantData) { 91 | $awardID = (int)$grantData['awardID']; 92 | 93 | $awardData = $awardsCache[$awardID] ?? []; 94 | 95 | if (!$awardData) { 96 | continue; 97 | } 98 | 99 | $streamEvent = new StreamEvent(); 100 | 101 | $streamEvent->setStream($stream); 102 | 103 | $streamEvent->setId($grantID); 104 | 105 | $streamEvent->setDate($grantData['grantStamp']); 106 | 107 | $streamEvent->setUser([ 108 | 'id' => $grantData['userID'], 109 | 'username' => $usersCache[$grantData['userID']]['userName'], 110 | 'usergroup' => $usersCache[$grantData['userID']]['userGroup'], 111 | 'displaygroup' => $usersCache[$grantData['userID']]['displayGroup'], 112 | 'avatar' => $usersCache[$grantData['userID']]['userAvatar'], 113 | ]); 114 | 115 | $streamEvent->addData([ 116 | 'awardID' => $awardID, 117 | 'awardName' => $awardData['name'], 118 | 'awardTemplate' => (int)$awardData['template'], 119 | 'awardImage' => $awardData['image'], 120 | 'templateType' => (int)$awardData['type'], 121 | ]); 122 | 123 | $streamEvents[] = $streamEvent; 124 | } 125 | 126 | return $streamEvents; 127 | }); 128 | 129 | $stream->addProcessHandler(function (StreamEvent $streamEvent) { 130 | global $mybb, $lang; 131 | 132 | $streamData = $streamEvent->getData(); 133 | 134 | $awardName = htmlspecialchars_uni($streamData['awardName']); 135 | 136 | $awardImage = $awardClass = awardGetIcon($streamData['awardID']); 137 | 138 | $awardImage = eval( 139 | getTemplate( 140 | $streamData['awardTemplate'] === AWARD_TEMPLATE_TYPE_CLASS ? 'awardImageClass' : 'awardImage' 141 | ) 142 | ); 143 | 144 | $awardUrl = urlHandlerBuild(['action' => 'viewUsers', 'awardID' => $streamData['awardID']]); 145 | 146 | $awardImage = eval(getTemplate('awardWrapper', false)); 147 | 148 | $userData = $streamEvent->getUser(); 149 | 150 | $userID = (int)$userData['id']; 151 | 152 | $streamText = $lang->sprintf($lang->ougcAwardsDvzStreamTextUser, $awardName); 153 | 154 | $streamItem = eval(getTemplate('streamItem')); 155 | 156 | $streamEvent->setItem($streamItem); 157 | }); 158 | 159 | addStream($stream); 160 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/admin.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | declare(strict_types=1); 30 | 31 | namespace ougc\Awards\Admin; 32 | 33 | use DirectoryIterator; 34 | use MybbStuff_MyAlerts_AlertTypeManager; 35 | use MybbStuff_MyAlerts_Entity_AlertType; 36 | use PluginLibrary; 37 | use stdClass; 38 | 39 | use function ougc\Awards\Core\allowImports; 40 | use function ougc\Awards\Core\cacheUpdate; 41 | use function ougc\Awards\Core\categoryInsert; 42 | use function ougc\Awards\Core\getSetting; 43 | use function ougc\Awards\Core\loadLanguage; 44 | 45 | use const MYBB_ROOT; 46 | use const ougc\Awards\ROOT; 47 | use const ougc\Awards\Core\ADMIN_PERMISSION_DELETE; 48 | use const ougc\Awards\Core\PLUGIN_VERSION; 49 | use const ougc\Awards\Core\PLUGIN_VERSION_CODE; 50 | use const ougc\Awards\Core\REQUEST_STATUS_REJECTED; 51 | use const ougc\Awards\Core\TABLES_DATA; 52 | use const ougc\Awards\Core\FIELDS_DATA; 53 | use const ougc\Awards\Core\TASK_TYPE_REVOKE; 54 | use const ougc\Awards\Core\TASK_STATUS_DISABLED; 55 | 56 | const TASK_ENABLE = 1; 57 | 58 | const TASK_DEACTIVATE = 0; 59 | 60 | const TASK_DELETE = -1; 61 | 62 | function pluginInfo(): array 63 | { 64 | global $lang; 65 | 66 | loadLanguage(); 67 | 68 | $descriptionText = $lang->ougcAwardsDescription; 69 | 70 | if (allowImports()) { 71 | $descriptionText .= $lang->ougcAwardsImportDescription; 72 | } 73 | 74 | return [ 75 | 'name' => 'ougc Awards', 76 | 'description' => $descriptionText, 77 | 'website' => 'https://ougc.network', 78 | 'author' => 'Omar G.', 79 | 'authorsite' => 'https://ougc.network', 80 | 'version' => PLUGIN_VERSION, 81 | 'versioncode' => PLUGIN_VERSION_CODE, 82 | 'compatibility' => '18*', 83 | 'myalerts' => getSetting('myAlertsVersion'), 84 | 'codename' => 'ougc_awards', 85 | 'newpoints' => '3.1.0', 86 | 'pl' => [ 87 | 'version' => 13, 88 | 'url' => 'https://community.mybb.com/mods.php?action=view&pid=573' 89 | ] 90 | ]; 91 | } 92 | 93 | function pluginActivate(): bool 94 | { 95 | global $PL, $cache, $lang; 96 | 97 | loadLanguage(); 98 | 99 | $pluginInfo = pluginInfo(); 100 | 101 | loadPluginLibrary(); 102 | 103 | $settingsContents = file_get_contents(ROOT . '/settings.json'); 104 | 105 | $settingsData = json_decode($settingsContents, true); 106 | 107 | foreach ($settingsData as $settingKey => &$settingData) { 108 | if (empty($lang->{"setting_ougc_awards_{$settingKey}"})) { 109 | continue; 110 | } 111 | 112 | if ($settingData['optionscode'] == 'select' || $settingData['optionscode'] == 'checkbox') { 113 | foreach ($settingData['options'] as $optionKey) { 114 | $settingData['optionscode'] .= "\n{$optionKey}={$lang->{"setting_ougc_awards_{$settingKey}_{$optionKey}"}}"; 115 | } 116 | } 117 | 118 | $settingData['title'] = $lang->{"setting_ougc_awards_{$settingKey}"}; 119 | 120 | $settingData['description'] = $lang->{"setting_ougc_awards_{$settingKey}_desc"}; 121 | } 122 | 123 | $PL->settings( 124 | 'ougc_awards', 125 | $lang->setting_group_ougc_awards, 126 | $lang->setting_group_ougc_awards_desc, 127 | $settingsData 128 | ); 129 | 130 | $templates = []; 131 | 132 | if (file_exists($templateDirectory = ROOT . '/templates')) { 133 | $templatesDirIterator = new DirectoryIterator($templateDirectory); 134 | 135 | foreach ($templatesDirIterator as $template) { 136 | if (!$template->isFile()) { 137 | continue; 138 | } 139 | 140 | $pathName = $template->getPathname(); 141 | 142 | $pathInfo = pathinfo($pathName); 143 | 144 | if ($pathInfo['extension'] === 'html') { 145 | $templates[$pathInfo['filename']] = file_get_contents($pathName); 146 | } 147 | } 148 | } 149 | 150 | if ($templates) { 151 | $PL->templates('ougcawards', 'ougc Awards', $templates); 152 | } 153 | 154 | global $db, $mybb; 155 | 156 | if (class_exists('MybbStuff_MyAlerts_AlertTypeManager')) { 157 | global $alertTypeManager; 158 | 159 | isset($alertTypeManager) || $alertTypeManager = MybbStuff_MyAlerts_AlertTypeManager::createInstance( 160 | $db, 161 | $mybb->cache 162 | ); 163 | 164 | $alertTypeManager = MybbStuff_MyAlerts_AlertTypeManager::getInstance(); 165 | 166 | $alertType = new MybbStuff_MyAlerts_Entity_AlertType(); 167 | 168 | $alertType->setCode('ougc_awards'); 169 | 170 | $alertType->setEnabled(); 171 | 172 | $alertType->setCanBeUserDisabled(); 173 | 174 | $alertTypeManager->add($alertType); 175 | } 176 | 177 | $plugins = $cache->read('ougc_plugins'); 178 | 179 | if (!$plugins) { 180 | $plugins = []; 181 | } 182 | 183 | if (!isset($plugins['awards'])) { 184 | $plugins['awards'] = $pluginInfo['versioncode']; 185 | } 186 | 187 | /*~*~* RUN UPDATES START *~*~*/ 188 | 189 | if ($db->table_exists('ougc_awards_tasks')) { 190 | if ($db->field_exists('ougc_customrepids_r', 'ougc_awards_tasks')) { 191 | $db->drop_column('ougc_awards_tasks', 'ougc_customrepids_r'); 192 | } 193 | } 194 | 195 | if ($db->table_exists('ougc_awards_tasks')) { 196 | if ($db->field_exists('ougc_customrepids_g', 'ougc_awards_tasks')) { 197 | $db->drop_column('ougc_awards_tasks', 'ougc_customrepids_g'); 198 | } 199 | 200 | if ($db->field_exists('revoke', 'ougc_awards_tasks')) { 201 | $db->rename_column( 202 | 'ougc_awards_tasks', 203 | 'revoke', 204 | 'revokeAwardID', 205 | dbBuildFieldDefinition(TABLES_DATA['ougc_awards_tasks']['revokeAwardID']) 206 | ); 207 | } 208 | } 209 | 210 | if ($db->table_exists('ougc_awards_tasks')) { 211 | if ($db->index_exists('ougc_awards_users', 'uidaid')) { 212 | $db->drop_index('ougc_awards_users', 'uidaid'); 213 | } 214 | 215 | if ($db->index_exists('ougc_awards_users', 'aiduid')) { 216 | $db->drop_index('ougc_awards_users', 'uidaid'); 217 | } 218 | } 219 | 220 | if ($plugins['awards'] <= 1834) { 221 | $db->update_query('ougc_awards_tasks', ['active' => TASK_STATUS_DISABLED], "give LIKE '%,%'"); 222 | 223 | $db->update_query('ougc_awards_tasks', ['active' => TASK_STATUS_DISABLED], "`revokeAwardID` LIKE '%,%'"); 224 | 225 | $db->update_query('ougc_awards_tasks', ['taskType' => TASK_TYPE_REVOKE], "give='' AND `revokeAwardID`!=''"); 226 | 227 | $db->update_query('ougc_awards_requests ', ['status' => REQUEST_STATUS_REJECTED], 'status="-1"'); 228 | } 229 | 230 | if ($plugins['awards'] <= 1803) { 231 | $dbQuery = $db->simple_select('ougc_awards', 'aid'); 232 | 233 | if ($db->num_rows($dbQuery)) { 234 | $categoryID = categoryInsert([ 235 | 'name' => 'Default', 236 | 'description' => 'Default category created after an update.', 237 | 'disporder' => 1 238 | ]); 239 | 240 | $db->update_query('ougc_awards', ['cid' => $categoryID]); 241 | } 242 | } 243 | 244 | if ($plugins['awards'] <= 1800) { 245 | $tmpls = [ 246 | 'modcp_ougc_awards' => 'ougcawards_modcp', 247 | 'modcp_ougc_awards_manage' => 'ougcawards_modcp_manage', 248 | 'modcp_ougc_awards_nav' => 'ougcawards_modcp_nav', 249 | 'modcp_ougc_awards_list' => 'ougcawards_modcp_list', 250 | 'modcp_ougc_awards_list_empty' => 'ougcawards_modcp_list_empty', 251 | 'modcp_ougc_awards_list_award' => 'ougcawards_modcp_list_award', 252 | 'modcp_ougc_awards_manage_reason' => 'ougcawards_modcp_manage_reason', 253 | 'postbit_ougc_awards' => 'ougcawards_postbit', 254 | 'member_profile_ougc_awards_row_empty' => 'ougcawards_profile_row_empty', 255 | 'member_profile_ougc_awards_row' => 'ougcawards_profile_row', 256 | 'member_profile_ougc_awards' => 'ougcawards_profile', 257 | 'ougc_awards_page' => 'ougcawards_page', 258 | 'ougc_awards_page_list' => 'ougcawards_page_list', 259 | 'ougc_awards_page_list_award' => 'ougcawards_page_list_award', 260 | 'ougc_awards_page_list_empty' => 'ougcawards_page_list_empty', 261 | 'ougc_awards_page_user' => 'ougcawards_page_user', 262 | 'ougc_awards_page_user_award' => 'ougcawards_page_user_award', 263 | 'ougc_awards_page_user_empty' => 'ougcawards_page_user_empty', 264 | 'ougc_awards_page_view' => 'ougcawards_page_view', 265 | 'ougc_awards_page_view_empty' => 'ougcawards_page_view_empty', 266 | 'ougc_awards_page_view_row' => 'ougcawards_page_view_row', 267 | ]; 268 | 269 | $templateNames = implode("','", $tmpls); 270 | 271 | // Try to update old templates 272 | $query = $db->simple_select('templates', 'template, title, template', "title IN ('{$templateNames}')"); 273 | while ($tmpl = $db->fetch_array($query)) { 274 | check_template($tmpl['template']) || $tmplcache[$tmpl['title']] = $tmpl; 275 | } 276 | 277 | foreach ($tmpls as $oldtitle => $newtitle) { 278 | $db->update_query('templates', [ 279 | 'title' => $db->escape_string($newtitle), 280 | 'version' => 1, 281 | 'dateline' => TIME_NOW 282 | ], 'title=\'' . $db->escape_string($oldtitle) . '\' AND sid=\'-2\''); 283 | } 284 | 285 | // Rebuild templates 286 | static $done = false; 287 | if (!$done) { 288 | $done = true; 289 | $funct = __FUNCTION__; 290 | $funct(); 291 | } 292 | 293 | // Delete old templates if not updated 294 | $tmpls['ougc_awards_image'] = ''; 295 | $db->delete_query( 296 | 'templates', 297 | 'title IN(\'' . implode( 298 | '\', \'', 299 | array_keys(array_map([$db, 'escape_string'], $tmpls)) 300 | ) . '\') AND sid=\'-2\'' 301 | ); 302 | 303 | // Delete old template group 304 | $db->delete_query('templategroups', 'prefix=\'ougc_awards\''); 305 | } 306 | 307 | /*~*~* RUN UPDATES END *~*~*/ 308 | 309 | dbVerifyTables(); 310 | 311 | dbVerifyColumns(); 312 | 313 | enableTask(); 314 | 315 | cacheUpdate(); 316 | 317 | change_admin_permission('tools', 'ougc_awards', ADMIN_PERMISSION_DELETE); 318 | 319 | $plugins['awards'] = $pluginInfo['versioncode']; 320 | 321 | $cache->update('ougc_plugins', $plugins); 322 | 323 | return true; 324 | } 325 | 326 | function pluginDeactivate(): bool 327 | { 328 | disableTask(); 329 | 330 | return true; 331 | } 332 | 333 | function pluginIsInstalled(): bool 334 | { 335 | static $isInstalled = null; 336 | 337 | if ($isInstalled === null) { 338 | global $db; 339 | 340 | $isInstalledEach = true; 341 | 342 | foreach (TABLES_DATA as $tableName => $tableColumns) { 343 | $isInstalledEach = $db->table_exists($tableName) && $isInstalledEach; 344 | } 345 | 346 | $isInstalled = $isInstalledEach; 347 | } 348 | 349 | return $isInstalled; 350 | } 351 | 352 | function pluginUninstall(): bool 353 | { 354 | global $db, $PL, $cache; 355 | 356 | loadPluginLibrary(); 357 | 358 | foreach (TABLES_DATA as $tableName => $tableData) { 359 | if ($db->table_exists($tableName)) { 360 | $db->drop_table($tableName); 361 | } 362 | } 363 | 364 | foreach (FIELDS_DATA as $tableName => $tableColumns) { 365 | if ($db->table_exists($tableName)) { 366 | foreach ($tableColumns as $fieldName => $fieldDefinition) { 367 | if ($db->field_exists($fieldName, $tableName)) { 368 | $db->drop_column($tableName, $fieldName); 369 | } 370 | } 371 | } 372 | } 373 | 374 | $PL->settings_delete('ougc_awards'); 375 | 376 | $PL->templates_delete('ougcawards'); 377 | 378 | if (class_exists('MybbStuff_MyAlerts_AlertTypeManager')) { 379 | global $alertTypeManager; 380 | 381 | isset($alertTypeManager) || $alertTypeManager = MybbStuff_MyAlerts_AlertTypeManager::createInstance( 382 | $db, 383 | $cache 384 | ); 385 | 386 | $alertTypeManager = MybbStuff_MyAlerts_AlertTypeManager::getInstance(); 387 | 388 | $alertTypeManager->deleteByCode('ougc_awards'); 389 | } 390 | 391 | deleteTask(); 392 | 393 | // Delete version from cache 394 | $plugins = (array)$cache->read('ougc_plugins'); 395 | 396 | if (isset($plugins['awards'])) { 397 | unset($plugins['awards']); 398 | } 399 | 400 | if (!empty($plugins)) { 401 | $cache->update('ougc_plugins', $plugins); 402 | } else { 403 | $cache->delete('ougc_plugins'); 404 | } 405 | 406 | return true; 407 | } 408 | 409 | function pluginLibraryRequirements(): stdClass 410 | { 411 | return (object)pluginInfo()['pl']; 412 | } 413 | 414 | function loadPluginLibrary(): bool 415 | { 416 | global $PL, $lang; 417 | 418 | loadLanguage(); 419 | 420 | $fileExists = file_exists(PLUGINLIBRARY); 421 | 422 | if ($fileExists && !($PL instanceof PluginLibrary)) { 423 | require_once PLUGINLIBRARY; 424 | } 425 | 426 | if (!$fileExists || $PL->version < pluginLibraryRequirements()->version) { 427 | flash_message( 428 | $lang->sprintf( 429 | $lang->ougcAwardsPluginLibrary, 430 | pluginLibraryRequirements()->url, 431 | pluginLibraryRequirements()->version 432 | ), 433 | 'error' 434 | ); 435 | 436 | admin_redirect('index.php?module=config-plugins'); 437 | } 438 | 439 | return true; 440 | } 441 | 442 | function enableTask(int $action = TASK_ENABLE): bool 443 | { 444 | global $db, $lang; 445 | 446 | loadLanguage(); 447 | 448 | if ($action === TASK_DELETE) { 449 | $db->delete_query('tasks', "file='ougc_awards'"); 450 | 451 | return true; 452 | } 453 | 454 | $query = $db->simple_select('tasks', '*', "file='ougc_awards'", ['limit' => 1]); 455 | 456 | $task = $db->fetch_array($query); 457 | 458 | if ($task) { 459 | $db->update_query('tasks', ['enabled' => $action], "file='ougc_awards'"); 460 | } else { 461 | include_once MYBB_ROOT . 'inc/functions_task.php'; 462 | 463 | $_ = $db->escape_string('*'); 464 | 465 | $new_task = [ 466 | 'title' => $db->escape_string($lang->setting_group_ougc_awards), 467 | 'description' => $db->escape_string($lang->setting_group_ougc_awards_desc), 468 | 'file' => $db->escape_string('ougc_awards'), 469 | 'minute' => 0, 470 | 'hour' => $_, 471 | 'day' => $_, 472 | 'weekday' => $_, 473 | 'month' => $_, 474 | 'enabled' => 1, 475 | 'logging' => 1 476 | ]; 477 | 478 | $new_task['nextrun'] = fetch_next_run($new_task); 479 | 480 | $db->insert_query('tasks', $new_task); 481 | } 482 | 483 | return true; 484 | } 485 | 486 | function disableTask(): bool 487 | { 488 | enableTask(TASK_DEACTIVATE); 489 | 490 | return true; 491 | } 492 | 493 | function deleteTask(): bool 494 | { 495 | enableTask(TASK_DELETE); 496 | 497 | return true; 498 | } 499 | 500 | function dbTables(): array 501 | { 502 | $tables_data = []; 503 | 504 | foreach (TABLES_DATA as $tableName => $tableColumns) { 505 | foreach ($tableColumns as $fieldName => $fieldData) { 506 | if (!isset($fieldData['type'])) { 507 | continue; 508 | } 509 | 510 | $tables_data[$tableName][$fieldName] = dbBuildFieldDefinition($fieldData); 511 | } 512 | 513 | foreach ($tableColumns as $fieldName => $fieldData) { 514 | if (isset($fieldData['primary_key'])) { 515 | $tables_data[$tableName]['primary_key'] = $fieldName; 516 | } 517 | 518 | if ($fieldName === 'unique_key') { 519 | $tables_data[$tableName]['unique_key'] = $fieldData; 520 | } 521 | } 522 | } 523 | 524 | return $tables_data; 525 | } 526 | 527 | function dbVerifyTables(): bool 528 | { 529 | global $db; 530 | 531 | $collation = $db->build_create_table_collation(); 532 | 533 | foreach (dbTables() as $tableName => $tableColumns) { 534 | if ($db->table_exists($tableName)) { 535 | foreach ($tableColumns as $fieldName => $fieldData) { 536 | if ($fieldName == 'primary_key' || $fieldName == 'unique_key') { 537 | continue; 538 | } 539 | 540 | if ($db->field_exists($fieldName, $tableName)) { 541 | $db->modify_column($tableName, "`{$fieldName}`", $fieldData); 542 | } else { 543 | $db->add_column($tableName, $fieldName, $fieldData); 544 | } 545 | } 546 | } else { 547 | $query_string = "CREATE TABLE IF NOT EXISTS `{$db->table_prefix}{$tableName}` ("; 548 | 549 | foreach ($tableColumns as $fieldName => $fieldData) { 550 | if ($fieldName == 'primary_key') { 551 | $query_string .= "PRIMARY KEY (`{$fieldData}`)"; 552 | } elseif ($fieldName != 'unique_key') { 553 | $query_string .= "`{$fieldName}` {$fieldData},"; 554 | } 555 | } 556 | 557 | $query_string .= ") ENGINE=MyISAM{$collation};"; 558 | 559 | $db->write_query($query_string); 560 | } 561 | } 562 | 563 | dbVerifyIndexes(); 564 | 565 | return true; 566 | } 567 | 568 | function dbVerifyIndexes(): bool 569 | { 570 | global $db; 571 | 572 | foreach (dbTables() as $tableName => $tableColumns) { 573 | if (!$db->table_exists($tableName)) { 574 | continue; 575 | } 576 | 577 | if (isset($tableColumns['unique_key'])) { 578 | foreach ($tableColumns['unique_key'] as $key_name => $key_value) { 579 | if ($db->index_exists($tableName, $key_name)) { 580 | continue; 581 | } 582 | 583 | $db->write_query( 584 | "ALTER TABLE {$db->table_prefix}{$tableName} ADD UNIQUE KEY {$key_name} ({$key_value})" 585 | ); 586 | } 587 | } 588 | } 589 | 590 | return true; 591 | } 592 | 593 | function dbVerifyColumns(): bool 594 | { 595 | global $db; 596 | 597 | foreach (FIELDS_DATA as $tableName => $tableColumns) { 598 | if (!$db->table_exists($tableName)) { 599 | continue; 600 | } 601 | 602 | foreach ($tableColumns as $fieldName => $fieldData) { 603 | if (!isset($fieldData['type'])) { 604 | continue; 605 | } 606 | 607 | if ($db->field_exists($fieldName, $tableName)) { 608 | $db->modify_column($tableName, "`{$fieldName}`", dbBuildFieldDefinition($fieldData)); 609 | } else { 610 | $db->add_column($tableName, $fieldName, dbBuildFieldDefinition($fieldData)); 611 | } 612 | } 613 | } 614 | 615 | return true; 616 | } 617 | 618 | function dbBuildFieldDefinition(array $fieldData): string 619 | { 620 | $field_definition = ''; 621 | 622 | $field_definition .= $fieldData['type']; 623 | 624 | if (isset($fieldData['size'])) { 625 | $field_definition .= "({$fieldData['size']})"; 626 | } 627 | 628 | if (isset($fieldData['unsigned'])) { 629 | if ($fieldData['unsigned'] === true) { 630 | $field_definition .= ' UNSIGNED'; 631 | } else { 632 | $field_definition .= ' SIGNED'; 633 | } 634 | } 635 | 636 | if (!isset($fieldData['null'])) { 637 | $field_definition .= ' NOT'; 638 | } 639 | 640 | $field_definition .= ' NULL'; 641 | 642 | if (isset($fieldData['auto_increment'])) { 643 | $field_definition .= ' AUTO_INCREMENT'; 644 | } 645 | 646 | if (isset($fieldData['default'])) { 647 | $field_definition .= " DEFAULT '{$fieldData['default']}'"; 648 | } 649 | 650 | return $field_definition; 651 | } -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/admin/user.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | // deprecated -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/class_alerts.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | declare(strict_types=1); 30 | 31 | namespace ougc\Awards\Core; 32 | 33 | use MybbStuff_MyAlerts_Entity_Alert; 34 | use MybbStuff_MyAlerts_Formatter_AbstractFormatter; 35 | 36 | class MyAlertsFormatter extends MybbStuff_MyAlerts_Formatter_AbstractFormatter 37 | { 38 | public function init(): bool 39 | { 40 | loadLanguage(); 41 | 42 | return true; 43 | } 44 | 45 | /** 46 | * Format an alert into it's output string to be used in both the main alerts listing page and the popup. 47 | * 48 | * @param MybbStuff_MyAlerts_Entity_Alert $alert The alert to format. 49 | * 50 | * @return string The formatted alert string. 51 | */ 52 | public function formatAlert(MybbStuff_MyAlerts_Entity_Alert $alert, array $outputAlert): string 53 | { 54 | $Details = $alert->toArray(); 55 | 56 | $ExtraDetails = $alert->getExtraDetails(); 57 | 58 | $awardData = awardGet((int)$Details['object_id']); 59 | 60 | $awardName = htmlspecialchars_uni($awardData['name']); 61 | 62 | $awardImage = $awardClass = awardGetIcon((int)$Details['object_id']); 63 | 64 | $awardImage = eval( 65 | getTemplate( 66 | $awardData['template'] === AWARD_TEMPLATE_TYPE_CLASS ? 'awardImageClass' : 'awardImage' 67 | ) 68 | ); 69 | 70 | return $this->lang->sprintf( 71 | $this->lang->ougcAwardsMyAlerts, 72 | htmlspecialchars_uni($this->mybb->user['username']), 73 | $outputAlert['from_user'], 74 | $awardName, 75 | $awardImage 76 | ); 77 | } 78 | 79 | /** 80 | * Build a link to an alert's content so that the system can redirect to it. 81 | * 82 | * @param MybbStuff_MyAlerts_Entity_Alert $alert The alert to build the link for. 83 | * 84 | * @return string The built alert, preferably an absolute link. 85 | */ 86 | public function buildShowLink(MybbStuff_MyAlerts_Entity_Alert $alert): string 87 | { 88 | global $settings; 89 | 90 | return $settings['bburl'] . '/' . urlHandlerBuild([ 91 | 'action' => 'myAwards' 92 | ]); 93 | } 94 | } -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/hooks/admin.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | declare(strict_types=1); 30 | 31 | namespace ougc\Awards\Hooks\Admin; 32 | 33 | use MyBB; 34 | 35 | use function ougc\Awards\Core\allowImports; 36 | use function ougc\Awards\Core\grantInsert; 37 | use function ougc\Awards\Core\awardInsert; 38 | use function ougc\Awards\Core\categoryInsert; 39 | use function ougc\Awards\Core\loadLanguage; 40 | use function ougc\Awards\Core\runHooks; 41 | 42 | function admin_config_plugins_deactivate() 43 | { 44 | global $mybb, $page; 45 | 46 | if ( 47 | $mybb->get_input('action') != 'deactivate' || 48 | $mybb->get_input('plugin') != 'ougc_awards' || 49 | !$mybb->get_input('uninstall', MyBB::INPUT_INT) 50 | ) { 51 | return; 52 | } 53 | 54 | if ($mybb->request_method != 'post') { 55 | $page->output_confirm_action( 56 | 'index.php?module=config-plugins&action=deactivate&uninstall=1&plugin=ougc_awards' 57 | ); 58 | } 59 | 60 | if ($mybb->get_input('no')) { 61 | admin_redirect('index.php?module=config-plugins'); 62 | } 63 | } 64 | 65 | function admin_config_settings_start() 66 | { 67 | loadLanguage(); 68 | } 69 | 70 | function admin_style_templates_set() 71 | { 72 | loadLanguage(); 73 | } 74 | 75 | function admin_config_settings_change() 76 | { 77 | loadLanguage(); 78 | } 79 | 80 | function admin_config_plugins_begin() 81 | { 82 | global $mybb; 83 | 84 | if (!allowImports() || !($type = $mybb->get_input('ougc_awards_import'))) { 85 | return false; 86 | } 87 | 88 | switch ($type) { 89 | case 'nickawards'; 90 | $name = 'Nickman\'s'; 91 | $tables = ['awards' => 'awards', 'users' => 'awards_given']; 92 | $keys = [ 93 | 'name' => 'name', 94 | 'description' => '', 95 | 'image' => 'image', 96 | 'original_id' => 'id', 97 | 'original_id_u' => 'award_id', 98 | 'uid' => 'to_uid', 99 | 'reason' => 'reason', 100 | 'TIME_NOW' => 'date_given' 101 | ]; 102 | $img_prefix = '{forum_url}/images/awards/'; 103 | $lang_var = 'ougc_awards_import_confirm_nickawards'; 104 | break; 105 | default; 106 | $name = 'MyAwards'; 107 | $tables = ['awards' => 'myawards', 'users' => 'myawards_users']; 108 | $keys = [ 109 | 'name' => 'awname', 110 | 'description' => 'awdescr', 111 | 'image' => 'awimg', 112 | 'original_id' => 'awid', 113 | 'original_id_u' => 'awid', 114 | 'uid' => 'awuid', 115 | 'reason' => 'awreason', 116 | 'TIME_NOW' => 'awutime' 117 | ]; 118 | $img_prefix = '{forum_url}/uploads/awards/'; 119 | $lang_var = 'ougc_awards_import_confirm_myawards'; 120 | break; 121 | } 122 | 123 | $hookArguments = [ 124 | 'tables' => &$tables, 125 | 'keys' => &$keys, 126 | 'img_prefix' => &$img_prefix, 127 | 'lang_var' => &$lang_var, 128 | ]; 129 | 130 | $hookArguments = runHooks('importer_start', $hookArguments); 131 | 132 | global $lang, $mybb, $page; 133 | 134 | loadLanguage(); 135 | 136 | if ($mybb->request_method == 'post') { 137 | if (!verify_post_check($mybb->get_input('my_post_key'))) { 138 | flash_message($lang->invalid_post_verify_key2, 'error'); 139 | admin_redirect('index.php?module=config-plugins'); 140 | } 141 | 142 | if (isset($mybb->input['no'])) { 143 | return true; 144 | } 145 | 146 | global $db; 147 | 148 | if (!$db->table_exists($tables['awards'])) { 149 | flash_message($lang->sprintf($lang->ougc_awards_import_error, $tables['awards']), 'error'); 150 | admin_redirect('index.php?module=config-plugins'); 151 | } 152 | 153 | $query = $db->simple_select('ougc_awards_categories', 'MAX(disporder) AS max_disporder'); 154 | $disporder = (int)$db->fetch_field($query, 'max_disporder'); 155 | 156 | $categoryID = categoryInsert([ 157 | 'name' => 'Imported ' . $name . ' Awards', 158 | 'description' => 'Automatic category created after an import.', 159 | 'allowrequests' => 0, 160 | 'disporder' => ++$disporder 161 | ]); 162 | 163 | $disporder = 0; 164 | 165 | $cache_awards = []; 166 | 167 | $query = $db->simple_select($tables['awards']); 168 | 169 | while ($award = $db->fetch_array($query)) { 170 | $insert_award = [ 171 | 'cid' => $categoryID, 172 | 'name' => $award[$keys['name']], 173 | 'description' => $award[$keys['description']], 174 | 'image' => $img_prefix . $award[$keys['image']], 175 | 'disporder' => isset($award[$keys['disporder']]) ? (int)$award[$keys['disporder']] : ++$disporder, 176 | 'allowrequests' => 0, 177 | 'pm' => '' 178 | ]; 179 | 180 | $awardID = awardInsert($insert_award); 181 | 182 | $insert_award['aid'] = $awardID; 183 | $insert_award[$keys['original_id']] = $award[$keys['original_id']]; 184 | 185 | $cache_awards[$award[$keys['original_id']]] = $insert_award; 186 | } 187 | 188 | $mybb->settings['enablepms'] = false; 189 | 190 | $query = $db->simple_select($tables['users']); 191 | 192 | while ($award = $db->fetch_array($query)) { 193 | $insert_award = [ 194 | 'aid' => $cache_awards[$award[$keys['original_id_u']]]['aid'], 195 | 'uid' => $award[$keys['uid']], 196 | 'reason' => $award[$keys['reason']], 197 | 'TIME_NOW' => $award[$keys['TIME_NOW']] 198 | ]; 199 | 200 | grantInsert( 201 | $cache_awards[$award[$keys['original_id_u']]]['aid'], 202 | $insert_award['uid'], 203 | $insert_award['reason'] 204 | ); 205 | } 206 | 207 | $hookArguments = runHooks('importer_end', $hookArguments); 208 | 209 | flash_message($lang->ougc_awards_import_end, 'success'); 210 | admin_redirect('index.php?module=config-plugins'); 211 | } 212 | 213 | $page->output_confirm_action( 214 | "index.php?module=config-plugins&ougc_awards_import={$type}", 215 | $lang->{$lang_var}, 216 | $lang->ougc_awards_import_title 217 | ); 218 | 219 | return true; 220 | } -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/hooks/shared.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | declare(strict_types=1); 30 | 31 | namespace ougc\Awards\Hooks\Shared; 32 | 33 | use UserDataHandler; 34 | 35 | function datahandler_user_insert(UserDataHandler &$dataHandler): UserDataHandler 36 | { 37 | $dataHandler->user_insert_data['ougc_awards'] = ''; 38 | 39 | return $dataHandler; 40 | } 41 | 42 | function datahandler_user_delete_end(UserDataHandler &$dataHandler): UserDataHandler 43 | { 44 | global $db; 45 | 46 | $db->delete_query('ougc_awards_users', "uid IN ({$dataHandler->delete_uids})"); 47 | 48 | $db->delete_query('ougc_awards_category_owners', "userID IN ({$dataHandler->delete_uids})"); 49 | 50 | $db->delete_query('ougc_awards_owners', "uid IN ({$dataHandler->delete_uids})"); 51 | 52 | $db->delete_query('ougc_awards_requests', "uid IN ({$dataHandler->delete_uids})"); 53 | 54 | $db->delete_query('ougc_awards_tasks_logs', "uid IN ({$dataHandler->delete_uids})"); 55 | 56 | $db->delete_query('ougc_awards_presets', "uid IN ({$dataHandler->delete_uids})"); 57 | 58 | return $dataHandler; 59 | } -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "showInPosts": { 3 | "optionscode": "numeric", 4 | "value": 4 5 | }, 6 | "groupAwardGrantsInPosts": { 7 | "optionscode": "yesno", 8 | "value": 0 9 | }, 10 | "showInPostsPresets": { 11 | "optionscode": "numeric", 12 | "value": 10 13 | }, 14 | "showInProfile": { 15 | "optionscode": "numeric", 16 | "value": 4 17 | }, 18 | "groupAwardGrantsInProfiles": { 19 | "optionscode": "yesno", 20 | "value": 0 21 | }, 22 | "showInProfilePresets": { 23 | "optionscode": "numeric", 24 | "value": 10 25 | }, 26 | "perPage": { 27 | "optionscode": "numeric", 28 | "value": 10 29 | }, 30 | "perPageViewUsers": { 31 | "optionscode": "numeric", 32 | "value": 10 33 | }, 34 | "groupsView": { 35 | "optionscode": "groupselect", 36 | "value": -1 37 | }, 38 | "groupsPresets": { 39 | "optionscode": "groupselect", 40 | "value": -1 41 | }, 42 | "presetsMaximum": { 43 | "optionscode": "numeric", 44 | "value": 5 45 | }, 46 | "groupsModerators": { 47 | "optionscode": "groupselect", 48 | "value": 4 49 | }, 50 | "statsEnabled": { 51 | "optionscode": "yesno", 52 | "value": 1 53 | }, 54 | "statsLatestGrants": { 55 | "optionscode": "numeric", 56 | "value": "10" 57 | }, 58 | "notificationPrivateMessage": { 59 | "optionscode": "yesno", 60 | "value": 0 61 | }, 62 | "grantDefaultVisibleStatus": { 63 | "optionscode": "yesno", 64 | "value": 1 65 | }, 66 | "uploadPath": { 67 | "optionscode": "text", 68 | "value": "./uploads/awards/" 69 | }, 70 | "uploadDimensions": { 71 | "optionscode": "text", 72 | "value": "32|32" 73 | }, 74 | "uploadSize": { 75 | "optionscode": "text", 76 | "value": "50" 77 | }, 78 | "privateMessageSenderUserID": { 79 | "optionscode": "numeric", 80 | "value": 0 81 | }, 82 | "groupsTasks": { 83 | "optionscode": "groupselect", 84 | "value": -1 85 | }, 86 | "groupsMyAwards": { 87 | "optionscode": "groupselect", 88 | "value": -1 89 | }, 90 | "enableDvzStream": { 91 | "optionscode": "yesno", 92 | "value": 1 93 | } 94 | } -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/awardImage.html: -------------------------------------------------------------------------------- 1 | {$awardName} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/awardImageClass.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/awardWrapper.html: -------------------------------------------------------------------------------- 1 | {$awardImage} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/checkBoxField.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$mybb->settings['bbname']} - {$pageTitle} 4 | {$headerinclude} 5 | 6 | 7 | {$header} 8 | {$pageContents} 9 |
10 | {$footer} 11 | 20 | 21 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelButtons.html: -------------------------------------------------------------------------------- 1 | {$buttonText} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelCategoryOwners.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 14 | 15 | {$ownersList} 16 |
4 | {$lang->ougcAwardsControlPanelCategoryOwnersTableTitle} 5 |
{$lang->ougcAwardsControlPanelOwnersTableUsername} 10 | {$lang->ougcAwardsControlPanelOwnersTableDate} 11 | 12 | {$lang->ougcAwardsControlPanelOwnersTableOptions} 13 |
17 |
18 | {$paginationMenu} 19 |
20 | 21 | 22 | 23 | 26 | 27 | 28 | 31 | 32 | 33 | 35 | 37 | 38 |
24 | {$lang->ougcAwardsControlPanelCategoryOwnersForm} 25 |
29 | {$lang->ougcAwardsControlPanelCategoryOwnersFormDescription} 30 |
{$lang->ougcAwardsControlPanelCategoryOwnersFormUsernames}: 34 |
39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelConfirmation.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 |
{$confirmationTitle}
14 | {$confirmationContent} 15 |
18 |
19 |
21 |
22 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelConfirmationDeleteAward.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelDeleteAwardTableDescription}

2 |
3 | {$lang->ougcAwardsControlPanelDeleteAwardDetailTotalOwners}: {$ownersTotal}
4 | {$lang->ougcAwardsControlPanelDeleteAwardDetailTotalGranted}: {$grantedTotal}
5 | {$lang->ougcAwardsControlPanelDeleteAwardDetailTotalRequests}: {$pendingRequestTotal} 6 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelConfirmationDeleteCategory.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelDeleteCategoryTableDescription}

2 |
3 | {$lang->ougcAwardsControlPanelDeleteCategoryDetailTotalAwards}: {$awardsTotal}
4 | {$lang->ougcAwardsControlPanelDeleteCategoryDetailTotalCategoryOwners}: {$ownersCategoryTotal}
5 | {$lang->ougcAwardsControlPanelDeleteCategoryDetailTotalOwners}: {$ownersTotal}
6 | {$lang->ougcAwardsControlPanelDeleteCategoryDetailTotalGranted}: {$grantedTotal}
7 | {$lang->ougcAwardsControlPanelDeleteCategoryDetailTotalRequests}: {$pendingRequestTotal} 8 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelConfirmationDeleteOwner.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelDeleteOwnersDescription}
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelContents.html: -------------------------------------------------------------------------------- 1 | {$errorMessages} 2 | {$pageContents} 3 | {$actionButtons} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 11 | 12 |
4 | {$lang->ougcAwardsControlPanelTitle} 5 |
9 | {$lang->ougcAwardsControlPanelEmpty} 10 |
13 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelGrantEdit.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 23 | 26 | 27 | 28 | 34 | 38 | 39 | 40 | 46 | 50 | 51 |
8 | {$lang->ougcAwardsControlPanelEditGrantTableTitle} 9 |
13 | {$lang->ougcAwardsControlPanelEditGrantTableDescription} 14 |
18 | {$lang->ougcAwardsControlPanelEditGrantTableReason} 19 |
20 | {$lang->ougcAwardsControlPanelEditGrantTableReasonDescription} 21 |
22 |
24 | 25 |
29 | {$lang->ougcAwardsControlPanelEditGrantTableThread} 30 |
31 | {$lang->ougcAwardsControlPanelEditGrantTableThreadDescription} 32 |
33 |
35 | 37 |
41 | {$lang->ougcAwardsControlPanelEditGrantTableDate} 42 |
43 | {$lang->ougcAwardsControlPanelEditGrantTableDateDescription} 44 |
45 |
47 | 49 |
52 |
53 |
54 | 55 |
56 |
57 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 12 | 15 | 18 | {$moderationColumnOptions} 19 | {$moderationColumnRequest} 20 | {$moderationColumnExtra} 21 | {$moderationColumnDisplayOrder} 22 | {$moderationColumnEnabled} 23 | 24 | {$awardsList} 25 |
4 | {$categoryLinks} 5 | {$categoryName} 6 |
10 | {$lang->ougcAwardsControlPanelAward} 11 | 13 | {$lang->ougcAwardsControlPanelName} 14 | 16 | {$lang->ougcAwardsControlPanelDescription} 17 |
26 |
27 | {$updateButton} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListButtonUpdateCategory.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | 8 |
9 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListCategoryLinks.html: -------------------------------------------------------------------------------- 1 |
2 | {$lang->ougcAwardsControlPanelAwardNewAward} 3 | {$moderatorLinks} 4 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListCategoryLinksModerator.html: -------------------------------------------------------------------------------- 1 | | {$lang->ougcAwardsControlPanelAwardViewOwners} 2 | | {$lang->ougcAwardsControlPanelAwardEditCategory} 3 | | {$lang->ougcAwardsControlPanelAwardDeleteCategory} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListColumnDisplayOrder.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelDisplayOrder} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListColumnEnabled.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelEnabled} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListColumnOptions.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelOptions} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListColumnRequest.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelRequest} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$awardImage} 3 | {$awardName} 5 | 6 | {$awardDescription} 7 | {$rowColumnOptions} 8 | {$rowColumnRequest} 9 | {$rowColumnExtra} 10 | {$rowColumnDisplayOrder} 11 | {$rowColumnEnabled} 12 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRowDisplayOrder.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRowEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsControlPanelEmpty} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRowEnabled.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRowOptions.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRowRequest.html: -------------------------------------------------------------------------------- 1 | 2 | {$requestButton} 3 | 4 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelListRowRequestButton.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsControlPanelRequestAward} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelLogs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | {$logsRows} 17 |
4 | {$lang->ougcAwardsControlPanelLogsTableTitle} 5 |
{$lang->ougcAwardsControlPanelLogsTableUser}{$lang->ougcAwardsControlPanelLogsTableGranted}{$lang->ougcAwardsControlPanelLogsTableRevoked}{$lang->ougcAwardsControlPanelLogsTableDate} 13 | {$lang->ougcAwardsControlPanelLogsTableOptions} 14 |
18 |
19 | {$paginationMenu} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelLogsEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsControlPanelLogsTableEmpty} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelLogsPagination.html: -------------------------------------------------------------------------------- 1 | {$paginationMenu} 2 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelLogsRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$userName} 3 | {$logGrantAwards} 4 | {$logRevokeAwards} 5 | {$logDate} 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelMyAwards.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 17 | 20 | 23 | {$rowHeadColumnsExtra} 24 | 25 | {$grantedList} 26 |
4 | {$lang->ougcAwardsControlPanelMyAwardsTableTitle} 5 |
9 | {$lang->ougcAwardsControlPanelMyAwardsTableAward} 10 | {$lang->ougcAwardsControlPanelMyAwardsTableName}{$lang->ougcAwardsControlPanelMyAwardsTableReason}{$lang->ougcAwardsControlPanelMyAwardsTableThread} 15 | {$lang->ougcAwardsControlPanelMyAwardsTableDate} 16 | 18 | {$lang->ougcAwardsControlPanelMyAwardsTableDisplayOrder} 19 | 21 | {$lang->ougcAwardsControlPanelMyAwardsTableDisplay} 22 |
27 |
28 |
29 | 30 |
31 | 33 |
34 |
35 | {$paginationMenu} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelMyAwardsEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelMyAwardsEmpty} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelMyAwardsPagination.html: -------------------------------------------------------------------------------- 1 | {$paginationMenu} 2 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelMyAwardsRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$awardImage} 3 | {$awardName} 4 | {$grantReason} 5 | {$threadLink} 6 | {$grantDate} 7 | 8 | 11 | 12 | 13 | 15 | 16 | {$rowColumnsExtra} 17 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelMyAwardsRowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelNewEditAwardForm.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 23 | 26 | 27 | 28 | 34 | 37 | 38 | 39 | 45 | 46 | 47 | {$fileUploadRow} 48 | 49 | 55 | 58 | 59 | 60 | 66 | 79 | 80 | 81 | 87 | 95 | 96 | 97 | 103 | 106 | 107 | 108 | 114 | 127 | 128 | {$additionalRows} 129 |
8 | {$tableTitle} 9 |
13 | {$tableDescription} 14 |
18 | {$lang->ougcAwardsControlPanelNewAwardName} 19 |
20 | {$lang->ougcAwardsControlPanelNewAwardNameDescription} 21 |
22 |
24 | 25 |
29 | {$lang->ougcAwardsControlPanelNewAwardDescription} 30 |
31 | {$lang->ougcAwardsControlPanelNewAwardDescriptionDescription} 32 |
33 |
35 |
40 | {$lang->ougcAwardsControlPanelNewAwardCategory} 41 |
42 | {$lang->ougcAwardsControlPanelNewAwardCategoryDescription} 43 |
44 |
{$categorySelect}
50 | {$lang->ougcAwardsControlPanelNewAwardImageType} 51 |
52 | {$lang->ougcAwardsControlPanelNewAwardImageTypeDescription} 53 |
54 |
56 |
61 | {$lang->ougcAwardsControlPanelNewAwardTemplateType} 62 |
63 | {$lang->ougcAwardsControlPanelNewAwardTemplateTypeDescription} 64 |
65 |
67 | 78 |
82 | {$lang->ougcAwardsControlPanelNewAwardAllowRequests} 83 |
84 | {$lang->ougcAwardsControlPanelNewAwardAllowRequestsDescription} 85 |
86 |
88 | 90 | 91 | 93 | 94 |
98 | {$lang->ougcAwardsControlPanelNewAwardPrivateMessage} 99 |
100 | {$lang->ougcAwardsControlPanelNewAwardPrivateMessageDescription} 101 |
102 |
104 | 105 |
109 | {$lang->ougcAwardsControlPanelNewAwardDisplayType} 110 |
111 | {$lang->ougcAwardsControlPanelNewAwardDisplayTypeDescription} 112 |
113 |
115 | 126 |
130 |
131 |
132 | 133 |
134 |
135 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelNewEditAwardFormUpload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsControlPanelNewAwardImageFile} 4 |
5 | {$lang->ougcAwardsControlPanelNewAwardImageFileDescription} 6 |
7 | 8 | 9 | 10 |
{$fileUploadedNote}
11 | 12 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelNewEditCategoryForm.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 23 | 26 | 27 | 28 | 34 | 37 | 38 | 39 | 45 | 53 | 54 | 55 | 61 | 68 | 69 | 70 | 76 | 80 | 81 | 82 | 88 | 96 | 97 | 98 | 104 | 112 | 113 | {$additionalRows} 114 |
8 | {$tableTitle} 9 |
13 | {$tableDescription} 14 |
18 | {$lang->ougcAwardsControlPanelNewCategoryName} 19 |
20 | {$lang->ougcAwardsControlPanelNewCategoryNameDescription} 21 |
22 |
24 | 25 |
29 | {$lang->ougcAwardsControlPanelNewCategoryDescription} 30 |
31 | {$lang->ougcAwardsControlPanelNewCategoryDescriptionDescription} 32 |
33 |
35 |
40 | {$lang->ougcAwardsControlPanelNewCategoryAllowRequests} 41 |
42 | {$lang->ougcAwardsControlPanelNewCategoryAllowRequestsDescription} 43 |
44 |
46 | 48 | 49 | 51 | 52 |
56 | {$lang->ougcAwardsControlPanelNewCategoryEnabled} 57 |
58 | {$lang->ougcAwardsControlPanelNewCategoryEnabledDescription} 59 |
60 |
62 | 64 | 65 | 66 | 67 |
71 | {$lang->ougcAwardsControlPanelNewCategoryDisplayOrder} 72 |
73 | {$lang->ougcAwardsControlPanelNewCategoryDisplayOrderDescription} 74 |
75 |
77 | 79 |
83 | {$lang->ougcAwardsControlPanelNewCategoryOutputInCustomSection} 84 |
85 | {$lang->ougcAwardsControlPanelNewCategoryOutputInCustomSectionDescription} 86 |
87 |
89 | 91 | 92 | 94 | 95 |
99 | {$lang->ougcAwardsControlPanelNewCategoryHideInMainPage} 100 |
101 | {$lang->ougcAwardsControlPanelNewCategoryHideInMainPageDescription} 102 |
103 |
105 | 107 | 108 | 110 | 111 |
115 |
116 |
117 | 118 |
119 |
120 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelNewEditTaskForm.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 23 | 26 | 27 | 28 | 34 | 37 | 38 | 39 | 45 | 51 | 52 | 53 | 59 | 67 | 68 | 69 | 75 | 78 | 79 | 80 | 86 | 89 | 90 | 91 | 97 | 100 | 101 | 102 | 108 | 111 | 112 | 113 | 119 | 122 | 123 | 124 | 130 | 134 | 135 |
8 | {$tableTitle} 9 |
13 | {$tableDescription} 14 |
18 | {$lang->ougcAwardsControlPanelNewTaskName} 19 |
20 | {$lang->ougcAwardsControlPanelNewTaskNameDescription} 21 |
22 |
24 | 25 |
29 | {$lang->ougcAwardsControlPanelNewTaskDescription} 30 |
31 | {$lang->ougcAwardsControlPanelNewTaskDescriptionDescription} 32 |
33 |
35 | 36 |
40 | {$lang->ougcAwardsControlPanelNewTaskEnabled} 41 |
42 | {$lang->ougcAwardsControlPanelNewTaskEnabledDescription} 43 |
44 |
46 | 47 | 48 | 49 | 50 |
54 | {$lang->ougcAwardsControlPanelNewTaskType} 55 |
56 | {$lang->ougcAwardsControlPanelNewTaskTypeDescription} 57 |
58 |
60 | 62 | 63 | 65 | 66 |
70 | {$lang->ougcAwardsControlPanelNewTaskRequirements} 71 |
72 | {$lang->ougcAwardsControlPanelNewTaskRequirementsDescription} 73 |
74 |
76 | {$requirementOptions} 77 |
81 | {$lang->ougcAwardsControlPanelNewTaskGrant} 82 |
83 | {$lang->ougcAwardsControlPanelNewTaskGrantDescription} 84 |
85 |
87 | {$awardsGrantSelect} 88 |
92 | {$lang->ougcAwardsControlPanelNewTaskReason} 93 |
94 | {$lang->ougcAwardsControlPanelNewTaskReasonDescription} 95 |
96 |
98 | 99 |
103 | {$lang->ougcAwardsControlPanelNewTaskThread} 104 |
105 | {$lang->ougcAwardsControlPanelNewTaskThreadDescription} 106 |
107 |
109 | 110 |
114 | {$lang->ougcAwardsControlPanelNewTaskRevoke} 115 |
116 | {$lang->ougcAwardsControlPanelNewTaskRevokeDescription} 117 |
118 |
120 | {$awardsRevokeSelect} 121 |
125 | {$lang->ougcAwardsControlPanelNewTaskDisplayOrder} 126 |
127 | {$lang->ougcAwardsControlPanelNewTaskDisplayOrderDescription} 128 |
129 |
131 | 133 |
136 |
137 | 138 | 139 | 142 | 143 | {$requirementRows} 144 |
140 | {$lang->ougcAwardsControlPanelNewTaskRequirements} 141 |
145 |
146 |
147 | 148 |
149 |
150 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelNewEditTaskFormRequirementRow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$optionName}: 4 |
5 | {$optionDescription} 6 |
7 | 8 | 9 | {$inputRow} 10 | 11 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelOwners.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 14 | 15 | {$ownersList} 16 |
4 | {$lang->ougcAwardsControlPanelOwnersTableTitle} 5 |
{$lang->ougcAwardsControlPanelOwnersTableUsername} 10 | {$lang->ougcAwardsControlPanelOwnersTableDate} 11 | 12 | {$lang->ougcAwardsControlPanelOwnersTableOptions} 13 |
17 |
18 | {$paginationMenu} 19 |
20 | 21 | 22 | 23 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 36 | 37 |
24 | {$lang->ougcAwardsControlPanelOwnersForm} 25 |
29 | {$lang->ougcAwardsControlPanelOwnersFormDescription} 30 |
{$lang->ougcAwardsControlPanelOwnersFormUsernames}:
38 |
39 |
40 | 41 |
42 |
43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelOwnersEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelOwnersEmpty} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelOwnersRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$userProfileLink} 3 | {$ownerDate} 4 | 5 | {$lang->ougcAwardsControlPanelUsersTableOptionsDelete} 7 | 8 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelPresets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {$presetRows} 14 |
4 | {$lang->ougcAwardsControlPanelPresetsTableTitle} 5 |
{$lang->ougcAwardsControlPanelPresetsTableDescription}
{$presetsList}{$newPresetForm}
15 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelPresetsAward.html: -------------------------------------------------------------------------------- 1 | {$awardImage} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelPresetsDefault.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelPresetsForm.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelPresetsRow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsControlPanelPresetsTableHidden} 4 | {$hiddenAwards} 5 | 6 | 7 | 8 | {$lang->ougcAwardsControlPanelPresetsTableVisible} 9 | {$visibleAwards} 10 | 11 | 12 | 108 | 130 | 131 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelPresetsSelect.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {$presetOptions} 4 | 5 | {$setDefaultButton} 6 | 7 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelRequests.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 18 | 21 | 24 | 27 | 28 | {$requestsList} 29 |
8 | {$lang->ougcAwardsControlPanelRequestsTableTitle} 9 |
13 | {$lang->ougcAwardsControlPanelRequestsTableAward} 14 | 16 | {$lang->ougcAwardsControlPanelRequestsTableUsername} 17 | 19 | {$lang->ougcAwardsControlPanelRequestsTableMessage} 20 | 22 | {$lang->ougcAwardsControlPanelRequestsTableStatus} 23 | 25 | {$lang->ougcAwardsControlPanelRequestsTableOptions} 26 |
30 | {$buttons} 31 |
32 |
33 | {$paginationMenu} 34 |
35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 47 | 54 | 55 |
40 | {$lang->ougcAwardsControlPanelRequestsFilterTitle}: 41 |
45 | {$lang->ougcAwardsControlPanelRequestsFilterStatus} 46 | 48 | 53 |
56 |
57 |
58 | 59 |
60 |
61 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelRequestsEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsControlPanelRequestsEmpty} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelRequestsRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$awardImage} 3 | {$userProfileLink} 4 | {$requestMessage} 5 | {$requestStatus} 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelTasks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 11 | 14 | 17 | 20 | 23 | {$optionsThead} 24 | 25 | {$taskRows} 26 |
4 | {$lang->ougcAwardsControlPanelTasksTableTitle} 5 |
9 | {$lang->ougcAwardsControlPanelTasksTableName} 10 | 12 | {$lang->ougcAwardsControlPanelTasksTableDescription} 13 | 15 | {$lang->ougcAwardsControlPanelTasksTableRequirements} 16 | 18 | {$lang->ougcAwardsControlPanelTasksTableGrant} 19 | 21 | {$lang->ougcAwardsControlPanelTasksTableRevoke} 22 |
27 |
-------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelTasksEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsControlPanelTasksTableEmpty} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelTasksRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$taskName} 3 | {$taskDescription} 4 | 5 | 6 | 7 | {$taskGrantAwards} 8 | {$taskRevokeAwards} 9 | {$optionsColumn} 10 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelTasksRowOptions.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelTasksTableOptionsViewLogs} 4 | {$lang->ougcAwardsControlPanelTasksTableOptionsEdit} 5 | {$lang->ougcAwardsControlPanelTasksTableOptionsDelete} 6 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelTasksRowRequirement.html: -------------------------------------------------------------------------------- 1 |
  • {$requirementText}
  • -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelTasksThead.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelTasksTableOptions} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | {$grantedList} 17 |
    4 | {$lang->ougcAwardsControlPanelUsersTableTitle} 5 |
    {$lang->ougcAwardsControlPanelUsersTableUsername}{$lang->ougcAwardsControlPanelUsersTableReason}{$lang->ougcAwardsControlPanelUsersTableThread} 12 | {$lang->ougcAwardsControlPanelUsersTableDate} 13 | {$columnHeader} 14 |
    18 |
    19 | {$paginationMenu} 20 | {$grantForm} 21 | {$revokeForm} 22 | 23 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersColumnOptions.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelUsersTableOptions} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelUsersEmpty} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersFormGrant.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 30 | 31 |
    8 | {$lang->ougcAwardsControlPanelGrantTable} 9 |
    13 | {$lang->ougcAwardsControlPanelGrantTableDescription} 14 |
    {$lang->ougcAwardsControlPanelGrantTableUsernames}:
    {$lang->ougcAwardsControlPanelGrantTableReason}:
    {$lang->ougcAwardsControlPanelGrantTableThread}:
    32 |
    33 |
    34 | 35 |
    36 |
    37 |
    38 | 39 | 40 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersFormRevoke.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 20 | 21 |
    8 | {$lang->ougcAwardsControlPanelRevokeTable} 9 |
    13 | {$lang->ougcAwardsControlPanelRevokeTableDescription} 14 |
    {$lang->ougcAwardsControlPanelRevokeTableUsernames}:
    22 |
    23 |
    24 | 25 |
    26 |
    27 |
    28 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$userProfileLink} 3 | {$grantReason} 4 | {$threadLink} 5 | {$grantDate} 6 | {$columnRow} 7 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersRowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/controlPanelUsersRowOptions.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsControlPanelUsersTableOptionsEditGrant} 4 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/css.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/globalNotification.html: -------------------------------------------------------------------------------- 1 |
    2 | {$messageContent} 3 |

    -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/globalPagination.html: -------------------------------------------------------------------------------- 1 | {$paginationMenu} 2 |
    3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/global_menu.html: -------------------------------------------------------------------------------- 1 |
  • {$lang->ougcAwardsGlobalMenu}
  • -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/inputField.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/js.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/modcp_requests_buttons.html: -------------------------------------------------------------------------------- 1 |
    2 |
    7 |
    -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$mybb->settings['bbname']} - {$lang->ougc_awards_page_title} 4 | {$headerinclude} 5 | 6 | 7 | {$header} 8 | {$pageContents} 9 | {$footer} 10 | 17 | 18 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/pageRequest.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/pageRequestButton.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/pageRequestError.html: -------------------------------------------------------------------------------- 1 | 2 | {$errorMessages} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/pageRequestForm.html: -------------------------------------------------------------------------------- 1 | 2 | {$awardImage}
    {$awardName} 3 | 4 | 5 | {$lang->ougcAwardsRequestMessage}: 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/pageRequestSuccess.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougcAwardsRedirectRequest} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBit.html: -------------------------------------------------------------------------------- 1 |
    2 | {$sectionContents} 3 |
    -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitContent.html: -------------------------------------------------------------------------------- 1 | {$grantedList} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitEmpty.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OUGC-Network/ougc-Awards/1f7f22c28377e5b7790abd1e4d6d2cb91c7b7919/Upload/inc/plugins/ougc/Awards/templates/postBitEmpty.html -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitPagination.html: -------------------------------------------------------------------------------- 1 | {$paginationMenu} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitPreset.html: -------------------------------------------------------------------------------- 1 |
    2 | {$presetName} {$lang->ougcAwardsPostPresetsTitle}: {$awardsList} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitPresets.html: -------------------------------------------------------------------------------- 1 |
    2 | {$presetName} {$lang->ougcAwardsProfilePresetsTitle} 3 |
    4 |
    5 | {$presetList} 6 |
    -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitPresetsRow.html: -------------------------------------------------------------------------------- 1 | {$awardImage} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitPresetsRowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitRow.html: -------------------------------------------------------------------------------- 1 | {$awardImage} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitRowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitRowTotalCount.html: -------------------------------------------------------------------------------- 1 |  ({$totalAwardGrants}) -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitViewAll.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsPostViewAll} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/postBitViewAllSection.html: -------------------------------------------------------------------------------- 1 | {$sectionTitle} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profile.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {$sectionContents} 9 | 10 |
    {$sectionTitle}
    11 |
    -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileContent.html: -------------------------------------------------------------------------------- 1 | {$grantedList} 2 | {$paginationMenu} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsProfileEmpty} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profilePagination.html: -------------------------------------------------------------------------------- 1 | 2 | {$paginationMenu} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profilePresets.html: -------------------------------------------------------------------------------- 1 | 2 | {$presetName} {$lang->ougcAwardsProfilePresetsTitle}: 3 | {$presetList} 4 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profilePresetsRow.html: -------------------------------------------------------------------------------- 1 | {$awardImage} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profilePresetsRowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileRow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$grantDate} {$awardName} 4 | 5 | 6 | 7 | 8 | {$awardImage} {$grantReason} {$threadLink} 9 | 10 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileRowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileRowTotalCount.html: -------------------------------------------------------------------------------- 1 |  ({$totalAwardGrants}) -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileViewAll.html: -------------------------------------------------------------------------------- 1 | {$lang->ougcAwardsProfileViewAll} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profileViewAllSection.html: -------------------------------------------------------------------------------- 1 | {$sectionTitle} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profile_row.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$grantDate} {$awardName} 4 | 5 | 6 | 7 | 8 | {$awardImage} {$grantReason} {$threadLink} 9 | 10 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/profile_rowLink.html: -------------------------------------------------------------------------------- 1 | {$threadData['threadPrefix']}{$threadSubject} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/radioField.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/selectField.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/selectFieldOption.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/stats.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {$userList} 11 |
    {$title}
     {$lang->ougcAwardsStatsUser}{$lang->ougcAwardsStatsTotal}
    12 |
    -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/statsUserRow.html: -------------------------------------------------------------------------------- 1 | 2 | {$statOrder} 3 | {$profileLinkFormatted} 4 | {$grantDate} 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/stats_empty.html: -------------------------------------------------------------------------------- 1 | 2 | {$lang->ougc_awards_stats_empty} 3 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/streamItem.html: -------------------------------------------------------------------------------- 1 | {$streamText} {$awardImage} -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/textAreaField.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/viewAll.html: -------------------------------------------------------------------------------- 1 |
  • {$lang->ougcAwardsWelcomeLinkText}
  • -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/viewAllSection.html: -------------------------------------------------------------------------------- 1 |
  • 2 | {$sectionTitle} 3 |
  • -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/viewUser.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/viewUserEmpty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$lang->ougcAwardsViewUserEmpty} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/viewUserError.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$errorMessage} 4 | 5 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc/Awards/templates/viewUserRow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {$grantDate} {$awardName} 4 | 5 | 6 | 7 | 8 | {$awardImage} {$grantReason} {$threadLink} 9 | 10 | -------------------------------------------------------------------------------- /Upload/inc/plugins/ougc_awards.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | declare(strict_types=1); 30 | 31 | use function ougc\Awards\Core\addHooks; 32 | use function ougc\Awards\Core\cacheUpdate; 33 | use function ougc\Awards\Admin\pluginInfo; 34 | use function ougc\Awards\Admin\pluginActivate; 35 | use function ougc\Awards\Admin\pluginDeactivate; 36 | use function ougc\Awards\Admin\pluginIsInstalled; 37 | use function ougc\Awards\Admin\pluginUninstall; 38 | 39 | use const ougc\Awards\ROOT; 40 | 41 | defined('IN_MYBB') || die('This file cannot be accessed directly.'); 42 | 43 | // You can uncomment the lines below to avoid storing some settings in the DB 44 | define('ougc\Awards\Core\SETTINGS', [ 45 | //'key' => '', 46 | 'allowImports' => false, 47 | 'myAlertsVersion' => '2.1.0' 48 | ]); 49 | 50 | define('ougc\Awards\Core\DEBUG', false); 51 | 52 | define('ougc\Awards\ROOT', MYBB_ROOT . 'inc/plugins/ougc/Awards'); 53 | 54 | require_once ROOT . '/core.php'; 55 | 56 | defined('PLUGINLIBRARY') || define('PLUGINLIBRARY', MYBB_ROOT . 'inc/plugins/pluginlibrary.php'); 57 | 58 | if (defined('IN_ADMINCP')) { 59 | require_once ROOT . '/admin.php'; 60 | require_once ROOT . '/hooks/admin.php'; 61 | 62 | addHooks('ougc\Awards\Hooks\Admin'); 63 | } else { 64 | require_once ROOT . '/hooks/forum.php'; 65 | 66 | addHooks('ougc\Awards\Hooks\Forum'); 67 | } 68 | 69 | require_once ROOT . '/hooks/shared.php'; 70 | 71 | addHooks('ougc\Awards\Hooks\Shared'); 72 | 73 | function ougc_awards_info(): array 74 | { 75 | return pluginInfo(); 76 | } 77 | 78 | function ougc_awards_activate(): bool 79 | { 80 | return pluginActivate(); 81 | } 82 | 83 | function ougc_awards_deactivate(): bool 84 | { 85 | return pluginDeactivate(); 86 | } 87 | 88 | function ougc_awards_is_installed(): bool 89 | { 90 | return pluginIsInstalled(); 91 | } 92 | 93 | function ougc_awards_uninstall(): bool 94 | { 95 | return pluginUninstall(); 96 | } 97 | 98 | function update_ougc_awards() 99 | { 100 | cacheUpdate(); 101 | } -------------------------------------------------------------------------------- /Upload/inc/tasks/ougc_awards.php: -------------------------------------------------------------------------------- 1 | . 27 | ****************************************************************************/ 28 | 29 | declare(strict_types=1); 30 | 31 | use function ougc\Awards\Core\loadLanguage; 32 | use function ougc\Awards\Core\executeTask; 33 | 34 | function task_ougc_awards(array $taskData): bool 35 | { 36 | global $lang; 37 | 38 | executeTask(); 39 | 40 | add_task_log($taskData, $lang->ougcAwardsTaskRan); 41 | 42 | return true; 43 | } 44 | -------------------------------------------------------------------------------- /Upload/jscripts/ougc_awards.js: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * ougc Awards plugin (/jscripts/ougc_awards.js) 4 | * Author: Omar Gonzalez 5 | * Copyright: © 2012-2020 Omar Gonzalez 6 | * 7 | * Website: https://ougc.network 8 | * 9 | * Adds a powerful awards system to you community. 10 | * 11 | *************************************************************************** 12 | 13 | **************************************************************************** 14 | This program is free software: you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation, either version 3 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program. If not, see . 26 | ****************************************************************************/ 27 | 28 | let ougcAwards = { 29 | RequestAward: function (awardID) { 30 | var postData = 'action=requestAward&modal=1&awardID=' + parseInt(awardID); 31 | 32 | MyBB.popupWindow('/awards.php?' + postData); 33 | }, 34 | 35 | ViewAwards: function (userID, currentPage, SectionID, postID = 0) { 36 | var postData = 'viewAwards=1&uid=' + parseInt(userID) + '§ionID=' + parseInt(SectionID) + '&page' + parseInt(SectionID) + '=' + parseInt(currentPage) + '&pid=' + parseInt(postID); 37 | 38 | if(parseInt(postID) === 0) { 39 | postData = postData + '&action=profile'; 40 | } 41 | 42 | $.ajax( 43 | { 44 | type: 'post', 45 | dataType: 'json', 46 | url: parseInt(postID) !== 0 ? 'showthread.php' : 'member.php', 47 | data: postData, 48 | success: function (request) { 49 | if (typeof request.content === 'string') { 50 | 51 | document.getElementById( 52 | 'ougcAwardsProfileTable' + parseInt(userID) + '_' + parseInt(SectionID) + '_' + parseInt(postID) 53 | ).innerHTML = request.content; 54 | } 55 | }, 56 | error: function (xhr) { 57 | //location.reload(true); 58 | } 59 | }); 60 | }, 61 | 62 | DoRequestAward: function (awardID) { 63 | var postData = $('.requestForm' + parseInt(awardID)).serialize(); 64 | 65 | $.ajax( 66 | { 67 | type: 'post', 68 | dataType: 'json', 69 | url: 'awards.php', 70 | data: postData, 71 | success: function (request) { 72 | if (request.error) { 73 | alert(request.error); 74 | } else { 75 | $(request.modal).appendTo('body').modal({fadeDuration: 250}).fadeIn('slow'); 76 | } 77 | }, 78 | error: function (xhr) { 79 | location.reload(true); 80 | } 81 | }); 82 | 83 | return false; 84 | }, 85 | 86 | ViewAll: function (userID, currentPage = 1, sectionID = 0) { 87 | var postData = 'action=viewUser&modal=1&userID=' + parseInt(userID) + '§ionID=' + parseInt(sectionID) + '&page=' + parseInt(currentPage); 88 | 89 | MyBB.popupWindow('/awards.php?' + postData); 90 | } 91 | }; -------------------------------------------------------------------------------- /Upload/uploads/awards/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |   7 | 8 | --------------------------------------------------------------------------------