MyBB Community Forums

Full Version: How to adjust the admin index page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

The idea

this is not really a tutorial, I should show, how you kann adjust your acp index page. I don't need the functions of the standard index page and so I coded a little bit to make the index a little bit nicer. And I missed a PhpMyAdmin link. Sorry developers, but this should not be negative. Smile

This is something the world doesn't need but I hope you won't kill me for this. *g* To do this, html knowledge is required!

This Demo shows how to create an admin index page that looks like my one:

[Image: screenshot_new_acp_index.jpg]

Please myke a backup of the following file before you're going to test it:
- /admin/index.php

Code-Changes:

Open:
/admin/index.php

Find (line 28):
Note: I inserted linebreaks that the forum do not create a horizontal scollbar
echo "<div id=\"header-links\"><a href=\"index.php?action=home\" target=\"body\">"
.$lang->cp_home."</a><a href=\"../index.php\" target=\"body\">"
.$lang->view_forums."</a><a href=\"index.php?action=logout\" target=\"_parent\">"
.$lang->logout_cp."</a></div>";

Replace with:
echo "<div id=\"header-links\"><a href=\"index.php?action=admin_index\" target=\"body\">"
.$lang->cp_home."</a><a href=\"../index.php\" target=\"body\">"
.$lang->view_forums."</a><a href=\"index.php?action=logout\" target=\"_parent\">"
.$lang->logout_cp."</a></div>";

Find (line 34):
elseif ($mybb->input['action']=="home")

Before add:
elseif ($mybb->input['action']=="admin_index")
{
        include('admin_index.php');
}

Find (line 232):
makenavoption($lang->cp_home, "index.php?action=home");

Replace with:
makenavoption($lang->cp_home, "index.php?action=admin_index");

Find (line 326):
$goto = 'index.php?action=home';

Replace with:
$goto = 'index.php?action=admin_index';

These were the code changes. I created a new admin_index.php file, which you can finde in the package in the attachment, some image are included, too. Don't laugh, the admin_index.php looks terrible, I know. Wink

Upload:

File: admin_index.php -> /admin/admin_index.php
Directory: images/ -> /admin/ there you have to put in your own icons, I'm not allowed to hand on them.
I used the images from http://www.fasticon.com/

(the images are from http://www.kde-look.org )
Hello,

I know that this is something nobody needs, but can you give me a little bit feedback, if the code changes are well-coded or different things? Wink
heloo there , thank god u found me!!Tounguei would reply earlier if i were here

umm i like the idea, actually the icons made it nice (regarding ur screenshot)
somemay need it, however i recommend keeping the original at the bottom,

actually armed with html knowledge u can modify what ever u want in anypage!!

but it;s good Smile

regards
Hello, thank you for your answer.

Is it possible to create an own template for the admin index, that I can modify it through the acp?
I created a new template, named "admin_index", but I don't know how to use it. Is there an easy way to do this?
The only way to edit the admin CP is by opening the index.php file in the admin/ folder.
admin pages don't use templates. They tend to use tables and functions like makelabelcode and tableheader to generate the pages.
@Snake: That's waht I made. ;-)

decswxaqz Wrote:admin pages don't use templates. They tend to use tables and functions like makelabelcode and tableheader to generate the pages.
Ok, thank you.