PDA

View Full Version : vRewrite - SEOed URLs for vBulletin


Pages : [1] 2 3 4 5 6 7

Immortal
01-04-2006, 10:00 PM
About

vRewrite is an advance but simple system to rewrite vB's URLs. The rewrite system uses preg_match_all and str_replace to rewrite the URLs. It will rewrite any URLs that are dynamic ex: showthread.php?t= to /the-forum/title-of-the-forum-id.html. Why? SEs (Search Engines) rate results based on filename. Not only that, but most SEs give a "boost" to static URLs (what we do here) versus dynamic URLs. vRewrite accomplishes both of this, for all URLs that a search engine (or a guest) will see.

Installation

Please download vRewrite.zip and read install.html for more information on how to install it.

Requirements

vRewrite assumes that you are using Apache with the mod_rewrite module enabled, and running vBulletin 3.5.x. However, if you ask for support here on IIS' module or on vBulletin 3.0.x - I will be more then happy to assist you.

Contributions

I would like to thank Chroder and Cole for assisting me release vRewrite. I could not have released it if it wasn't for them.

I would like to thank the following people/boards for helping beta test vRewrite and making it a better product.

Gaming Ultimate (http://www.gamingultimate.net/forums/), BP Gaming (http://www.bpgaming.com/), NBS Designz (http://www.nbsdesignz.com) Cyclez (http://www.cyclez.net/), Hosting-Talk (http://www.hosting-talk.com/) and Forum University (http://www.forumuniversity.com/).

Copyright

I've spent many hours working and perfecting vRewrite. The only thing I ask you to do is if you use it, please keep the link back. If you wish to put it in your style instead, simply remove or comment out that line. However, if you use vRewrite you MUST link back. That is the only thing I ask.

Known Issues

There are no known issues with the latest release (1.0).

Support / Issues

If you have any problems or discover a bug please post here in this thread. I have also included my email in the install.html email for one-on-one support. The only thing I ask you is please do not post this email address publicly - it is my personal email.

Changelog

1.5 Release - vRewrite 1.5 has become stable, and all users under 1.5 RC3 and 1.0 need to upgrade. Support for 1.0 will no longer be offered, and you will be told simply to upgrade. Please continue to keep all bug and feature suggestions on the bug tracker at:

http://www.techhelpforum.com/vrewrite

1.1 Release - Several bug fixes, and a few new features. Details here (https://vborg.vbsupport.ru/showthread.php?p=976752).

03/26/06 - Updated the thread to reflect vRewrite 1.5 Beta links. vRewrite files has NOT changed.

03/11/06 - Updated the thread to take advantage of vB.org's new prefix feature. vRewrite itself has NOT changed.

1.0 Release (02/19/06) - I have released the much awaited 1.0. This is the first stable release of vRewrite. All users now should be safe installing vRewrite. For more information, and how to upgrade, please see here (https://vborg.vbsupport.ru/showpost.php?p=905009&postcount=426).

1.0 Preview (01/12/06) - I have released a preview version of 1.0. This is the final version before 1.0 is considered stable. I believe everything should work in this new preview, but one bug (see known issues). Please see here (https://vborg.vbsupport.ru/showpost.php?p=872093&postcount=188) for more information and how to upgrade.

01/05/06 - Updated ZIP to include a fix for boards running a table prefix. You do not need to upgrade unless you previously had SQL errors. You can upgrade by importing the product and choose "Allow Overwrite".

Donations

https://vborg.vbsupport.ru/external/2006/03/25.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=tyler%40cbttechs%2ecom&item_name=vRewrite%20Donations&item_number=vRewrite&no_shipping=0&no_note=1&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8) Any donations are very much appreciated! I do this out of my free time and work many hours on it - all for free. Anything to help is always very welcomed :)

If you use vRewrite, please click Install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=104484). This helps you keep track of additional upgrades and shows to me that you care about vRewrite ;)


You may not post vRewrite ZIP or any files contained in the ZIP on any website. You may not also post any support requests/give support on any website other then this one, without my permission. If you do so, you will get a DMCA for copyright infringement. I do not want this spread to pirated users. Please stop piracy and do not share the source outside of this thread and vB.org/com. Thanks.

Support will only be obtained at:
https://vborg.vbsupport.ru/forumdisplay.php?f=182

Immortal
01-05-2006, 01:16 AM
One of the many questions I've been getting is "I'd like to see this live".

I run it personally on my own public board - however I do try and tinker with the latest release on my live board before releasing it to y'all, so I have a few fixes that may not have been available at to the public yet. My board can be seen using it here (http://www.techhelpforum.com) and a good friend of mine is using a beta as well, and can be seen here (http://www.hosting-talk.com).

Known Issues
Was posted here (https://vborg.vbsupport.ru/showpost.php?p=911318&postcount=516).

vRewrite Development
I posted this (https://vborg.vbsupport.ru/showthread.php?t=104484&page=42) concerning vRewrite's development and future release.

Support will only be obtained at:
https://vborg.vbsupport.ru/forumdisplay.php?f=182

EricaJoy
01-05-2006, 01:21 AM
is this kinda like a free vbseo?

Immortal
01-05-2006, 01:22 AM
is this kinda like a free vbseo?

You could say that, yah. It is free and open-source (not encoded in any way). :)

TyleR
01-05-2006, 01:22 AM
is this kinda like a free vbseo?

Hardly.

Not going to hijack the thread, but it's nothing near the functionality of vBSEO..none-the-less, it looks promising for a free alternative.

derekivey
01-05-2006, 01:31 AM
Nice hack Tyler :).

* derekivey clicks install.

Immortal
01-05-2006, 01:31 AM
Hardly.

Not going to hijack the thread, but it's nothing near the functionality of vBSEO..none-the-less, it looks promising for a free alternative.

It is still in Beta. So, why not suggest a few features if you don't think it's got anywhere "near the functionality of vBSEO"? ;)

ConqSoft
01-05-2006, 01:32 AM
Hasn't Dean C already released an SEO hack here?

Immortal
01-05-2006, 01:34 AM
Hasn't Dean C already released an SEO hack here?

Sure did. I used Dean's for awhile, and I wasn't too fond of it. It did the job of rewriting URLs but that's about all it did. It didn't rewrite majority of URLs. And it did not include the forum for threads (a huge plus for SEO). But, if it wasn't for Dean's I probably wouldn't of released it.

adb22791
01-05-2006, 01:35 AM
Hasn't Dean C already released an SEO hack here?
And your point is.... Dean C's is buggy, doesn't work very well, and if I recall is still a beta itself. There are two warning systems (probably more), yet nobody says anything. Therefore your post really has no merit to it.

Nice hack Tyler.
*Installed*

Daniel
01-05-2006, 01:49 AM
Nicely done. Will be installing. :)

Reeve of shinra
01-05-2006, 02:05 AM
Its good to see more hacks that the community will benifit from having. ^^

GamerJunk.net
01-05-2006, 02:15 AM
I will only install this when you are able to change the member page to read the name of the member rather than the current member=uXXX

derekivey
01-05-2006, 02:18 AM
I will only install this when you are able to change the member page to read the name of the member rather than the current member=uXXX

I think it does. Are you sure it's not?

Immortal
01-05-2006, 02:19 AM
I will only install this when you are able to change the member page to read the name of the member rather than the current member=uXXX

It should be that way now.



u-member-name-id.html

Is the member.php not rewritting for you?

o0oicebergo0o
01-05-2006, 02:21 AM
Question

Note: If you run your vB on a directory from a subdomain or root ex: http:///www.yoursite.com/forum or http://subdomain.site.com/forum you will need to open up the .htacess file and change Rewrite Base / to Rewrite Base /yourdir

Does that I have to change the file if my board sits at http://www.mysite.com/board
? Becuase I installed this (yes, followed all steps and I know I have mod rewrite) and it killed my board giving it mysql connection errors. Backsteped to remove the mod and it is okay just wondering.

Immortal
01-05-2006, 02:29 AM
Question

Does that I have to change the file if my board sits at http://www.mysite.com/board
Becuase I installed this (yes, followed all steps and I know I have mod rewrite) and it killed my board giving it mysql connection errors. Backsteped to remove the mod and it is okay just wondering.

Yes, but if you did it wrong or anything of the sort, you'll just get 404s when you click on any forum etc. You shouldn't be getting any type of MySQL errors, can you copy and paste the full error you got if you wouldn't mind?

o0oicebergo0o
01-05-2006, 02:40 AM
Database error in vBulletin :

mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
/home/site/public_html/board/includes/class_core.php on line 273

MySQL Error :
Error Number :
Date : Wednesday, January 4th 2006 @ 10:05:33 PM
Script : http://www.mysite.com/board/forumdisplay.php
Referrer : http://www.mysite.com/board/index.php?
IP Address :
Username :
Classname : vb_database



Database error in vBulletin 3.5.0:

Invalid SQL:

INSERT INTO session
(sessionhash, userid, host, idhash, lastactivity, location, styleid, languageid, loggedin, inforum, inthread, incalendar, badlocation, useragent, bypass)
VALUES
('059cfyfyt6r6gfhfg2184ce295a', 1550, '84.9.228.49', '6eb870060e006de590b61b847be82a5a', 1136433903, '/board/forumdisplay.php?f=36&page=3&order=desc', 0, 0, 0, 36, 0, 0, 0, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)', 0);

MySQL Error : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Error Number : 2002
Date : Wednesday, January 4th 2006 @ 10:05:08 PM
Script : http://www.mysite.com/board/forumdisplay.php?f=36&page=3&order=desc
Referrer : http://www.mysite.com/board/forumdisplay.php?f=36&page=2&order=desc
IP Address :
Username : User 1
Classname : vb_database


Database error in vBulletin 3.5.0:

Invalid SQL:

UPDATE session
SET lastactivity = 1136433907, inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
WHERE sessionhash = 'af513ec1f3b59e89ae5668ed2cfa6eb3';

MySQL Error : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Error Number : 2002
Date : Wednesday, January 4th 2006 @ 10:05:08 PM
Script : http://www.mysite.com/board/showthread.php
Referrer :
IP Address :
Username : User 2
Classname : vb_database

Just 3 out of 100 errors which were sent to me via email. I removed it within less then a minute so as you can see everytime someone attempted to access the board an error occured.

GamerJunk.net
01-05-2006, 06:20 AM
all the links you put up I checked those sites and they don't have it with the member name. I have not installed this yet.

Do you have any working sites that are showing the member page with the member name rather than the id?

GamerJunk.net
01-05-2006, 06:28 AM
Also your issue with the redirect, you didn't post the thread link so we could reply for you

Datacenter1.com
01-05-2006, 09:38 AM
Is this hack work with non english (spanish) boards?

Thanks

Guillermo

Cole2026
01-05-2006, 09:44 AM
Just 3 out of 100 errors which were sent to me via email. I removed it within less then a minute so as you can see everytime someone attempted to access the board an error occured.

That is most likely not a problem with this software, but some type of problem with your server directly. What version of MySql and PHP are you running?

michaelbenson
01-05-2006, 10:12 AM
Interesting alternative would you mind listing all the URLs which this hack is currently planning to rewrite and in what format they will be in too? Would it be possible to rearrange the URL format so that information such as the threadid is moved to the back of the URL?

Wachtmeister
01-05-2006, 10:14 AM
all the links you put up I checked those sites and they don't have it with the member name. I have not installed this yet.

Do you have any working sites that are showing the member page with the member name rather than the id?

http://www.hosting-talk.com/memberlist.php

Snake
01-05-2006, 10:23 AM
I'll probably install this tonight but first I'll need a live demonstration of this hack, please.

croportal
01-05-2006, 10:32 AM
is this better than DEAN C or??????

i have seen that in this are members rewrite and get daily posts also, but in dean c are not

Snake
01-05-2006, 10:41 AM
Why don't you install both hacks and find out yourself? In my opinion, it seems this hack is the best-free SEO product so far.

Yorixz
01-05-2006, 10:41 AM
I'd like to see some board that has this installed already ;) I'm also wondering if theres a chance to see this hack becoming compatible with either one of the two xml sitemap generators, but I'm afraid that wont happen too soon.

Snake
01-05-2006, 10:47 AM
Just tested and installed the hack on my test board and guess what? I'm facing a mySQL error... :disappointed:

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT userid, username FROM user WHERE username='jmmoore721';

MySQL Error : Table 'mgforums_vb3.user' doesn't exist
Error Number : 1146
Date : Thursday, January 5th 2006 @ 12:45:19 PM
Script : xxx
Referrer : xxx
IP Address : xxx
Username : Aftermath
Classname : vb_database

Lizard King
01-05-2006, 10:50 AM
Damn :) I was making myself ready to purchase vbseo and a new alternative just came out. I'll probably wait and see how this works and read the testimonials.

Let me have couple questions by the way ,

Is this working with Non-English boards ?
Is it possible to change rewrite from f-forumname-40.html to forumname/ or any other combination ?
Can we add custom rewrite rules for example , vbadvanced cmps , arcade , geek article and review system ?

If options like these can be turn on instead of purchasing vbseo i can make a good donation for this mod.

Snake
01-05-2006, 11:15 AM
I doubt it.
Yes, that's possible by editing the .htaccess of your site.
I believe so, yeah. And I would like to know how do I do that?

Yorixz
01-05-2006, 11:18 AM
Can't answer your other questions but "Is this working with Non-English boards ?" -> I bet so, wouldn't know what's different exept for the names of topics/forums? Or do you mean a non-english forum as Hebrew or so?

COBRAws
01-05-2006, 12:31 PM
Hope this makes more progress, I dont like the idea of paying more than an owned license of vB to vbSEO and just for 1 year, plus having a text add on every page :S

Gonna install when it comes to final, or close to final.

cclaerhout
01-05-2006, 12:37 PM
Can you explain us how to modify the .htaccess file when vB is not at the root.
For example : www.mysite.com/forum

An exemple will be great :)

Cole2026
01-05-2006, 02:35 PM
Just tested and installed the hack on my test board and guess what? I'm facing a mySQL error... :disappointed:

