User title: UNB developer & webmaster
Member since Jan 2004 ·
3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Quote by jense on 2008-01-28, 14:07:
main.html in line 9
{if or or $resendValidationLink $UnreadTopicsCount $TopicsSinceLastLoginLink}
Is
$CurrentPollsCount missing on purpose? If added, it would show the corresponding link even if logged out. I don't see a reason why this should be bad...
Correct. All four variables are contained in the block below. I've done this a thousand times. If this time it should be different, I would have commented it. But I didn't, so this is now fixed.
forumlist_edit.html in line 45
{if not $f.threadCount}
This is always true (it is
(int) 0 or unset). Possibly, the conditional should test if the variable is set at all. A simple solution is to use
{if neq $f.type "link"} instead. Alternatively, a
toggleVisId might be added so that one can quickly switch from a weblink to a category.
Also correct, this variable cannot be set to a different value in the code. I suppose this was meant to be different any time ago. Since the Category checkbox should only be visible if the forum contains no threads, I assume it should mean to prevent hiding existing threads by changing the forum's type to a category. Changing it to be a web link would have the same result and should be prevented, too. I'm not sure what this crap (in my code) was going to be... 
Okay, some minutes later, I have now changed the whole thing. $f.threadCount is only set for the forum to be edited and now really does contain the number of threads in the forum. See the code comment for details. (main.inc.php:1065)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