Topic: Modding punBB, PHP Help
Alright, I'm using punBB and I'm trying to add a small, simple mod. I've added
a column to the users table, which is 'immortal' as a tinyint(1), just like the
other user settings.
1 == immortal
0 == not immortal
Now in viewtopic.php I have this block of code.
if ($cur_post['immortal'] == 1)
$imm = "IMM";
else
$imm = "";
Below it I changed:
$info .= $imm.'<br>'."\n\t\t\t\t\t\t\t".$user_title.'<br>';
to:
$info .= '<br>'."\n\t\t\t\t\t\t\t".$user_title.'<br>';
I thought I had things backwards, as if it would say IMM if the logged in user was, but
even then its not. So what I'm trying to get it to do is display the "IMM" tag next to
the names of anyone who is an imm.
The problem is, even for posts MADE BY users with immortal as 1, it isn't adding the "IMM"
This block of code is in header.php, and it works perfectly.
If ($cur_user['immortal'] == '1')
{
$tpl_temp .= '<br>Welcome, Immortal!</b>';
}
Any ideaS?
This is what the db looks like:
+----+----------+------------------------------------------+--------------------------+-------+----------+------+------+------+------+-------+----------+------------+-----------+-------------+------------+---------------+-----------+------------------+---------+----------+--------------+----------+-----------------+----------+-------+-----------+--------+------------+------------+------------+-------------+------------+-----------------+--------------+----------+
| id | username | password | email | title | realname | url | icq | msn | aim | yahoo | location | use_avatar | signature | disp_topics | disp_posts | email_setting | save_pass | notify_with_post | smilies | show_img | show_avatars | show_sig | link_to_new_win | timezone | style | num_posts | status | last_post | registered | last_visit | last_action | admin_note | activate_string | activate_key | immortal |
+----+----------+------------------------------------------+--------------------------+-------+----------+------+------+------+------+-------+----------+------------+-----------+-------------+------------+---------------+-----------+------------------+---------+----------+--------------+----------+-----------------+----------+-------+-----------+--------+------------+------------+------------+-------------+------------+-----------------+--------------+----------+
| 5 | Coredump | secret | tracerah@liquidbrain.net | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | 0 | | NULL | NULL | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | Csl | 3 | 2 | 1090260080 | 1090198606 | 1090258383 | 1090260081 | NULL | NULL | NULL | 1 |
+----+----------+------------------------------------------+--------------------------+-------+----------+------+------+------+------+-------+----------+------------+-----------+-------------+------------+---------------+-----------+------------------+---------+----------+--------------+----------+-----------------+----------+-------+-----------+--------+------------+------------+------------+-------------+------------+-----------------+--------------+----------+