We have seen that every thread has an option at the bottom-left: "Subscribe to this thread" that automatically gets changed after thread subscription and displays as "Unsubscribe from this thread".
![[Image: 39tQeAM.png]]()
Well its a nice feature. It displays the required option only as well as the subscription state of the thread with the user's account. But what about this:
![[Image: Fy9y8g0.png]]()
It shows both the options every time viewing a thread no matter the thread view is 'Linear' or 'Threaded'.
Okay let's play with the codes a little to give the same functionality as the thread subscription option toggle to thread view also. Lets toggle it.
So, open the following template:
ACP > Templates & Styles > Templates > {theme_name} Templates > Show Thread Templates > showthread
and find this code line:
add just after that:
Now in the same template find this code chunk:
Replace with:
Save the template. You are done.
Now you can toggle you thread view links just like your thread subscription links.
![[Image: 5pHd0YV.png]]()
Happy coding
![[Image: 39tQeAM.png]](http://i.imgur.com/39tQeAM.png)
Well its a nice feature. It displays the required option only as well as the subscription state of the thread with the user's account. But what about this:
![[Image: Fy9y8g0.png]](http://i.imgur.com/Fy9y8g0.png)
It shows both the options every time viewing a thread no matter the thread view is 'Linear' or 'Threaded'.
Okay let's play with the codes a little to give the same functionality as the thread subscription option toggle to thread view also. Lets toggle it.
So, open the following template:
ACP > Templates & Styles > Templates > {theme_name} Templates > Show Thread Templates > showthread
and find this code line:
Code:
<script type="text/javascript" src="jscripts/thread.js?ver=1603"></script>add just after that:
Code:
<style type="text/css">#mode_{$mybb->input['mode']} { display: none; }</style>Now in the same template find this code chunk:
Code:
<a href="showthread.php?mode=threaded&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->linear}</a>Replace with:
Code:
<a id="mode_threaded" href="showthread.php?mode=threaded&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->threaded}</a><a id="mode_linear" href="showthread.php?mode=linear&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->linear}</a>Save the template. You are done.
Now you can toggle you thread view links just like your thread subscription links.
![[Image: 5pHd0YV.png]](http://i.imgur.com/5pHd0YV.png)
Happy coding