Welcome, Guest. Please Login or Register.
November 25, 2024, 05:51:18 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Smart URLs v2.1 « previous next »
Pages: [1] 2 3 ... 18 Reply Ignore Print
Author Topic: [beta 1.5.4] Smart URLs v2.1  (Read 212902 times)
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
[beta 1.5.4] Smart URLs v2.1
« on: November 03, 2003, 09:49:09 PM »
Reply with quote

http://dictionary.reference.com/search?q=smart

Quote1.b. Amusingly clever; witty
...
4. Fashionable; elegant


Version 1.0

This 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.com
http://hablajapones.org

If you used Friendly URLs, Spider URLs or Relative URLs mods, uninstall them before installing Smart URLs

This 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 modrw

onevar 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 Title

what 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.php


of 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.1

thank 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
« Last Edit: December 12, 2003, 10:04:23 PM by Anguz » Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:[beta 1.5.4] Smart Urls v1.0
« Reply #1 on: November 04, 2003, 10:05:29 AM »
Reply with quote


wow, locks great. I`m hoping that it gives also an solution for IIS-hostet Boards  :'(

surfy
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #2 on: November 04, 2003, 08:07:23 PM »
Reply with quote

Quote from: Surfy on November 04, 2003, 10:05:29 AM

wow, locks great. I`m hoping that it gives also an solution for IIS-hostet Boards  :'(

surfy

this will work with IIS servers if you can do something like the lookback option you have in Apache, otherwise it won't...

if someone knows how to set up an IIS that way, please post it here for those that can use it, thx :)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
pege
Full Member
***
Posts: 146


Re:[beta 1.5.4] Smart Urls v1.0
« Reply #3 on: November 10, 2003, 06:39:22 AM »
Reply with quote

I'm very excited about this mod, and hope to get it working.  

Does this mod work with:

Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_jk/1.2.0 mod_perl/1.24_01 PHP/4.1.1?

It works about half the time, and crashes about half the time.  Also, when it works, it usually takes a long time to display, even though the page creation is only a fraction of a second.  I installed a fresh Index.php, which enabled me to get on long enough to adjust the modsettings.  Maybe whatever is causing the crash is in the Index code.  Any ideas how I can make this work right?

Thanks
« Last Edit: November 10, 2003, 07:14:34 AM by pege » Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #4 on: November 10, 2003, 07:26:49 AM »
Reply with quote

You'd have to upgrade PHP.... I've found that changing the output buffer causes crashing and the like in PHP 4.1.x...

-[Unknown]
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #5 on: November 10, 2003, 08:23:37 AM »
Reply with quote

the relative_url function is the one that loads the server the most

I already figured out how to make the urls absolute without using the output buffer and is working fine in my board... the change will be in the next version, which will be released soon

try turning off Relative URLs in modsettings and see if it still gives you the same trouble... of course, you should upgrade your PHP like [Unknown] suggested

let me know how it goes

[Unknown] do you know how to configure IIS to work like Apache with the lookback thing?
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
pege
Full Member
***
Posts: 146


Re:[beta 1.5.4] Smart Urls v1.0
« Reply #6 on: November 10, 2003, 02:43:19 PM »
Reply with quote

Quote
try turning off Relative URLs in modsettings and see if it still gives you the same trouble... of course, you should upgrade your PHP like [Unknown] suggested

Trying to get php upgraded now...
Turned off Relative URLS, and it crashes less and is not quite as slow now.

Quote from: Anguz on November 10, 2003, 08:23:37 AM
I already figured out how to make the urls absolute without using the output buffer and is working fine in my board... the change will be in the next version, which will be released soon...

Thanks!  Looking forward to the next release.
Logged
Symetrical
Jr. Member
**
Posts: 62


I'm a llama!

Re:[beta 1.5.4] Smart Urls v1.0
« Reply #7 on: November 10, 2003, 04:21:34 PM »
Reply with quote

When I tried to apply this in boardmod, I get an error saying there is a missing </replace>

