Into mytheme/Boardindex.template.php,
I try to add echo '<BLOCKQUOTE><BLOCKQUOTE><p>ethnobotanique / ?t.no.b?.ta.nik<br>(Ethnologie) (Botanique) Qui concerne l\'étude des relations entre les peuples et les plantes.</p></BLOCKQUOTE></BLOCKQUOTE>';
So the text appear on the very top of the board index. It works but it also break the layout (the text of the sections become large, etc).
How can I add this text witout affecting the layout?
Does this happen in all themes? Or just a particular theme? Not much we can do if you don't show us the problem. Helps if you post a link so others can see what you are talking about.
Why does your code have a double blockquote tags? Text should be lower case as well.
It happen with Core theme. I use the blockquotes to align the text with the layout.
At left the normal layout, at right the broken.
You need to put your code inside the container div. Basically the first div after the <body> tag.
To do what you need, you don't need to use the blockquote tag. A simple paragraph tag would be fine.
BoardIndex starts like this:
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
I placed the echo just before the first function. If I place it after the function, the text is moved under Accueil - Aide - Rechercher - ...
I already tried to place the text between <div></div> but the same problem happens.
Do I need to set a particular parameter to <p>, so it will replace the blockquotes?
I'm sorry, am I missing something? Did you mean I should add the code like this? :
Quote<body>
<div><p>ethnobotanique / zt.no.bz.ta.nik<br>(Ethnologie) (Botanique) Qui concerne l\'étude des relations entre les peuples et les plantes.</p></div>
</body>
<?php
...
(it doesn't work either)
Yes, all text that appears on the page MUST be after the <body> tag in the index.template.php file. Otherwise you can have bad side-affects that cause different problems in your forum layout and stuff.
(it doesn't work either) does not tell me what the problem is. Post a link or another screenshot. In addition, please post the code you have so we can see how you are doing it.
I wrote this code into index.template.php;
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="mainframe"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
[b]<p>ethnobotanique / et.no.bo.ta.nik<br>(Ethnologie) (Botanique) Relations entre les peuples et les plantes.</p>[/b]
It work, but how can I set a condition so it only appear on the board index page? Thank you.
Anyone? I feel this is easy but I'm just not used to this
Maybe a check like this might work.
if (!isset($context['current_board']))
echo your code.
By the way, you can't use BBC code in the page like that for the bold part. You need to use HTML.
It doesn't work, the echo is triggered on every pages
if (!isset($context['current_board'])) {
echo 'test';
}
I also tried echo $context['current_board']; but it return no value.
I used:
if (empty($context['current_board']) && empty($context['current_action']))
{
echo 'test';
}
Thank you.