Hi,
Now im working on this idea.
Im trying to add a javascript that displays news, I want it inside centerblock (centerbar) but at the bottom.
I can get it to display right when I want it, but it's not really inside the block, since it will display in everyother section (admin, forums, profile, everywhere).
So I know that i need to catch the "if" function so it displays when its called. But since I don't know much about php I couldnt figure it out for myself. This is as far as i get:
echo '<td width="100%" align="left" valign="top" style="padding-top: 10px; padding-bottom: 10px;">';
if($context['TPortal']['centerbar'])
echo '<div>' , TPortal_sidebar('center') , '</div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '<here i would add the javascript code inside a div>';
echo '</td>';
If i do that i get the results I just discribed.
I tried moving the javascript part around inside that piece of code to see if it catches the 'if' function, but I got worse results or none at all.
Any ideas ?
Thanks
If you want to show some thing INSIDE a block, you need to have the actuall code INSIDE the block.
So if you create a center block, you have to add the adcode in that block
I tried with many kind of blocks and they wont pick a javascript.
Looks like I need to add it manually. Or wich type of block will work with a javascript ?
Thanks
You need to add your code into a scriptbox if it's javascript. If its PHP then you need to add it in a phpbox.
If I add it inside a block, the block is shown at the very top and i need it at the bottom, how can i change this then ?
Thanks
there are numbers on the side of each block in the block manager
change those to set their orders
I tried that already
I dont have any center nor index blocks, so the value fallsback to zero all the time
Thanks
Please, I really need to do this, so if blocks are not the solution, I want to added directly into the index.template.php code (if its possible).
Any ideas ?
In order to get it to show on the bottom you'll have to edit it in the index.template.php file right around the theme_copyright()
I forgot to say that I want it to be displayed only when the centerbar displays and with the same width as the centerbar (although this can be done manually also).
In conclusion, I want it to be seen as part of the content of the centerbar.
Thanks
Nevermind, I got it.
I worked with the body table spliting the cell containing the centerbar in two
Thanks anyway