Hmm, looks like Tyler forgot to add Table Prefixes. I'm at school right now, so can't do anything, but I'll alert him when I get home.

Datacenter1.com
01-05-2006, 05:58 PM
Looks like is working without problems in my spanish board !!!

http://www.webhostingforo.com

Nice hack

Thank you

Snake
01-05-2006, 06:13 PM
Hmm, looks like Tyler forgot to add Table Prefixes. I'm at school right now, so can't do anything, but I'll alert him when I get home.

Cool, I'll be waiting for you then.

Immortal
01-05-2006, 06:14 PM
Is this hack work with non english (spanish) boards?


It should, but it will strip out some of the non-English characters in the thread/forum titles. But I can't see why it would pose a problem. If someone wants to confirm it works with their board, that'd be fantastic.

For everyone who wants to see a live demo of vRewrite, I've updated my post here (https://vborg.vbsupport.ru/showpost.php?p=864727&postcount=2) to reflect that. Hosting Talk is not ran by myself but a friend of mine - I'm not sure if he has upgraded since yesterday's beta - I'll check and ask.

Just tested and installed the hack on my test board and guess what? I'm facing a mySQL error...

Hmm, looks like Tyler forgot to add Table Prefixes. I'm at school right now, so can't do anything, but I'll alert him when I get home.

Thanks for letting me know. I did indeed forget to add it, sorry. I'll try and release an update very shortly to fix this issue.

Is it possible to change rewrite from f-forumname-40.html to forumname/ or any other combination ?

Not currently, but I do hope to add it very soon.

Can we add custom rewrite rules for example , vbadvanced cmps , arcade , geek article and review system ?

You can do it yourself - I'll try and release a tutorial and intergrate some extra features to help make it easier in the next release (1.0). But, if you want to try and make it easier on yourself, you can always contact the author and ask to release an addon compatible with vRewrite. I'll try and get the tutorial up soon for y'all :)

Hope this makes more progress, I dont like the idea of paying more than an owned license of vB to vbSEO and just for 1 year, plus having a text add on every page :S

Gonna install when it comes to final, or close to final.

I will do my best to help you and others. I'm doing this all for free and with a day job it can be tricky. But I'm hoping that shouldn't cause any issues.

Can you explain us how to modify the .htaccess file when vB is not at the root.
For example : www.mysite.com/forum

An exemple will be great

Using /forum as an example, your .htaccess file should read:

RewriteEngine On
RewriteBase /forum
RewriteRule ^f-(.*)-(.*).html forumdisplay.php?f=$2 [L]
RewriteRule ^u-(.*)-(.*).html member.php?u=$2 [L]
RewriteRule ^(.*)-(.*)-newpost.html showthread.php?goto=newpost&t=$2 [L]
RewriteRule ^(.*)/t-(.*)-(.*)-page-(.*).html showthread.php?t=$3&page=$4 [L]
RewriteRule ^(.*)/t-(.*)-(.*).html showthread.php?t=$3 [L]
RewriteRule ^markread.html forumdisplay.php?do=markread [L]
RewriteRule ^(.*)/p-(.*)-(.*).html#(.*) showthread.php?p=$3#post$4 [L]
RewriteRule ^print-(.*)-(.*).html printthread.php?t=$2 [L]
RewriteRule ^sendtofriend-(.*)-(.*).html sendmessage.php?do=sendtofriend&t=$2 [L]
RewriteRule ^search-(.*).html search.php?do=$1 [L]
RewriteRule ^(.*)-(.*)/newthread.php newthread.php?do=newthread&f=$2[L]
RewriteRule ^(.*)/newpostnoquote-(.*).php newreply.php?do=newreply&noquote=1&p=$2[L]
RewriteRule ^(.*)/newpost-(.*).php newreply.php?do=newreply&p=$2[L]
RewriteRule ^p-(.*).html showpost.php?p=$1&postcount=$1 [L]


Thanks everyone for their feedback so far. I'm hoping to make vRewrite much of a success :)

Snake
01-05-2006, 06:40 PM
Thanks for letting me know. I did indeed forget to add it, sorry. I'll try and release an update very shortly to fix this issue.

Alright, I'm waiting for you. I can't wait to get this hack working on my forums. :devious:

Also can you add the rewrite URLs for member profiles too?

(ie: https://vborg.vbsupport.ru/member.php?u=80490 changes to https://vborg.vbsupport.ru/member/aftermath.html)

That would be sweet!

Immortal
01-05-2006, 06:45 PM
Alright, I'm waiting for you. I can't wait to get this hack working on my forums. :devious:

Also can you add the rewrite URLs for member profiles too?

(ie: https://vborg.vbsupport.ru/member.php?u=80490 changes to https://vborg.vbsupport.ru/member/aftermath.html)

That would be sweet!

Should already do that now :)

Ex: http://www.hosting-talk.com/u-test-user-6.html

Snake
01-05-2006, 06:48 PM
Ah that's awesome. So are you gonna update the zip file now?! :D

jonblaze3
01-05-2006, 07:15 PM
Hey Tyler,

You're a good guy making this for everyone here so i'm gonna donate to you even though i'm not rich or anything. Anyways i haven't installed it cause i have vbseo but i might in the future and i like ur idea of not having it encoded or charging and i'm also a believer in competition to make better products and services for the people + i hate monopolies...lol.

BTW can you male the member profiles say "username.html" instead of "u-username-###.html?

Thanks!!!

Cole2026
01-05-2006, 07:23 PM
Hey Tyler,

You're a good guy making this for everyone here so i'm gonna donate to you even though i'm not rich or anything. Anyways i haven't installed it cause i have vbseo but i might in the future and i like ur idea of not having it encoded or charging and i'm also a believer in competition to make better products and services for the people + i hate monopolies...lol.

BTW can you male the member profiles say "username.html" instead of "u-username-###.html?

Thanks!!!

We have plans to make the software more versatile and flexible as later versions come out, we will probably have some options in later version to make the rewrite urls whatever you want.

GamerJunk.net
01-05-2006, 08:57 PM
I'm gonna test this tonight and then install it on my live board afterwards...good mod

GamerJunk.net
01-05-2006, 08:58 PM
But also I get this when I view the profiles...

http://www.hosting-talk.com/member.php?u=1

Immortal
01-05-2006, 10:44 PM
Ah that's awesome. So are you gonna update the zip file now?!

It's uploaded now. Please note: That you do not need to upgrade if you are not getting any MySQL errors. If you are (and use table prefixe(s)) you will need to upgrade. Simply upload the new product and choose "Allow overwrite". Nothing new has been fixed other then this.

But also I get this when I view the profiles...

http://www.hosting-talk.com/member.php?u=1

Where is that URL coming from?

TNAImpact
01-05-2006, 10:47 PM
How about donations to remove the copyright line? (I'm picky about stuff like that)

I'd definatly be intrested in donating once this becomes a non-beta plugin as it seems very promosing.

Immortal
01-05-2006, 10:48 PM
How about donations to remove the copyright line? (I'm picky about stuff like that)

I'd definatly be intrested in donating once this becomes a non-beta plugin as it seems very promosing.

I can do that, just shoot me an email when you are ready :)

derekivey
01-05-2006, 11:13 PM
Tyler, found a bug, when you view a forum and see all the threads, if you click the username of the person that started the thread, it doesn't rewrite their username.

Should be an easy fix...

Derek

Immortal
01-05-2006, 11:53 PM
Tyler, found a bug, when you view a forum and see all the threads, if you click the username of the person that started the thread, it doesn't rewrite their username.

Should be an easy fix...

Derek

Whoops, yah it uses JS so it wasn't affected by the <a href. I've fixed this for 1.0. Thanks :)

derekivey
01-06-2006, 12:34 AM
No Problem :)

cclaerhout
01-06-2006, 01:11 AM
It's uploaded now. Please note: That you do not need to upgrade if you are not getting any MySQL errors. If you are (and use table prefixe(s)) you will need to upgrade. Simply upload the new product and choose "Allow overwrite". Nothing new has been fixed other then this.
Where is that URL coming from?

I don't understand it was working with you previous released and now i've got this message :

Database error in vBulletin 3.5.3:

Invalid SQL:
SELECT userid, username FROMuser WHERE username='osibille';

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username='osibille'' at line 1
Error Number : 1064
Date : Thursday, January 5th 2006 @ 10:09:19 PM
Script : http://www.anciensipj.org/forum/index.php
Referrer : http://www.anciensipj.org/index.php?page=edito
IP Address : 83.202.70.78
Username : Technologue
Classname : vb_database

Immortal
01-06-2006, 01:31 AM
You do not need to upgrade unless you previously had SQL errors.

:)

Okay....go to your Plugin Manager, find the hook global_complete and open up vRewrite's plugin. Copy and paste that text to me and PM it to me please. :)

It's working fine on my boards and I can't see why it wouldn't work unless there's an error in the syntax.

eXaulz
01-06-2006, 01:32 AM
Wow. I love the idea, Immortal. Finally, somebody actually cares about helping people instead of making money. Hopefully, this will be better than vBSEO.

:)

eXaulz
01-06-2006, 01:37 AM
Also, a suggestion:

Allow "custom" 'friendly urls'. Don't know how, but I'm sure you can do it

Immortal
01-06-2006, 01:52 AM
Also, a suggestion:

Allow "custom" 'friendly urls'. Don't know how, but I'm sure you can do it.

Thanks for the kind compliment :)

We're hoping to add custom and choices for the 4 major rewrites (showthread, forumdisplay, member and showpost). Hopefully we're have it in the 1.5 release :)

GamerJunk.net
01-06-2006, 01:56 AM
When adding the code to my showthread template I received this error..

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*******/public_html/forum/includes/adminfunctions_template.php(3537) : eval()'d code on line 325

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

eXaulz
01-06-2006, 02:00 AM
Wow. In some SQL queries you were putting FROM". TABLE_PREFIX ." instead of FROM ". TABLE PREFIX ." (notice the space between FROM and ". TABLE_PREFIX .").

Below is the proper code for vRewrite plugin, being called in global_complete. Nothing has been modified except for the things I mentioned above.

Works great now. Do the fix below if you are getting errors like:

Database error in vBulletin 3.5.3:

Invalid SQL:
SELECT userid, username FROMuser WHERE username='youruser';

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username='youruser'' at line 1 Error Number : 1064
Date : Thursday, January 5th 2006 @ 10:45:33 PM
Script : yoursite
Referrer : yoursite/url
IP Address : yourip
Username : youruser
Classname : vb_database

Go to AdminCP -> Plugin System > Plugin Manager >> Click on the vRewrite plugin found under Hook Location : global_complete. Replace the PHP code (found in the big Text Area) with the following: (yes, it works fine)

if($vbulletin->options['vRewrite_on'])
{
#------------------------------
# Replace Forums
#------------------------------
$found = preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"forumdisplay.php?f=$fid\"", "<a href=\"f-$title-$fid.html\"", $output);
}


}

#------------------------------
# Replace User
#------------------------------
$found = preg_match_all('#<a href="member\.php\?u=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid IN($ids)");

while($u = $vbulletin->db->fetch_array($res))
{
$username = urlize($u['username']);
$uid = $u['userid'];

$output = str_replace("<a href=\"member.php?u=$uid\"", "<a href=\"u-$username-$uid.html\"", $output);
}


}

#------------------------------
# Replace showthread.php?goto=newpost
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($n = $vbulletin->db->fetch_array($res))
{
$title = urlize($n['title']);
$tid = $n['threadid'];
$fid = $n['forumid'];


$output = str_replace("<a href=\"showthread.php?goto=newpost&amp;t=$tid\"", "<a href=\"$title-$tid-newpost.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, forumid FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$fid = $f['forumid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;f=$fid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, threadid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$tid = $f['threadid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;t=$tid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}
#-----------------------------------
# DO NOT REMOVE OTHERWISE YOU
# WILL BE SENT A DMCA FOR COPYRIGHT
# INFRINGEMENT YOU MAY NOT USE THIS
# PLUGIN WITHOUT THIS LINE OF CODE
# IF YOU WISE TO REMOVE THIS AND
# ADD IT TO YOUR STYLE, FEEL FREE
# AS LONG AS THE COPYRIGHT REMAINS
#-----------------------------------

$output .= '<div align="center" class="smallfont">SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a>.</div>';

#------------------------------
# SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);

$output = str_replace("<a href=\"showthread.php?t=$tid\"", "<a href=\"$fname/t-$title-$tid.html\"", $output);
}


}

#------------------------------
# SHOWTHREAD and page
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)&amp;page=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

// Keep track of page nums that go with tid's
$temp = array();

for($i = 0; $i < $found; $i++)
{
// $temp[<threadid>] = <page>
$temp[ $matches[1][$i] ] = $matches[2][$i];

if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);
$page = $temp[$tid];


$output = str_replace("<a href=\"showthread.php?t=$tid&amp;page=$page\"", "<a href=\"$fname/t-$title-$tid-page-$page.html\"", $output);


}


}

#------------------------------
# showpost
#------------------------------
$found = preg_match_all('#<a href="showpost\.php\?p=([0-9]+)&amp;postcount=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
$temp[ $matches[1][$i] ] = $matches[2][$i];
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);


// Go through each
$res = $vbulletin->db->query_read("SELECT postid, title FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($p = $vbulletin->db->fetch_array($res))
{
$pid = $p['postid'];
$postcount = $temp[$pid];
$output = str_replace("<a href=\"showpost.php?p=$pid&amp;postcount=$postcount\"", "<a href=\"p-$pid.html\"", $output); }


}
#------------------------------
# Print SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="printthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"printthread.php?t=$tid\"", "<a href=\"print-$title-$tid.html\"", $output);
}


}

#------------------------------
# Email SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="sendmessage\.php\?do=sendtofriend&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"sendmessage.php?do=sendtofriend&amp;t=$tid\"", "<a href=\"sendtofriend-$title-$tid.html\"", $output);
}


}

