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 UPDATES VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Home / Coding / MySQL / PHP / Coding: Paano upang makuha ang user pro ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Paano upang makuha ang data ng user profile na may SSI.php mula sa isang database ng SMF forum

Posted on 20. Posted on 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Hulyo, 2009 sa pamamagitan ng Dragos sa Coding, 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. Kahit na ang SMF ay nag-aalok ng isang paraan upang pagsama-samahin ang kanilang mga forum sa anumang website, hindi nila magbigay ng sapat na impormasyon tungkol sa kung paano gumawa ng ilang mga pangunahing mga gawain, halimbawa, habang kinukuha ang mga detalye ng isang profile ng kasapi mula sa database. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Sa kabutihang palad, Netbeans ay isang napaka-helpful na katangian, ang code sa Navigator na nagpapakita ng isang instant-preview ng lahat ng mga function na magagamit sa isang bukas na file. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Kaya't sa paghahanap ng function na kung saan ay ang aming trabaho ay medyo madali (bagaman hindi ko mahanap ito sa SMF sa website).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Anyway, upang makuha ang data mula sa SMF database, gamit ang SMF's function, kailangan namin na isama ang SSI.php sa aming website.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'landas / sa / ng iyong / forum / SSI.php'); / / palitan ang landas / sa / ng iyong / forum sa iyong landas sa ang forum sa 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 () ay tumatagal ng dalawang parameters: unang: miyembro sa id bilang isang integer o higit pa sa isang id na dumaan sa isang array; pangalawang parameter: output bilang paraan ng string: 'echo' o ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ userData); / / ipakita ang array na naglalaman ng data ng profile ng kasapi 
Translate this post Isalin ang post na ito


Related posts: Related posts:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Tawag sa isang miyembro fetch_assoc function () sa isang hindi-bagay sa

    blog comments powered by Disqus blog comments powered by Disqus