block categories

Current Version: 1.0.6
Released: 09.01.10
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.
Locked

Topic author
matius
Active Member
Posts: 5
Joined: 29. January 2010 16:47

block categories

Post by matius »

Your Portal Version: 1.0.6
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
Boardlink: http://centrumrc.pl

PHP Version: 3.0.9
MySQL Version: 5.1.58

What have you done before the problem was there?


What have you already tryed to solve the problem?
I tried to solve the problem but without success. Everything that I managed to do is this, but does not work :/

Description and Message
hi,

I want to create a block on the right side, which will show the topic and then the amount of topics. Everything that I managed to do is this, but does not work.

index.php

Code: Select all

$forum_id = 4;
    $sql = 'SELECT COUNT(topic_id) AS topic_count
        FROM ' . TOPICS_TABLE . '
        WHERE forum_id = 4';
 $result = $db->sql_query($sql);
$topic_count= (int) $db->sql_fetchfield('topic_count');
$db->sql_freeresult($result); 

Code: Select all

$template->assign_vars(array(
    'TOPIC_COUNT'    => $topic_count,
)); 
block on the right side

Code: Select all

{TOPIC_COUNT}
Can somebody help me?[/i]

Topic author
matius
Active Member
Posts: 5
Joined: 29. January 2010 16:47

Re: block categories

Post by matius »

Somebody help me?
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: block categories

Post by Marc »

Where did you add the code you posted?

Topic author
matius
Active Member
Posts: 5
Joined: 29. January 2010 16:47

Re: block categories

Post by matius »

what do you mean?

first two in index.php

and last, in block. As I said i'm not very good in programing so I could make a mistake.

Topic author
matius
Active Member
Posts: 5
Joined: 29. January 2010 16:47

Re: block categories

Post by matius »

Is it good or not?
Locked

Return to “board3 Portal 1.0.x - English Support”