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&id={VAR: u->id}&topic=1&{DEF: _rsid}">Show all topics started by {VAR: u->alias}</a>
[Updated on: Thu, 11 November 2010 15:54]
Report message to a moderator