|
[Tutorial]How to force/remove postbit styles
|
|
11-05-2008, 05:51 PM
(This post was last modified: 10-24-2010 09:12 PM by MattRogowski.)
Post: #1
|
|||
|
|||
|
[Tutorial]How to force/remove postbit styles
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 ACP --> Templates & Style --> Templates --> **expand template set** --> User Control Panel Templates --> usercp_options. Now, search for this code: Code: <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_users` SET `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_users` SET `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 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.
Download My Plugins My Personal Site - Twitter |
|||
|
11-06-2008, 10:23 PM
Post: #2
|
|||
|
|||
|
RE: [Tutorial]How to force/remove postbit styles
Thanks for this great Tutorial, very usefull !! nice work.
A person who never made a mistake never tried anything new. Albert Einstein My blog: Arab Publishers |
|||
|
11-09-2008, 05:26 AM
Post: #3
|
|||
|
|||
|
RE: [Tutorial]How to force/remove postbit styles
Good tutorial. Here's a few additions..
The correct sql command should be: Code: UPDATE mybb_users SET classicpostbit='1' WHERE classicpostbit='0';I got this from this post by WDZ. If you don't do this your postbit will revert back to the horizontal postibit every time you save your options in the User CP. Open the usercp_options template Find: Code: <form action="usercp.php" method="post">Add right below: Code: <input type="hidden" name="classicpostbit" value="1" />
|
|||
|
11-09-2008, 10:20 AM
(This post was last modified: 11-09-2008 10:21 AM by MattRogowski.)
Post: #4
|
|||
|
|||
RE: [Tutorial]How to force/remove postbit styles
(11-09-2008 05:26 AM)monacelli Wrote: The correct sql command should be: Hmm, well I had that first but was then told that what I have now is better... ![]() (11-09-2008 05:26 AM)monacelli Wrote: I got this from this post by WDZ. If you don't do this your postbit will revert back to the horizontal postibit every time you save your options in the User CP. Ooh ok, I'll add that to the OP. Download My Plugins My Personal Site - Twitter |
|||
|
11-09-2008, 03:13 PM
Post: #5
|
|||
|
|||
RE: [Tutorial]How to force/remove postbit styles
(11-09-2008 05:26 AM)monacelli Wrote: The correct sql command should be: I suggested to Matt that he changes it from that to include the ` ` marks - if only to promote best practice for executing MySQL queries. It won't make any difference whichever way you do it. Technically speaking - if you include the hidden post field in the UCP then a user can still change it. Although it's a better alternative to altering source code
|
|||
|
11-11-2008, 09:24 PM
Post: #6
|
|||
|
|||
|
RE: [Tutorial]How to force/remove postbit styles
Really cool. I prefer the classic post bit, the horizontal isn't cool in my opinion. Thanks for sharing Matt_, keep up the good work!
|
|||
|
11-12-2008, 11:47 PM
Post: #7
|
|||
|
|||
|
RE: [Tutorial]How to force/remove postbit styles
I may be stating the obvious, but I think it wasn't mentioned so far: You also have to set Board Settings -> Show Thread options -> Post layout to 'Display posts using the classic layout', so users who register after you alter the database will start out with the right bit.
Thanks for the guide, I too prefer the classic mode... Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary |
|||
|
11-13-2008, 09:02 AM
(This post was last modified: 11-13-2008 09:49 AM by MattRogowski.)
Post: #8
|
|||
|
|||
RE: [Tutorial]How to force/remove postbit styles
(11-12-2008 11:47 PM)frostschutz Wrote: I may be stating the obvious, but I think it wasn't mentioned so far: You also have to set Board Settings -> Show Thread options -> Post layout to 'Display posts using the classic layout', so users who register after you alter the database will start out with the right bit. I mentioned that at the end, but I'll make it a bit clearer. Download My Plugins My Personal Site - Twitter |
|||
|
11-19-2008, 03:56 PM
Post: #9
|
|||
|
|||
|
RE: [Tutorial]How to force/remove postbit styles
Sorry, I'd like to run
Code: UPDATE mybb_users SET classicpostbit='1' WHERE classicpostbit='0'and change to this (hide checkbox) Code: <input type="hidden" class="checkbox" name="classicpostbit" id="classicpostbit" value="0" {$classicpostbitcheck} />I dont like Classic Post Bits. Looks ugly, if you have member with long username
Welcome to MyBB Indonesia. Get your local Bahasa (language) support directly from us. Let's grow together with The Best Opensource MyBB Software!
|
|||
|
11-19-2008, 04:54 PM
Post: #10
|
|||
|
|||
RE: [Tutorial]How to force/remove postbit styles
(11-19-2008 03:56 PM)FBI Wrote: Sorry, I'd like to run Either will work, it makes no difference what so ever. Download My Plugins My Personal Site - Twitter |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)
Search
Member List
Calendar
Help

Also make sure that '



![[Image: celli.gif]](http://i255.photobucket.com/albums/hh136/rapewon/celli.gif)
