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  
 
   
Topic on Index - rewrite

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
::  
Author Message
zinnerz
PR0
PR0


Joined: 08 Jun 2006
Posts: 75

Topic on Index - rewritePosted: Sat Jan 27, 2007 2:20 am    Post subject: Topic on Index - rewrite

Dear Dcz,

I'm using phpBB 2.0.22 with Last Topic Title on Index v1.0.1, but the topic title In: topic title link is not rewritten.



please help, thanks Smile

topic on index mod: (I cannot search it on phpBB)
http://rapidshare.com/files/13566546/topic_on_index_101.mod.html
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Topic on Index - rewritePosted: Sat Jan 27, 2007 1:11 pm    Post subject: Re: Topic on Index - rewrite

So if it's this Last Topic Title on Index mod, then do the following (only required for the phpBB SEO advanced mod rewrite) :


Open :

Code:
index.php


Find :

Code:
                     if (!$auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
                        {
                           $lttitle = '';
                           $lang_in = '';
                         }

                     // append first 25 characters of topic title to last topic data
                        $lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;

                        $last_post .= $lang_in . '&nbsp;' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';


Replace with :

Code:
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        if ($auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
                        {
                           if (!isset($phpbb_seo->seo_url['topic'][$ltid]) ) {
                              $phpbb_seo->seo_url['topic'][$ltid] = $phpbb_seo->format_url($lttitle);
                           }
                           // append first 25 characters of topic title to last topic data
                           $lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;

                           $last_post .= $lang_in . '&nbsp;' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
                            }
                        // www.phpBB-SEO.com SEO TOOLKIT END



Updating from the 0.0.2 to 0.2.0 patched would just be to find in index.php :

Code:
                           $seo_topic_name = $lttitle;


And replace with :
Code:

                           if (!isset($phpbb_seo->seo_url['topic'][$ltid]) ) {
                              $phpbb_seo->seo_url['topic'][$ltid] = $phpbb_seo->format_url($lttitle);
                           }


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


Last edited by dcz on Sat Jan 27, 2007 5:48 pm; edited 1 time in total
Back to top
Visit poster's website
zinnerz
PR0
PR0


Joined: 08 Jun 2006
Posts: 75

Topic on Index - rewritePosted: Sat Jan 27, 2007 5:44 pm    Post subject: Re: Topic on Index - rewrite

I have tried it carefully, but it says:

Code:
Parse error: syntax error, unexpected '{' in D:\Project\htdocs\phpbb\index.php on line 463
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Topic on Index - rewritePosted: Sat Jan 27, 2007 5:47 pm    Post subject: Re: Topic on Index - rewrite

oups, forgot a braquet, replace :

Code:
                           $seo_topic_name = $lttitle;


with :


Code:
                           if (!isset($phpbb_seo->seo_url['topic'][$ltid]) ) {
                              $phpbb_seo->seo_url['topic'][$ltid] = $phpbb_seo->format_url($lttitle);
                           }


instead 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
zinnerz
PR0
PR0


Joined: 08 Jun 2006
Posts: 75

Topic on Index - rewritePosted: Sat Jan 27, 2007 6:01 pm    Post subject: Re: Topic on Index - rewrite

You are GREAT Wink

Thanks so much..
Back to top
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Topic on Index - rewritePosted: Fri Feb 09, 2007 2:30 pm    Post subject: Re: Topic on Index - rewrite

hello.

dcz. I not find.

using "Last Topic Title on Index 1.0.4"
and phpBB SEO Advanced mod Rewrite 0.2.2

and
viewtopic.php?t=407
must be
topic-title-t407.html



please help me
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Topic on Index - rewritePosted: Fri Feb 09, 2007 3:30 pm    Post subject: Re: Topic on Index - rewrite

Did you try this post's code ?

_________________
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
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 161
Location: Turkey

Topic on Index - rewritePosted: Fri Feb 09, 2007 3:33 pm    Post subject: Re: Topic on Index - rewrite

yes dcz. Crying or Very sad

but

Code:
#
#-----[ FIND ]------------------------------------------
#
                        $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
#
#-----[ REPLACE WITH ]------------------------------------------
#
               //-- MOD BEGIN: Last Topic Title on Index -------------------
                        $ltid = $forum_data[$j]['topic_id'];
                        $lttitle = $forum_data[$j]['topic_title'];

                  //
                  // Censor topic title
                  //
                        if ( count($orig_word) )
                        {
                           $lttitle = preg_replace($orig_word, $replacement_word, $lttitle);
                        }
                        $altlttitle = $lttitle;
                        $lang_in = $lang['in'];

                  //
                  // Filter topic_title if not allowed to read
                  //
                        if (!$auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
                        {
                           $lttitle = '';
                           $lang_in = '';
                         }

                  // undo_htmlspecialchars();
                        $lttitle = preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $lttitle);

                  // do_htmlspecialchars();
                  // set length of topic title to 25 characters
                        $lttitle = preg_replace($html_entities_match, $html_entities_replace, (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle);

                        $last_post .= $lang_in . '&nbsp;' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';

                        $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? $lang['by'] . '&nbsp;' . ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : $lang['by'] . '&nbsp;' . '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

               //-- MOD END: Last Topic Title on Index -------------------


nof find.

NOTE: Problem solved. very thanks dcz. Smile
please see www.lavinya.net/phpBB2/
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

Topic on Index - rewritePosted: Fri Feb 09, 2007 4:57 pm    Post subject: Re: Topic on Index - rewrite

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  » Advanced mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: