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 Actualizacións Via RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Home / Codificación / MySQL / PHP / Codificación: Como buscar pro usuario ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Como buscar datos de perfil de usuario con SSI.php dun banco de foro SMF

Posted on 20. Posta en 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Xullo de 2009 por Dragos na Codificación, 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. Aínda que o SMF ofrece unha maneira de integrar o seu foro en calquera sitio, non proporcionan información suficiente sobre como facer algunhas tarefas básicas, por exemplo, buscar detalles dun membro do perfil da base de datos. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Afortunadamente, o NetBeans ten unha funcionalidade moi útil, o código Navigator, que mostra unha visualización instantánea de todas as funcións dispoñibles nun arquivo aberto. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Así, atopar a función que fai o noso traballo foi moi doado (aínda que eu non podería atopalo na páxina web da SMF).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. En fin, para buscar datos da base de datos SMF, usando funcións SMF, cómpre incluír SSI.php na nosa web.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'ruta / a / seu / forum / SSI.php'), / / Replace path / to / your / forum co seu camiño para o foro 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 () recibe dous parámetros: primeiro: o membro id como un completo ou máis de un id pasado nunha matriz, segundo parámetro: o método de produción, en secuencia: 'eco' ou '';
print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / mostrar a matriz que conteñen os datos do perfil do membro 
Translate this post Traducir esta post


Related posts: Related posts:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call to a member function fetch_assoc () sobre un obxecto non-in
  2. PHP: How to get creation time of file with PHP on Linux machines PHP: Como obter a hora de creación de ficheiro con PHP en computadores con Linux

    blog comments powered by Disqus blog comments powered by Disqus