fals
09-18-2007, 09:35 PM
1) Script Title:
Animated collapse with SMF - testforum http://www.chihuahuaforum.dk/
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem:
Hi
I trying to integrade this effect on a already built-in upshrink/downshrink menu header..... in SMF.
At the moment, when you press http://www.fg-forum.dk/smf/Themes/fg-forum/images/upshrink2.gif - the header upshrink/downshrinks.....
I want to use this nifty slide effect instead of the instant change
but i dont know how :confused: ?
Here's some of the code on the build in:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>';
Further down - the "trigger" link"
// this is the upshrink button for the user info section
echo ' <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>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
Anyone have an idea where to put in the codes ?
I thinks it something like http://www.dynamicdrive.com/forums/showpost.php?p=107119&postcount=2
Animated collapse with SMF - testforum http://www.chihuahuaforum.dk/
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem:
Hi
I trying to integrade this effect on a already built-in upshrink/downshrink menu header..... in SMF.
At the moment, when you press http://www.fg-forum.dk/smf/Themes/fg-forum/images/upshrink2.gif - the header upshrink/downshrinks.....
I want to use this nifty slide effect instead of the instant change
but i dont know how :confused: ?
Here's some of the code on the build in:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>';
Further down - the "trigger" link"
// this is the upshrink button for the user info section
echo ' <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>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
Anyone have an idea where to put in the codes ?
I thinks it something like http://www.dynamicdrive.com/forums/showpost.php?p=107119&postcount=2