Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Admin toolbar in two rows or "pluginized"  (Read 7015 times)

0 Members and 1 Guest are viewing this topic.

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Admin toolbar in two rows or "pluginized"
« on: November 08, 2006, 11:02:04 am »

Goodmorning,

i got so many plugins in my CPG that as a result i also have a lot of extra buttons in my Admin toobar.

What i would like to know is where i can adjust it so the buttons will appear in two rows. I searched the board but got nowhere.

I do have one other idea, for a plugin maybe, for the Admin toolbar. Is it possible to put all options presented in the Admin toolbar by buttons into a Admin dropdown menu ? That would definetly save some space on my CPG, and i think i am not the only one with a rather lengty Admin toolbar.

Cheers!
Hein
« Last Edit: December 01, 2006, 05:19:50 pm by Hein »
Logged

Farnsi

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 177
Re: Admin toolbar in two rows or "pluginized"
« Reply #1 on: November 08, 2006, 11:36:01 am »

i guess it is a matter of themeing because there are some styles where the admin row appears in two rows.
perhaps you should have a look at the styles which provide a two row admin toolbar, like GrimmDF or else.
Logged
Regards,
Farnsi

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Admin toolbar in two rows or "pluginized"
« Reply #2 on: November 08, 2006, 12:00:22 pm »

Thanks Farnsi,

i will look at that theme you suggested to see if my solution is to be found there.

I do also want to know if it is even possible to group all Admin tools options into a Admin dropdown menu. Can that be done ?

Cheers!
Hein
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Admin toolbar in two rows or "pluginized"
« Reply #3 on: November 08, 2006, 12:28:27 pm »

Here's a method to use a drop down menu. Put the {ADMIN_MENU} tag where you want it in your template.html and use this code in your theme.php file. If $template_gallery_admin_menu is already in your theme.php file, you'll have to replace it with this one and make any mods necessary. This will work with the Classic theme.

Code: [Select]
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT
<td>
<form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option value="#">Select</option>
<!-- BEGIN admin_approval -->
<option value="editpics.php?mode=upload_approval">{UPL_APP_LNK}</option>
<!-- END admin_approval -->
<option value="admin.php">{ADMIN_LNK}</option>
<option value="catmgr.php">{CATEGORIES_LNK}</option>
<option value="albmgr.php{CATL}">{ALBUMS_LNK}</option>
<option value="groupmgr.php">{GROUPS_LNK}</option>
<option value="usermgr.php">{USERS_LNK}</option>
<option value="banning.php">{BAN_LNK}</option>
<option value="reviewcom.php">{COMMENTS_LNK}</option>
<!-- BEGIN log_ecards -->
<option value="db_ecard.php">{DB_ECARD_LNK}</option>
<!-- END log_ecards -->
<option value="picmgr.php">{PICTURES_LNK}</option>
<option value="searchnew.php">{SEARCHNEW_LNK}</option>
<option value="util.php">{UTIL_LNK}</option>
<option value="profile.php?op=edit_profile">{MY_PROF_LNK}</option>
<!-- BEGIN documentation -->
<option value="{DOCUMENTATION_HREF}">{DOCUMENTATION_LNK}</option>
<!-- END documentation -->
</select>
</form>
</td>
EOT;
« Last Edit: November 08, 2006, 12:39:30 pm by Gizmo »
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Admin toolbar in two rows or "pluginized"
« Reply #4 on: November 08, 2006, 01:06:37 pm »

Thanks Gizmo, your mod worked.

It displays all Admin toolbar options into a dropdown menu. I used on my classic vertical filmstrip theme with no problems.
I did insert the words Admin Menu so it becomes clear what the dropdown menu is for.

Go to
Code: [Select]
<form name="jump">
And add Admin Menu behind it.
Code: [Select]
<form name="jump">
Admin Menu

With your mod you can also easily add other options as wel such as a direct link to the plugin manager.
Code: [Select]
<option value="pluginmgr.php">Plugin Manager</option>
Again, thanks for the mod ;) I hope it helps others as wel.

