Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

New Theme (Upshrink/Collapse Assistance)

Aloittaja Biology Forums, elokuu 07, 2011, 01:59:52 IP

« edellinen - seuraava »

Biology Forums

I'm creating a new theme and I'm looking to incorporate the SMF upshrink/downshrink script to a DIV - although I do not know how it it works exactly :-[

  • Check out the attachment, that's what I want to achieve.
    I added the [ + ] button as you see in the attachment by doing this (I simply copy-n-pasted from the original default theme):

    <div id="below" style="border-bottom:2px #33587a solid;">

    <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>

    </div>';


    However, I do not know where to put the ID for the div on top of it. The div on top starts like this:


    <div id="top" style="border-bottom:2px #33587a solid;">

    <table width="100%" cellpadding="8" cellspacing="0" border="0" style="margin-top: 0px;">
    <tr>';


    Could someone please help me understand the upshrink/downshrink script...

    Mind you, all the original scripts have been transferred over from the original theme as well.


MrGrumpy

Attach your index.template.php and i'll look at it for you
the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

Biology Forums

#3
Got it to work after hours of trial and error.

If anyone needs help, let me know

Tomcraft

Can you please tell how you got it to work?

Regards, Torsten

Biology Forums

I believe what I did was:

<a href="#" onclick="shrinkHeaderIC(!current_header_ic); return false;">

<img id="upshrink_ic" src="', $settings['images_url'], '/', empty($options['collapse_header_ic']) ? 'collapsed.gif' : 'expanded.gif', '" alt="*" title="', $txt['upshrink_description'], '" />

</a>

Tomcraft



Tomcraft

Not exactly what I was looking for. You Code is for the Info and statistics section.

I'm looking for a way to upshrink a self coded section underneath the news section.

Regards, Torsten

Advertisement: