[php] PHPBB2 - waar moet ik de nieuwe code neerzetten?

Pagina: 1
Acties:
  • 48 views sinds 30-01-2008

  • SkyStreaker
  • Registratie: Juni 2002
  • Laatst online: 11:44
Eerst moet ik zeggen dat mijn ervaring met php vrijwel 0,1 is inmiddels :+

Maar toch, ik loop tegen het volgende. Het gaat om een mod om het ip kenbaar te maken bij registratie op het phpbb2 (2.0.19) forum.

De volgende instructie (ik doe dit allemaal handmatig):
code:
1
2
3
4
5
6
7
8
9
# 
#-----[ FIND ]------------------------------------------ 
# 
VALUES ($user_id, 

# 
#-----[ INLINE, ADD AFTER ]------------------------------------------ 
# 
 '" . str_replace("\'", "''", $user_registerip) . "',


Geen probleem, maar ik vind dus 2 van deze opties, helemaal bovenaan en helemaal onderaan:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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, ";
            if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
            {
                $user_actkey = gen_rand_string(true);
                $key_len = 54 - (strlen($server_url));
                $key_len = ( $key_len > 6 ) ? $key_len : 6;
                $user_actkey = substr($user_actkey, 0, $key_len);
                $sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
            }
            else
            {
                $sql .= "1, '')";
            }

            if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
            {
                message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
            }

            $sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator)
                VALUES ('', 'Personal User', 1, 0)";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql);
            }

            $group_id = $db->sql_nextid();

            $sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
                VALUES ($user_id, $group_id, 0)";


Waar moet ik dit neerzetten? :D Ik gok de onderste, maar.... :P tja

StabilityMatrix Discord -> (persistent invite linkje)


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 28-08 12:00

Janoz

Moderator Devschuur®

!litemod

Ik denk dat je met deze vragen beter terecht kunt bij het PHPBB support forum of bij de makers van de mod.

Programming is gericht op het zelf programmeren, niet op het support leveren op scripts van anderen.

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


Dit topic is gesloten.