FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Show own threads?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon5.gif  Show own threads? [message #163576] Wed, 10 November 2010 03:39 Go to next message
Comets is currently offline  Comets   Fiji
Messages: 2
Registered: September 2009
Location: Somewhere in the Pacific
Karma: 0
Junior Member
Is there a way to find threads that you have started/created? like we have for polls? I'm not talking about posts...
icon6.gif  Re: Show own threads? [message #163577 is a reply to message #163576] Wed, 10 November 2010 03:48 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Comets wrote on Tue, 09 November 2010 21:39
Is there a way to find threads that you have started/created? like we have for polls? I'm not talking about posts...


Check your user profile, Show all messages by: xxxx
Anything not preceded by "Re" are threads you started.


"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Show own threads? [message #163578 is a reply to message #163577] Wed, 10 November 2010 05:57 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
There is also a good example explaining how to write your won at FUDAPI (last example on the page).
Re: Show own threads? [message #163581 is a reply to message #163577] Wed, 10 November 2010 06:09 Go to previous messageGo to next message
Comets is currently offline  Comets   Fiji
Messages: 2
Registered: September 2009
Location: Somewhere in the Pacific
Karma: 0
Junior Member
The Witcher wrote on Wed, 10 November 2010 16:48
Comets wrote on Tue, 09 November 2010 21:39
Is there a way to find threads that you have started/created? like we have for polls? I'm not talking about posts...


Check your user profile, Show all messages by: xxxx
Anything not preceded by "Re" are threads you started.


i'm on a forum where i have over 4300 posts so its not really as easy as it looks, there has to be a simpler way?
icon6.gif  Re: Show own threads? [message #163586 is a reply to message #163581] Wed, 10 November 2010 13:57 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Comets wrote on Wed, 10 November 2010 00:09

i'm on a forum where i have over 4300 posts so its not really as easy as it looks, there has to be a simpler way?


Hit it with a bigger hammer!!!

If you are the administrator, go to the administration panel >Topic Settings >Topics Per Page: and set it for 4300, then go back and try my instructions above. Which should make it much easier to see which threads you started and which you replied to.

I just tried this with a forum with 600 posts and it worked just fine, don't forget to reset your original Topics Per Page values when you are through.




"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Show own threads? [message #163596 is a reply to message #163586] Thu, 11 November 2010 11:07 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
A little tweak of the source files is required - It was a simple fix. You can perhaps even apply this yourself. For a release patch, we would also have to patch users.inc.t for path_info support as well as add a link in the template(s)

Anyhow, here we go:

File: (located in DATA_ROOT/src)
showposts.php.t

Find something like this, around row 26
	if (!isset($_GET['start']) || !($start = (int)$_GET['start'])) {
		$start = 0;
	}


After that, insert the following:
if (isset($_GET['topic'])) {
$tm = 1;
} else {
$tm = '';
}


Find the following, around row 46 (52 after you pasted in the above)

		$c = uq('SELECT /*!40000 SQL_CALC_FOUND_ROWS */ f.name, f.id, m.subject, m.id, m.topic_stamp
			FROM {SQL_TABLE_PREFIX}msg m
			INNER JOIN {SQL_TABLE_PREFIX}thread t ON m.thread_id=t.id
			INNER JOIN {SQL_TABLE_PREFIX}forum f ON t.forum_id=f.id
			INNER JOIN {SQL_TABLE_PREFIX}cat c ON c.id=f.cat_id
			WHERE '.$qry_limit.' m.apr=1 AND m.topicer_id='.$uid.'
			ORDER BY m.topic_stamp '.$SORT_ORDER.' LIMIT '.qry_limit($THREADS_PER_PAGE, $start));


Replace all that with this:
if($tm) {
		$sql = 'SELECT /*!40000 SQL_CALC_FOUND_ROWS */ f.name, f.id, m.subject, m.id, m.post_stamp, t.id AS thread_id
			FROM {SQL_TABLE_PREFIX}thread t
			INNER JOIN {SQL_TABLE_PREFIX}msg m ON t.root_msg_id=m.id
			INNER JOIN {SQL_TABLE_PREFIX}forum f ON t.forum_id=f.id
			INNER JOIN {SQL_TABLE_PREFIX}cat c ON c.id=f.cat_id
			WHERE '.$qry_limit.' m.apr=1 AND m.poster_id='.$uid.'
			ORDER BY m.post_stamp '.$SORT_ORDER.' LIMIT '.qry_limit($THREADS_PER_PAGE, $start);
	} else {	
		$sql = 'SELECT /*!40000 SQL_CALC_FOUND_ROWS */ f.name, f.id, m.subject, m.id, m.post_stamp
			FROM {SQL_TABLE_PREFIX}msg m
			INNER JOIN {SQL_TABLE_PREFIX}thread t ON m.thread_id=t.id
			INNER JOIN {SQL_TABLE_PREFIX}forum f ON t.forum_id=f.id
			INNER JOIN {SQL_TABLE_PREFIX}cat c ON c.id=f.cat_id
			WHERE '.$qry_limit.' m.apr=1 AND m.poster_id='.$uid.'
			ORDER BY m.post_stamp '.$SORT_ORDER.' LIMIT '.qry_limit($THREADS_PER_PAGE, $start);
	}
		$c = uq($sql);


Rebuild the theme and then the URL to show just the topics you started, use the following:

index.php?t=showposts&id=1&topic=1

Replace the ID with whatever member you wish.

If you wanna enter a link to Show all Topics started inside a template, it should look something like this

<a href="{ROOT}?t=showposts&amp;id={VAR: u->id}&amp;topic=1&amp;{DEF: _rsid}">Show all topics started by {VAR: u->alias}</a>


[Updated on: Thu, 11 November 2010 15:54]

Report message to a moderator

icon6.gif  Re: Show own threads? [message #163597 is a reply to message #163596] Thu, 11 November 2010 15:46 Go to previous message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Now that is the type of instructions I like to see! Thanks!
Although I will leave it until it is incorporated as a release, I do appreciate your taking the time and effort to provide step by step instructions.

For anyone confused about finding the correct row or line numbers, pasting the file into a PHP editor works for me (there are some decent free ones on line).




"I'm a Witcher, I solve human problems; not always using a sword!"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Include a PHP and Template file
Next Topic: Embedding audio via html
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 01:46:28 GMT 2024

Total time taken to generate the page: 0.02397 seconds