How do I print out say the titles of some upcoming events on my front page?
And to be shown as links to the event info. Something like this:


Upcoming Events

> (date) - event1
> (date) - event2
> (date) - event3
> (date) - event4
> (date) - event5



If someone could help me on this I would be really greatful. Thanks.
It would be great if it was just a file that I could include on the front page. I just don't know how to do it.

Nevermind. Fixed it.

Cant I just copy, modify and rename extern.php and include it on my front page?

I get this error:


No parameters supplied. See extern.php for instructions.

I'm really no php pro, but I'm trying to put together my own extern.php that I can include anywhere on my site.
What do I have to add/change/remove to make this work?

Any help will be greatly appreciated.

This is what I have so far (parts from the original extern.php):

<?php


$connect = mysql_connect("localhost","","");


//

// Show board statistics

//

if ($_GET['action'] == 'stats')

{


    // Collect some statistics from the database

    $result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());

    $stats['total_users'] = $db->result($result);



    $result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());

    $stats['last_user'] = $db->fetch_assoc($result);



    $result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());

    list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);



    echo $lang_index['No of users'].' : '.$stats['total_users'].'<br />';

    echo $lang_index['No of topics'].' : '.$stats['total_topics'].'<br />';

    echo $lang_index['No of posts'].' : '.$stats['total_posts'].'<br /><br />';

    echo $lang_index['Newest user'].' : <a href="'.$pun_config['o_base_url'].'/profile.php?id='.$stats['last_user']['id'].'">'.pun_htmlspecialchars($stats['last_user']['username']).'</a>';


    return;


}


?>

5

(3 replies, posted in PunBB 1.2 troubleshooting)

I have the same problem.

Well, I know that you can fetch all of the stats like this:

<?php include("http://www.sitename.com/forum/extern.php?action=stats"); ?>

Can I do this the same way, but just with the last registered user?

How do I do this using extern.php?
I don't want the whole stats, just last registered user.

Thanks

8

(3 replies, posted in Archive)

Japp, schysst!

9

(3 replies, posted in PunBB 1.2 troubleshooting)

thanks!

10

(3 replies, posted in Archive)

Kan jag på något sätt lägga till target="_blank" någonstans i källkoden så att alla länkar i en post öppnas i nya fönster?

11

(3 replies, posted in PunBB 1.2 troubleshooting)

Is it possible to do so that all the links written in a post opens in a new window when you click on them? Like adding target="_blank" somewhere so that it will apply to all posts.