#------------------------------
# New Thread
#------------------------------
$found = preg_match_all('#<a href="newthread\.php\?do=newthread&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"newthread.php?do=newthread&amp;f=$fid\"", "<a href=\"$title-$fid/newthread.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;noquote=1&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;noquote=1&amp;p=$pid\"", "<a href=\"$fname/newpostnoquote-$pid.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;p=$pid\"", "<a href=\"$fname/newpost-$pid.php\"", $output);
}


}

#------------------------------
# Search
#------------------------------
$found = preg_match_all('#<a href="search\.php\?searchid=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, searchid FROM " . TABLE_PREFIX . "search WHERE searchid IN($ids)");

while($s = $vbulletin->db->fetch_array($res))
{
$userid = $s['userid'];
$searchid = $s['searchid'];


$output = str_replace("search.php?searchid=$searchid", "search-$userid-$searchid.html", $output);
}


}


#------------------------------
# misc pages
#------------------------------
$output = str_replace("search.php?do=getnew","search-getnew.html",$output);
$output = str_replace("search.php?do=getdaily","search-getdaily.html",$output);
$output = str_replace("forumdisplay.php?do=markread","markread.html",$output);
}

/**
* Turn a string into a URL friendly string
*
* @param string $txt The string to work on
* @return string The new string
*/
function urlize($txt)
{
$txt = unaccent($txt);
$txt = html_entity_decode($txt);
$txt = str_replace(' ', '-', $txt);
$txt = preg_replace('#[^a-zA-Z0-9_\-]+#', '', $txt);
$txt = preg_replace('#[\-]+#', '-', $txt);

return strtolower($txt);
}

/**
* Turn accented characters into normal characters
*
* @param string $txt The string to remove the accents from
* @return string Your new clean string
*/
function unaccent($txt)
{
$trans = get_html_translation_table(HTML_ENTITIES);

foreach($trans as $literal => $entity)
{
if(ord($literal) >= 192)
{
$search[] = $literal;
$replace[] = substr($entity, 1, 1);
}
}

return str_replace($search, $replace, $txt);
}

Bug: Avaters aren't displaying properly. For Avatars, it's giving me URL's like: http://forum.excommunity.com/general-discussions/image.php?u=3&dateline=1133479736

Oops. Forgot to do the <base href> thing. Sorry.

GamerJunk.net
01-06-2006, 02:02 AM
After I install it and upload everything...I get this error

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT userid, username FROMvb3_user WHERE username='Mike';

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username='Mike'' at line 1
Error Number : 1064
Date : Thursday, January 5th 2006 @ 11:01:01 PM
Script : http://www.gsnforce.com/forum/index.php
Referrer : http://www.gsnforce.com/forum/forumdisplay.php?f=5
IP Address : *******
Username : Mike
Classname : vb_database

eXaulz
01-06-2006, 02:03 AM
Rasmasta:

https://vborg.vbsupport.ru/showpost.php?p=865687&postcount=58

GamerJunk.net
01-06-2006, 02:06 AM
Yea we posted right after another

but now I am getting this error...

Parse error: parse error, unexpected $ in /home/gsnforce/public_html/forum/includes/functions.php(4314) : eval()'d code on line 30 on the header of my forums...

and then also my showthraed is fudged...I get

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/gsnforce/public_html/forum/showthread.php(1911) : eval()'d code on line 325

GamerJunk.net
01-06-2006, 02:10 AM
Ok I Fixed the showthread problem....but what about that link at the top of my forums??

www.gsnforce.com/forum

LincolnForums
01-06-2006, 02:10 AM
wondering if this will work with such hacks as the vB Goolge/Yahoo site map

Immortal
01-06-2006, 02:11 AM
Thanks, eXaulz. That's weird - I figured that was the problem but my dev board has all the spaces. Let me re-export the product and reupload to see if that solves all the issues.

RasMasta - Let me see if the issue still exist after I reupload the ZIP. :)

wondering if this will work with such hacks as the vB Goolge/Yahoo site map

It will work persay. But the URLs won't be rewritten unless the author of the hack has specifically fixed it. I'll try and release an addon for one of the generators that uses vRewrite - once it goes stable.

GamerJunk.net
01-06-2006, 02:12 AM
Also it isn;t working on my forum....it's not rewriting the threads....do I need to run an update or something on thread titles?

eXaulz
01-06-2006, 02:13 AM
Hmmm. Let me check the plugin code real quick, RasMasta.

Not sure if this will work, I just changed the syntax. Besides, I'm not getting those errors on here - so I'm just guessing.

Go to AdminCP -> Plugin System > Plugin Manager >> Click on the vRewrite plugin found under Hook Location : global_complete. Replace the PHP code (found in the big Text Area) with the following: (yes, it works fine)

if($vbulletin->options['vRewrite_on'])
{
#------------------------------
# Replace Forums
#------------------------------
$found = preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"forumdisplay.php?f=". $fid ."\"", "<a href=\"f-". $title ."-". $fid .".html\"", $output);
}


}

#------------------------------
# Replace User
#------------------------------
$found = preg_match_all('#<a href="member\.php\?u=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid IN($ids)");

while($u = $vbulletin->db->fetch_array($res))
{
$username = urlize($u['username']);
$uid = $u['userid'];

$output = str_replace("<a href=\"member.php?u=$uid\"", "<a href=\"u-$username-$uid.html\"", $output);
}


}

#------------------------------
# Replace showthread.php?goto=newpost
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($n = $vbulletin->db->fetch_array($res))
{
$title = urlize($n['title']);
$tid = $n['threadid'];
$fid = $n['forumid'];


$output = str_replace("<a href=\"showthread.php?goto=newpost&amp;t=$tid\"", "<a href=\"$title-$tid-newpost.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, forumid FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$fid = $f['forumid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;f=$fid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, threadid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$tid = $f['threadid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;t=$tid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}
#-----------------------------------
# DO NOT REMOVE OTHERWISE YOU
# WILL BE SENT A DMCA FOR COPYRIGHT
# INFRINGEMENT YOU MAY NOT USE THIS
# PLUGIN WITHOUT THIS LINE OF CODE
# IF YOU WISE TO REMOVE THIS AND
# ADD IT TO YOUR STYLE, FEEL FREE
# AS LONG AS THE COPYRIGHT REMAINS
#-----------------------------------

$output .= '<div align="center" class="smallfont">SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a>.</div>';

#------------------------------
# SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);

$output = str_replace("<a href=\"showthread.php?t=$tid\"", "<a href=\"$fname/t-$title-$tid.html\"", $output);
}


}

#------------------------------
# SHOWTHREAD and page
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)&amp;page=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

// Keep track of page nums that go with tid's
$temp = array();

for($i = 0; $i < $found; $i++)
{
// $temp[<threadid>] = <page>
$temp[ $matches[1][$i] ] = $matches[2][$i];

if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);
$page = $temp[$tid];


$output = str_replace("<a href=\"showthread.php?t=$tid&amp;page=$page\"", "<a href=\"$fname/t-$title-$tid-page-$page.html\"", $output);


}


}

#------------------------------
# showpost
#------------------------------
$found = preg_match_all('#<a href="showpost\.php\?p=([0-9]+)&amp;postcount=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
$temp[ $matches[1][$i] ] = $matches[2][$i];
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);


// Go through each
$res = $vbulletin->db->query_read("SELECT postid, title FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($p = $vbulletin->db->fetch_array($res))
{
$pid = $p['postid'];
$postcount = $temp[$pid];
$output = str_replace("<a href=\"showpost.php?p=$pid&amp;postcount=$postcount\"", "<a href=\"p-$pid.html\"", $output); }


}
#------------------------------
# Print SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="printthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"printthread.php?t=". $tid ."\"", "<a href=\"print-". $title ."-". $tid .".html\"", $output);
}


}

#------------------------------
# Email SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="sendmessage\.php\?do=sendtofriend&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"sendmessage.php?do=sendtofriend&amp;t=$tid\"", "<a href=\"sendtofriend-$title-$tid.html\"", $output);
}


}

#------------------------------
# New Thread
#------------------------------
$found = preg_match_all('#<a href="newthread\.php\?do=newthread&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"newthread.php?do=newthread&amp;f=$fid\"", "<a href=\"$title-$fid/newthread.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;noquote=1&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;noquote=1&amp;p=$pid\"", "<a href=\"$fname/newpostnoquote-$pid.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;p=$pid\"", "<a href=\"$fname/newpost-$pid.php\"", $output);
}


}

#------------------------------
# Search
#------------------------------
$found = preg_match_all('#<a href="search\.php\?searchid=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, searchid FROM " . TABLE_PREFIX . "search WHERE searchid IN($ids)");

while($s = $vbulletin->db->fetch_array($res))
{
$userid = $s['userid'];
$searchid = $s['searchid'];


$output = str_replace("search.php?searchid=$searchid", "search-$userid-$searchid.html", $output);
}


}


#------------------------------
# misc pages
#------------------------------
$output = str_replace("search.php?do=getnew","search-getnew.html",$output);
$output = str_replace("search.php?do=getdaily","search-getdaily.html",$output);
$output = str_replace("forumdisplay.php?do=markread","markread.html",$output);
}

/**
* Turn a string into a URL friendly string
*
* @param string $txt The string to work on
* @return string The new string
*/
function urlize($txt)
{
$txt = unaccent($txt);
$txt = html_entity_decode($txt);
$txt = str_replace(' ', '-', $txt);
$txt = preg_replace('#[^a-zA-Z0-9_\-]+#', '', $txt);
$txt = preg_replace('#[\-]+#', '-', $txt);

return strtolower($txt);
}

/**
* Turn accented characters into normal characters
*
* @param string $txt The string to remove the accents from
* @return string Your new clean string
*/
function unaccent($txt)
{
$trans = get_html_translation_table(HTML_ENTITIES);

foreach($trans as $literal => $entity)
{
if(ord($literal) >= 192)
{
$search[] = $literal;
$replace[] = substr($entity, 1, 1);
}
}

return str_replace($search, $replace, $txt);
}

GamerJunk.net
01-06-2006, 02:15 AM
Look at my forum if you can...I'll check and see what it is calling

GamerJunk.net
01-06-2006, 02:16 AM
4311-4317

// parse PHP include ##################
if (!is_demo_mode())
{
($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false;
}

if ($vbulletin->options['gzipoutput'] AND !headers_sent())

What could be the cause?

eXaulz
01-06-2006, 02:18 AM
It has nothing to do with that, RM. It has to do with the eval()'ed code, which is being done here:

($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false;

(as you can see in the error msg). That's a cool thing about eval().

Also, did you apply my fix? It might fix your problem.

GamerJunk.net
01-06-2006, 02:20 AM
With your new code I am getting taht error at the top on line 4314

GamerJunk.net
01-06-2006, 02:21 AM
And none of my threads have been rewritten either

GamerJunk.net
01-06-2006, 02:22 AM
Parse error: parse error, unexpected T_STRING in /home/gsnforce/public_html/forum/includes/functions.php(4314) : eval()'d code on line 543

eXaulz
01-06-2006, 02:25 AM
Post 1 - Odd.
Post 2 - Did you upload .htaccess correctly? Re-upload it again.
Post 3 - Line 543 doesn't exist...

GamerJunk.net
01-06-2006, 02:28 AM
Yea I did and I changed it to /forum

I'll reinstall the plug in maybe? And wtf? if Line 543 doesn't exist why is it spitting out that error?

eXaulz
01-06-2006, 02:31 AM
Not sure. Soemtimes PHP get's confused, and does real bad line counting, so it might hav ebeen soemthing I put in the code. Downoad an dupload the new attached file in the first post (the vRewrite post by Immortal) and do everything again. Also, take off '/forum' from your .htaccess.

I'm off.

GamerJunk.net
01-06-2006, 02:37 AM
Reinstalled and now the error is gone but no rewriting? Does this only apply to new threads or do I need to update thread titles?

GamerJunk.net
01-06-2006, 02:39 AM
Nevermind it's working fine now....just when I click the thread and it takes me to the last post it doesn't have the name changed

GamerJunk.net
01-06-2006, 02:39 AM
Thanks for all your help!

Immortal
01-06-2006, 02:52 AM
Nevermind it's working fine now....just when I click the thread and it takes me to the last post it doesn't have the name changed

Yah that's the bug :( since it's a redirect. I really hope someone can enlight me on how to fix it, as I have no idea. I've tried almost everything :speechless:

GamerJunk.net
01-06-2006, 02:55 AM
Ok is anyone else getting this problem....when they create a thread and then click the link to go back to the main forum....the thread isn't there? You have to refresh before it shows up?

Immortal
01-06-2006, 03:05 AM
Ok is anyone else getting this problem....when they create a thread and then click the link to go back to the main forum....the thread isn't there? You have to refresh before it shows up?

Hm, not I. Can't see why that would cause a problem either, hmm...

cclaerhout
01-06-2006, 08:09 AM
Rasmasta:

https://vborg.vbsupport.ru/showpost.php?p=865687&postcount=58

Everything is working well now :
https://vborg.vbsupport.ru/showpost.php?p=865687&postcount=58

What was the problem ? Has archive been updated ?


Another question : how can i use SEOed URLS with Vbadvanced CMPS ?

Cole2026
01-06-2006, 11:58 AM
Everything is working well now :
https://vborg.vbsupport.ru/showpost.php?p=865687&postcount=58

What was the problem ? Has archive been updated ?


Another question : how can i use SEOed URLS with Vbadvanced CMPS ?

We have not worked custom rewrite rules into the system yet, this probably will be available in the near future.

Snake
01-06-2006, 05:53 PM
Awesome thanks for the update! ^_^

Snake
01-06-2006, 06:26 PM
OK it seems to work just fine now although I need to change the following URLs.

Forum URL:

From http://www.metalgearforums.com/f-konami-news-11.html => http://www.metalgearforums.com/siteforums/konaminews.html

Where Site Forums is the main category for Konami News.

Thread URL:

From http://www.metalgearforums.com/site-feedback-discussion-enhancments/t-clubs-802.html => http://www.metalgearforums.com/sitefeedbackdiscussionenhancments/clubs and teams.html (http://www.metalgearforums.com/sitefeedbackdiscussionenhancments/clubsandteams.html)

Member Profile URL:

From http://www.metalgearforums.com/u-takeya-237.html => http://www.metalgearforums.com/members/takeya.html

How can I do that?

SCI
01-06-2006, 06:27 PM
Hey great Hack.

I am going to wait till the rewriting of the links in the "last post" column on forum home to install this.

Can't wait Thanks

derekivey
01-06-2006, 06:52 PM
OK it seems to work just fine now although I need to change the following URLs.

Forum URL:

From http://www.metalgearforums.com/f-konami-news-11.html => http://www.metalgearforums.com/siteforums/konaminews.html

Where Site Forums is the main category for Konami News.

Thread URL:

From http://www.metalgearforums.com/site-feedback-discussion-enhancments/t-clubs-802.html => http://www.metalgearforums.com/sitefeedbackdiscussionenhancments/clubs and teams.html (http://www.metalgearforums.com/sitefeedbackdiscussionenhancments/clubsandteams.html)

Member Profile URL:

From http://www.metalgearforums.com/u-takeya-237.html => http://www.metalgearforums.com/members/takeya.html

How can I do that?

Don't think thats possible right now because it needs to pass the id of the thread and user... That will probably be changed in the future when Tyler edits it to pass the id as a variable or something.

Immortal
01-06-2006, 08:53 PM
Derek is right, Aftermath. But you do some of the other ones, do you want me to try and come up with the custom code for you? :)

GamerJunk.net
01-07-2006, 03:20 AM
2 Problems.....

Still having the problem as the one I mentioned before with thraeds not showing up initially...I have to refresh the page for the thread to show in the forum...

Second...when typing a lot of text in a quick reply box...it doesn't post....it just sits there...I have to manually go to New Reply and do it the old fashioned way...

GamerJunk.net
01-07-2006, 03:45 AM
I disabled AJAX totally now...

And I am able to use large volumes of text in quick reply and post them now...

Snake
01-07-2006, 07:54 AM
Derek is right, Aftermath. But you do some of the other ones, do you want me to try and come up with the custom code for you? :)

