show our post and thread in member.php
bekti Offline
Junior Member
**
Posts: 43
Joined: Mar 2012
Post: #1
show our post and thread in member.php
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?
09-30-2012 02:31 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #2
RE: show our post and thread in member.php
Probably if you actually used the search feature...
http://mybbhacks.zingaburga.com/showthread.php?tid=780

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
09-30-2012 10:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
bekti Offline
Junior Member
**
Posts: 43
Joined: Mar 2012
Post: #3
RE: show our post and thread in member.php
how to make it without plugin?

i have already make this code

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$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?

09-30-2012 12:36 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #4
RE: show our post and thread in member.php

SQL Code
 WHERE t.uid = '1'


I see no problem with you taking "inspiration" from RateU's plugin.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
09-30-2012 02:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
bekti Offline
Junior Member
**
Posts: 43
Joined: Mar 2012
Post: #5
RE: show our post and thread in member.php
can you help me sama34? coz i don't understand php code
09-30-2012 03:13 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #6
RE: show our post and thread in member.php
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'] .

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
09-30-2012 06:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
bekti Offline
Junior Member
**
Posts: 43
Joined: Mar 2012
Post: #7
RE: show our post and thread in member.php
(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
09-30-2012 11:50 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: