how to make it without plugin?
i have already make this code
Code:
$query = $db->query("
SELECT p.pid, t.subject, p.message, p.tid, t.uid, t.username, t.replies, t.dateline, p.smilieoff
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE t.uid = '1' AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.firstpost=p.pid
ORDER BY t.dateline DESC
LIMIT 3");
while($threads = $db->fetch_array($query))
{
$threads['threadlink'] = get_thread_link($threads['tid']);
$threads['profilelink'] = build_profile_link($threads['username'], $threads['uid']);
$threads['date'] = my_date($mybb->settings['dateformat'], $threads['dateline']);
$threads['time'] = my_date($mybb->settings['timeformat'], $threads['dateline']);
$threads['lastpostlink'] = get_thread_link($threads['tid'], 0, "lastpost");
$threads['message'] = my_substr($threads['message'], 0, 250) . "...";
eval("\$memberlatest_threads .= \"".$templates->get("member_latest_threads_threads")."\";");
}
|
but the code just show our thread if i see other member profile...anyone can help?
I see no problem with you taking "inspiration" from RateU's plugin.
can you help me sama34? coz i don't understand php code
You are fetching the threads of user which UID is equal to 1, thus it is always the same user's threads. You need to figure out which the current profile user's UID is, if you are using the member_profile_end hook then it is $memprofile['uid'] .
(09-30-2012 06:19 PM)Sama34 Wrote: [ -> ]You are fetching the threads of user which UID is equal to 1, thus it is always the same user's threads. You need to figure out which the current profile user's UID is, if you are using the member_profile_end hook then it is $memprofile['uid'] .
i see...fixed..thanks sama34