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 ACTUALITZACIONS VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Inici / codificació / MySQL / PHP / Codificació: Com buscar a favor de l'usuari ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Codificació: Com buscar dades de perfils d'usuari amb SSI.php d'una base de dades de fòrum SMF

Posted on 20. Publicat el 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Juliol de 2009, per Dragos a la codificació, 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. Encara que SMF ofereix una manera d'integrar seu fòrum a qualsevol lloc web, que no proporcionen suficient informació sobre com fer algunes tasques bàsiques, com ara anar a buscar informació, perfil d'un membre de la base de dades. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Afortunadament, Netbeans té una característica molt útil, el navegador de codi que mostra una vista prèvia instantània de totes les funcions disponibles en un arxiu obert. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Pel que trobar la funció que té el nostre treball era bastant fàcil (encara que no vaig poder trobar al lloc web de SMF).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. De tota manera, per obtenir les dades de la base de dades de SMF, usant les funcions de SMF, hem d'incloure SSI.php al nostre lloc web.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'path / to / arxiu / fòrum / SSI.php'); / / reemplaçar ruta / al / arxiu / fòrum amb la seva ruta d'accés al fòrum 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 () pren dos paràmetres: en primer lloc: el membre d'identificació com un sencer o més d'un identificador aprovada en una matriu; segon paràmetre: el mètode de sortida com a cadena: "eco" o ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / mostrar la matriu que conté el perfil de l'usuari de dades 
Translate this post Demanar aquest missatge


Related posts: Llocs relacionats amb:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Crida a una funció membre fetch_assoc () en un objecte no en

    blog comments powered by Disqus blog alimentat per Disqus