[MODDB] Milestone Congratulations 1.2.8

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

darkonia wrote:can you implent the simple points mod system from ganon-master
and when a user reaches a milestone in post or topic the user gain a amount of points/gold etc.
the best wher when its chngable in acp.
You can help me develop this: Try the following and report if it worked:

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	include($phpbb_root_path . 'includes/mods/functions_points.' . $phpEx);
	add_points($user->data['user_id'], 100);
Now set a goal for posts that is easy to reach (say 1 more than the current post number so you only have to post once) and post sth. - check if your points counter increased by 100!
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

darkonia wrote:when you can implent the medals mod from Gremlinn
This is a more complicated mod and atm I have no idea where that medal_id is coming from. I'll try and give you some code for $medal_id = 1:

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	include($phpbb_root_path . 'medals.' . $phpEx);
	award_medal(1, $user->data['user_id'], 'Milestone', time());
Now set a goal for posts that is easy to reach (say 1 more than the current post number so you only have to post once) and post sth. - check if you are awarded a medal.

A problem may be that function award_medal is buried deep in medals.php. If it were in say functions_medals.php in /includes/ it would (probably) be more efficient.
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by darkonia »

MartectX wrote:
darkonia wrote:can you implent the simple points mod system from ganon-master
and when a user reaches a milestone in post or topic the user gain a amount of points/gold etc.
the best wher when its chngable in acp.
You can help me develop this: Try the following and report if it worked:

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	include($phpbb_root_path . 'includes/mods/functions_points.' . $phpEx);
	add_points($user->data['user_id'], 100);
Now set a goal for posts that is easy to reach (say 1 more than the current post number so you only have to post once) and post sth. - check if your points counter increased by 100!
when i want to post this bug appears:

Code: Select all

Fatal error: Cannot redeclare add_points() (previously declared in /usr/export/www/vhosts/funnetwork/hosting/redbusines/phpBB3/includes/mods/functions_points.php:20) in /usr/export/www/vhosts/funnetwork/hosting/redbusines/phpBB3/includes/mods/functions_points.php on line 30
and i get no gold/points
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: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

Try this then:

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	add_points($user->data['user_id'], 100);
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by darkonia »

MartectX wrote:Try this then:

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	add_points($user->data['user_id'], 100);
ok this runs smooth, i get the gold/points and no bug appears.

question: is the ad_points only by post milestones or by all milestones? (posts,topics, user)

or must i add here:

Code: Select all

[code]if ($config['milestone_pgoal'] == $config['num_posts'])
num_topics
num_users ???
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: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

Integrate Milestone Congratulations with Simple Points System

This is for all three possible milestones; adjust the numbers according to your points system (and you should probably tell your users that there are points to be had for reaching milestones!):

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	add_points($user->data['user_id'], 100);
FIND

Code: Select all

if ($config['milestone_tgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	add_points($user->data['user_id'], 100);
FIND

Code: Select all

if ($config['milestone_ugoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	add_points($config['newest_user_id'], 100);
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by darkonia »

wow many people will thank you a lot for this great little feature :mrgreen: thx

Now i check your medals code XD
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
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by darkonia »

MartectX wrote:
darkonia wrote:when you can implent the medals mod from Gremlinn
This is a more complicated mod and atm I have no idea where that medal_id is coming from. I'll try and give you some code for $medal_id = 1:

OPEN /includes/functions_milestones.php

FIND

Code: Select all

if ($config['milestone_pgoal'] == $config['num_posts'])
{
AFTER, ADD

Code: Select all

	include($phpbb_root_path . 'medals.' . $phpEx);
	award_medal(1, $user->data['user_id'], 'Milestone', time());

Now set a goal for posts that is easy to reach (say 1 more than the current post number so you only have to post once) and post sth. - check if you are awarded a medal.

A problem may be that function award_medal is buried deep in medals.php. If it were in say functions_medals.php in /includes/ it would (probably) be more efficient.
ok when i make this, i get this error:

Code: Select all

Fatal error: Cannot redeclare deregister_globals() (previously declared in /usr/export/www/vhosts/funnetwork/hosting/redbusines/phpBB3/common.php:32) in /usr/export/www/vhosts/funnetwork/hosting/redbusines/phpBB3/common.php on line 94
and when i make it so:

AFTER, ADD

Code: Select all

	
	award_medal(1, $user->data['user_id'], 'Milestone', time());
i get this error:

Code: Select all

Fatal error: Call to undefined function award_medal() in /usr/export/www/vhosts/funnetwork/hosting/redbusines/phpBB3/includes/functions_milestones.php on line 21
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: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

Yes, just as I feared: The function award_medal should be declared outside of medals.php so other mods can use it if need be. At the moment I can't help you with integrating that. :cry:
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by darkonia »

ok no problem, the integrating of the points mod was enough good work from you :D

and when enough people wants an advanced acp with changeable points, this will be the greatest XD
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: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

darkonia wrote:and when enough people wants an advanced acp with changeable points, this will be the greatest XD
I really should've been doing something else but here it is anyway: Beta version of the ACP module

You're welcome to try it out and report back!
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by darkonia »

cool i will make it at once XD
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.
mapb_1990
Registered User
Posts: 78
Joined: Sat Apr 21, 2007 1:39 pm
Contact:

Re: [RC] Milestone Congratulations 1.2.3

Post by mapb_1990 »

I install this mod and...

Code: Select all

Erro Geral
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [1064]

SQL

SELECT user_colour FROM phpbb_users WHERE user_id LIKE 

BACKTRACE


FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: index.php
LINE: 130
CALL: dbal_mysql->sql_query()
Image
Image
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: [RC] Milestone Congratulations 1.2.3

Post by MartectX »

mapb_1990 wrote:I install this mod and...

Code: Select all

Erro Geral
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [1064]

SQL

SELECT user_colour FROM phpbb_users WHERE user_id LIKE 

BACKTRACE
That is 1.0.x code, please download the latest version as in the first post of this thread!
User avatar
MartectX
Registered User
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: [RC] Milestone Congratulations 1.2.4

Post by MartectX »

Version 1.2.4
  • History page now validates under XHTML rules
  • Integration of Milestone Congratulations with Simple Points System by Ganon_master
  • Submitted to Mod Database
Locked

Return to “[3.0.x] MODs in Development”