Welcome, Guest. Please Login or Register.
May 19, 2024, 07:17:59 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] 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 29925 times)
dschwab9
Full Member
***
Posts: 144


I'm a llama!

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

Next question:  Does relative links do anything other than save 9K bandwidth?

Do the search engines care if links are relative or not?
Logged
dschwab9
Full Member
***
Posts: 144


I'm a llama!

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

DUUHHH!!

I just realized that I had changed index.php to content, so I had to mod the mod accordingly.

Now the images work, but links in posts don't.  It displays correctly, but the actual link is missing all the variables, just goes to http://bbs.zuwharrie/content
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #47 on: September 13, 2003, 07:24:09 AM »
Reply with quote

QuoteNext question:  Does relative links do anything other than save 9K bandwidth?

Do the search engines care if links are relative or not?

I think it helps with search engines as well, but I'm not sure

QuoteI just realized that I had changed index.php to content, so I had to mod the mod accordingly.

the new Relative URLs mod should work correctly with it

question: what's your $scripturl? is it "http://bbs.zuwharrie.com/content"? or how did you change the output or the urls using this mod?
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 #48 on: September 13, 2003, 10:02:41 AM »
Reply with quote

I changed:
$scripturl = "$boardurl/index.php";

To
$scripturl = "$boardurl/content";

In Subs.php

$boardurl is http://bbs.zuwharrie.com in settings.php.

So, $scripturl=htp://bbs.zuwharrie.com/content

That part works, every URL generated by the forum before the output buffering starts uses "content" now.   The actual file is still called index.php, I'm using an apache alias to change it (that allows me to have a filename with no extension, yet have it parsed through the php engine, without renaming the original file)  I could have also used "ForceType application/x-httpd-php content", but that would have required actually renaming the file.

Then, in the mod, I simply replaced two occurances of "index.php" with "content"

Something's up with URL's in posts on your too.  If you look at this thread: http://www.laakademia.com/foros/index.php/board-17_action-display_threadid-9457_start-0#msg63823, the URL displays correctly, but the link has "index.php" appended to the end of it.
« Last Edit: September 13, 2003, 10:08:56 AM by dschwab9 » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #49 on: September 13, 2003, 04:28:30 PM »
Reply with quote

I see, that may be what's causing the trouble then

if you put everything back to index.php like it was, then you just do this at the end of the function, where it says "return preg_replace_callback( ... );" wrap that in str_replace(), like this:

return str_replace('index.php', 'content', preg_replace_callback( ... ));

that should do the trick

about the "/index.php" at the end of my urls, that's ok, I put it there to test if it affected the script to put more stuff after an extra "/" and it worked fine

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 #50 on: September 14, 2003, 12:13:19 AM »
Reply with quote

That made such a mess that I can't even explain what happend  :P  no links, images or anything were right.

I got close to finding the problem, though.

It has something to do with:
return preg_replace_callback('/(href|src)=\"([\w.:\-~\/]*)(\??[\w;=&+%]*)\"/i', "rewrite_url", $buffer);

Aparently looking for a dot in the filename, which I don't have anymore.

I tried removing the . after the w, and that fixed the link in the post, but the question mark came back on all URL's on the forum index.

Do you mind explaining to me briefly what exactly that line is doing?
* dschwab9 is no php expert
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #51 on: September 14, 2003, 12:19:57 AM »
Reply with quote

that applies the rewrite function to the double quoted urls that come after "href=" or "src=" in the html

don't worry about making v1.3 work for you right now, I'll have the new mods ready soon, and the code is a bit better too

I'm just having a little trouble with a regular expression, but as soon as I figure it out, I'll be posting the mod  :P
« Last Edit: September 14, 2003, 12:20:44 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 #52 on: September 14, 2003, 12:46:53 AM »
Reply with quote

Ok, what I'm running now works, so I'll just wait on the new code.

I wonder if there are any bad effects having a slash after the file name like that?  Just looked nasty to me and I thought the spiders might not like it, which is why I changed it to content,

Another thought - would appending an extension to the URL better for the spiders?

My thoughts were that with the current setup, it looks like there are thousands of subdirectories to the spider, but it it had an extension, it would think it was a bunch of files in one directory.

Google spidered about 120 pages on my site, which is more than ever before, but then it stopped.  I remember a while back there was a guy using htacess to make urls with .htm extensions, and he had google spider thousands of pages.

What  do you think?
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #53 on: September 14, 2003, 02:23:08 AM »
Reply with quote

I think you're right on that... that's why I tried putting a file with an extension at the end of the url

I don't know if I should use .htm though, cause I'm afraid the page will be cached, that's why I tried .php and it seemed to work cause you saw the new links, so it wasn't a cached page

I have to study more about cache, when it happens and when not

on the new code, one of the two mods is working great now, I'll ask you to test it for me in a bit, the other one I'm writting right now

stay tuned  ;D
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 #54 on: September 14, 2003, 02:48:57 AM »
Reply with quote

Well, php would work too.  The spiders shouldn't care about the file type, they just don't like variables.

I think htm would be ok.  I don't think browsers cache based on file extension.  Isn't there a meta tag or something that makes it not cache?
« Last Edit: September 14, 2003, 02:49:39 AM by dschwab9 » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4] Friendly Urls v1.3
« Reply #55 on: September 14, 2003, 07:46:12 AM »
Reply with quote

OK, finally, after LOTS of testing and debugging, I got these two mods working fine under all the circumstances I could think of.

Spider URLs
Absolute URLs

Remove Friendly URLs before installing those.

I'm locking this thread and removing the link to the zip file at the beginning of this thread.
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.014 seconds with 20 queries.