Yeah, I'd appreciate that. You know, I intend to make the largest Metal Gear forums around and so I would really like to have the URLs just like the way I've said in my previous post. :D

croportal
01-07-2006, 08:41 AM
Hey Tyler,

BTW can you male the member profiles say "username.html" instead of "u-username-###.html?

Thanks!!!

this will be great

i will also donate, thanks allot for this

croportal
01-07-2006, 08:51 AM
Yeah, I'd appreciate that. You know, I intend to make the largest Metal Gear forums around and so I would really like to have the URLs just like the way I've said in my previous post. :D


i also want to like urls like aftermath said.

can u tell me will this work with 3.5.0 version, anyone with 3.5.0 install???

and cann u tell me,

with dean C, merging threads are not working, when i want to merge threads i must go like this http://www.croportal.net/forum/showthread.php?threadid=6522

not like this http://www.croportal.net/forum/t6351-preko-tisucu-broj-filmova-i-tovar-galerija.html

EasyTarget
01-07-2006, 09:35 AM
nice hack

AshokForums.com
01-07-2006, 11:11 AM
even i would prefer URL to be the way Aftermath mentioned.. It would be great :)

Snake
01-07-2006, 11:48 AM
Whoa I never expected to see you guys agree that quick on how the way I want those URLs changed. :p

croportal
01-07-2006, 11:50 AM
hehheh, this is the best way

Snake
01-07-2006, 12:10 PM
Yeah I know that. I'm hoping Immortal can get it done by tonight. Hey man, whenever your done, please drop me a board PM with the new code. :)

croportal
01-07-2006, 12:13 PM
and me PM hehehhe

Immortal
01-07-2006, 01:57 PM
i also want to like urls like aftermath said.

can u tell me will this work with 3.5.0 version, anyone with 3.5.0 install???

I can't say with "certainty" as I've never tried it myself. But if I remember correctly, there was a 3.5.0 board running it fine. I can't see why it would cause a problem.

and cann u tell me,

with dean C, merging threads are not working, when i want to merge threads i must go like this http://www.croportal.net/forum/showthread.php?threadid=6522

not like this http://www.croportal.net/forum/t6351-preko-tisucu-broj-filmova-i-tovar-galerija.html

That may be a bug for me as well, I didn't even think about that....I'll try and find out and fix it for 1.0.

For everyone who's waiting on it, hopefully I'll have it finished this afternoon :)

croportal
01-07-2006, 02:14 PM
wow, GREAT

derekivey
01-07-2006, 02:48 PM
Nice to hear Tyler :). Looking forward to the next release. Keep up the good work!

Derek

Immortal
01-07-2006, 04:47 PM
OK it seems to work just fine now although I need to change the following URLs.

Forum URL:

From http://www.metalgearforums.com/f-konami-news-11.html => http://www.metalgearforums.com/siteforums/konaminews.html

Where Site Forums is the main category for Konami News.

Thread URL:

From http://www.metalgearforums.com/site-feedback-discussion-enhancments/t-clubs-802.html => http://www.metalgearforums.com/sitefeedbackdiscussionenhancments/clubs and teams.html (http://www.metalgearforums.com/sitefeedbackdiscussionenhancments/clubsandteams.html)

Member Profile URL:

From http://www.metalgearforums.com/u-takeya-237.html => http://www.metalgearforums.com/members/takeya.html

How can I do that?

I was able to reproduce all of that for 1.0 expect for that it needs IDs still. Removing the IDs will have to be a good majority of the code rewrite which will happen in 1.5. But, for the threads it's going to have %20s in the spaces, is that what you really want?

sellbuydomain
01-08-2006, 01:38 AM
thanks , i test it working fine, in 3.5.3 version, but one thing, all threads are rewrited, but the forum section is not write, for example : http://www.xxxxxx.net/forumdisplay.php?f=3 , this is not write. , all other threads are rewrited , if you can fix that will be great

i found one thing, after i post a new thread, it will show like this http://www.******.net/showthread.php?p=172#post172
but after i go back to this thread, it already rewrited
http://www.*****.net/-*******-/t-teset-102.html

it looks working fine, but just courious about this , is this working like this or this is a bug ?

Immortal
01-08-2006, 01:42 AM
thanks , i test it working fine, in 3.5.3 version, but one thing, all threads are rewrited, but the forum section is not write, for example : http://www.xxxxxx.net/forumdisplay.php?f=3 , this is not write. , all other threads are rewrited , if you can fix that will be great

Using the site in your profile, your forum URLs are rewritten for me? :ermm:

sellbuydomain
01-08-2006, 01:46 AM
just updated my last thread, immortal , please read, thanks

Immortal
01-08-2006, 01:49 AM
Yup, that's one of the two bugs that remain unfixed. I'm still waiting for a great person to answer my thread on it to release vRewrite 1.0 :(

sellbuydomain
01-08-2006, 01:58 AM
hi, i am not sure what you mean in last thread
" Using the site in your profile, your forum URLs are rewritten for me?"

any way to fix that forum section rewrite ?

Immortal
01-08-2006, 02:00 AM
<a href="http://www.bw.net/f-introduce-yourself-30.html" target="_blank">http://www.bw.net/f-introduce-yourself-30.html</a>

I assume that's your site?

sellbuydomain
01-08-2006, 02:26 AM
ya , right

sellbuydomain
01-08-2006, 03:04 AM
pm you now

croportal
01-08-2006, 10:51 AM
when you will release 1.0 version

Snake
01-08-2006, 11:26 AM
I was able to reproduce all of that for 1.0 expect for that it needs IDs still. Removing the IDs will have to be a good majority of the code rewrite which will happen in 1.5. But, for the threads it's going to have %20s in the spaces, is that what you really want?

Yeah that's cool. And what exactly is "%20s" in the spaces? You've lost me.

Dean C
01-08-2006, 11:38 AM
I have to say this is a very inefficient way of rewriting the URLs and I would strongly advise anyone against installing this modification. Not because it's similar to mine, as I welcome the comeptition and commend the authors for releasing their work for free, but because of the un-necessary queries run here there and everywhere.

There is absolutely no need to run a query to get the forum titles for example, that information is in the forumcache, and also the forumtitle is available in other variables depending on the page you are on. Most of all you have un-necessary regex's being run on pages they don't need to be run on. It's far more efficient to redirect old URLs to their new equivalent using .htaccess, than to to try and rewrite every rule everywhere or at least limit the regex's on pages they only need to be on.

As I said before, unless this modification's internal struture changes drastically, anyone using a large board will be using a completely un-necessary amount of resources to run it.

Snake
01-08-2006, 11:52 AM
So Dean, tell me. What's so special about your SEO hack? Does it have more features than this already? Is it just well-coded and stuff like that?

Dean C
01-08-2006, 12:11 PM
My SEO mod is not aimed at just rewriting URLs, when it comes out of beta it'll rewrite many sections of the vB HTML output, and also come with a sitemap generator of it's own and SEO tips in the readme. But the rewriting of URLs in my modification is done a lot more efficiently, the regexs are only called when they need to be. And no queries are run to get any of the information. :)

Immortal
01-08-2006, 12:36 PM
Yeah that's cool. And what exactly is "%20s" in the spaces? You've lost me.

When there is a space in any URL, it will create %20s. This is an example. Will change to:
This%20is%20an%20example

when you will release 1.0 version

Sorry, I didn't make my deadline like I was hoping. I've got all the functionalty that was wanted to be added, but that one bug still exists. I'm also working on getting the sitemap generator converted over to work with vRewrite :)

Immortal
01-08-2006, 12:37 PM
It's far more efficient to redirect old URLs to their new equivalent using .htaccess, than to to try and rewrite every rule everywhere or at least limit the regex's on pages they only need to be on.


Coming from the man with the monstrous two rewrites? ;)

rootnik
01-08-2006, 01:07 PM
My SEO mod is not aimed at just rewriting URLs, when it comes out of beta it'll rewrite many sections of the vB HTML output, and also come with a sitemap generator of it's own and SEO tips in the readme. But the rewriting of URLs in my modification is done a lot more efficiently, the regexs are only called when they need to be. And no queries are run to get any of the information. :)


I'm gonna have to agree with Dean here. vRewrite does rewrite more urls, but is not near as efficient as Dean's SEO mod. It would be great if these coders could work together and create one SEO script that would rival vbseo ;)

Immortal
01-08-2006, 01:12 PM
I'm gonna have to agree with Dean here. vRewrite does rewrite more urls, but is not near as efficient as Dean's SEO mod. It would be great if these coders could work together and create one SEO script that would rival vbseo ;)

What do you mean? Dean must be angry that his Mom didn't give him his cereal this morning, or exams are getting too tough. One of the small prices of being a coder that's still in school. vRewrite is just as efficient as Dean's. I can't say the same about vBSEO as it's encoded. If you find anything that's not "efficient" then let me know, and I'll be happy to investigate the problem.

Dean C
01-08-2006, 01:41 PM
What do you mean? Dean must be angry that his Mom didn't give him his cereal this morning, or exams are getting too tough. One of the small prices of being a coder that's still in school. vRewrite is just as efficient as Dean's. I can't say the same about vBSEO as it's encoded. If you find anything that's not "efficient" then let me know, and I'll be happy to investigate the problem.

First of all, stop throwing your dummy out the pram. Second of all, I explained to you exactly what is inefficient about your modification. Take it or leave it, and don't take it personally. You should be trying to learn, not snap because you can't take criticism.

Immortal
01-08-2006, 01:48 PM
First of all, stop throwing your dummy out. Second of all, I explained to you exactly what is inefficient about your modification. Take it or leave it, and don't take it personally. You should be trying to learn, not snap because you can't take criticism.

All I can see is you yellin' at my hack saying don't install it. Yet you never once said what was wrong specifically. You used a general term, and I looked through it and didn't see anything of that nature. I'll admit, I'm a PHP programmer, not a vB coder. I'm still learning the tricks of the trade, so I won't doubt there is problems. But you used a general term which I could not find. So could you? I would love to fix any issues before 1.0. But I still can't see anything of the nature you described.

croportal
01-08-2006, 01:49 PM
There is absolutely no need to run a query to get the forum titles for example, that information is in the forumcache, and also the forumtitle is available in other variables depending on the page you are on. Most of all you have un-necessary regex's being run on pages they don't need to be run on. It's far more efficient to redirect old URLs to their new equivalent using .htaccess, than to to try and rewrite every rule everywhere or at least limit the regex's on pages they only need to be on.

i agree with Dean, i have very large board and this will be...uffff

Guest190829
01-08-2006, 01:59 PM
Everyone please remain calm here. Immortal, Dean's criticism was all constructive in my opinion and he wasn't being personal about any of it. I must assure everyone to keep their posts in this thread towards this hack only. Please do not bring up any other similiar modifications or anything else for that matter, it is not fair to the author and anyone else looking for valuable content concerning the hack. If you feel you need to discuss a hack or multiple hacks, you can do so maturely in an independent thread in the General Modifications Forum. :)

adb22791
01-08-2006, 02:00 PM
My SEO mod is not aimed at just rewriting URLs, when it comes out of beta it'll rewrite many sections of the vB HTML output, and also come with a sitemap generator of it's own and SEO tips in the readme. But the rewriting of URLs in my modification is done a lot more efficiently, the regexs are only called when they need to be. And no queries are run to get any of the information. :)

Good for you, now shut up and go write yours instead of picking on other peoples threads. Telling people not to install a hack somebody worked hard on is ridiculus. None of us would do that in your thread would we, so grow up and learn to show some respect.

Dean C
01-08-2006, 03:56 PM
Good for you, now shut up and go write yours instead of picking on other peoples threads. Telling people not to install a hack somebody worked hard on is ridiculus. None of us would do that in your thread would we, so grow up and learn to show some respect.

I didn't bring my modification into this topic whatsoever until someone mentioned it.

Anyways, Immortal, you should look at only running code on certain pages by checking the value of THIS_SCRIPT. Also the forum titles are stored in the datastore cache and you should use that to get the title associated with an ID.

