• User Newbie

    problemi modulo Search Engine Optimization per phpbb

    hola! sono nuova di queste parti e aggiungo anche un pò imbranata con il php 😄
    avrei un problema e "giorgetto" mi ha consigliato di postarlo qui dunque:

    ho un sito realizzato in phpnuke e ho il forum phpbb
    volevo che i titoli dei topic fossero visualizzati e quindi visibili anche dai motori di ricerca
    giorgio mi ha consigliato il modulo "search engine optimization". l'ho scaricato ho seguito tutti i passi per filo e per segno ma non funziona
    potreste dirmi cosa potrebbe essere che non và? o cosa dovrei controllare? :arrabbiato:

    potrebbe dipendere dal fatto che uso un template diverso da quelli classici del nuke, in modo che anche il forum abbia lo stesso tema del sito; di conseguenza all'interno della directory del tema c'è anche un cartella denominata "forum" che non ha nulla a che fare con il forum phpbb? :bho:

    mammamia...spero di essermi spiegata... (il maestro brebei mi darebbe un 3menomeno :D)
    ringrazio anticipatamente chi vorrà aiutarmi 🙂


  • Super User

    credo che il tuo problema sia proprio dovuto al template.

    Prova ad impostare quello di default e ad attivare lo script e dicci come va.

    Ciao


  • User Newbie

    ho appena provato e nessun risultato... ovvero come titolo c'è sempre il nome del sito e niente di più 😞 altre cose che posso vedere?


  • Super User

    mmmm, è molto strano.

    Io personalmente nel mio sito ho un template diverso e ho modificato a mano le cose che mi interessavano..

    Dovresti provare ad entrare nel template dove c'è il titolo e modificarlo...

    Magari postaci il codice dove c'è il titolo che lo sistemiamo

    Ciao


  • User Newbie

    spero sia questo...
    è un pò lunghetto chiedo scusa 🙂

    
    <?
    $bgcolor1 = "#0D0E0E";
    $bgcolor2 = "#0D0E0E";
    $bgcolor3 = "#0D0E0E";
    $bgcolor4 = "#0D0E0E";
    $textcolor1 = "#FFFFFF";
    $textcolor2 = "#FFFFFF";
    
    
    include&#40;"themes/CoNCePT/tables.php"&#41;;
    
    
    function themeheader&#40;&#41; &#123; 
        global  $admin, $user, $banners, $name, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous;
        if &#40;$banners == 1&#41; &#123;    
        $numrows = $db->sql_numrows&#40;$db->sql_query&#40;"SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"&#41;&#41;;
       /* Get a random banner if exist any. */ 
       /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */ 
    
        if &#40;$numrows>1&#41; &#123; 
       $numrows = $numrows-1; 
       mt_srand&#40;&#40;double&#41;microtime&#40;&#41;*1000000&#41;; 
       $bannum = mt_rand&#40;0, $numrows&#41;; 
        &#125; else &#123; 
       $bannum = 0; 
        &#125; 
        $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1"; 
        $result = $db->sql_query&#40;$sql&#41;; 
        $row = $db->sql_fetchrow&#40;$result&#41;; 
        $bid = $row&#91;bid&#93;; 
        $imageurl = $row&#91;imageurl&#93;; 
        $clickurl = $row&#91;clickurl&#93;; 
        $alttext = $row&#91;alttext&#93;; 
        
        if &#40;!is_admin&#40;$admin&#41;&#41; &#123; 
           $db->sql_query&#40;"UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'"&#41;; 
        &#125; 
        if&#40;$numrows>0&#41; &#123; 
       $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'"; 
       $result2 = $db->sql_query&#40;$sql2&#41;; 
       $row2 = $db->sql_fetchrow&#40;$result2&#41;; 
       $cid = $row2&#91;cid&#93;; 
       $imptotal = $row2&#91;imptotal&#93;; 
       $impmade = $row2&#91;impmade&#93;; 
       $clicks = $row2&#91;clicks&#93;; 
       $date = $row2&#91;date&#93;; 
    
    /* Check if this impression is the last one and print the banner */ 
    
       if &#40;&#40;$imptotal <= $impmade&#41; AND &#40;$imptotal != 0&#41;&#41; &#123; 
           $db->sql_query&#40;"UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'"&#41;; 
           $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'"; 
           $result3 = $db->sql_query&#40;$sql3&#41;; 
           $row3 = $db->sql_fetchrow&#40;$result3&#41;; 
           $c_name = $row3&#91;name&#93;; 
           $c_contact = $row3&#91;contact&#93;; 
           $c_email = $row3&#91;email&#93;; 
           if &#40;$c_email != ""&#41; &#123; 
          $from = "$sitename <$adminmail>"; 
          $to = "$c_contact <$c_email>"; 
          $message = ""._HELLO." $c_contact&#58;\n\n"; 
          $message .= ""._THISISAUTOMATED."\n\n"; 
          $message .= ""._THERESULTS."\n\n"; 
          $message .= ""._TOTALIMPRESSIONS." $imptotal\n"; 
          $message .= ""._CLICKSRECEIVED." $clicks\n"; 
          $message .= ""._IMAGEURL." $imageurl\n"; 
          $message .= ""._CLICKURL." $clickurl\n"; 
          $message .= ""._ALTERNATETEXT." $alttext\n\n"; 
          $message .= ""._HOPEYOULIKED."\n\n"; 
          $message .= ""._THANKSUPPORT."\n\n"; 
          $message .= "- $sitename "._TEAM."\n"; 
          $message .= "$nukeurl"; 
          $subject = "$sitename&#58; "._BANNERSFINNISHED.""; 
          mail&#40;$to, $subject, $message, "From&#58; $from\nX-Mailer&#58; PHP/" . phpversion&#40;&#41;&#41;; 
           &#125; 
       &#125; 
        $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>"; 
        &#125;
    &#125;
        cookiedecode&#40;$user&#41;;
        $username = $cookie&#91;1&#93;;
        if &#40;$username == ""&#41; &#123;
            $username = "Anonymous";
        &#125;
        echo "<body text=\"#FFFFFF\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">\n";
                
        if &#40;$username == "Anonymous"&#41; &#123;
            $theuser = "<a href=\"modules.php?name=Your_Account\">Login</a> or <a href=\"modules.php?name=Your_Account&op=new_user\">Register</a>";
        &#125; else &#123;
            $theuser = "Welcome $username!";
        &#125;
        $tmpl_file = "themes/CoNCePT/header.html";
        $thefile = implode&#40;"", file&#40;$tmpl_file&#41;&#41;;
        $thefile = addslashes&#40;$thefile&#41;;
        $thefile = "\$r_file=\"".$thefile."\";";
        eval&#40;$thefile&#41;;
        print $r_file;
        if &#40;$name=='coppermine' ||
            $name=='DisError' ||
            $name=='Forums' ||
            $name=='Members' ||
            $name=='Private_Messages'&#41; &#123;
        &#125; else &#123;
            blocks&#40;left&#41;;
        &#125;
        $tmpl_file = "themes/CoNCePT/left_center.html";
        $thefile = implode&#40;"", file&#40;$tmpl_file&#41;&#41;;
        $thefile = addslashes&#40;$thefile&#41;;
        $thefile = "\$r_file=\"".$thefile."\";";
        eval&#40;$thefile&#41;;
        print $r_file;
    &#125;
    
    /************************************************************/
    /* Function themefooter&#40;&#41;                                   */
    /*                                                          */
    /* Control the footer for your site. You don't need to      */
    /* close BODY and HTML tags at the end. In some part call   */
    /* the function for right blocks with&#58; blocks&#40;right&#41;;       */
    /* Also, $index variable need to be global and is used to   */
    /* determine if the page your're viewing is the Homepage or */
    /* and internal one.                                        */
    /************************************************************/
    
    function themefooter&#40;&#41; &#123;
        global $index, $user, $banners, $cookie, $prefix, $dbi, $db, $foot1, $foot2, $foot3, $foot4, $admin, $adminmail, $total_time, $start_time, $nukeurl; 
        $mtime = microtime&#40;&#41;;
        $mtime = explode&#40;" ",$mtime&#41;;
        $mtime = $mtime&#91;1&#93; + $mtime&#91;0&#93;;
        $end_time = $mtime;
        $total_time = &#40;$end_time - $start_time&#41;;
        $total_time = ""._PAGEGENERATION." ".substr&#40;$total_time,0,5&#41;." "._SECONDS."";
        if &#40;$banners == 1&#41; &#123;
        $numrows = $db->sql_numrows&#40;$db->sql_query&#40;"SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"&#41;&#41;;
       /* Get a random banner if exist any. */ 
       /* More efficient random stuff, thanks to Cristian Arroyo from http&#58;//www.planetalinux.com.ar */ 
    
        if &#40;$numrows>1&#41; &#123; 
       $numrows = $numrows-1; 
       mt_srand&#40;&#40;double&#41;microtime&#40;&#41;*1000000&#41;; 
       $bannum = mt_rand&#40;0, $numrows&#41;; 
        &#125; else &#123; 
       $bannum = 0; 
        &#125; 
        $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1"; 
        $result = $db->sql_query&#40;$sql&#41;; 
        $row = $db->sql_fetchrow&#40;$result&#41;; 
        $bid = $row&#91;bid&#93;; 
        $imageurl = $row&#91;imageurl&#93;; 
        $clickurl = $row&#91;clickurl&#93;; 
        $alttext = $row&#91;alttext&#93;; 
        
        if &#40;!is_admin&#40;$admin&#41;&#41; &#123; 
           $db->sql_query&#40;"UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'"&#41;; 
        &#125; 
        if&#40;$numrows>0&#41; &#123; 
       $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'"; 
       $result2 = $db->sql_query&#40;$sql2&#41;; 
       $row2 = $db->sql_fetchrow&#40;$result2&#41;; 
       $cid = $row2&#91;cid&#93;; 
       $imptotal = $row2&#91;imptotal&#93;; 
       $impmade = $row2&#91;impmade&#93;; 
       $clicks = $row2&#91;clicks&#93;; 
       $date = $row2&#91;date&#93;; 
    
    /* Check if this impression is the last one and print the banner */ 
    
       if &#40;&#40;$imptotal <= $impmade&#41; AND &#40;$imptotal != 0&#41;&#41; &#123; 
           $db->sql_query&#40;"UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'"&#41;; 
           $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'"; 
           $result3 = $db->sql_query&#40;$sql3&#41;; 
           $row3 = $db->sql_fetchrow&#40;$result3&#41;; 
           $c_name = $row3&#91;name&#93;; 
           $c_contact = $row3&#91;contact&#93;; 
           $c_email = $row3&#91;email&#93;; 
           if &#40;$c_email != ""&#41; &#123; 
          $from = "$sitename <$adminmail>"; 
          $to = "$c_contact <$c_email>"; 
          $message = ""._HELLO." $c_contact&#58;\n\n"; 
          $message .= ""._THISISAUTOMATED."\n\n"; 
          $message .= ""._THERESULTS."\n\n"; 
          $message .= ""._TOTALIMPRESSIONS." $imptotal\n"; 
          $message .= ""._CLICKSRECEIVED." $clicks\n"; 
          $message .= ""._IMAGEURL." $imageurl\n"; 
          $message .= ""._CLICKURL." $clickurl\n"; 
          $message .= ""._ALTERNATETEXT." $alttext\n\n"; 
          $message .= ""._HOPEYOULIKED."\n\n"; 
          $message .= ""._THANKSUPPORT."\n\n"; 
          $message .= "- $sitename "._TEAM."\n"; 
          $message .= "$nukeurl"; 
          $subject = "$sitename&#58; "._BANNERSFINNISHED.""; 
          mail&#40;$to, $subject, $message, "From&#58; $from\nX-Mailer&#58; PHP/" . phpversion&#40;&#41;&#41;; 
           &#125; 
       &#125; 
        $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>"; 
        &#125;
    &#125;
        $footer_message = "$total_time";
        
     if &#40;$index == 1&#41; &#123;
            $tmpl_file = "themes/CoNCePT/center_right.html";
            $thefile = implode&#40;"", file&#40;$tmpl_file&#41;&#41;;
            $thefile = addslashes&#40;$thefile&#41;;
            $thefile = "\$r_file=\"".$thefile."\";";
            eval&#40;$thefile&#41;;
            print $r_file;
            blocks&#40;right&#41;;
        &#125;
    
    
    echo "<td width=\"16\" background=\"themes/CoNCePT/images/footer/CoNCePTfooter1.gif\"><img src=\"themes/CoNCePT/images/spacer.gif\" width=\"16\" height=\"1\"></td>
      </tr>
    </table>
    <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
    ."<tr>\n"
    ."<td width=\"15\" background=\"themes/CoNCePT/images/footer/CoNCePTfooter2.gif\"><img src=\"themes/CoNCePT/images/spacer.gif\" width=\"15\" height=\"1\"></td>\n"
    ."<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" bgcolor=\"#000000\">\n"
    ."<tr><td>\n";
    echo "</td></tr><tr>\n";
    echo "<td><center><font class=\"small\">\n";
    footmsg&#40;&#41;;
    echo"</font></center></td>\n"
    ."</tr>\n"
    ."<tr>\n"
    ."</tr>\n"
    
    ."<tr>\n"
    ."</tr>\n"        
    ."</table></td>\n"
    ."<td width=\"16\" background=\"themes/CoNCePT/images/footer/CoNCePTfooter1.gif\"><img src=\"themes/CoNCePT/images/spacer.gif\" width=\"16\" height=\"1\"></td>\n"
    ."</tr>\n"
    ."</table>\n"
    ."<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
    ."<tr>\n"
    ."<td width=\"35\"><IMG SRC=\"themes/CoNCePT/images/footer/CoNCePTfooter3.gif\" WIDTH=\"35\" HEIGHT=\"56\" ALT=\"\"></td>\n"
    ."<td background=\"themes/CoNCePT/images/footer/CoNCePTfooter4.gif\">
    <A HREF=\"http&#58;//www.disipal.net\" TARGET=\"_blank\"><img src=\"themes/CoNCePT/images/footer/CoNCePT-mes.gif\" WIDTH=182 HEIGHT=14 BORDER=0 ALT=\"Disipal Design\" align=\"right\"></A></td>\n";
    
    echo"<td width=\"35\"><IMG SRC=\"themes/CoNCePT/images/footer/CoNCePTfooter5.gif\" WIDTH=\"35\" HEIGHT=\"56\" ALT=\"\"></td>\n"
    ."</tr>\n"
    ."</table>\n"
    ."</td></tr></table>\n"
    ."</td></tr></table>\n";
    &#125;
    
    /************************************************************/
    /* Function themeindex&#40;&#41;                                    */
    /*                                                          */
    /* This function format the stories on the Homepage         */
    /************************************************************/
    
    function themeindex &#40;$aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext&#41; &#123;
        global $anonymous, $tipath;
        if &#40;$notes != ""&#41; &#123;
            $notes = "
    
    **"._NOTE."** *$notes*\n";
        &#125; else &#123;
            $notes = "";
        &#125;
        if &#40;"$aid" == "$informant"&#41; &#123;
            $content = "$thetext$notes\n";
        &#125; else &#123;
            if&#40;$informant != ""&#41; &#123;
                $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
            &#125; else &#123;
                $content = "$anonymous ";
            &#125;
            $content .= ""._WRITES." *\"$thetext\"*$notes\n";
        &#125;
        $posted = ""._POSTEDBY." ";
        $posted .= get_author&#40;$aid&#41;;
        $posted .= " "._ON." $time $timezone &#40;$counter "._READS."&#41;";
        $tmpl_file = "themes/CoNCePT/story_home.html";
        $thefile = implode&#40;"", file&#40;$tmpl_file&#41;&#41;;
        $thefile = addslashes&#40;$thefile&#41;;
        $thefile = "\$r_file=\"".$thefile."\";";
        eval&#40;$thefile&#41;;
        print $r_file;
    &#125;
    
    /************************************************************/
    /* Function themearticle&#40;&#41;                                  */
    /*                                                          */
    /* This function format the stories on the story page, when */
    /* you click on that "Read More..." link in the home        */
    /************************************************************/
    
    function themearticle &#40;$aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext&#41; &#123;
        global $admin, $sid, $tipath;
        $posted = ""._POSTEDON." $datetime "._BY." ";
        $posted .= get_author&#40;$aid&#41;;
        if &#40;$notes != ""&#41; &#123;
            $notes = "
    
    **"._NOTE."** *$notes*\n";
        &#125; else &#123;
            $notes = "";
        &#125;
        if &#40;"$aid" == "$informant"&#41; &#123;
            $content = "$thetext$notes\n";
        &#125; else &#123;
            if&#40;$informant != ""&#41; &#123;
                $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
            &#125; else &#123;
                $content = "$anonymous ";
            &#125;
            $content .= ""._WRITES." *\"$thetext\"*$notes\n";
        &#125;
        $tmpl_file = "themes/CoNCePT/story_page.html";
        $thefile = implode&#40;"", file&#40;$tmpl_file&#41;&#41;;
        $thefile = addslashes&#40;$thefile&#41;;
        $thefile = "\$r_file=\"".$thefile."\";";
        eval&#40;$thefile&#41;;
        print $r_file;
    &#125;
    
    /************************************************************/
    /* Function themesidebox&#40;&#41;                                  */
    /*                                                          */
    /* Control look of your blocks. Just simple.                */
    /************************************************************/
    
    function themesidebox&#40;$title, $content&#41; &#123;
    
        $tmpl_file = "themes/CoNCePT/blocks.html";
        $thefile = implode&#40;"", file&#40;$tmpl_file&#41;&#41;;
        $thefile = addslashes&#40;$thefile&#41;;
        $thefile = "\$r_file=\"".$thefile."\";";
        eval&#40;$thefile&#41;;
        print $r_file;
    &#125;
    
    ?>
    
    

  • User Newbie

    ho provato ad usare il mod su un'altro sito dove è presente solo il forum phpbb2 senza nuke e funziona!
    ho provato a vedere quindi quali differenze c'erano tra la directory forum del nuke e quella del forum "puro", l'unica sta nel fatto che in quella del nuke non esiste la directory "includes" all'interno del modulo forum...
    può dipendere da questo? come risolvo? 🙂