Milestone Congratulations

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.
zzschalke04
Registered User
Posts: 1
Joined: Mon Mar 08, 2010 11:50 am

Re: Milestone Congratulations

Post by zzschalke04 »

Code: Select all

    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    set_config('milestone_uid', 2);
    set_config('milestone_uuser', 'Rich');
    set_config('milestone_ucolour', 'AA0000');
    set_config('milestone_users', 1);
    set_config('milestone_ugoal', 100);
    ?>
[/quote]
Can you say me the Code for changing the Posts and Topics?
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Milestone Congratulations

Post by MartectX »

zzschalke04 wrote:Can you say me the Code for changing the Posts and Topics?
Same as above, only change:

Code: Select all

set_config('milestone_tid', 2);
set_config('milestone_tuser', 'Rich');
set_config('milestone_tcolour', 'AA0000');
set_config('milestone_topics', 1);
set_config('milestone_tgoal', 100);
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: Milestone Congratulations

Post by darkonia »

MMOG-Heaven - Das Gaming Portal
Community bedeutet Gleichgesinnte finden - MMOG-Heaven ist Deine Community! Von Spielern für Spieler bietet Dir dieses Portal genau das, was ein Spieler braucht. Bleibe ständig informiert, finde die neuesten MMORPGs, oder suche die frischesten News aus der Welt des Online Gamings - dieses und vieles mehr erwartet Dich auf MMOG-Heaven.
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Milestone Congratulations

Post by MartectX »

darkonia wrote:hi martec can you help us?

https://www.phpbb.de/community/viewtopi ... 6&t=200685
This is difficult to achieve without using table code (which one shouldn't do with proSilver) so I abstained from implementing it (and still do).
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Milestone Congratulations

Post by MartectX »

Ladies and gentlemen,

after months of deliberation I found a surprisingly easy way to counter the "anonymous & bot milestones" bug. Everyone, feel invited to download this new functions_milestones.php and report back. If it proves working I'll pack it up and add French and Spanish translations which were provided quite a while ago by some fellow administrators!

Thank you for using this mod and have a nice beginning of spring,

- MartectX
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: Milestone Congratulations

Post by darkonia »

thx for the fix, i hope it is good xD, anyway a good spring for ya too :mrgreen:
MMOG-Heaven - Das Gaming Portal
Community bedeutet Gleichgesinnte finden - MMOG-Heaven ist Deine Community! Von Spielern für Spieler bietet Dir dieses Portal genau das, was ein Spieler braucht. Bleibe ständig informiert, finde die neuesten MMORPGs, oder suche die frischesten News aus der Welt des Online Gamings - dieses und vieles mehr erwartet Dich auf MMOG-Heaven.
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Milestone Congratulations

Post by MartectX »

darkonia wrote:thx for the fix, i hope it is good xD, anyway a good spring for ya too :mrgreen:
Thank you!

There was a small glitch that has now been corrected, please re-download and just overwrite the old file.
Hardcore_Shad
Registered User
Posts: 60
Joined: Sun Mar 14, 2010 7:47 am

Re: Milestone Congratulations

Post by Hardcore_Shad »

Will this mod work with 3.0.7? Can it be integrated with the Ultimate Points System?

Thanks!
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Milestone Congratulations

Post by MartectX »

Hardcore_Shad wrote:Will this mod work with 3.0.7? Can it be integrated with the Ultimate Points System?
That's a 'Yes!' twice, but integration would have to be done by yourself or someone else.
User avatar
noth
Registered User
Posts: 2528
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: Milestone Congratulations

Post by noth »

it's a great mod and I trust that Martect's new function_milestones.php will eradicate the previous google[bot] problems

thanks for finding the answer Martect :D
Landerro50
Registered User
Posts: 14
Joined: Wed Aug 26, 2009 9:05 pm

Re: Milestone Congratulations

Post by Landerro50 »

Hi, I'm using this mod for some months now and i'm very hapy with it.
But just a few weeks ago the same milestone was given to two persons and now it happened again.

Image

Any idea what's causing this and how it can be solved?


Edit: Ok, I guess the download above will solve the problem :-)
Last edited by Landerro50 on Wed Mar 31, 2010 2:04 pm, edited 1 time in total.
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: Milestone Congratulations

Post by darkonia »

Landerro50 wrote:Hi, I'm using this mod for some months now and i'm very hapy with it.
But just a few weeks ago the same milestone was given to two persons and now it happened again.

Image

Any idea what's causing this and how it can be solved?
have you download this fix?

http://mods.martectx.de/milestones_cong ... 1.2.9a.zip
MMOG-Heaven - Das Gaming Portal
Community bedeutet Gleichgesinnte finden - MMOG-Heaven ist Deine Community! Von Spielern für Spieler bietet Dir dieses Portal genau das, was ein Spieler braucht. Bleibe ständig informiert, finde die neuesten MMORPGs, oder suche die frischesten News aus der Welt des Online Gamings - dieses und vieles mehr erwartet Dich auf MMOG-Heaven.
Landerro50
Registered User
Posts: 14
Joined: Wed Aug 26, 2009 9:05 pm

Re: Milestone Congratulations

Post by Landerro50 »

Just now. But won't there be two records of the same milestone for the same user now if the situation occurs again?

Maybe it should check if this milestone isn't already in the database?
Unforunately I don't know enough php to do that myself.
Landerro50
Registered User
Posts: 14
Joined: Wed Aug 26, 2009 9:05 pm

Re: Milestone Congratulations

Post by Landerro50 »

I tried something myself. Can anyone check my code pls?

Code: Select all

	if ($config['milestone_pgoal'] == $config['num_posts'])
	{
	
		$sqlarray = array(
			'SELECT'	=> '*',
			'FROM'		=> MILESTONES_TABLE
			'WHERE'		=> '`milestone`= ' . $config['num_posts'] . 'AND `type`=1'
		);
		$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
		if(mysql_num_rows($result)<1){
			
			// Determine author of latest post
			$sql_ary = array(
				'SELECT'	=> 'u.user_id, u.username, u.user_colour, p.poster_id, p.post_id',
				'FROM'		=> array(
					USERS_TABLE	=> 'u',
					POSTS_TABLE	=> 'p',
				),
				'WHERE'		=> 'u.user_id = p.poster_id AND p.post_id = (SELECT MAX(post_id) FROM ' . POSTS_TABLE . ')'
			);
			$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
			$achiever = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			$sql = 'INSERT INTO ' . MILESTONES_TABLE . ' ' . $db->sql_build_array('INSERT', array(
				'user_id'	=> $achiever['user_id'],
				'milestone'	=> $config['milestone_pgoal'],
				'type'		=> 1
			));
			$db->sql_query($sql);
		}

		set_config('milestone_pid', $achiever['user_id']);
		set_config('milestone_puser', $achiever['username']);
		set_config('milestone_pcolour', $achiever['user_colour']);
		set_config('milestone_posts', $config['milestone_pgoal']);
		set_config('milestone_pgoal', $config['milestone_pgoal'] + $config['milestone_pinc']);
	}
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Milestone Congratulations

Post by MartectX »

Landerro50 wrote:I tried something myself. Can anyone check my code pls?
Looking good, actually! If you don't mind I'll implement that for all three types of milestones in the next days, just to be sure that this kind of error is taken care of! :)

Right now I'm in bed with rather severe toothache so pray for my recovery! :(
Locked

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