Post by CrushyGreenRen on Apr 8, 2020 21:08:15 GMT -8
I would like to ask how would I go trying to implement a feature where members are able to set their own banners in their threads (in specific boards). I run a test forum before changing the forum I would like to make changes on. Please pardon the silly images.
In the forum, we have Wormopolis' Custom Thread Titles plugin for both forums, and an edited version of Retread 's Remove MP from First Post plugin in the test forum in order to achieve this "mod banner" effect.
So my question is: How would I go allowing members to set their banners without having staff to edit the plugin?
Side question: Is there also a way to make the banner look different if a member hasn't set a banner image?
So I think the best thing to do when creating a plugin, is to try and break down each part of it. Here is maybe how I would go about developing this plugin.
- Thread key used to store the banner data (URL, or an id from a select list of allowed banners). - Board checking to prevent banners being used in specific boards (route check + plugin settings). - When the user creates the thread (check route), show either a field for them to enter the URL, or a drop down list of allowed banners to select from. - When user submits the thread (check route), save the data into the key. - On thread view (check route), see if there is key data for the thread, if so, display the banner where you need it. - On thread view (check route), if there is no thread data, then display a default banner of your choice. - On thread edit (check route), allow the user to modify the banner.
It's a pretty simple plugin, you need to learn a few things first: