http://dictionary.reference.com/search?q=smartQuote1.b. Amusingly clever; witty
...
4. Fashionable; elegant
Version 1.0This is an improvement of the original Friendly URLs mod, that later spawned Spider URLs and Relative URLs. It includes the new friendly_url and relative_url functions.
friendly_url makes changes the urls to boards and threads, to a new format that's very friendly with the search engine spider.
http://www.domain.tld/yabbse/index.php?board=1;action=display;threadid=123;start=15
to
http://www.domain.tld/yabbse/index.php/t123-15.htm
I also added the possibility of using keywords in the urls, to help your pages appear higher in search engine results. You can use keywords for categories and/or for boards.
http://www.domain.tld/yabbse/index.php/categkw/boardkw/t123-15.htm
You can choose the file extension you prefer or none: php, htm, etc.
The original urls still work, so you won't lose old bookmarks or already indexed pages by the engine. For those who used Spider URLs, this mod will recognize those urls and use them properly too.
relative_url fixes relative urls that aren't working when Friendly URLs is active. It also changes all the urls pointing inside the board's url, from full to relative, saving a lot of bandwidth.
<a href="
http://www.domain.tld/yabbse/index.php/t123-15.htm">
to
<a href="
index.php/t123-15.htm">
It also improves the spider indexing. When I first used Spider URLs, the results in
google.com jumped from 9 to 300, after using Relative URLs, it jumped to 3000, so it does make a difference.
I also added a counter at the bottom of the pages, that only Administrators will be able to see, to monitor the activity of the mod. I used it while developing the mod, but decided to leave it.
QuoteSmart URLs: +0.382s friendly_url(65) relative_url(210) -7222b
First is the time added by the mod to the page creation, it'll vary a lot depending on the number of urls. Second is the number of urls changed by the friendly_url function. Third is the number of urls changed by the relative_url function. Fourth is the number of bytes saved by the mod.
You can change the settings in ModSettings and add the keywords in ManageCategories and ManageBoards, in the Admin area. I owe the admin code to Omar Bazavilvazo, who did most of it, since it was my first time and I didn't know how to do the database queries. Thanks Omar.
You can use all the features of the mod or just a few, just change the settings. Here's what you can change in ModSettings:
You can see this mod working in these forums:
http://laakademia.comhttp://hablajapones.orgIf you used Friendly URLs, Spider URLs or Relative URLs mods, uninstall them before installing Smart URLsThis mod needs Apache's
AcceptPathInfo On to work properly
Quote from: dschwab9 on September 09, 2003, 11:06:45 PM
I figured it out. I had to add:
AcceptPathInfo On
To my Directory Container in httpd.conf. This turns on the Lookback function. Aparently, that is enabled by default in Apache1, but is not in Apache2.
Please feel free to ask any question you may have. Also, leave a message letting me know how it's working in your forum, even if it doesn't have problems
Version 2.0 (
original post)
ok... here it is... version 2
these are the changes:
I removed the relative_url function cause it was too slow and also because after some testing, it wasn't really saving much bandwidth if gzip compression was on... in it's place, I made the urls in links to boards and threads, absolute instead of relative, which should have a similar effect on the spider
I removed the output buffer part of the mod and moved it to the actual scripts that generate the urls we want to change (boardindex, messageindex and display)... this also removed the preg_replace_callback function that some were having problems with
I added another two formats for the urls, so the three available now are:
onevar,
pathinfo and
modrwonevar uses a variable in the url, but only one, for links to boards or threads, which is good for those that can't use the other two options which seem to not be available to IIS... keywords can't be used in the url with this format
http://domain.tld/bbs/index.php?sUrl=t12345s45
pathinfo is the format used in version 1 of this mod... keywords can be used in the url and the board or thread look like a static file in the url (if you look away from the fact that the script appears earlier in the path)
http://domain.tld/bbs/index.php/keyws/t12345-45.htm
modrw, for those that can use Apache's mod_rewrite, it's like
pathinfo, but it'll remove the forum's path up to the script, leaving only the keywords and board/thread (you'll have to write the mod_rewrite to change the url back to the one in the pathinfo format, cause I don't know how to... if someone could contribute that...)
http://domain.tld/keyws/t12345-45.htm
there's a var added to the url in boardindex where $boardseen is also used and in messageindex where $start is used when the value is "new", but they're special cases
I added a new keyword, for the whole forum, so now the url can have one for the whole community, another for the category and another for the board
I added the option to used the keywords in the title of threads, since I've found keywords in the title tag to weigh even more than the ones in the url... of course I may be wrong, cause I'm no search engines genius, but it doesn't hurt to have them
Community > Category > Board > Thread Titlewhat else... hmm...
the mod can understand any of the new formats and also the ones of previous mods like Spider URLs, so your links in Google will still work right
write the keywords using the proper case and instead of space, use a dash, like this: YaBB-SE... in the url, it'll be changed to this "yabb-se" and in the title will be changed to this "YaBB SE"
I can't remember what else, if there is...
I haven't been able to test this version yet, although it should work fine, cause I was in the middle of some changes in my yabbse install and can't tinker with it until it's finished.. but I thought you guys didn't want to wait until that happened
anyway, use it at your own risk, always backup... nothing bad other than having to go back to your backup files will happen, if it's needed at all... I'm really sorry I couldn't do the testing, so please let me know if there's something I overlooked and I'll fix it right away
the files modified by this mod (so you backup your working copy) are:
english.lng
index.php
template.php
sources/
boardindex.php
display.php
manageboards.php
managecats.php
messageindex.php
modsettings.php
subs.phpof course, you need to remove the previous version before using this one and the database will already have some of the changes applied by the new version, but many are new... I'm thinking of writting an upgrade script for that, but from what I understand, it'll give an error where the change already existed, but nothing more
one more thing, I'll ask if you could contribute the translation to the .lng file texts, so it's available in more than english (I'll write the spanish one myself later, didn't even do that... I'm terrible lol)
here's the link to the zip file
Smart URLs v2.1thank you for waiting, sorry for taking so long
edit: added a dbmod script to add the new fields to the database, without touching the existing ones from v1, so they're intact and you don't get errors installing... this is good in case you need to go back to that version while I fix a found bug in v2
History:
03 DEC 10 - v2.1 released
03 DEC 06 - v2 released
03 NOV 03 - v1 released