This is a translated page. The original can be found here: http://iwebdevel.com/2009/07/20/codinghow-to-fetch-user-profile-data-with-ssi-php-from-a-smf-forum-database/
UPDATES VIA RSS | Email Updates via RSS | E-post Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Avaleht / kodeerimise / MySQL / PHP / Kood: Kuidas tõmmata kasutajale pro ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Kood: Kuidas tõmmata kasutajaprofiili andmete SSI.php alates SMF foorumi andmebaas

Posted on 20. Postitatud 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Juuli, 2009 Dragos in kodeerimise, 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. Kuigi SMF pakub võimalust integreerida oma foorum mis tahes veebilehel, nad ei anna piisavalt teavet selle kohta, kuidas teha mõningaid põhiülesandeid, nt tõmbamine liikme profiili üksikasjad andmebaasist. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Õnneks netbeans on väga kasulik omadus, kood Navigator, mis näitab kohe eelvaate kõik funktsioonid saadaval avatud faili. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Nii et leida funktsioon, mis teeb meie töö oli üsna lihtne (kuigi ma ei suutnud leida seda SMF koduleheküljel).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Igatahes, tõmmata andmed SMF andmebaasi, kasutades SMF ülesanded, meil on vaja lisada SSI.php meie kodulehel.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( "path / to / teie / foorum / SSI.php '); / / asendada path / to / teie / forum oma tee SMF foorum 
 $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 () võtab kaks parameetrit: esiteks: liige id on täisarv või rohkem kui üks id sooritanud massiiv; teine parameeter: toodangu meetodit string: "echo" või ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / kuva massiiv, mis sisaldab liikme profiili andmed 
Translate this post Tõlgi see postitus


Related posts: Seonduvad postitused:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP error: Call to liikme funktsiooni fetch_assoc () kedagi objekti

    blog comments powered by Disqus blog comments powered by Disqus