Thread Rating:
  • 13 Vote(s) - 4.08 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial]How to force/remove postbit styles
#21
nicely explained, great to learn, thankyou
Reply
#22
Updated to include hidden option to save the correct postbit each time the options are saved.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#23
I made this change - has been successfully applied in my forum.

Thanks ...
Reply
#24
Thanks, but I have a problem around postbit info and didn't want to create a separate thread for this.

I need to change buttons and replace them with text equivalents, I mean insead of "Edit" Button put just "Edit" text.

To do this postbit need to be modified accordingly, but my problem is that I need to do this for every language installed on my forum, and I think that should be created new $lang variables.

Where (which PHP file) should I modify (declaring statement and lang) ?
[Image: banner6.gif]
Reply
#25
This isn't really to do with this tutorial but you can go through the postbit templates and find the ones for the buttons, postbit_edit, postbit_quote, postbit_delete etc etc, and remove the image HTML. The 'alt' and 'title' attributes are loaded from language files anyway so that'll be fine. If you remove the image HTML it'll just show the 'alt' text.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#26
This user has been denied support. This user has been denied support.
thanks dear nice
Reply
#27
(11-05-2008, 05:51 PM)MattRogowski Wrote: With MyBB 1.4.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:

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

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

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

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

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:

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

ok, how do you go into phpbb admin stuff and query and edit all of it? I don't understand that.
[Image: f4hhzq.png]
Reply
#28
phpMyAdmin is in your host control panel, ask them if you're not sure where to find it.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#29
Thanks for the tutorial, nice job.
Reply
#30
I'm in Mybb_users>ClassicPostbit. Then I click the pencil icon(or change) and this comes up:

Field: Classicpostbit
Type: INT
Length/Values: 1
Collation: blank
Attributes: blank
Null: not null
Default2: 1
Extra : blank
Comments: blank

What do I change?
Reply


Forum Jump:


Users browsing this thread: MrThirsty, 1 Guest(s)