Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Kako radi pristizanja podataka korisnik s SSI.php profil iz baze podataka SMF forum
Posted on 20. Posted on 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Srp, 2009 by Dragos u kodiranju, 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. Iako je SMF pruža način da se integriraju njihov forum na sve web stranice, one ne pružaju dovoljno informacija o tome kako to učiniti neke osnovne zadatke, npr. dobavljanje člana profil pojedinosti iz baze podataka. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Srećom, NetBeans je vrlo korisna osobina, kod Navigatora koji prikazuje trenutak pregled svih funkcija dostupnih u otvorene datoteke. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Tako nalaz funkcija koja ne radi svoj posao bio je prilično lako (iako nisam mogao naći na web stranici SMF).
Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. U svakom slučaju, radi pristizanja podataka iz SMF baze podataka, koristeći SMF funkcije, moramo uključiti SSI.php na našoj web stranici.
include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'path / to / tvoj / forum / SSI.php'); / / zamijenite path / to / tvoj / forum sa svojim stazom u SMF forum $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 () traje dva parametra: prvi: Member ID kao cijeli broj ili više od jedne id prošlo u polje, drugi parametar: output metoda kao string: 'echo' ili ''; print_r($userData); //display the array containing the member's profile data print_r ($ UserData); / / prikaz polja sadrže člana profil podaci
Related posts: Related posts:












































