mixed rewrite mod and persian UTF-8 encoding

Discussions and support about the different URL Rewriting techniques for phpBB2.

Moderator: Moderators

Postby AmirAbbas » Thu Aug 03, 2006 4:30 am

thanks a lot :wink:

and my friend found another bug in advance rewrite mod (UTF-8) version

when you search something , in result page all topic URLs have persian words
in URL. please see this picture

Image

i think i must add format_url() somewhere again :roll:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Advertisement

Postby dcz » Thu Aug 03, 2006 8:26 am

Actually, this was a typo in the install I gave you.

The correct change for search.php are obviously -I forgot to pas the new code in this one) :
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
#

search.php

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

      for($i = 0; $i < count($searchset); $i++)
      {


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

         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_topic_name = format($searchset[$i]['topic_title']);
         $seo_forum_name = format($searchset[$i]['forum_name']);
         // www.phpBB-SEO.com SEO TOOLKIT END


We are close to something stable it seems :D
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Thu Aug 03, 2006 8:45 am

Code: Select all
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_topic_name = format($searchset[$i]['topic_title']);
         $seo_forum_name = format($searchset[$i]['forum_name']);
         // www.phpBB-SEO.com SEO TOOLKIT END


:shock:
i think you forgot _url
i add this part. it works :wink:

DCZ wrote:We are close to something stable it seems :D


we are not close
we reached :wink:
it completely stable. im using it :)
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Thu Aug 03, 2006 9:18 am

amir abbas wrote: :shock:
i think you forgot _url
i add this part. it works :wink:


Jeeeeezzz, I can't believe myself sometime. The hardest seems to write down install scripts :lol:

Anyway, good to hear.

I am glad I'll soon be able to release utf-8 version :D

I'll do it while upgrading 0.0.2 phpBB mod rewrites. I am now designing standard to allow for many more mods support (smartor, some linkdb scripts ...), so I am thinking about how to best plug those.
Besides the 0.0.3 core base won't change much from what you have now :D

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Wed Aug 16, 2006 8:47 am

another part without format_url

Code: Select all
       // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $seo_cat_name = $category_rows[$i]['cat_title'];
         // www.phpBB-SEO.com SEO TOOLKIT END



im using aphrodite style. this style doesn't have category link. im designing a template for my self i found it yesterday

i think the utf package is complete now
i have installed it on two forum
there isn't any problem :wink:
Last edited by AmirAbbas on Wed Aug 16, 2006 9:02 am, edited 1 time in total.
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Wed Aug 16, 2006 8:49 am

amir abbas wrote:i think the utf package is complete know
i have installed it on two forum
there isn't any problem :wink:


Wonderful :D

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Thu Aug 17, 2006 6:08 am

between all members of this community i think im the happiest one :D

see this picture

Image

i have installed advance rewrite mod (utf-8 version) form 2nd august
in only two week i have a link in first page of search result in google for
mybb SEO

i think this mod is definitely more effective that simple rewrite mod
:)
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Thu Aug 17, 2006 9:35 am

Cool :D

And yes, keyword injection is the best for sure ;)


++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Sun Oct 29, 2006 3:20 pm

i think i found another bug
see this part of code
in this topic http://forum.persia-cms.com/topic-vt81.html

Code: Select all
<link rel="chapter forum" href="mobile-phones-vf1.html" title="اخبار سایت Persia CMS" />
<link rel="chapter forum" href="mobile-phones-vf2.html" title="دایرکتوری - Persia CMS Directory" />
<link rel="chapter forum" href="mobile-phones-vf3.html" title="گفتگو پیرامون مسائل سایت Persia CMS" />
<link rel="chapter forum" href="mobile-phones-vf32.html" title="اخبار و اطلاعیه های Hosting" />
<link rel="chapter forum" href="mobile-phones-vf33.html" title="سوالات قبل از خرید" />

