vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Use vBulletin Archive as Sitemap for the Forum (https://vborg.vbsupport.ru/showthread.php?t=198920)

shabbirbhimani 12-14-2008 10:00 PM

Use vBulletin Archive as Sitemap for the Forum
 
What does this product do?

It uses the existing vBulletin Archive feature to be used for Sitemap for the forum like in vbSEO / TfSEO product.

How to install?
  1. Enable the Archive Feature in
    AdminCP > vBulletin Options > Search Engine Friendly Archive

    Forum Archive Enabled <Yes>
    Display Simple View of Threads <No> ( Optional but its not good to have different page for the content )
  2. Add the following line to your .htacces file

    Code:

    RewriteRule ^sitemap(.*)$ forums/archive/index.php$1 [QSA,L]
  3. Import the product XML
  4. Change the Footer Template to point the Archive to Sitemap Location.

    Find :

    Code:

    <if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
    Replace with :
    Code:

    <if condition="$vboptions['archiveenabled']"><a href="$vboptions[homeurl]sitemap/">$vbphrase[archive]</a> -</if>
    You may need to add a trailing slash after $vboptions[homeurl] if it does not already end with /
  5. Optionally change the Phrase Archive to Sitemap

How to uninstall?
  • Remove the content of .htaccess
  • Revert the template / phrases
  • Just un-install product.

Samples

See the working example on my forum http://www.go4expert.com/

Note: I changed some bburl to homeurls and if you find something wrong in it do let me know and I would be more than happy to help.

Alfa1 12-15-2008 10:35 AM

Something is wrong: It redirects to http://www.mysite.com/index.phpsitemap/
Note that I do have vbSEO sitemap installed. i.e. htaccess does already have these rewrites:
PHP Code:

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$[L


shabbirbhimani 12-15-2008 10:42 AM

If you have vbSEO it already have this feature for you and so you don't need to use this Hack.

Alfa1 12-15-2008 10:47 AM

I dont have the vbSEO product. I only have the vbSEO Google sitemap mod(submits an xml sitemap to sitemaps.org), that is available here on vb.org.

$vboptions[homeurl] gives mysite.com/index.php
When I hardcode this so that my footer shows mysite.com/sitemap/ or to mysite.com/sitemap/index.php then I still get a blank page.

shabbirbhimani 12-15-2008 11:01 AM

in this bburl's are replaced by homeurls and so do let me know your bburls/homeurls.

if you would like that to be changed

Edit the

archive_complete plugin

With the following
Code:

$searchArray=array(
'<a href="' . $vbulletin->options['homeurl'] . '/archive/index.php">' . $vbulletin->options['bbtitle'] . '</a>',
$vbulletin->options['homeurl'] . '/archive/index.php',
"<a href=\"" . $vbulletin->options['home'] . '/' . $vbulletin->options['forumhome'] . '.php">' . $vbulletin->options['bbtitle'] . "</a>"
);

$replaceArray=array(
'<a href="' . $vbulletin->options['bburl'] . 'sitemap/">' . $vbulletin->options['bbtitle'] . ' Sitemap</a>',
$vbulletin->options['bburl'] . 'sitemap',
"<a href=\"" . $vbulletin->options['bburl'] . '">' . $vbulletin->options['hometitle'] . "</a>"
);
$output = str_replace($searchArray, $replaceArray,$output);


abdobasha2004 12-15-2008 11:21 AM

is this better or vbseo sitemap generator?

shabbirbhimani 12-15-2008 11:43 AM

Quote:

Originally Posted by abdobasha2004 (Post 1685809)
is this better or vbseo sitemap generator?

vbseo sitemap generator generates only xml file for robots to be submitted but this one has the sitemap on your forum for users / bots to browse it.

abdobasha2004 12-15-2008 02:21 PM

Server not found


Firefox can't find the server at 100fm6.comsitemap.

shabbirbhimani 12-16-2008 01:48 AM

Quote:

Originally Posted by abdobasha2004 (Post 1685905)
Server not found


Firefox can't find the server at 100fm6.comsitemap.

How do you get to that? If you can tell me more about it I can help you in this.

Stefanus 12-16-2008 08:42 PM

Quote:

Originally Posted by shabbirbhimani (Post 1686316)
How do you get to that? If you can tell me more about it I can help you in this.

Had to do the following edits to get this to link to the sitemap:

Place a "/" between: $vboptions[homeurl] and sitemap/
Code:

<if condition="$vboptions['archiveenabled']"><a href="$vboptions[homeurl]/sitemap/">$vbphrase[archive]</a> -</if>
Changed the following in the .htacces file:
Code:

RewriteRule ^sitemap(.*)$ "My Forum"/archive/index.php$1 [QSA,L]
On the Sitemap the links stil point to www.mysite.comsitemap and the threads to:
http://www.mysite.comsitemap/f-21.html
http://www.mysite.comsitemap/f-23.html

Any help on this?
Thanks


All times are GMT. The time now is 10:05 AM.

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.01314 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete