MyBB Community Forums

Full Version: my last 10 threads in singature
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hello all
I need a little modify
that sort each user last 10 threads
in each user singnature..

to make more clear, say I posted here, anyone will see my last 10 thread in my sig, and whene you reply, anyone will see your last 10 thread in your sig
and last 10 threads sorted in every users signature

I hope you get what I meant, any help will be appreciated
I hate to bomp :|
I dont understand. Do you want see your site's last 10 threads in your own signature? every members' last 10 threads in theirs' signature on your site?
every member has his own last 10 threads in his signature
none guys?
ok can anyone help me with the select query to select every post userid, with his threads?
			$query = $db->simple_select(TABLE_PREFIX."threads", "tid, subject", "uid='".{$post['uid']}."'", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => '10'));
thanks alot dear LeX- I'm realy appraise your try to help me out since alot of other good coder ignored my request.

but the code you provided it's cuase a little error becuase of this part ".{$post['uid']}"
I fixed it my salf and I used the following code in showthread.php
$query = $db->simple_select(TABLE_PREFIX."threads", "tid, subject", "uid='{$post['uid']}'", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => '10'));
while($row = $db->fetch_array($query))
{
    $row['subject'] = htmlspecialchars_uni($row['subject']); 
    $my_10p .= " {$sep} <a href=\"".$mybb->settings['bburl']."/showthread.php?tid=".$row['tid'].\">{$row['subject']}</a>";
    $sep = '|';
}

but it's deosn't work though it's display the following error
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\b\inc\db_mysqli.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\b\inc\db_mysqli.php:216) in C:\wamp\www\b\inc\functions.php on line 78

I'll be very glade if you give me another try mate..

thanks alot
I see my mistake =P Using ".$post['uid']." or '{$post['uid']}' ; not a combination =P
Will try your piece of code on a testpage; will get back on it !
Big Grin
so I hope you take another look at this one whene you get the time :|
Pages: 1 2