<link rel="chapter forum" href="mobile-phones-vf5.html" title="بخش CSS" />
<link rel="chapter forum" href="mobile-phones-vf6.html" title="بخش XHTML و HTML" />
<link rel="chapter forum" href="mobile-phones-vf8.html" title="پشتیبانی phpBB Persia ا (support)" />
<link rel="chapter forum" href="mobile-phones-vf9.html" title="پشتیبانی phpBB فارسی" />
<link rel="chapter forum" href="mobile-phones-vf10.html" title="مقالات آموزشی phpBB" />
<link rel="chapter forum" href="mobile-phones-vf11.html" title="پشتیبانی MyBB فارسی" />
<link rel="chapter forum" href="mobile-phones-vf12.html" title="پشتيباني Drupal فارسی" />
<link rel="chapter forum" href="mobile-phones-vf26.html" title="پشتیبانی e107 فارسی" />
<link rel="chapter forum" href="mobile-phones-vf27.html" title="پشتیبانی mambo فارسی" />
<link rel="chapter forum" href="mobile-phones-vf13.html" title="پشتيباني phpadsnew" />
<link rel="chapter forum" href="mobile-phones-vf14.html" title="اصول و مبانی سئو - SEO principles" />
<link rel="chapter forum" href="mobile-phones-vf15.html" title="تکنیک های سئو - SEO techniques" />
<link rel="chapter forum" href="mobile-phones-vf16.html" title="موتور جستجو های Google , Yahoo! , MSN" />
<link rel="chapter forum" href="mobile-phones-vf17.html" title="تبادل لینک" />
<link rel="chapter forum" href="mobile-phones-vf18.html" title="دایرکتوری ها - directories" />
<link rel="chapter forum" href="mobile-phones-vf19.html" title="ابزار های سئو برای webmaster ها - SEO tools" />
<link rel="chapter forum" href="mobile-phones-vf29.html" title="گوشی های موبایل - Mobile Phones" />

<link rel="chapter forum" href="mobile-phones-vf30.html" title="نرم افزار های تلفن همراه - Mobile Phone Softwares" />
<link rel="chapter forum" href="mobile-phones-vf31.html" title="بازی های تلفن همراه - Mobile Phone Games" />
<link rel="chapter forum" href="mobile-phones-vf20.html" title="اینترنت و وب - internet & web" />
<link rel="chapter forum" href="mobile-phones-vf35.html" title="معرفی Ebook و کتاب" />
<link rel="chapter forum" href="mobile-phones-vf21.html" title="نرم افزار - Software" />
<link rel="chapter forum" href="mobile-phones-vf22.html" title="گفتگوی آزاد" />
<link rel="chapter forum" href="mobile-phones-vf25.html" title="معرفی Site و Weblog اعضا" />
<link rel="chapter forum" href="mobile-phones-vf28.html" title="معرفی اعضای جدید" />
<link rel="chapter forum" href="mobile-phones-vf23.html" title="بازارچه" />
<link rel="chapter forum" href="mobile-phones-vf24.html" title="موسیقی" />


pay attention to href part
the keywords are all the same
this problem is exist in all of my topics
you can check it online of forum.persia-cms.com and forum.irani.ch

i have some page indexed in yahoo in this way
the keyword in URLs is the same and just vt-XX numbers are different
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Sun Oct 29, 2006 3:28 pm

Sorry, this one was missed by quite some of us it seems.

Anyway, I PM you the Zero duplicate code right now so this will get fixed in no time ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Fri Nov 03, 2006 3:50 am

Code: Select all
#
#-----[ OPEN ]------------------------------------------
#

includes/function.php


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

                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                        'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),

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


                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        //'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),
                        'url' => append_sid(format_url($forum_rows[$j]['forum_name']) . "-vf" . $forum_rows[$j]['forum_id'] . ".html") ,
                        // www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]------------------------------------------
#


viewtopic.php


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

$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
   'url' => $view_prev_topic_url,
   'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
   'url' => $view_next_topic_url,
   'title' => $lang['View_next_topic']
);


#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($userdata['session_logged_in']) {
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
   'url' => $view_prev_topic_url,
   'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
   'url' => $view_next_topic_url,
   'title' => $lang['View_next_topic']
);
}
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


