Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Classic with drop down menus  (Read 16839 times)

0 Members and 1 Guest are viewing this topic.

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Classic with drop down menus
« on: October 08, 2009, 03:06:31 am »

Here I release a theme developed from the classic theme with the only changes those required to make the drop down menus for admin_menu, sys_menu, and sub_menu.

This is done with all the released SVN code.  Only theme files are changed.

The one thing I didn't get working are the words for the headings in other languages.  Those would require an addition to the language files.
If the development team is interested could we get the words added to the language files?

Example can be seen here:
http://gfyoung.homeip.net/cpg15x/index.php?theme=classic_w_drop
Official cpg1.5.x Demo

Attached is the theme files zip.
You can also download it here: https://sourceforge.net/projects/coppermine/files/Themes/1.5.x/cpg1.5.x_theme_classic-w-drop_2.1.zip/download

There  are several other drop down changes I have made in another theme with drop down menus in more places but they at present require some changes to the SVN code.  This is still WIP while I try to get it to work with SVN code.
http://gfyoung.homeip.net/cpg15x/index.php?theme=New15b

Hope you find this helpful and interesting,
Gene

« Last Edit: November 08, 2010, 09:26:52 am by Αndré »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Classic with drop down menus
« Reply #1 on: October 08, 2009, 12:13:34 pm »

The one thing I didn't get working are the words for the headings in other languages.  Those would require an addition to the language files.
The only non translated string is 'Media/File settings' (see attachment).

Why did you copy all those icons to the theme? As far I can see (almost) all of them will never be used? You can remove all standard icons if you remove
Code: [Select]
define('THEME_HAS_MENU_ICONS', 16);in your theme.


There are some issues when plugins add some buttons to the admin menu (see attachment). But that's maybe my fault (I'm not sure how I added these buttons to the menu. E.g. it works for the forum manager).
« Last Edit: October 08, 2009, 12:22:27 pm by Αndré »
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus
« Reply #2 on: October 08, 2009, 03:28:27 pm »

The only non translated string is 'Media/File settings' (see attachment).
Actually the non translated are:
The title for the sys_menu which I labeled as User.  There is a $lang_gallery_admin_menu['users_lnk'] = 'Users';
But I haven't figured out of to get it recognized in the $template_sys_menu template.

The title for the sub_menu which I labeled as Albums.  Like the sub_menu label there are some translations but I don't know how to get them to work.

I addition "Gallery" and the one you pointed out "Media/File setting".  I am open to other suggestions for that as well.

Quote
Why did you copy all those icons to the theme? As far I can see (almost) all of them will never be used? You can remove all standard icons if you remove
Code: [Select]
define('THEME_HAS_MENU_ICONS', 16);in your theme.
I meant to do that and had already removed the define('THEME_HAS_MENU_ICONS', 16); so the standard Icons are being used except those that were in the Albums menu.  I fixed the CSS to use the standard ones for those as well and will post latter.

Quote
There are some issues when plugins add some buttons to the admin menu (see attachment). But that's maybe my fault (I'm not sure how I added these buttons to the menu. E.g. it works for the forum manager).
I will look into that today and get back today.

Thanks for the comments,
Gene
Logged

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: Classic with drop down menus
« Reply #3 on: October 08, 2009, 03:31:21 pm »

The drop down on my site is difficult to read, b/c the background isn't rendered.
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus
« Reply #4 on: October 08, 2009, 03:54:11 pm »

You appear to be missing the button images that should be in the themes/class_w_drop/images directory.
Like:
   Sq_button_drop_up.png
   Sq_button_drop_down.png
   menu_dropa_0_wide.png
   menu_drop_0.gif
  etc

Make sure you unzipped the theme correctly.

Gene
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus
« Reply #5 on: October 08, 2009, 04:25:55 pm »

There are some issues when plugins add some buttons to the admin menu (see attachment). But that's maybe my fault (I'm not sure how I added these buttons to the menu. E.g. it works for the forum manager).

I can't find the 1.5.x version of the forum manager. Are you using the 1.4 version or an unrelease 1.5 version.
If you can give me a pointer to it I can check to see why it worked and others didn't?

Thanks in advance,
Gene
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Classic with drop down menus
« Reply #6 on: October 08, 2009, 05:52:13 pm »

The forum plugin is not being mentioned in a thread of it's own nor the plugins page yet. The only way you can get it is by checking out the subversion repository for the forum plugin
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus
« Reply #7 on: October 09, 2009, 12:45:08 am »

I can't find the 1.5.x version of the forum manager. Are you using the 1.4 version or an unrelease 1.5 version.
If you can give me a pointer to it I can check to see why it worked and others didn't?

Thanks in advance,
Gene

@Joachim thanks for the pointer.  I down loaded it and tried to get installed.  It has problems but that is not the purpose of this thread so I will leave that for another thread.

@Αndré What I did find is that forum install is using   "$button = template_extract_block($new_emplate, $before);" to extract the formatting used for the "documentation button" and then replacing the values with those for the forum.
It then adds the button to the admin_menu below the "document button".
It does the same thing using the "Home" button on the sys_menu.

While this appears to work it brings up the issue that the Icon used is the one for the button it copied.
Note this part is not just a drop down menu issue but also a standard config issue.  Note the reuse of the documentation Icon in the classic version.


It looks like some plugins (like bbcControl) are using this style to hook in to admin menu.
http://gfyoung.homeip.net/cpg15x/docs/en/dev_plugin_api.htm#plugin_api_tutorial_button_admin_menu
Code: [Select]
$thisplugin->add_filter('admin_menu','coffee_maker_config_button');

function coffee_maker_bar_config_button($admin_menu){
    global $lang_plugin_coffee_maker, $CONFIG, $coffee_maker_icon_array;
    if ($CONFIG['plugin_coffee_maker_config_link'] == 1) {
    $new_button = '<div class="admin_menu admin_float"><a href="index.php?file=coffee_maker/index&action=configure"';
    $new_button .= ' title="' . $lang_plugin_coffee_maker['config'] . '">';
    $new_button .= $coffee_maker_icon_array['config_menu'] . $lang_plugin_coffee_maker['config'] . '</a></div>';
    $look_for = '<!-- END export -->'; // This is where you determine the place in the admin menu
    $admin_menu = str_replace($look_for, $look_for . $new_button, $admin_menu);
    }
    return $admin_menu;
}

Some are doing their own thing like the forum plugin

I'm not sure if any are using this suggested coding or if it applies?
http://gfyoung.homeip.net/cpg15x/docs/en/dev_plugin_api.htm#plugin_api_tutorial_button_overall_menu

Suggestions on how to proceed are certainly welcomed,
Gene

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Classic with drop down menus
« Reply #8 on: October 09, 2009, 07:24:37 am »

Hm. Plugin writing and theming are two different animals. The actions and filters that are available inside the plugin API can of course be accessed by non-plugin code, but I'm not convinced that that's a good idea.

Joachim
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus
« Reply #9 on: October 09, 2009, 02:43:19 pm »

Hm. Plugin writing and theming are two different animals. The actions and filters that are available inside the plugin API can of course be accessed by non-plugin code, but I'm not convinced that that's a good idea.

Joachim

I know they are different.   My points were:
Code: [Select]
$thisplugin->add_filter('sys_menu','coffee_maker_sys_button');

function coffee_maker_bar_sys_button($menu) {
    global $lang_plugin_coffee_maker, $template_sys_menu_spacer, $CONFIG;
    if ($CONFIG['plugin_coffee_maker_how'] == 4) {
coffee_maker_bar_language(); // Call the function that populates the language variable
        $new_button = array();
        $new_button[0][0] = $lang_plugin_coffee_maker['picinfo_heading'];
        $new_button[0][1] = $lang_plugin_coffee_maker['menu'];
        $new_button[0][2] = 'index.php?file=coffee_maker/index';
        $new_button[0][3] = 'coffee_maker';
        $new_button[0][4] = $template_sys_menu_spacer;
        $new_button[0][5] = 'rel="nofollow"';
        array_splice($menu, count($menu)-1, 0, $new_button);
    }
    return $menu;
}

  • Would give a standard way.

