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  
 
   
Last Topic problem

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
agente



Joined: 09 Sep 2006
Posts: 5

Last Topic problemPosted: Sat Sep 09, 2006 4:22 pm    Post subject: Last Topic problem

Hi,

i've installed "keyword urls mod" and i need a last topic script to work with url like "key-words-vt*.html". can you help me?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

Last Topic problemPosted: Sat Sep 09, 2006 11:49 pm    Post subject: Re: Last Topic problem

And welcome Very Happy

And off course, please post your mod's code or better the url where it is released.

The phpBB SEO mod rewrite need minor changes for mods, as there is no standard way of getting the info needed.
But they are very simple, harmless and it's what's making the code so fast Wink

++

_________________
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
agente



Joined: 09 Sep 2006
Posts: 5

Last Topic problemPosted: Tue Sep 12, 2006 2:27 pm    Post subject: Re: Last Topic problem

this is the code for rewrite url:

Code:
##############################################################
## MOD Title:       phpBB SEO keyword URLs
## MOD Author:       webmedic (bah@webmedic.net) <Brook Humphrey> http://www.webmedic.net
## Original code from:   http://www.webmasterbrain.com/forum/question-static-sef-urls-for-phpbb-vt34.php
## MOD Description:    This mod makes static URLs for phpBB
##          Please read the author notes BEFORE using this mod.
##          Check http://www.webmedic.net/released-phpbb-google-keyword-urls-vt2577.html
##          for the latest version or to get help with this MOD
##
## MOD Version:    2.2.2
##
## Installation Level:    (Advanced)
## Installation Time:    5 Minutes
## Files To Edit:    (3)
##         .htaccess,
##         page_header.php,
##         page_footer.php,
##         overall_footer.tpl
## Included Files: n/a
##############################################################
## Author Notes:
## Use this mod together with the manage bots mod already included with integramod
## Make backups and test this on a test forum if you can. This is not a typical mod.
## This version is not like all the other mod rewrite and search engine optimization mods
## out there. It will make your urls into keyword phrases. to do this it rewrites the url
## to look like the topic or forum title.
## To see this mod in action please goto:
## http://www.webmedic.net/index.php
##
## LICENSE:
## Due to some issues with others taking my work and not offering proper credit
## (in as much as they have removed my credits and added their own) I have added
## a LICENSE.TXT. I have decided to license this under the RPL which states you can not
## remove my credits and if you make any modifications you have to resubmit the modifications
## to me for includion into this toolkit again. You can read the license for yourself for
## further info. It is also an open source license that has been deemed ok by osi.
##
## Along with this I now require a link to use this mod. If you don't want to have the
## linkback I will remove the requirement for a linkback for a small fee. If you are
## interested in removing the link please contact me at bah@webmedic.net
##
## All previous versions are licensed under the rpl from 6/29/2005
##
##############################################################
## MOD History:
##
##   2005-07-03 - Version 2.2.2
##   - Dissabled some of the page optimizations to fix issues with some javascripts
##     and css.
##   - Added keyword meta tags to the zip.
##
##   2005-06-29 - Version 2.2.1
##   - Added LICENSE.TXT after finding a few other sites taking credit for this mod.
##    - Added footer text for usage of this mod.
##   - Changed order of the install to help with any errors that may occur durring install.
##   - Fixed a few issues with overly optimizing the pages.
##
##   2005-06-24 - Version 2.2.0
##   - Rewrote some of the code for the smartor album again. This time it is more
##      comprehensive and should fix even unforeseen issues.
##   - Added new features so that when the page is being gziped it also removes
##      Unwanted comments, spaces, tabs, line feeds, and carriage returns. This also
##      makes the page smaller and helps to speed things up.
##
##   TODO: Fix forward and back links as well as links within threads that have multiple pages.
##
##   2005-06-21 - Version 2.1.0
##   - Rewrote a good portion of the smartor album code so that it works better.
##   - Added support for categories hierarchy thanks to 993ti at the
##      www.webmedic.net forums.
##   - Fixed major bug with phpbb were gzip was not working properly at all ever.
##      This mod fixes that issue so that gzip encoding now works properly.
##
##   2005-06-19 - Version 2.0.2
##   - Fixed small issue with " showing up in the url as -quot-
##     This was due to phpbb changing " to &quot; which is correct
##     but still does not look good in a url. So now it is completely removed.
##
##   2005-06-14 - Version 2.0.1
##   - Fixed small issue with url's not being rewritten if the site was using gzip compression.
##   - Fixed some of the string replace entries to not look for more than one space
##   - added < and > to the string replace functions
##
##   2005-06-07 - Version 2.0.0
##   - Added ability to use with pafiledb mod
##   - Added ability to use with kb mod (NOT WORKING YET)
##   - Added ability to use with Smartor album mod
##   - Added German umlauts & special characters (thanks to m³)
##   - Modified the way links are generated somewhat.
##     Hopefully the new method will catch a few things the old one did not.
##
##   2004-11-03 - Version 1.1.0
##   - Added replacements for /, \, and foreign character sets.
##
##   2004-08-22 - Version 1.0.0
##      - Initial public release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#

