PDA

View Full Version : VB3 Easy Archive


JamesFrost
22 Feb 2004, 09:01
OK, this isn't the nicest way of doing it I'm sure, but it works!

What this does is change the path of archive files in VB

from /forums/archive/index.php/.......

to /archive/......

In theory google should spider the archive pages better, as they do not look php generated. My archive (www.martialartsplanet.com/archive) is certainly getting google picking it up, where it was not before.

I've only tested this on one site - let me know how it goes!

colicab-d
22 Feb 2004, 09:52
why not set your archive up as a subdomain and have it redirect to your www.doamin.com/forum/archive :D

JamesFrost
22 Feb 2004, 10:35
why not set your archive up as a subdomain and have it redirect to your www.doamin.com/forum/archive :D
To be honest you could put it anywhere and call it anything - the same technique should work.

I just like putting it in the root folder of my domain. :)

ChrisSy
22 Feb 2004, 12:06
hmm cant upload the 'archive' file, in rc3

JamesFrost
22 Feb 2004, 12:13
hmm cant upload the 'archive' file, in rc3

Chris - not quite sure what you mean - it should still work in rc3. How are you trying to upload?

Make sure you keep the file as 'archive.txt' before uploading it, and rename it to 'archive' once it is on your server.

JamesFrost
22 Feb 2004, 12:34
hmm cant upload the 'archive' file, in rc3

Chris - have had a look at your site. I think the problem is that your current archive is in /archive instead of /forums/archive. For this reason it wont let you have a file called 'archive' in your root directory as there is already a folder called this.

Try calling the file 'archive2' and renaming the references to archive as archive2 in .htaccess. You can then test that it works before switching over to it.

you will also need to change the chdir commands in archive.txt to the following :



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



once you are happy, you could rename the archive directory to archiveold and change archive.txt to reflect this.

Hope this makes sense!

ChrisSy
22 Feb 2004, 12:54
excellent thanks!, thanks for the quick reply :)

JamesFrost
22 Feb 2004, 13:00
excellent thanks!, thanks for the quick reply :)

New instructions for users who's forum archive is currently in /archive (as opposed to /forums/archive). Still use the .htaccess from the first post.

If your archive is currently /forums/archive then please use the instructions in the first post.

dslteam
22 Feb 2004, 13:58
Does it work on IIS 6 ? (Extremely important) ?

JamesFrost
22 Feb 2004, 14:47
Does it work on IIS 6 ? (Extremely important) ?
I dont believe .htaccess files will work on IIS. If anyone knows different, or a workaround then let me know.

dslteam
22 Feb 2004, 15:10
.htaccess files works great on IIS (if you install an ISAPI filter for it), but the problem is that the native vb3 archive uses something apache specific and that is why - it doesnt work

JamesFrost
22 Feb 2004, 15:40
.htaccess files works great on IIS (if you install an ISAPI filter for it), but the problem is that the native vb3 archive uses something apache specific and that is why - it doesnt work
Ah, I see. This hack uses the native vb3 archive as a starting point (and only changes a redirect function within it). Unlikely that it would work on IIS if the native one doesn't.

I'm thinking of writing one from scratch, but that will be many months away due to other commitments.

Out of interest, what is the code that is apache specific?

dslteam
22 Feb 2004, 15:46
I am extremely interested, because for users of IIS there is no archive feature for vb3 at the moment. I am not sury what is apache specific, but I know, that even with this ISAPI filter which is 100% compatible to htaccess - it comes a blank page.

JamesFrost
22 Feb 2004, 16:01
I am extremely interested, because for users of IIS there is no archive feature for vb3 at the moment. I am not sury what is apache specific, but I know, that even with this ISAPI filter which is 100% compatible to htaccess - it comes a blank page.
dslteam - is this not your archive?

http://www.dslteam.de/forum/archive/index.php/

It seems to work OK to me!

JamesFrost
22 Feb 2004, 16:18
Also, I'm no VB expert, but try changing the following code in /archive/global.php



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



to



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



as the original code seems to specifically check if it is running apache. Surely this cant be the problem!

dslteam
22 Feb 2004, 16:56
I am running apache under windows 2003 at the moment. That is the reason why it is working now.

JamesFrost
22 Feb 2004, 17:26
I am running apache under windows 2003 at the moment. That is the reason why it is working now.
I've tried the global.php change in my previous post on my XP machine running IIS, and this does indeed fix the issue of the archive redirecting to the forum page.

I get the first page OK, but the subsequent links dont work. However, W2k may handle this better.

dslteam
22 Feb 2004, 17:50
hmm... but nevertheless - the archive doesnt support IIS and it is really a big problem according to the fact, that about 30 % of all servers running IIS.

Itworx4me
22 Feb 2004, 19:46
Just an FYI. But why would you make a hack that is already included in RC4??? I see no difference from yours to the one that is included in RC4.

