toggle, remember open close cookie state
Posted August 5th 2015, 6:19am
toggle, remember open close cookie state on exit.

Hi I found this code of Dion on phpbb site:
https://www.phpbb.com/community/viewtopic.php?f=72&t=2158813&start=15


It works great for the most part but it won't remember the cookie state when refreshed,it always reverts to the open state.

Here is Dion script I placed in, forumlist_body.html phpbb3:

<script type="text/javascript">
function toggleCat(button) {
var cat = button.parentNode.nextSibling;
if (cat.style.display == 'none') {
button.src = "./styles/SE_Gamer_Dark/theme/images/hide2.png";
document.cookie = '_' + cat.id + '=; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;';
}
else {
button.src = "./styles/SE_Gamer_Dark/theme/images/show2.png";
document.cookie = '_' + cat.id + '=1; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;';
}
$(cat).slideToggle('slow');
}

cookies = document.cookie.split('; ');
for (i in cookies) {
if (cookies[i].charAt(0) == '_') {
cookie = cookies[i].split('=');
if (cookie[1] == '1') {
cid = cookie[0].substring(1);
if (document.getElementById(cid)) {toggleLTcategory(cid);} {
document.getElementById(cid).style.display='none';
}
}
}
}
</script>



And here is the html I am using it on:

<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist" style="position:relative">
<li class="header">
<dl class="icon">
<dt><font color="yellow">{L_LP_TITEL}</font></dt>
<dd class="posts"><font color="yellow">{L_REPLIES}</font></dd>
<dd class="views"><font color="yellow">{L_VIEWED}</font></dd>
<dd class="lastpost"> <font color="yellow">{L_LAST_POST}</font></dd>
</dl>
</li>
<img src="./styles/SE_Gamer_Dark/theme/images/hide2.png"

style="cursor:pointer;position:absolute;right:5px;bottom:5px" onclick="toggleCat

(this)" />
</ul><ul id="clastpost" class="topiclist forums" style="display:block">

<!-- BEGIN latest_post -->
<ul class="topiclist forums">
<li class="row<!-- IF latest_post.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon" style="background-image: url({T_IMAGESET_PATH}/forum_link.gif); background-repeat: no-repeat;">
<dt><a href="{latest_post.POST_LINK}">{LAST_POST_IMG}</a> <a href="{latest_post.FORUM_LINK}" class="forumtitle">{latest_post.FORUM_TITLE}</a><br /><a class="lp_center_text" href="{latest_post.POST_LINK}">{latest_post.POST_TEXT}</a><br />{L_IN} <span class="lp_center_forumname">{latest_post.FORUM_NAME}</span></dt>
<dd class="posts">{latest_post.REPLIES}</dd>
<dd class="views">{latest_post.VIEWS}</dd>
<dd class="lastpost">
<!-- IF LP_SHOW_AVATAR --><div class="lp_center_avatar">{latest_post.USER_AVATAR}</div><!-- ENDIF -->
<!-- IF LP_SHOW_AUTHOR --><div class="lp_center_author"> {L_FROM} {latest_post.POST_AUTHOR}<br /> {latest_post.POST_DATE}</div><!-- ELSE --><div class="lp_center_date"> {latest_post.POST_DATE}</div><!-- ENDIF -->
</dd>
</dl>
</li>
</ul>
<!-- BEGINELSE -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_LP_NO_FORUM}</strong>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END latest_post -->
</div>
<span class="corners-bottom"><span></span></span></div>
</div>


