MyBB Community Forums

Full Version: [Tutorial] How to set all users to the same thread view mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
INTRODUCTION

If you don't feel comfortable knowing that various users are using a different Thread View mode, and therefore a different user experience, and want to set all users to the same thread view mode, as well as stop them from changing it in the future, then that is exactly what this tutorial will tell you how to do. Note: This tutorial is not for changing the postbit style. If that's what you're looking for, please read this instead:

http://community.mybb.com/thread-40093.html

TUTORIAL

1. Go to Admin CP > Configuration > Settings > Show Thread Options.

2. Select Yes from Usenet Style Thread View if you want to use the Threaded Mode, or No if you want to use the Linear Mode.

3. Go to Admin CP > Templates & Style > Templates > Your Template Set > User Control Panel Templates > usercp_options.

4. Find and delete:

<tr>
<td colspan="2"><span class="smalltext">{$lang->thread_mode}</span></td>
</tr>
<tr>
<td colspan="2"><select name="threadmode"><option value="">{$lang->use_default}</option><option value="linear" {$threadview['linear']}>{$lang->linear}</option><option value="threaded" {$threadview['threaded']}>{$lang->threaded}</option></select></td>
</tr>

5. Go to Admin CP > Templates & Style > Templates > Your Template Set > Show Thread Templates > showthread.

6. Find and delete:

<div style="float: right;">
<span class="smalltext"><strong><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
</div>

7. If in step 2 you set Usenet Style Thread View to Yes, execute this SQL query:

UPDATE `mybb_users` SET  `threadmode` =  'threaded';

7. If in step 2 you set Usenet Style Thread View to No, execute this SQL query:

UPDATE `mybb_users` SET  `threadmode` =  'linear';

CONCLUSION

If you followed these steps precisely, all users should now have the same thread view mode, and will be unable from changing it. Either from the User CP or directly in a thread. See the examples below:

[attachment=23288] [attachment=23289]
Thanks a lot for all your tutorials posted. I really appreciate it bro.
Anyway, if i implement this. Is their way i can revert this back? how? Thanks.
Just put the small pieces of code back in their templates. In other words, do the opposite of the tutorial.
Thanks a lot for this tutorial! Smile