PDA

View Full Version : Modifying an admin page....


John Maguire
05-26-2004, 05:03 AM
I was forwarded to you guys for this particular question...

On admincp/moderator.php (a page in the admin CP), how do I set the "Moderators can physically delete posts/threads" option to yes by default? I tried to change it by editing the moderator.php file, but I got lost in the code.

In my opinion, I think this option should be set to yes by default in future versions of vB3.

John Maguire
05-26-2004, 08:47 AM
I'm not sure what you're referring to. The script I'm looking at doesn't have any form elements.

This is what it has (Line 125 of admincp/moderator.php):

print_yes_no_row($vbphrase['can_physically_delete_posts'], 'moderator[canremoveposts]', $moderator['canremoveposts']);

I'm pretty sure that's the correct line. I haven't got a clue where the print_yes_no_rows() function is defined, but I have a pretty good idea what it does with the objects that are passed into it.

If you're creating a new moderator, though, how does $moderator['canremoveposts'] get assigned and where does it get assigned? Well, obviously I had to keep looking myself. I found that you assign 'canremoveposts' to 1 in the array up on line 64.