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 AĠĠORNAMENTI VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Home / Kodifika / MySQL / PHP / Kodifika: Kif jġibu pro utent ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Kodifika: Kif jġibu profil utent tad-data ma SSI.php minn database forum SMF

Posted on 20. Posted on 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Lulju, 2009 mill Dragos fl-Kodifika, 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. Anke jekk SMF joffri mod li jintegraw forum tagħhom fi kwalunkwe websajt, dawn ma jipprovdux biżżejjed tagħrif dwar kif tagħmel xi ħidmiet bażiċi, eż fetching membru dettalji tal-profil mid-database. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Fortunatament, Netbeans għandha karatteristika ta 'għajnuna kbira, il-kodiċi Navigator li juri preview instantanja tal-funzjonijiet kollha disponibbli fi fajl miftuħ. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Allura konstatazzjoni tal-funzjoni li ma tax-xogħol tagħna kien pjuttost faċli (għalkemm I ma setax isib fuq il-websajt SMF's).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Xorta waħda, li jġibu data mid-database SMF, bl-użu funzjonijiet SMF's, irridu li jinkludu SSI.php fis-website tagħna.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once path ( "/ sa / / forum tiegħek / SSI.php"); / / jissostitwixxu triq / l / / forum tiegħek mat-triq tiegħek lill-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 () jieħu żewġ parametri: l-ewwel: il-membru id bħala numru sħiħ jew aktar minn wieħed id għadda fil-firxa; tieni parametru: metodu ta 'produzzjoni bħala string: "eku" jew '';
print_r($userData); //display the array containing the member's profile data print_r ($ userData); / / juru l-firxa li fiha data tal-profili tal-membru 
Translate this post Ittraduċi din il-kariga


Related posts: Related postijiet:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Sejħa għal membru funzjoni fetch_assoc () fuq bażi non-oġġett fil -
  2. PHP: How to get creation time of file with PHP on Linux machines PHP: Kif tikseb ħin ħolqien tal-fajl ma PHP fuq magni Linux

    blog comments powered by Disqus blog kummenti powered by Disqus