vau7
01-08-2006, 04:59 PM
What do you mean? Dean must be angry that his Mom didn't give him his cereal this morning, or exams are getting too tough. One of the small prices of being a coder that's still in school. vRewrite is just as efficient as Dean's. I can't say the same about vBSEO as it's encoded. If you find anything that's not "efficient" then let me know, and I'll be happy to investigate the problem.

Sorry, but youre a bad loser. Deans arguments posting by posting are full of facts & hints for you and you just spit these childish stuff instead of arguments.

Go ahead, read the Code by Dean an learn.

@Dean: Concentrate on your exams and dont look in threads like this. ;)

MidnightPyro
01-08-2006, 05:32 PM
Sorry, but youre a bad loser. Deans arguments posting by posting are full of facts & hints for you and you just spit these childish stuff instead of arguments.

Go ahead, read the Code by Dean an learn.

@Dean: Concentrate on your exams and dont look in threads like this. ;)

Bad loser? I don't really think anyone's losing here - especially someone who takes the time and effort to release their work to the community for free. While I know Dean most likely didn't have bad intentions, when you recommend NOT installing someone's hack in their thread, I can see why the hack author would get upset.

Immortal
01-08-2006, 05:41 PM
Anyways, Immortal, you should look at only running code on certain pages by checking the value of THIS_SCRIPT. Also the forum titles are stored in the datastore cache and you should use that to get the title associated with an ID.

Thank you Dean. I'm fixing it now for 1.0. As I said, I'm not a vB programmer ;)

Chroder
01-08-2006, 05:43 PM
Also keep in mind this plugin is still considered 'beta' (as anyone can clearly see by looking at the 'Mod Version' information above).

The author is taking suggestions, fixing errata and is trying to optimize for version 1.0. We can't ask anything more then that :)

Anyway, good job thus far on the mod.

xtreme-mobile
01-08-2006, 05:57 PM
great product works better tahn the one by dean too :) this one does everything :D

thanks

dean

Floris
01-08-2006, 06:03 PM
is this better than DEAN C or??????


i have seen that in this are members rewrite and get daily posts also, but in dean c are not

Definitly.

croportal
01-08-2006, 07:25 PM
thanks Floris, but what will all that queries, if you have large board

Immortal
01-08-2006, 07:34 PM
thanks Floris, but what will all that queries, if you have large board

All queries were fixed for 1.0. Which I hope to release very shortly :)

croportal
01-08-2006, 07:36 PM
All queries were fixed for 1.0. Which I hope to release very shortly :)


oh.....thats great, this is then defintly better than DEAN C

SCI
01-08-2006, 09:54 PM
Is the link in the last post columns going to be rewritten in the 1.0 version?

Immortal
01-08-2006, 10:09 PM
Is the link in the last post columns going to be rewritten in the 1.0 version?

Seems I forgot that :mad:

Fixed for 1.0. Thanks :)

croportal
01-08-2006, 10:46 PM
can u tell me what exactly will be in 1.0 version, what is fixed and what urls are rewritten

this is some my points what the Vrewrite should have (and sorry for my bad english)

1. previosu thread and next thread (https://vborg.vbsupport.ru/showthread.php?t=104484&goto=nextoldest https://vborg.vbsupport.ru/showthread.php?t=104484&goto=nextnewest)
2.you have told that all members are rewirten, and the list http://www.myxite.com/members/list/
3.whats with the pages 1,2,3,4,5,6, in thread
4.when i go to new posts that all url be rewriten not like showthread.php?t=
5.when i go to search some words that all url be rewriten
6.move id from the username, like this www.vbulletin.org/member/croportal not lik member/croportal-154.ui.html or something like this
7.merging threads that work with rewrite urls
8.move id to from thread or put on the back of url
9.is this compatible with vbseo sitemap generator
10.Can we add custom rewrite rules for example , vbadvanced cmps , arcade , geek article and review system ?

sorry for that all questions heh

Immortal
01-08-2006, 11:16 PM
1.0 - 1,2,3,4,7

And the rest should be 1.5. Although I have been working on getting the sitemap converted :)

AshokForums.com
01-09-2006, 01:38 AM
This plugin is compatible with vbAdvanced CMPS???

Immortal
01-09-2006, 02:03 AM
This plugin is compatible with vbAdvanced CMPS???

I don't have a board with it installed, so I can't speak with certainty. But I don't think it would be compatible but running them at the same won't cause any harm to your board.

croportal
01-09-2006, 11:00 AM
wow immortal i have vb 3.5.0 and if this will work with this version i will donate to you...thanks allot. this is just great

AshokForums.com
01-09-2006, 12:37 PM
Any idea when we can expect vRewrite ver 1.0??

croportal
01-09-2006, 12:59 PM
today or tomorow i think

AshokForums.com
01-09-2006, 01:10 PM
today or tomorow i think

Thats great :)

yayvb
01-09-2006, 01:11 PM
I think this is a great idea because I purchased vbseo for $150 and was told that my site was 'adult' in nature or something and that I couldn't have the script so I had to be refunded!!! :( My site needs traffic too!!! :)

StarBuG
01-09-2006, 01:28 PM
It is still in Beta. So, why not suggest a few features if you don't think it's got anywhere "near the functionality of vBSEO"? ;)

Ok here is a suggestion:

To prevent doublicate content if someone comes to the forum via an old url a 301 redirect to the rewritten url would be good especialy for SEs and PR

Then you don?t rewrite all urls yet like

? Previous Thread | Next Thread ?
search resault links with highlight
go to last post

keep up the good work

jonblaze3
01-09-2006, 04:08 PM
I think this is a great idea because I purchased vbseo for $150 and was told that my site was 'adult' in nature or something and that I couldn't have the script so I had to be refunded!!! :( My site needs traffic too!!! :)

thats horrible business practices first off because anyone can add an adult forum anytime after they buy a license whenever they want so what are they gonna do? Monitor every external forum everyday to make sure the posts are appropriate? what happens if they get 100,000 people buy? they gonna monitor all those forums and all the posts in them? dictate a website's content? i'm pretty sure this is not gonna last too long or the business will eventually die especially when competitive products come, then they won't be able to take business for granted anymore

ConqSoft
01-09-2006, 04:32 PM
thats horrible business practices first off because anyone can add an adult forum anytime after they buy a license whenever they want so what are they gonna do? Monitor every external forum everyday to make sure the posts are appropriate? what happens if they get 100,000 people buy? they gonna monitor all those forums and all the posts in them? dictate a website's content? i'm pretty sure this is not gonna last too long or the business will eventually die especially when competitive products come, then they won't be able to take business for granted anymore
This discussion has been hashed out already, and does not belong in this thread. ( https://vborg.vbsupport.ru/showthread.php?t=103546)

Jelsoft limits sites with illegal content from using vBulletin. How do they monitor 100,000 sites? They have a company that does it for them.

version2
01-09-2006, 04:58 PM
This discussion has been hashed out already, and does not belong in this thread. ( https://vborg.vbsupport.ru/showthread.php?t=103546)

Jelsoft limits sites with illegal content from using vBulletin. How do they monitor 100,000 sites? They have a company that does it for them.

So, for a forum that is already high ranked in Google, among other spider sites. Should I do something like this? I make money from advertising dollars and it is mostly guests giving me those dollars. I am afraid to install something like this and -lose- traffic.

Should I just pass this by?

Immortal
01-09-2006, 06:04 PM
There is one issue regarding vRewrite 1.0 which I am currently still struggling with and hope to get it fixed. I won't release a version if I know there are bugs in it and call it a "stable" release. Just not very ethical of me.


Ok here is a suggestion:

To prevent doublicate content if someone comes to the forum via an old url a 301 redirect to the rewritten url would be good especialy for SEs and PR

Then you don?t rewrite all urls yet like

? Previous Thread | Next Thread ?
search resault links with highlight
go to last post

keep up the good work
Previous/Next/Last post were all fixed for 1.0. I've added redirects (or should I say trying to), for 1.0. This is what is stopping me from releasing 1.0 currently. As for the searches, I doubt that'll ever be rewritten. The goal of vRewrite is to better assist SEs in spidering your site, and since they can't use the search function, it kinda defeats the purpose. :)

croportal
01-09-2006, 06:16 PM
i think that better rewrite url like previous and next thread, and go to last post, search you dont

its not so much duplicate content

KoC
01-09-2006, 10:46 PM
Thanks for this nice hack. I have installed it sucessfully and i think i must donate it now :) We wait for the new release :)

AshokForums.com
01-10-2006, 10:57 AM
I am waiting for vRewrite 1.0 ;)

Immortal
01-10-2006, 07:00 PM
Update:

Hello everyone. Just when I thought I had it perfect idea, it didn't work again. I'm going to update that thread....yet again, and hope/pray for a response. I thought I was on the right track, but I guess not, heh. So, I'm still hoping to release it ASAP, but this isn't something that I can do, so its dependent on others, and that thread has been there for awhile with 0 replies :(

croportal
01-10-2006, 10:12 PM
what thread???

Immortal
01-11-2006, 12:09 AM
The Thread (https://vborg.vbsupport.ru/showthread.php?t=104368) regarding the redirect bug :(

Illustrious
01-11-2006, 12:27 AM
I still get error 1064 when I use the latest update of this plugin. It seems to work perfectly when I'm not logged in though.

Immortal
01-11-2006, 12:30 AM
Could you post the full error?

Illustrious
01-11-2006, 12:35 AM
Certainly, it's the same one that was posted earlier on the board though:

Database error in vBulletin 3.5.1:

Invalid SQL:
SELECT userid, username FROM vbuser WHERE username='User';

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'User'' at line 1
Error Number : 1064
Date : Tuesday, January 10th 2006 @ 07:26:35 PM
Script : localhost/forums/
Referrer : localhost/forums/index.php
IP Address : *.*.*.*
Username : User
Classname : vb_database

It's strange because the hack seems to be functioning perfectly when I'm logged off. And I read through all the pages and edited my xml file several times.

Immortal
01-11-2006, 12:42 AM
Do you use a table_prefix? Do this...

AdminCP -> Plugin Manager -> Find vRewrite under the hook "global_complete" -> Choose Edit -> Copy and paste the code using the php tags :)

Illustrious
01-11-2006, 12:48 AM
No, that actually doesn't do the trick.

But I think I know why it's giving me that error. Apparently the username has an apostrophe (O'Neal), and it's in a forum location that is hidden to guests, hence why it works when I'm not logged in.

Is there a way to get apostrophes in membernames parsed?

Immortal
01-11-2006, 12:52 AM
I just created a username with an apostrophe in it, and it worked flawlessly. Can you follow this, and post the code here?

AdminCP -> Plugin Manager -> Find vRewrite under the hook "global_complete" -> Choose Edit -> Copy and paste the code using the php tags

Illustrious
01-11-2006, 12:54 AM
It's the one in the zip, I tried the other fix posted in the thread, but I decided to go back since it didn't work either:

if($vbulletin->options['vRewrite_on'])
{
#------------------------------
# Replace Forums
#------------------------------
$found = preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"forumdisplay.php?f=$fid\"", "<a href=\"f-$title-$fid.html\"", $output);
}


}

#------------------------------
# Replace User
#------------------------------
$found = preg_match_all('#<a href="member\.php\?u=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid IN($ids)");

while($u = $vbulletin->db->fetch_array($res))
{
$username = urlize($u['username']);
$uid = $u['userid'];

$output = str_replace("<a href=\"member.php?u=$uid\"", "<a href=\"u-$username-$uid.html\"", $output);
}


}

#------------------------------
# Replace showthread.php?goto=newpost
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($n = $vbulletin->db->fetch_array($res))
{
$title = urlize($n['title']);
$tid = $n['threadid'];
$fid = $n['forumid'];


$output = str_replace("<a href=\"showthread.php?goto=newpost&amp;t=$tid\"", "<a href=\"$title-$tid-newpost.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, forumid FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$fid = $f['forumid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;f=$fid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, threadid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$tid = $f['threadid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;t=$tid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}
#-----------------------------------
# DO NOT REMOVE OTHERWISE YOU
# WILL BE SENT A DMCA FOR COPYRIGHT
# INFRINGEMENT YOU MAY NOT USE THIS
# PLUGIN WITHOUT THIS LINE OF CODE
# IF YOU WISE TO REMOVE THIS AND
# ADD IT TO YOUR STYLE, FEEL FREE
# AS LONG AS THE COPYRIGHT REMAINS
#-----------------------------------

$output .= '<div align="center" class="smallfont">SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a>.</div>';

#------------------------------
# SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);

$output = str_replace("<a href=\"showthread.php?t=$tid\"", "<a href=\"$fname/t-$title-$tid.html\"", $output);
}


}

#------------------------------
# SHOWTHREAD and page
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)&amp;page=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

// Keep track of page nums that go with tid's
$temp = array();

for($i = 0; $i < $found; $i++)
{
// $temp[<threadid>] = <page>
$temp[ $matches[1][$i] ] = $matches[2][$i];

if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);
$page = $temp[$tid];


$output = str_replace("<a href=\"showthread.php?t=$tid&amp;page=$page\"", "<a href=\"$fname/t-$title-$tid-page-$page.html\"", $output);


}


}

#------------------------------
# showpost
#------------------------------
$found = preg_match_all('#<a href="showpost\.php\?p=([0-9]+)&amp;postcount=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
$temp[ $matches[1][$i] ] = $matches[2][$i];
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);


// Go through each
$res = $vbulletin->db->query_read("SELECT postid, title FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($p = $vbulletin->db->fetch_array($res))
{
$pid = $p['postid'];
$postcount = $temp[$pid];
$output = str_replace("<a href=\"showpost.php?p=$pid&amp;postcount=$postcount\"", "<a href=\"p-$pid.html\"", $output); }


}
#------------------------------
# Print SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="printthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"printthread.php?t=$tid\"", "<a href=\"print-$title-$tid.html\"", $output);
}


}

#------------------------------
# Email SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="sendmessage\.php\?do=sendtofriend&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"sendmessage.php?do=sendtofriend&amp;t=$tid\"", "<a href=\"sendtofriend-$title-$tid.html\"", $output);
}


}

