Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Decrizione topic al passaggio del mouse.
Dean Moriarty
Inviato il: Mar 14 2008, 12:45 PM
Quote Post


Advanced Member
***

Gruppo: Members
Messaggi: 174
Utente Nr.: 730
Iscritto il: 25-May 06



In altri forum ho visto che è possibile semplicemente puntando il cursore del mouse sul titolo di una discusisone, avere l'anteprima di quello che c'è scritto nel TIP, ovvero la finestrella gialla del cursore.

Qualcuno sa come fare? Staff che dici, si può fare?
PMEmail Poster
Top
Dean Moriarty
Inviato il: Mar 15 2008, 01:55 AM
Quote Post


Advanced Member
***

Gruppo: Members
Messaggi: 174
Utente Nr.: 730
Iscritto il: 25-May 06



Staff ho trovato la modifica su invisionize, questi è il link dove scaricare il file txt che spiega tutto: http://mods.invisionize.com/db/index.php/f/1250

Ti inserisco ad ogni modo il codice

CODE
/---------------------------------------------------/
// Show First 300 Characters of The Topic
// Written by AlexW ([email protected])
//
// When a person hovers over the topic url
// it will show 1st 300 charecters of the post
/---------------------------------------------------/

/-----------------------------------------/
/Step 1: Open sources/Forums.php and find
/-----------------------------------------/

$topic['start_date'] = $std->get_date( $topic['start_date'], 'LONG' );

 -----------------------------------------
 add under:
 -----------------------------------------

$DB->query("SELECT post FROM ibf_posts WHERE topic_id={$topic['tid']} ORDER BY pid ASC LIMIT 1");
$grab = $DB->fetch_row();
$text = $grab['post'];

$text = preg_replace('/<a href=\'(.*?)\'>(.*?)<\/a>/', '', $text);
$text = preg_replace('/<img src=\'(.*?)\'>/', '', $text);
$text = preg_replace('/<img src=\'(.*?)\' \/>/', '', $text);
$text = preg_replace('/<u>(.*?)<\/u>/', '\\1', $text);
$text = preg_replace('/<i>(.*?)<\/i>/', '\\1', $text);
$text = preg_replace('/<b>(.*?)<\/b>/', '\\1', $text);

$maxTextLenght=300;
$aspace=" ";
if(strlen($text) > $maxTextLenght ) {
$text = substr(trim($text),0,$maxTextLenght);
$text = substr($text,0,strlen($text)-strpos(strrev($text),$aspace));
$text = $text.'...';
}

 -----------------------------------------
 then find:
 -----------------------------------------

return $p_end . $this->html->RenderRow( $topic );

 -----------------------------------------
 replace that with:
 -----------------------------------------

return $p_end . $this->html->RenderRow( $topic, $text );

/-----------------------------------------/
/Close sources/Forums.php
/-----------------------------------------/

/-----------------------------------------/
/Step 2: Open Skin/s*/skin_forum.php and find
/-----------------------------------------/

<a href="{$ibforums->base_url}showtopic={$data['tid']}" title="{$ibforums->lang['topic_started_on']} {$data['start_date']}">{$data['title']}</a>

 -----------------------------------------
 replace that with:
 -----------------------------------------

<a href="{$ibforums->base_url}showtopic={$data['tid']}" title="{$text}">{$data['title']}</a>

 -----------------------------------------
 then find:
 -----------------------------------------

function RenderRow($data) {

 -----------------------------------------
 replace that with:
 -----------------------------------------

function RenderRow($data, $text) {


/-----------------------------------------/
/Close Skin/s*/skin_forum.php.php
/-----------------------------------------/

/-----------------------------------------/
/ALL DONE !!
/-----------------------------------------/
PMEmail Poster
Top
Utenti totali che stanno leggendo la discussione: 1 (1 Visitatori e 0 Utenti Anonimi)
Gli utenti registrati sono 0 :

Topic Options Reply to this topic Fast ReplyStart new topicStart Poll


 

hosting powered by Tech-Hosting