Any ideas?

Thanks
Logged
pege
Full Member
***
Posts: 146


Re:[beta 1.5.4] Smart Urls v1.0
« Reply #8 on: November 10, 2003, 05:20:25 PM »
Reply with quote

Quote from: Symetrical on November 10, 2003, 04:21:34 PM
When I tried to apply this in boardmod, I get an error saying there is a missing </replace>

Any ideas?

Thanks

Yeah...just click the edit .mod file button, and scroll to the end.  replace the special characters surrounding "replace" with "<" and ">", so it shows "</replace>.
« Last Edit: November 10, 2003, 05:21:36 PM by pege » Logged
Symetrical
Jr. Member
**
Posts: 62


I'm a llama!

Re:[beta 1.5.4] Smart Urls v1.0
« Reply #9 on: November 10, 2003, 06:02:08 PM »
Reply with quote

After applying, I get the following errors when going to index.php Any ideas?

Notice: Undefined variable: PATH_INFO in c:\program files\apache group\apache\htdocs\index.php on line 42

Notice: Undefined variable: PATH_INFO in c:\program files\apache group\apache\htdocs\index.php on line 43

Notice: Undefined variable: PATH_INFO in c:\program files\apache group\apache\htdocs\index.php on line 56

Notice: Undefined index: 1 in c:\program files\apache group\apache\htdocs\index.php on line 57

Notice: Undefined offset: 1 in c:\program files\apache group\apache\htdocs\index.php on line 59

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\index.php:42) in c:\program files\apache group\apache\htdocs\index.php on line 263

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\index.php:42) in c:\program files\apache group\apache\htdocs\index.php on line 263

Fatal error: Cannot redeclare setupllama() (previously declared in c:\program files\apache group\apache\htdocs\Sources\Subs.php:176) in c:\program files\apache group\apache\htdocs\Sources\Subs.php on line 173
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #10 on: November 10, 2003, 06:55:36 PM »
Reply with quote

QuoteYeah...just click the edit .mod file button, and scroll to the end.  replace the special characters surrounding "replace" with "<" and ">", so it shows "</replace>.

thx, I hadn't noticed that :P ... fixed

QuoteTurned off Relative URLS, and it crashes less and is not quite as slow now.

good :)

QuoteAfter applying, I get the following errors when going to index.php Any ideas?

I don't know about server configuration really, but it looks like you don't have the $PATH_INFO variable available... and I don't know about the other errors, haven't had them

what Apache, PHP versions do you have?
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Symetrical
Jr. Member
**
Posts: 62


I'm a llama!

Re:[beta 1.5.4] Smart Urls v1.0
« Reply #11 on: November 10, 2003, 07:14:57 PM »
Reply with quote

Apache/1.3.27
PHP is one version off the current version
Logged
Cerberus
Full Member
***
Posts: 100


Who's a llama?!

WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #12 on: November 10, 2003, 09:51:49 PM »
Reply with quote

Quote from: Anguz on November 03, 2003, 09:49:09 PM
This mod needs Apache's AcceptPathInfo On to work properly
Is there anyway to check that without accessing the configuration file?
Logged

Best Regards, Cerberus
Check out http://www.pocketpcrussia.com :)
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #13 on: November 10, 2003, 11:42:19 PM »
Reply with quote

Quote from: Cerberus on November 10, 2003, 09:51:49 PM
Quote from: Anguz on November 03, 2003, 09:49:09 PM
This mod needs Apache's AcceptPathInfo On to work properly
Is there anyway to check that without accessing the configuration file?

you seem to have it off, or this would work

http://www.pocketpcrussia.com/index.php/test
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[beta 1.5.4] Smart Urls v1.0
« Reply #14 on: November 11, 2003, 12:18:04 AM »
Reply with quote

IIS *cannot* do the "lookback" thing.  Cannot.  No configuration... no question.

-[Unknown]
Logged
Pages: [1] 2 3 ... 18 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Smart URLs v2.1 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.043 seconds with 20 queries.