TSmenu

Attualmente in www.tuttosoft.it è stata caricata la versione del nuke 7.9 TS sono presenti la bellezza di 78 categorie e 713 downloads       Utenti registrati:  13489    Admin del sito sono: 1  Ultimi 5 Utenti registrati :    homebrew    kevyn_morgan    abramax    208ferro    Pascuzzu

Fai Una Donazione

Siti Amici

©

Pubblicità

Ts Tags Ver 1.0
No Spam Attack 3.1 Donazione LGNuke 2.0.0RC Directory Trucchi Nuke Matteoiamma Generatore Numeri casuale Banner Ubuntu 9.10 JQooBe Staff del sito PageRank Ts Menu 5.3 Temi PhpBB Karmik koala Pilia Federico IP Remote Changer Fonts Nukelive 1.0 Sottoscriviti PageRank 5 vea83inc Proxy su Linux Ubuntu Moduli PR5 Mascherare Mac-Address con Linux Ts Contacts Alexthemaster Cambiare Ip da remoto Slaybook 1.2.1 Misura il PageRank Tuttosoft Temi Phpnuke Queen_live78 Ts Gallery Sitemap Blocchi Addons Mappa sito Forums Php Nuke Numbers 1.0 Serpe76 Installare Lamp su Ubuntu Linux Notepad ++ Weblord Ranks Forum Nuke Sentinel 2.6.01 Indicizzazione del tuo sito Oracle su Linux Forum phbb3 V 3.0.4 Php Nuke Splatt Chat 0.8.29 Virit Antivirus Giovannib Banners Configurare la scheda di rete da terminale con Ubuntu Più comandi in uno unico con Linux da terminale Avatars Nuke OpenId 0.3 new Installare Cairo-Dock su Ubuntu Linux a 64bit Gnu License

Tuttosoft.it Php Nuke Italian Community: Forums

TUTTOSOFT :: Leggi il Topic - Come suddividere le news su due colonne Benvenuti nel Forum di tuttosoft.it , per qualsiasi problema postate pure nel forum vi verrà data una risposta entro le 24 ore dal momento del Post. Buona Navigazione
 FAQFAQ   CercaCerca   Gruppi utentiGruppi utenti   ProfiloProfilo   Messaggi PrivatiMessaggi Privati   LoginLogin 

Come suddividere le news su due colonne

 
Nuovo Topic   Rispondi    Indice del forum -> Moduli, Blocchi e Addons
Precedente :: Successivo  
Autore Messaggio
matteoiamma
Moderatore
Moderatore


Registrato: May 17, 2008
Messaggi: 531
Località: Torremaggiore(Foggia)

MessaggioInviato: Gio Gen 21, 2010 6:17 pm    Oggetto: Come suddividere le news su due colonne Rispondi citando

Molti di voi avranno desiderato di suddividere le news del propio nuke in una o più colonne.

Io l'ho fatto e vi spiegherò come:


1 ) Aprite il file modules/News/index.php.

Trovate:

