MyBB Community Forums

Full Version: Adding text variable to theme?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

I'm looking into adding a variable to my forums themes. Something for me to enter a message into that is displayed on the index for all themes...

Is it possible to add something like {$forum_message} to all themes, and have that bit display text I enter somewhere in the ACP, and have the text be formatted with css also?

Any suggestions would be greatly appreciated. Big Grin
To show this in all themes atonce, you've to edit and insert that code in each theme's index template. However, if you wish you can create a plugin, hooking it into index_start hook and then use preg_replace() to replace certain tag with your code.
As always thanks for the reply Yaldaram! Smile

What I was really wondering (Sorry for not making it clear in the original post), is if I made a new template in global templates. -What would I have to do to have the output of the template put onto the index?

So, if I were to make a template in the global template set, and added my font style, and message. Then named it index_message could I refer to it in the index page template for each theme as ($index_message) ? Then if I wanted to edit the message, I change the index_message template and it will update on all themes, right?

Bumpppp
bumpbump
Anyone? Could really use help with this...
(2012-08-06, 03:25 PM)ToJ Wrote: [ -> ]As always thanks for the reply Yaldaram! Smile

What I was really wondering (Sorry for not making it clear in the original post), is if I made a new template in global templates. -What would I have to do to have the output of the template put onto the index?

So, if I were to make a template in the global template set, and added my font style, and message. Then named it index_message could I refer to it in the index page template for each theme as ($index_message) ? Then if I wanted to edit the message, I change the index_message template and it will update on all themes, right?

Bumpppp
This might work why don't you test it?
You could try OmarG's plugin, the announcement bars, they display on all pages, you can choose the colour via css and you can use Mycode to format the message.

http://udezain.com.ar/forums/thread-free...ement-bars

Mods link :

http://mods.mybb.com/view/ougc-announcement-bars