Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [MOD] Admin block  (Read 1751 times)

rob101

  • Newbie
  • *
  • Karma: 9
  • Posts: 22
[MOD] Admin block
« on: November 02, 2007, 09:36:26 pm »

I haven't had a look around to see if this already exists, but I knocked this us, and am just posting it here in case you find it useful.
It simply adds a slimline admin interface block to the bottom of each page for quick access.
It doesn't look perfect in IE (no pseudo class support) so suggestions welcomed to improve the look there!

First, add this to your snews.php file:
Code: [Select]
function footer_admin() {
if ($_SESSION[db('website').'Logged_In'] == token()) {
echo '<div id="admin_block">';
administration();
echo '</div>';
}
}

Then add this right before the </body> of your index.php file:
Code: [Select]
<?php footer_admin() ?>
Finally, add these to you CSS file:
Code: [Select]
#admin_block{
background-color:#002200;
text-align:left;
color: #333333;
padding: 10px;
border: 3px dashed black;
 }
 
#admin_block a{
color: #666666;
}

#admin_block fieldset{
}

#admin_block fieldset p:after{
content: "  |  ";
}

#admin_block fieldset p:last-child:after{
content: '';
}

Fun for all the family.
Logged