Codice:
function theindex($new_topic="0") {
    global $db, $storyhome, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $sitename, $user_news, $userinfo;
    if (is_user($user)) { getusrinfo($user); }
    if ($multilingual == 1) {
   $querylang = "AND (alanguage='$currentlang' OR alanguage='')";
    } else {
   $querylang = "";
    }
    include("header.php");
    automated_news();
    if (isset($new_topic)) {
    $new_topic = intval($new_topic);
    } else {
    $new_topic == 0;
    }
    if (isset($userinfo['storynum']) AND $user_news == 1) {
   $storynum = $userinfo['storynum'];
    } else {
   $storynum = $storyhome;
    }
    if ($new_topic == 0) {
   $qdb = "WHERE (ihome='0' OR catid='0')";
   $home_msg = "";
    } else {
   $qdb = "WHERE topic='$new_topic'";
   $result_a = $db->sql_query("SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'");
   $row_a = $db->sql_fetchrow($result_a);   
   $numrows_a = $db->sql_numrows($result_a);
   $topic_title = check_words(check_html($row_a['topictext'], "nohtml"));
   OpenTable();
   if ($numrows_a == 0) {
       echo "<center><font class=\"title\">$sitename</font><br><br>"._NOINFO4TOPIC."<br><br>[ <a href=\"modules.php?name=News\">"._GOTONEWSINDEX."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
   } else {
       echo "<center><font class=\"title\">$sitename: $topic_title</font><br><br>"
      ."<form action=\"modules.php?name=Search\" method=\"post\">"
      ."<input type=\"hidden\" name=\"topic\" value=\"$new_topic\">"
      .""._SEARCHONTOPIC.": <input type=\"name\" name=\"query\" size=\"30\">  "
      ."<input type=\"submit\" value=\""._SEARCH."\">"
      ."</form>"
      ."[ <a href=\"index.php\">"._GOTOHOME."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
   }
   CloseTable();
   echo "<br>";
    }
    $result = $db->sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC limit $storynum");
    while ($row = $db->sql_fetchrow($result)) {
   $s_sid = intval($row['sid']);
   $catid = intval($row['catid']);
   $aid = check_html($row['aid'], "nohtml");
   $title = stripslashes(check_words(check_html($row['title'], "nohtml")));
   $time = $row['time'];
   $hometext = stripslashes($row['hometext']);
    $bodytext = stripslashes($row['bodytext']);
    $comments = stripslashes($row['comments']);
   $counter = intval($row['counter']);
   $topic = intval($row['topic']);
   $informant = check_html($row['informant'], "nohtml");
   $notes = stripslashes($row['notes']);
   $acomm = intval($row['acomm']);
   $score = intval($row['score']);
   $ratings = intval($row['ratings']);
   if ($catid > 0) {
       $row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
       $cattitle = check_words(check_html($row2['title'], "nohtml"));
   }
   getTopics($s_sid);
   formatTimestamp($time);
   $introcount = strlen($hometext);
   $fullcount = strlen($bodytext);
   $totalcount = $introcount + $fullcount;
   $c_count = $comments;
   $r_options = "";
   if (isset($userinfo['umode'])) { $r_options .= "&amp;mode=".$userinfo['umode']; }
   if (isset($userinfo['uorder'])) { $r_options .= "&amp;order=".$userinfo['uorder']; }
   if (isset($userinfo['thold'])) { $r_options .= "&amp;thold=".$userinfo['thold']; }
   $story_link = "<a href=\"modules.php?name=News&amp;file=article&amp;sid=$s_sid$r_options\">";
   $morelink = "(";
   if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
       $morelink .= "$story_link<b>"._READMORE."</b></a> | ";
   } else {
       $morelink .= "";
   }
   if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE." | "; }
   if ($articlecomm == 1 AND $acomm == 0) {
       if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
   }
   $sid = intval($s_sid);
   if ($catid != 0) {
       $row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
       $title1 = check_words(check_html($row3['title'], "nohtml"));
       $title = "<a href=\"modules.php?name=News&amp;file=categories&amp;op=newindex&amp;catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
       $morelink .= " | <a href=\"modules.php?name=News&amp;file=categories&amp;op=newindex&amp;catid=$catid\">$title1</a>";
   }
   if ($score != 0) {
       $rated = substr($score / $ratings, 0, 4);
   } else {
       $rated = 0;
   }
   $morelink .= " | "._SCORE." $rated";
   $morelink .= ")";
   $morelink = str_replace(" |  | ", " | ", $morelink);
if ($topicimage == ""){
$topicimage="AllTopics.gif";
}
   themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext);
    }
    include("footer.php");
}


e sostituite con:


