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  
 
   
mixed rewrite mod and persian UTF-8 encoding
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Tue Jul 25, 2006 8:45 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

Very Happy

Tell me for the sub forum add on, I think it's pretty easy to mod to 0.0.3, but tell me if you encounter difficulties Wink

Anyway, I'll upgrade the add ons with the mod rewrite.

I am glad to provide such UTF-8 solution.

I'll release both mixed and advanced mod rewrites for UTF-8 char-set Very Happy

++

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


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Wed Jul 26, 2006 6:28 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

i do exactly everything you said
for google sitemap
i opened sitemap_forums.php and i found this part

Code:
$topic_title_tmp = format_url($topic['topic_title'])


and i add ";" at the end of the line
it starts to work but there is a problem
see this picture




as you can see on that part all english keywords are replaced by word "forum"

for MX sitemap module
i opened all files and i found this part of codes and i add format_url()


Code:

$seo_forum_name = FALSE;
2 times in sitemaps.php
(i have not changed this two line because adding format_url cause error in this two line)


sitemaps_functions.php
// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name = format_url($forum_title_tmp);
// phpBB-SEO.com SEO TOOLKIT END

// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_topic_name = format_url($topic_title_tmp);
// phpBB-SEO.com SEO TOOLKIT END


sitemapIndex.php
// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_cat_name = format_url($title['sm_title']);
// phpBB-SEO.com SEO TOOLKIT END

forumSitemaps.php
// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name = format_url($forum_name);
// phpBB-SEO.com SEO TOOLKIT END

// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_topic_name = format_url($topic_title);
// phpBB-SEO.com SEO TOOLKIT END

forumsIndex.php
// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_cat_name = format_url($category_rows[$i]['cat_title']);
// phpBB-SEO.com SEO TOOLKIT END

// phpBB-SEO.com SEO TOOLKIT BEGIN
$seo_forum_name = format_url($forum_name);
// phpBB-SEO.com SEO TOOLKIT END


and for simple subforum i use this one

Code:
#
#-----[ OPEN ]------------------------------------------
#


index.php

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

      // Append new entry
      $data[] = array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#

         // phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_forum_name = format_url($forum_data['forum_name']);
         // phpBB-SEO.com SEO TOOLKIT END

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

viewforum.php

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

      if( $all_forums[$i]['forum_id'] == $parent_id )
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#

               // phpBB-SEO.com SEO TOOLKIT BEGIN
               $seo_forum_name = format_url($all_forums[$i]['forum_name']);
               // phpBB-SEO.com SEO TOOLKIT END

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