.htaccess

#
#-----[ ADD  ]------------------------------------------
#

RewriteEngine On
#this may cause issues with subdirs and so I have not enabled it.
RewriteBase /

RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1
RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1
RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1
RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1
RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1
RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1
RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1
RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1
RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest

#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
   $phpver = phpversion();

   if($phpver >= "4.0.4pl1")
      {
         if(extension_loaded("zlib"))
      {
   if (headers_sent() != TRUE)
      {
         $gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]);
         if ($gz_possible) ob_start("ob_gzhandler");
      }
   }
      }
         else if($phpver > "4.0")
      {
         if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
         {
            if(extension_loaded("zlib"))
         {
            $do_gzip_compress = TRUE;
            ob_start();
            ob_implicit_flush(0);

            header("Content-Encoding: gzip");
         }
      }
   }
}

#
#-----[ REPLACE, WITH  ]------------------------------------------
#

//
// Begin keyword urls mod
//

while (@ob_end_flush());
ob_start();


function make_url_friendly($url)
{

   $url = trim($url);

   $url = strtolower($url);

   // Fix for most recent topics block
   // or else a b is shown in every url
   $find = array('<b>',
      '</b>');
   $url = str_replace ($find, '', $url);

   $url = preg_replace('/<(\/{0,1})img(.*?)(\/{0,1})\>/', 'image', $url);

   $find = array(' ',
      '&quot;',
      '&',
      '\r\n',
      '\n',
      '/',
      '\\',
      '+',
      '<',
      '>');
   $url = str_replace ($find, '-', $url);

   $find = array('é',
      'è',
      'ë',
      'ê',
      'É',
      'È',
      'Ë',
      'Ê');
   $url = str_replace ($find, 'e', $url);

   $find = array('í',
      'ì',
      'î',
      'ï',
      'Í',
      'Ì',
      'Î',
      'Ï');
   $url = str_replace ($find, 'i', $url);

   $find = array('ó',
      'ò',
      'ô',
      'Ó',
      'Ò',
      'Ô');
   $url = str_replace ($find, 'o', $url);

   $find = array('ö',
       'Ö');
   $url = str_replace ($find, 'oe', $url);

   $find = array('á',
      'à',
      'â',
      'Á',
      'À',
      'Â');
   $url = str_replace ($find, 'a', $url);

   $find = array('ä',
       'Ä');
   $url = str_replace ($find, 'ae', $url);

   $find = array('ú',
      'ù',
      'û',
      'Ú',
      'Ù',
      'Û');
   $url = str_replace ($find, 'u', $url);

   $find = array('ü',
       'Ü');
   $url = str_replace ($find, 'ue', $url);

   $find = array('ß');
   $url = str_replace ($find, 'ss', $url);

   $find = array('/[^a-z0-9\-<>]/',
      '/[\-]+/',
      '/<[^>]*>/');

   $repl = array('',
      '-',
      '');

   $url =  preg_replace ($find, $repl, $url);

   $url = str_replace ('--', '-', $url);

   return $url;

}



function rewrite_urls($content)
{

   function if_query($amp)
   {

      if($amp != '')
      {
         return '?';
      }

   }

   $url_in = array('/(?<!\/)viewforum.php\?f=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)\.\/viewforum.php\?f=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)viewtopic.php\?p=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)viewtopic.php\?t=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',

         '/(?<!\/)album_cat.php\?cat_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)album_thumbnail.php\?pic_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)album_pic.php\?pic_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)album_picm.php\?pic_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         //'/(?<!\/)album_showpage.php\?pic_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(<img .*?)<\/a>/e',
         '/(?<!\/)album_showpage.php\?full=&pic_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)album_showpage.php\?pic_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)album_personal.php\?user_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)dload.php\?action=category&cat_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)dload.php\?action=file&file_id=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)kb.php\?mode=cat&cat=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)kb.php\?mode=article&k=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)kb.php\?mode=stats&stats=mostpopular((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)kb.php\?mode=stats&stats=toprated((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)kb.php\?mode=stats&stats=latest((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)press.php\?mode=cat&cat=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)press.php\?mode=article&k=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)press.php\?mode=stats&stats=mostpopular((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)press.php\?mode=stats&stats=toprated((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
         '/(?<!\/)press.php\?mode=stats&stats=latest((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e');

   $url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-ac\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-at\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-apic\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-apm\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         //"'show-pic-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "'image-full-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-aper\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-dc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-df\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-kbc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-kba\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\5') . '-kbsmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
         "make_url_friendly('\\5') . '-kbstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
         "make_url_friendly('\\5') . '-kbsl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
         "make_url_friendly('\\6') . '-pc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\6') . '-pa\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
         "make_url_friendly('\\5') . '-psmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
         "make_url_friendly('\\5') . '-pstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
         "make_url_friendly('\\5') . '-psl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'");

   $content = preg_replace($url_in, $url_out, $content);

   return $content;

}


