Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MyBB] How to Force/Remove postbit styles.
#1
Please note, this.is.not.mine. Original thread can be found here


With MyBB 1.4.x and 1.6.x, there are 2 postbit styles to choose from. The classic postbit has all the user details on the left of the post, the same as MyBB 1.2.x, and the horizontal postbit shows the same information above the post. A lot of people have asked how to remove a postbit style, or force it on users. You may want to do this to make sure everyone is seeing the same thing, because one postbit style works better with your theme than another, or you just don't like one of them. I'll now show you what I consider to be the best way of doing it.

First, we'll delete the option for people to change their postbit style. To do this, go to [b]ACP --> Templates & Style --> Templates --> **expand template set** --> User Control Panel Templates --> usercp_options. Now, search for this code:

Code:
<tr>
    <td valign="top" width="1"><input type="checkbox" class="checkbox" name="classicpostbit" id="classicpostbit" value="1" {$classicpostbitcheck} /></td>
    <td><span class="smalltext"><label for="classicpostbit">{$lang->show_classic_postbit}</label></span></td>
    </tr>

If you want to force the classic postbit, replace it with this:

Code:
<input type="hidden" name="classicpostbit" id="classicpostbit" value="1" />

If you want to force the horizontal postbit, replace it with this:

Code:
<input type="hidden" name="classicpostbit" id="classicpostbit" value="0" />

Now, when you go to User CP > Edit Option, you will notice the option to change your postbit style has gone. Next, we must force the postbit style we want.

If you want to put everybody on the classic postbit, run this query in PHPMyAdmin, or some other database manager:

PHP Code:
UPDATE `mybb_usersSET `classicpostbit` = '1' WHERE `classicpostbit` = '0' 

If you want to put everybody on the horizontal postbit, run this query in PHPMyAdmin, or some other database manager:

PHP Code:
UPDATE `mybb_usersSET `classicpostbit` = '0' WHERE `classicpostbit` = '1' 

Remember to make sure yout table prefix (mybb_ here) is correct.

Now, all your users will have your desired postbit style and will be unable to change it Smile Also make sure that 'ACP > Configuration > Show Thread Options > Post Layout' is what you want to force, as this is what will be used by guests and new users.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How To Install MyBB | MyBB Installation Guide BreShiE 2 1,448 03-10-2012, 06:33 AM
Last Post: BreShiE
  Usergroup Styles Mybb [tut] BannedPoop 26 6,283 08-10-2011, 02:31 PM
Last Post: BannedPoop
  MyBB question @OMNI or any other mybb Guru's 0xE9 13 31,477 07-28-2011, 01:29 PM
Last Post: Pompano
  How to Make your MYBB Central Plugin Compatible with new Mybb Billy Mays 3 2,157 07-12-2011, 06:40 PM
Last Post: Billy Mays
  MyBB Postbit - Add Custom Profile Fields. Sam 8 7,116 07-05-2011, 06:19 AM
Last Post: alv4

Forum Jump:


Users browsing this thread: 1 Guest(s)