![]() |
Code for specific forums
I have another idea - couldn't find this in the search, so...
I want to have specific code for individual forums, for example a welcome message that appears in X forum, and a different message that appears in Y forum. An added bonus would be the ability to change the announcements in the AdminCP. :) |
Why not using tempate conditionals in forumdisplay template? :)
|
I will try that, but it would be a long piece of code although certainly that seems to be the easiest way.
But it someone wants to make a mod to allow easy modification for the AdminCP, I think it would be popular. I lack the knowledge to do it myself. :) |
I found a better and easier way to do this!
First of all, I don't have much php or mySQL know-how, but I guessed, and managed it myself, and it seems to work. I went to the forum.php file in /admincp and copied all lines of code pertaining to the description box, then renamed the new instances of "description" to "welcome". This gave me a new box and variable in the edit forum page, in the ACP. But when I went to edit that box, I got a mySQL error, so I went to the database, and looked around till I managed to create a new row in the forum table titled welcome. Then I went to forumdisplay.php, and copied the code regarding the forum 'description', and renamed to 'welcome'. Then I placed $forum[welcome] in a table in the forumdisplay template, and voila! The text I had written in the ACP now shows on the forumdisplay! Now I don't need 30 lines of < IF > conditionals, and the welcome messages can be changed easily in the forum edit. I suppose someone could make this into a simple mod, if they knew how to make the database edit from a .php file. :) |
All times are GMT. The time now is 07:46 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|