Willing to Pay for "Show New Replies to My Posts"
#31
(2009-04-04, 01:47 AM)devnet Wrote: Lex,

That seems to be working in my forum. I'll get my supermods to come in and test things. One thing I wished it did was once you've read the reply, not show up in the query again...but this is pretty close...testing Smile

Had the same thought about it; once you've viewed the thread it doesn't show up in the results again =P
Can you try this one ?
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);
}
Reply
#32
(2009-04-03, 09:01 PM)LeX- Wrote: ...Just posted a few posts with a test account in different threads; some i started and some i replied in; and they both show up into the results.
If anyone with more time for testing can try this =P...

1) Lex you are doing a great job trying to help. Smile
2) I don't think anyone fully understands what devnet wants.

"show replies to my posts" = Show me whenever anyone specifically replies to my input.

This, posted by me on another forum over two years ago, is (probably) what devnet is looking to pay for.
EDIT: If the feature below is not what he wants, I might consider trying to pay for it in the future (not now)

Seeker Wrote:Question About Usability

...I either did not fully understand his answer, or failed to make the exact question clear enough. Please, let me try again:

Main point: Let's assume you make a contribution to a thread on page 2-3.
For any reason, you are not able to keep up with (get back to) a fast moving thread which is now on page 15 (for example).

Interaction with others is one of the very best things about a community.
Somewhere on page '4-14', another member might have commented, asked a question, or 'smiled at' your contribution on page 2-3.

Is there an easy way to check (for that direct interaction) without needing to read or scan all 12 new pages?

Important Secondary Info:
On some forums (heavily modified) there is no general "post reply button."
The end user either 'replies to' the person who started the thread (quoting the text is optional), or they reply directly to the post of another member.

This click creates a 'data trail' which is used for a "self-search" function.
Now the end user can instantly (or three months later), very easily see every time someone else interacts with them.

Summary: Is there a fast, easy way to check, at any future time (for that direct interaction), without needing to read or scan all 12 new pages, of a quick moving thread?
#
MyBB is the best forum software! Exclamation

Reply
#33
Well I finally got it to work. It was completely my fault LeX-
An idiotic mistake I will not post here due to embarrassment. Big Grin
[Image: subscribe.png]
Reply
#34
Lex,

New code is working great...it works exactly as it should. Thanks so very much!!!

My users are happy Big Grin
Reply
#35
It's easier to do threads because mybb tracks that easily but doing it on a per post basis is more difficult because mybb doesn't really log seperately a quote/reply to a specific post id. There is no way to know that post #45 is a quoted reply from post #21. To do that you will have to make database alterations and some post form changes too. It would be more complex for sure than just doing as lex did and grabbing the threads with new replies.

I wonder if Lex can make this a plugin. That would imho be the best. I would totally use this. Would be nice to see this in the mybb core too.
Reply
#36
(2009-04-04, 09:22 PM)labrocca Wrote: /* ...

*/
I wonder if Lex can make this a plugin. That would imho be the best. I would totally use this. Would be nice to see this in the mybb core too.

If you mean the code i've posted above >
http://www.mybbcentral.com/thread-2702-p...l#pid17833
Reply
#37
If you can install a plugin than doing this is just as easy. I just made a HUGE idiotic mistake when doing this.
[Image: subscribe.png]
Reply
#38
Lex,

It works great...and I subscribed at your forum Wink Thanks much for this!
(2009-04-04, 10:44 PM)xiofire Wrote: If you can install a plugin than doing this is just as easy. I just made a HUGE idiotic mistake when doing this.

You can revert back pretty easy...if you need help with it, I'm sure we can back you out.
Reply
#39
It's great..I made a few adjustments for my own purposes but it works well. I just added the link to member welcomeblock so guests don't see it.
Reply
#40
(2009-04-04, 09:22 PM)labrocca Wrote: ....There is no way to know that post #45 is a quoted reply from post #21. To do that you will have to make database alterations and some post form changes too. It would be more complex for sure than just doing as lex did and grabbing the threads with new replies.

I know it's complex, and for the end user the results were great, maybe someday I'll be able to do it.
#
MyBB is the best forum software! Exclamation

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)