JamesFrost
22 Feb 2004, 19:59
Just an FYI. But why would you make a hack that is already included in RC4??? I see no difference from yours to the one that is included in RC4.
The hack is designed to make the url of the archive more 'spider friendly' - nothing else. The archive works as before.

I may look at extra functionality in future, such as dynamic meta tags etc, but I'm sure someone else will beat me to this.

Personally, I wrote because I thought it would be useful to my own site. I think that

http://www.martialartsplanet.com/archive/t-10794

will rate higher than

http://www.martialartsplanet.com/forums/archive/index.php/t-10794

to a search engine. But maybe not - the ratings systems change all the time!

It certainly made a difference when I were a lad.

AWS
22 Feb 2004, 22:02
I'm working on a way to make it work on IIS. You have to use adutils.vbs to enable script mapping on the webserver. I'm working on the new archive script that can be used to replace the current script if you run IIS.
I should have this done within the next 2 weeks.

There is a hack to use isapi_mod_rewrite in the vb 2 beta hack section which works well to rewrite the forumj urls. I used it until I went with vb3. With vb3 the urls are spidered very well.

gmarik
23 Feb 2004, 12:08
James, thank you, it's what I was waiting for!

JamesFrost
23 Feb 2004, 18:23
excellent thanks!, thanks for the quick reply :)
Chris - did the new instructions work OK for your setup?

dethfire
06 Mar 2004, 19:06
I couldn't quite get mine to work because my forum are deep in a file structure like root/site/forums/archive and I couldn't figure the path changes I'd need to make.

on another note, had anyones vb3 actually been spidered? I've had mine up on a big forum for a month and nothing has been spidered.

JamesFrost
07 Mar 2004, 08:33
I couldn't quite get mine to work because my forum are deep in a file structure like root/site/forums/archive and I couldn't figure the path changes I'd need to make.

on another note, had anyones vb3 actually been spidered? I've had mine up on a big forum for a month and nothing has been spidered.
PM me your site's URL and I'll have a look if you like.

I'm still waiting for the spiders to pickup the forums - I was hoping this hack would improve things. It used to take around 3 months to get fully spidered on Google, but I'm not convinced this is the case anymore. Keeping fingers very crossed!

Vivi Ornitier
20 Mar 2004, 16:04
I don't get it, why must you rename the archive folder to archiveold if you have a deeper forum structure? Wouldn't it function the same? I"m confused,

JamesFrost
20 Mar 2004, 22:32
I don't get it, why must you rename the archive folder to archiveold if you have a deeper forum structure? Wouldn't it function the same? I"m confused,
The archive works by having the archive php page called 'archive' (no extension) and using .htaccess to process this as php. If you already have a /archive directory then this will not work (as you cant have a 'archive' directory and an 'archive' file in the same directory.)

If your archive is in the normal /forums/archive then you dont need to worry about this.

jons5150
11 May 2004, 01:02
James...I am getting this error above my archive:

Warning: chdir(): SAFE MODE Restriction in effect. The script whose uid is 503 is not allowed to access ./../.. owned by uid 0 in /home/virtual/site1/fst/var/www/html/archive on line 28

Any help?

dstruct2k
11 May 2004, 05:05
SAFE MODE --- turn it off, or ask your host to

JamesFrost
11 May 2004, 12:39
SAFE MODE --- turn it off, or ask your host to
Thanks dstruct2k - this should fix the issue short term.

I might look at a longer term fix in code, but I'm also thinking about re-writing the archive from scratch anyway, as I'm personally not keen on how it works. This would probably be several months away.

hamy
22 May 2004, 09:53
Works on 3.0.1 and Google likes it more than normal archive!
Thank you

JamesFrost
24 May 2004, 10:03
no problem - glad someone else has 'seen the light'! :D

Ruffneck
24 Jun 2004, 19:48
Nice hack!

ehsanix
29 Nov 2004, 14:33
Nice hack!
I get this error,
Premature end of script headers: /home/******/public_html/forum/archive

JamesFrost
30 Nov 2004, 12:17
ehsanix - did the original VB archive work OK before you tried this? What is your website address?

vonedaddy
07 Dec 2004, 12:34
My vb3 archive does not work because I do not have php compiled as a module. Can this be used as a solution to that?
I appreciate any help.

JamesFrost
07 Dec 2004, 12:47
My vb3 archive does not work because I do not have php compiled as a module. Can this be used as a solution to that?
I appreciate any help.
I'm afraid not - this hack is just a small mod to the existing vb archive to allow the url's to be more search engine friendly. Have you tried Xenon's archive hack? (which is to be honest better than mine, as it is a total re-write)

http://www.vbulletin.org/forum/showthread.php?t=65703&highlight=archive

vonedaddy
07 Dec 2004, 13:06
Thank you sir. You are a gentlemen and a scolar.

bL@De
25 Dec 2004, 22:06
Hi Guys,
Great little script, I'm very impressed and very simple and easy to seutp.

EDIT: By the way I'm running 3.0.3 and it works perfectly.

JamesFrost
01 Jan 2005, 12:51
Thanks bL@De - Happy New Year :D