One suggestion I would make on the above is to also allow the passing of Icon information.
Gene
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus
« Reply #10 on: October 27, 2009, 02:29:41 pm »

The drop down on my site is difficult to read, b/c the background isn't rendered.

I finally found that this is an issue with the length of filenames, don't know were the restriction is.
You can fix by looking for and changing the names of the .png .jpg and .gif used in the theme to something shorter.
I.e. strip the menu_ and menu_image_ from the names of the images AND the style.css.

I will try to update the themes files asap.

Thanks for reporting...hope you get it working.

Gene

Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Classic with drop down menus
« Reply #11 on: November 09, 2009, 08:13:51 am »

Hello Gene-2008,

great work, please go on!

Two things you could improve:

1. You link to the wrong coppermine logo.
In template.html, change
Code: [Select]
<img id="logo" src="themes/classic/images/coppermine-logo.png" alt="Logo" />to
Code: [Select]
<img id="logo" src="themes/classic_w_drop/images/coppermine-logo.png" alt="Logo" />
2. Preload your menu background images to improve user experience.
I recommend to not use Javascript, because if you did, preloading would start after the last thumb has been loaded (which is too late). Instead, you could insert in template.html directly after the body-tag this code:
Code: [Select]
<img src="themes/classic_w_drop/images/menu_drop_0.gif" width="0" height="0" style="padding:0px;margin:0px;border-width:0px;outline-width:0px;" alt="place holder" />
<img src="themes/classic_w_drop/images/menu_drop_1_grey.png" width="0" height="0" style="padding:0px;margin:0px;border-width:0px;outline-width:0px;" alt="place holder" />
<img src="themes/classic_w_drop/images/menu_dropa_0_wide.png" width="0" height="0" style="padding:0px;margin:0px;border-width:0px;outline-width:0px;" alt="place holder" />
<img src="themes/classic_w_drop/images/menu_dropba_1_grey_wide.png" width="0" height="0" style="padding:0px;margin:0px;border-width:0px;outline-width:0px;" alt="place holder" />

This way, the background images of the menu will be the first images of the website to be cached and will be available immediately, most likely before the user is able to point at the menu bar.

regards
Timo
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Classic with drop down menus
« Reply #12 on: November 09, 2009, 08:28:22 am »

Another note:
Your menu doesn't work in IE<=6 at all, and it does not provide any other way to navigate there either. This could probably easily improved by using some CSS. It's not neccessary to have the dropdown functionality in IE6, but I think the menu should be completely visible from the start, moving the categories down a bit to not overlap them. This way, old fashioned users could at least use the site.
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Classic with drop down menus for 1.5.x
« Reply #13 on: November 28, 2009, 09:02:57 pm »

Another note:
Your menu doesn't work in IE<=6 at all, and it does not provide any other way to navigate there either.

Ok well I have finally gotten this to work with IE6.

I now works (or should  :D ) with IE 6,7,8.  And FF.

I also made the changes suggested above.

Please let me know if you see any issues...thanks in advance,
Gene
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Classic with drop down menus
« Reply #14 on: November 29, 2009, 06:17:40 pm »

« Last Edit: November 29, 2009, 08:26:14 pm by Joachim Müller »
Logged

internetking

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Classic with drop down menus
« Reply #15 on: November 08, 2010, 12:51:33 am »

there seem a bug with one of the memu....  it is on http://photos.hulds.com

see attached pic for the results....


Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Classic with drop down menus
« Reply #16 on: November 08, 2010, 09:10:11 am »

The export feature has been dropped, so the theme needs to be adjusted accordingly.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Classic with drop down menus
« Reply #17 on: November 08, 2010, 09:19:26 am »

Attached version 2.1 to initial post. Will upload to the demo and sourceforge soon.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Classic with drop down menus
« Reply #18 on: November 08, 2010, 09:27:16 am »

Will upload to the demo and sourceforge soon.
Done.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 22 queries.