Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: differents design between front & back office  (Read 157 times)

gevaudanbeast

  • Newbie
  • *
  • Karma: 1
  • Posts: 1
differents design between front & back office
« on: November 16, 2012, 04:32:48 PM »

Hello World,
This is my first post here and I want contribute.
I purpose a simple change for use a "different" design between front & back office.
You need only 2 things :
  • first time : add this line to snews.php :
Code: [Select]
function contentid()
{
    $adminurls = array('/administration', '/snews_settings', '/snews_categories', '/admin_category', '/admin_subcategory', '/groupings', '/admin_groupings', '/snews_articles', '/article_view', '/extra_contents', '/extra_view', '/snews_pages', '/page_view', '/admin_article', '/article_new', '/article_new', '/extra_new', '/extra_new', '/page_new', '/page_new', '/editcomment', '/snews_files', '/process', '/logout');
    $found = FALSE;
    foreach ($adminurls as $adminurl)
    {
        if(strpos($_SERVER['REQUEST_URI'], $adminurl) === 0)
        {
            $found = TRUE;
            break;
        }
    }
   
    return $found ? 'admin' : 'main';
}
    [/li]
  • and : add in index.php this
Code: [Select]
<div id="<?php echo contentid(); ?>">
to replace
Code: [Select]
<div id="main">
    Now when you are in the back office you can use css style (#main or #admin) to design the admin.
    Sorry for my English.
« Last Edit: November 16, 2012, 04:34:22 PM by gevaudanbeast »
Logged