Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Bagaimana untuk mengambil data dengan profil pengguna SSI.php dari database forum SMF
Posted on 20. Dikirim di 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Jul, 2009 oleh Dragos di 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. Meskipun SMF menawarkan cara untuk mengintegrasikan forum mereka ke dalam setiap situs web, mereka tidak cukup memberikan informasi tentang bagaimana melakukan tugas-tugas dasar, misalnya mengambilkan profil anggota rincian dari database. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Untungnya, Netbeans memiliki fitur yang sangat membantu, kode Navigator yang menunjukkan preview instan semua fungsi yang tersedia dalam file yang terbuka. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Jadi menemukan fungsi yang melakukan pekerjaan kami cukup mudah (walaupun saya tidak bisa menemukannya di situs web SMF).
Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Anyway, untuk mengambil data dari database SMF, menggunakan fungsi SMF, kita perlu menyertakan SSI.php ke website kami.
include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'path / ke / file / forum / SSI.php'); / / ganti path / ke / file / forum dengan path ke 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 () memerlukan dua parameter: pertama: id anggota sebagai integer atau lebih dari satu id berlalu dalam array; parameter kedua: metode output sebagai string: 'echo' atau ''; print_r($userData); //display the array containing the member's profile data print_r ($ userData); / / menampilkan array yang berisi data profil anggota
Related posts: Related posts:












































