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 Aktualizáciou cez RSS | E-mail Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Home / Kódovanie / MySQL / PHP / Coding: Ako načítať užívateľa pre ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Kódovanie: Ako načítať údaje profil užívateľa SSI.php z databázy fórum SMF

Posted on 20. Publikované dňa 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Júl, 2009 Dragos v Kódovanie, 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. Aj keď SMF ponúka spôsob, ako prepojiť ich fórum do akejkoľvek webovej stránky, ktoré neposkytujú dostatok informácií o tom, ako robiť niektoré základné úlohy, napr očarujúce člena profil údaje z databázy. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Našťastie Netbeans je veľmi užitočná funkcia, kód Navigator, ktorý ukazuje okamžitý zobrazenie všetkých funkcií dostupných v otvorenom súbore. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Takže nájsť funkciu, ktorá robí svoju prácu bolo veľmi ľahké (aj keď som ju nemohol nájsť na internetovej stránke na SMF).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Mimochodom, načítať dáta z databázy SMF SMF pomocou funkcie, musíme zahrnúť SSI.php na našich webových stránkach.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'cesta / k / súboru / forum / SSI.php'); / / nahradiť cesta / k / súboru / forum s cestou do fóra 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 () má dva parametre: prvá: člen id ako celé číslo alebo viac ako jedno id prešiel v poli, druhý parameter: output metódy ako reťazec: 'echo' alebo ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / zobrazenie pole obsahujúce údaje člena profil 
Translate this post Translate this post


Related posts: Súvisiace príspevky:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call to členskú funkciu fetch_assoc () na non-objekt

    blog comments powered by Disqus blog pripomienky powered by Disqus