I must be doing something wrong :(

Thanks for any help you may provide, I have looked everywhere for a solution.
φ
Posts: 4
Joined: August 3rd 2015, 9:15am
Location: Canada
toggle, remember open close cookie state
Posted August 5th 2015, 5:26pm
I see two problems and one potential problem with your code. The potential problem is that the script MUST be placed after the HTML on the page. That means it should be at the bottom of the forumlist_body template. The first problem is this line:

if (document.getElementById(cid)) {toggleLTcategory(cid);} {

It should be:

if (document.getElementById(cid)) {toggleCat(cid);} {

The bigger problem is that it appears you have modified the scripts incorrectly, and the cookie-reading portion of the script does not match the cookie-setting portion of the script. Your forumlist_body HTML also doesn't look correct; the loop variable is forumrow, not latest_post.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
toggle, remember open close cookie state
Posted August 5th 2015, 7:55pm
Thank you for the reply :)
But the only thing I changed in your original script was the image button information, I did not touch the cookie part.

I made the change in script you suggested, still won't work.

The html code I posted is not part of my forumlist_body.html, it is the actual latest_post_center.html from the mod I used.


This is your posted code I used:

<script type="text/javascript">
function toggleCat(button) {
var cat = button.parentNode.nextSibling;
if (cat.style.display == 'none') {
button.src = "./styles/prosilver/theme/images/hide.png";
document.cookie = '_' + cat.id + '=; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;';
}
else {
button.src = "./styles/prosilver/theme/images/show.png";
document.cookie = '_' + cat.id + '=1; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;';
}
$(cat).slideToggle('slow');
}

cookies = document.cookie.split('; ');
for (i in cookies) {
if (cookies[i].charAt(0) == '_') {
cookie = cookies[i].split('=');
if (cookie[1] == '1') {
cid = cookie[0].substring(1);
if (document.getElementById(cid)) {
document.getElementById(cid).style.display='none';
}
}
}
}
</script>


This is my forumlist_body.html:

<div class="forumlist">
<!-- BEGIN forumrow -->
<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
</ul>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT -->
<div class="forabg<!-- IF $MODERATOR_COLUMN_ON_INDEX == 'yes' and $SIDEBARS != 'both' --> modcolumn<!-- ENDIF --><!-- IF $SIDEBARS == 'both' --> bothsidebars<!-- ENDIF -->">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}"><font color="yellow">{forumrow.FORUM_NAME}</font></a><!-- ELSE --><font color="yellow">{L_FORUM}</font><!-- ENDIF --></dt>
<dd class="topics"><font color="yellow">{L_TOPICS}</font></dd>
<dd class="posts"><font color="yellow">{L_POSTS}</font></dd>
<!-- IF $MODERATOR_COLUMN_ON_INDEX == 'yes' and $SIDEBARS != 'both' -->
<dd class="moderators">{L_MODERATORS}</dd>
<!-- ENDIF -->
<dd class="lastpost"><span><font color="yellow">{L_LAST_POST}</font></span></dd>
</dl>
</li>
</ul>
<!-- IF SCRIPT_NAME eq 'index' and $COLLAPSIBLE_CATEGORIES == 'on' --><div class="trigger active"></div><!-- ENDIF -->
<div class="collapsethis">
<ul class="topiclist forums">
<!-- ENDIF -->

<!-- IF not forumrow.S_IS_CAT -->
<li class="row<!-- IF forumrow.S_ROW_COUNT is odd --> flbg1<!-- ELSE --> flbg2<!-- ENDIF -->">
<dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
<!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
{forumrow.FORUM_DESC}
<!-- IF forumrow.MODERATORS and $MODERATOR_COLUMN_ON_INDEX == 'no' -->
<br /><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}
<!-- ENDIF -->
<!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS --><br /><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}<!-- ENDIF -->
</dt>
<!-- IF forumrow.CLICKS -->
<dd class="redirect"><span>{L_REDIRECTS}: {forumrow.CLICKS}</span></dd>
<!-- ELSEIF not forumrow.S_IS_LINK -->
<dd class="topics">{forumrow.TOPICS}<dfn>{L_TOPICS}</dfn></dd>
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
<!-- IF $MODERATOR_COLUMN_ON_INDEX == 'yes' and $SIDEBARS != 'both' -->
<dd class="moderators">
<span><!-- IF forumrow.MODERATORS -->{forumrow.MODERATORS}<!-- ELSE -->--<!-- ENDIF --></span>
</dd>
<!-- ENDIF -->
<dd class="lastpost"><span>
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<br /> <!-- ENDIF --></span>
</dd>
<!-- ENDIF -->
</dl>
</li>
<!-- ENDIF -->

<!-- IF forumrow.S_LAST_ROW -->
</ul>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

<!-- BEGINELSE -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_NO_FORUMS}</strong>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END forumrow -->
</div>


<!-- IF $COLLAPSIBLE_CATEGORIES == 'on' -->
<script type="text/javascript">
$(".forumlist").collapse({show: function(){
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
},
hide : function() {

this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
}

});
</script>

<!-- ENDIF -->
<script type="text/javascript">

function toggleCat(button) {
var cat = button.parentNode.nextSibling;
if (cat.style.display == 'none') {
button.src = "./styles/SE_Gamer_Dark/theme/images/hide2.png";
document.cookie = '_' + cat.id + '=; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;';
}
else {
button.src = "./styles/SE_Gamer_Dark/theme/images/show2.png";
document.cookie = '_' + cat.id + '=1; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;';
}
$(cat).slideToggle('slow');
}

cookies = document.cookie.split('; ');
for (i in cookies) {
if (cookies[i].charAt(0) == '_') {
cookie = cookies[i].split('=');
if (cookie[1] == '1') {
cid = cookie[0].substring(1);
if (document.getElementById(cid)) {toggleCat(cid);} {
document.getElementById(cid).style.display='none';
}
}
}
}
</script>