//
// end keyword urls mod
//

#
#-----[ OPEN ]------------------------------------------
#

includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#

if ( $do_gzip_compress )
{
   //
   // Borrowed from php.net!
   //
   $gzip_contents = ob_get_contents();
   ob_end_clean();

   $gzip_size = strlen($gzip_contents);
   $gzip_crc = crc32($gzip_contents);

   $gzip_contents = gzcompress($gzip_contents, 9);
   $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

   echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
   echo $gzip_contents;
   echo pack('V', $gzip_crc);
   echo pack('V', $gzip_size);
}

#
#-----[ REPLACE, WITH  ]------------------------------------------
#

//
// begin keyword urls mod
//

header ('Expires: 0');
header ('Pragma: no-cache');
header ('X-Powered-By:');
header ('Server:');

if( function_exists(ob_gzhandler) && $board_config['gzip_compress'] == 1)
{
//   $gzip_contents = preg_replace("/(\s+)?(\<.+\>)(\s+)?/", "$2", rewrite_urls(ob_get_contents()));
   $gzip_contents = rewrite_urls(ob_get_contents());
   ob_end_clean();
   header('Vary: Accept-Encoding');
   Header('X-Content-Original-Length: ' . strlen($gzip_contents));
   Header('X-Content-Encoded-By: webmedic page optimizer');
//   $gzip_contents = preg_replace("/<!--[\s\S]*?-->/", "$2", $gzip_contents);
//   Header('X-Content-Clean-Rem-Length: ' . strlen($gzip_contents));
//   $gzip_contents = preg_replace("/(\s+)?(\<.+\>)(\s+)?/", "$2", $gzip_contents);
//   $gzip_contents = preg_replace("/\\r|\\n|\\f/", "", $gzip_contents);
//   Header('X-Content-Clean-Space-Length: ' . strlen($gzip_contents));
//   $gzip_contents = preg_replace("/(\S+)\x20{2,}(?=\S+)/", "$1 ",  $gzip_contents);
//   Header('X-Content-Clean-Space-Inside-Length: ' . strlen($gzip_contents));
   ob_start('ob_gzhandler');
   echo $gzip_contents;
   ob_end_flush();
//   header('Content-Length: '.ob_get_length());
   ob_end_flush();

}
else
{
//   $contents = preg_replace("/(\s+)?(\<.+\>)(\s+)?/", "$2", ob_get_contents());
   $contents = rewrite_urls(ob_get_contents());
   ob_end_clean();
   echo $contents;
   global $dbg_starttime;
}

//
// end keyword urls mod
//


#
#-----[ OPEN ]------------------------------------------
#

/templates/THE TEMPLATE YOUR USING/overall_footer.tpl

#
#-----[ FIND ]------------------------------------------
#

Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group

#
#-----[ REPLACE WITH]------------------------------------------
#

Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group <a href="http://www.webmedic.net/seo-toolkit-vf46.html">SEO toolkit &copy; webmedic</a>


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Back to top
agente



Joined: 09 Sep 2006
Posts: 5

Last Topic problemPosted: Tue Sep 12, 2006 2:29 pm    Post subject: Re: Last Topic problem

and this is the code for last topic:

Code:
<?php
// ############         Edit below         ########################################
$topic_length = '30';   // length of topic title
$topic_limit = '15';   // limit of displayed topics
$special_forums = '0';   // specify forums ('0' = no; '1' = yes)
$forum_ids = '';      // IDs of forums; separate them with a comma

$config_path = '/';   // path to config.php
$root_path = '/forum/';      // link path
// ############         Edit above         ########################################

$path = dirname(__FILE__);
include_once($path.$config_path .'config.php');
mysql_connect($dbhost, $dbuser, $dbpasswd) OR die('Unable to select server.');
mysql_select_db($dbname) OR die('Unable to select database.');

// ############## output ##############
echo '<table width="100%" cellpadding="1" cellspacing="1" border="0" align="center">
          <tr>
                <th colspan="2">Ultimi '. $topic_limit .' messaggi</th>
          </tr>';
// ############## output ##############

