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
MydnyteSyn
Registered User
Posts: 383
Joined: Sun Oct 07, 2007 10:02 am

Re: Annual Stars for 3.0

Post by MydnyteSyn »

:oops: Nevermind, I fixed it
User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Annual Stars for 3.0

Post by whoisit »

Thanks for all the advice, guess I'll to put everything back as it was and not have the annual stars mod.

Graham
User avatar
dethis
Registered User
Posts: 34
Joined: Fri Oct 17, 2008 8:14 pm
Location: Lisboa, Portugal

Re: Annual Stars for 3.0

Post by dethis »

Hi. I would like to kown if its possible to use this mod to work with User Online Time getting the user online time variable, and replacing it for 'user_regdate' used on mod and use it to give stars ? :roll:
if ($reg_years = (int) ((time() - (int) $row['user_regdate']) / 31536000))
Thks in advance.
User avatar
noth
Registered User
Posts: 2487
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: Annual Stars for 3.0

Post by noth »

eviL<3 wrote:
noth wrote:it really annoys me to see people who have not visited the site in over a year STILL getting this star

no matter how long ago they JOINED do they still deserve this star if they HAVE LEFT YOUR SITE?
You could add another condition using the user_lastvisit column to check for this. :)
brilliant :D

8-) what would the code be please?

and where would it go? :mrgreen:
User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Annual Stars for 3.0

Post by whoisit »

Noth,
Another option would be to use the User Reminder mod, it sends a reminder out to those who have not been to the site for a while, after the frst reminder it sends a second then eventually deletes that user for you automatically.

Graham
User avatar
noth
Registered User
Posts: 2487
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: Annual Stars for 3.0

Post by noth »

thanks whoisit :mrgreen: but TerraFrost has coded a working solution in viewtopic.php

so .... to STOP annual stars for members who have not visited in 1 year or more do TerraFrost's code

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
         // 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);
         }
#
#-----[ REPLACE WITH ]----------------------------------
#
         // annual stars
         $user_cache[$poster_id]['reg_stars'] = '';
         if ($reg_years = (int) (((int) $row['user_lastvisit'] - (int) $row['user_regdate']) / 31536000))
         {
            $user_cache[$poster_id]['reg_stars'] = str_repeat($user->img('icon_annual_star', 'YEARS_OF_MEMBERSHIP'), $reg_years);
         }
he has enstalled this on my board (the above change) and it works great :D

thank you TerraFrost!!
User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Annual Stars for 3.0

Post by whoisit »

Noth

The code supplied by Terafrost looks good, but I need to get the annual stars just to work first.
I don't think this Mod is supported anymore but hey if it's working for you great!
galahadkoa
Registered User
Posts: 2
Joined: Tue Mar 10, 2009 6:27 am

Re: Annual Stars for 3.0

Post by galahadkoa »

I really like this mod, but Im reluctant to install it. We had old 2.0 forums that were so heavily modified and ancient that we couldnt transfer all that info over to the new 3.0 forums in early 2008. At the moment every single person would have no more than one star when we have members going back up to 11 years. The next step that this mod needs is a admin panel that allows the board admin to manually add or subtract stars from members regardless of what the registration date says.
momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: Annual Stars for 3.0

Post by momentum »

If you have a copy of the old database you can easily copy each member's registration date into the relevant field of the new forum. A little manual work of course, but it could be done.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
scobb77
Registered User
Posts: 21
Joined: Thu Mar 12, 2009 1:48 pm

Re: Annual Stars for 3.0

Post by scobb77 »

I am using the style Coffee Time and when I install this mod, I am getting the following error when I try to view a topic.
Parse error: syntax error, unexpected ';', expecting ')' in /home/texasne1/public_html/forum/viewtopic.php on line 1098

Here is what I have in the file:
'warnings' => 0,
'allow_pm' => 0,
);
// annual stars
$user_cache[$poster_id]['reg_stars'] = '';

get_user_rank($row['user_rank'], false, $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
}

Any help would be much appreciated.
momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: Annual Stars for 3.0

Post by momentum »

Your error isn't that easy to debug.

Can you please make a copy of your whole viewtopic.php file, archive it and upload it somewhere for us to download & look at?

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
scobb77
Registered User
Posts: 21
Joined: Thu Mar 12, 2009 1:48 pm

Re: Annual Stars for 3.0

Post by scobb77 »

momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: Annual Stars for 3.0

Post by momentum »

Found it!

The second specified edit to the same file.... FIND

Code: Select all

				'search'		=> ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '',
			);
You've managed to remove the ); line when pasting the new code AFTER. Check line 1097 of your file.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Annual Stars for 3.0

Post by whoisit »

Hi,

Just thought I'd let you know it's working, it only gives you a star after 1 year, I'd tried to alter the number of seconds but it wouldn't work, as soon as I reached 1 year it gave me a star. ;)
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Annual Stars for 3.0

Post by iftitaj »

whoisit wrote:Hi,

Just thought I'd let you know it's working, it only gives you a star after 1 year, I'd tried to alter the number of seconds but it wouldn't work, as soon as I reached 1 year it gave me a star. ;)
Have you purged the cache & refresh templates, themes, imagesets after changing those seconds ??? And as far as I remember, there are 2 places where those seconds are mentioned .... have you updated both?
Locked

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