[2.0.20] Annual Stars

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
10
71%
Very Good
3
21%
Good
1
7%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 14

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28013
Joined: Sat Aug 16, 2003 7:36 am

[2.0.20] Annual Stars

Post by Extensions Robot » Fri Apr 21, 2006 3:05 am

MOD Name: Annual Stars
Author: drathbun
MOD Description: This MOD adds one star per each 365 days of membership on a user's profile, their entry on the memberlist, and on viewtopic.


MOD Version: 1.0.2 (Updated 05/10/06)

Download File: annual_stars.1.0.2.zip
mods overview page: View
File Size: 3926 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
webmacster87
Former Team Member
Posts: 3758
Joined: Fri Jun 11, 2004 2:30 am
Location: San Mateo, CA
Name: Douglas Bell
Contact:

Post by webmacster87 » Mon May 08, 2006 1:11 pm

MOD Validated/Released

Notes:
This MOD will add a number of stars to a users' profile, posts, and the memberlist indicating how many years he/she has been registered to the board.

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun » Mon May 08, 2006 1:20 pm

FAQ
  • Help, I installed the MOD but no stars show up! What did I do wrong?
    First make sure you uploaded the graphic, and that you referenced the proper path in the admin panel.
    Next, make sure you have at least one user that has been a member of your board for at least a year. ;-)
  • Does this MOD handle leap years?
    No, it does not. It was much easier to simply subtrace 365 days from the current date and compare to the registration date. As a result, the "annual" nature of this Annual Stars MOD is a bit compromised.
  • Will you make a special graphic for me?
    Nope, my skills are not in that area. There are several colors of stars provided in the download package that work well for light-colored backgrounds. A user has provided a collection of stars that can be used for dark-color backgrounds as well. If you create something and would like to share it, feel free to send me a PM with the details, and I will be happy to host the images.
Edit History:
2007-08-13 : Added FAQ and download link to stars for dark-colored background boards

Screen shots:

Admin Control Panel
Image

Memberlist
Image

Profile
Image

On a post (viewtopic)
Image

Samples showing more than one year of membership
Image
Image

Additional graphics provided:
Download stars for dark background - provided by DizzyDazzle, thanks
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw » Mon May 08, 2006 3:05 pm

Thanks! Installing!
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

-SV-
Registered User
Posts: 39
Joined: Tue Aug 23, 2005 9:41 am

Post by -SV- » Mon May 08, 2006 6:26 pm

Nice mod!

Thought about writing something like this myself, but now it appears I don't have to ;)

Thanks!

Xusqui
Registered User
Posts: 84
Joined: Wed Jun 02, 2004 10:35 pm
Contact:

Post by Xusqui » Mon May 08, 2006 6:43 pm

Nice mod!!!

I'll try it...

Peter77sx
Registered User
Posts: 3257
Joined: Wed Nov 09, 2005 2:51 pm

Post by Peter77sx » Mon May 08, 2006 6:45 pm

Congrats on the MOD release! it's a nice little mod. :)

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun » Mon May 08, 2006 7:51 pm

One important point that came out in the testing... you do need to have at least one member of your board that has been a member for at least 365 days before you will see any stars (or other graphic of choice). ;-)

I released a very generic version of the MOD. In my case, I know exactly what the image is so I specify the height and width attributes as part of the <img src="..."> code. The released version does not provide those attributes since I have no idea what size image folks might use.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

observe
Registered User
Posts: 54
Joined: Wed Jul 31, 2002 1:12 am

Post by observe » Mon May 08, 2006 9:34 pm

In my latest version of phpbb, there is also the registration time, which is before the stars.
How can I avoid to show the time?

tnx :)

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun » Tue May 09, 2006 2:00 am

Two points, first, if you want to remove the time only, the easiest thing to do would be to open viewtopic_body.tpl and remove this code:

Code: Select all

<br />{postrow.POSTER_JOINED}
Now as to the MOD as released, there is one subtle thing missing that everyone might want to do. It has nothing to do with security or functionality. It will make your board match the screen shots. There are several options, the easiest of which is to open your existing viewtopic_body.tpl and find this

Code: Select all

{postrow.POSTER_TERM_IMG}
and before that, in the same line, add a break as in this

Code: Select all

<br />
That will put the stars on a new line, which is the intended function of the MOD as shown in the screen shots. The existing code misses that break and adds the stars to the end of the joined date, which is not what was intended.

I will update and release 1.0.2 as quickly as I can. My apologies for the inconvenience.

I've said this over and over... writing the code is the easy part. Writing up the MOD template install instructions gets me nearly every time, no matter how careful I am. :-D
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

User avatar
drumstix42
Registered User
Posts: 1100
Joined: Tue Sep 24, 2002 11:01 pm
Location: NJ
Contact:

Post by drumstix42 » Tue May 09, 2006 3:10 am

This is a cool idea. I think I may just install it :)
Need a phpBB update or mod installed? PM me for any questions and pricing!
HostMonster.com (Unlimited Space, Unlimited Transfer, Unlimited Domains, $6.95/month )

observe
Registered User
Posts: 54
Joined: Wed Jul 31, 2002 1:12 am

Post by observe » Tue May 09, 2006 8:40 am

drathbun wrote:

Code: Select all

{postrow.POSTER_TERM_IMG}
and before that, in the same line, add a break as in this

Code: Select all

<br />


It's just what I've done. Thank you.
(but the hour is just a foolish thing....i wonder if it's in the vanilla version or in some mod i uploaded - how to delete it? :? )

observe

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun » Tue May 09, 2006 11:33 am

If you are getting the time as part of the registration date, I would look in viewtopic.php and find the code that sets up the variable POSTER_JOINED and see if there is some sort of format being applied.

FYI, I went over the MOD install notes last night prior to resubmitting, and the change that I will be submitting is not the same as what I posted above. If you look at the code used to create the variable $poster_term_img within viewtopic.php it adds a conditional <br /> after the string if there are any stars to be assigned, otherwise it leaves it off. In other words, we handle the <br /> at the end of the code.

All you need to do to change the code from 1.0.1 to 1.0.2 is change one of the find statements from this:

Code: Select all

{postrow.POSTER_JOINED}
to this

Code: Select all

{postrow.POSTER_JOINED}<br />
and the following in-line find as well. This will result in the variable {postrow.POSTER_TERM_IMG} being displayed after the break, as intended. The <br /> is already there in the standard phpBB subSilver template.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

deejaybet
Registered User
Posts: 1814
Joined: Thu Dec 08, 2005 2:01 pm
Location: Derry, Northern Ireland
Contact:

Post by deejaybet » Tue May 09, 2006 7:19 pm

drathbun wrote: ...the height and width attributes as part of the <img src="..."> code. The released version does not provide those attributes since I have no idea what size image folks might use.


can u not just leave the attributes out and let the file load normally ? it will just load its original size

also... how does this show along with the ranks?

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Wed May 10, 2006 1:19 pm

MOD Updated to version 1.0.2
See first post for Download Link

Post Reply

Return to “[2.0.x] MOD Database Releases”