TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,020
  • Total Topics: 21,332
  • Online today: 737
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 496
  • Total: 496

Adding custom code inside the centerbar at the bottom [SOLVED]

Started by raenk, October 04, 2006, 01:26:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raenk

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

G6Cad

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

raenk

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

IchBin


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.

raenk

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

akulion

there are numbers on the side of each block in the block manager

change those to set their orders

raenk

I tried that already

I dont have any center nor index blocks, so the value fallsback to zero all the time

Thanks

raenk

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 ?

IchBin

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()

raenk

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

This website is proudly hosted on Crocweb Cloud Website Hosting.