#------------------------------
# New Thread
#------------------------------
$found = preg_match_all('#<a href="newthread\.php\?do=newthread&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"newthread.php?do=newthread&amp;f=$fid\"", "<a href=\"$title-$fid/newthread.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;noquote=1&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;noquote=1&amp;p=$pid\"", "<a href=\"$fname/newpostnoquote-$pid.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;p=$pid\"", "<a href=\"$fname/newpost-$pid.php\"", $output);
}


}

#------------------------------
# Search
#------------------------------
$found = preg_match_all('#<a href="search\.php\?searchid=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, searchid FROM " . TABLE_PREFIX . "search WHERE searchid IN($ids)");

while($s = $vbulletin->db->fetch_array($res))
{
$userid = $s['userid'];
$searchid = $s['searchid'];


$output = str_replace("search.php?searchid=$searchid", "search-$userid-$searchid.html", $output);
}


}


#------------------------------
# misc pages
#------------------------------
$output = str_replace("search.php?do=getnew","search-getnew.html",$output);
$output = str_replace("search.php?do=getdaily","search-getdaily.html",$output);
$output = str_replace("forumdisplay.php?do=markread","markread.html",$output);
}

/**
* Turn a string into a URL friendly string
*
* @param string $txt The string to work on
* @return string The new string
*/
function urlize($txt)
{
$txt = unaccent($txt);
$txt = html_entity_decode($txt);
$txt = str_replace(' ', '-', $txt);
$txt = preg_replace('#[^a-zA-Z0-9_\-]+#', '', $txt);
$txt = preg_replace('#[\-]+#', '-', $txt);

return strtolower($txt);
}

/**
* Turn accented characters into normal characters
*
* @param string $txt The string to remove the accents from
* @return string Your new clean string
*/
function unaccent($txt)
{
$trans = get_html_translation_table(HTML_ENTITIES);

foreach($trans as $literal => $entity)
{
if(ord($literal) >= 192)
{
$search[] = $literal;
$replace[] = substr($entity, 1, 1);
}
}

return str_replace($search, $replace, $txt);
}

Illustrious
01-11-2006, 01:44 AM
I just created a username with an apostrophe in it, and it worked flawlessly. Can you follow this, and post the code here?

That's strange, considering when I removed the apostrophe, it worked flawlessly.

ryuji
01-11-2006, 08:29 AM
im having pretty much the same sql error problem,
Database error in vBulletin 3.5.3:

Invalid SQL:
SELECT userid, username FROM user WHERE username='BB mods's';

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's'' at line 1
Error Number : 1064
Date : Wednesday, January 11th 2006 @ 04:23:40 AM
Script : http://www.site.com/forum/index.php?
Referrer : http://www.site.com/forum/admincp/index.php?do=head
IP Address : 69.164.103.233
Username : ryuji
Classname : vb_database
if($vbulletin->options['vRewrite_on'])
{
#------------------------------
# Replace Forums
#------------------------------
$found = preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"forumdisplay.php?f=". $fid ."\"", "<a href=\"f-". $title ."-". $fid .".html\"", $output);
}


}

#------------------------------
# Replace User
#------------------------------
$found = preg_match_all('#<a href="member\.php\?u=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid IN($ids)");

while($u = $vbulletin->db->fetch_array($res))
{
$username = urlize($u['username']);
$uid = $u['userid'];

$output = str_replace("<a href=\"member.php?u=$uid\"", "<a href=\"u-$username-$uid.html\"", $output);
}


}

#------------------------------
# Replace showthread.php?goto=newpost
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($n = $vbulletin->db->fetch_array($res))
{
$title = urlize($n['title']);
$tid = $n['threadid'];
$fid = $n['forumid'];


$output = str_replace("<a href=\"showthread.php?goto=newpost&amp;t=$tid\"", "<a href=\"$title-$tid-newpost.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, forumid FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$fid = $f['forumid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;f=$fid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, threadid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$tid = $f['threadid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;t=$tid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}
#-----------------------------------
# DO NOT REMOVE OTHERWISE YOU
# WILL BE SENT A DMCA FOR COPYRIGHT
# INFRINGEMENT YOU MAY NOT USE THIS
# PLUGIN WITHOUT THIS LINE OF CODE
# IF YOU WISE TO REMOVE THIS AND
# ADD IT TO YOUR STYLE, FEEL FREE
# AS LONG AS THE COPYRIGHT REMAINS
#-----------------------------------

$output .= '<div align="center" class="smallfont">SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a>.</div>';

#------------------------------
# SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);

$output = str_replace("<a href=\"showthread.php?t=$tid\"", "<a href=\"$fname/t-$title-$tid.html\"", $output);
}


}

#------------------------------
# SHOWTHREAD and page
#------------------------------
$found = preg_match_all('#<a href="showthread\.php\?t=([0-9]+)&amp;page=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

// Keep track of page nums that go with tid's
$temp = array();

for($i = 0; $i < $found; $i++)
{
// $temp[<threadid>] = <page>
$temp[ $matches[1][$i] ] = $matches[2][$i];

if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];
$fid = $t['forumid'];
$foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
$fname = urlize($foruminfo['title']);
$page = $temp[$tid];


$output = str_replace("<a href=\"showthread.php?t=$tid&amp;page=$page\"", "<a href=\"$fname/t-$title-$tid-page-$page.html\"", $output);


}


}

#------------------------------
# showpost
#------------------------------
$found = preg_match_all('#<a href="showpost\.php\?p=([0-9]+)&amp;postcount=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
$temp[ $matches[1][$i] ] = $matches[2][$i];
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);


// Go through each
$res = $vbulletin->db->query_read("SELECT postid, title FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($p = $vbulletin->db->fetch_array($res))
{
$pid = $p['postid'];
$postcount = $temp[$pid];
$output = str_replace("<a href=\"showpost.php?p=$pid&amp;postcount=$postcount\"", "<a href=\"p-$pid.html\"", $output); }


}
#------------------------------
# Print SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="printthread\.php\?t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"printthread.php?t=". $tid ."\"", "<a href=\"print-". $title ."-". $tid .".html\"", $output);
}


}

#------------------------------
# Email SHOWTHREAD
#------------------------------
$found = preg_match_all('#<a href="sendmessage\.php\?do=sendtofriend&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$title = urlize($t['title']);
$tid = $t['threadid'];

$output = str_replace("<a href=\"sendmessage.php?do=sendtofriend&amp;t=$tid\"", "<a href=\"sendtofriend-$title-$tid.html\"", $output);
}


}

#------------------------------
# New Thread
#------------------------------
$found = preg_match_all('#<a href="newthread\.php\?do=newthread&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$title = urlize($f['title']);
$fid = $f['forumid'];

$output = str_replace("<a href=\"newthread.php?do=newthread&amp;f=$fid\"", "<a href=\"$title-$fid/newthread.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;noquote=1&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;noquote=1&amp;p=$pid\"", "<a href=\"$fname/newpostnoquote-$pid.php\"", $output);
}


}

#------------------------------
# New Post
#------------------------------
$found = preg_match_all('#<a href="newreply\.php\?do=newreply&amp;p=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT threadid, postid FROM " . TABLE_PREFIX . "post WHERE postid IN($ids)");

while($t = $vbulletin->db->fetch_array($res))
{
$tid = $t['threadid'];
$pid = $t['postid'];
$threadinfo = $vbulletin->db->query_first("SELECT title, forumid FROM " . TABLE_PREFIX . "thread WHERE threadid='$tid'");
$title = urlize($threadinfo['title']);
$fid = $threadinfo['forumid'];
$f = fetch_foruminfo($fid);
$fname = urlize($f['title']);



$output = str_replace("<a href=\"newreply.php?do=newreply&amp;p=$pid\"", "<a href=\"$fname/newpost-$pid.php\"", $output);
}


}

#------------------------------
# Search
#------------------------------
$found = preg_match_all('#<a href="search\.php\?searchid=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT userid, searchid FROM " . TABLE_PREFIX . "search WHERE searchid IN($ids)");

while($s = $vbulletin->db->fetch_array($res))
{
$userid = $s['userid'];
$searchid = $s['searchid'];


$output = str_replace("search.php?searchid=$searchid", "search-$userid-$searchid.html", $output);
}


}


#------------------------------
# misc pages
#------------------------------
$output = str_replace("search.php?do=getnew","search-getnew.html",$output);
$output = str_replace("search.php?do=getdaily","search-getdaily.html",$output);
$output = str_replace("forumdisplay.php?do=markread","markread.html",$output);
}

/**
* Turn a string into a URL friendly string
*
* @param string $txt The string to work on
* @return string The new string
*/
function urlize($txt)
{
$txt = unaccent($txt);
$txt = html_entity_decode($txt);
$txt = str_replace(' ', '-', $txt);
$txt = preg_replace('#[^a-zA-Z0-9_\-]+#', '', $txt);
$txt = preg_replace('#[\-]+#', '-', $txt);

return strtolower($txt);
}

/**
* Turn accented characters into normal characters
*
* @param string $txt The string to remove the accents from
* @return string Your new clean string
*/
function unaccent($txt)
{
$trans = get_html_translation_table(HTML_ENTITIES);

foreach($trans as $literal => $entity)
{
if(ord($literal) >= 192)
{
$search[] = $literal;
$replace[] = substr($entity, 1, 1);
}
}

return str_replace($search, $replace, $txt);
}

the hack seems to work perfectly except when you view forumhome, if you manualy go to usercp for example it works fine , same goes for subforums

LincolnForums
01-11-2006, 06:15 PM
Not sure if this has been pointed out, but i installed this hack, then installed some themes after it everything went smooth

BUT on showthread and some others the images arent showing up, and the bread crumbs dont work correctly. But only on the newly installed themes.

they look like, http://www.domain.com/forum-name/images.jpg or whatever for some reason.

Didnt try to uninstall this hack and then install after new themes were installed so i dont know if that will fix it or not

derekivey
01-11-2006, 07:01 PM
I found the problem Tyler... You aren't using $db->escape_string() in your code.

For example:

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='$lp'");


Should be:

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='".$db->escape_string($lp)."'");


That should fix the problems everyone is having...

GJK
01-11-2006, 07:29 PM
vbseo isn't even an option for me for several reasons...

#1 Mandatory footer copyright... $150 plus global copyright links? NOT in a million years!
#2 Their self righteous attitude... Kiddy porn? OK, I'll call the feds myself, but some others I've seen mentioned? give me a break lol
#3 probably turn me down anyway! (gambling related)

I'll not only take my biz dollars elsewhere...
I say all of us that were thinking of vbseo, pool our $$$$'s, buy a couple days of offshore man hours to help out Immortal, add some meta features, custom rewrite rules, sitemap gens, take this right to v1.5 & release it as opensource! ;)

I have a lot of experience w/seo & quite a bit with form based seo widgets.
I could whip out some nice xhtml UI's for it.

Any takers?

ryuji
01-11-2006, 09:02 PM
I found the problem Tyler... You aren't using $db->escape_string() in your code.
That should fix the problems everyone is having...
could you show us how it is used in this specific plugin? your example doesnt really compare with the actual code... the code we have is $res = $vbulletin->db->query_read("SELECT forumid, title FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)"); the ends dont match up with your example...

derekivey
01-11-2006, 09:05 PM
That one is fine, there are a few queries in the plugin. You should have what I posted...

Immortal
01-11-2006, 09:23 PM
Thanks Derek....I'll update the plugin shortly. I was thinking of that, but since it was working just fine on my test board - I wasn't sure.

ryuji
01-11-2006, 09:41 PM
outright removing the code fixed it... error and code below... :ermm:

Fatal error: Call to a member function on a non-object in /home/linkforc/public_html/forum/includes/functions.php(4320) : eval()'d code on line 139

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, forumid FROM " . TABLE_PREFIX . "forum WHERE forumid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='".$db->escape_string($lp)."'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$fid = $f['forumid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;f=$fid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found = preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i', $output, $matches);

if($found)
{
// Build an array of ID's
$ids = array();

for($i = 0; $i < $found; $i++)
{
if(is_numeric($matches[1][$i]))
$ids[] = $matches[1][$i];
}
$ids = implode(',', $ids);

// Go through each
$res = $vbulletin->db->query_read("SELECT lastposter, threadid FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

while($f = $vbulletin->db->fetch_array($res))
{
$lp = $f['lastposter'];

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='".$db->escape_string($lp)."'");
$lp = urlize($lpidinfo['username']);
$lpid = $lpidinfo['userid'];
$tid = $f['threadid'];



$output = str_replace("<a href=\"member.php?find=lastposter&amp;t=$tid\"", "<a href=\"u-$lp-$lpid.html\"", $output);
}


}

derekivey
01-11-2006, 09:48 PM
Wait, try making it this instead:

$lpidinfo = $vbulletin->db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE username='".$vbulletin->db->escape_string($lp)."'");

ryuji
01-11-2006, 10:00 PM
that did the trick.. but view first unread's kinda broken http://www.site.com/forum/#post1814

Immortal
01-11-2006, 10:27 PM
It didn't do that before?

ryuji
01-11-2006, 10:36 PM
it didnt work at all until now.. it seems to be somthing to do with the template edit i did to install it because it does it with it disabled but if i remove the template modifications its fine again ... will it cause any problems just to leave the template modifications out?

removing the SHOWTHREAD modification did the trick with the plugin disabled.. im about to try it with it enabled... is there somthing wrong with my template?

heh.. removing the template modification is bad lol... any ideas on fixing the link?

Immortal
01-11-2006, 10:41 PM
I've seen issues where other mods take control of it ex:
title-of-thread-id.html0 I have no idea why it does that, so it may be a template modification or another hack that isn't working together right.

Edit...didn't see your edit. Is it possible for you to PM me a link so I can have a nosey around?

ryuji
01-11-2006, 10:57 PM
pm sent

ajnin
01-12-2006, 01:28 AM
ok, so i got to the point where the arguments about whos vb seo thingy was bigger... i mean better and i stopped reading so i dont know if what i am going to say was covered or not. my thanks goes out to anyone whom is attempting to better this community. both immortal and dean alike.

- %20 should never be in a url... period

- filenames should never be longer(at max) than 31 charcters. its a mac thing

- does this hack have any way to actually prevent duplicate content being spidered by the search enginges?

and yes from what i have read about this hack is that the queries need to be reduced. but knowing that comes from having seen a vbforum die at about 500 users on at one time using a 512 server. mysql is a memory sucking beast. the less times you call upon the evil the better... period. if i were to install this hack on the 10k unique a day forums that i considered in the first place, it would crash the box or jsut slow everything down to a snails pace. even with the 4 gigs of ram that are now in that server.

it seemed like the dean guy was trying to offer some advice, perhaps he should have done so via pm instead of being a jerk and jsut tellign everyone not to install. that wasnt right.

my two cents... i will be looking back into this from time to time, thanks again for the work, i bet version 5 will be awesome ;) (and most likly paid :( )

Immortal
01-12-2006, 01:41 AM
%20 should never be in a url... period

Personally, I agree. However, I have included the option in 1.0. It is not turned on by default, nor would I do it, but I'll leave it up to the owner.

filenames should never be longer(at max) than 31 charcters. its a mac thing

Ooh, excellent. I think that'll make a fine addition to the options in the ACP. I'll see what I can do.

- does this hack have any way to actually prevent duplicate content being spidered by the search enginges?

Not currently. With the 1.0 release, it will use 301 redirects (once I get it working) for showthread. I hope to add more additions in the 1.5 release.

and yes from what i have read about this hack is that the queries need to be reduced.

As soon as Dean explained what was wrong, it was fixed for 1.0 :)