its a first time is see this codes
you sent me advance rewrite mod UTF-8 and it wasn't included in that PM :)

and there is a problem

when you haven't any english word in title of forums and topics the system will use word "empty" instead of words "topic" or "forum"

for example

Code: Select all
<link rel="chapter forum" href="empty-vf23.html" title="بازارچه" />
<link rel="chapter forum" href="empty-vf24.html" title="موسیقی" />


and second problem

subforums has problem and the keywords are wrong for them
for example

Code: Select all
<link rel="chapter forum" href="phpbb-vf25.html" title="معرفی Site و Weblog اعضا" />
<link rel="chapter forum" href="phpbb-vf28.html" title="معرفی اعضای جدید" />


these two forums are subforum. the keyword for first one must be "site-weblog" and for second one must be "topic" but as you can see they have problem
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Fri Nov 03, 2006 10:29 am

oups, true.

So first, simple sub forum updated which gives, for the UTF-8 version :


Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );

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

                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $seo_forum_name = format_url($forum_rows[$k]['forum_name']);
                        // www.phpBB-SEO.com SEO TOOLKIT END
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );


You could do the same with the regular nav links :
Code: Select all
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $seo_forum_name = format_url($forum_rows[$j]['forum_name']);
                        // www.phpBB-SEO.com SEO TOOLKIT END
                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                     
                        'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),


Instead of :

Code: Select all
                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        //'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),
                        'url' => append_sid(format_url($forum_rows[$j]['forum_name']) . "-vf" . $forum_rows[$j]['forum_id'] . ".html") ,
                        // www.phpBB-SEO.com SEO TOOLKIT END


I think we sorted out everything now :D

And don't worry, the zero dupe is with us ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Fri Nov 03, 2006 1:08 pm

it doesn't work

this code

Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );

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

                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $seo_forum_name = format_url($forum_rows[$k]['forum_name']);
                        // www.phpBB-SEO.com SEO TOOLKIT END
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );


doesn't any affect

and after applying this part:
Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $seo_forum_name = format_url($forum_rows[$j]['forum_name']);
                        // www.phpBB-SEO.com SEO TOOLKIT END
                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                     
                        'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),


all nav link will lose keywords again (keywords came back to wrong form shape)
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Sat Nov 04, 2006 8:42 am

Let's try the Global trick before I go for another method for utf-8 :


In the same file find :
Code: Select all
function make_jumpbox_ref($action, $match_forum_id, &$forums_list)
{
   // End Simple Subforums MOD
   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;


And replace with :

Code: Select all
function make_jumpbox_ref($action, $match_forum_id, &$forums_list)
{
   // End Simple Subforums MOD
   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID, $seo_forum_name;


++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21378
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Mon Nov 06, 2006 3:43 am

thanks

i applied this one

Code: Select all
#
#-----[ OPEN ]------------------------------------------
#

includes/function.php


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

                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                        'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),

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


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

#
#-----[ FIND ]------------------------------------------
#
                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );

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

                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        $seo_forum_name = format_url($forum_rows[$k]['forum_name']);
                        // www.phpBB-SEO.com SEO TOOLKIT END
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );

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


function make_jumpbox_ref($action, $match_forum_id, &$forums_list)
{
   // End Simple Subforums MOD
   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;
   

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

function make_jumpbox_ref($action, $match_forum_id, &$forums_list)
{
   // End Simple Subforums MOD
   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID, $seo_forum_name;

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


viewtopic.php


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

$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
   'url' => $view_prev_topic_url,
   'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
   'url' => $view_next_topic_url,
   'title' => $lang['View_next_topic']
);


#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($userdata['session_logged_in']) {
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;view=next");

//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
   'url' => $view_prev_topic_url,
   'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
   'url' => $view_next_topic_url,
   'title' => $lang['View_next_topic']
);
}
// www.phpBB-SEO.com SEO TOOLKIT END


it works :wink:
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

PreviousNext

Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 7 guests