$where_forums = ( $special_forums == '0' ) ? '' : 't.forum_id IN ('. $forum_ids .') AND ';
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time
   FROM ". $table_prefix ."topics t, ". $table_prefix ."forums f, ". $table_prefix ."users u, ". $table_prefix ."posts p, ". $table_prefix ."posts p2, ". $table_prefix ."users u2
   WHERE $where_forums t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id
   ORDER BY t.topic_last_post_id DESC LIMIT $topic_limit";
$result = mysql_query($sql);
if( !$result )
{
   die('SQL Statement Error: '. mysql_error());
   exit();
}

$line = array();
while( $row = mysql_fetch_array($result) )
{
   $line[] = $row;
}

for( $i = 0; $i < count($line); $i++ )
{
   $forum_id = $line[$i]['forum_id'];
   $forum_url = $root_path .'viewforum.php?f='. $forum_id;
   $topic_id = $line[$i]['topic_id'];
   $topic_url = $root_path .'viewtopic.php?t='. $topic_id;

   $topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $line[$i]['topic_title'] : substr(stripslashes($line[$i]['topic_title']), 0, $topic_length) .'...';

   $topic_type =  ( $line[$i]['topic_type'] == '2' ) ? 'Announcement ': '';
   $topic_type .= ( $line[$i]['topic_type'] == '3' ) ? 'Global Announcement ': '';
   $topic_type .= ( $line[$i]['topic_type'] == '1' ) ? 'Sticky ': '';
   $topic_type .= ( $line[$i]['topic_vote'] ) ? 'Poll ': '';

   $views = $line[$i]['topic_views'];
   $replies = $line[$i]['topic_replies'];

   $first_time = date('d.m.Y', $line[$i]['topic_time']);
   $first_author = ( $line[$i]['first_poster_id'] != '-1' ) ? '<a href="'. $root_path .'profile.php?mode=viewprofile&amp;u='. $line[$i]['first_poster_id'] .'">'. $line[$i]['first_poster'] .'</a>' : ( ($line[$i]['first_poster_name'] != '' ) ? $line[$i]['first_poster_name'] : 'guest' );
   $last_time = date('d.m.Y', $line[$i]['post_time']);
   $last_author = ( $line[$i]['last_poster_id'] != '-1' ) ? $line[$i]['last_poster'] : ( ($line[$i]['last_poster_name'] != '' ) ? $line[$i]['last_poster_name'] : 'guest' );
   $last_url = '<a href="'. $root_path .'viewtopic.php?p='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id'] .'">'. $last_author .'</a>';

   // ############## output ##############
   echo '         <tr>
                                             
                    </tr>
                   
                   
                    <tr>
                        <td valign="top" nowrap="nowrap"><B><a href="'. $forum_url .'"> '. $line[$i]['forum_name'] .'</a></B>:</td>

                    </tr>
                    <tr>
                       <td valign="top" > '. $topic_type .'<a href="'. $topic_url .'">'. $topic_title .'</a></td>

                    </tr>

                    <tr><td>__________________</td></tr>';
   // ############## output ##############
}

echo '</table>';
mysql_close();
?>
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

Last Topic problemPosted: Tue Sep 12, 2006 4:19 pm    Post subject: Re: Last Topic problem

So you are using the good old webmedic mod rewrite code.

I updated it a while ago, it's 2.3.1 now.

I think you should consider migrating to the phpBB SEO advanced mod rewrite, it will keep the same url standard, will be faster and will not output any pagination duplicate.

In all case, you'll have to preferably include your additional pages to phpbb sessions, in order to be able to call it's functions and rewrite urls, once this is done, you'll need to either update or migrate, so that you'll be able to rewrite urls outside of phpBB pages.

++

_________________
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
mreider
phpBB SEO Team
phpBB SEO Team


Joined: 07 May 2006
Posts: 221

Last Topic problemPosted: Tue Oct 31, 2006 3:56 pm    Post subject: Re: Last Topic problem

When migrating to the advanced rewrite, should you remove the webmedic mod first? Does the mixed rewrite keep the same URL structure? I'm asking because I don't want to deal with the entering keywords (or relying on my users to do that) function included in the advanced version.

Also, the advanced re-write add's categories as folders in the url - That'll break my current links in Google I guess.

Is there a way to 301 re-direct the old urls to the new ones with the category? Or leave the category out all together?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

Last Topic problemPosted: Wed Nov 01, 2006 9:41 am    Post subject: Re: Last Topic problem

The exact steps are to be found here : Migrating from webmedic to phpBB SEO Advanced for the advanced mod.
It's more or less the same with mixed one.

And, topic title injection performed by the zero dupe is more or less the same as what webmedic was doing, but I added the possibility to shorten URL which makes it easier to deal with.

Going for mixed can be wise depending on your general topic title quality. As said, it's more or less the same thing than migrating to advanced, expect you'll have to install a different code.

I you want more details, please start a new migration thread dedicated to the mixed mod rewrite and I'll help you out Wink

++

_________________
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
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: