Coding:How to fetch user profile data with SSI.php from a SMF forum database Kodowanie: Jak pobrać dane z profilu użytkownika SSI.php z bazy danych SMF forum
Posted on 20. Zamieszczone w dniu 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Lip, 2009 Dragos w Coding, 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. Nawet SMF oferuje sposób zintegrować swoje forum do każdej strony, nie zapewniają one wystarczającej ilości informacji na temat sposobu wykonania podstawowych zadań, np. pobieranie członka Szczegóły profilu z bazy danych. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Na szczęście, Netbeans jest bardzo pomocna funkcja, kod Navigator, który pokazuje natychmiastowy podgląd wszystkich funkcji dostępnych w otwartym pliku. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Tak więc znalezienie funkcji, jaką ma nasza praca była dość łatwa (chociaż nie mogłem go znaleźć na stronie internetowej SMF).
Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Jakkolwiek, do pobierania danych z bazy SMF, używając SMF funkcji, musimy to SSI.php na naszej stronie internetowej.
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") / / zamiast path / to / your / forum z ścieżka do forum SMF $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 () przyjmuje dwa parametry: pierwszy: członek id jako całkowitą lub więcej niż jeden identyfikator przekazywane w tablicy; drugi parametr: Sposób wyjściowy ciąg: "echo" lub ''; print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / wyświetlamy tablicę zawierającą profilu użytkownika danych
Related posts: Podobne posty:












































