كيف أن يزيل ساحة وموضوع الكلمة المفتاح من [بّبرسّ] [أورل]
حاول أنا تلقّى يكون حصة من ساحة برمجيّات (حوالي 5 حتّى الآن) من يوم الجمعة متأخّرة وكان اختبر [بّبرسّ] بالأمس. يتلقّى ال [فرسون9.إكس] جديدة حصة التحسين على ه [8.إكس] صيغة غير أنّ واحدة شيء أنا أسّست عامة في [بوث وف ثم]
- "ساحة" ألحقت الكلمة المفتاح كان عندما أنت [أكّسّس] أيّ ساحة [إ.غ] http://sitename.com/< [فوروم-ديركتوري]>/ساحة/<ساحة كتلة معدنيّة>
- "موضوع" ألحقت الكلمة المفتاح كان أيضا ل كلّ موقعة يجعل [إ.غ] http://sitename.com< [فوروم-ديركتوري]>/موضوع/<واقعيّا موضوع كتلة معدنيّة>
الآن يفهم أنا لما كلا الالكلمة المفتاح يكونون [رقيرد] غير أنّ ثانية من [سو] نقطة هو يتلقّى ما من معنى ما لم واحد ما يركض ساحة على "ساحات" موضوع. كان الشيء تالية أنا أتمّت نظرة حوالي لفأس ولحسن الحظّ في هذا موقعة كان هناك حل , غير أنّ لا حقيقيّة ساندت [بلوجن] كان. أنا نسخت الرمز يعطى هناك ويختبر حوالي وكان ناجحة.
قبل أن يبدأ أنا, أنا يتلقّى فقط أختبر حوالي مع الرمز يعطى ب ال [ممبرس] هناك. هكذا اختبرت هو قبل أن يستعمل أنت هو. وفضلا عن ذلك لا يساند أنا هو بما أنّ أنا لم أجعل هو وإنحراف يتمّ هو أحد.
أنا جعلت [بلوجن] من الرمز يعطى وأخذ [ر-وريت] رمز ل [.هتكّسّ] مبارد. هنا كيف هم ينظرون
[بلوجن]: (يأخذ من الساحة خطوة)
<? [فب]
/*
اسم [بلوجن]: أزلت موضوع ساحة
[بلوجن] [أوري]: http://bbpress.org/
وصف: يسمح أن يزيل ساحة وموضوع كلمة في [أورل]
مؤلفة: [أشيش] [موهتا]
صيغة: 1.0
مؤلفة [أوري]: http://www.technospot.net/blogs/
*/عمل [مجتفوروملينكفيلتر] ([$لينك], [$فوروميد]=0) {
//retrieve الساحة شيء
[$فوروم]=[جتفوروم] ([جتفوروميد] ([$فوروميد]));//check لصياغة جديدة
[$روريت]=[بّجتوبأيشن] (`[مودروريت]');
إن ([$روريت]) {
//what نوع الصياغة جديدة هناك? كتلة معدنيّة إستعمال "[فورومسلوغ]" عمود, وإلّا العمود "[فوروميد]"
[$كلومن]=([$روريت] ===' كتلة معدنيّة')? (' [فورومسلوغ]'): (' [فوروميد]');// غيّرت /forum/pets-discussions في /pets-discussions
// [مودّد] هذا عمل فقط إن الصياغة جديدة وحدة نمطيّة يكون!
// ويريد هذا عمل فقط إن ال لطم اسم أبدا
// كلمة متحفّظة مثل "[رسّ]" أو "[بّ-يمجس]"
// and this is achieved by a filter on bb_slug_sanitize
$link = str_replace(’forum/’ . $forum->$column , $forum->$column, $link);
}
return $link.”/”; // Very important line! // Added extra slash :Ashish
}add_filter( ‘get_forum_link’, ‘my_get_forum_link_filter’ );
function my_get_topic_link_filter( $link, $topic_id = 0) {
//retrieve the topic object
$topic = get_topic( get_topic_id( $topic_id ));//retrieve the forum object that is the topic container
$forum = get_forum( get_forum_id( $topic->forum_id ));//check for rewrite
$rewrite = bb_get_option( ‘mod_rewrite’ );
if ( $rewrite ) {
//what kind of rewrite there is? slug use “forum_slug” column, else the column is “forum_id”
$column = ($rewrite === ’slugs’)?(’forum_slug’):(’forum_id’);//create the “forum/pets-discussions” chunk to show the hierarchical relation forum->topic
$forum_nice_uri = “forum/” . $forum->$column . “/”;//attach the hierarchical chunk to the link
$link = str_replace(bb_get_option(’uri’), bb_get_option(’uri’) . $forum_nice_uri, $link);// change /forum/pets-discussions/topic/my-sweet-dog in /pets-discussions/my-sweet-dog
// this work only if the rewrite module is modded!
// and this work only if the slugged name will NEVER
// be a reserved word like “rss” or “bb-images”
// and this is achieved by a filter on bb_slug_sanitize
$link = str_replace(’forum/’ . $forum->$column , $forum->$column, $link);
$link = str_replace(’topic/’ . $topic->$column , $topic->$column, $link);
}return $link.”/” ; // Very important line! // Added Extra Slash :Ashish
}add_filter( ‘get_topic_link’, ‘my_get_topic_link_filter’ );
function my_bb_slug_sanitize_filter( $text_slug, $text_original = ”, $length = 0 ) {
// add “r-” by regex when the string begins with “bb-” or “my-” or is a reserved word
return preg_replace(’/^(my-.*|bb-.*|rss|tags|view|profiles)$/’, ‘r-$1′, $text_slug);
}add_filter( ‘bb_slug_sanitize’, ‘my_bb_slug_sanitize_filter’ );
?>
.htcaccess file:
( Taken from one same forum link and modified a little. You will need to remove the MULTIVIEW from your existing .htaccess file )
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forumsOptions +FollowSymlinks
RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ tags.php?tag=$1&page=$2 [L,QSA]
RewriteRule ^tags/([^/]+)/?$ tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ tags.php [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ profile.php?id=$1 [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ view.php?view=$1&page=$2 [L,QSA]
RewriteRule ^view/([^/]+)/?$ view.php?view=$1 [L,QSA]
RewriteRule ^rss/?$ rss.php [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ rss.php?profile=$1 [L,QSA]RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$ topic.php?id=$2&page=$3 [L,QSA]
RewriteRule ^([^/.]+)/([^.]+)/?$ topic.php?id=$2 [L,QSA]RewriteRule ^([^/.]+)/page/([0-9]+)/?$ forum.php?id=$1&page=$2 [L,QSA]
RewriteRule ^([^/.]+)/?$ forum.php?id=$1 [L,QSA]
</IfModule>
Place the plugin file in my-plugin directory and .htaccess file in bbpress root directory. Active the plugin. and it should work fine.
The Problem I find with this.
- The Link to BBpress admin board link does not work from main site. It redirects to home page. You will need to manually type the link to go inside.
- In case you type something which does not exists as http://sitename.com/<bbpress-directory>/sdaksda it returns http://sitename.com/<bbpress-directory>// . An extra slash.
Except these 2 there is no problem I see so far but Its not easy to predict as I dont have lot of posts or users. So if you want to try it out download the files here . You can give your feedback here if you can improve it. And If somebody wants they can support the plugin and enhance it. You can see demo of this on the forum I tested on but You wont be able to register and anyways it just a test forum
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Posted on 4th April 2008 by Ashish Mohta , A tech blogger who writes about solving day to day problems of people who use computer. He also writes on How to use the applications like Office, PC tips, Online tools,Browsers and more. All posts by Ashish Mohta | Connect with me @
Twitter |
Linkedin |
Facebook |
Stumble
![[تشنوسبوت] علامة تجاريّة](
http://img.technospot.net/assets/technospotbig.jpg)























Free Email Subscription
Thanks! It works wonders. Running it now on the community site Callofduty.se. Your sh*t is the only EASY solution to this problem – thanks again!
(Running it with bbPress 1.01 if anyone would like to know)
Leave your response!