Es ist ein Tippspiel (Fußball). Dazu muss man sich aber extra neu registrieren.
Nun wollten aber viele User, dass das die Registrierung in phpBB automatisch auch für das Tippspiel gelten soll.
Nun hat sich ein "pfiffiges" Köpfchen ein paar Gedanken gemacht und da was gemodded.
Diese Beschreibung zur Integration in phpBB ist für mich völlig unverständlich.
Meine Frage nun:
Ist einer so lieb und kann mir erklären, ob die Anleitung richtig ist und wie diese genau funktioniert? ¢¦
Hier mal der komplette Text der Beschreibung:
Da das Tippspiel noch off ist, bin ich alleiniger User mit Admin-Rechten.As a bit of background, this mod effectively inserts the information that the user submits on your Prediction League site in to the phpbb user database as well. Doing it via this mod removes the possibility for authenticating users via your phpbb forum (this feature will need to be turned off in your phpbb admin panel). I would strongly suggest turning on the email authentication for your league, as this will be the defence against spammers joining up.
Changing the layout of the information you have already in your PL user database into a useable format for phpbb takes a bit of doing. I did it via excel formulas. The procedure below talks through how to change it around and the formulas you require to generate the sql insert code for use in phpmyadmin.
Before doing this procedure, i would strongly recommend taking backup copies of the files you will be changing (userfunctions.php, and .../phpbb/templates/<your theme>/overall_header.tpl)
Open userfunctions.php for editing.
Edit the function DeleteUser()
---after------insert---Code: Alles auswählen
// Email the administrator the deleted user $text = "User deleted.\nUser = $userid\nSent to $adminEmailAddr.\nVersion = ".VERSION; @mail($adminEmailAddr, "$PredictionLeagueTitle New User",$text,"From: $email");Edit the function DeleteUserAccount($userid, $pwd)Code: Alles auswählen
mysql_select_db('<your phpbb database>'); $query = "DELETE FROM <your phpbb database>.phpbb_users WHERE user_id='$userid'"; $result = $dbase->query($query); mysql_select_db('<your pl database>');
---after------insert---Code: Alles auswählen
// Delete the entries from the userlid table $query = "delete from $dbaseUserLids where userid='$userid'"; $result = $dbase->query($query);Edit the function CreateUser($username, $password, $email, $icon, $asAdmin)Code: Alles auswählen
mysql_select_db('<your phpbb database>'); $query = "DELETE FROM <your phpbb database>.phpbb_users WHERE user_id='$userid'"; $result = $dbase->query($query); mysql_select_db('<your pl database>');
---after---Code: Alles auswählen
// Automatically add the user to all open leagues. JoinAllOpenLeagues($userid);
---insert---Open overall_header.tpl (which can be found in the templates/<your theme>/ folder of your phpbb installation)Code: Alles auswählen
mysql_select_db('<your phpbb database>'); $query3 = "INSERT INTO <your phpbb database>.phpbb_users (user_id,user_active,username,user_password,user_session_page,user_regdate,user_level, user_posts,user_timezone,user_style,user_lang,user_dateformat,user_new_privmsg, user_unread_privmsg,user_last_privmsg,user_login_tries,user_last_login_try,user_emailtime, user_viewemail,user_attachsig,user_allowhtml,user_allowbbcode,user_allowsmile, user_allowavatar,user_allow_pm,user_allow_viewonline,user_notify,user_notify_pm, user_popup_pm,user_rank,user_email,user_sig_bbcode_uid) values ('$userid','1','$username','$encryptpass','0','$todaysDate','0','0','0','1','english', 'd M Y h:i a','0','0','0','0','0','NULL','0','0','0','1','1','1','1','1','0','1','1', '1','$email','NULL')"; $result = $dbase->query($query3); mysql_select_db('<your pl database>');
---replace------with---Code: Alles auswählen
<li><a href="{U_REGISTER}"><span>{L_REGISTER}</span></a></li>Code: Alles auswählen
<li><a href="http://<your pl url>/index.php?cmd=createnewuser"><span>{L_REGISTER}</a></li>
Ok, with me so far?? Good, now the 'messy' bit.
To import the pl user database into phpbb, do the following:
(1)Open phpmyadmin, and select the table pluserdata from your pl database.
(2)Copy all the information within the table (including the column headings) from the column 'userid' accross.
(3)Paste this information into a new excel worksheet as text. (This make take a minute depending on the size of your pluserdata table).
(4)In the next available spare column in row 1 copy and paste this formula:
="INSERT INTO phpbb_users (user_id,user_active,username,user_password,user_session_page,user_regdate,
user_level,user_posts,user_timezone,user_style,user_lang,user_dateformat,user_new_privmsg,
user_unread_privmsg,user_last_privmsg,user_login_tries,user_last_login_try,user_emailtime,
user_viewemail,user_attachsig,user_allowhtml,user_allowbbcode,user_allowsmile,user_allowavatar,
user_allow_pm,user_allow_viewonline,user_notify,user_notify_pm,user_popup_pm,user_rank,
user_email,user_sig_bbcode_uid)"
Copy this formula down to the last row of your table data.
(5)In the next column along in row 1 copy and paste this formula:
="values ('"&b1&"','1','"&c1&"','"&d1&"','0','$todaysDate','0','0','0','1','english','d M Y h:i a','0','0','0','0','0','NULL','0','0','0','1','1','1','1','1','0','1','1','1','$email','NULL');"
Copy this formula down to the last row of your table data.
(6)You should now have two consecutive columns. If you copied the column headers from phpmyadmin, select the cells in the two consecutive columns from row 2 down to the bottom of the data. Paste this into notepad, you should get a LOT of information pasted there. One unfortunate thing about using excel to do this, is that it removes the space between the two 'columns' of data, therefore your first notepad entry will look something like this:
INSERT INTO phpbb_users (user_id,user_active,username,user_password,user_session_page,user_regdate,user_level,
user_posts,user_timezone,user_style,user_lang,user_dateformat,user_new_privmsg,user_unread_privmsg,
user_last_privmsg,user_login_tries,user_last_login_try,user_emailtime,user_viewemail,user_attachsig,
user_allowhtml,user_allowbbcode,user_allowsmile,user_allowavatar,user_allow_pm,user_allow_viewonline,
user_notify,user_notify_pm,user_popup_pm,user_rank,user_email,user_sig_bbcode_uid)values ('<username>','1','<email>','<password>','0','$todaysDate','0','0','0','1','english','d M Y h:i a','0','0','0','0','0','NULL','0','0','0','1','1','1','1','1','0','1','1','1','$email','NULL');
We need a space betwen the )values. Easiest way to do this is a "Find & Replace". Go to notepad, press Crtl & H simultaneously, you will get a box appear saying something like 'Find what' and 'Replace With'. In the 'Find What' box type
)values
and in the 'Replace With' box type
) values
Then click Replace All. Now your sql should be ready.
(7)Go to phpmyadmin, select your phpbb database and select the table phpbb_users. Click on SQL and copy the code from notepad in to here and click go. It 'should' insert all your current users into phpbb.
So there you have it......told you it was long-winded!!!
Good luck :-D
Falls mir jemand helfen möchte, stelle ich gerne die betroffenen Files zur Verfügung, sowie einen Link zum Tippspiel und zu dessen Support-Forum parat!
Würde mich wirklich sehr freuen, wenn mir jemand schnell helfen könnte.