TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 10:23:49 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 125
  • Total: 125

Tooltip al blocco "topic recenti" di TP

Started by raid, April 13, 2008, 12:22:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raid

l'ho cercato per molto ma non mai avuto la voglia di trovarlo  ;)

ho sempre voluto abilitare i tooltip alla passaggio del mouse sopra i topic nel blocco di topic recenti, che mostrasse il titolo completo del topic, per sapere cosa si sta andando a vedere bene, perchè a volte capitano titoli simili e non si sa mai, in somma la volevo questa cosa  :knuppel2:

ed eccola:
nel file  TPortalBlocks.template.php
search:
// Output the topics
$counter=1; $cmax=count($what);
echo '
<div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';
foreach($what as $w){
echo '
<div class="smalltext"><a href="'.$w['href'].'">'.$w['short_subject'].'</a></div>
<div class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';



replace with:
// Output the topics
$counter=1; $cmax=count($what);
echo '
<div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';
foreach($what as $w){
echo '
<div class="smalltext"><a href="'.$w['href'].'" title="'.$w['subject'].'">'.$w['short_subject'].'</a></div>
<div class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';


ed ora avremo i tooltip attivi nel blocco dei recent topics.

In pratica ho aggiunto questo:
title="'.$w['subject'].'"

spero sia utile ad altri :)

EDIT: sono ricapitato su questo topic e aggiungo che questo valeva per tp 0.9.8 credo, ora in tp rc1 il recent box risiede in tpsubs.template.php e in futuro forse altrove, è ovvio che il nome del file non è fisso, ma le funzioni più o meno si, questi codici usateli con cautela
SMF 2.0 + TP RC2