miniBB ® 


Support Forums
 | Start | Register | Search | Statistics | File Bank | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  

Keywords-rich URLs

Page  Page 1 of 3:  1  2  3  Next »

Author Guest
#1 | Posted: 26 Aug 2009 12:26 
Is it posible to make that script would automaticaly replaced some non-latin simblols to latin.
Lets say if the title for a topic is "nėožolič" script would have replaced it to "neozolic".
Now the script simply strips non-latin letters.

Author Paul
Lead Developer 
#2 | Posted: 26 Aug 2009 13:52 
It's of course possible, but you need to implement it yourself some way, modifying convertTitle() function of the mod_rewrite module. All replacement happen here; unfortunately I don't have such symbols available and can't provide the exact example.

Author Paul
Lead Developer 
#3 | Posted: 27 Aug 2009 05:08 
Actually, the string which replaces all non-valid symbols, is this one:

$topicTitle=preg_replace('#[^a-z0-9._ ]#', '', $topicTitle);
It replaces everything which is not an alphanumeric char, dot, underscore, or space.
I guess for converting your custom symbols into alphanumeric ones, first you must make sure that the topic is posted in the proper encoding, and all such symbols are really present in its title.

Then BEFORE the line I mentioned above, you need to paste something like

$topicTitle=str_replace(array('ė', 'ž', 'č'), array('e', 'z', 'c'), $topicTitle);
So you have to specify all symbols to replace in such manner.

Author Guest
#4 | Posted: 27 Aug 2009 08:15 
Is there a way to use underscores instead of dashes in such URLs?

I've read this blog post here and I think it could work:

Author tom322
Active Member
#5 | Posted: 27 Aug 2009 09:41 
I'm sure there's an easy way to change the function to use underscores rather than dashes. But in this aspect it's for SEO dumbs ;). I encountered a few websites that don't use anything (just a hard space) between the words in URL; I can imagine such sites don't get any links because it's practically impossible to make it an active link. I wonder why the blog poster didn't mention that and doesn't use such a language-perfect approach ;).

Keywords in URL are to help get the idea what the page is about - they are not designed to be read as normal text.

Author Paul
Lead Developer 
#6 | Posted: 28 Aug 2009 02:20 
It must be simple :-)

It all happens in the same convertTitle() function. Just search this function only for all places where there are '-' or [-] mentioned, and replace them to '_' or [_].

Author lvalics
#7 | Posted: 27 Sep 2009 14:13 
Unfortunatelly is not working for me, I upgraded to new version the site, and if I activate version 1 or 2 or 3, I get redirect loop.
Before updated the files, with old version and just the hack worked, so is strange. I will investigate this and if is something what can be a bug I will report.

Now is old .htaccess to be sure is working.

Author Paul
Lead Developer 
#8 | Posted: 28 Sep 2009 02:37 
Redirect loop is quite a common issue when you set up REPLACE_PATH parameter incorrectly.
You just need to debug it a bit and see, what kind of URL generates and to what kind URL it compares. For example, you may edit bb_func_vtopic.php and before the code which says

paste debug info:

echo "$requestUrl $origUrl"; exit;
Probably comparing what URLs are generated, you could get the clue where the add-on is set up wrong.

I must mention that versions 2 and 3 of this add-on will not work automatically, like when you copy them on server and that's all. They require additional configuration, README clearly says about all that.

Author jontrac
#9 | Posted: 11 Nov 2009 03:27 
Dear Paul,

I've been trying to get this working for my Vietnamese board. However, I am having trouble with the transforming non-latin to latin characters.

In addon_mod_rewrite.php, I've added:



$topicTitle=str_replace($Viet, $nonViet, $topicTitle);
Ắ => A
Ẫ => A
Ở => O


But there are some cases that it does not work:
Á => " "
Ơ => " "
Ì => " "


Do you know why the script is not working for some special cases?


Author Paul
Lead Developer 
#10 | Posted: 11 Nov 2009 07:01 
First of all, I don't recommend to set up this add-on for non-English forums at all. You won't rich a lot of search engine traffic if you set up the characters transforming them from native Vietnamese to something else. Use short numbers-only URLs and you will rich the same results.

Anyway, if you decide to set up non-English symbols, then you need to follow all International URL rules. I guess first of all you need to set up your forums in UTF-8 mode. Then you need to modify add-on's file in UTF-8 mode and provide all those symbols as UTF-8 characters. Then on return statement of the $topicTitle, you should use urlencode() function. I.e.

Since I'm not mad enough to try it on my side, I don't have any more recommendations so far ;-)

Author jontrac
#11 | Posted: 11 Nov 2009 09:29 
Thanks Paul. I'll try to figure out a way to get around this. Thanks for your hints. ;)


After so many attempts and hard working hours (no programming knowledge, have to look around the internet), finally I've found out a way to get this work.

This is what I did, maybe some Viet users would like to try this with their board:

//encode url otherwise Paul's default code will remove all non-latin characters

//change Viet characters to latin
$replaceViet = array(
"%c3%a0" => "a", //%c3%a0 is the encoded of "à"
"%c3%a1" => "a",

//replace all Viet characters to latin
$topicTitle=strtr($topicTitle, $replaceViet);

//decode back url to normal so that Paul's code can remove the rest of non-latin ones
Many thanks Paul for the hint of encoding URL. It really helped!!!

Author kuopassa
#12 | Posted: 29 Nov 2010 22:17 
I'm using that Keywords-rich URLs addon on some of my forums and now I'd like to know if it would be possible to modify this plugin a bit. I'd like to know would it be possible to check if certain topic is older than for example 30th of November 2010?

If topic would be older than that, topic would have its original URL structure. On the other case, if topic would be newer than 30/10/2010, then this clean URL structure would be used. This way I could have old URL's working fine (and indexed in search engines) and have better URLs in future. :-)

Author Paul
Lead Developer 
#13 | Posted: 30 Nov 2010 05:55 
I'd like to know would it be possible to check if certain topic is older than for example 30th of November 2010?
The answer is "it's possible" like almost everything is possible in the coding world. For this it may be required to modify `genTopicURL` function, where having $topic_id it's possible to get any information about topic, making an extra request to the database. But:

1. It will be resource-heavy. In some cases it's possible to refer to the global variables of the script, which calls that function, like bb_func_vtopic.php or bb_func_vthread.php, but in some cases this data is not available. Then having 20-30 topics on one page listed, there is possible a case when you have extra 20-30 requests to the database, and this is absolutely not acceptable for the script.

2. I personally would never implement such thing for my own forum. I've noticed that search engines love when the website keeps all of its older URLs. That means kind of stable and accessible content. When URLs are often changed or removed, that means a not accessible content, and the website loses ranks on it. So, you won't improve URLs for search engines that way - it only will make things overcomplicated and lost.

Author rapidsphare
#14 | Posted: 28 Dec 2010 04:24 
Making keywords rich URLs is very important and is one of the page optimizing strategy to rank higher on the search engine results. Systems that do not use dynamic URLs often do not let you create URLs that include keywords. Nowadays, search-friendly content management systems should feature custom URL creation.

Author PurpleCow
#15 | Posted: 30 Dec 2010 15:57 

I tried this plugin on my newly installed miniBB forum - this forum is installed on a sub-domain rather than a sub-folder.

I tried all 3 options in the plugin but none of them worked.

How can I get this SEO friendly URL plugin work for my forum which is installed in a sub-domain?


Note: I had started a separate thread in 'How to' - you may want to delete the same.

Page  Page 1 of 3:  1  2  3  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 Keywords-rich URLs
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.