MyBB Community Forums

Full Version: How can I make my post bit look like that?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there!

What are they doing to make the awards look like this in the postbit? (2 rows with 2 awards)

http://onehallyu.com/index.php?/topic/13...ow-thread/

I noticed that the awards will appear like this (2 rows with awards and reduced) in their customized theme, however when I revert to the original software theme (to do it: main page -> bottom left corner -> change theme ), the awards are bigger and they appear one beneath the other.


Is it possible to do the same with MyBB (2 rows with 2 awards)? If so, how???

I've been trying to do it for days and so far I have not had much success. XD

Sooo, help me. Blush
What do you mean with awards?

These things?
[Image: 51tuw.jpg]
[Image: 51tvY.jpg]
(2013-10-28, 12:39 AM)QuantumHive Wrote: [ -> ]What do you mean with awards?

These things?
[Image: 51tuw.jpg]
[Image: 51tvY.jpg]

Yeah, the first screenshot:

[Image: 51tuw.jpg]
Look at this:

[Image: 51tIs.jpg]

You can easily customize the postbit to your taste, go to your Admin CP and take a look at: Templates -> Default Templates -> Post Bit Templates -> postbit

But you need some clever way of putting your awards there. I think the website of your example are querying the awards from their database per user. And add them to a template server-side.

So you would need to create a special table or row in your database that connects every user with their corresponding award. Query those awards from the database and add them to your postbit template server-side. Take a look at global.php in the root of your webfolder. That's where all the magic happens.
Although it's discouraged to modify source (because of patches and whatnot), and encouraged to use plugins. I personally think that if you know what you're doing, there's no problem. ^^
(2013-10-28, 01:12 AM)QuantumHive Wrote: [ -> ]Look at this:

[Image: 51tIs.jpg]

You can easily customize the postbit to your taste, go to your Admin CP and take a look at: Templates -> Default Templates -> Post Bit Templates -> postbit

But you need some clever way of putting your awards there. I think the website of your example are querying the awards from their database per user. And add them to a template server-side.

So you would need to create a special table or row in your database that connects every user with their corresponding award. Query those awards from the database and add them to your postbit template server-side. Take a look at global.php in the root of your webfolder. That's where all the magic happens.
Although it's discouraged to modify source (because of patches and whatnot), and encouraged to use plugins. I personally think that if you know what you're doing, there's no problem. ^^

Is there another way to achieve the result I want?

Maybe using OUGC Awards with some modifications? The plugin is pretty good and all, the only problem with it is that awards are placed beside each other. So, my layout will be stretched if I put 4 awards. Plus, it's not aesthetically pleasing.
Yep, the OUGC Award plugin should provide the full functionality that you want.
I took a quick look at the source and indeed upon installation of the plugin, it creates a table for awards in the database. It also creates the templates that are needed in the postbit to display the awards and all the other configurations needed for the plugin.

So just install the plugin and after installation you could just modify the templates for displaying the awards in every postbit.
That's just a simple matter of taste and how you would like to display them, 4 in a row, 2 x 2 grids like they do on the website from your example, that's totally up to you.

Since you want a 2x2 grid to display the awards, just copy the source from your example website and add/customize it to the template:

<fieldset style="border:1px solid; margin: 0px 10px 0px 10px; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; border-color: #FFFFFF;">

<a id="cab_awards" href="http://onehallyu.com/index.php?app=awards&amp;module=view&amp;section=view&amp;do=spec&amp;id=176"><img id="cab_awards" title="Yoona Fan" src="http://onehallyu.com/uploads/awards_images/176-AwardImgIcon-1368734724.png" style="height: 65px; width: 65px;"></a>

<!-- etc. -->
</fieldset>	

Don't literally and blindly copy paste the above code or whatever xD you need to match it to your template.
Play around with the css properties to display them correctly in a 2x2 grid.
(2013-10-28, 02:18 AM)QuantumHive Wrote: [ -> ]Yep, the OUGC Award plugin should provide the full functionality that you want.
I took a quick look at the source and indeed upon installation of the plugin, it creates a table for awards in the database. It also creates the templates that are needed in the postbit to display the awards and all the other configurations needed for the plugin.

So just install the plugin and after installation you could just modify the templates for displaying the awards in every postbit.
That's just a simple matter of taste and how you would like to display them, 4 in a row, 2 x 2 grids like they do on the website from your example, that's totally up to you.

Since you want a 2x2 grid to display the awards, just copy the source from your example website and add/customize it to the template:

<fieldset style="border:1px solid; margin: 0px 10px 0px 10px; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; border-color: #FFFFFF;">

<a id="cab_awards" href="http://onehallyu.com/index.php?app=awards&amp;module=view&amp;section=view&amp;do=spec&amp;id=176"><img id="cab_awards" title="Yoona Fan" src="http://onehallyu.com/uploads/awards_images/176-AwardImgIcon-1368734724.png" style="height: 65px; width: 65px;"></a>

<!-- etc. -->
</fieldset>	

Don't literally and blindly copy paste the above code or whatever xD you need to match it to your template.
Play around with the css properties to display them correctly in a 2x2 grid.

Thanks for helping me. Wink *high five*