Topic Closed
rivo
12 Posts

I wrote menu plugin for page sections with inline editor for selecting different menu layouts and formats

It uses gpEasy globals ($GP_MENU_CLASSES, $GP_MENU_ELEMENTS)

Unfortunately i dont find simplest way to manipulate menu levels, page indexes and sorce menus,
because of that this plugin need some changes in core file include/tools/gpOutput.php

Is possible add this changes in future to gpEasy? :-)

Read readmy file.

rif-Menu_Format_Layouts.zip

Some pictures ( thear is all images zip file)

Edited: 2 years ago#7943

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

Rif, have you considered the idea to assign images/icons to pages in Page Manager?
The Hooks/Filters are available - "MenuPageOptions" and "MenuCommand".

If a page can have an image, a thumbnail and maybe also a font-based icon (e.g. FontAwesome) assigned, we could use them in various ways.

If you want, I check this and post a solution - maybe we can merge the functionalities...

2 years ago#7945

rivo
12 Posts

This is good idea, Juergen :-) ... mayby tis is first check for pageicon. If  You have solution, im verry happy.

I now look a good way to add menu layouts for cheme sections without creating gadget/extra. Idea is ... change menu layout for addirional menues if some is inserted on gpEasy layout manager. 

2 years ago#7946

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

If You have solution, im verry happy.

Check this out: MenuAppearanceData_0_1a.zip

Just quickly coded - It doesn't save anything and has no FontAwesome support yet.
With such additional data stored for menu items we could do cool stuff, even MegaMenues with background images etc. ;-)

 

Screens:

This option …

... will bring up ...

 

I now look a good way to add menu layouts for cheme sections without creating gadget/extra. Idea is ... change menu layout for addirional menues if some is inserted on gpEasy layout manager. 

Looking forward to this!

 

 

2 years ago#7948

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

Hmmm... I'm uncertain where to save the Menu Appearance data, to the current menu array or to $pages->gp_titles? What's better?
In the menu array same pages could have different appearance data in different menus.
In gp_titles it would be more global. Where would you rather acquire such data from?

 

edit:/
It just came to my mind that it would be relatively easy to build a opengraph protocol addon upon my current code. Yummy... :o)

Edited: 2 years ago#7949

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

BTW:

if (array_key_exists('rif-Menu_Format_Layouts', $config['addons'])) { ... }

this will only work when the plugin is installed manually. Once the plugin is released and installed via "Find Plugins" the key will be a random string like "jt0rpx7" so
you will have to iterate through the array like

foreach ($config['addons'] as $addon_key => $addon_info) {
  if ($addon_info['name'] == 'Rif MenuFormat Layout') { ... }
}
2 years ago#7950

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

Ok, here we go: MenuAppearanceData_0_2a.zip

Still not saving the data but now with Font Awesome Icon support.
The latter will only be available if the FontAwesome Plugin is installed (a notice with installation link will be shown in case it's absent)

In fact the FontAwseome Icon Selection dialog was a lot more work than the rest :-)

Screen:


 

2 years ago#7951

feniweb
297 Posts

hello rivo

The plugin siet very complicated from a host of settings.
The problem when you can insert the above sections, it is always only apply for one side. Is that really thought so?

2 years ago#7952

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

Here is MenuAppearanceData_0_3a.zip

For now I decided to store the data in "pagedata.php" which resides in $addonPathData.
You can retrieve it e.g. like…

global $config, $dataDir;

$current_page_index = 'a';
$icon_url = '';

foreach ($config['addons'] as $addon_key => $addon_info) {
  if ($addon_info['name'] == 'MenuAppearanceData') {
    $pagedata_file = $dataDir . '/data/_addondata/' . $addon_key . '/pagedata.php';
    if (file_exists($pagedata_file)) {
      include $pagedata_file;
      if (is_array($pagedata) && isset($pagedata[$current_page_index])) {
        // use the data e.g. like...
        $icon_url = urldecode($pagedata[$current_page_index]['icon_url']);
      }
    }
  }
}
Edited: 2 years ago#7954

juergen
1.1K Posts
41.8K Downloads
17 Plugins
design, web development & visual effects

Finally MenuAppearanceData_0_4a.zip

This adds a very basic proof-of-concept menu rendering.
It stores and laods /data/_addondata/MenuAppearanceData/menu.css where it adds FontAwesome Icons, Colors and custom styles to menus using CSS Attribute Selectors like li a[title='Home']

It neither uses the defined images nor will it apply the custom ID's or classNames (the latter is IMO not possible without a gpEasy Menu Rendering Hook).
Due to the simple css selectors used it will affect any menu/link that shares the li a structure where a contains the page label as title attribute.
Therefore it's not meant for production use, it's just - as said - merely a proof-of-concept. And it's alpha! Hope it's a useful contribution.

Important!: @Rif and anyone testing rif-Menu_Format_Layouts plugin - since this plugin's css will collide with this addon's menu rendering methods, you might want to uncomment line 378 in MenuAppearanceData.php to prevent loading menu.css. Or simply do not install this ver 0.4a.

I'm looking forward to see next version of "rif-Menu_Format_Layouts". The menu sections are already a extremely valuable addition. Great work!

2 years ago#7957

rivo
12 Posts

Sorry i was verry busy ... but i pore over  this all reads in next week. (ohh my  english english :)

I modiffied another plugin ... multilang manager by josh with flags display

Edited: 2 years ago#7991

Topic Closed

 

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): Konzeption, Planung und Erstellung Ihres Internet-Auftritts, Betreuung und Aktualisierung Ihrer Website, Programmierun...

Find out more about our Provider Spotlight

Log In

  Register