Codice:
function theindex($new_topic="0") { ///MODIFICATO BY MATTEOIAMMA
    global $db, $storyhome, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $sitename, $user_news, $userinfo;
   
    $cols=2; //NUMERO DI COLONNE IN CUI SUDDIVIDERE LE NEWS

    if (is_user($user)) { getusrinfo($user); }
    if ($multilingual == 1) {
   $querylang = "AND (alanguage='$currentlang' OR alanguage='')";
    } else {
   $querylang = "";
    }
    include("header.php");
    automated_news();
    if (isset($new_topic)) {
    $new_topic = intval($new_topic);
    } else {
    $new_topic == 0;
    }
    if (isset($userinfo['storynum']) AND $user_news == 1) {
   $storynum = $userinfo['storynum'];
    } else {
   $storynum = $storyhome;
    }
    if ($new_topic == 0) {
   $qdb = "WHERE (ihome='0' OR catid='0')";
   $home_msg = "";
    } else {
   $qdb = "WHERE topic='$new_topic'";
   $result_a = $db->sql_query("SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'");
   $row_a = $db->sql_fetchrow($result_a);   
   $numrows_a = $db->sql_numrows($result_a);
   $topic_title = check_words(check_html($row_a['topictext'], "nohtml"));
   OpenTable();
   if ($numrows_a == 0) {
       echo "<center><font class=\"title\">$sitename</font><br><br>"._NOINFO4TOPIC."<br><br>[ <a href=\"modules.php?name=News\">"._GOTONEWSINDEX."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
   } else {
       echo "<center><font class=\"title\">$sitename: $topic_title</font><br><br>"
      ."<form action=\"modules.php?name=Search\" method=\"post\">"
      ."<input type=\"hidden\" name=\"topic\" value=\"$new_topic\">"
      .""._SEARCHONTOPIC.": <input type=\"name\" name=\"query\" size=\"30\">  "
      ."<input type=\"submit\" value=\""._SEARCH."\">"
      ."</form>"
      ."[ <a href=\"index.php\">"._GOTOHOME."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
   }
   CloseTable();
   echo "<br>";
    }
    $result = $db->sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC limit $storynum");
    $rows=0;
    echo "<table border='0'>";
    while ($row = $db->sql_fetchrow($result)) {
    $rows++;
   $s_sid = intval($row['sid']);
   $catid = intval($row['catid']);
   $aid = check_html($row['aid'], "nohtml");
   $title = stripslashes(check_words(check_html($row['title'], "nohtml")));
   $time = $row['time'];
   $hometext = stripslashes($row['hometext']);
    $bodytext = stripslashes($row['bodytext']);
    $comments = stripslashes($row['comments']);
   $counter = intval($row['counter']);
   $topic = intval($row['topic']);
   $informant = check_html($row['informant'], "nohtml");
   $notes = stripslashes($row['notes']);
   $acomm = intval($row['acomm']);
   $score = intval($row['score']);
   $ratings = intval($row['ratings']);
   if ($catid > 0) {
       $row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
       $cattitle = check_words(check_html($row2['title'], "nohtml"));
   }
   getTopics($s_sid);
   formatTimestamp($time);
   $introcount = strlen($hometext);
   $fullcount = strlen($bodytext);
   $totalcount = $introcount + $fullcount;
   $c_count = $comments;
   $r_options = "";
   if (isset($userinfo['umode'])) { $r_options .= "&amp;mode=".$userinfo['umode']; }
   if (isset($userinfo['uorder'])) { $r_options .= "&amp;order=".$userinfo['uorder']; }
   if (isset($userinfo['thold'])) { $r_options .= "&amp;thold=".$userinfo['thold']; }
   $story_link = "<a href=\"modules.php?name=News&amp;file=article&amp;sid=$s_sid$r_options\">";
   $morelink = "(";
   if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
       $morelink .= "$story_link<b>"._READMORE."</b></a> | ";
   } else {
       $morelink .= "";
   }
   if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE." | "; }
   if ($articlecomm == 1 AND $acomm == 0) {
       if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
   }
   $sid = intval($s_sid);
   if ($catid != 0) {
       $row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
       $title1 = check_words(check_html($row3['title'], "nohtml"));
       $title = "<a href=\"modules.php?name=News&amp;file=categories&amp;op=newindex&amp;catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
       $morelink .= " | <a href=\"modules.php?name=News&amp;file=categories&amp;op=newindex&amp;catid=$catid\">$title1</a>";
   }
   if ($score != 0) {
       $rated = substr($score / $ratings, 0, 4);
   } else {
       $rated = 0;
   }
   $morelink .= " | "._SCORE." $rated";
   $morelink .= ")";
   $morelink = str_replace(" |  | ", " | ", $morelink);
   
   echo "<td width='33%' align='center'>";
   themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext);
 echo "</td>";
  if ($rows==$cols) {     
        echo("</tr><tr>\n");
        $rows=0;   
  }  }
    echo "</table></center>";

    include("footer.php");
}


2 ) Salvate, chiudete il file e riuppatelo.
_________________
Non inviatemi messaggi privati o email,
gratis aiuto solo sui forum.
CLEANUKE.IT - CLEAN NUKE OFFICIAL COMMUNITY
MATTEOIAMMARRONE.COM
FORUMRAGAZZI.IT
Torna in cima
Profilo Messaggio privato Invia email HomePage MSN Messenger
queen_live78
Amministratore
Amministratore


Registrato: Nov 10, 2006
Messaggi: 2457
Località: Cagliari (CA) - Maniago (PN)

MessaggioInviato: Gio Gen 21, 2010 7:26 pm    Oggetto: Rispondi citando

Grazie per la segnalazione !!!!
_________________

Torna in cima
Profilo Messaggio privato HomePage
Mostra prima i messaggi di:   
Nuovo Topic   Rispondi    Indice del forum -> Moduli, Blocchi e Addons Tutti i fusi orari sono GMT + 1 ora
Pagina 1 di 1

 
Vai a:  
Non puoi inserire nuovi Topic in questo forum
Non puoi rispondere ai Topic in questo forum
Non puoi modificare i tuoi messaggi in questo forum
Non puoi cancellare i tuoi messaggi in questo forum
Non puoi votare nei sondaggi in questo forum

Powered by phpBB © 2001, 2005 phpBB Group
Tema Creato da Queen_live78 © 2007