Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Hogyan lehet letölteni a felhasználói profil adatok SSI.php egy SMF fórum adatbázis
Posted on 20. Posted on 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Július, 2009 Dragos ben Kódolás, MySQL, PHP -
Even though SMF offers a way to integrate their forum into any website, they do not provide enough information on how to do some basic tasks, eg fetching a member's profile details from the database. Annak ellenére, hogy SMF kínál olyan módon, hogy integrálják a fórum minden olyan webhelyet, azok nem nyújtanak elegendő információt, hogy hogyan csinál bizonyos alapvető feladatokat, például le kell kérni egy tag profiljában adatait az adatbázisból. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Szerencsére, Netbeans nagyon hasznos funkció, a kód Navigator ami azt mutatja, azonnali előnézetet összes funkció elérhető a nyitott fájlt. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Így megtalálja a funkciót, amelyet nem a mi feladatunk volt, elég könnyű (bár én nem találtam meg a SMF honlapján).
Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Mindegy, hogy hozza az adatokat a SMF adatbázis segítségével SMF feladatait, meg kell tartalmaznia SSI.php a honlapunkon.
include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( "path / to / your / forum / SSI.php '); / / Replace path / to / your / fórum utad az SMF fórum $userData=ssi_fetchMember(1,''); //ssi_fetchMember() takes two parameters: first: the member id as an integer or more than one id passed in an array; second parameter: output method as string: 'echo' or ''; = $ UserData ssi_fetchMember (1 ,''); / / ssi_fetchMember () vesz két paramétert: az első: az id tag, mint egész, vagy több id telt el egy tömbben, a második paraméter: output módszert string: "echo" vagy ''; print_r($userData); //display the array containing the member's profile data print_r ($ UserData); / / display a tömb tartalmazza a tag profil adatai
Related posts: Related posts:












































