Ultimate Menu

Started by live627, October 05, 2014, 12:45:11 PM

Previous topic - Next topic

alex_cipher

Thank you!

So I have to append the index.css with either icons from the sprite or with my own. :)

Panoulis64

Suddenly, I started having problems with the forum, with UltimateMenu.
(It worked properly with two submenus)
Initially I had like this with the ultimate-menu_2-0-1 version
index.php? action = admin; area = umen; eff6bab = e4979542d84845c782cc92d86d14dfd4
  /home/triglian/public_html/Sources/Class-UltimateMenu.php (Line 401) Retrospective Information

Error type: Unspecified
Error message [Select]
8: Undefined index: replayed_menu_buttons


I uninstalled and installed the ultimate-menu_2-0-2 version, because I am in smf 2.1.1
I'm getting an error now
index.php? action = admin; area = umen
  /home/triglian/public_html/Sources/Class-UltimateMenu.php (Line 401) Retrospective Information

Error type: Unspecified
Error message [Select]
8: Undefined index: replayed_menu_buttons


and when I go to the admin to define my options, I get this error by clicking the admin link's ultimate-menu
Fatal error: Uncaught TypeError: Argument 1 passed to UltimateMenu::flatten() must be of the type array, null given, called in /home/triglian/public_html/Sources/Class-UltimateMenu.php on line 401 and defined in /home/triglian/public_html/Sources/Class-UltimateMenu.php:404 Stack trace: #0 /home/triglian/public_html/Sources/Class-UltimateMenu.php(401): UltimateMenu->flatten(NULL) #1 /home/triglian/public_html/Sources/ManageUltimateMenu.php(83): UltimateMenu->getButtonNames() #2 /home/triglian/public_html/Sources/ManageUltimateMenu.php(76): ManageUltimateMenu->listButtons() #3 /home/triglian/public_html/Sources/ManageUltimateMenu.php(43): ManageUltimateMenu->ManageMenu() #4 /home/triglian/public_html/Sources/Subs-UltimateMenu.php(96): ManageUltimateMenu->__construct('') #5 /home/triglian/public_html/Sources/Admin.php(499): {closure}() #6 /home/triglian/public_html/index.php(187): AdminMain() #7 {main} thrown in /home/triglian/public_html/Sources/Class-UltimateMenu.php on line 404

What could be wrong?

Because, he had never caused me problems before.
Thanks.

live627

Are those the only errors you get?

The menu cache may have gotten corrupt. Run this query to clear it
   DELETE FROM smf_settings
   WHERE variable = 'um_menu'
      OR variable = 'um_count'
      OR variable LIKE 'um_button%'

Can you show the contents of smf_um_menu? (Database table in phpMyAdmin)

Panoulis64

I uninstalled the application, so as not to constantly receive errors.
I also looked at smf_um_menu I do not think it exists.
The code you wrote, I have to copy it and in which file. I will do it from ftp

Doug Heffernan

Quote from: Panoulis64 on April 03, 2022, 12:05:12 AMI uninstalled the application, so as not to constantly receive errors.
I also looked at smf_um_menu I do not think it exists.
The code you wrote, I have to copy it and in which file. I will do it from ftp

That code is a sql query and you can run it at the Sql box at your phpmyadmin.

Panoulis64

Thanks for the explanation, but I do not know how to do that. I will talk to the server administrator to do this as soon as possible.

Doug Heffernan

Quote from: Panoulis64 on April 03, 2022, 09:26:16 AMThanks for the explanation, but I do not know how to do that. I will talk to the server administrator to do this as soon as possible.

It is very easy. Copy the query, then go to phpmyadmin, select the database that you have used to install your smf forum, click the SQL tab, paste the query and run it.

Panoulis64

I did it and nothing changed.
Finally we turned the server back 48 hours and the problem was solved.
Thanks for your time.

Doug Heffernan

Quote from: Panoulis64 on April 03, 2022, 10:31:08 AMI did it and nothing changed.
Finally we turned the server back 48 hours and the problem was solved.
Thanks for your time.

No problem :)



Shades.

SMF 2.1.1
Ultimate Menu 2.0.2

I found a little bug I think! When creating a new menu button and setting the permissions where only admin should be able to view the button by unselecting all member groups then click save it defaults back to the Regular Member group.

To re-create this:

1. Create a button
2. Unselect all membergroups in the permissions for that button
3. Make the button Active
4. Click save then
5. Go back into edit the button

and you will see under "Permissions" the Regular membergroup is selected.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

mickjav

I want to be able to create a Admin only link but the option of administrator is not in the list of groups. If I try and create a link without any group options I get the following message

You cannot view this attachment.

mickjav

As A Thought would it be possible to add a option so it could call a function like "smfgallery_manage")

Which is part of
show' => allowedTo('smfgallery_manage'),
I've only just started with php so don't know if it would work but do understand the script would need to be loaded that contains the function for it to work.

All the best mick

live627

The column slug in smf_um_menu needs a default value. Either a blank string or null will work.

Raffoz

Quote from: live627 on March 21, 2022, 01:27:29 AMthe fallback for the icons is the question mark. The icon set is a sprite defined by .main_icons in the CSS.

Each button defined by Ultimate Menu is enumerated and is prefixed with um_button_. To add your own icon, append the following code to index.css
.main_icons.um_button_1::before {
background: url(../images/my-image) no-repeat;
}
the icon should be 16x16 pixels

Tks @live627, I added icons with your guide 🤓

But 16x16 appears super little compared to others.
Is there another way or trick to do it?
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

jsx

@live627

After removing the button, the following errors appeared:




user58389239

Thank you for making this Plugin work for 2.1.X! Quick question: Is there a way to backup/restore the menu items I added with this plugin? I'm installing this plugin on Dev, and I'd like to add the same menu items to Production once we upgrade to 2.1.3. Since I don't have the plugin on Prod, not sure if there is an easy/simple way to backup and restore the "list"?

Diego Andrés

Probably backing up the um_menu table in your db.

SMF Tricks - Free & Premium Responsive Themes for SMF.

user58389239

I wanted to call out this post I just created in the 2.1 support, there is a claim in there that the error is because of Ultimate Menu. Does that seem possible? If so, any suggestions for a fix without removing UM? We rely pretty heavily on it so I'm not crazy about the idea of removing it:

https://www.simplemachines.org/community/index.php?topic=586017.0

glasschalice

Quote from: live627 on March 21, 2022, 01:27:29 AMthe fallback for the icons is the question mark. The icon set is a sprite defined by .main_icons in the CSS.

Each button defined by Ultimate Menu is enumerated and is prefixed with um_button_. To add your own icon, append the following code to index.css.main_icons.um_button_1::before {
background: url(../images/my-image) no-repeat;
}
the icon should be 16x16 pixels

Could you help me out with this since I'm not very familiar with coding?  What folder is index.css in?  I found them in each individual themes css folder but that would mean this would need to be changed for each theme?   And is "my-image" above the name of the actual image file I'd want the question mark changed to?  TIA

Diego Andrés

It only needs to be changed for the theme you are currently using.
Themes/{your_theme}/css/index.css.

And yes, you need to use the name of your file. Could also target the icons folder so that it's along the rest of the icons.
.main_icons.um_button_1::before {
background: url(../images/icons/newicon.png) no-repeat;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: