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 Päivitykset RSS | Sähköposti Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Etusivu / koodaus / MySQL / PHP / Coding: Miten hakea käyttäjän pro ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Koodaus: Miten hakea käyttäjäprofiilin tietojen SSI.php peräisin SMF foorumin tietokanta

Posted on 20. Postitettu 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Heinäkuu, 2009 Dragos vuonna 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. Vaikka SMF tarjoaa tavan integroida foorumi mihinkään sivuilla, ne eivät tarjoa riittävästi tietoa siitä, miten tehdä joitakin perustoimintoja, kuten Haetaan jäsenen profiili tiedot tietokannasta. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Onneksi, Netbeans on erittäin hyödyllinen ominaisuus, koodi Navigator, joka osoittaa instant Preview kaikki toiminnot on avoinna olevan tiedoston. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Joten löytää toiminto, joka ei meidän tehtävämme oli melko helppoa (vaikka en ole löytänyt sitä SMF: n verkkosivuilla).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Tapauksessa, hakea tietoja SMF tietokannan avulla SMF: n toimintoja, meidän täytyy sisällyttää SSI.php osaksi sivuillamme.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include ( "path / to / your / forum / SSI.php '), / / korvaa path / to / your / forum kanssa polku SMF foorumi 
 $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 () ottaa kaksi parametria: ensimmäinen: Member ID kuin kokonaisluku tai useampi kuin yksi ID hyväksyttiin joukko, toinen parametri: lähtö menetelmää string: "echo 'tai ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ UserData), / / Näytä array sisältää jäsenen profiili tiedot 
Translate this post Käännä tämä viesti


Related posts: Liittyvien virkojen:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP error: Call to jäsenen toiminnon fetch_assoc () ei-objektin

    blog comments powered by Disqus blogin kommentit powered by Disqus