Thanks for trying to help though :)

Cheers
φ
Posts: 4
Joined: August 3rd 2015, 9:15am
Location: Canada
toggle, remember open close cookie state
Posted August 9th 2015, 6:18am
Tried this route also :( :(

I don't know what I am doing wrong, when I click the collapse icon nothing happens :(
Can anyone give me a clue as to what I am missing.
Thanks :)

------------------------------------------------------------------------------------------------------------------
latest_post_center.html ......This is the addon block I want to collapse and expand .......
------------------------------------------------------------------------------------------------------------------

<div class="forabg">
<div class="forumlist">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt><font color="yellow">{L_LP_TITEL}</font></dt>
<dd class="posts"><font color="yellow">{L_REPLIES}</font></dd>
<dd class="views"><font color="yellow">{L_VIEWED}</font></dd>
<dd class="lastpost"> <font color="yellow">Last Post/Reply</font></dd>
</dl>
</li>
</ul>
<div class="trigger active"></div>
<div class="collapsethis">
<!-- BEGIN latest_post -->
<ul class="topiclist forums">
<li class="row<!-- IF latest_post.S_ROW_COUNT is even --> flbg2<!-- ELSE --> flbg1<!-- ENDIF -->">
<dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
<dt><a href="{latest_post.POST_LINK}">{LAST_POST_IMG}</a> <a href="{latest_post.FORUM_LINK}" class="forumtitle">{latest_post.FORUM_TITLE}</a><br /><a class="lp_center_text" href="{latest_post.POST_LINK}">{latest_post.POST_TEXT}</a><br />{L_IN} <span class="lp_center_forumname">{latest_post.FORUM_NAME}</span></dt>
<dd class="posts">{latest_post.REPLIES}</dd>
<dd class="views">{latest_post.VIEWS}</dd>
<dd class="lastpost">
<!-- IF LP_SHOW_AVATAR --><div class="lp_center_avatar">{latest_post.USER_AVATAR}</div><!-- ENDIF -->
<!-- IF LP_SHOW_AUTHOR --><div class="lp_center_author"> {L_FROM} {latest_post.POST_AUTHOR}<br /> {latest_post.POST_DATE}</div><!-- ELSE --><div class="lp_center_date"> {latest_post.POST_DATE}</div><!-- ENDIF -->
</dd>
</dl>
</li>
</ul>
<!-- BEGINELSE -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_LP_NO_FORUM}</strong>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END latest_post -->
</div>
<span class="corners-bottom"><span></span></span></div>
</div></div></div>


------------------------------------------------------------------------------------
forumlist_body.html ....phpbb3 .....
------------------------------------------------------------------------------------

<div class="forumlist">
<!-- BEGIN forumrow -->
<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
</ul>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT -->
<div class="forabg<!-- IF $MODERATOR_COLUMN_ON_INDEX == 'yes' and $SIDEBARS != 'both' --> modcolumn<!-- ENDIF --><!-- IF $SIDEBARS == 'both' --> bothsidebars<!-- ENDIF -->">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}"><font color="yellow">{forumrow.FORUM_NAME}</font></a><!-- ELSE --><font color="yellow">{L_FORUM}</font><!-- ENDIF --></dt>
<dd class="topics"><font color="yellow">{L_TOPICS}</font></dd>
<dd class="posts"><font color="yellow">{L_POSTS}</font></dd>
<!-- IF $MODERATOR_COLUMN_ON_INDEX == 'yes' and $SIDEBARS != 'both' -->
<dd class="moderators">{L_MODERATORS}</dd>
<!-- ENDIF -->
<dd class="lastpost"><span><font color="yellow">{L_LAST_POST}</font></span></dd>
</dl>
</li>
</ul>
<!-- IF SCRIPT_NAME eq 'index' and $COLLAPSIBLE_CATEGORIES == 'on' --><div class="trigger active"></div><!-- ENDIF -->
<div class="collapsethis">
<ul class="topiclist forums">
<!-- ENDIF -->

<!-- IF not forumrow.S_IS_CAT -->
<li class="row<!-- IF forumrow.S_ROW_COUNT is odd --> flbg1<!-- ELSE --> flbg2<!-- ENDIF -->">
<dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
<!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->

