MyBB Community Forums

Full Version: Admin Hide Navigation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I changed my "admin/index.php" like attached to get a button at topmenu to show & hide the left navigation menu.
Now I can edit more easy the templates because I changed the textareas also in another way to get it 100% of width.
Would be nice if you can add this feature. If you need I can also post my other code for templates-editor.
For example I use in template.php:

$template = str_replace("\t", "   ", $template[template]);
maketemplateareacode($lang->template, "template", "$template", "25", "80");

+ change whitespaces back to tab on submit.

adminfunctions.php:
function maketemplateareacode($title, $name, $value="", $rows="4", $columns="40")
{
	$bgcolor = getaltbg();
	$value = stripslashes($value);
	$value = htmlspecialchars($value);
	echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"100%\" colspan=\"2\">$title<br /><textarea name=\"$name\" rows=\"$rows\" cols=\"$columns\" style=\"width: 100%; font-family: Courier New, Courier, monospace; overflow: auto;\" wrap=\"off\">$value</textarea></td>\n</tr>\n";
}
toertchn, thanks for index.php, it helps a lot. This should be included in the next version.

for you second one, what does it do, can you post a screenshot??
Requested screenshot. I only also set optional table with to 100% in admin css.
ah, I see, you make the template textbox bigger. Im happy with what it is at the moment.

Also, attached is the same file, just the link is on the left (above the navigation, looks neater and easier)
nice thx ;-)

just another example (navigation with less code) but same result

index.php:
<body>
<?php

echo <<< EOF
<ul>
	<li><a href="index.php?action=home">$lang->cp_home</a></li>
	<li><a href="adminoptions.php">$lang->cp_prefs</a></li>
	<li><a href="index.php?action=vercheck">$lang->vercheck</a></li>
</ul>

<ul>
	<li id="title">$lang->nav_settings</li>
	<li><a href="settings.php?action=change">$lang->nav_change</a></li>
	<li><a href="settings.php?action=add">$lang->nav_add_setting</a></li>
</ul>
EOF;

css like:
ul {
	list-style-type: none;
	margin: 0 0 10px 0;
	padding: 0;

	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 11px;
	border: 1px solid Black;

	background-color: #efefef;
}

ul li {
	padding: 3px;
}

ul li#title {
	background: #013c74 url("thead_bg.gif");
	color: White;
	text-align: center;
	font-weight: bold;
}
please post screenshot of what you do
The code produces the same navigation design without using many tables. Top 2 boxes are new <ul> code - bottom 2 current <table> design.

It also could help if you can add sepearate class holders for the different frames. Like: navigation <body class="navframe">, <body class="contframe"> and <body class="logoframe">. With that you can change margins, paddings and so on separat in admin .css stylesheet.
hmm, interesting. Tell ya what, put all mods in this thread and any new ones in here from now on: http://www.mybboard.com/community/forumd....php?fid=9

Put each one in its own new thread, give it a descriptive subject such as New menu style or increase template textarea etc, put a good desciption, instructions on how to do it, version designed for and a screenshot for each.

Not only will people be able to find it easier, but if MM (MusicalMidget) likes the ideas, he might put some on http://www.mybbmods.com/, the site that he owns and runs.
k776 Wrote:Not only will people be able to find it easier, but if MM (MusicalMidget) likes the ideas, he might put some on http://www.mybbmods.com/, the site that he owns and runs.

Actually, just for the record, I don't ever place anyone elses mods on the site without the authors permission. I prefer it if people who want to publish mods there, use the submissions form. Wink
Pages: 1 2