Welcome, Guest. Please Login or Register.
November 25, 2024, 10:00:54 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] Friendly URLs v1.3 « previous next »
Pages: 1 2 [3] 4 Reply Ignore Print
Author Topic: [beta 1.5.4] Friendly URLs v1.3  (Read 31429 times)
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.2
« Reply #30 on: September 12, 2003, 06:59:43 PM »
Reply with quote

I tried that code I wrote for pfabb in my yse board and it works great, cause it also changes the urls in img tags into relative urls

I opened a thread with and without the new version, and making the urls relative had saved almost 9K of bandwith, it doesn't sound much, but they add up page after page

I also fixed the "previous/next" links, cause the variable name is prev_next and it got changed when doing the rewrite, so they're working fine now

I updated the first post with v1.3

note: the problem mentioned in the previous post, applies to pfabb only, yse works great
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] Friendly Urls v1.3
« Reply #31 on: September 13, 2003, 12:24:52 AM »
Reply with quote

What do I need to remove the make it not do relative URLs?  I know  it has something to do with $_SERVER['SCRIPT_NAME']) , but I just confused myself when I tried to figure it out  :P

Reason I can't have relative URLs is I have multiple domains pointing to my forum.  Ie, the main site is http://www.domain1.com, and domain2.com and domain3.com are aliased to it.

Right now, since all the links are absolute, the first link they click, they get redirected to domain1.com.  But if I go to relative, I'm going to have a big mess with cookies being in the wrong domain, users can't login, etc.

Maybe you should consider putting relative links as a option in the admin center?
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #32 on: September 13, 2003, 12:31:37 AM »
Reply with quote

I understand

I'm making Friendly URLs and Relative URLs two separate mods now, I'll post them a bit later tonight

for now, use the version of Friendly URLs that worked for you fine, just add a couple of conditions to those you wrote so that strings that have '-' or '_' are skipped too

sorry for the trouble

I'll make relative urls distiguish when the subdomains are different, so you'll be able to use that mod as well if you want (I'll need some help testing, at least teach me how to set up a subdomain with .htaccess in my server ;))
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] Friendly Urls v1.3
« Reply #33 on: September 13, 2003, 12:53:28 AM »
Reply with quote

Quote from: Anguz on September 13, 2003, 12:31:37 AM
I'm making Friendly URLs and Relative URLs two separate mods now, I'll post them a bit later tonight

Awesome!  Thanks

Quote from: Anguz on September 13, 2003, 12:31:37 AM
for now, use the version of Friendly URLs that worked for you fine, just add a couple of conditions to those you wrote so that strings that have '-' or '_' are skipped too

I added  strstr($match['0'], '-') and strstr($match['0'], '_')  to my conditions of things not to be rewritten.  Is that what you wanted me to do?  That seemed to fix the previous/next buttons.

Quote from: Anguz on September 13, 2003, 12:31:37 AMsorry for the trouble

No trouble was cause, cause I thought about the URL situation before I did it  ;D

Quote from: Anguz on September 13, 2003, 12:31:37 AMI'll make relative urls distiguish when the subdomains are different, so you'll be able to use that mod as well if you want

So you're saying if I visit my main Domain, the links will be relative, but if I visit one of the secondary domains, they will be absolute? Even tho both domains point to the same site?

Come to think of it, there would be an issue with subdomains too, like if I tried to use the SSI.php from my forum on my main site (which are different subdomains) - which I plan to do eventually - the home page is currently being redesigned.

Quote from: Anguz on September 13, 2003, 12:31:37 AM(I'll need some help testing, at least teach me how to set up a subdomain with .htaccess in my server ;))

I'll help you to the best of my ability.

I don't think you can do a subdomain is .htaccess.  99% sure, in fact.  That would have to be setup as a virtual host in http.conf.

But, if you need a subdomain and can't do it on your server, I can give you some space on one of my boxes.
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #34 on: September 13, 2003, 01:10:44 AM »
Reply with quote

QuoteIs that what you wanted me to do?
yeah, it doesn't convert that url, but it works, besides, you don't need that one to be friendly to spiders anyway

QuoteSo you're saying if I visit my main Domain, the links will be relative, but if I visit one of the secondary domains, they will be absolute? Even tho both domains point to the same site?

Come to think of it, there would be an issue with subdomains too, like if I tried to use the SSI.php from my forum on my main site (which are different subdomains) - which I plan to do eventually - the home page is currently being redesigned.

the way it'll work (and should actually be working in v1.3) is that if the url is in the board's script (index.php) and is pointing to a file in the same domain as the script is, then it'll be turned relative, if not no

actually, I think it should work ok with subdomains as it is... why don't you make a copy of index.php, put the v1.3 code in it and try it really fast and tell me how it went? if it doesn't work, just put up the the original copy of index.php

if the SSI is not generated by index.php, then the urls won't be made relative, so it shouldn't be a problem
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] Friendly Urls v1.3
« Reply #35 on: September 13, 2003, 02:24:27 AM »
Reply with quote

Quote from: Anguz on September 13, 2003, 01:10:44 AM
the way it'll work (and should actually be working in v1.3) is that if the url is in the board's script (index.php) and is pointing to a file in the same domain as the script is, then it'll be turned relative, if not no

Ok, I'll try that a little later tonight.  I've got a lot of people online right now, but I'll be up most of the night.

One more thing, what would it take to not make a url pasted into a message relative?  I realize that's not an operational concern, but I have a feeling it will confuse the users if the paste http://bbs.zuwharrie.com/content/board-12_action-display_threadid-1937 into a message, then when they view the post, it says just says /board-12_action-display_threadid-1937.  Or does it not work that way?