Cheers!
Hein
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Admin toolbar in two rows or "pluginized"
« Reply #5 on: November 08, 2006, 02:31:16 pm »

We're aware that the admin menu may cause issues and become crowded. One possible option for the future is to create an admin backend (similar to the admin backend of Wordpress) that is not bound to the limitations of the frontend design defined by the theme. The dev team is currently discussing this as a potential option for future Coppermine versions.
For me (on my personal page) I decided to come up with a custom theme that takes care of those issues by replacing the table-cell driven grid of the admin menu with a load of div containers, using CSS' float attribute.

Here's a snippet of my custom theme:
themes/mytheme/theme.php:
Code: [Select]
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
<!-- BEGIN admin_approval -->
                                <div class="admin_menu admin_float" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></div>
<!-- END admin_approval -->
                                <div class="admin_menu admin_float"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></div>
<!-- BEGIN log_ecards -->
                                <div class="admin_menu admin_float"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></div>
<!-- END log_ecards -->
                                <div class="admin_menu admin_float"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></div>
                                <div class="admin_menu admin_float"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></div>
<!-- BEGIN documentation -->
                                <div class="admin_menu admin_float"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></div>
<!-- END documentation -->
                </div>
                <div style="clear:left">
                </div>

EOT;
If the dev team should not decide on the admin backend interface for cpg1.5.x, I will probably introduce those changes as a standard into the devel branch instead.

themes/yourtheme/style.css:
Code: [Select]
.admin_float {
        float:left;
        margin-left: 1px;
        margin-right: 1px;
        margin-top: 1px;
        margin-bottom: 1px;
}




[ot]
@Gizmo: could you (as theme designer) review this idea (of replacing at least some table-driven stuff from the core code with corresponding div containers? Thanks.
[/ot]

Joachim
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Admin toolbar in two rows or "pluginized"
« Reply #6 on: November 08, 2006, 04:44:59 pm »

Hi GauGau,

i tried your option as wel and it does offer a other view on the Admin options, which is better then the standard i think.
But personaly i go for the solution Gizmo gave because it does clean up my screen a lot.

Having a admin backend that is not limited by theme design would be even better :)

Thank you both for you input in this question.

Cheers!
Hein
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Admin toolbar in two rows or "pluginized"
« Reply #7 on: November 08, 2006, 07:12:06 pm »

The drawback of having an admin backend is that some pages are used both by the regular user and the admin (e.g. editpics.php, albmgr.php). Where do you suggest putting them? If you move them into the backend (i.e. allow the end user to have a limited "user admin" backend as well), some users might get confused, as they drop out of the expected design of the site.
Subsequently, all scripts would have to be separated (code wise) into "admin-only" pages and "user-only" pages.
Anyway: don't expect the admin backend any time soon, as it will ship with cpg1.5.x (if at all) - there's no scheduled release date yet; who knows when it is going to be released.
So for now you have the choice to either use Gizmo's dropdown admin menu or the one I posted. Drawback of Gizmo's version: I'm not sure how some plugins will interact with it, there might be compatibility issues.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Admin toolbar in two rows or "pluginized"
« Reply #8 on: November 08, 2006, 08:55:51 pm »

GauGau believe me i do not have any doubts that there are drawbacks and i am happy with whatever you guys come up with. I still think CPG is amazingly flexible to use.

I just wish i could code better to better contribute to CPG  :(

The solution Gizmo provided does not hinder any of the plugins so far, should that happen i will look for a solution at that point. Probably a solution like what you suggested.

So again, thank you both!

Cheers!
Hein

« Last Edit: November 09, 2006, 09:53:09 am by Hein »
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Admin toolbar in two rows or "pluginized"
« Reply #9 on: November 08, 2006, 10:45:59 pm »

I'll do some research on different menu methods and see what fits best with CPG. The javascript issue is a real problem and with IE being such a piece of crap to design around sometimes it's just necessary if you want the "cool" features. IE just doesn't conform to web standards like Mozilla does. Using GauGau's method and some other css methods, we should be able to come up with several options since we need to plan for both vertical and horizontal menus.

I'll be back....
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.