Welcome, Guest. Please Login or Register.
June 17, 2024, 07:49:34 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Relative URLs 1.3 « previous next »
Pages: [1] 2 3 4 Reply Ignore Print
Author Topic: [beta 1.5.4] Relative URLs 1.3  (Read 26251 times)
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
[beta 1.5.4] Relative URLs 1.3
« on: September 14, 2003, 07:39:24 AM »
Reply with quote

This mod will turn urls pointing to files in the forum's directory, into relative urls. If Spider URLs mod is installed too, it'll fix relative urls so that they work correctly.

Relative_URLs_v1.3.zip

Here's a before/after example:
src="http://www.example.com/yabbse/img/pic.jpg"
src="img/pic.jpg"

Look at the source in my forum pages:
http://laakademia.com/foros

It's been tested quite a lot already, but please let me know if you run into any problems.

History:
03 SEP 15 v1.3 released
03 SEP 14 changed name
03 SEP 14 v1.2 released
03 SEP 14 v1.1 released
03 SEP 14 v1 released
« Last Edit: September 15, 2003, 11:06:05 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
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Absolute Urls 1.0
« Reply #1 on: September 14, 2003, 08:56:30 AM »
Reply with quote

I released v1.1 a little after v1.0, but it's worth it, cause I improved it a bit more to save more bandwidth

in v1.0, all urls were changed into absolute ones, but in v1.1 if the url points to a file in the forum'd directory, it'll make it relative

if Spider URLs mod is installed, the urls will only be made absolute, relative ones may not work because the browser gets the directories confused

here's an example of how they look:

normal url
src="http://www.example.com/yabbse/YaBBImages/tline3.gif"

absolute url
src="/yabbse/YaBBImages/tline3.gif"

relative url
src="YaBBImages/tline3.gif"

I chose a random page from my forum to see how much bandwidth can be saved:
http://www.laakademia.com/foros/index.php?board=1;action=display;threadid=6292;start=30

with full urls (without the mod)
119,830 bytes

with absolute urls
107,812 bytes
saved 12,018 bytes

with with absolute and relative urls
104,258 bytes
saved 15,572 bytes
« Last Edit: September 14, 2003, 10:14:21 AM 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
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Absolute Urls 1.2
« Reply #2 on: September 14, 2003, 10:09:12 AM »
Reply with quote

hehe... improved it a bit more  ;D

the urls to the script are now even shorter (without Spider URLs)

without the mod
href="http://www.example.com/yabbse/index.php?board=1"

in v1.0
href="/yabbse/index.php?board=1"

in v1.1
href="index.php?board=1"

in v1.2
href="?board=1"

following the bandwidth test from the previous version, the byte count in v1.1 dropped from 104,258 down to 103,035 in v1.2... that's another 1,223 bytes saved, making a total of 16,795 bytes saved compared to the un-modded one
« Last Edit: September 14, 2003, 10:12:27 AM 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
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #3 on: September 14, 2003, 07:18:41 PM »
Reply with quote

I'm now working to make the this mod generate Relative URLs even with Spider URLs mod installed

I decided Relative URLs is now a more fit name for this mod, so I changed it

I think I'll post the new version soon
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] Relative Urls 1.2
« Reply #4 on: September 14, 2003, 08:50:29 PM »
Reply with quote

I would warn you that some versions of Internet Explorer WILL NOT submit to ?action=post2 correctly. (while they will with index.php?action=post2.)

You could use <base href="" />.

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


llama me?!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #5 on: September 14, 2003, 09:20:18 PM »
Reply with quote

thank you for letting me know, I'll look into that then

does that problem you mention, apply to any link or submitting forms only?
« Last Edit: September 14, 2003, 09:46: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
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #6 on: September 14, 2003, 10:09:48 PM »
Reply with quote

Just sunmitting forms via POST, sorry.  It does not affect GET.

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


llama me?!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #7 on: September 15, 2003, 02:16:54 AM »
Reply with quote

ah, it's cool then... this mod doesn't change the urls in the form tag

I liked the base tag a lot though, so I'm changing the code a bit

I may include the form urls this time, since they'll work correctly, and the urls in links with js confirmation too
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] Relative Urls 1.2
« Reply #8 on: September 15, 2003, 04:18:00 AM »
Reply with quote

Have you looked at Short URLs, by me?

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


llama me?!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #9 on: September 15, 2003, 05:53:11 AM »
Reply with quote

Quote from: [Unknown] on September 15, 2003, 04:18:00 AM
Have you looked at Short URLs, by me?

-[Unknown]

I haven't read the code, although I've downloaded it some time ago... it shortens the url using less variables in the query, like:
http://www.yabbse.org/community/index.php?thread=25772/new
instead of:
http://www.yabbse.org/community/index.php?board=158;action=display;threadid=25772;start=new
right?

btw, I was about to ask if the base url worked with the search engine spider without problems, but I guess it does, cause I just checked php.net, they use it and their website is well indexed
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
dschwab9
Full Member
***
Posts: 144


I'm a llama!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #10 on: September 15, 2003, 09:10:40 AM »
Reply with quote

Quote from: [Unknown] on September 14, 2003, 08:50:29 PM
I would warn you that some versions of Internet Explorer WILL NOT submit to ?action=post2 correctly. (while they will with index.php?action=post2.)

You could use <base href="" />.

-[Unknown]

Yep, this is especially a problem with the Mac version of IE (doesn't work on any version that I know of)  Tried that on my forum a while back, and it was giving "Invalid URL" or something to that effect on macs.
Logged
dschwab9
Full Member
***
Posts: 144


I'm a llama!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #11 on: September 15, 2003, 09:12:51 AM »
Reply with quote

Quote from: [Unknown] on September 15, 2003, 04:18:00 AM
Have you looked at Short URLs, by me?

-[Unknown]

Hmmm, what about starting with this and replacing the ? with /, = with -  and maybe the second slash with _

So, you'd have URL like http://www.yabbse.org/community/index.php/thread-25772_new
« Last Edit: September 15, 2003, 09:16:27 AM by dschwab9 » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #12 on: September 15, 2003, 07:05:23 PM »
Reply with quote

Quote from: dschwab9 on September 15, 2003, 09:10:40 AM
Yep, this is especially a problem with the Mac version of IE (doesn't work on any version that I know of)  Tried that on my forum a while back, and it was giving "Invalid URL" or something to that effect on macs.

but the relative urls that start with "?" will work in mac if there's the base tag, right? I can't test cause I don't have my mac anymore
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
dschwab9
Full Member
***
Posts: 144


I'm a llama!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #13 on: September 15, 2003, 07:45:20 PM »
Reply with quote

Quote from: Anguz on September 15, 2003, 07:05:23 PM
Quote from: dschwab9 on September 15, 2003, 09:10:40 AM
Yep, this is especially a problem with the Mac version of IE (doesn't work on any version that I know of)  Tried that on my forum a while back, and it was giving "Invalid URL" or something to that effect on macs.

but the relative urls that start with "?" will work in mac if there's the base tag, right? I can't test cause I don't have my mac anymore

Any URL that has a ? after a / will not work.

ie: http://yourdomain.com/?function=yourfunction will not work, but http://yourdomain.com/index.php?function=yourfunction or http://yourdomain.com/content?function=yourfunction will.

Basically, you've gotta have someting between the / and ?
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Relative Urls 1.2
« Reply #14 on: September 15, 2003, 09:33:35 PM »
Reply with quote

well... that wouldn't work in win either

but if your $scripturl is "http://bbs.zuwharrie.com/content" and it's set as the base, then the relative url "?board-12" will point to http://bbs.zuwharrie.com/content?board-12, which works

and if you have Spider URLs in your forum too, depending on how you change your board... if your $boardurl is "http://bbs.zuwharrie.com", then the relative url for the above link would be "content/board-12"
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
Pages: [1] 2 3 4 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Relative URLs 1.3 « 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.189 seconds with 20 queries.