Private Messaging System

I want to show if the user has any new PM's in his startpage, I'm using this code:

<?php

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

$pun_root = './forum/';
@include $pun_root.'include/common.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');
?>


<?php
if ($cookie['is_guest'])
{
include "loginBB.php";
}
else
{
echo 'Welcome '.pun_htmlspecialchars($cur_user['username']);

New Messages here.
}

?>

I would like to display it like this:
Example:

You have 3 new messages in your inbox

Then of course with a link to his/hers inbox.



I just saw that you have made the same on your site. (http://www.cactuz.nu/forum)

Here is my profile status:

madjedo

0 new messages
0 new gb entries
0 new friendships
1 new forum posts

Supervise

Logout

Hej igen, det återstor bara ett litet problem med topic visandet...

Jag vill ha de senaste längst up, över de äldre, inte tvärtom...

kolla: http://www.art4gamers.net

Den senaste "news comments" ligger underst, och den gammla överst.

28

(14 replies, posted in PunBB 1.2 troubleshooting)

It's working, but the latest topics is being shown under, the oldest on top, and the newest at the bottom. I want the oppposite

*EDIT, oops, posted this in the wrong forum tongue Ive made a post in my old topic, check it out.

http://punbb.org/forums/viewtopic.php?id=3538&p=2

29

(1 replies, posted in Archive)

LOL! Jag löste det, hehe, piss enkelt ju.

Så här gjorde jag: Du går in i config.php och lägger helt enkelt till

$cookie_domain = '.dittdomän.com';

...och ja, punkten ska vara med

30

(16 replies, posted in Archive)

köper du magasinen "DATOR" - de har en lista på över 200 svenska hundra webbhotell.

31

(1 replies, posted in Archive)

Okej, jag tar det på svenska.

Tack för all hjälp Rickard - hittils smile

Jag behöver ändå fortfarande hjälp.

Jag försöker integrera PunBB nu så där litegrann. Mitt problem är login boxen, jag har lagt den på startsidan, det går att logga in. MeN! När jag väl är inloggad så är den kvar, istället för den vill jag ha så här, profil, inställningar etc.

Jag försökte med denna kod :

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

$pun_root = './forum/';
@include $pun_root.'include/common.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB

first.');

------

if ($cookie['is_guest'])
{
   @include "loginBB.php";
}
else
{
   echo 'Hello '.pun_htmlspecialchars($cur_user['username']);
}

-----

Jag fick nästan igång skiten, men, jag tror det är lite "cookie problem" . Jag loggade in på en viss data, och loggade ut med samma data - sedan loggade jag in med min vanliga data, jag kom in i forumet men märkte att login boxen var kvar till vänster... hmmm? Jag gick tillbaka till gammla datan och gick in på testsidan och märkte att det stog: "Hello Madjedo" till vänster, där login boxen skulle stått. Hmmm tänkte jag och stack in på forumet(på den gammla datan), där var jag utloggad.

Hur ska jag nu fixa detta problem?

Test sida URL: http://www.art4gamers.net/sheep.php

32

(14 replies, posted in PunBB 1.2 troubleshooting)

Oh cool, thx man. It's working, now i can just start fixing some including stuff and voili vittu il do that tomorow.

Getting tired, thanks! - Again. Hihi smile

33

(14 replies, posted in PunBB 1.2 troubleshooting)

Well, it didn't work anyway...

<?php

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

$pun_root = './forum/';
@include $pun_root.'include/common.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB

first.');
?>
<?php
if ($cookie['is_guest'])
{
   //  @include "loginBB.php";
}
else
{
   //  @include "loginBB.php";
}

?>

Nothing shows up, look at http://www.art4gamers.net/sheep.php under "USER" - where you wont see anything

34

(14 replies, posted in PunBB 1.2 troubleshooting)

that little ] was that screwed everything up...

I am learning... Trust me smile

35

(14 replies, posted in PunBB 1.2 troubleshooting)

below it i put in this:

<?php

if ($cookie['is_guest'])
{
    // Show login box
}
else
{
    // The user is logged in
]

?>

Hole page white and showing only: Parse error: parse error, unexpected ']' in /customers/art4gamers.net/art4gamers.net/httpd.www/sheep.php on line 166

* I'm really screwed up...

36

(14 replies, posted in PunBB 1.2 troubleshooting)

This code is in and working:

<?php

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

$pun_root = './forum/';
@include $pun_root.'include/common.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB

first.');

?>

And then... ?

37

(14 replies, posted in PunBB 1.2 troubleshooting)

what? I don't undeerstand... Where am i supose to put this:

if ($cookie['is_guest'])
{
    // Show login box
}
else
{
    // The user is logged in
]

38

(5 replies, posted in PunBB 1.2 show off)

hmmm... works fine for me...

39

(14 replies, posted in PunBB 1.2 troubleshooting)

I almost understand what to do, if you can just tell me in wich order to do it. MOre specifik

40

(14 replies, posted in PunBB 1.2 troubleshooting)

Eh... What are you talking about?

I have not included common.php and i havn't discussed it with you "in that other topic"

And "just check it like thsi?"

...That didn't help me much.

41

(16 replies, posted in Archive)

Alltså jag är nöjd med B-One, det där med fri trafik har inte jag haft några problem med ännu.

42

(14 replies, posted in PunBB 1.2 troubleshooting)

I've managed to put a login box on my site, check it out @ http://www.art4gamers.net

But here comes the problem, after the user has logged in the login box is still there! Now i want to remove it after the user is logged in and include some user status stuff, for an example a profile page or her/his last posts, or his last PM.

But how?

*EDIT: My problem is not including the stuff, it is removing the login box after login so i can add other stuff.

43

(19 replies, posted in Feature requests)

I liked his ideaz anyway...

44

(5 replies, posted in PunBB 1.2 show off)

Check it out @ http://forum.art4gamers.net

_______________

Yee haaaa!

45

(16 replies, posted in Archive)

psykedelisk_pajas wrote:

Är detta ett bra alternativ, vet inte riktigt hur mycket trafik forumet kommer få, men vill att det ska klara av en del.

#1 - Din sida får generera hur mycket traffik som helst på B-One

psykedelisk_pajas wrote:

Hur mycket plats brukar krävas för ett forum av PunBB.orgs forums storlek och hur mycket är trafiken per månad på denna sida?

#2 Min tar ungefär 2 MB, ny uppladdad med noll posts

#3 B-One använder ett gammalt PHPmyAdmin system, men de säger att de håller på och uppgradera sina saker.


---

Mer än så kan jag inte säga, kolla mera på B-One.net

I actually e-mailed them, i asked them why they hade so many "old stuff" . They said that they are currently upgrading.

I don't know for how long time they've been "upgrading" or when it's gonna finish... But well see.

Well i be dammed, it finally worked... Holy crap!

Thank you a lot for taking your time, thx :=)

ehh, where to put the first code exactly:

<HTML>

<HEAD>

<BODY>


Over <HTML>? Or under <HEAD> or Under <BODY>?

<?php

$db_type = 'mysql';
$db_host = 'localhost';
$db_name = 'art4gamers_net';
$db_username = 'art4gamers_net';
$db_password = 'shhhh';
$db_prefix = 'foo_';
$p_connect = false;

$cookie_name = 'punbb_cookie';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;

$language = 'en';

define('PUN', 1);

?>

<?php
$_GET['action'] = 'active';
@require('forum/extern.php');
?>

and this:

<?php
$_GET['action'] = 'active';
require('forum/extern.php');
?>

and i get:

There is no valid language pack 'en' installed. Plese check $language setting in config.php.

on both of the codes