Ob diese Anleitung funktioniert?

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Benutzeravatar
Rabi
Beiträge: 233
Registriert: Fr 16.Sep, 2005 15:00
Wohnort: Kiel

Ob diese Anleitung funktioniert?

Beitrag von Rabi »

Es gibt ein nettes Programm welches ich in meiner Website einbinden möchte.

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:
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---

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");
---insert---

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>');
Edit the function DeleteUserAccount($userid, $pwd)

---after---

Code: Alles auswählen

  // Delete the entries from the userlid table
  $query = "delete from $dbaseUserLids where userid='$userid'";
  $result = $dbase->query($query);
---insert---

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>');
Edit the function CreateUser($username, $password, $email, $icon, $asAdmin)

---after---

Code: Alles auswählen

  // Automatically add the user to all open leagues.
  JoinAllOpenLeagues($userid);

---insert---

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>');
Open overall_header.tpl (which can be found in the templates/<your theme>/ folder of your phpbb installation)

---replace---

Code: Alles auswählen

<li><a href="{U_REGISTER}"><span>{L_REGISTER}</span></a></li>
---with---

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
Da das Tippspiel noch off ist, bin ich alleiniger User mit Admin-Rechten.

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.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Sorry, aber ich muss noch einiges an meinem Server glatt ziehen...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Rabi
Beiträge: 233
Registriert: Fr 16.Sep, 2005 15:00
Wohnort: Kiel

Beitrag von Rabi »

[quote="oxpus";p="62999"]Sorry, aber ich muss noch einiges an meinem Server glatt ziehen...[/quote]

Ok... ;)

//EDIT
Kann evtl. jemand mal einen Blick auf die Anleitung werfen? ¢¦

Sollte es so nicht gemäß der Anleitung funktionieren, ist es dann möglich, dass das "externe" Programm Feature so geschützt werden kann, dass ....

Möglichkeit

a) Das Programm nicht direkt in die Favoriten gespeichert werden kann, so dass die User in meiner online-Liste erscheinen. Ansonsten packen sich die User die UrL in die Favoriten und gehen direkt in das "externe" Feature.

Bsp.: bei Aufruf des Programms erschein in der Browserzeile: www.club-search.de

b) Das "externe" Programm" durch eine .htaccess so schützen, dass ein Log-In auf meiner Seite erzwungen wird.

Am einfachsten wäre natürlich, wenn die Anleitung (s.o) es in mein phpBB integrieren kann!
Zuletzt geändert von Rabi am Fr 25.Aug, 2006 09:35, insgesamt 2-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Nun, wenn es "nur" um einen Schutz von "aussen" geht, dann wäre eine Passwortkontrolle via .htaccess nicht verkehrt...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Rabi
Beiträge: 233
Registriert: Fr 16.Sep, 2005 15:00
Wohnort: Kiel

Beitrag von Rabi »

Also wenn es in phpBB integriert werden könnte, wäre natürlich super.

Laut dieser "Anleitung soll es ja so funktionieren, dass die User, die aus meinem Forum sich mit seinen Login-Daten auch für das Programm (Tippspiel) einloggen können.

Es geht mir ja in erster Linie darum, die User auf meiner Seite zu halten (User-Online)!

Wenn die sich sonst das Programm bookmarken, gehen sie nicht mehr auf meine Seite, sondern direkt zum Programm.

Aber wie würde das mit der .htaccess dann aussehen?
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Du kannst eigentlich mit fast jedem FTP-Client einen Verzeichnisschutz einrichten oder auch per Verwaltungssoftware Deines Servers/Webspaces.
Meist dort auch per WebFTP...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten