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 MISES A JOUR VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Accueil / Codage / MySQL / PHP / codage: Comment récupérer des pro utilisateurs ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Comment récupérer des données de profil utilisateur avec SSI.php à partir d'une base de données forum SMF

Posted on 20. Posté le 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Jul, 2009 par Dragos en codage, 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. Même si SMF offre une façon d'intégrer leur forum dans n'importe quel site Web, ils ne fournissent pas suffisamment d'information sur comment faire certaines tâches de base, par exemple, aller chercher les détails profil d'un membre de la base. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Heureusement, Netbeans dispose d'une fonctionnalité très utile, l'Explorateur de code qui montre un aperçu instantané de toutes les fonctions disponibles dans un fichier ouvert. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Concluant de la sorte la fonction qui effectue son travail a été assez facile (même si je n'ai pas pu le trouver sur le site de SMF).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. En tout cas, pour récupérer les données de la base de SMF, en utilisant les fonctions de SMF, nous avons besoin d'inclure SSI.php dans notre site Web.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'chemin / vers / votre / forum / SSI.php'); / / Replace chemin / de / votre / forum avec votre chemin d'accès au forum 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 () prend deux paramètres: d'abord: le numéro de membre comme un entier ou plus d'un id passé dans le tableau; deuxième paramètre: la méthode de sortie sous forme de chaîne: 'echo' ou '';
print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / affichage du tableau contenant les données de profil du membre 
Translate this post Translate this post


Related posts: Related posts:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Appel à une fonction membre fetch_assoc () sur un objet non dans
  2. PHP: How to get creation time of file with PHP on Linux machines PHP: Comment avoir le temps de création du fichier de PHP sur des machines Linux

    blog comments powered by Disqus Commentaires Blog powered by Disqus