if( $total_forums )
{

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // phpBB-SEO.com SEO TOOLKIT BEGIN
   $seo_forum_name = format_url($forum_row['forum_name']);
   // phpBB-SEO.com SEO TOOLKIT END


#
#-----[ FIND ]------------------------------------------
#
         $template->assign_block_vars('catrow.forumrow',   array(
            'ROW_COLOR' => '#' . $row_color,
            'ROW_CLASS' => $row_class,

#
#-----[ BEFORE, ADD ]------------------------------------------
#

         // phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_forum_name = format_url($subforum_data[$j]['forum_name']);
         // phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]------------------------------------------
#
#

viewtopic.php

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

      if( $all_forums[$i]['forum_id'] == $parent_id )
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#

               // phpBB-SEO.com SEO TOOLKIT BEGIN
               $seo_forum_name = format_url($all_forums[$i]['forum_name']);
               // phpBB-SEO.com SEO TOOLKIT END
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


is it correct ?
and another problem in MX sitemap module
after i turned rewrite rules on, forum-map urls stop working and i recieved 404 error
the forum-map urls are like this one

-http://localhost/Persia/web-design-fmp2.html

pay attention to fmp2 at the end of the line, that part is extra. i think that part cause the problem
im using this rewrite rule for mx site map

Code:

#########################################################
# MX SITEMAPS REWRITE RULES            #
#########################################################

########################################################
RewriteRule ^sitemaps([0-9]+)\.html$ /persia/sitemaps.php?c=$1 [QSA,L]
RewriteRule ^sitemaps\.html$ /persia/sitemaps.php [QSA,L]
RewriteRule ^forum-map\.html$ /persia/sitemaps.php?fim [QSA,L]
RewriteRule ^forum-map([0-9]+)-([0-9]+)\.html$ /persia/sitemaps.php?fmp=$1&start=$2 [QSA,L]
RewriteRule ^forum-map([0-9]+)\.html$ /persia/sitemaps.php?fmp=$1 [QSA,L]
#########################################################
# END SITEMAPS REWRITE RULES            #
#########################################################

the original one has some \ between character m and a in word forum-map.
i removed them because that \ caused problem

original rewrute rules
Code:

RewriteRule ^sitemaps([0-9]+)\.html$ /persia/sitemaps.php?c=$1 [QSA,L]
RewriteRule ^sitemaps\.html$ /persia/sitemaps.php [QSA,L]
RewriteRule ^forum-m\ap\.html$ /sitemaps.php?fim [QSA,L]
RewriteRule ^forum-m\ap-([0-9]+)-([0-9]+)\.html$ /sitemaps.php?fmp=$1&start=$2 [QSA,L]
RewriteRule ^forum-m\ap-([0-9]+)\.html$ /sitemaps.php?fmp=$1 [QSA,L]


and problem that i mentioned in picture 5 in my previous post is exist

at last. when i click on topic url, the word "?highlight=" add to the end of urls
whats this ?

-http://localhost/Persia/topic-vt22.html?highlight=
-http://localhost/Persia/just-for-test-vt3.html?highlight=

i removed highligh function completely because it doesn't work for UTF-8 at all
i used this trick for removing highlight function
http://boards.phpbb-seo.com/phpbb-forum/discussions-vt20.html

just it
if i find another bugs i will report it here

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Wed Jul 26, 2006 9:35 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

All right, the full pack will thus be ready before I even release 0.0.3 Wink

Sorry for all these problems you encounter, but we'll solve all of them Very Happy


So for the mx Google sitemaps module, Sorry another typo one :


It's for forum URLs, as you pointed out :

Find :

Code:
            $forum_urls = $server_url . 'viewforum.' . $phpEx . '?f=' . $forum_id;


replace with :

Code:
            $forum_title_tmp = format_url($forum_datas[$j]['forum_name']);
            $forum_urls = $server_url . ( ($forum_title_tmp != 'empty') ?  $forum_title_tmp : 'forum' ) . '-vf' . $forum_id . '.html';


Then, the replaces you suggested should be ok for sitemaps and sub forum. It should work.

Then, if you get a 404 on url like theses : -http://localhost/Persia/web-design-fmp2.html it means you did it to un-comment the mx sitemaps lines in append_sid() Wink

This means you need to advanced rewriterules from here.


Code:
RewriteRule ^Persia/sitemaps([0-9]+)\.html$ /Persia/sitemaps.php?c=$1 [QSA,L]
RewriteRule ^Persia/sitemaps\.html$ /Persia/sitemaps.php [QSA,L]
RewriteRule ^Persia/forum-map\.html$ /Persia/sitemaps.php?fim [QSA,L]
RewriteRule ^Persia/.+-fmp([0-9]+)-([0-9]+)\.html$ /phpbb/sitemaps.php?fmp=$1&start=$2 [QSA,L]
RewriteRule ^Persia/.+-fmp([0-9]+)\.html$ /Persia/sitemaps.php?fmp=$1 [QSA,L]
RewriteRule ^Persia/.+-sc([0-9]+)\.html$ /Persia/sitemaps.php?c=$1 [QSA,L]


Together with the auto link add on

I WILL make it easier to install for 0.0.3 Wink

For your topic link, it's either coming from viewtopic if you did not change the code as proposed or from search.php.

If so look for :

Code:
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $searchset[$i]['topic_id'] . "&highlight=$highlight_active");


and change it to :

Code:
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $searchset[$i]['topic_id'] );


if you want ot completely get rid of $highlights.

But this part was left untouched so far, I'll just add this last replace.

Very Happy

++

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


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Fri Jul 28, 2006 8:40 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

thanks

all the problems are solved Very Happy

i searched for this part of code

Code:
$forum_urls = $server_url . 'viewforum.' . $phpEx . '?f=' . $forum_id;


i could find it but that line was commented
i found this part of code below that line


Code:
$forum_title_tmp = format_url($forum_data['forum_name']);
            $forum_urls = $server_url . ( ($forum_title_tmp != 'empty') ?  $forum_title_tmp : 'forum' ) . '-vf' . $forum_id . '.html';


i changed that part by new one
it started to work Smile


for mx sitemap i used new rewrite rules and it started to work too like google site map

for that emplty highlight, excuse me tat was my fault. that empty highlight came form viewtopic.php. i forgot to add some part of rewrite mod to wviewtopic.php

everything is OK now

just two thing

problem that i mentioned in my post (picture number five) is not solved

and another
when i use jumpbox the urls change to phpbb vanilla with SID Shocked
you have this problem in your forum too Rolling Eyes
please use jumpbox and see the url

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Fri Jul 28, 2006 9:09 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

amir abbas wrote:
thanks

all the problems are solved Very Happy


Good Very Happy

amir abbas wrote:

just two thing

problem that i mentioned in my post (picture number five) is not solved

and another
when i use jump-box the urls change to phpbb vanilla with SID Shocked
you have this problem in your forum too Rolling Eyes
please use jump-box and see the url


Sorry, but I am not sure which one is number five here Wink

And for the jump-box, bots never see them, they are not rewritten with mixed and advanced mod rewrite as it would mean to perform quite some injecting for all those links bots don't see.

As you know, I do care about performances and only rewrote necessary links so far.

We'll see what to do about this one, it's for sure rewritable, but I don't think I'll release more than an extra patch for such links, as I do not myself rewrite them here. There is absolutely no need to rewrite those to Search Engine optimise a web site.

Anyway, there will be a trick for that in the zero dupe 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
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Fri Jul 28, 2006 9:17 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

ok picture five is this



the url in status bar is diffrent form url itself


and jumpboxes

they are not important
i removed all of them form guest view

performance and speed of forum is more important than that unuseful
jumpboxes

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Fri Jul 28, 2006 10:51 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

All right.

For the jump box, you don't really need to get rid of it for guest, it's a form, bots don't use forms Wink

Then I still do not really get it for the problem.

I understand you are saying a link is not rewritten as it should.

The link you show is not a default link, it looks like the today at yesterday at mod but I am not sure here.

I don't have those in the premod you sent, so I guess it's no big deal to solve once I'll have understood more about it 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
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Sun Jul 30, 2006 11:09 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

ok

the problem is this

when you have installed today/yesterday hack and you have subforum
when you put your mouse pointer on title of topic in subforum, you will see wrong url
see this picture



as you can see the URL of that topic in subforum must be this
-http://localhost/Persia/topic-vt37.html
but the that URL is
-http://localhost/Persia/phpbb-seo-site-vt37.html

that topic doesn't contain any english word
the system are using the keyword in first post in parent forum. pay attention to number 3 in picture
the vt number is correct but the keyword of topic is borrowed from the first post of parent forum

now i clicked on that topic (number 1 in picture)
see this picture



just it
i used today/yesterday hack because i thought that if we have some keyword for each topic in index page can be helpful but i found out that forum are active and having topic title in index page is useless
you have something interesting in your forum
when i put my pointer in small
i can see the topic title. how can i do it. i can use it instead of today/yesterday hack



and another request
three friend of mine are interested in using advance rewrite mod (utf-8 version)
all of them are using simple rewrite mod
can you make a redirect rule for redirecting all old simple rewrite url to first page of the forum ?

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Sun Jul 30, 2006 12:11 pm    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

Ok, so this is a sub forum vs today yesterday at mod, and this is not linked to the utf-8 version I think.

Could you send me a copy of your viewforum.php file ?

This will be the easiest.

Then, for migrating without any arm at all, the Zero dupe program I plan to soon start will be the solution to migrate from any type of url Wink

I thus think your friends should wait a bit 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
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Sun Jul 30, 2006 12:17 pm    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

OK thanks

link of viewforum.php

-http://rapidshare.de/files/27544532/viewforum.zip.html

Wink

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Mon Jul 31, 2006 1:19 pm    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

Open :
Code:

viewforum.php


find :

Code:
      // append first 18 characters of topic title to last topic data 


After add :

Code:
                // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                $subforum_data[$j]['topic_title'] = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $subforum_data[$j]['topic_title']) : $subforum_data[$j]['topic_title'];
                $seo_topic_name = format_url($subforum_data[$j]['topic_title']);
                // www.phpBB-SEO.com SEO TOOLKIT END


And that should be it 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
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Mon Jul 31, 2006 2:02 pm    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

THANKS Wink



it works like a charm

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Tue Aug 01, 2006 10:45 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

Very Happy

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


Joined: 11 May 2006
Posts: 529
Location: IRAN

mixed rewrite mod and persian UTF-8 encodingPosted: Wed Aug 02, 2006 7:02 am    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

hello


i asked a question in this post

http://boards.phpbb-seo.com/phpbb-forum/discussions-vt161.html#1240

the problem is about topics anywhere and advance rewrite mod UTF-8 version
you asked me to add a post here Wink

and finally i installed advance rewrite mod UTF-8 with all other SEO mod on this forum

http://forum.irani.ch

Razz

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14327

mixed rewrite mod and persian UTF-8 encodingPosted: Wed Aug 02, 2006 8:48 pm    Post subject: Re: mixed rewrite mod and persian UTF-8 encoding

In fact I think I though wrong, we'll have to build up a dedicated version of the topic anywhere mod for the utf-8 advanced mod rewrites.

So I did not see it at first sorry.

Then, for topic anywhere open :

topics_anywhere.php

Find :

Code:
            $seo_topic[$i] = format_url($data[$i]['topic_title']);
            $seo_forum[$i] = format_url($data[$i]['forum_name']);


Replace with :

Code:
            $seo_top_tmp = format_url($data[$i]['topic_title']);
            $seo_for_tmp = format_url($data[$i]['forum_name']);
            $seo_topic[$i] =($seo_top_tmp == 'empty' ) ? 'topic' : $seo_top_tmp;
            $seo_forum[$i] = ($seo_for_tmp == 'empty' ) ? 'forum' : $seo_for_tmp;


and you should be done 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 3 of 5 Goto page Previous  1, 2, 3, 4, 5  Next

Navigation Similar Topics

Jump to: