Topic: Simple question

Im working on a punbb mod and im editing the Index.php since it would fit perfectly on what im making so anyways i came across some code and want to know if it is important.... like do i need to keep it....

// Show what the current user can and cannot do
if ($cur_user['status'] > PUN_USER)
    $perms = $lang_index['You'].' <b>'.$lang_index['can'].'</b> '.$lang_index['post replies'].'<br>'.$lang_index['You'].' <b>'.$lang_index['can'].'</b> '.$lang_index['post topics'].'<br>'.$lang_index['You'].' <b>'.$lang_index['can'].'</b> '.$lang_index['edit posts'].'<br>'.$lang_index['You'].' <b>'.$lang_index['can'].'</b> '.$lang_index['delete posts'].'<br>'.$lang_index['You'].' <b>'.$lang_index['can'].'</b> '.$lang_index['delete topics']."\n";
else if (!$cookie['is_guest'])
{
    $perms = $lang_index['You'].' <b>'. (($pun_config['p_users_post'] == '1') ? $lang_index['can'] : $lang_index['cannot']) .'</b> '.$lang_index['post replies'].'<br>';
    $perms .= "\n\t\t\t\t\t\t".$lang_index['You'].' <b>'. (($pun_config['p_users_post_topic'] == '1') ? $lang_index['can'] : $lang_index['cannot']) .'</b> '.$lang_index['post topics'].'<br>';
    $perms .= "\n\t\t\t\t\t\t".$lang_index['You'].' <b>'. (($pun_config['p_users_edit_post'] == '1') ? $lang_index['can'] : $lang_index['cannot']) .'</b> '.$lang_index['edit posts'].'<br>';
    $perms .= "\n\t\t\t\t\t\t".$lang_index['You'].' <b>'. (($pun_config['p_users_del_post'] == '1') ? $lang_index['can'] : $lang_index['cannot']) .'</b> '.$lang_index['delete posts'].'<br>';
    $perms .= "\n\t\t\t\t\t\t".$lang_index['You'].' <b>'. (($pun_config['p_users_del_topic'] == '1') ? $lang_index['can'] : $lang_index['cannot']) .'</b> '.$lang_index['delete topics'].'<br>'."\n";
}
else
{
    $perms = $lang_index['You'].' <b>'. (($pun_config['p_guests_post'] == '1') ? $lang_index['can'] : posts'].'<br>'.$lang_index['You'].' <b>'.$lang_index['cannot'].'</b> '.$lang_index['delete pos$lang_index['cannot']) .'</b> '.$lang_index['post replies'].'<br>';
    $perms .= "\n\t\t\t\t\t\t".$lang_index['You'].' <b>'. (($pun_config['p_guests_post_topic'] == '1') ? $lang_index['can'] : $lang_index['cannot']) .'</b> '.$lang_index['post topics'].'<br>';
    $perms .= "\n\t\t\t\t\t\t".$lang_index['You'].' <b>'.$lang_index['cannot'].'</b> '.$lang_index['edit ts'].'<br>'.$lang_index['You'].' <b>'.$lang_index['cannot'].'</b> '.$lang_index['delete topics']."\n";
}

Re: Simple question

That looks like its what the user can and cannot do.

ex:
You can post replies to topics
You can post new topics
You can edit your posts
You can delete your posts
You can delete your topics

for this forum.

You could remove it, if you mod the other code that displays the string $perms

Indocron
$theQuestion = (2*b) || !(2*b);

3 (edited by newera70 2004-12-15 01:09)

Re: Simple question

EDIT:nvm answered my own question

Re: Simple question

1.1.5

open up include/common_admin.php
right at the top you see this

function admin_menu($page = '')
{

?>
<table class="punspacer" cellspacing="1" cellpadding="4">
    <tr>
        <td class="<?php echo ($page == 'categories') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_categories.php">Categories</a></b></td>
        <td class="<?php echo ($page == 'forums') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_forums.php">Forums</a></b></td>
        <td class="<?php echo ($page == 'users') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_users.php">Users</a></b></td>
        <td class="<?php echo ($page == 'options') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_options.php">Options</a></b></td>
        <td class="<?php echo ($page == 'permissions') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_permissions.php">Permissions</a></b></td>
        <td class="<?php echo ($page == 'censoring') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_censoring.php">Censoring</a></b></td>
        <td class="<?php echo ($page == 'ranks') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_ranks.php">Ranks</a></b></td>
        <td class="<?php echo ($page == 'bans') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_bans.php">Bans</a></b></td>
        <td class="<?php echo ($page == 'prune') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_prune.php">Prune</a></b></td>
        <td class="<?php echo ($page == 'maintenance') ? 'puncon1cent' : 'puncent'; ?>" style="width: 10%; white-space: nowrap"><b><a href="admin_maintenance.php">Maintenance</a></b></td>
        <td class="<?php echo ($page == 'reports') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="admin_reports.php">Reports</a></b></td>
    </tr>
</table>

<?php

}

add

<td class="<?php echo ($page == 'categories') ? 'puncon1cent' : 'puncent'; ?>" style="width: 9%; white-space: nowrap"><b><a href="page_url">Page_name</a></b></td>

to that.
That should work, im not possitive though. i havent touched 1.1.5 in months.




1.2
just add
define('PUN_PLUGIN_LOADED', 1);
to the page, make sure its in the plugin folder, and that the filename starts with AP_ or AMP_
its that easy!

Indocron
$theQuestion = (2*b) || !(2*b);

Re: Simple question

How did u respond to that when i had already changed it saying i got the answer?

Re: Simple question

probably because it took you 7 minutes to edit it ... long enough for someone to start a reply ... wink

Re: Simple question

Frank H wrote:

probably because it took you 7 minutes to edit it ... long enough for someone to start a reply ... wink

Not quite lol

Re: Simple question

yea, it took me a while to reply, as i had to redownload the 1.1.5 source.

Indocron
$theQuestion = (2*b) || !(2*b);