|
| IP: |
n/a |
| Rang: |
|
| Registrierung: |
01.07.2003, 18:55 |
| Homepage: |
http://www.script-solution.de |
| Wohnort: |
Marburg |
| |
 Forum-Gott mit 7592 Punkte, 7358 Beiträge |
|
Hallo,
da es in der Vergangenheit einige Anfragen bzgl. der Möglichkeit die Communities von Boardsolution und Picturesolution Pro zu verbinden, habe ich hierzu nun einen Mod erstellt. Ihr findet den Mod im Anhang.
Für welche Versionen ist diese Anleitung? Diese Anleitung gilt für Boardsolution v1.22 und Picturesolution Pro v1.11 Außerdem sollte PSPro möglichst gerade installiert worden sein oder besser gesagt, es sollten sich noch keine weiteren User registriert haben, Kommentare abgegeben haben etc. Bei BS hingegen dürfen schon User registriert sein usw.. Diese werden dann in PSPro importiert (siehe unten).
Was heißt das eigentlich genau? Dadurch muss sich keiner 2 mal registrieren, sondern bei der Registrierung bei Boardsolution wird der User automatisch auch bei PSPro erstellt. Picturesolution Pro liest Username, Passwort etc. aus der Tabelle von Boardsolution aus. D.h. alles was die Community betrifft (Registrierung, User / PW ändern, Passwort zuschicken, ...) läuft dann über Boardsolution ab.
Geht das nur mit Picturesolution Pro? Nein, das geht im Prinzip mit (fast) allen anderen Communities auch. Sowohl in PSPro als auch in BS ist es möglich die Userdaten (Username, Passwort und Email) aus einer anderen Tabelle auszulesen und die Registrierung etc. zu deaktivieren. In Boardsolution kann dies in der install/community.php eingestellt werden, bei PSPro in der install/config.php.
Vielleicht fragt ihr euch warum ich das "(fast)" hinzugefügt habe. Da es für nahezu alles mehrere Lösungen gibt, macht es leider(?) jeder etwas anders. Daher kann ich natürlich nicht garantieren, dass es mit jedem System funktioniert. Aber es sollte mit den meisten gehen.
Allerdings ist es so, dass es nicht ohne Programmierkenntnisse möglich ist. Denn, wie ihr euch vllt. schon gedacht habt, muss dafür etwas in Boardsolution für das andere System (also hier PSPro) hinzufügt werden. Denn z.B. bei der Registrierung soll ja auch in PSPro der User eingetragen werden. Dies ist logischerweise je nach System verschieden. Daher kann ich dafür keine Lösung bereitstellen.
Wir werden hier die Community von PSPro "exportieren", d.h. die von Boardsolution benutzen.
Wie mache ich das denn nun?  Ok, dann fangen wir jetzt mit dem eigentlichen an.
- Zunächst muss die install/community.php aus der Zip-Datei des Mods verändert werden.
Ganz oben in der Datei seht ihr folgendes:
Code: 1 2 3 4 5 6 7 8 9 10 11 12
| <?php #========================================= #======= Boardsolution Community ========= #=========================================
# The table-prefix for the MySQL-tables of picturesolution pro define('PSP_TBL_PREFIX','psp_');
# The path to picturesolution pro, starting at the board-path; with a trailing slash define('PSP_PATH','pspro/'); ... ?> | Hier müsst ihr einmal das Tabellen-Präfix von Picturesolution Pro einstellen und dann noch den Pfad dorthin. Der Pfad muss ein relativer Pfad sein. Also wenn ihr z.B. Boardsolution in:
habt und Picturesolution Pro in:
Code: 1
| /html/picturesolution_pro | Dann wäre der Pfad:
Code: 1
| define('PSP_PATH','../picturesolution_pro/'); | Wichtig ist auch der / am Ende.
Falls ihr PSPro in einer anderen Datenbank installiert habt, gebt bitte das Tabellen-Präfix folgendermaßen an:
Code: 1
| define('PSP_TBL_PREFIX','<datenbankName>.psp_'); | Wobei <datenbankName> dann der Name euer Datenbank ist.
- Falls ihr bei Boardsolution ein anderes Tabellen-Präfix als "ssf_" gewählt habt, müsst ihr noch in
der install/community.php die User-Tabelle anpassen. Bisher steht dort:
Code: 1
| define('TB_USER','ssf_user'); | Dort muss das "ssf_" in das entsprechende Präfix geändert werden.
- Jetzt muss noch die install/config.php von PSPro verändert werden.
Der Abschnitt "Community-Export" sollte dort folgendermaßen aussehen:
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| #============= Community-Export ============= # NOTE: You have to generate the database-entries for the table *profiles! # So if you want to export the community you have to make the settings here and integrate # the code to make the database-entries in your existing community. # Therefore programming-experience and/or PHP- and MySQL-knowledge is required!
# set this to true if you export the community define('ENABLE_EXPORT',true);
# the user-table in which the following fields are # If the table is in another database just put the name of the database in front # followed by a dot. define('TB_USER','bs_user');
# the name of the user-id field in the database-table of your community define('FIELD_USER_ID','id');
# the name of the user-name field in the database-table of your community define('FIELD_USER_NAME','user_name');
# the name of the password field in the database-table of your community define('FIELD_USER_PW','user_pw');
# the name of the email field in the database-table of your community define('FIELD_USER_EMAIL','user_email');
# disabled | link (see below) define('REGISTRATION_TYPE','link');
# the link to the registration in your community define('REGISTRATION_LINK','../index.php?action=register');
# disabled | link (see below) define('SEND_PW_TYPE','link');
# the link to the registration in your community define('SEND_PW_LINK','../index.php?action=sendpw');
/* * If you have other fields in the user-table you need to add, you can do this here. * For example if you have a "salt-field" for the password or something like this. * Just fill the array with the fieldnames like the following: * $additional_login_fields = array('<field_name_1>','<field_name_2>',...,'<field_name_n>'); * Examples: * $additional_login_fields = array('yourfield'); * $additional_login_fields = array('firstfield','secondfield'); * * You can use this fields for example in the password-function. */ $additional_login_fields = array();
/** * this function gets the entered password of the user and 'converts' it to the * password which will be stored in the database. * the second parameter will contain the additional_login_fields you can set above. * Therefore you will be also able to use this function if your community uses the method * 'password-salting' or something like this. * * @param $password the entered password of the user * @param $data the data of the additional_login_fields set above * @return the password to store in the database */ function ps_get_stored_password($password,$data) { return md5($password); } | Wobei ihr allerdings ggf. die URL zum Zuschicken des Passworts und Registrieren ändern müsst, je nach dem wo Boardsolution und Picturesolution Pro liegen. Und achtet darauf, dass der Tabellen-Name der User-Tabelle von Boardsolution (also hier bs_user) richtig ist.
- Nun ladet die Dateien auf eueren FTP-Server hoch und überschreibt die Dateien von Boardsolution /
PSPro.
- Als erstes müsst ihr das Script import.php im Browser aufrufen. Dies importiert alle User aus
Boardsolution in Picturesolution Pro. Dies löscht allerdings die bisherigen User von PSPro!
- Noch ein Hinweis zum Schluss:
Ich habe alle Änderungen in den Dateien in der Zip-Datei mit:
Code: 1 2 3
| //----- START - pspro ----- ... //----- END - pspro ----- | markiert. Also wenn jemand es mit einem anderen System machen möchte, ist es evtl. sinnvoll sich daran zu orientieren.
Das wars dann auch schon  Nun kann man sich bei Boardsolution registrieren und wird dann gleichzeitig bei PSPro registriert.
Ich hoffe die Anleitung ist verständlich. Falls es dennoch Fragen gibt oder ihr Fehler in dieser Anleitung entdeckt, bitte meldet euch per PM / Email bei mir.
mfg Nils
Update: Ich habe das ganze nun für Boardsolution v1.22 angepasst. Wobei die Vorgehensweise aber gleich geblieben ist, lediglich die Dateien, die ersetzt werden müssen, haben sich verändert. Update2: Seit dem letzten Update war noch ein Fehler in den veränderten Dateien. Falls ihr es schon runtergeladen habt, tut dies bitte erneut und ersetzt die acp/modules/user_activation.php in Boardsolution. Nochmal danke an herzdrache für den Hinweis
Dieser Beitrag wurde insgesamt 4 mal editiert. Das letzte mal 18.04.2007, 08:22 von Nils.
|
|