PDA

View Full Version : Profile Mod Request: Badge for join date over 1/yr


TrickyD
08-02-2005, 06:29 PM
I'd like to add a simple badge image with something simple like "Vet" for all members of my forum who have been a member 365 days or longer.

I assume this is something that isn't all that complicated, but since I'm definitely no coder I am hoping you guys can help.

Could I use a simple If statement inside the Postbit that would say...

If user X join date is greater than days Y then display image Z

What variables would I be looking for here?

Unfortunatley the promotions system isn't an option for me on this because I'm already using it for something else.

Possible?

Actually I see that the search tool might have been my friend on this one...

https://vborg.vbsupport.ru/showthread.php?t=73418&highlight=image+join+date

Is the if statement in that thread still valid for 3.5?

Andreas
08-02-2005, 07:04 PM
If you don't want to touch Usergroups:


<if condition="$post['joindate'] + 31536000 < TIMENOW">
Put your stuff here
</if>

kall
08-02-2005, 08:02 PM
Umm...that will display the stars depending on who is viewing them dude. :)

*edit* And it doesn't seem to work for me. I get all users with the stars. Not just the ones with joindates over a year old.

Andreas
08-02-2005, 08:05 PM
It does? ;)

akanevsky
08-02-2005, 08:10 PM
Quick fix:

<if condition="$post['joindate'] + 31536000 <= TIMENOW">

Rather than:

<if condition="$post['joindate'] + 31536000 < TIMENOW">

;)

Andreas
08-02-2005, 08:12 PM
Uh, yes - my Code doesn't comply with the request.

If this 1 second is that important ;)

akanevsky
08-02-2005, 08:15 PM
If this 1 second is that important

It is! One second per year for 60 years and you save a whole minute ;)

TrickyD
08-02-2005, 08:45 PM
Umm...that will display the stars depending on who is viewing them dude. :)

*edit* And it doesn't seem to work for me. I get all users with the stars. Not just the ones with joindates over a year old.
Same problem here. Any ideas guys?

Andreas
08-02-2005, 09:05 PM
Naargh, joindate is formatted at that point :D
OK ... use the attached Plugin and


<if condition="$post['jd_dateline'] + 31536000 <= TIMENOW">
Put your stuff here
</if>

TrickyD
08-03-2005, 12:09 AM
Naargh, joindate is formatted at that point :D
OK ... use the attached Plugin and


<if condition="$post['jd_dateline'] + 31536000 <= TIMENOW">
Put your stuff here
</if>


Thanks again for the help on this thus far! I want to do one last thing with this, can anyone offer anymore help?

I want to also display a specific Icon for users who average more than X number of posts per day.

I tried

<if condition="$post['x_posts_per_day'] > 10">
<img border="0" src="http://www.utopiafootball.com/images/pridestickers/post+++++_2.gif" alt="Post +++++" vspace="1">&nbsp;&nbsp;
</if>

But that wasn't right.

Any ideas?

Bro_Joey_Gowdy
08-03-2005, 12:16 AM
Didnt Erwin have something like this made for vb3.0.0 ?

It could be ported.

TrickyD
08-03-2005, 04:00 AM
Didnt Erwin have something like this made for vb3.0.0 ?

It could be ported.

I did a quick search of Erwin's posts and started threads, but there were so many that I didn't come up with anything.

Any idea where I can find this?

Andreas
08-03-2005, 10:01 PM
Try $post['postsperday']

If this does not work:

To the Plugin add


if (($jointime = (TIMENOW - $this->post['joindate']) / 86400) > 1)
{
$this->post['ppd'] = $this->post['posts'] / $jointime;
}


and then use $post['ppd']

CallieJo
01-30-2006, 03:26 AM
Naargh, joindate is formatted at that point :D
OK ... use the attached Plugin and


<if condition="$post['jd_dateline'] + 31536000 <= TIMENOW">
Put your stuff here
</if>


You saved me! Thank you!!! I appreciate the effort you put into this...ahhh...did I say thanks...life saver is what you are!