(and most likly paid :( )

vRewrite itself will remain free. I've spent many hours working on it, and I don't have any plans to turn it to paid. However, donations are always very welcomed :)

Gayble
01-12-2006, 11:04 AM
I've tried searching showthread.php, newreply.php, and newthread.php, but I CANNOT find "$headinclude" anywhere! :(

I have vB 3.5.3 installed. Someone please help.

ryuji
01-12-2006, 03:24 PM
you dont look for them in the php files go to admincp>styles and templates>style manager click on the drop down click edit templates then you will find SHOWTHREAD under 'show thread templates' and newreply and newthread under 'new posting templates'

rootnik
01-12-2006, 10:28 PM
I installed this on my patched 3.5.1 and it gave me a fit.

404 errors from links on forumhome and the links on the member list were way of (some of them had my username in the url instead of the user's on the list, and some even had the user ID at the very end of the url behind the .html)

Nobody else has posted this problem, so I'll assume that it is something that I have done wrong myself.

Immortal
01-12-2006, 11:13 PM
404 errors? Did you change the rewrite base in the .htaccess?

And I believe that error is something wrong with the plugin I have uploaded...I'll have to take a look shortly.

GamerJunk.net
01-12-2006, 11:25 PM
I've upgraded but I didn't get any errors....

Immortal
01-12-2006, 11:43 PM
Weird...Well I'm about ready to release 1.0 Preview (since that bug was never fixed) - so hopefully that'll solve the issue.

Immortal
01-13-2006, 02:25 AM
Hello Everyone,

I am pleased to announce the release of 1.0 Preview. This is the final version before 1.0 is considered to be stable. This should be perfectly fine to run on a live board now, but please be forewarned.

Changelog
1.0 Preview is a huge change, thanks to everyone who has let me know of bug(s).

-Table prefixes Thanks Cole (https://vborg.vbsupport.ru/showpost.php?p=865172&postcount=35)
-Fixed forumdisplay member info Thanks Derek (https://vborg.vbsupport.ru/showpost.php?p=865583&postcount=49)
-Fixed table prefixes [#2] Thanks eXaulz (https://vborg.vbsupport.ru/showpost.php?p=865700&postcount=64)
-Additional rewrite rules Thanks Aftermath (https://vborg.vbsupport.ru/showpost.php?p=866275&postcount=85)
-Merging threads Thanks croportal (https://vborg.vbsupport.ru/showpost.php?p=866908&postcount=93)
-Less queries and use of THIS_SCRIPT Thanks Dean (https://vborg.vbsupport.ru/showpost.php?p=868097&postcount=126)
-Additonal Rewrite rules Thanks SCI (https://vborg.vbsupport.ru/showpost.php?p=868442&postcount=136)
-Previous/Next Threads Rewrite Thanks StarBuG (https://vborg.vbsupport.ru/showpost.php?p=868864&postcount=147)
-Many many additional rewrites.

It is encouraged everyone who is running .90 to upgrade ASAP.

Upgrade

Upgrading is rather easy this time. Upload your .htaccess overwrite it, change RewriteBase if needed (see install.html if you are unsure).

In the template: memberinfo find $headinclude and add above that:
<base href="$vboptions[bburl]/" />

Import the product and choose "Allow Overwrite". I am not planning on finding many more bugs for the release of 1.0. If you wish to have additional rewrites, I will begin development on 1.5. 1.0 stable will be released when the new post has been fixed.

Thank you everyone for your support :)

contrai
01-13-2006, 02:33 AM
this mod have problem with Attachments :surprised: :surprised: i can't use manage Attachments .

Immortal
01-13-2006, 02:38 AM
this mod have problem with Attachments :surprised: :surprised: i can't use manage Attachments .

People have been attaching items on my board perfectly fine. Did you edit the showthread template?

contrai
01-13-2006, 02:53 AM
oh no i don't have edit :(

KTBleeding
01-13-2006, 03:12 AM
I upgraded and there were issues with the paging. I had about 12 members IM me all at once, "The site links are going crazy! Old threads are coming up!"

Apparently the paging (1,2,3,4,5 etc) take you to extremely old threads. Couple years old, actually.

Just thought I'd report it.

EDIT:

The paging inside the topics themselves.. not forum pages.

Gayble
01-13-2006, 07:02 AM
you dont look for them in the php files go to admincp>styles and templates>style manager click on the drop down click edit templates then you will find SHOWTHREAD under 'show thread templates' and newreply and newthread under 'new posting templates'

Thankyou ryuji! :)

rootnik
01-13-2006, 12:08 PM
404 errors? Did you change the rewrite base in the .htaccess?

And I believe that error is something wrong with the plugin I have uploaded...I'll have to take a look shortly.

Some of my member looks look like this

http://www.friendcodes.com/forums/members/corey-1.html05

That person's user name is not "corey". THat is actually my user name.

Then when ever I click on a link I get this standard error

Invalid Forum specified. If you followed a valid link, please notify the administrator
This is with the new 1.0 preview

KoC
01-13-2006, 05:25 PM
Thanks for this new release. I love this Plugin :rolleyes:

Immortal
01-13-2006, 05:59 PM
I upgraded and there were issues with the paging. I had about 12 members IM me all at once, "The site links are going crazy! Old threads are coming up!"

Apparently the paging (1,2,3,4,5 etc) take you to extremely old threads. Couple years old, actually.

Just thought I'd report it.

EDIT:

The paging inside the topics themselves.. not forum pages.

Hm, weird. Although my doesn't rewrite, but I can see that there is a bug. I'll look more into it shortly.

Some of my member looks look like this

http://www.friendcodes.com/forums/m.../corey-1.html05

That person's user name is not "corey". THat is actually my user name.

I've seen this a few times. However, I cannot reproduce this on a unhacked forum.

Then when ever I click on a link I get this standard error


Invalid Forum specified. If you followed a valid link, please notify the administrator

This is with the new 1.0 preview

Make sure you changed your RewriteBase in the .htaccess and uploaded it correctly.

croportal
01-13-2006, 06:02 PM
i didnt install version 1.0 because i have dean C version

immortal is this good and stable version

Snake
01-13-2006, 06:26 PM
Bah this mod is still messed up. :( Better buy vBSEO 'cause I haven't got any other choice.

tomasn
01-13-2006, 06:49 PM
hi,

i have Vb 3.5.3 and installed vRewrite 1.0 preview and got the error message "Invalid Forum specified. If you followed a valid link, please notify the administrator". This is the same problem as rootnik got. .htaccess is ok and working corectly. Forum is on "http://subd.domain.com/" and RewriteBase /
?

Immortal
01-13-2006, 06:50 PM
i didnt install version 1.0 because i have dean C version

immortal is this good and stable version

It's what I would consider stable. So far only 1 bug has been found since last night and I don't aniticipate anymore. The only reason it was not released as stable since that one bug still exist.

Bah this mod is still messed up. Better buy vBSEO 'cause I haven't got any other choice.

What is "messed up"?

hi,

i have Vb 3.5.3 and installed vRewrite 1.0 preview and got the error message "Invalid Forum specified. If you followed a valid link, please notify the administrator". This is the same problem as rootnik got. .htaccess is ok and working corectly. Forum is on "http://subd.domain.com/" and RewriteBase /
?


Let me double check the .htaccess I've uploaded, but it should be working just fine.

Immortal
01-13-2006, 06:52 PM
Sorry everyone....there was indeed a bug with the forum rewrite. Redownload and reupload your .htaccess (you do not need to reimport the product). Is it working for everyone now?

Snake
01-13-2006, 07:00 PM
Yeah but showthread ain't working still!

Immortal
01-13-2006, 07:02 PM
The actual showthread works (or should if not shoot me a PM). However, showthread.php?p=postid#postpostid still doesn't work :(

I've bumped my thread up several times, asked numerous people. It seems they are a) not willing to help or not wanting to b) don't know. Which is why I did not release it as a stable release....

Snake
01-13-2006, 07:08 PM
What are you talking about? The actualy showthread ain't working for me.

http://www.metalgearforums.com

Immortal
01-13-2006, 07:11 PM
Working just fine for me? Went to the first forum, and first thread, URL is:

http://www.metalgearforums.com/site-news-updates/t-be-alert-876.html

Oh, btw Aftermath....Feel free to use those custom rewrite rules you asked for, they are included in this version! :D

Snake
01-13-2006, 07:22 PM
Well it's not working for the other threads, just that. Weird!

Oh cool and how do I use them huh? :P

tomasn
01-13-2006, 07:25 PM
now it works fine! thanks :-)

Immortal
01-13-2006, 07:28 PM
Well it's not working for the other threads, just that. Weird!

Very, it was working just dandy for me on alll threads! :surprised:

Oh cool and how do I use them huh? :P

vB Options->vRewrite and will have a few things you can change :)

now it works fine! thanks :-)


And thank you for one of the ones finding it :)

croportal
01-13-2006, 07:30 PM
where can i see live demo

Immortal
01-13-2006, 07:32 PM
where can i see live demo

https://vborg.vbsupport.ru/showpost.php?p=864727&postcount=2

However, I don't believe Hosting-Talk has upgraded to 1.0 Preview yet.

Dean C
01-13-2006, 07:32 PM
i didnt install version 1.0 because i have dean C version

immortal is this good and stable version

Whilst I have tried to steer clear and avoid any competitive input on this modification, I have to say that SEO is not something that should be played with. Once you have your URLs, stick with them. Changing them all the time will have severe issues with getting your site indexed. That is something that I shall be reccomending with my modification when I release it as stable, and I would hope that Immortal reccomends too :) It's a very unwise decision to just up and change your URL's willy-nilly.

Snake
01-13-2006, 07:37 PM
Very, it was working just dandy for me on alll threads! :surprised:


vB Options->vRewrite and will have a few things you can change :)



And thank you for one of the ones finding it :)

Dude, Immortal, it ain't working on my forums properly. Don't ask me why. I've double checked my edits and everything seems to be fine.

croportal
01-13-2006, 07:37 PM
but dean, i use your hack and i think its great but you dont have few aditions to be perfect

like rewrite member
rewrite new posts

and stuff like this

i am consedering to buy vbseo or install this hack when will be stable release i mean 1.5 version

if you release somethin like member rewrite or new posts, i will use yours

Immortal
01-13-2006, 07:46 PM
Whilst I have tried to steer clear and avoid any competitive input on this modification, I have to say that SEO is not something that should be played with. Once you have your URLs, stick with them. Changing them all the time will have severe issues with getting your site indexed. That is something that I shall be reccomending with my modification when I release it as stable, and I would hope that Immortal reccomends too :) It's a very unwise decision to just up and change your URL's willy-nilly.

Throughout all my versions, my URLs have never changed once. Changing from dynamic to static is no easy task - but once its completed it should stay there for awhile if it's done correctly the first time. I've tried many SEO hacks before, and not naming any names, heh.....they were not done correctly. While there is immediate danger, but in less then a week, majority of SEs will begin to benefit once again.

Dude, Immortal, it ain't working on my forums properly. Don't ask me why. I've double checked my edits and everything seems to be fine.

Is it not rewritting at all for you?

croportal
01-13-2006, 07:49 PM
hee thinks on my urls, i cannot change from dean c hack to yours

Snake
01-13-2006, 07:50 PM
Throughout all my versions, my URLs have never changed once. Changing from dynamic to static is no easy task - but once its completed it should stay there for awhile if it's done correctly the first time. I've tried many SEO hacks before, and not naming any names, heh.....they were not done correctly. While there is immediate danger, but in less then a week, majority of SEs will begin to benefit once again.



Is it not rewritting at all for you?

Well most of them aren't changing the URLs. :(

Immortal
01-13-2006, 07:54 PM
hee thinks on my urls, i cannot change from dean c hack to yours

The beginning transcation may be a bit painful for the first week or two. But once that's over, it should start befeniting right away. My opinion is a bit biased, on who's hack to choose from as is his opinion. So keep that in mind when choosing. The best of luck though, if you have any questions, don't hestitate to hit that PM button :)

Well most of them aren't changing the URLs.

Moving to PM - if you don't mind :)

