On this site
| Alex300 |
|
|---|---|
|
Here working Bug Fix:
Find the SQL near line 34 in userlatestposts.php and replace it with:
$totalitems = sed_sql_result(sed_sql_query("SELECT COUNT(*) FROM $db_forum_posts WHERE fp_posterid=".$urr['user_id']), 0, 0);
Find the SQL near line 51 in userlatestposts.php and replace it with:
$sqluserlatestposts = sed_sql_query("SELECT p.fp_id, p.fp_updated, t.ft_title, t.ft_id, s.fs_id, s.fs_title, s.fs_category
FROM $db_forum_posts p, $db_forum_topics t, $db_forum_sections s
WHERE fp_posterid='".$urr['user_id']."'
AND p.fp_topicid=t.ft_id
AND p.fp_sectionid=s.fs_id
GROUP BY t.ft_id
ORDER BY fp_updated DESC
LIMIT $df, ".$cfg['plugin']['userlatestposts']['countonpage']);
The same query is used in userlatestposts.ajax.php. Change it too. Enjoy ![]() Trustmaster I think in a trunk it is necessary to use this code too. Because that variant, that now is in a trunk outputs not all posts (removes posts with identical fp_topicid)
$totalitems = sed_sql_result(sed_sql_query("SELECT COUNT(DISTINCT fp_topicid)
FROM $db_forum_posts
WHERE fp_posterid=".$urr['user_id
We should not use DISTINCT in this caseЕсть миры, не здесь, там, где небеса горят, и моря засыпают, и реки дремлют; люди сделаны из дыма, а города – из песен. Где-то опасность, где-то несправедливость, даже где-то остыл чай. Идем Эйс, у нас много работы!...
...Sorry for my english... Бесплатные расширения для Cotonti: https://lily-software.com/free-scripts/ |