Bij registratie punten toekennen?

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Gebruikersavatar
Kaza
Berichten: 604
Lid geworden op: 13 sep 2003, 07:46
Locatie: Rotterdam
Contacteer:

Bij registratie punten toekennen?

Bericht door Kaza » 10 feb 2005, 19:53

Ik wil als men zich registreert automatisch 50 punten krijgt van de point mod.
Nu doe ik het handmatig da's te veel werk :D
Kan dit automatisch, zo ja hoe?
Last edited by Kazango on Sat sep 23, 2004 6:35 am; edited 458 times in total

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 10 feb 2005, 20:11

Ik weet niet hoe de point mod in elkaar steekt, dwz hoe de tabel in de database eruit ziet. Als de punten worden opgeteld in de tabel phpbb_users is het heel makkelijk, verander in includes/register.php bij

Code: Selecteer alles

$sql = "INSERT INTO " . USERS_TABLE . "	(user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
				VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
de 0 van het bijbehorende veld naar 50.

Je moet dus zelf een beetje zoeken, maar ik dnek dat het niet erg moeilijk is :wink:
Afbeelding

Gebruikersavatar
Kaza
Berichten: 604
Lid geworden op: 13 sep 2003, 07:46
Locatie: Rotterdam
Contacteer:

Bericht door Kaza » 11 feb 2005, 17:22

Had al gezocht in de database, niks op het eerste gezicht gevonden.
Dit is de aanpassing waar jij op doelde:

Code: Selecteer alles

includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#

	$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;

#
#-----[ AFTER, ADD ]------------------------------------------
#

	$notifydonation = ( isset($HTTP_POST_VARS['notifydonation']) ) ? ( ($HTTP_POST_VARS['notifydonation']) ? TRUE : 0 ) : TRUE;

#
#-----[ FIND ]------------------------------------------
#

			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "

#
#-----[ IN-LINE FIND ]------------------------------------------ 
#

user_notify_pm = $notifypm,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#

user_notify_donation = $notifydonation,

#
#-----[ FIND ]------------------------------------------
#

			$sql = "INSERT INTO " . USERS_TABLE . "	(

#
#-----[ IN-LINE FIND ]------------------------------------------ 
#

user_notify_pm, 

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#

user_notify_donation, 

#
#-----[ FIND ]------------------------------------------
#

				VALUES (

#
#-----[ IN-LINE FIND ]------------------------------------------ 
#

$notifypm, 

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#

$notifydonation, 

#
#-----[ FIND ]------------------------------------------
#

	$notifyreply = $userdata['user_notify'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

	$notifydonation = $userdata['user_notify_donation'];

#
#-----[ FIND ]------------------------------------------
#

		'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',

#
#-----[ AFTER, ADD ]------------------------------------------
#

		'NOTIFY_DONATION_YES' => ( $notifydonation ) ? 'checked="checked"' : '',
		'NOTIFY_DONATION_NO' => ( !$notifydonation ) ? 'checked="checked"' : '',

#
#-----[ FIND ]------------------------------------------
#

		'L_EMAIL_ADDRESS' => $lang['Email_address'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

		'L_NOTIFY_DONATION' => sprintf($lang['Points_notify'], $board_config['points_name']),
		'L_NOTIFY_DONATION_EXPLAIN' => sprintf($lang['Points_notify_explain'], $board_config['points_name']),
Zou het dus een twee drie niet durven zeggen waar ik eventueel die waarde zou moeten aanpassen.
Wellicht een regel toevoegen die een waarde invoegt aan de database
Last edited by Kazango on Sat sep 23, 2004 6:35 am; edited 458 times in total

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 11 feb 2005, 19:10

Gokje:

Code: Selecteer alles

#
#-----[ FIND ]------------------------------------------
#

            VALUES (

#
#-----[ IN-LINE FIND ]------------------------------------------
#

$notifypm,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

50, 
In plaats van wat daar stond.
Afbeelding

Gebruikersavatar
Kaza
Berichten: 604
Lid geworden op: 13 sep 2003, 07:46
Locatie: Rotterdam
Contacteer:

Bericht door Kaza » 12 feb 2005, 09:00

Nee ik zie geen waarde in deze regel en volgens mij heeft het te maken met het krijgen van een private mail bij een donatie van.

Regel uit mijn forum, includes/usercp_register.php:

$sql = "INSERT INTO " . USERS_TABLE . " (user_reg_ip, user_reg_host, user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_from_flag, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_notify_donation, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_gender, user_level, user_allow_pm, user_birthday, user_next_birthday_greeting, user_passwd_change, user_active, user_actkey)
VALUES ('" . str_replace("\'", "''", $user_reg_id) . "', '" . str_replace("\'", "''", $user_reg_host) . "', $user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '$user_flag', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $notifydonation, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, '$gender', 0, 1, '$birthday', '$next_birthday_greeting', ".time().",";
Last edited by Kazango on Sat sep 23, 2004 6:35 am; edited 458 times in total

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 12 feb 2005, 10:15

Dan worden de punten in een nieuwe tabel opgeslagen. Welke mod gebruik je precies? Met download erbij aub.
Afbeelding

Gebruikersavatar
Kaza
Berichten: 604
Lid geworden op: 13 sep 2003, 07:46
Locatie: Rotterdam
Contacteer:

Bericht door Kaza » 12 feb 2005, 10:48

Ik gebruik deze:
Points System MOD (2.1.1)
Het komt van phpbb.com en aangezien mijn engels very slecht is
Last edited by Kazango on Sat sep 23, 2004 6:35 am; edited 458 times in total

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 12 feb 2005, 17:35

Er is dus wel een veld, user_points. Dan is het makkelijk.
Probeer dan eens zo:

Code: Selecteer alles

$sql = "INSERT INTO " . USERS_TABLE . " (user_reg_ip, user_reg_host, user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_from_flag, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_notify_donation, user_points, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_gender, user_level, user_allow_pm, user_birthday, user_next_birthday_greeting, user_passwd_change, user_active, user_actkey)
VALUES ('" . str_replace("\'", "''", $user_reg_id) . "', '" . str_replace("\'", "''", $user_reg_host) . "', $user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '$user_flag', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $notifydonation, 50, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, '$gender', 0, 1, '$birthday', '$next_birthday_greeting', ".time().",";
Er zat trouwens nog een fout in ($popup_pm stond eentje te vroeg). :wink:
Afbeelding

Gesloten