Your Portal Version: 1.0.3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://www.belariepark.cz
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
Hi, I have question related to the Recent block. I set number of topics which should be displayed there to 8. But due to the fact that there is hidden part in my forum (some forums are visible for defined users only), number of showed topic is not 8, but it is lower. Only if the user can see all forums and topics he has all 8 recent topics shown.
Do you have any idea how to solve it?
Recent topisc block
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Re: Recent topisc block
No any idea?
-
- Dev
- Posts: 2504
- Joined: 17. July 2008 21:08
- phpBB.de User: marc1706
- phpBB.com User: Marc
- Location: Clausthal-Zellerfeld / München
- Contact:
Re: Recent topisc block
Hm,
I think that might be a bug.
You could try the following:
Open portal/block/recent.php (not the template folder)
Find:
Replace with:
You have to do the following 3 times:
Find:
Replace with:
That should fix it.
I think that might be a bug.
You could try the following:
Open portal/block/recent.php (not the template folder)
Find:
Code: Select all
if (sizeof($forum_ary))
{
$sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
}
Code: Select all
$forum_sql = '';
if (sizeof($forum_ary))
{
$sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
$forum_sql = ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
}
Find:
Code: Select all
' . $sql_where . '
Code: Select all
' . $sql_where . '' . $forum_sql . '
That should fix it.
Re: Recent topisc block
For registered users it seems to be ok, but for visitors error below is displayed.
SQL ERROR [ mysql4 ]
Column 'forum_id' in where clause is ambiguous [1052]
SQL ERROR [ mysql4 ]
Column 'forum_id' in where clause is ambiguous [1052]
-
- Dev
- Posts: 2504
- Joined: 17. July 2008 21:08
- phpBB.de User: marc1706
- phpBB.com User: Marc
- Location: Clausthal-Zellerfeld / München
- Contact:
Re: Recent topisc block
Ok, try this in addition to the other changes:
Open portal/block/recent.php
Find:
Replace with:
Do this 3 times:
Find:
Replace with:
Open portal/block/recent.php
Find:
Code: Select all
$forum_sql = ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
Code: Select all
$forum_sql = ' AND ' . $db->sql_in_set('t.forum_id', $forum_ary, true);
Find:
Code: Select all
FROM ' . TOPICS_TABLE . '
Code: Select all
FROM ' . TOPICS_TABLE . ' t
Re: Recent topisc block
Ok, now it works, thanks a lot. But I did only 1st change, 2nd one (3 changes with t) I did not, because it doesn't make any sense to have two t one next to the other ... and it generates another sql error.
-
- Dev
- Posts: 2504
- Joined: 17. July 2008 21:08
- phpBB.de User: marc1706
- phpBB.com User: Marc
- Location: Clausthal-Zellerfeld / München
- Contact:
Re: Recent topisc block
That's not what I meant. The code "FROM ' . TOPICS_TABLE . ' " appears 3 times in that file.
Re: Recent topisc block
Yes, I understand this, but there already was FROM ' . TOPICS_TABLE . ' t
If I follow your instructions properly, I will have FROM ' . TOPICS_TABLE . ' t t
If I follow your instructions properly, I will have FROM ' . TOPICS_TABLE . ' t t