News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Adding titles to the navigation links

Started by kmlkmljkl, August 06, 2016, 07:23:54 AM

Previous topic - Next topic

kmlkmljkl

Like this:


I won't really need an actual mod for it, just some instructions would be nice.
Thanks


kmlkmljkl

thanks for the link, but it doesn't seem to talk about tooltips

Grammy

I've not seen any mods that do that here, but you can always achieve it with CSS.  Here's an example of what can be done:

How to create tooltips with CSS

(You'd have to echo a div class and span class for each button.)

Kindred

In the subs.php array, add the title attribute to the href action of the menu object
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Grammy

Quote from: Kindred on August 06, 2016, 10:45:05 PM
In the subs.php array, add the title attribute to the href action of the menu object


And that'll create a tooltip?  Wow!  I'm glad I hang out here; I learn a lot lurking around you guys.    :)

kmlkmljkl

Quote from: Kindred on August 06, 2016, 10:45:05 PM
In the subs.php array, add the title attribute to the href action of the menu object

thanks! this works when I add a link myself, like this:
'href' => 'http://website.com/page" title="Tooltip"'
but I can't figure out what to do with the scripturl ones
'href' => $scripturl
anything I do to that just breaks the entire forum...

Guess I'll un-solve the thread then :p

Kindred

'href' => $scripturl, 'action=something', 'title="Tooltip"',

I think that should work
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kmlkmljkl

Quote from: Kindred on August 07, 2016, 09:10:32 AM
'href' => $scripturl, 'action=something', 'title="Tooltip"',

I think that should work

Nope, doesn't work.
Though I could probably replace all the ?action links with actual links and then do it like what I posted, but I don't know if that's a good idea or not.

Arantor

It's not a good idea, no.

'item' => $scripturl . '?action=whatever" title="my title',

kmlkmljkl

Thanks man, that works.
Doesn't work for the home link though, but I guess the icon for it () is obvious enough.

Arantor

'href' => $scripturl . '" title="Home',


Advertisement: