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 Atnaujinimai Via RSS | E-mail Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… Pagrindinis / Kodai / MySQL / PHP / Coding: Kaip parsiųsti vartotojas pro ...

Coding:How to fetch user profile data with SSI.php from a SMF forum database Kodai: Kaip įkelti naudotojo profilį duomenų SSI.php iš SMF forumas duomenų

Posted on 20. Posted on 20. Jul, 2009 by Dragos in Coding , MySQL , PHP Liepa, 2009 Dragos ir kodavimo, 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. Nors SMF siūlo būdas integruotis savo forumą į visas svetaines, jie neturi pakankamai informacijos apie tai, kaip daryti kai kuriuos pagrindinius uždavinius, pavyzdžiui, pristatant nario profilį duomenis iš duomenų bazės. Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file. Laimei, Netbeans yra labai naudinga funkcija, kodas navigatorius, kuri rodo, momentiniù Peržiūrėti visas funkcijas prieinamas atidaryti failo. So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website). Taigi išvada funkciją, kuri veikia mūsų darbas buvo gana lengva (nors aš niekaip negalėjau jo rasti SMF tinklalapyje).

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website. Bet kokiu atveju, turi būti imama iš duomenų bazės SMF, naudojant SMF funkcijas, turime įtraukti SSI.php į mūsų svetainę.

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once ( 'kelias / iki / tavo / Forumas / SSI.php'); / / Replace path / to / jūsų / forumas su savo kelią SMF forumas 
 $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 () trunka du parametrus: pirma: ID nario kaip sveikasis skaičius arba daugiau nei vienas numeris vyko matricoje; antrasis parametras: produkcijos metodą, kaip seka: 'echo' arba ''; 
 print_r($userData); //display the array containing the member's profile data print_r ($ userdata) / / vitrinos masyvas kuriame nario profilį duomenų 
Translate this post Translate this 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 funkcija fetch_assoc () dėl ne daiktas

    blog comments powered by Disqus Dienoraštis komentarus maitina Disqus