Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
vBSEO-style friendly urls using vB_Friendly_Url mechanism Details »»
vBSEO-style friendly urls using vB_Friendly_Url mechanism
Version: 0.6, by alex.sk alex.sk is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 02-20-2013 Last Update: 02-22-2013 Installs: 26
Uses Plugins
Re-useable Code Translations  
No support by the author.

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]
Adjust ^members/ to match your friendlyurl_memberdir if necessary.

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

File Type: xml product-fti-friendly-urls.xml (30.4 KB, 367 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
sodasusu, tbworld

Comments
  #2  
Old 02-21-2013, 04:01 PM
sodasusu sodasusu is offline
 
Join Date: Aug 2011
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will try thx
Reply With Quote
  #3  
Old 02-21-2013, 04:37 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so what about us who are already using the vbulletin friendly url htaccess rewrite (minus vbseo). Does it handle redirecting traffic to the proper urls as well?

Also are there any changes to be made to the htaccess to achieve the urls above?

PHP Code:
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 
Reply With Quote
  #4  
Old 02-21-2013, 08:53 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately there's something wrong with this plugin. This immediately appears when enabled. Disappears with plugin disabled. Also this only appears on forum.php

The other pages like threads, forums & member pages were rewritten though.

Quote:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4864 bytes) in /home/content/v/g/c/vgchat/html/forum/includes/init.php(336) : eval()'d code(466) : runtime-created function on line 1
Reply With Quote
  #5  
Old 02-21-2013, 10:11 PM
dizzynation's Avatar
dizzynation dizzynation is offline
 
Join Date: Jun 2011
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are going to install this, I highly recommend not doing so on a populate forum, perform it on a test site. Google is the main source for traffic for many forum owners, so please keep in mind that braking your urls will drop your SERPS like its hot.
Reply With Quote
  #6  
Old 02-21-2013, 10:20 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All the more reason to await this guy's response.
Reply With Quote
  #7  
Old 02-22-2013, 09:57 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what is the point of buying vbseo after vb4 ? !
Reply With Quote
  #8  
Old 02-22-2013, 11:34 AM
alex.sk alex.sk is offline
 
Join Date: Feb 2013
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, first of all:
DO NOT CHANGE URL STRUCTURE ON A LIVE BOARD
if you care about your Google rankings.
I didn't expect any questions in this direction, so I didn't even mention it in the first post.
Use a test board. Plan your moves and have redirects ready for your old urls if you decide to move.

Quote:
Ok so what about us who are already using the vbulletin friendly url htaccess rewrite (minus vbseo)
Major link rot.
Same as installing vBSEO on a live board, atop of existing vB4 urls. It's a change in url structure.

Currently the board with this plugin activated will not recognize standard vB4 urls (forums/ID-name, thread/ID-name etc) and will not redirect them to resp. forum/thread-ID.html urls. I can be done, btw, I just didn't even think of it.

Quote:
Also are there any changes to be made to the htaccess to achieve the urls above?
RewriteRules from the first post are necessary for FRIENDLY_URL_REWRITE mode to work.
Same as with standard vB4 urls.

final kaoss, which vB version do you use?
That looks really bad, but the only runtime-created function in the plugin is used in array_map(..., preg_split(...)), I wonder what could go wrong there.
In any case, I guess I'll try it one something more recent than my 4.0.3 in a day or two, some maybe there will be updates from my side.

Quote:
what is the point of buying vbseo after vb4 ?!
None?
For me, it's about moving from vB3+vBSEO to vB4 while keeping the links intact.
An alternative to this plugin being vB4+vBSEO, which, I totally agree, makes little sense.
Reply With Quote
  #9  
Old 02-22-2013, 12:59 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using vb 420 PL2. Waiting for 421 and just skip PL3 altogether.
Reply With Quote
  #10  
Old 02-22-2013, 02:49 PM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
I am using vb 420 PL2. Waiting for 421 and just skip PL3 altogether.
Is there going to be a 4.2.1?....
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04535 seconds
  • Memory Usage 2,328KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete