Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Spider Friendly URL hack Details »»
Spider Friendly URL hack
Version: 1.00, by krohnathlonman krohnathlonman is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-26-2004 Last Update: Never Installs: 10
Is in Beta Stage  
No support by the author.

I've started using better URLs for the search engines and I'm looking for some advice on what templates to modify. I also don't have the multi page part working right currently so I could use some help on that.

I haven't figured out the part to go to specific posts quite yet but I thought I'd share what I have so far.

URLs for the threads now look like this:
http://www.iamnotageek.com/t-76948.html

Insert this into your .htaccess file in your forum base directory.
Code:
  RewriteEngine on
  RewriteRule ^t-([0-9]+) showthread.php?t=$1 [L]
Now test it by using a URL like domain.com/forum/t-THREADID.html

If that shows the thread properly THEN go into your admincp and use the template search function. Do a search for showthread.php and start editing those templates to send people to these new URLs. Don't modify things like the next page links.

This could potentially raise CPU usage quite a bit but my site pulls a decent amount of people per day and I'm not noticing much of a spike in CPU usage.

This can also be done for forums. I've done it here http://iamnotageek.com/f-46.html

If I can get the next page system working right I'll get the full instructions together.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-28-2004, 06:08 PM
djohn djohn is offline
 
Join Date: Feb 2004
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Polo
Yeah, that is what this mod does..
that's not what i asked
Reply With Quote
  #13  
Old 09-29-2004, 01:20 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've updated the first post with quite a bit more information.

Djohn it will NOT be creating URLS like that. It will be creating MUCH better URLs
Reply With Quote
  #14  
Old 09-29-2004, 02:58 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, i can't wait till you figure out how to get all the links a .HTML file!!
Reply With Quote
  #15  
Old 09-29-2004, 03:21 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm working on it I'm having trouble finding where those breadcrumb links are created. I've posted a thread asking for help on this. I'm sure I'm only missing something small to make the multi page work right. I've just done the modifications to newthread and newreply so that they get sent to the right URLs now. I'm slowly tracking things down to eliminate all those nasty URLs.

Search engines are where I get most of my traffic from so everything I can possibly do to improve them I'm going after! I've been capturing quite a few big search phrases the past few months and I've found one that is seriously bringing in nearly 1k ppl/day and about 60 terms that bring in more than 1k ppl this month! I need to pick up the pace for winter when things hit their prime.

My .htaccess is now looking like this:
Code:
RewriteEngine on
RewriteRule ^t-([0-9]+)?-([0-9]+) showthread.php?t=$1&page=$2 [L]
RewriteRule ^t-([0-9]+) showthread.php?t=$1 [L]
RewriteRule ^f-([0-9]+) forumdisplay.php?f=$1 [L]
RewriteRule ^p-([0-9]+) showthread.php?p=$1 [L]
the first t- is my attempt at multi page support.
Reply With Quote
  #16  
Old 09-29-2004, 03:30 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by krohnathlonman
I'm working on it I'm having trouble finding where those breadcrumb links are created. I've posted a thread asking for help on this. I'm sure I'm only missing something small to make the multi page work right. I've just done the modifications to newthread and newreply so that they get sent to the right URLs now. I'm slowly tracking things down to eliminate all those nasty URLs.

Search engines are where I get most of my traffic from so everything I can possibly do to improve them I'm going after! I've been capturing quite a few big search phrases the past few months and I've found one that is seriously bringing in nearly 1k ppl/day and about 60 terms that bring in more than 1k ppl this month! I need to pick up the pace for winter when things hit their prime.

My .htaccess is now looking like this:
Code:
RewriteEngine on
RewriteRule ^t-([0-9]+)?(-[0-9]+) showthread.php?t=$1&page=$2 [L]
RewriteRule ^t-([0-9]+) showthread.php?t=$1 [L]
RewriteRule ^f-([0-9]+) forumdisplay.php?f=$1 [L]
RewriteRule ^p-([0-9]+) showthread.php?p=$1 [L]
the first t- is my attempt at multi page support.
Very kool, i can't wait till you figure the rest out.
Reply With Quote
  #17  
Old 09-29-2004, 03:39 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I edited my post above to include my NOW working multi page support! Here it is a second time just in case you're a lil slow....
Code:
RewriteRule ^t-([0-9]+)?-([0-9]+) showthread.php?t=$1&page=$2 [L]
If you know the templates you can now find the multi page references and get them working properly!

I used dreamweaver to search the entire vbulletin directory for the code $url which is used for redirects in things like the newthread and newpost. I modifed them slightly so now all redirects are working properly.

Yes this is running notes as I figure things out... I'm looking for help/suggestions. You will have to know a little bit about the templates and do a bit of thinking but everything you need to know to do this hack is posted in this thread. Step by Step instructions will be put together when I get things finalized.
Reply With Quote
  #18  
Old 09-29-2004, 03:45 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think Xenon has released somthing to this effect, and Dani released a very good tutorial about this, however ive never had issues with google properly spidering my pages. so i dont see how this makes vBulletin any more SE freindly then nit already is.
Reply With Quote
  #19  
Old 09-29-2004, 04:13 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon released an archive.... This is quite different since its bringing addresses like that to the actual forum. I'm looking for Dani's Tutorial right now.... Can ya link me? not finding in the search on vb.com or .org

Friendlier URLs like this have shown to get better positioning in searches.
One of the key things with google is how many sites are linking to a URL.... Take the URL position benefit THEN tack on people linking to these URLs instead of the showthread.php?t=XXXXX type URLs and I BET you will see a benefit from this. This is not a "quick" fix by any means but eventually over time you will see the benefit.

The greatest example of a site getting killer search positioning primarily due to a mod like this is computercops
Reply With Quote
  #20  
Old 09-29-2004, 04:35 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in functions_forumdisplay.php
Code:
			$totalpages = ceil($thread['totalposts'] / $pperpage);
//	orignal line		$address = "showthread.php?$session[sessionurl]t=$thread[threadid]";

			$address = "t-$thread[threadid]";
			$address2 = "$thread[highlight]";
			$curpage = 0;
Then in the template threadbit_pagelink
Code:
 <a href="$address-$curpage$address2.html">$curpage</a>
Next thing I have to track down is that top right navbar and correct those links.
Reply With Quote
  #21  
Old 09-29-2004, 05:03 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow this is proving to be alot of work LOL for the top right links: showthread.php
Code:
	$DB_site->free_result($posts);
	unset($post);

	DEVDEBUG("First Post: $FIRSTPOSTID; Last Post: $LASTPOSTID");

//Line 961
	$pagenav = construct_page_nav($totalposts, "t-$threadid", "");

	if ($thread['lastpost'] > $bbuserinfo['lastvisit'])
	{
Then there's a couple mods in template pagenav this is what I did for the first page:
<if condition="$show['first']"><td class="alt1"><a class="smallfont" href="$address-1.html" title="$vbphrase[first_page] -

Do basically the same for last page and the next/previous links.
Template pagenav_pagelink has all the middle pages

This is it for tonight.... I'm done tinkering with this.... The breadcrumb is really the main thing I have left to do on my forum. Then hopefully somebody will help me with the step by step instructions.
Reply With Quote
Reply


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 12:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06478 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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
  • (7)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete