MyBB Hacks

Full Version: show our post and thread in member.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how to show our latest thread and post in user member.php ?

i want to make this all thread
http://mybbhacks.zingaburga.com/search.p...http://mybbhacks.zingaburga.com/search.php?action=results&sid=dc79f6b9d5f15ed42dbee0

and all post
http://mybbhacks.zingaburga.com/search.p...http://mybbhacks.zingaburga.com/search.php?action=results&sid=657b3f6b358b42442f2b4d

in the member.php

what php code need to add?

help me please:huh:

anyone?
Probably if you actually used the search feature...
http://mybbhacks.zingaburga.com/showthread.php?tid=780
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?

SQL Code
 WHERE t.uid = '1'


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
Reference URL's