Willing to Pay for "Show New Replies to My Posts"
#11
Can you try and see if this forfills your needs ?

Open search.php
Find
elseif($mybb->input['action'] == "getnew")
{

Add Above
elseif($mybb->input['action'] == "mynewreplies")
{
	$query = $db->query("SELECT DISTINCT tid FROM `".TABLE_PREFIX."posts` WHERE uid='{$mybb->user['uid']}'");
	while($your_tid = $db->fetch_array($query))
	{
		$your_tids[] = $your_tid['tid'];
	}
	if(!$your_tids)
	{
		error($lang->error_nosearchresults);
	}
	$query = $db->query("SELECT DISTINCT t.tid AS view, t.lastpost, r.tid AS readthread, r.dateline FROM `".TABLE_PREFIX."threads` t LEFT JOIN `".TABLE_PREFIX."threadsread` r ON (t.tid=r.tid) WHERE t.lastpost > {$mybb->user['lastvisit']} AND r.uid='{$mybb->user['uid']}' ");
	while($tid = $db->fetch_array($query))
	{
		if(in_array($tid['view'], $your_tids))
		{
			if($tid['view'] == $tid['readthread'] && $tid['dateline'] > $mybb->user['lastvisit'])
			{	
				continue;
			}
			$search_tids[] = $tid['view'];
		}
	}
	if($search_tids)
	{
		$search_tids = implode(",", $search_tids);
	}
	else
	{
		error($lang->error_nosearchresults);
	}
	$where_sql = "t.tid IN ($search_tids)";

	$unsearchforums = get_unsearchable_forums();
	if($unsearchforums)
	{
		$where_sql .= " AND t.fid NOT IN ($unsearchforums)";
	}
	$inactiveforums = get_inactive_forums();
	if($inactiveforums)
	{
		$where_sql .= " AND t.fid NOT IN ($inactiveforums)";
	}

	$sid = md5(uniqid(microtime(), 1));
	$searcharray = array(
		"sid" => $db->escape_string($sid),
		"uid" => $mybb->user['uid'],
		"dateline" => TIME_NOW,
		"ipaddress" => $db->escape_string($session->ipaddress),
		"threads" => '',
		"posts" => '',
		"resulttype" => "threads",
		"querycache" => $db->escape_string($where_sql),
		"keywords" => ''
	);
	$plugins->run_hooks("search_do_search_process");
	$db->insert_query("searchlog", $searcharray);
	redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);
}

Then open your header_welcomeblock_member template
and add this link to it;
<a href="{$mybb->settings['bburl']}/search.php?action=mynewreplies">New Replies To My Threads</a> |
Reply
#12
I've got that in place now...testing to see if it works...
Reply
#13
Just link to it in your nav bar like me. Smile

   
[Image: subscribe.png]
Reply
#14
No dice on this fix...I'm getting threads I've taken part in that I'm subscribed to that have new replies and they don't show up when I go to the link.

Thanks for trying though! Sad
Reply
#15
It only show threads with new replies since your lastvisit that you've started; not threads where you posted in.

devnet Wrote:... 'show replies to my posts' in the top of the forum next to 'view new posts' and 'view today's posts' REALLY sucks.
Reply
#16
LeX- : is there something I didn't do right? your post above didn't do anything, :/
[Image: subscribe.png]
Reply
#17
(2009-04-03, 08:05 PM)xiofire Wrote: LeX- : is there something I didn't do right? your post above didn't do anything, :/

I assume you did something wrong =P
You changed search.php properly ?
Reply
#18
Yeah. Added it above getnew. Shouldn't there be a template added?
[Image: subscribe.png]
Reply
#19
No; only add the link to your header_welcomeblock_member and 'click' =P
Does it direct you towards your search page ?
Reply
#20
Yeah! Exactly! All it does is keep me on the search page.

EDIT: Is there anyway to get all the posts the user has posted in, not just the ones they made?
[Image: subscribe.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)