<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
{forumrow.FORUM_DESC}
<!-- IF forumrow.MODERATORS and $MODERATOR_COLUMN_ON_INDEX == 'no' -->
<br /><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}
<!-- ENDIF -->
<!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS --><br /><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}<!-- ENDIF -->
</dt>
<!-- IF forumrow.CLICKS -->
<dd class="redirect"><span>{L_REDIRECTS}: {forumrow.CLICKS}</span></dd>
<!-- ELSEIF not forumrow.S_IS_LINK -->
<dd class="topics">{forumrow.TOPICS}<dfn>{L_TOPICS}</dfn></dd>
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
<!-- IF $MODERATOR_COLUMN_ON_INDEX == 'yes' and $SIDEBARS != 'both' -->
<dd class="moderators">
<span><!-- IF forumrow.MODERATORS -->{forumrow.MODERATORS}<!-- ELSE -->--<!-- ENDIF --></span>
</dd>
<!-- ENDIF -->
<dd class="lastpost"><span>
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<br /> <!-- ENDIF --></span>
</dd>
<!-- ENDIF -->
</dl>
</li>
<!-- ENDIF -->

<!-- IF forumrow.S_LAST_ROW -->
</ul>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

<!-- BEGINELSE -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_NO_FORUMS}</strong>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- END forumrow -->
</div>

<!-- IF $COLLAPSIBLE_CATEGORIES == 'on' -->
<script type="text/javascript">
$(".forumlist").collapse({show: function(){
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
},
hide : function() {

this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
}

});
</script>
<!-- ENDIF -->



-----------------------------------------------------------------------------------
common.css ..... phpbb3 .....
-----------------------------------------------------------------------------------

.trigger {
background: url("{T_THEME_PATH}/images/collapse-icon.png") no-repeat;
width: 18px;
height: 19px;
cursor: pointer;
float: right;
position: relative;
z-index: 9998;
margin-top: -30px;
margin-right: 5px;
}
.active {background-position: left top;}
.inactive {background-position: left bottom;}
φ
Posts: 4
Joined: August 3rd 2015, 9:15am
Location: Canada
toggle, remember open close cookie state
Posted August 9th 2015, 11:30am
The reason my code doesn't work is because you're already using some sort of collapsible category script that saves cookies in the same format as my script.

One way to solve this is to incorporate your latest topics block into the forumlist block and use your current collapsible script. You can also modify my script to load/save the cookie with a name that doesn't conflict with the collapsible categories script you currently use.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
toggle, remember open close cookie state
Posted August 10th 2015, 5:27pm
Just to let you know I got it to work after many hours of trial and error :)

I cut this code out of the forumlist_body.html and pasted it into my latest_post.html at the very bottom.


<script type="text/javascript">
$(".forumlist").collapse({show: function(){
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
},
hide : function() {

this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
}

});
</script>


My latest_post.html now looks like this:

<div class="forabg">
<div class="forumlist">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt><font color="yellow">{L_LP_TITEL}</font></dt>
<dd class="posts"><font color="yellow">{L_REPLIES}</font></dd>
<dd class="views"><font color="yellow">{L_VIEWED}</font></dd>
<dd class="lastpost"> <font color="yellow">Last Post/Reply</font></dd>
</dl>
</li>
</ul>

<div class="trigger active"></div>
<div class="collapsethis">
<!-- BEGIN latest_post -->
<ul class="topiclist forums">
<li class="row<!-- IF latest_post.S_ROW_COUNT is even --> flbg2<!-- ELSE --> flbg1<!-- ENDIF -->">
<dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt><a href="{latest_post.POST_LINK}">{LAST_POST_IMG}</a> <a href="{latest_post.FORUM_LINK}" class="forumtitle">{latest_post.FORUM_TITLE}</a><br /><a class="lp_center_text" href="{latest_post.POST_LINK}">{latest_post.POST_TEXT}</a><br />{L_IN} <span class="lp_center_forumname">{latest_post.FORUM_NAME}</span></dt>
<dd class="posts">{latest_post.REPLIES}</dd>
<dd class="views">{latest_post.VIEWS}</dd>
<dd class="lastpost">
<!-- IF LP_SHOW_AVATAR --><div class="lp_center_avatar">{latest_post.USER_AVATAR}</div><!-- ENDIF -->
<!-- IF LP_SHOW_AUTHOR --><div class="lp_center_author"> {L_FROM} {latest_post.POST_AUTHOR}<br /> {latest_post.POST_DATE}</div><!-- ELSE --><div class="lp_center_date"> {latest_post.POST_DATE}</div><!-- ENDIF -->
</dd>
</dl>
</li>
</ul>

<!-- BEGINELSE -->
<div class="panel">

<!-- END latest_post -->

<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>
<script type="text/javascript">
$(".forumlist").collapse({show: function(){
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
},
hide : function() {

this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
}

});
</script>


And all the categories still collapse and the addon shoutbox also.Now everything remembers the cookie state. :)

This may help someone else..
φ
Posts: 4
Joined: August 3rd 2015, 9:15am
Location: Canada

Who is online

Users browsing this forum: No registered users and 0 guests