Corriewf
01-13-2006, 07:55 PM
Bah this mod is still messed up. :( Better buy vBSEO 'cause I haven't got any other choice.



You have Dean's version which is better then them all.

Dean C
01-13-2006, 08:02 PM
Throughout all my versions, my URLs have never changed once. Changing from dynamic to static is no easy task - but once its completed it should stay there for awhile if it's done correctly the first time. I've tried many SEO hacks before, and not naming any names, heh.....they were not done correctly. While there is immediate danger, but in less then a week, majority of SEs will begin to benefit once again.



Is it not rewritting at all for you?

This is not about your modification changing it's URLs. Yours haven't, mine haven't. The difference is if someone uses mine and switches to yours, their URLs will change, and vice-versa. This is a very dangerous thing to do and I'm going to be making strong reccomendations in my first post to not switch modifications as croportal is doing and I also see a few others doing.

And also, (this is to croportal) newposts don't need rewriting, as I've explained about a hundred times in my thread and will stress even more in the FAQ ;)

Immortal
01-13-2006, 08:09 PM
This is not about your modification changing it's URLs. Yours haven't, mine haven't. The difference is if someone uses mine and switches to yours, their URLs will change, and vice-versa. This is a very dangerous thing to do and I'm going to be making strong reccomendations in my first post to not switch modifications as croportal is doing and I also see a few others doing.

Competition bittin' at your ankles there a bit Dean? ;)

As I've said before, it is perfectly safe to do it. I hate to use vBSEO as an example, but why else would they give you so many options? Although it is not recommended to change URLs, it is safe to do once in a blue moon. Heck, it'll even help it out a bit - as they will have to reindex your site. And soon I'll be release a SEOed sitemap, to even better assist your indexing.

And also, (this is to croportal) newposts don't need rewriting, as I've explained about a hundred times in my thread and will stress even more in the FAQ ;)

Technically, that is false. If you use newposts, and rewrites, SEs will flag this as double content, and removes the entire purpose of a SEO hack other then better indexing. Once a SE thinks you have double content, it is not the best thing especially for many many occurrences. So that is not true, and I would appreciate it if you stop giving out false information in my thread.

croportal
01-13-2006, 08:15 PM
yes immortal i think that you correct with new posts thing because this is duplicate content

sorry for my bad english

Dean C
01-13-2006, 08:19 PM
Technically, that is false. If you use newposts, and rewrites, SEs will flag this as double content, and removes the entire purpose of a SEO hack other then better indexing. Once a SE thinks you have double content, it is not the best thing especially for many many occurrences. So that is not true, and I would appreciate it if you stop giving out false information in my thread.


Well I'd disagree entirely. The (lastpost link) showthread.php?t=x&goto=newpost serves a function. Upon clicking it, it redirects you to another page. So adding a rewrite for this page only serves a purpose for consistency. Lastpost IS duplicate content because it's showing the same content @ two different URLs. It should definately have rel="nofollow" added to it, and rewriting it is pointless, as all it does is redirect to another page.

Competition bittin' at your ankles there a bit Dean?

All competition is good competition ;) Besides, I'll be recommending people don't migrate from yours to mine (until I make a compatible way for users to migrate without getting a) duplicate content and b) URL inconsistencies)

Immortal
01-13-2006, 08:26 PM
Well I'd disagree entirely. The (lastpost link) showthread.php?t=x&goto=newpost serves a function. Upon clicking it, it redirects you to another page. So adding a rewrite for this page only serves a purpose for consistency. Lastpost IS duplicate content because it's showing the same content @ two different URLs. It should definately have rel="nofollow" added to it, and rewriting it is pointless, as all it does is redirect to another page.

You would never want to add a nofollow link on a redirect, now that is just madness. Not only is it removing your showthread URL, but the new post. Now that is just insanity, and I would never recommend that in a million years as that will severely hurt your forum.

In order to properly fix newpost, you need to rewrite the URL itself, and then the function. This will help SEs better navigate and will never end up on showthread.php itself. I would never suggest you not rewriting newpost - as SEs will just flag that as double content and will remove your site or penalize it if it occurs many times.



;) Besides, I'll be recommending people don't migrate from yours to mine (until I make a compatible way for users to migrate without getting a) duplicate content and b) URL inconsistencies)

You don't seem to worried about duplicate content if you don't worry about newpost at all. And there will be no URL inconsistencies if the proper 404 page is used correctly, and with the brilliance of Google Sitemaps - switching URLs is as easy as snap of a thumb. It is safe to change URLs every once in awhile, any respectable SEO expert will tell you that, if done properly. Even in the first place, meaning majority of URLs is rewritten.

Dean C
01-13-2006, 08:42 PM
You would never want to add a nofollow link on a redirect, now that is just madness. Not only is it removing your showthread URL, but the new post. Now that is just insanity, and I would never recommend that in a million years as that will severely hurt your forum.

In order to properly fix newpost, you need to rewrite the URL itself, and then the function. This will help SEs better navigate and will never end up on showthread.php itself. I would never suggest you not rewriting newpost - as SEs will just flag that as double content and will remove your site or penalize it if it occurs many times.


It is not removing any URL; threads are indexed by the spider going into the forum and then entering threads etc. The only forseeable reason for rewriting the lastpost/newpost links in the lastpost column, as I've said already, is for consistency. This is why I have added rel=nofollow to the lastpost links, because even if you rewrite it, it's two different URLs as the search engine will end up at two URLs for the thread, showthread.php?p=x and yourthreadurl.html.

Dean C
01-13-2006, 08:50 PM
An example:

http://www.hosting-talk.com/links-and-directory-669-newpost.html

is redirected to:

http://www.hosting-talk.com/showthread.php?p=681#post681

But the content is also available on this page:
http://www.hosting-talk.com/announcements-and-feedback/t-links-and-directory-669.html

Immortal
01-13-2006, 08:52 PM
It is not removing any URL; threads are indexed by the spider going into the forum and then entering threads etc. The only forseeable reason for rewriting the lastpost/newpost links in the lastpost column, as I've said already, is for consistency. This is why I have added rel=nofollow to the lastpost links, because even if you rewrite it, it's two different URLs as the search engine will end up at two URLs for the thread, showthread.php?p=x and yourthreadurl.html.

If you are adding nofollow to the last post/new post, it is. As soon as a SE comes across a nofollow, it will stop. Meaning, that won't exist, only by forumdisplay, similar etc. But it will not be found by last post/new post. And as I've said before, that is why you rewrite the function so it will not end up at showthread.php?p=id#postpostid.

As I've said before, and I'll say it again, please stop posting false information in my thread.

Immortal
01-13-2006, 08:55 PM
An example:

http://www.hosting-talk.com/links-and-directory-669-newpost.html

is redirected to:

http://www.hosting-talk.com/showthread.php?p=681#post681

But the content is also available on this page:
http://www.hosting-talk.com/announcements-and-feedback/t-links-and-directory-669.html

And that is the only bug that is preventing it from me releasing it as stable. If you are using showthread.php it defeats any SEO rewrite advantages. Ask any known SEO expert.

This is not a place to discuss such things, as this is a support thread for vRewrite, I appreciate it if you post it in the correct forum and not in my thread.


...Please do not bring up any other similiar modifications or anything else for that matter, it is not fair to the author and anyone else looking for valuable content concerning the hack. If you feel you need to discuss a hack or multiple hacks, you can do so maturely in an independent thread in the General Modifications Forum.

Dean C
01-13-2006, 08:59 PM
If you are adding nofollow to the last post/new post, it is. As soon as a SE comes across a nofollow, it will stop. Meaning, that won't exist, only by forumdisplay, similar etc. But it will not be found by last post/new post. And as I've said before, that is why you rewrite the function so it will not end up at showthread.php?p=id#postpostid.

As I've said before, and I'll say it again, please stop posting false information in my thread.

There is only one person posting false information here, and that is you :)

<a href="link1.php?goto=1" rel="nofollow">a</a>
<a href="link1.php">b</a>

Out of those two links b will be entered. Search engines don't remember rel="nofollow". If you have two identical anchors on a page, one with rel="nofollow", it'll still enter the one without rel="nofollow" on it. And in fact, your modification does redirect to showthread.php?p=id#postpostid, as illustrated in the post before yours. So in essence, you're rewriting a link which internally redirects to showthread.php?t=x&goto=neworlastpost and then externall redirects to showthread.php?p=id#postpostid, which is completely pointless.

Edit: - I'm not talking about my modification at the moment, I'm discussing the reasoning behind why lastpost/newpost has no necessity to be rewritten.

Dean C
01-13-2006, 09:02 PM
And that is the only bug that is preventing it from me releasing it as stable. If you are using showthread.php it defeats any SEO rewrite advantages. Ask any known SEO expert.


The idea behind adding rel="nofollow" to the showthread links which serve a function, is that they never get indexed.

bold
01-13-2006, 09:41 PM
Alright, quit flirting you two.

Gayble
01-14-2006, 04:39 AM
Everything works fine, except the links in the memberlist:
http://www.hostaddicts.com/memberlist.php

When you click on A, B, C, D, etc. the links don't work! :( That's the only problem I'm having with this hack..

bayard88
01-14-2006, 09:47 AM
can we see vbrewrite working?
because I have a path problem in some pages like it: http://www.marocainement.com/forum/discussions-generales/newpostnoquote-1.php

Dean C
01-14-2006, 02:05 PM
bayardd88 - in the first post there is a list of example sites using it :)

bayard88
01-14-2006, 02:27 PM
bayardd88 - in the first post there is a list of example sites using it :)
thanks, sorry

problem fixed, we have to edit the STANDARD_ERROR template and proceed like the others we edited:

3) In the following templates: SHOWTHREAD, newreply, newthread, find $headinclude and add above that:
<base href="$vboptions[bburl]/" />

Now it works fine
I'm waiting for the 1.0 now :)

croportal
01-14-2006, 06:04 PM
thanks, sorry

problem fixed, we have to edit the STANDARD_ERROR template and proceed like the others we edited:

3) In the following templates: SHOWTHREAD, newreply, newthread, find $headinclude and add above that:
<base href="$vboptions[bburl]/" />

Now it works fine
I'm waiting for the 1.0 now :)


1.0 is released

bayard88
01-14-2006, 08:41 PM
where? I just see the 1.0Preview

Immortal
01-14-2006, 08:49 PM
I believe that is what croportal meant...this is pretty much 1.0 will be like. The only reason 1.0 has not been released yet, as there is one outstanding bug which no one seems to know the answer to.

bayard88
01-14-2006, 09:00 PM
I believe that is what croportal meant...this is pretty much 1.0 will be like. The only reason 1.0 has not been released yet, as there is one outstanding bug which no one seems to know the answer to.

Ok, but will you release your 1.0 without fixing the bug I mentionned (template STANDARD_ERROR) ?

Immortal
01-14-2006, 09:09 PM
Ok, but will you release your 1.0 without fixing the bug I mentionned (template STANDARD_ERROR) ?

Sure did - I've added it to the install.html. Thanks :)

bayard88
01-14-2006, 10:06 PM
Sure did - I've added it to the install.html. Thanks :)
you're welcome

joeboo
01-14-2006, 10:10 PM
This hack doesnt work with many of the redirects.

Immortal
01-14-2006, 10:41 PM
Currently there is only one known issue....and that is the redirect on newpost. I have started a new thread here, and it has not have any replies yet to help resolve this issue. It's a bit different since it is a redirect and not a link. I hope to have this repaired in time for the final release. More Information regarding the bug.

Stated up above.

rlamego
01-15-2006, 02:03 AM
Immortal, can you give us a brief description of the steps involved to add extra name formats or duplicate existent?
I would like to add /fid.html (or maybe just /fid/) and /fid/tid/title_of_the_thread.html (or also strip the html extension from it)

Thanks! =)
Ricardo

jmw
01-15-2006, 08:32 PM
It is still in Beta. So, why not suggest a few features if you don't think it's got anywhere "near the functionality of vBSEO"? ;)

Please do something like Vseo. Do you accept donations and where to...

Immortal
01-15-2006, 09:24 PM
Immortal, can you give us a brief description of the steps involved to add extra name formats or duplicate existent?
I would like to add /fid.html (or maybe just /fid/) and /fid/tid/title_of_the_thread.html (or also strip the html extension from it)

Thanks! =)
Ricardo

Hey Ricardo,

I'll try and come up with a tutorial tomorrow - it's been one hell of a weekend.


Please do something like Vseo. Do you accept donations and where to...

Can you explain a bit more? Sorry, I don't quite understand what you are asking. :) And I sure do accept donations, there's a Paypal button in the hack description, just click it :)

rlamego
01-15-2006, 09:26 PM
Thanks!! =)

jaks
01-15-2006, 10:06 PM
One of the many questions I've been getting is "I'd like to see this live".

I run it personally on my own public board - however I do try and tinker with the latest release on my live board before releasing it to y'all, so I have a few fixes that may not have been available at to the public yet. My board can be seen using it here (http://www.techhelpforum.com) and a good friend of mine is using a beta as well, and can be seen here (http://www.hosting-talk.com).

I don't know if you noticed this or if it has been mentioned before but when I goto your site and look at the links they are not rewritten unless I refresh the page. Is this a bug with the hack or your server? This happens in both IE and Firefox.

For example Windows XP forum shows as this below
http://www.techhelpforum.com/forumdisplay.php?f=11 ( This gets shortened when posted lol. You get the idea though. end with not )
and this below after refreshing
http://www.techhelpforum.com/f-windows-xp-11.html

Jaks

Immortal
01-15-2006, 10:28 PM
Last night we installed a "bad hack" (it was not vRewrite), since then we've been having a lot of issues with our plugin system. We thought we solved it last night, but apparently not. This is not an issue with vRewrite AFAIK, since it was working perfectly before last night.

jaks
01-15-2006, 11:27 PM
Actually first checked your site about 4 days ago and saw the same issue. I was going to post then but thought maybe you were working on something at the time because as I said it's fine after refresh. Hopefully that will help you eliminate what ever you installed last night as the culprit. Great hack wish I knew how to code I would help you out. Hope you don't think I'm trying to trash your hack because I would love to add this to my board when it's finished.

Jaks

Immortal
01-15-2006, 11:33 PM
Of course not jaks, I value any bugs or anything of that nature, I just don't like the trolls who don't read and understand the rules. ;)

I'll take a heavier look tomorrow when I have time to find the culprit.