Annual Stars for 3.0

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

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
scobb77
Registered User
Posts: 21
Joined: Thu Mar 12, 2009 1:48 pm

Re: Annual Stars for 3.0

Post by scobb77 »

momentum wrote:Found it!

The second specified edit to the same file....
That was it! It's working perfectly now.
Thanks so much for the help!
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: Annual Stars for 3.0

Post by CJ1985 »

Hello, I am having issues with this MOD. I have been at it for the past 2-3 hours trying to get it to work. I got it to work once, but then when I changed a couple of things such as the alt tag to view Weekly Membership instead of Year of membership, and as well as the name of the image file added.

I am going to add the files I had edited so you can take a look. I have also changed the number of seconds to 604800 (which I think is right) so that each week a member gets a star. I hope that is correct anyways ha.

Any suggestions on this would be highly appreciated!!!

Nevermind, I am unable to load the files because the loader doesn't accept the extensions of the files. Boy, I may have to make more than one post. But hopefully we can figure it out in a quick giffy because I am just getting even more frustrated ha.

Here is one file that I had edited (keep in mind I edited all files just all files won't post in one post):

memberslist_view.html (I cut out what I had edited into the file, because it seems to be too long (too many characters))

Code: Select all

<!-- IF MEMBERSHIP_STARS -->
			<dt>{L_WEEKLY_MEMBERSHIP}:</dt> <dd>{MEMBERSHIP_STARS}</dd>
			<!-- ENDIF -->
memberlist.php

Code: Select all

// annual stars
	$reg_stars ='';
	if ($reg_years = (int) ((time() - (int) $data['user_regdate']) / 31536000))
	{
		$reg_stars = str_repeat($user->img('icon_weekly_star', 'WEEKLY_MEMBERSHIP'), $reg_years);
	}

&

// annual stars
		'MEMBERSHIP_STARS'  => $reg_stars,
imageset.cfg

Code: Select all

img_icon_weekly_star = icon_weekly_star.gif
common.php

Code: Select all

// annual stars
	$lang['WEEKLY_MEMBERSHIP'] = 'Weekly Membership';

?>
acp_styles.php

Code: Select all

// annual stars
		$this->imgeset_keys['icons'][] = 'icon_weekly_star';
		// Execute overall actions
		switch ($action)
		{
viewtopic_body.html

Code: Select all

<!-- IF postrow.MEMBERSHIP_STARS -->
		<dd>&nbsp;</dd>
		<dd>{postrow.MEMBERSHIP_STARS{</dd>
		<!-- ENDIF -->
		
		<dd>&nbsp;</dd>
viewtopic.php

Code: Select all

'warnings'			=> 0,
				'allow_pm'			=> 0,
				// annual stars
				$user_cache[$poster_id]['reg_stars'] = '');

&

// annual stars
			$user_cache[$poster_id]['reg_stars'] = '';
			if ($reg_years = (int) ((time() - (int) $row['user_regdate']) / 31536000))
			{
				$user_cache[$poster_id]['reg_stars'] = str_repeat($user->img('icon_annual_star', 'YEARS_OF_MEMBERSHIP'), $reg_years);
			}

&

		// annual stars
		'MEMBERSHIP_STARS'	=> $user_cache[$poster_id]['reg_stars'],
I believe I got everything that I had edited, if I didn't. I'm sure it's because I didn't find it in the file using STARS stars memberships MEMBERSHIPS, and so forth.

Anyone help me please?

Also, how do I go about changing the names to WEEKLY or weekly so that way it resembles what it is actually doing. I hope that makes sense. HELP ha
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Annual Stars for 3.0

Post by igorw »

Did you refresh the imagesets and purge the cache in the ACP?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: Annual Stars for 3.0

Post by CJ1985 »

Yes, I've done everything. It's driving me nuts.
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: Annual Stars for 3.0

Post by CJ1985 »

What I'm wondering is if I did the dividing and what not wrong for getting it to show up for each week a member is a member, if that makes sense?

Like for instance here is how i figured it was:

60 minutes in an hour, so that would be 60*60*24*7=604800

So that should be everyone gets a star every week. Right? Or am I doing the math wrong?

I have even tried doing it: 31536000 / 52 (52 weeks)

Keep in mind, I am not good with math. lol Never have been, and probably never will be.

I would just leave it to be 31536000 but that is too long, ha!

So am I doing something wrong in that area?
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: Annual Stars for 3.0

Post by CJ1985 »

I don't mean to be bumping this back or anything to the top. But I was trying to fix my issues, and now no one can post a message on my board because of the following:

Code: Select all

Parse error: syntax error, unexpected $end in /home/a9045286/public_html/phpBB3/viewtopic.php on line 1617

HELP?

When I looked on line 1617 of viewtopic.php all I see is this: ?>

So I have not a clue what is going on. But I need a quick answer to fix this so that members can post to my board.
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: Annual Stars for 3.0

Post by CJ1985 »

Nevermind.
User avatar
pascal24
Registered User
Posts: 60
Joined: Mon Apr 06, 2009 7:12 am
Location: Netherlands
Contact:

Re: Annual Stars for 3.0

Post by pascal24 »

Thanks for making this MOD evil<3 ! :D
-Pascal

Support will not be given via PM, MSN or e-mail
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: Annual Stars for 3.0

Post by CJ1985 »

Thanks evil<3 just wanted to let you know that I finally got it working. Don't ask me what was wrong because I had not a clue. lol

But great mod!!
User avatar
Dan27
I've Been Banned!
Posts: 352
Joined: Mon Apr 06, 2009 1:07 pm
Location: United Kingdom
Contact:

Re: Annual Stars for 3.0

Post by Dan27 »

Thanks for the MOD Evil :) Umm, I have a problem, I have added the MOD
but the stars at not showing, I entered the code 2628000 which is the code for monthly membership.

But the stars have not shown up on any profile, any help please?
Dan - Registered user.
Click here to visit my forum.
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Annual Stars for 3.0

Post by igorw »

Did they show up before or did you not check that?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
Dan27
I've Been Banned!
Posts: 352
Joined: Mon Apr 06, 2009 1:07 pm
Location: United Kingdom
Contact:

Re: Annual Stars for 3.0

Post by Dan27 »

I put the MOD on, did everything I had to do, then I went and changed the code so it gives you a star every month instead of year but they still have not shown up, and my forum has been up for about 4 or so months,
so I should have 4 stars but they don't appear on anyones profile/topics/posts etc...
Dan - Registered user.
Click here to visit my forum.
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Annual Stars for 3.0

Post by igorw »

I doubt the problem is with the code in viewtopic. I think it's something with the imagesets...
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
Blue Blood
Registered User
Posts: 767
Joined: Sat Apr 11, 2009 7:09 am
Location: U§A
Name: Blue Blood
Contact:

Re: Annual Stars for 3.0

Post by Blue Blood »

I'm having this problem

Code: Select all

Find

'search'		=> ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '',
			);

Add After

			// annual stars
			$user_cache[$poster_id]['reg_stars'] = '';
			if ($reg_years = (int) ((time() - (int) $row['user_regdate']) / 31536000))
			{
				$user_cache[$poster_id]['reg_stars'] = str_repeat($user->img('icon_annual_star', 'YEARS_OF_MEMBERSHIP'), $reg_years);
			}

The Find specified by the MOD could not be found
I deleted the command in the install.xml and added it manually then tried to install the mod again.. but i still get the same error....
I don't get it... I deleted it from install.xml?????
User avatar
GurlzLubme
Registered User
Posts: 880
Joined: Wed Sep 01, 2004 11:21 am
Location: New York

Re: Annual Stars for 3.0

Post by GurlzLubme »

iftitaj wrote:I solved the following problem
http://www.phpbb.com/community/viewtopi ... 5#p6807895

by doing this:
Open root/language/en/acp/styles.php

FIND:

Code: Select all

));

?>
BEFORE-ADD:

Code: Select all

	'IMG_ICON_ANNUAL_STAR'	=> 'Annual Star',
@evil<3: you should add this FILE EDIT in your instructions. this also solves the problem of no text showing in drop-down menu of editing imageset.

Thanx a lot evil<3 for such a great MOD. :D

OMG! That really solved my issue that's been stressing me for days! After doing this, and selecting the image (i changed mine to a png file), it finally appears! thank you!
1,000,000 Thank Yous to everyone who's been helping me on phpbb.com!
Locked

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