cheekybuddha
AWF VIP
- Local time
- Today, 17:21
- Joined
- Jul 21, 2014
- Messages
- 2,766
Perhaps you are using SimpleMachines?
if ($smcFunc['db_affected_rows']() != 0)
{
//Loop Through Links Adding them to the list
while ($row = $smcFunc['db_fetch_assoc']($dbquery))
{
$arr_title = [];
$link_desc = $row['description'];
if (strlen($row['description']) != 0) $arr_title[] = $link_desc;
$link_added_by = $row['real_name'];
$arr_title[] = 'Added By: '.$link_added_by;
$link_hits = 'Visits: '.number_format($row['hits']);
$arr_title[] = $link_hits;
$link_title = implode('
', $arr_title);
//Get Each Row
$lst .= ' <span class="dw-link-wrapper">'.PHP_EOL.
' <span class="dw-tooltip">'.PHP_EOL.
(strlen($link_desc) != 0 ? ' '.$link_desc.PHP_EOL : '').
' Added By: <span style="color:#0000FF;">'.$link_added_by.'</span>'.PHP_EOL.
' '.$link_hits.PHP_EOL.
' </span>'.PHP_EOL.
' <a '.
'title="'.$link_title.'" '.
'href="'.$scripturl.'?action=links;sa=visit&id='.$row['ID_LINK'].'" '.
'rel="noopener" '.
'target="_blank"'.
'>'.
$row['title'].
'</a>'.PHP_EOL.
' </span>, '.PHP_EOL;
}
If ($lst != '')
$lst = $txt['Music_artist_sites_list'] . ' ' . rtrim($lst, ', '.PHP_EOL);
}
$smcFunc['db_free_result']($dbquery);
if ($smcFunc['db_affected_rows']() != 0)
{
//Loop Through Links Adding them to the list
while ($row = $smcFunc['db_fetch_assoc']($dbquery))
{
$arr_title = [];
$link_desc = $row['description'];
if (strlen($row['description']) != 0) $arr_title[] = $link_desc;
$link_added_by = $row['real_name'];
$arr_title[] = 'Added By: '.$link_added_by;
$link_hits = 'Visits: '.number_format($row['hits']);
$arr_title[] = $link_hits;
$link_title = implode('
', $arr_title);
$link_color = $row['online_color'];
//Get Each Row
$lst .= ' <span class="dw-link-wrapper">'.PHP_EOL.
' <span class="dw-tooltip">'.PHP_EOL.
(strlen($link_desc) != 0 ? ' '.$link_desc.PHP_EOL : '').
' Added By: <span style="color:'. $link_color .';">'.$link_added_by.'</span>'.PHP_EOL.
' '.$link_hits.PHP_EOL.
' </span>'.PHP_EOL.
' <a '.
//'title="'.$link_title.'" '.
'href="'.$scripturl.'?action=links;sa=visit&id='.$row['ID_LINK'].'" '.
'rel="noopener" '.
'target="_blank"'.
'>'.
$row['title'].
'</a>'.PHP_EOL.
' </span>, '.PHP_EOL;
}
If ($lst != '')
$lst = $txt['Music_artist_sites_list'] . ' ' . rtrim($lst, ', '.PHP_EOL);
}
$smcFunc['db_free_result']($dbquery);
.dw-tooltip {
visibility: hidden;
opacity: 0;
position: absolute;
color: black;
background: #93f09e;
padding: 0.3rem 2rem;
border-radius: 0.3rem;
top: calc(0.5rem + 100%);
/* bottom: calc(0.5rem + 100%); */
right: 50%;
transform: translateX(85%);
}
You missed the Top property declaration in the CSS (to replace the commented out Bottom property)Getting there Can't seem to move it down enough, as it's covering part of link.
Yes, you can style the span - I see you have setAlso, have been looking at making the text a little small But correct me if I'm wrong, I can use the span to resize The Text?
font-size:11px;
It should get wider with the text it containsAlso, If there is a Description, Can I change the width of the box?
// ...
$link_desc = $row['description'];
$link_desc = str_replace(' ', ' ', $link_desc);
// ...
// ...
$lst .= ' <span class="dw-link-wrapper">'.PHP_EOL.
' <span class="dw-tooltip">'.PHP_EOL.
(strlen($link_desc) != 0 ? ' '.$link_desc.PHP_EOL : '').
' Added By: <span style="color:'. $link_color .';">'.$link_added_by.'</span>'.PHP_EOL.
' '.$link_hits.PHP_EOL.
' </span>'.PHP_EOL.
' <a '.
// ...
// ...
$lst .= ' <span class="dw-link-wrapper">'.PHP_EOL.
' <span class="dw-tooltip">'.PHP_EOL.
(strlen($link_desc) != 0 ? ' '.$link_desc.'<br>'.PHP_EOL : '').
' Added By: <span style="color:'. $link_color .';">'.$link_added_by.'</span><br>'.PHP_EOL.
' '.$link_hits.PHP_EOL.
' </span>'.PHP_EOL.
' <a '.
// ...