Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Very Simple Automatic Medals Based On Posts
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #26
RE: Very Simple Automatic Medals Based On Posts
(05-07-2012 07:36 AM)MrBrechreiz Wrote:  Too bad it's not work for me.
Note that the basic idea is, the $mybb->settings['pnX'] value is the min num of posts for a user to get the $mybb->settings['amX'] medal.
So, for example, the $mybb->settings['pn1'] value is the min num of posts for a user to get the $mybb->settings['am1'] medal.
If you set 10 as the value of the $mybb->settings['pn1'], if a user has >= 10 posts, he/she will get the $mybb->settings['am1'] medal.
It means that we need to compare the user posts (in postbit, $postnum for MyBB >= 1.6.5) and the $mybb->settings['pn1'] value.
(05-07-2012 07:36 AM)MrBrechreiz Wrote:  

PHP Code:
<if $post['uid'] == 1 && $mybb->settings['pn1']  then>
       {$mybb->settings['am1']}
</if>

In your code above, there is no comparison. The code above means, if the user's id is 1, and the $mybb->settings['pn1'] has a value (no matter whatever the value is), the user will get the $mybb->settings['am1'] medal (no matter how many posts the user has).
So, I think (only my personal opinion) you don't really need the $mybb->settings['pn1'] there?

I'm sorry if I misunderstand what you want to do.

If you only want to give a specific image for user id 1 unconditionally, you can just use the $post['uid'] there, something like this:

Code:
<if $post['uid'] == 1 then><img src="image_url" alt="" title="" /></if>

You don't need to create any settings for that.

Again, I'm really sorry if I misunderstand what you want.


05-08-2012 06:18 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Very Simple Automatic Medals Based On Posts - RateU - 05-08-2012 06:18 AM

 Standard Tools
Forum Jump: