• 02-10-2007, 14:12:59
    #1
    Üyeliği durduruldu
    arkadaşlar ne siz sorun ne ben söyleyim.

    zoints seo konusunda bir sorunum var. ama uzun hikaye


    neyse uzatmadan 2 sorumu sorayım.

    aşağıdaki kodlardan hangi bölüm linklere seo uyguluyor?

    yada aşağıdaki kodlardan hangi bölüm linke tıklamamıza rağmen o sayfaya girmemizi değilde ana sayfada (tıkladığımız yerde / index.php) kalmamızı sağlıyor, o linke gitmemizi engelliyor?


    /** Zoints */
    if ($vbulletin->options['zointsseo_archive_version'] == 'old')
    {
     $output = @ob_get_contents();
     @ob_end_clean();
    }
    if ($vbulletin->options['zointsseo_on'])
    {
     if ($vbulletin->options['zointsseo_rewrite_urls'] OR defined('zseo_sitemap'))
     {
      $base_href = $vbulletin->options['bburl'] . '/' . (defined('zseo_sitemap') ? 'sitemap' : 'archive') . '/' . iif($vbulletin->options['zointsseo_rewrite_urls'] != 2, 'index.php/');
      $output = str_replace('<head>', "<head>\n\t<base href=\"$base_href\" />", $output);
     }
     
     $globalignore = ($ignore = fetch_coventry('string')) ? "AND " . ($do == 'forum' ? 'thread.post' : 'post.') . "userid NOT IN ($ignore) " : '';
    }
    if ($vbulletin->options['zointsseo_on'] AND $do == 'index')
    {
     $output .= zoints_archive_navigation(array());
     if ($vbulletin->options['forumhome'] == 'index')
     {
      $homeurl = $vbulletin->options['bburl'] . '/';
     }
     else
     {
      $homeurl = $vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php';
     }
     
     $output .= "<p class=\"largefont\">$vbphrase[view_full_version]: <a href=\"$homeurl\">" . $vbulletin->options['bbtitle'] . "</a></p>\n";
     $output .= zseo_archive_ad('i_forum1');
     
     $output .= "<div id=\"content\">\n";
     
     $columns = false;
     $i_right = zseo_archive_ad('i_right');
     $i_left = zseo_archive_ad('i_left');
     if (!empty($i_right) OR !empty($i_left))
     {
      $columns = true;
     }
     
     if ($columns)
     {
      $output .= '<table width="100%" cellpadding="1" cellspacing="1"><tr>';
      if (!empty($i_left))
      {
       $output .= $i_left;
      }
      $output .= '<td width="100%">';
     }
     $output .= zoints_archive_forum_list(-1,'',true, true);
     if ($columns)
     {
      $output .= '</td>';
      if (!empty($i_right))
      {
       $output .= '<td>' . $i_right . '</td>';
      }
      $output .= '</tr></table>';
     }
     $output .= "\n</div>\n";
     $output .= zseo_archive_ad('i_forum2');
     unset($do);
    }
    if ($vbulletin->options['zointsseo_on'] AND $do == 'forum')
    {
     $p = max(intval($p), 1);
     $zointspage = 0;
     if ($vbulletin->options['zointsseo_archive_navigation'] AND !defined('Z_NAVIGATION'))
     {
      $numpages = ceil($foruminfo['threadcount'] / $vbulletin->options['archive_threadsperpage'] / $vbulletin->options['zointsseo_archive_pages_per_page']);
      for ($i = 1; $i <= $numpages; $i++)
      {
       if ($p <= $i * $vbulletin->options['zointsseo_archive_pages_per_page'])
       {
        $zointspage = $i;
        break;
       }
      }
     }
     $output .= zoints_archive_navigation($foruminfo, false, $zointspage);
     $output .= "<p class=\"largefont\">$vbphrase[view_full_version] : <a href=\"" . $vbulletin->options['bburl'] . "/" . zseo_url_forum($foruminfo) . "\">$foruminfo[title_clean]</a></p>\n<hr />\n";
     # is forum
     if (defined('Z_NAVIGATION') AND $vbulletin->options['zointsseo_archive_navigation'])
     {
      
      $numpages = ceil($foruminfo['threadcount'] / $vbulletin->options['archive_threadsperpage']);
      $numforumpages = ceil($numpages / $vbulletin->options['zointsseo_archive_pages_per_page']);
      if ($p > $numforumpages)
      {
       $p = $numforumpages;
      }
      $start = ($p-1) * $vbulletin->options['zointsseo_archive_pages_per_page'] + 1;
      
      if ($numpages > 0)
      {
       $output .= zoints_improved_archive_page_navigation($start, $start + $vbulletin->options['zointsseo_archive_pages_per_page'] - 1, 0, $numpages, $foruminfo);
      }
     }
     else if ($foruminfo['cancontainthreads'])
     {
      if (!$vbulletin->options['zointsseo_archive_navigation'])
      {
       $output .= zoints_archive_page_navigation($foruminfo['threadcount'], $vbulletin->options['archive_threadsperpage'], $foruminfo);
      }
      $sqlstart = ($p-1) * $vbulletin->options['archive_threadsperpage'];
      $sqlend = $vbulletin->options['archive_threadsperpage'];
      $threads = $db->query_read("
       SELECT threadid, title, lastpost, replycount
       FROM " . TABLE_PREFIX . "thread AS thread
       WHERE forumid = $foruminfo[forumid]
        AND visible = 1
        AND open <> 10
       ORDER BY dateline " . iif($pda, 'DESC', 'ASC') . "
       LIMIT $sqlstart, $sqlend
      ");
      $start = $sqlstart + 1;
      
      $f_left = zseo_archive_ad('f_left');
      $f_right = zseo_archive_ad('f_right');
      
      $columns = false;
      if (!empty($f_left) OR !empty($f_right))
      {
       $columns = true;
      }
      
      if ($columns)
      {
       $output .= '<table width="100%" cellpadding="1" cellspacing="1"><tr>';
       if (!empty($f_left))
       {
        $output .= '<td width="1%">' . $f_left . '</td>';
       }
       $output .= '<td width="100%">';
      }
      $output .= "<div id=\"content\">\n" . zseo_archive_ad('f_thread1') . "<ol start=\"$start\">\n";
      while ($thread = $db->fetch_array($threads))
      {
       if ($vbulletin->options['wordwrap'] != 0)
       {
        $thread['title'] = fetch_word_wrapped_string($thread['title']);
       }
       $thread['title'] = fetch_censored_text($thread['title']);
       ($hook = vBulletinHook::fetch_hook('archive_forum_thread')) ? eval($hook) : false;
       if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
       {
        $output .= "\t<li>$thread[title]</li>\n";
       }
       else
       {
        if ($vbulletin->options['zointsseo_archive_sitemap'])
        {
         $output .= "\t<li><a href=\"" . zseo_url_thread($thread) . "\">$thread[title]</a></i></li>\n";
        }
        else
        {
         $output .= "\t<li><a href=\"" . zseo_url_thread($thread, 1, '', '', true) . "\">$thread[title]</a></i></li>\n";
        }
       }
      }
      $output .= "</ol>\n" . zseo_archive_ad('f_thread2') . "</div>\n";
      if ($columns)
      {
       $output .= '</td>';
       if (!empty($f_right))
       {
        $output .= '<td width="1%">' . $f_right . '</td>';
       }
       $output .= '</tr></table>';
      }
     }
     else
     {
      $output .= zseo_archive_ad('i_forum1');
      $output .= "<div id=\"content\">\n";
      $output .= zseo_archive_ad('i_right');
      $output .= zoints_archive_forum_list($f);
      $output .= "</div>\n";
      $output .= zseo_archive_ad('i_forum2');
     }
     unset($do);
    }
    if ($vbulletin->options['zointsseo_on'] AND $do == 'thread')
    {
     if ($vbulletin->options['wordwrap'] != 0)
     {
      $threadinfo['title'] = fetch_word_wrapped_string($threadinfo['title']);
     }
     $threadinfo['title'] = fetch_censored_text($threadinfo['title']);
     $zointspage = 0;
     
     if ($vbulletin->options['zointsseo_archive_navigation'])
     {
      $tmp = $db->query_first("
       SELECT COUNT(*) + 1 threads
       FROM " . TABLE_PREFIX . "thread AS thread
       WHERE forumid = $foruminfo[forumid]
        AND visible = 1
        AND open <> 10
        AND dateline < $threadinfo[dateline]
      ");
      $threadnum = $tmp['threads'];
      unset($tmp);
      
      # unfortunately threadcount doesn't exist in the forumcache
      $tmp = $db->query_first("SELECT threadcount FROM " . TABLE_PREFIX . "forum WHERE forumid = $foruminfo[forumid]");
      $threadcount = $tmp['threadcount'];
      unset($tmp);
      
      # determine which forum page this thread is on
      $thispage = 1;
      $forumpages = ceil($threadcount / $vbulletin->options['archive_threadsperpage']);
      for ($i = 1; $i <= $forumpages; $i++)
      {
       if ($threadnum <= $i * $vbulletin->options['archive_threadsperpage'])
       {
        $thispage = $i;
        break;
       }
      }
      $foruminfo['currentpage'] = $thispage;
      
      # determine which zoints page the forum page is on
      $numpages = ceil($threadcount / $vbulletin->options['archive_threadsperpage'] / $vbulletin->options['zointsseo_archive_pages_per_page']);
      $zointspage = 1;
      for ($i = 1; $i <= $numpages; $i++)
      {
       if ($thispage <= $i * $vbulletin->options['zointsseo_archive_pages_per_page'])
       {
        $zointspage = $i;
        break;
       }
      }
     }
     $output .= zoints_archive_navigation($foruminfo, $threadinfo, $zointspage);
     $output .= "<p class=\"largefont\">$vbphrase[view_full_version] : <a href=\"" . $vbulletin->options['bburl'] . "/" . zseo_url_thread($threadinfo,1,'','',false,false,true) . "\">$threadinfo[title]</a></p>\n<hr />\n";
     $p = max(intval($p),1);
     
     $output .= zoints_archive_page_navigation($threadinfo['replycount'] + 1, $vbulletin->options['archive_postsperpage'], $threadinfo, true);
     
     $sqlstart = ($p-1) * $vbulletin->options['archive_postsperpage'];
     $sqlend = $vbulletin->options['archive_postsperpage'];
     
     $posts = $db->query_read("
      SELECT post.postid, post.pagetext, IFNULL( user.username , post.username ) AS username, dateline
      FROM " . TABLE_PREFIX . "post AS post
      LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = post.userid)
      WHERE threadid = $threadinfo[threadid]
       AND visible = 1
       $globalignore
      ORDER BY dateline ASC
      LIMIT $sqlstart, $sqlend
     ");
     
     $i = 1;
     
     $t_left = zseo_archive_ad('t_left');
     $t_right = zseo_archive_ad('t_right');
     $columns = false;
     if (!empty($t_left) OR !empty($t_right))
     {
      $columns = true;
     }
     
     if ($columns)
     {
      $output .= '<table width="100%" cellpadding="1" cellspacing="1"><tr>';
      if (!empty($t_left))
      {
       $output .= $t_left;
      }
      $output .= '<td width="100%">';
     }
     
     $output .= zseo_archive_ad('t_post1');
     while ($post = $db->fetch_array($posts))
     {
      $post['pagetext'] = strip_bbcode($post['pagetext']);
      $post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline']);
      $post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);
      
      if ($vbulletin->options['wordwrap'] != 0)
      {
       $post['pagetext'] = fetch_word_wrapped_string($post['pagetext']);
      }
      
      $post['pagetext'] = fetch_censored_text($post['pagetext']);
      
      if ($i == 1 AND $vbulletin->options['zointsseo_meta_description'] == 2 AND $vbulletin->options['zointsseo_first_x_words'] > 0)
      {
       $description = str_replace('"', '', $post['pagetext']);
       $words = preg_split("#[\r\n\s]#", $description, $vbulletin->options['zointsseo_first_x_words'] + 1, PREG_SPLIT_NO_EMPTY);
       $description = '';
       $x = 0;
       foreach ($words as $word)
       {
        $description .= " $word";
        if (++$x == $vbulletin->options['zointsseo_first_x_words']) break;
       }
       $description = substr($description,1);
       
       $output = str_replace('{ZOINTS CUSTOM META DESCRIPTION}', $description, $output);
      }
      
      ($hook = vBulletinHook::fetch_hook('archive_thread_post')) ? eval($hook) : false;
      
      $output .= "\n<div class=\"post\"><div class=\"posttop\"><div class=\"username\">$post[username]</div><div class=\"date\">$post[postdate], $post[posttime]</div></div>";
      $output .= "<div class=\"posttext\">" . nl2br(htmlspecialchars_uni($post['pagetext'])) . "</div></div><hr />\n\n";
      
      $output .= zseo_archive_ad('t_postx', $i);
      $i++;
     }
     $output .= zseo_archive_ad('t_post2');
     if ($columns)
     {
      $output .= '</td>';
      if (!empty($t_right))
      {
       $output .= $t_right;
      }
      $output .= "</tr></table>";
     }
     unset($do);
    }
    if ($vbulletin->options['zointsseo_archive_version'] == 'old')
    {
     echo $output;
     unset($output);
    }
    /** / Zoints */
  • 02-10-2007, 15:06:36
    #2
    1-) $output .= "<p class=\"largefont\">$vbphrase[view_full_version]: <a href=\"$homeurl\">" . $vbulletin->options['bbtitle'] . "</a></p>\n";

    2-) if ($vbulletin->options['zointsseo_rewrite_urls'] OR defined('zseo_sitemap'))
    {
    $base_href = $vbulletin->options['bburl'] . '/' . (defined('zseo_sitemap') ? 'sitemap' : 'archive') . '/' . iif($vbulletin->options['zointsseo_rewrite_urls'] != 2, 'index.php/');
    $output = str_replace('<head>', "<head>\n\t<base href=\"$base_href\" />", $output);
    }


    not: 2. soruyu tam anlamadım ama index.php'de kalmanı sağlayan başka kod yok
  • 02-10-2007, 21:58:00
    #3
    Üyeliği durduruldu
    olma dı
  • 02-10-2007, 23:42:58
    #4
    Yapmaya çalıştığını neki ?