The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBSEO-style friendly urls using vB_Friendly_Url mechanism Details »» | |||||||||||||||||||||||||||||
vBSEO-style friendly urls using vB_Friendly_Url mechanism
Developer Last Online: Aug 2014
This plugin enables the following url scheme:
vbulletin/forum-name/ vbulletin/forum-name/index10.html vbulletin/forum-name/thread-title-145.html vbulletin/forum-name/thread-title-145-7.html vbulletin/members/admin.html This is close to what vBSEO 3.5.2 generates in its default configuration. he original goal of this plugin was to allow ditching vBSEO during vB3-vB4 upgrade without suffering a massive link rot. At this moment, this plugin may be used as a starting point to implement some specific link scheme, but it's hardly useful by itself unless you have that particual vBSEO version; vBSEO 3.6.0 uses different link scheme not compatible with this one. The plugin hooks to the built-in url generation/parsing mechanism of vB4, overriding vB_Friendly_Url_* classes, unlike vBSEO which does whole-page preg replacements even in vB4. It works within the normal vB data flow, so it's small, simple, and quite fast. It's also very likely to play well along with other plugins like Cerberus. The links generated by this plugin do not always match those of vBSEO. There are slight differences in handling non-alphanumeric characters, and probably other issues too. However, it should accept all vBSEO thread links, in the worst case (CANON_STRICT) issuing some 301 redirects. Most of vBSEO configuration options are not supported. In particular, link structure is hard-coded. If you need something unusual, you may use this as a template, but you'll need to tweak it to get urls you want. Blog urls are not implemented; the site I wrote this for does not use vB blogs. Calendar urls and anything else not handled by vB_Friendly_Url is not supported. Configuration resides on the standard Friendly Urls page. The plugin can work in modes other than FRIENDLY_URL_REWRITE. It's not really indented to do it, it's more of a fallback option, but it's implemented. In FRIENDLY_URL_ADVANCED mode urls look like this: vbulletin/forumdisplay.php/forum-name.html vbulletin/forumdisplay.php/forum-name-10.html vbulletin/showthread.php/thread-title-145.html vbulletin/showthread.php/thread-title-145-7.html vbulletin/member.php/admin.html The plugin allows custom forum slugs, i.e. replacing forum-name with something else without changing the forum title. It's not pretty, but it works. Sample .htaccess rules for FRIENDLY_URL_REWRITE: Code:
RewriteBase /url/path/to/vbulletin RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Use these two only if you have friendlyurl_acceptvb4 enabled RewriteRule ^threads/(.*) showthread.php [L] RewriteRule ^forums/(.*) forumdisplay.php [L] RewriteRule ^members/([^/]+).html$ member.php [L] RewriteRule ^[^/]+/index\d*.html$ forumdisplay.php [L] RewriteRule ^[^/]+/[^/]+.html$ showthread.php [L] RewriteRule ^[^/]+/?$ forumdisplay.php [L] Tested on vB 4.0.3 PL8 and vB 4.2.0. Should work on most 4.x.x versions. Feel free to post bug reports, suggestions etc. in this thread. Download Now
Show Your Support
|
Comments |
#12
|
|||
|
|||
It is planned yes.
|
#13
|
||||
|
||||
Quote:
VBSEO offers more then just SE friendly URL's - it has about 85 functions that can increase your rankings, URL rewrites is just one. I think this is a great mod idea for 3.8.7 vbseo users to vb 4.2 without vbseo - If it works, I hope it does for users. Best of luck |
#14
|
|||
|
|||
Version 0.6 uploaded. Standard vB4 style urls are now accepted, FRIENDLY_URL_BASIC mode fixed
Note you'll need two more RewriteRules for the old urls to work. final kaoss: works well for me in vB 4.2.0. Check what you've got on line 466 of your init_startup. Quote:
My impression from the code is that it's 50% url rewrites, 30% general housekeeping (admincp, db, caches etc), 10% for template tweaks (title, meta etc) and the remaining 10% for stuff I have no idea about. |
#15
|
|||
|
|||
Are you talking about your plugin's init_startup or vbulletins init_statup.php file? Because afaik both of those are vanilla, aka untouched.
|
#16
|
|||
|
|||
I have a strong impression part of this thread is missing.
I meant init_startup hook from datastore. I.e. the piece of eval()'d code where line 466 happens to be. Unless you have better ideas, something like Code:
if($_GET['dumpinitstartup']) var_dump(vBulletinHook::fetch_hook('init_startup')); Code:
($hook = vBulletinHook::fetch_hook('init_startup')) ? eval($hook) : false; Quote:
In any case, with errors like this, I'd try to avoid any guesswork and make sure it's clear where exactly it happens. |
#17
|
|||
|
|||
Also, a note: this plugin was written for vBSEO 3.5.2.
I didn't realize it but even 3.6.0 uses different link scheme in its default configuration. |
#18
|
|||
|
|||
No idea, it decided to dump it all into one line doing it that way.
PHP Code:
|
#19
|
|||
|
|||
please fix
|
#20
|
|||
|
|||
Really though the only issue that I could find with it is that it enables the forum.php page to not render. The rest (forumdisplay, showthreads) works.
|
#21
|
|||
|
|||
....found the problem....
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|