Simple Machines Community Forum

General Community => Scripting Help => Topic started by: mickjav on April 21, 2023, 12:36:08 PM

Title: Link mouseover Title Colours
Post by: mickjav on April 21, 2023, 12:36:08 PM
Look at this page:

https://www.databasedreams.co.uk/charts/index.php?action=music;area=artists;sa=home;art=-2089005463

Run mouse over The YouTube Link below her bio, You will see it says

Miley Cyrus YouTube Page
Added By: Dreamweaver

I would like to show the online_color For Dreamweaver, but Google didn't help.

All the best mick
Title: Re: Link mouseover Title Colours
Post by: Diego Andrés on April 21, 2023, 03:21:17 PM
Try https://custom.simplemachines.org/index.php?mod=3067
Title: Re: Link mouseover Title Colours
Post by: mickjav on April 21, 2023, 04:05:55 PM
Thanks, @Diego Andrés But the links I'm trying to change Part of the title on is the Artist's Homepage Links section I've just added.

It's not the link display but part of the mouse over title description I.E. the real name setion below after "
Added By"

<a title="' . $row['description'] . '&#013;Added By: ' . $row['real_name'] . '" href="' . $scripturl . '?action=links;sa=visit&id=' . $row['ID_LINK']  . '" rel="noopener" target="_blank">' . $row['title'] . '</a>
All the best mick

Title: Re: Link mouseover Title Colours
Post by: Kindred on April 21, 2023, 04:17:32 PM
a:hover { color:red; }
Title: Re: Link mouseover Title Colours
Post by: mickjav on April 21, 2023, 04:20:27 PM
Thanks, @Kindred But I only want to change the colour of This part of the title "$row['real_name']"
Title: Re: Link mouseover Title Colours
Post by: Arantor on April 21, 2023, 04:25:24 PM
Don't put the 'Added by' part in the link.
Title: Re: Link mouseover Title Colours
Post by: mickjav on April 21, 2023, 04:29:23 PM
Was thinking I should Be using A variable, still have work to do, if descriptions missing I'll see if I can make that work.

Thanks mick.
Title: Re: Link mouseover Title Colours
Post by: mickjav on April 21, 2023, 04:48:03 PM
Sorted the Description problem but the username colour not so much :(


$link_title = (strlen($row['description'])!=0 ? $row['description'] . '&#013;Added By: ' : 'Added By: ')
            $link_title .= '<p style="color:red";>' .$row['real_name'] . '</p>';       
            //Get Each Row
            $lst .= '<a title="' . $link_title . '" href="' . $scripturl . '?action=links;sa=visit&id=' . $row['ID_LINK']  . '" rel="noopener" target="_blank">' . $row['title'] . '</a>, ';

Edit Undated link_title
$link_title = (strlen($row['description'])!=0 ? $row['description'] . '&#013;Added By: ' : 'Added By: ') . $row['real_name'];
Title: Re: Link mouseover Title Colours
Post by: Diego Andrés on April 22, 2023, 04:18:27 PM
Did you try adding the style to the link itself? <a style=""...
You'd need to split it. And if you want to have the updated group color you should also add it in your query.
Title: Re: Link mouseover Title Colours
Post by: mickjav on April 22, 2023, 06:23:14 PM
Quote from: Diego Andrés on April 22, 2023, 04:18:27 PMDid you try adding the style to the link itself? <a style=""...
You'd need to split it. And if you want to have the updated group color you should also add it in your query.

Thanks, @Diego Andrés Got all the bits I need in query, Am I looking at a CSS solution but need to sort the file and loading looked at your Prefix CSS Load sort of get most of it but not sure about parts.

Mick