Quoteif the SSI is not generated by index.php, then the urls won't be made relative, so it shouldn't be a problem
And it's not, so scratch that thought  :D
« Last Edit: September 13, 2003, 02:26:48 AM by dschwab9 » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #36 on: September 13, 2003, 02:31:50 AM »
Reply with quote

in v1.3, only the url that's double quoted after 'href=' or 'src=' will be made relative, not the url that's written as text, so the url in the message will be left untouched, but the actual link will be relative

look at the same message I mentioned in the other post:
http://www.laakademia.com/foros/index.php/board-17_action-display_threadid-9457_start-0#msg63823
« Last Edit: September 13, 2003, 02:36:00 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
dschwab9
Full Member
***
Posts: 144


I'm a llama!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #37 on: September 13, 2003, 04:04:55 AM »
Reply with quote

Quote from: Anguz on September 13, 2003, 02:31:50 AM
look at the same message I mentioned in the other post:
http://www.laakademia.com/foros/index.php/board-17_action-display_threadid-9457_start-0#msg63823

Seems like when I looked at that yesterday, it showed /index.php/board-17_action-display_threadid-9457_start-0#msg63823

Did you change it?
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #38 on: September 13, 2003, 04:13:03 AM »
Reply with quote

Quote from: dschwab9 on September 13, 2003, 04:04:55 AM
Quote from: Anguz on September 13, 2003, 02:31:50 AM
look at the same message I mentioned in the other post:
http://www.laakademia.com/foros/index.php/board-17_action-display_threadid-9457_start-0#msg63823

Seems like when I looked at that yesterday, it showed /index.php/board-17_action-display_threadid-9457_start-0#msg63823

Did you change it?

yes

I think you're looking at your cache, refresh it

I'll have to search a bit to make sure you don't look at a cached page if it has been modfied...
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] Friendly Urls v1.3
« Reply #39 on: September 13, 2003, 04:17:59 AM »
Reply with quote

Quote from: Anguz on September 13, 2003, 04:13:03 AM
Quote from: dschwab9 on September 13, 2003, 04:04:55 AM
Quote from: Anguz on September 13, 2003, 02:31:50 AM
look at the same message I mentioned in the other post:
http://www.laakademia.com/foros/index.php/board-17_action-display_threadid-9457_start-0#msg63823

Seems like when I looked at that yesterday, it showed /index.php/board-17_action-display_threadid-9457_start-0#msg63823

Did you change it?

yes

I think you're looking at your cache, refresh it

I'll have to search a bit to make sure you don't look at a cached page if it has been modfied...

It shows the full URL today, but yesterday it just showed the relative URL, that's what I was wondering about.

Isn't there a nocache tag in all the pages?  They should never be cached, should they?

I've just got to ask, what is Alejandro and who is that guy at the top of the page?  ;D
« Last Edit: September 13, 2003, 04:19:21 AM by dschwab9 » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #40 on: September 13, 2003, 04:57:04 AM »
Reply with quote

ah ok, then it wasn't a cache problem, it's because I changed it today :)

Alejandro is my step-son's name (the one in the pic) and that bbs was part of his personal page before I moved it to it's own domain, but I haven't changed the template yet
« Last Edit: September 13, 2003, 04:58:47 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
dschwab9
Full Member
***
Posts: 144


I'm a llama!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #41 on: September 13, 2003, 05:30:22 AM »
Reply with quote

I just tried 1.3, and my Stylesheet wouldn't load.  I've moved the css stuff to a separate file, which is linked like this in template.php

<link rel=stylesheet type="text/css" href="http://bbs.zuwharrie.com/bbs.css">

I tried it with:

<link rel=stylesheet type="text/css" href="bbs.css">
and
<link rel=stylesheet type="text/css" href="../bbs.css">

And neither one worked?

Seems that maybe it's rewriting the stylesheet link.  Any ideas on that?
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #42 on: September 13, 2003, 05:56:29 AM »
Reply with quote

QuoteSeems that maybe it's rewriting the stylesheet link.  Any ideas on that?

could you view the source of the page generated and show me what the url is?

also, try "/bbs.css"
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] Friendly Urls v1.3
« Reply #43 on: September 13, 2003, 06:37:42 AM »
Reply with quote

Quote from: Anguz on September 13, 2003, 05:56:29 AM
also, try "/bbs.css"

Ok, that made it load.  Does the / make is always relative to the site root?  Reason I ask is that the gallery runs in a subdirectory, so if i'm in the gallery, is it going to try to load /gallery/bbs.css, or will it go pull it from the site root?  Seemed to work for me, but the bbs.css file could have been cached.

An issue I'm having tho is with the images.  IE is trying to load them like this: http://bbs.zuwharrie.com/contentYaBBImages/off.gif for some reason.  If I view the source, the images are linked like /YaBBImages/off.gif, but they are showing up as broken, and if I right-click and view properties, it shows http://bbs.zuwharrie.com/contentYaBBImages/off.gif.

The images show fine in Netscape tho  ??? (and if I view the image properties in netscape, it shows the correct URL)
« Last Edit: September 13, 2003, 06:38:39 AM by dschwab9 » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #44 on: September 13, 2003, 06:43:41 AM »
Reply with quote

that's very odd :P

go back to the version you were using... it should work when I finish the new mods

it's probably because you're using that alias instead of index.php, or who knows... but I'll keep it in mind when writting the new code

thank you very much for your feedback, should be posting again tomorrow ;)
« Last Edit: September 13, 2003, 07:19:14 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
Pages: 1 2 [3] 4 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Friendly URLs v1.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.062 seconds with 20 queries.