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 Posodobitev prek RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Domov / Coding / MySQL / PHP / Coding: Kako puščati uporabnikov pro ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Kako puščati podatkov uporabnikov profil z SSI.php iz baze foruma SMF

Posted on 20. Objavljeno dne 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Julij 2009, ki ga Dragos v 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. Čeprav SMF ponuja način za integracijo v okviru foruma v katerokoli spletno stran, ne zagotavljajo dovolj informacij o tem, kako narediti nekaj osnovnih nalog, npr fetching profila člana podatke iz podatkovne baze. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Na srečo, Netbeans je zelo koristna funkcija, koda Navigator, ki kaže trenutek predogled vseh funkcij, na voljo v odprti datoteki. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Torej ugotovitev, funkcijo, ki ni naša naloga je bila precej enostavna (čeprav nisem mogel najti na spletni strani SMF's).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Kakorkoli že, v puščati podatkov iz baze SMF, z uporabo funkcije SMF's, moramo vključiti SSI.php na naši spletni strani.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( "pot / do / vaš / forum / SSI.php '); / / nadomestiti pot / do / vaš / forum z vašo pot do foruma 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 () ima dva parametra: prvi id: id kot član ali celo več kot en sprejet v niz; drugi parameter: metoda proizvodnje kot string: "echo" ali '';
print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / izpis matrike, ki vsebuje podatke profila člana 
Translate this post Prevedi to post


Related posts: Podobni objav:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call na člana funkcijo fetch_assoc () na non-predmeta
  2. PHP: How to get creation time of file with PHP on Linux machines PHP: Kako ustvarjanje časa datoteke s PHP na računalnikih Linux

    blog comments powered by Disqus blog comments powered by Disqus