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 עדכונים דרך RSS | אימייל Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… דף הבית / Coding / MySQL / PHP / Coding: איך להביא Pro User ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database קידוד: כיצד להביא את נתוני פרופיל המשתמש עם SSI.php ממסד נתונים SMF בפורום

Posted on 20. פורסם ב 20. Jul, 2009 by Dragos in Coding , MySQL , PHP יולי, 2009 על ידי Dragos ב וקידוד, 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. למרות SMF מציעה דרך לשלב את הפורום שלהם לתוך כל אתר אינטרנט, הם לא מספקים מידע מספיק על איך לעשות כמה משימות בסיסיות, כגון מקסים חבר של פרטי פרופיל ממסד הנתונים. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. למרבה המזל, NetBeans יש תכונה מאוד עוזר, את הקוד הניווט אשר מציג תצוגה מקדימה מיידית של כל הפונקציות הזמינות בקובץ פתוח. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). אז למצוא את הפונקציה אשר עושה את העבודה שלנו היה די קל (אם כי לא הצלחתי למצוא אותו באתר של SMF).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. בכל אופן, להביא נתונים ממסד הנתונים של SMF, באמצעות פונקציות של SMF, אנחנו צריכים לכלול SSI.php לתוך האתר שלנו.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( "path / to / / פורום שלך / SSI.php '); / להחליף נתיב / אל / / פורום שלך עם הנתיב שלך לפורום 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 () מקבלת שני פרמטרים: הראשון: חבר מזהה כמספר שלם או יותר מזהה עבר במערך; הפרמטר השני: שיטת כמחרוזת פלט: 'הד' או '';
print_r($userData); //display the array containing the member's profile data print_r ($ userdata); / / להציג את מערך המכיל נתונים פרופיל של החבר 
Translate this post תרגם פירסום


Related posts: הודעות קשורות:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP שגיאה: הסב חבר פונקציה fetch_assoc () on a non-האובייקט
  2. PHP: How to get creation time of file with PHP on Linux machines PHP: איך להגיע בזמן יצירת קובץ עם PHP על מכונות לינוקס

    blog comments powered by Disqus תגובות לבלוג powered by Disqus