MyBB Community Forums

Full Version: OUGC Awards Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have problem with OUGC Awards Plugin,
Maybe you can also help me sir about this, I just put in settings that it will show 4 awards only in postbits to avoid the forum from running out..
please help me, I wan't to make show 4 awards per line..

this is my illustration Sir:

http://imageshack.us/a/img12/8055/helphd.png

I don't have any Idea how to do it.. I hope you can help me.

Thank you.
in \plugins\ougc_awards\plugin.php, function ougc_awards_postbit, line break is added before the first item:

		if($count == 1)
		{
			$br = '<br />'; // We insert a break if it is the first award.
		}

Use Modulo operator (line 845), to add to 5th, 9th... award:

		if($count % 4 == 1)
(2013-05-27, 04:32 PM)thebobo1 Wrote: [ -> ]in \plugins\ougc_awards\plugin.php, function ougc_awards_postbit, line break is added before the first item:

		if($count == 1)
		{
			$br = '<br />'; // We insert a break if it is the first award.
		}

Use Modulo operator (line 845), to add to 5th, 9th... award:

		if($count % 4 == 1)

wow, thank you very much, it works Smile

status: Fixed
(2013-05-27, 04:32 PM)thebobo1 Wrote: [ -> ]Use Modulo operator (line 845), to add to 5th, 9th... award:

		if($count % 4 == 1)

Interesting, thanks thebobo1!
I tried it but doesn't seem to work on my forum?? I am using classic postbit, does that matter?
Thanks unionbanklouie & Omar G.!

RocketFoot,
That was for classic view, yes.

If you have awards in a list <li> and images have different height, you'll have to add in the list (but not before the first list item), something like this:
<li><div style="clear:both;"></div></li>

(or define style in .css file li:nth-child(4){...})
(2013-05-30, 11:45 AM)thebobo1 Wrote: [ -> ]Thanks unionbanklouie & Omar G.!

RocketFoot,
That was for classic view, yes.

If you have awards in a list <li> and images have different height, you'll have to add in the list (but not before the first list item), something like this:
<li><div style="clear:both;"></div></li>

(or define style in .css file li:nth-child(4){...})
Yeah, my award images are all different sizes but I did try your edit without the list tags.

Where would I add the div style code? I see the logic but not sure where/how to implement??
> Where would I add the div style code? I see the logic but not sure where/how to implement??

In original code: \plugins\ougc_awards\plugin.php, function ougc_awards_postbit, line break is added before the first item:
		if($count == 1)
		{
			$br = '<br />'; // We insert a break if it is the first award.
		}

Use something like this:
		if ($count % 4 == 1)
		{
			$br = "<div style=\"clear:both;\"></div>"; // Insert a break before 5th, 9th... award
		}
Still no good for me, the only way I can get it to partially work is with Leefish's template edits. I tried reverting to original and applying the file edits but nothing! LOL! I give up, at least I have rows but the centering is off. I don't think it's your edit, I think it's my forum. I have a large number of plugins that may interfere or something.
Omar, this plugin work for me, but if the award given above than 4, it only dsiplay 4 award in user profile.. How can i solve this?
i need atleast 10 award will be given to user

this is the picture
http://i.imgur.com/NrpemCv.png

(2013-05-27, 02:52 PM)unionbanklouie Wrote: [ -> ]I have problem with OUGC Awards Plugin,
Maybe you can also help me sir about this, I just put in settings that it will show 4 awards only in postbits to avoid the forum from running out..
please help me, I wan't to make show 4 awards per line..

this is my illustration Sir:

http://imageshack.us/a/img12/8055/helphd.png

I don't have any Idea how to do it.. I hope you can help me.

Thank you.

How do you this?
[Image: 3EVW2Yf.png]