3.1.x SnippetsCollapse in 3.1.x

Snippets
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Online
Posts: 5974
Joined: Jan 13th, '14, 20:45
    Windows 8 Firefox

Collapse in 3.1.x

Post by dmzx »

Collapse in 3.1.x

Thanks to martin for below code.

Note this hacked into core files i cant see why any one would want an ext for some thing that will always be turned on.

Open: /styles/prosilver/template/forumlist_body.html
Find This may be a partial find and not the whole line

Code: Select all

<!-- BEGIN forumrow -->
Add before Add these lines on a new blank line before the preceding line(s) to find

Code: Select all

<div class="forumlist">
Find This may be a partial find and not the whole line

Code: Select all

<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT  -->
            </ul>
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

</div>
Find This may be a partial find and not the whole line

Code: Select all

<ul class="topiclist forums">
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

<!-- IF SCRIPT_NAME eq 'index' --><div class="trigger active"></div><!-- ENDIF -->
            <div class="collapsethis">
Find This may be a partial find and not the whole line

Code: Select all

<!-- IF forumrow.S_LAST_ROW -->
            </ul>
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

</div>
Find This may be a partial find and not the whole line

Code: Select all

<!-- END forumrow -->
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

</div>
Open: /styles/prosilver/theme/common.css
Find This may be a partial find and not the whole line

Code: Select all

.dropdown .clone.hidden + li {
	border-top: none;
}
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

.trigger {
    background: url("./images/collapse-icon.png") no-repeat;
    width: 32px;
    height: 17px;
    cursor: pointer;
    float: right;
    position: relative;
    z-index: 9998;
    margin-top: -21px;
}

.active {background-position: left top;}
.inactive {background-position: left bottom;}
Open: /styles/prosilver/template/overall_footer.html
Find This may be a partial find and not the whole line

Code: Select all

<!-- IF S_PLUPLOAD --><!-- INCLUDE plupload.html --><!-- ENDIF -->
Add before Add these lines on a new blank line before the preceding line(s) to find

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.cookie.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.collapse.js"></script>

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


collapsible-categories(8).zip
Copy the .js files to template folder and the .png file to theme/image folder.

Now purge the cache and clear your browser.
You do not have the required permissions to view the files attached to this post.
binance.com ;) try it!
User avatar

martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Collapse in 3.1.x

Post by martin »

Screens shots for code above
1.png
2.png
If you want the collapse on other forum headers then use this

Code: Select all

<!-- IF SCRIPT_NAME eq 'index' or 'viewforum' or 'viewtopic' --><div class="trigger active"></div><!-- ENDIF -->
            <div class="collapsethis">
Screenshot of viewforum
3.gif
Demo click to see how it looks with the above code out side of the index page
You do not have the required permissions to view the files attached to this post.
Last edited by martin on Dec 12th, '14, 20:04, edited 3 times in total.
Use this to install an ext on your board no more ftp or path making.
Path too install this ext is ext/boardtools/upload
Download is here Make it easy for us to solve your issues
User avatar

testing
Users
Users
Magic user status: Offline
Posts: 6
Joined: Dec 11th, '14, 17:27
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by testing »

I don't understand what is it, can you show a screenshot?
User avatar

martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by martin »

Screenshots added.
User avatar

testing
Users
Users
Magic user status: Offline
Posts: 6
Joined: Dec 11th, '14, 17:27
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by testing »

Thanks! That will be saved if the player will logout?
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Online
Posts: 5974
Joined: Jan 13th, '14, 20:45
    Windows 8 Firefox

Re: Collapse in 3.1.x

Post by dmzx »

Its cookie based.
Logout and see.
User avatar

martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Collapse in 3.1.x

Post by martin »

Yes until you clear your browser's cache it will stay as you left it.
User avatar

testing
Users
Users
Magic user status: Offline
Posts: 6
Joined: Dec 11th, '14, 17:27
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by testing »

Awesome.
User avatar

Sycron
Users
Users
Magic user status: Offline
Posts: 4
Joined: Nov 22nd, '14, 20:21
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by Sycron »

For 3.0.12 ? :D
User avatar

martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Collapse in 3.1.x

Post by martin »

Sycron wrote:For 3.0.12 ? :D
No this is for 3.1.X for 3.0.12 and below use this Collapsible Categories with Cookies - Christian Bullock
User avatar

Sycron
Users
Users
Magic user status: Offline
Posts: 4
Joined: Nov 22nd, '14, 20:21
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by Sycron »

martin wrote:
Sycron wrote:For 3.0.12 ? :D
No this is for 3.1.X for 3.0.12 and below use this Collapsible Categories with Cookies - Christian Bullock
Thx
User avatar

Allen42
Users
Users
Magic user status: Offline
Posts: 5
Joined: Dec 12th, '14, 01:33
    Windows 7 Internet Explorer

Re: Collapse in 3.1.x

Post by Allen42 »

The expandable/collapsible is working on forums at the 3.1.2 version, so it works well without an extension! :)

How would you install this?
Last edited by Allen42 on Dec 13th, '14, 14:01, edited 1 time in total.
User avatar

martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Collapse in 3.1.x

Post by martin »

As i said in another topic i dont see the point of an ext for some edits it's not like your ever going to turn of the collapse is it :question:

But thats just my view.
User avatar

martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Collapse in 3.1.x

Post by martin »

Might make it into a switch
22.png
You do not have the required permissions to view the files attached to this post.
User avatar

spaceace
Users
Users
Magic user status: Offline
Posts: 29
Joined: Dec 17th, '14, 23:23
    Windows 7 Chrome

Re: Collapse in 3.1.x

Post by spaceace »

Very nice. thank you :grin:
Image