1

Topic: Need some answers about making portall

I am pretty advanced in PHP ,but i cant understand some features!
This will be more related tho the portal script!

How to check  is user loged in or not?

Where are stored user dates about witch topic is reeded or not!  I want to make small block where are listed all topics that user is not reeded.

2 (edited by kierownik 2009-03-08 22:35)

Re: Need some answers about making portall

$forum_user['is_guest'] you can see if the user is a guest
$forum_user['id'] is the id of the user.

There are more variables in $forum_user, just echo the array and you know them

3 (edited by Wuu 2009-03-09 20:37)

Re: Need some answers about making portall

Senx works  great! But still can't dig how to make box for new topics or topics that have new posts , where is this data stored cookies ,mysql?! Maybe it in $forum_user my English is not so good ,cant finde it there hmm

And what is thous G ?

    [48] => g_title
    [49] => g_user_title
    [50] => g_moderator
    [51] => g_mod_edit_users
 etc....

And in PM extension

$result = mysql_query('select count("id") from '.$db_prefix.'pun_pm_messages where receiver_id = '.$forum_user['id'].' && (status = "sent" || status = "delivered");');

Why there is status sent and delivered? I miss something? hmm

Re: Need some answers about making portall

In pun_pm a message can have different statuses: draft, sent, delivered, read. If the status is 'sent', sender is able to edit or to delete the message. When receiver visits the forum, he sees that he has N new messages. At this moment the status is changed to 'delivered' and from now sender can't edit or delete the message.


$result = mysql_query('select count("id") from '.$db_prefix.'pun_pm_messages where receiver_id = '.$forum_user['id'].' && (status = "sent" || status = "delivered");');

By the way, where do you find this code?