phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
How can i get this url with seo?

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
WhoSayIn



Joined: 22 Aug 2008
Posts: 10

How can i get this url with seo?Posted: Mon Sep 01, 2008 6:24 pm    Post subject: How can i get this url with seo?

hi, in mkportal there is last posts block on home page and shows last posts from board. but it shows urls like ..../viewtopic.php?f=14&t=136&p=165#p165

here is function which mkportal uses for getting last posts from board.

what can we do??

Code:


   function get_last_posts($by, $sdate)

    {

      global $DB, $mklib, $mkportals, $auth;;



      $limit = 5;

      $taglio = 25;

      $content = '';



      $good = array();

      $sql = "SELECT forum_id FROM " . FORUMS_TABLE . " WHERE forum_type=". FORUM_POST;

      $query1 = $DB->query($sql);

      while ( $row = $DB->fetch_row($query1) ) {

         if ($auth->acl_get('f_read', $row['forum_id'])) {

            $good[] = $row['forum_id'];

         }

      }



      $DB->free_result($query1);



      if ( empty($good) ) {

         return '';

      }



      $sql = "SELECT p.*, u.username, u.user_id, u.user_colour

            FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u

               WHERE p.forum_id IN (".implode(',', $good ).")

               AND p.poster_id = u.user_id

               AND p.post_approved = 1

               ORDER BY p.post_time DESC LIMIT 0,$limit";

      $query1 = $DB->query($sql);



      while ( $post = $DB->fetch_row($query1) ) {

           $post['post_subject'] = $mklib->post_htmlspecialchars(strip_tags($post['post_subject']));

         if (strlen($post['post_subject']) > $taglio) {

            $post['post_subject'] = substr( $post['post_subject'],0,($taglio - 3) ) . "...";

            $post['post_subject'] = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$post['post_subject'] );

         }

   

          $post['date']  = $mklib->create_date($post['post_time']);

         $pid = $post['post_id'];

//$title = utf8_encode($post['post_subject']);

         $title = $post['post_subject'];

         $mid = $post['user_id'];

         

         if ($post['user_colour'])

         {

            $style_color = ' style="color:#' . $post['user_colour'] . '"';

            $post['username'] = '<strong>' . $post['username'] . '</strong>';

         }

         else

         {

            $style_color = '';

         }



         $date = $post['date'];

         $content .= "

            <tr>

              <td width=\"100%\" class=\"tdblock\">

              <a class=\"uno\" href=\"{$mkportals->forum_url}/viewtopic.php?f={$post['forum_id']}&amp;t={$post['topic_id']}&amp;p={$pid}#p{$pid}\">{$title}</a>

              </td>

            </tr>

            <tr>

              <td class=\"tdglobal\">

              {$by}: <a href=\"" . append_sid("{$mkportals->forum_url}/memberlist.php", 'mode=viewprofile&amp;u=' . $post['user_id']) . '"' . $style_color . '>' . $post['username'] . "</a><br /> {$sdate}: {$date}

              </td>

            </tr>

         ";

       }



      $DB->free_result($query1);



      return $content;

   }
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15135

How can i get this url with seo?Posted: Sat Sep 06, 2008 8:21 am    Post subject: Re: How can i get this url with seo?

Problem is we need the topic datas as well to be able to url rewrite these.

With the simple mod, you'd probably only need to replace :
Code:

<a class=\"uno\" href=\"{$mkportals->forum_url}/viewtopic.php?f={$post['forum_id']}&amp;t={$post['topic_id']}&amp;p={$pid}#p{$pid}\">{$title}</a>


with :
Code:

<a class=\"uno\" href=\"" . append_sid("{$mkportals->forum_url}/viewtopic.php?f={$post['forum_id']}&amp;t={$post['topic_id']}&amp;p={$pid}#p{$pid}") . "\">{$title}</a>


++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
WhoSayIn



Joined: 22 Aug 2008
Posts: 10

How can i get this url with seo?Posted: Sat Sep 06, 2008 8:51 am    Post subject: Re: How can i get this url with seo?

hmm, not workin Sad

when i do this links are shown as
-http://cepworld.net/mobil/post178#p178.html#p178
-http://cepworld.net/mobil/post179#p179.html#p179

and when i click them it says forum is not available.

no chance to show urls like this???

http://cepworld.net/mobil/ngage-ngage20-f14/dirk-dagger-and-the-fallen-idol-t118.html


PS: i use advanced seo mod, not simple seo mod
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 1

Navigation

Jump to: